summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-06-07 02:44:45 +0200
committerBruno Haible <bruno@clisp.org>2010-08-30 22:58:23 +0200
commit84a360eeff3d7af217ef56603db1e5a86e3d68d7 (patch)
treea0337e0fceaa8788e6f68f0ecf6c7eed4d71a1a6
parent99d1fc2e607d67e00175bc5b8020c8af5bbea7b2 (diff)
downloadexternal_gettext-84a360eeff3d7af217ef56603db1e5a86e3d68d7.zip
external_gettext-84a360eeff3d7af217ef56603db1e5a86e3d68d7.tar.gz
external_gettext-84a360eeff3d7af217ef56603db1e5a86e3d68d7.tar.bz2
New options --with-xz and --with-bzip2 for compressing the archive.
-rw-r--r--ChangeLog6
-rw-r--r--DEPENDENCIES56
-rw-r--r--NEWS7
-rw-r--r--gettext-tools/ChangeLog7
-rw-r--r--gettext-tools/configure.ac120
-rw-r--r--gettext-tools/misc/ChangeLog21
-rw-r--r--gettext-tools/misc/Makefile.am86
-rwxr-xr-xgettext-tools/misc/add-to-archive6
-rw-r--r--gettext-tools/misc/autopoint.in13
-rw-r--r--gettext-tools/misc/convert-archive.in25
10 files changed, 274 insertions, 73 deletions
diff --git a/ChangeLog b/ChangeLog
index 08775a5..cb91a59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-06 Bruno Haible <bruno@clisp.org>
+
+ New options --with-xz and --with-bzip2 for compressing the archive.
+ * DEPENDENCIES: Correct placement of entries for 'tar' and 'gzip'. Add
+ entries for 'bzip2' and 'xz'.
+
2010-06-04 Bruno Haible <bruno@clisp.org>
* m4/libtool.m4: Update from libtool-2.2.8, with modifications.
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 30e29b2..e11eb94 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -70,6 +70,41 @@ The following packages should be installed before GNU gettext is installed
+ Download:
http://www.kernel.org/pub/software/scm/git/
+* The archiving utility 'tar'.
+ + Recommended.
+ Needed for the 'autopoint' program.
+ Either the platform's native tar, or GNU tar.
+ + Homepage:
+ http://www.gnu.org/software/tar/
+ + Download:
+ http://ftp.gnu.org/gnu/tar/
+ ftp://ftp.gnu.org/gnu/tar/
+
+* The GNU compression utility 'gzip'.
+ + Recommended.
+ Needed for the 'autopoint' program.
+ + Homepage:
+ http://www.gnu.org/software/gzip/
+ + Download:
+ http://ftp.gnu.org/gnu/gzip/
+ ftp://ftp.gnu.org/gnu/gzip/
+
+* The compression utility 'bzip2'.
+ + Recommended.
+ Needed for the 'autopoint' program, if not configured with --without-bzip2.
+ + Homepage:
+ http://www.bzip.org/
+ + Download:
+ http://www.bzip.org/downloads.html
+
+* The compression utility 'xz'.
+ + Recommended.
+ Needed for the 'autopoint' program, if not configured with --without-xz.
+ + Homepage:
+ http://tukaani.org/xz/
+ + Download:
+ http://tukaani.org/xz/
+
* libxml2
+ Optional.
Needed for the --color option of the various programs.
@@ -191,24 +226,3 @@ dependencies):
+ Download:
http://ftp.gnu.org/gnu/grep/
ftp://ftp.gnu.org/gnu/grep/
-
-* The archiving utility 'tar'.
- + Optional.
- Needed for the 'autopoint' program, if not configured with --without-git
- and --without-cvs.
- Either the platform's native tar, or GNU tar.
- + Homepage:
- http://www.gnu.org/software/tar/
- + Download:
- http://ftp.gnu.org/gnu/tar/
- ftp://ftp.gnu.org/gnu/tar/
-
-* The GNU compression utility 'gzip'.
- + Optional.
- Needed for the 'autopoint' program, if not configured with --without-git
- and --without-cvs.
- + Homepage:
- http://www.gnu.org/software/gzip/
- + Download:
- http://ftp.gnu.org/gnu/gzip/
- ftp://ftp.gnu.org/gnu/gzip/
diff --git a/NEWS b/NEWS
index 549f554..9c85882 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,13 @@ Version 0.18.2 - July 2010
- The initial msgstr of a new message is now "", not NULL.
- Bug fixes in the functions po_message_is_range, po_file_check_all,
po_message_check_all.
+
+* Installation options:
+ The configure options --with-xz and --with-bzip2 can be used to specify
+ alternate compression methods for the archive used by the 'autopoint'
+ program. These options, together with --with-git, allow to trade
+ dependencies against installed package size. --with-xz has the highest
+ compression rate, followed by --with-git, followed by --with-bzip2.
Version 0.18.1 - June 2010
diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog
index 4c6e4d2..f31bab1 100644
--- a/gettext-tools/ChangeLog
+++ b/gettext-tools/ChangeLog
@@ -1,5 +1,12 @@
2010-06-06 Bruno Haible <bruno@clisp.org>
+ New options --with-xz and --with-bzip2 for compressing the archive.
+ * configure.ac: New options --without-bzip2, --without-xz.
+ (ARCHIVE_FORMAT): Rename value 'dir' to 'dirgz'. Recognize also values
+ 'dirxz' or 'dirbz2', depending on options.
+
+2010-06-06 Bruno Haible <bruno@clisp.org>
+
* configure.ac (ARCHIVE_FORMAT): If neither --with-git nor --with-cvs
is specified, don't use the git format if the 'git' program if older
than version 1.6.
diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
index 71cc38b..4a76c1d 100644
--- a/gettext-tools/configure.ac
+++ b/gettext-tools/configure.ac
@@ -323,36 +323,114 @@ AC_ARG_WITH([cvs],
(deprecated)],
[gt_use_cvs=$withval],
[gt_use_cvs=no])
+AC_ARG_WITH([bzip2],
+ [ --without-bzip2 don't use bzip2 to compress the infrastructure archive],
+ [gt_use_bzip2=$withval],
+ [gt_use_bzip2=maybe])
+AC_ARG_WITH([xz],
+ [ --without-xz don't use xz to compress the infrastructure archive],
+ [gt_use_xz=$withval],
+ [gt_use_xz=maybe])
# The CVS format is deprecated, because "cvs init" does not work in all
# circumstances
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-05/msg00003.html>)
# and we are not allowed to distribute the cvs infrastructure files ourselves
# (see <http://lists.gnu.org/archive/html/bug-cvs/2010-06/msg00011.html>).
-if test "$gt_use_git" != no && test "$gt_use_git" != maybe; then
- # --with-git is specified. Even if --with-cvs is also specified, we use the
- # git format.
- ARCHIVE_FORMAT=git
+#
+# With the archive from version 0.18.1, we can observe the following
+# compression rates:
+# Size File
+# 16916480 archive.dir.tar
+# 3528757 archive.dir.tar.gz
+# 2621440 archive.cvs.tar
+# 2082492 archive.dir.tar.bz2
+# 696320 archive.git.tar
+# 599046 archive.git.tar.bz2
+# 592989 archive.git.tar.gz
+# 588124 archive.git.tar.xz
+# 457190 archive.cvs.tar.gz
+# 335808 archive.cvs.tar.bz2
+# 308880 archive.dir.tar.xz
+# 299124 archive.cvs.tar.xz
+# Among these:
+# - We don't offer the uncompressed ones, because at least gzip can be
+# assumed to be present everywhere.
+# - Among archive.git.tar.*, all have approximately the same size, because
+# git already compresses most of its repository data. Offer only .gz here.
+# - Among archive.cvs.tar.*, offer only .gz, for simplicity, since --with-cvs
+# is deprecated.
+# The remaining ones are:
+# Size File ARCHIVE_FORMAT
+# 3528757 archive.dir.tar.gz dirgz
+# 2082492 archive.dir.tar.bz2 dirbz2
+# 592989 archive.git.tar.gz git
+# 457190 archive.cvs.tar.gz cvs
+# 308880 archive.dir.tar.xz dirxz
+if test "$gt_use_xz" != no && test "$gt_use_xz" != maybe; then
+ # --with-xz is specified. Even if --with-git or --with-cvs or --with-bzip2 is
+ # also specified, we use the dirxz format.
+ ARCHIVE_FORMAT=dirxz
else
- if test "$gt_use_cvs" != no; then
- # --with-cvs is specified.
- ARCHIVE_FORMAT=cvs
+ if test "$gt_use_git" != no && test "$gt_use_git" != maybe; then
+ # --with-git is specified. Even if --with-cvs or --with-bzip2 is also
+ # specified, we use the git format.
+ ARCHIVE_FORMAT=git
else
- # Neither --with-git nor --with-cvs is specified.
+ if test "$gt_use_cvs" != no; then
+ # --with-cvs is specified. Even if --with-bzip2 is also specified, we use
+ # the cvs format.
+ ARCHIVE_FORMAT=cvs
+ else
+ if test "$gt_use_bzip2" != no && test "$gt_use_bzip2" != maybe; then
+ # --with-bzip2 is specified. We use the dirbz2 format.
+ ARCHIVE_FORMAT=dirbz2
+ else
+ # Neither --with-git nor --with-cvs nor --with-bzip2 nor --with-xz is
+ # specified. Determine which programs are present.
+ if test "$gt_use_xz" != no \
+ && (xz --version) >/dev/null 2>&1 \
+ && xz --version | grep lzma >/dev/null; then
+ # --without-xz is not specified, and the xz program exists.
+ ARCHIVE_FORMAT=dirxz
+ else
+ # --without-xz is specified, or the xz program is missing.
changequote(,)dnl
- if test "$gt_use_git" != no \
- && (git --version) >/dev/null 2>&1 \
- && { case `git --version | sed -e 's/^[^0-9]*//'` in
- 0.* | 1.[0-5].*) false ;;
- *) true ;;
- esac
- }; then
+ if test "$gt_use_git" != no \
+ && (git --version) >/dev/null 2>&1 \
+ && { case `git --version | sed -e 's/^[^0-9]*//'` in
+ 0.* | 1.[0-5].*) false ;;
+ *) true ;;
+ esac
+ }; then
changequote([,])dnl
- # --without-git is not specified, and the git program exists
- # in version 1.6 or newer. Use git format.
- ARCHIVE_FORMAT=git
- else
- # --without-git is specified, or the git program is missing.
- ARCHIVE_FORMAT=dir
+ # --without-git is not specified, and the git program exists
+ # in version 1.6 or newer. Use git format.
+ ARCHIVE_FORMAT=git
+ else
+ # --without-git is specified, or the git program is missing.
+changequote(,)dnl
+ if test "$gt_use_bzip2" != no \
+ && (: | bzip2 --version) >/dev/null 2>&1 \
+ && { sed_bzip2_version1='s/ \([0-9][0-9.]*\).*/ \1/'
+ sed_bzip2_version2='s/^.* //'
+ case `(: | bzip2 --version) 2>&1 \
+ | sed -e 1q \
+ | sed -e "$sed_bzip2_version1" -e "$sed_bzip2_version2"` in
+ 0.*) false ;;
+ *) true ;;
+ esac
+ }; then
+changequote([,])dnl
+ # --without-bzip2 is not specified, and the bzip2 program exists
+ # in version 1.0 or newer. Use dirbz2 format.
+ ARCHIVE_FORMAT=dirbz2
+ else
+ # --without-bzip2 is specified, or the bzip2 program is missing.
+ ARCHIVE_FORMAT=dirgz
+ fi
+ fi
+ fi
+ fi
fi
fi
fi
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog
index a805edc..1aeaeb3 100644
--- a/gettext-tools/misc/ChangeLog
+++ b/gettext-tools/misc/ChangeLog
@@ -1,5 +1,26 @@
2010-06-06 Bruno Haible <bruno@clisp.org>
+ New options --with-xz and --with-bzip2 for compressing the archive.
+ * autopoint.in: Handle the archive formats dirgz, dirbz2, dirxz instead
+ of dir.
+ * convert-archive.in: Handle the archive formats dirgz, dirbz2, dirxz
+ like dir. Format 'dir' is now without compression.
+ * Makefile.am (MOSTLYCLEANFILES): New variable.
+ (CLEANFILES): Add archive.dir.tar.gz, archive.dir.tar.bz2,
+ archive.dir.tar.xz.
+ (EXTRA_DIST): Add archive.dir.tar. Remove archive.dir.tar.gz.
+ (ARCHIVE_dirgz, ARCHIVE_dirbz2, ARCHIVE_dirxz, ARCHIVE_git,
+ ARCHIVE_cvs): New variables.
+ (gettextsrc_DATA): Use them.
+ (archive.dir.tar): Renamed from archive.dir.tar.gz. Look for an
+ installed .tar.bzip2 or .tar.xz as well.
+ (archive.dir.tar.gz, archive.dir.tar.bz2, archive.dir.tar.xz): New
+ rules.
+ (archive.git.tar.gz, archive.cvs.tar.gz): Update.
+ * add-to-archive: Read and write an uncompressed archive.dir.tar.
+
+2010-06-06 Bruno Haible <bruno@clisp.org>
+
Make 'convert-archive' less verbose.
* convert-archive.in: Avoid all output from "git commit".
diff --git a/gettext-tools/misc/Makefile.am b/gettext-tools/misc/Makefile.am
index 4147e18..1c30157 100644
--- a/gettext-tools/misc/Makefile.am
+++ b/gettext-tools/misc/Makefile.am
@@ -18,6 +18,7 @@
AUTOMAKE_OPTIONS = 1.2 gnits
EXTRA_DIST =
+MOSTLYCLEANFILES =
CLEANFILES =
DISTCLEANFILES =
@@ -28,38 +29,87 @@ bin_SCRIPTS = gettextize autopoint
DISTCLEANFILES += gettextize autopoint convert-archive
-CLEANFILES += archive.cvs.tar.gz archive.git.tar.gz
+CLEANFILES += \
+ archive.dir.tar.gz \
+ archive.dir.tar.bz2 \
+ archive.dir.tar.xz \
+ archive.cvs.tar.gz \
+ archive.git.tar.gz
-EXTRA_DIST += add-to-archive cvsuser.c archive.dir.tar.gz
+EXTRA_DIST += add-to-archive cvsuser.c archive.dir.tar
gettextsrcdir = $(datadir)/gettext
-gettextsrc_DATA = archive.@ARCHIVE_FORMAT@.tar.gz
+gettextsrc_DATA = $(ARCHIVE_@ARCHIVE_FORMAT@)
+ARCHIVE_dirgz = archive.dir.tar.gz
+ARCHIVE_dirbz2 = archive.dir.tar.bz2
+ARCHIVE_dirxz = archive.dir.tar.xz
+ARCHIVE_git = archive.git.tar.gz
+ARCHIVE_cvs = archive.cvs.tar.gz
-# The archive.dir.tar.gz is not in the CVS. Alpha-testers must use the one from
+# The archive.dir.tar is not in the CVS. Alpha-testers must use the one from
# an already installed release.
-archive.dir.tar.gz:
+archive.dir.tar:
if test -f $(gettextsrcdir)/archive.dir.tar.gz; then \
- cp -p $(gettextsrcdir)/archive.dir.tar.gz $@; \
+ gzip -d -c < $(gettextsrcdir)/archive.dir.tar.gz > $@-t && mv $@-t $@; \
else \
- echo "archive.dir.tar.gz is not under version control. Please copy the archive.dir.tar.gz from an already installed release to gettext-tools/misc/." 1>&2; \
- exit 1; \
+ if test -f $(gettextsrcdir)/archive.dir.tar.bz2; then \
+ bzip2 -d -c < $(gettextsrcdir)/archive.dir.tar.bz2 > $@-t && mv $@-t $@; \
+ else \
+ if test -f $(gettextsrcdir)/archive.dir.tar.xz; then \
+ xz -d -c < $(gettextsrcdir)/archive.dir.tar.xz > $@-t && mv $@-t $@; \
+ else \
+ echo "archive.dir.tar is not under version control. Please copy the archive.dir.tar.{gz,bz2,xz} from an already installed release to gettext-tools/misc/ and decompress it there." 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
fi
+MOSTLYCLEANFILES += archive.dir.tar-t
-# The archive.git.tar.gz is generated from archive.dir.tar.gz.
-archive.git.tar.gz: archive.dir.tar.gz
- if test -f archive.dir.tar.gz; then \
- inputfile=archive.dir.tar.gz; \
+# The archive.dir.tar.gz is generated from archive.dir.tar.
+archive.dir.tar.gz: archive.dir.tar
+ if test -f archive.dir.tar; then \
+ inputfile=archive.dir.tar; \
else \
- inputfile='$(srcdir)'/archive.dir.tar.gz; \
+ inputfile='$(srcdir)'/archive.dir.tar; \
+ fi; \
+ gzip -c -9 < "$$inputfile" > $@-t && mv $@-t $@
+MOSTLYCLEANFILES += archive.dir.tar.gz-t
+
+# The archive.dir.tar.bz2 is generated from archive.dir.tar.
+archive.dir.tar.bz2: archive.dir.tar
+ if test -f archive.dir.tar; then \
+ inputfile=archive.dir.tar; \
+ else \
+ inputfile='$(srcdir)'/archive.dir.tar; \
+ fi; \
+ bzip2 -c -9 < "$$inputfile" > $@-t && mv $@-t $@
+MOSTLYCLEANFILES += archive.dir.tar.bz2-t
+
+# The archive.dir.tar.xz is generated from archive.dir.tar.
+archive.dir.tar.xz: archive.dir.tar
+ if test -f archive.dir.tar; then \
+ inputfile=archive.dir.tar; \
+ else \
+ inputfile='$(srcdir)'/archive.dir.tar; \
+ fi; \
+ xz -c -5 < "$$inputfile" > $@-t && mv $@-t $@
+MOSTLYCLEANFILES += archive.dir.tar.xz-t
+
+# The archive.git.tar.gz is generated from archive.dir.tar.
+archive.git.tar.gz: archive.dir.tar
+ if test -f archive.dir.tar; then \
+ inputfile=archive.dir.tar; \
+ else \
+ inputfile='$(srcdir)'/archive.dir.tar; \
fi; \
./convert-archive dir git "$$inputfile" $@
-# The archive.cvs.tar.gz is generated from archive.dir.tar.gz.
-archive.cvs.tar.gz: archive.dir.tar.gz
- if test -f archive.dir.tar.gz; then \
- inputfile=archive.dir.tar.gz; \
+# The archive.cvs.tar.gz is generated from archive.dir.tar.
+archive.cvs.tar.gz: archive.dir.tar
+ if test -f archive.dir.tar; then \
+ inputfile=archive.dir.tar; \
else \
- inputfile='$(srcdir)'/archive.dir.tar.gz; \
+ inputfile='$(srcdir)'/archive.dir.tar; \
fi; \
./convert-archive dir cvs "$$inputfile" $@
diff --git a/gettext-tools/misc/add-to-archive b/gettext-tools/misc/add-to-archive
index 61b8da5..ccc7f46 100755
--- a/gettext-tools/misc/add-to-archive
+++ b/gettext-tools/misc/add-to-archive
@@ -18,7 +18,7 @@
# Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz
# Adds the infrastructure files for gettext version 0.xx.yy to the reposutory
-# in the archive.dir.tar.gz file.
+# in the archive.dir.tar file.
if test $# != 1; then
echo "Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz"
@@ -87,10 +87,10 @@ work_archive=`pwd`/"$work_dir/archive"
# Add the contents of this directory to the repository.
mkdir autopoint-files
-(cd autopoint-files && tar xfz ../archive.dir.tar.gz)
+(cd autopoint-files && tar xf ../archive.dir.tar)
mkdir autopoint-files/$pack_ver
(cd "$work_archive" && tar cf - .) | (cd autopoint-files/$pack_ver && tar xf -)
-(cd autopoint-files && tar cfz ../archive.dir.tar.gz --owner=root --group=root *)
+(cd autopoint-files && tar cf ../archive.dir.tar --owner=root --group=root *)
# Clean up.
rm -rf autopoint-files
diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in
index 4de582a..48f661d 100644
--- a/gettext-tools/misc/autopoint.in
+++ b/gettext-tools/misc/autopoint.in
@@ -387,10 +387,15 @@ mkdir "$work_dir" || {
# -------+-----------------------------+--------------------+
case "@ARCHIVE_FORMAT@" in
- dir)
- # The archive of different versions is very large, but using it does not
- # require special tools.
- gzip -d -c < "$gettext_dir/archive.dir.tar.gz" | (cd "$work_dir" && tar xf - "gettext-$ver")
+ dir*)
+ # The archive of different versions is very large (unless xz compression is
+ # used), but using it does not require special tools.
+ case "@ARCHIVE_FORMAT@" in
+ dirgz) gzip -d -c < "$gettext_dir/archive.dir.tar.gz" ;;
+ dirbz2) bzip2 -d -c < "$gettext_dir/archive.dir.tar.bz2" ;;
+ dirxz) xz -d -c < "$gettext_dir/archive.dir.tar.xz" ;;
+ esac \
+ | (cd "$work_dir" && tar xf - "gettext-$ver")
if test `find "$work_dir" -type f -print | wc -l` = 0; then
rm -rf "$work_dir"
func_fatal_error "infrastructure files for version $ver not found; this is autopoint from GNU $package $version"
diff --git a/gettext-tools/misc/convert-archive.in b/gettext-tools/misc/convert-archive.in
index f874781..0088576 100644
--- a/gettext-tools/misc/convert-archive.in
+++ b/gettext-tools/misc/convert-archive.in
@@ -17,8 +17,8 @@
#
# Usage: convert-archive FROM TO [FROMFILE [TOFILE]]
-# where FROM is dir or cvs or git
-# and TO is dir or cvs or git
+# where FROM is dir or dirgz or dirbz2 or dirxz or cvs or git
+# and TO is dir or dirgz or dirbz2 or dirxz or cvs or git
# This will read FROMFILE (default: archive.$FROM.tar.gz)
# and produce TOFILE (default: archive.$TO.tar.gz).
@@ -89,8 +89,15 @@ mkdir "$unpacked" || {
# Unpack the original archive.
case "$from" in
- dir)
- gzip -d -c < "$fromfile" | (cd "$unpacked" && tar xf -) \
+ dir*)
+ { case "$from" in
+ dir) cat < "$fromfile" ;;
+ dirgz) gzip -d -c < "$fromfile" ;;
+ dirbz2) bzip2 -d -c < "$fromfile" ;;
+ dirxz) xz -d -c < "$fromfile" ;;
+ esac
+ } \
+ | (cd "$unpacked" && tar xf -) \
|| func_fatal_error "file copy failed"
;;
@@ -234,9 +241,15 @@ done
# Create the target archive.
case "$to" in
- dir)
+ dir*)
(cd "$unpacked" && $TAR cf - $TAR_OPTIONS *) \
- | gzip -c -9 > "$tofile" \
+ | { case "$to" in
+ dir) cat > "$tofile" ;;
+ dirgz) gzip -c -9 > "$tofile" ;;
+ dirbz2) bzip2 -c -9 > "$tofile" ;;
+ dirxz) xz -c -5 > "$tofile" ;;
+ esac
+ } \
|| func_fatal_error "archive creation failed"
;;