Package: src:zlib Version: 1:1.2.8.dfsg-1 Followup-For: Bug #709623 User: helm...@debian.org Usertags: rebootstrap
I stumbled into this issue as well and forgot to look into the bts for a patch, so I invented another one. Interestingly it is entirely different, which is why I am posting it here. Unlike Daniel Schepler's patch, I didn't call it stage1, because it really isn't stage1. It is possible to bootstrap a multilib compiler today (albeit difficult), so there really is no need for a stage1 in general. Still having the ability to compile zlib without multilib is beneficial where sibling architectures are broken (which indeed happens). This functionality also is not new. gcc-X.Y supports it by the name DEB_CROSS_NO_BIARCH=yes. While talking with toolchain maintainers, it became clear that the desire to build without multilib should be facilitated by a special build profile, which I will be calling "nobiarch" in remembrance of the gcc variable. The implementation should follow the build profile specification[1] that already is implemented in dpkg, debhelper and various other tools. There already is a patch bringing this functionality to eglibc #745380 and zlib can be the next package to support the nobiarch profile. Helmut [1] https://wiki.debian.org/BuildProfileSpec
diff -Nru zlib-1.2.8.dfsg/debian/changelog zlib-1.2.8.dfsg/debian/changelog --- zlib-1.2.8.dfsg/debian/changelog 2013-05-03 18:00:51.000000000 +0200 +++ zlib-1.2.8.dfsg/debian/changelog 2014-04-21 10:47:45.000000000 +0200 @@ -1,3 +1,10 @@ +zlib (1:1.2.8.dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Support nobiarch build profile (Closes: #-1). + + -- Helmut Grohne <hel...@subdivi.de> Mon, 21 Apr 2014 10:47:28 +0200 + zlib (1:1.2.8.dfsg-1) unstable; urgency=low * New upstream release. diff -Nru zlib-1.2.8.dfsg/debian/control zlib-1.2.8.dfsg/debian/control --- zlib-1.2.8.dfsg/debian/control 2013-05-03 17:32:22.000000000 +0200 +++ zlib-1.2.8.dfsg/debian/control 2014-04-21 10:47:26.000000000 +0200 @@ -4,7 +4,7 @@ Maintainer: Mark Brown <broo...@debian.org> Standards-Version: 3.9.4 Homepage: http://zlib.net/ -Build-Depends: debhelper (>= 8.1.3~), binutils (>= 2.18.1~cvs20080103-2) [mips mipsel], gcc-multilib [amd64 i386 kfreebsd-amd64 mips mipsel powerpc ppc64 s390 sparc s390x], dpkg-dev (>= 1.16.1) +Build-Depends: debhelper (>= 8.1.3~), binutils (>= 2.18.1~cvs20080103-2) [mips mipsel], gcc-multilib [amd64 i386 kfreebsd-amd64 mips mipsel powerpc ppc64 s390 sparc s390x] <!profile.nobiarch>, dpkg-dev (>= 1.16.1) Package: zlib1g Architecture: any @@ -65,6 +65,7 @@ Architecture: sparc s390 i386 powerpc mips mipsel Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: amd64-libs (<< 1.4) +Build-Profiles: !nobiarch Description: compression library - 64 bit runtime zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes a 64 bit version of the @@ -76,6 +77,7 @@ Depends: lib64z1 (= ${binary:Version}), zlib1g-dev (= ${binary:Version}), lib64c-dev, ${misc:Depends} Replaces: amd64-libs-dev (<< 1.4) Provides: lib64z-dev +Build-Profiles: !nobiarch Description: compression library - 64 bit development zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support @@ -86,6 +88,7 @@ Conflicts: libc6-i386 (<= 2.9-18) Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: ia32-libs (<< 1.5) +Build-Profiles: !nobiarch Description: compression library - 32 bit runtime zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes a 32 bit version of the @@ -98,6 +101,7 @@ Depends: lib32z1 (= ${binary:Version}), zlib1g-dev (= ${binary:Version}), lib32c-dev, ${misc:Depends} Provides: lib32z-dev Replaces: ia32-libs-dev (<< 1.5) +Build-Profiles: !nobiarch Description: compression library - 32 bit development zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support @@ -106,6 +110,7 @@ Package: libn32z1 Architecture: mips mipsel Depends: ${shlibs:Depends}, ${misc:Depends} +Build-Profiles: !nobiarch Description: compression library - n32 runtime zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes a n32 version of the shared @@ -116,6 +121,7 @@ Architecture: mips mipsel Depends: libn32z1 (= ${binary:Version}), zlib1g-dev (= ${binary:Version}), libn32c-dev, ${misc:Depends} Provides: libn32z-dev +Build-Profiles: !nobiarch Description: compression library - n32 development zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support diff -Nru zlib-1.2.8.dfsg/debian/rules zlib-1.2.8.dfsg/debian/rules --- zlib-1.2.8.dfsg/debian/rules 2013-05-03 18:00:06.000000000 +0200 +++ zlib-1.2.8.dfsg/debian/rules 2014-04-21 10:46:06.000000000 +0200 @@ -69,6 +69,11 @@ mn32=-mabi=n32 endif +ifneq (,$(findstring nobiarch,$(DEB_BUILD_PROFILES))) +override EXTRA_BUILD= +override EXTRA_INSTALL= +endif + UNALIGNED_ARCHS=i386 amd64 kfreebsd-i386 kfreebsd-amd64 hurd-i386 lpia ifneq (,$(findstring $(DEB_HOST_ARCH), $(UNALIGNED_ARCHS))) CFLAGS+=-DUNALIGNED_OK