Source: gettext Version: 0.18.1.1-10 Severity: wishlist Tags: patch
The attached patch adds the ability to bootstrap functional gettext packages, in the early stages of a system bootstrap where it would be unreasonable to expect the availability of complex things like Java or git. (As for the other build dependencies, they'd also mostly be unavailable -- especially glib2.0 -- which would mean the build process uses its internal versions of the libraries where possible.) -- Daniel Schepler
diff -urN gettext-0.18.1.1.old/debian/control gettext-0.18.1.1/debian/control --- gettext-0.18.1.1.old/debian/control 2012-11-28 07:56:11.000000000 -0800 +++ gettext-0.18.1.1/debian/control 2013-05-23 12:19:57.827009576 -0700 @@ -45,7 +45,7 @@ Section: devel Priority: optional Architecture: all -Depends: git (>= 1:1.7.0.5) | git-core +Depends: ${autopoint:Depends} Replaces: gettext (<= 0.17-11) Description: The autopoint program from GNU gettext The `autopoint' program copies standard gettext infrastructure files diff -urN gettext-0.18.1.1.old/debian/rules gettext-0.18.1.1/debian/rules --- gettext-0.18.1.1.old/debian/rules 2012-11-28 07:47:08.000000000 -0800 +++ gettext-0.18.1.1/debian/rules 2013-05-23 12:36:56.319997913 -0700 @@ -36,10 +36,17 @@ NOJAVA_ARCHS = %none% +ifeq ($(DEB_BUILD_PROFILE),stage1) +autopoint_configure_args := --without-git --without-cvs +else +autopoint_configure_args := --with-git +endif + build: cd debian && $(CC) glibc-test.c debian/a.out ./configure --prefix=/usr --enable-threads $(CSHARP) \ + $(autopoint_configure_args) \ --disable-native-java CC="$(CC)" CFLAGS="$(CFLAGS)" \ JAVAC=/usr/lib/jvm/default-java/bin/javac \ CPPFLAGS="$(CPPFLAGS) -I/usr/include/libxml2" \ @@ -97,10 +104,12 @@ fi find debian/$@/usr/share/locale | grep gettext-tools | xargs rm ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS))) +ifneq ($(DEB_BUILD_PROFILE),stage1) install -d debian/$@/usr/share/java cp -p debian/tmp/usr/share/gettext/libintl.jar \ debian/$@/usr/share/java endif +endif cp -p gettext-tools/ABOUT-NLS debian/$@/usr/share/doc/$@ cp -p debian/copyright debian/$@/usr/share/doc/$@ cp -p ChangeLog debian/$@/usr/share/doc/$@/changelog @@ -143,8 +152,10 @@ cp -a debian/tmp/usr/share/gettext debian/$@/usr/share rm -f debian/$@/usr/share/gettext/libintl.jar ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS))) +ifneq ($(DEB_BUILD_PROFILE),stage1) mv debian/$@/usr/share/gettext/gettext.jar debian/$@/usr/share/java endif +endif rm -f debian/$@/usr/lib/GNU.Gettext.dll cp -a debian/tmp/usr/share/man/man1 debian/$@/usr/share/man cp -a debian/tmp/usr/share/locale debian/$@/usr/share @@ -159,7 +170,8 @@ $(STRIP) debian/$@/usr/lib/libgettextsrc*.so rm -f debian/$@/usr/bin/autopoint rm -f debian/$@/usr/share/man/man1/autopoint.1 - rm -f debian/$@/usr/share/gettext/archive.git.tar.gz + rm -f debian/$@/usr/share/gettext/archive.git.tar.gz \ + debian/$@/usr/share/gettext/archive.dir.tar.gz gzip -9n debian/$@/usr/share/info/* gzip -r9n debian/$@/usr/share/man $(STRIP) `sh debian/elf debian/$@/usr/bin/* debian/$@/usr/lib/gettext/*` @@ -311,8 +323,13 @@ install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@ cd debian/$@ && install -d usr/bin usr/share/gettext usr/share/man/man1 cp -p debian/tmp/usr/bin/autopoint debian/$@/usr/bin +ifeq ($(DEB_BUILD_PROFILE),stage1) + cp -p debian/tmp/usr/share/gettext/archive.dir.tar.gz \ + debian/$@/usr/share/gettext +else cp -p debian/tmp/usr/share/gettext/archive.git.tar.gz \ debian/$@/usr/share/gettext +endif cp -p debian/tmp/usr/share/man/man1/autopoint.1 \ debian/$@/usr/share/man/man1 gzip -r9n debian/$@/usr/share/man @@ -320,7 +337,11 @@ cp -p ChangeLog debian/$@/usr/share/doc/$@/changelog cp -p debian/changelog debian/$@/usr/share/doc/$@/changelog.Debian cd debian/$@/usr/share/doc/$@ && gzip -9n changelog changelog.Debian - dpkg-gencontrol -p$@ -Pdebian/$@ +ifeq ($(DEB_BUILD_PROFILE),stage1) + dpkg-gencontrol -p$@ -Pdebian/$@ -Vautopoint:Depends='' +else + dpkg-gencontrol -p$@ -Pdebian/$@ -Vautopoint:Depends='git (>= 1:1.7.0.5) | git-core' +endif cd debian/$@ && \ md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums chown -R 0:0 debian/$@