Ticket #1885: mc-git-autopoint.patch

File mc-git-autopoint.patch, 4.1 KB (added by s01ja, 14 years ago)

patch allowing testing without cvs installed

  • autogen.sh

    old new  
    2525if test $? -ne 0;  then 
    2626    AUTOPOINT=maint/autopoint 
    2727fi 
     28cvs -v >/dev/null 2>&1 
     29if test $? -ne 0;  then 
     30    AUTOPOINT=maint/autopoint 
     31fi 
    2832 
    2933cd "$srcdir" 
    3034 
  • maint/autopoint

    diff -ru mc.org/maint/autopoint mc/maint/autopoint
    old new  
    340340# users of CVS. 
    341341# 
    342342# Check availability of the CVS program. 
    343 (cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found" 
     343# (cvs -v) >/dev/null 2>/dev/null || func_fatal_error "cvs program not found" 
     344withcvs=true 
     345cvs -v >/dev/null 2>&1 
     346if test $? -ne 0;  then 
     347  echo "cvs program not found. it could be possible that we still continue." 
     348  echo "when you are a translator you are MAYBE better off using csv and" 
     349  echo "the purposed version of gettext (as this 'autopoint' script checks" 
     350  echo "out a specific version of gettext.)" 
     351  echo "when your distribution is nice it should be possible to copy" 
     352  echo "with the installed version of your files." 
     353  echo "this will pollute your source directory with some trash" 
     354  echo "when things fail:" 
     355  echo "install cvs and/or a version of autopoint" 
     356  echo "when you modified po/intl/m4 you should stop here" 
     357  echo "press return to continue anyway or ctrl+c and install cvs" 
     358  read 
     359  withcvs=false 
     360fi 
    344361 
    345362# Check in which directory config.rpath, mkinstalldirs etc. belong. 
    346363auxdir=`cat "$configure_in" | grep '^AC_CONFIG_AUX_DIR' | sed -n -e 's/AC_CONFIG_AUX_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` 
     
    417434 
    418435# Need to pass -d "$CVSROOT", because there may be a CVS directory in the 
    419436# current directory. 
    420 cvs -d "$CVSROOT" init 
    421 gzip -d -c < "$gettext_dir/archive.tar.gz" | (cd "$cvs_dir" && tar xf -) 
    422  
    423 cd "$work_dir" 
    424 cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'` 
    425 (cvs checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating' 
    426 find archive -name CVS -type d -print | xargs rm -rf 
    427 # Check that really all CVS directories are gone, otherwise we would overwrite 
    428 # the contents of the user's CVS directories. 
    429 if test `find archive -name CVS -type d -print | wc -l` != 0; then 
    430   cd .. 
    431   rm -rf "$cvs_dir" "$work_dir" 
    432   func_fatal_error "failed to remove all CVS subdirectories" 
    433 fi 
    434 if test `find archive -type f -print | wc -l` = 0; then 
    435   cd .. 
    436   rm -rf "$cvs_dir" "$work_dir" 
    437   func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version" 
     437if test "${withcvs}" = "true"; then 
     438  # the original code that untars the 'archive' in /usr/share/gettext 
     439  # and detects local modifications 
     440  # the result is a copy of m4,po,intl,ABOUT_NLS and config.rpath 
     441  # this files are available in the /usr/share/gettext directory 
     442  # and the cvs is only needed when a translator modifies the files 
     443  cvs -d "$CVSROOT" init 
     444  gzip -d -c < "$gettext_dir/archive.tar.gz" | (cd "$cvs_dir" && tar xf -) 
     445 
     446  cd "$work_dir" 
     447  cvsver=gettext-`echo "$ver" | sed -e 's/\./_/g'` 
     448  (cvs checkout -r"$cvsver" archive > /dev/null) 2>&1 | grep -v '^cvs checkout: Updating' 
     449  find archive -name CVS -type d -print | xargs rm -rf 
     450  # Check that really all CVS directories are gone, otherwise we would overwrite 
     451  # the contents of the user's CVS directories. 
     452  if test `find archive -name CVS -type d -print | wc -l` != 0; then 
     453    cd .. 
     454    rm -rf "$cvs_dir" "$work_dir" 
     455    func_fatal_error "failed to remove all CVS subdirectories" 
     456  fi 
     457  if test `find archive -type f -print | wc -l` = 0; then 
     458    cd .. 
     459    rm -rf "$cvs_dir" "$work_dir" 
     460    func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version" 
     461  fi 
     462else 
     463  # workarround for missing cvs 
     464  # does overwrite any development changes, but as we checked out from git this might be ok 
     465  cd "$work_dir" 
     466  mkdir archive 
     467  cp -r ${gettext_dir}/* ./archive 
    438468fi 
    439469cd .. 
    440  
    441470# func_destfile file 
    442471# determines the destination file, relative to the package's top level 
    443472# directory, for a given file name, relative to archive.