bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [PATCH] Generate autopoint archive when bootstrapping


From: Daiki Ueno
Subject: [bug-gettext] [PATCH] Generate autopoint archive when bootstrapping
Date: Thu, 07 Mar 2013 12:20:14 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

See <https://lists.gnu.org/archive/html/bug-gettext/2012-12/msg00058.html>.

Currently "make all" fails after running autogen.sh, when
gettext-tools/misc/archive.dir.tar is not there.  In that case users
need to copy archive.dir.tar from pre-existing installation (or a
tarball of the previous release).

For Hydra build, I added a workaround for this:
http://git.savannah.gnu.org/cgit/hydra-recipes.git/tree/gettext/release.nix#n70
which creates an empty archive before running autogen.sh.  This is, of
course, not really helpful for actual installation.

To mitigate this, I'm doing an experiment to version control the
contents of the archive:

https://gitorious.org/gettext/autopoint-archive

With the attached patch, autogen.sh pulls the contents for necessary
releases from the above location, and generate archive.dir.tar.

I'm not sure I'm doing right, so any comments would be appreciated.

Regards,
-- 
Daiki Ueno
>From 49cd3a513cc1707c2ede81bf55ea1ce43cd3ea84 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <address@hidden>
Date: Wed, 6 Mar 2013 18:46:15 +0900
Subject: [PATCH] Generate archive.dir.tar when bootstrapping

---
 ChangeLog                              |  4 ++++
 autogen.sh                             | 22 +++++++++++++++++++++-
 gettext-tools/ChangeLog                |  4 ++++
 gettext-tools/configure.ac             |  3 +++
 gettext-tools/misc/ChangeLog           |  7 +++++++
 gettext-tools/misc/archive-releases.sh | 32 ++++++++++++++++++++++++++++++++
 gettext-tools/misc/autopoint.in        | 31 ++++++++++++++-----------------
 7 files changed, 85 insertions(+), 18 deletions(-)
 create mode 100644 gettext-tools/misc/archive-releases.sh

diff --git a/ChangeLog b/ChangeLog
index f54a329..afe405b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-07  Daiki Ueno  <address@hidden>
+
+       * autogen.sh: Generate gettext-tools/misc/archive.dir.tar.
+
 2013-03-06  Daiki Ueno  <address@hidden>
 
        * AUTHORS: Update from fencepost.gnu.org:/gd/gnuorg/copyright.list.
diff --git a/autogen.sh b/autogen.sh
index d1625ca..be1f23c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -32,7 +32,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Usage: ./autogen.sh [--quick] [--skip-gnulib]
+# Usage: ./autogen.sh [--quick] [--skip-gnulib] [--skip-archive]
 #
 # Usage after a first-time git clone / cvs checkout:   ./autogen.sh
 # Usage after a git clone / cvs update:                ./autogen.sh --quick
@@ -45,10 +45,12 @@
 
 quick=false
 skip_gnulib=false
+skip_archive=false
 while :; do
   case "$1" in
     --quick) quick=true; shift;;
     --skip-gnulib) skip_gnulib=true; shift;;
+    --skip-archive) skip_archive=true; shift;;
     *) break ;;
   esac
 done
@@ -387,6 +389,24 @@ cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
  fi
 )
 
+if ! $skip_archive && ! test -f gettext-tools/misc/archive.dir.tar; then
+  # Check out archive in a subdirectory 'archive'.
+  if test -d archive; then
+    (cd archive && git pull)
+  else
+    git clone git://gitorious.org/gettext/autopoint-archive.git archive
+  fi
+  : > dummy
+  tar -cf gettext-tools/misc/archive.dir.tar dummy
+  rm -f dummy
+  (cd archive
+   . ../gettext-tools/misc/archive-releases.sh
+   for release in $ARCHIVE_RELEASES; do
+     tar -rf ../gettext-tools/misc/archive.dir.tar "gettext-$release"
+   done
+  )
+fi
+
 build-aux/fixaclocal aclocal -I m4
 autoconf
 automake
diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog
index 123c114..0deb206 100644
--- a/gettext-tools/ChangeLog
+++ b/gettext-tools/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-07  Daiki Ueno  <address@hidden>
+
+       * configure.ac (archive_releases_sh): New substituted file.
+
 2012-12-27  Daiki Ueno  <address@hidden>
 
        Determine imported C symbol prefix at configure time.
diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
index 373d3cc..19c9fb9 100644
--- a/gettext-tools/configure.ac
+++ b/gettext-tools/configure.ac
@@ -458,6 +458,9 @@ changequote([,])dnl
 fi
 AC_SUBST([ARCHIVE_FORMAT])
 
+archive_releases_sh="$srcdir/misc/archive-releases.sh"
+AC_SUBST_FILE([archive_releases_sh])
+
 dnl Check for tools needed for formatting the documentation.
 ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
 AC_PATH_PROG([DVIPS], [dvips], [$ac_aux_dir_abs/missing dvips])
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog
index 5704341..f4ed8f8 100644
--- a/gettext-tools/misc/ChangeLog
+++ b/gettext-tools/misc/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-07  Daiki Ueno  <address@hidden>
+
+       * archive-releases.sh: New file which defines versions supported
+       by autopoint.
+       * autopoint.in: Use archive-releases.sh to check supported
+       versions.
+
 2013-03-05  Daiki Ueno  <address@hidden>
 
        * po-mode.el (po-font-lock-keywords): Properly highlight C format
diff --git a/gettext-tools/misc/archive-releases.sh 
b/gettext-tools/misc/archive-releases.sh
new file mode 100644
index 0000000..1087fa2
--- /dev/null
+++ b/gettext-tools/misc/archive-releases.sh
@@ -0,0 +1,32 @@
+# Versions supported by autopoint.
+ARCHIVE_RELEASES="
+0.10.35
+0.10.36
+0.10.37
+0.10.38
+0.10.39
+0.10.40
+0.11
+0.11.1
+0.11.2
+0.11.3
+0.11.4
+0.11.5
+0.12
+0.12.1
+0.13
+0.13.1
+0.14
+0.14.1
+0.14.2
+0.14.3
+0.14.4
+0.14.5
+0.14.6
+0.15
+0.16
+0.16.1
+0.17
+0.18
+0.18.1
+"
diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in
index 745fdb4..6a48b24 100644
--- a/gettext-tools/misc/autopoint.in
+++ b/gettext-tools/misc/autopoint.in
@@ -30,6 +30,8 @@ prefix="@prefix@"
 datarootdir="@datarootdir@"
 gettext_dir="@datadir@/gettext"
 
address@hidden@
+
 autom4te="autom4te --no-cache --language=Autoconf-without-aclocal-m4"
 
 # func_tmpdir
@@ -285,23 +287,18 @@ else
 fi
 
 # Check whether the version number is supported.
-case "$ver" in
-  0.10.35 | 0.10.36 | 0.10.37 | 0.10.38 | 0.10.39 | 0.10.40 | \
-  0.11 | 0.11.1 | 0.11.2 | 0.11.3 | 0.11.4 | 0.11.5 | \
-  0.12 | 0.12.1 | \
-  0.13 | 0.13.1 | \
-  0.14 | 0.14.1 | 0.14.2 | 0.14.3 | 0.14.4 | 0.14.5 | 0.14.6 | \
-  0.15 | \
-  0.16 | 0.16.1 | \
-  0.17 | \
-  0.18 | 0.18.1 | 0.18.2 )
-    ;;
-  *)
-    func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your 
$configure_in
-               file requires the infrastructure from gettext-$ver but this 
version
-               is older. Please upgrade to gettext-$ver or newer."
-    ;;
-esac
+ver_is_supported=
+for release in $ARCHIVE_RELEASES "@VERSION@"; do
+  if test "$ver" = "$release"; then
+    ver_is_supported=yes
+    break
+  fi
+done
+if test -z "$ver_is_supported"; then
+  func_fatal_error "The AM_GNU_GETTEXT_VERSION declaration in your 
$configure_in
+             file requires the infrastructure from gettext-$ver but this 
version
+             is older. Please upgrade to gettext-$ver or newer."
+fi
 
 # Check in which directory config.rpath, mkinstalldirs etc. belong.
 auxdir=`$autom4te --trace=AC_CONFIG_AUX_DIR:\$% "$configure_in"`
-- 
1.8.1.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]