tags 683751 + patch
thanks

On 2012-08-14 17:05, Steve Langasek wrote:
> On Tue, Aug 14, 2012 at 10:52:38PM +0200, Santiago Vila wrote:
>> Now the question: Do libasprintf-dev and libgettextpo-dev really need
>> to be in a different package than gettext?
> 
> I think that depends on whether there's ever a need to build against host
> and build versions of these libraries in a single build.  I don't know the
> answer to that; we probably won't discover the answer for a while, until
> someone working on cross-compiling the distro runs into one that does.
> 
> You could split the packages and put the issue to bed once and for all, or
> just use Multi-Arch: allowed for now and wait for complaints :)

I split out a libgettext-dev package that provides libasprintf-dev and
libgettextpo-dev.  I also removed the unversioned libgettextlib.so and
libgettextsrc.so symbolic links.

I hope I've correctly split the /usr/share hierarchy between gettext and
libgettext-dev.  Please let me know if something is wrong.

I've tested that src:gettext correctly builds [1] with this patch, but
I've not yet tried building other software against the resulting packages.

[1]:
http://bootstrap.pehjota.net/cross/builds/gettext/gettext_0.18.1.1-9.1_i386-20120816-2130.build

-- 
P. J. McDermott                                        (_/@\_)    ,--.
http://www.pehjota.net/                           o    < o o >   / oo \
http://www.pehjota.net/contact.html                 o   \ `-/    | <> |.
                                                o o o    "~v    /_\--/_/
diff -Nru gettext-0.18.1.1/debian/changelog gettext-0.18.1.1/debian/changelog
--- gettext-0.18.1.1/debian/changelog   2012-06-07 06:08:07.000000000 -0400
+++ gettext-0.18.1.1/debian/changelog   2012-08-16 21:26:05.000000000 -0400
@@ -1,3 +1,11 @@
+gettext (0.18.1.1-9.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Split out libgettext-dev for multiarch. Closes: #683751.
+  * Remove unversioned symlinks to internal libraries.
+
+ -- "P. J. McDermott" <p...@nac.net>  Thu, 16 Aug 2012 16:59:59 -0400
+
 gettext (0.18.1.1-9) unstable; urgency=low
 
   * Build with hardened build flags.
diff -Nru gettext-0.18.1.1/debian/control gettext-0.18.1.1/debian/control
--- gettext-0.18.1.1/debian/control     2012-06-07 06:00:00.000000000 -0400
+++ gettext-0.18.1.1/debian/control     2012-08-16 20:49:57.000000000 -0400
@@ -17,11 +17,11 @@
 
 Package: gettext
 Architecture: any
-Depends: ${shlibs:Depends}, libgettextpo0 (= ${binary:Version}), 
libasprintf0c2 (= ${binary:Version}), gettext-base, dpkg (>= 1.15.4) | 
install-info
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, gettext-base, dpkg (>= 1.15.4) | install-info
 Recommends: curl | wget | lynx-cur, autopoint
 Breaks: autopoint (<= 0.17-11)
 Suggests: gettext-doc
-Provides: libasprintf-dev, libgettextpo-dev
 Description: GNU Internationalization utilities
  Interesting for authors or maintainers of other packages or programs
  which they want to see internationalized.
@@ -81,3 +81,14 @@
  This package contains the libasprintf shared library which makes the
  C formatted output routines (fprintf et al.) usable in C++ programs,
  for use with the <string> strings and the <iostream> streams.
+
+Package: libgettext-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libgettextpo0 (= ${binary:Version}), libasprintf0c2 (= 
${binary:Version}), dpkg (>= 1.15.4) | install-info
+Suggests: gettext-doc
+Provides: libasprintf-dev, libgettextpo-dev
+Description: GNU Internationalization library development files
+ This package contains development files for the libgettextpo and
+ libasprintf libraries.
diff -Nru gettext-0.18.1.1/debian/gettext.lintian-overrides 
gettext-0.18.1.1/debian/gettext.lintian-overrides
--- gettext-0.18.1.1/debian/gettext.lintian-overrides   2012-04-28 
10:45:44.000000000 -0400
+++ gettext-0.18.1.1/debian/gettext.lintian-overrides   2012-08-16 
20:53:37.000000000 -0400
@@ -5,10 +5,6 @@
 gettext: ldconfig-symlink-missing-for-shlib usr/lib/libgnuintl.so.8 
usr/lib/preloadable_libintl.so libgnuintl.so.8
 gettext: shlib-missing-in-control-file libgnuintl 8 for 
usr/lib/preloadable_libintl.so
 #
-# gettext Provides libgettextpo-dev, so yes, it is a dev-pkg.
-#
-gettext: non-dev-pkg-with-shlib-symlink usr/lib/libgettextpo.so.0.5.1 
usr/lib/libgettextpo.so
-#
 # These libraries are for internal use only and should not be used by
 # other programs.
 #
@@ -21,3 +17,4 @@
 gettext: no-shlibs-control-file usr/lib/preloadable_libintl.so
 gettext: no-shlibs-control-file usr/lib/libgettextsrc-0.18.1.so
 gettext: no-shlibs-control-file usr/lib/libgettextlib-0.18.1.so
+gettext: shlib-in-multi-arch-foreign-package usr/lib/preloadable_libintl.so
diff -Nru gettext-0.18.1.1/debian/rules gettext-0.18.1.1/debian/rules
--- gettext-0.18.1.1/debian/rules       2012-06-07 06:07:34.000000000 -0400
+++ gettext-0.18.1.1/debian/rules       2012-08-16 21:07:10.000000000 -0400
@@ -56,13 +56,14 @@
        rm -f `find . -name "*~"`
        rm -rf debian/tmp debian/files* core debian/substvars debian/a.out
        cd debian && rm -rf gettext-base gettext gettext-el gettext-doc \
-               autopoint libgettextpo0 libasprintf0c2
+               autopoint libgettextpo0 libasprintf0c2 libgettext-dev
 
 binary-arch: build
        debian/rules gettext-base
        debian/rules gettext
        debian/rules libgettextpo0
        debian/rules libasprintf0c2
+       debian/rules libgettext-dev
 
 binary-indep: build
        debian/rules gettext-el
@@ -136,11 +137,15 @@
        cd debian/$@/usr/share/doc/$@ && gzip -9n changelog changelog.Debian
        cp -a debian/tmp/usr/bin debian/$@/usr
        cp -a debian/tmp/usr/lib debian/$@/usr
-       cp -a debian/tmp/usr/include debian/$@/usr
+       rm -f debian/$@/usr/lib/libgettextsrc.so
+       rm -f debian/$@/usr/lib/libgettextlib.so
        cp -a debian/tmp/usr/share/info debian/$@/usr/share
-       cp -a debian/tmp/usr/share/aclocal debian/$@/usr/share
+       rm -f debian/$@/usr/share/info/autosprintf.info
        cp -a debian/tmp/usr/share/gettext debian/$@/usr/share
        rm -f debian/$@/usr/share/gettext/libintl.jar
+       rm -rf debian/$@/usr/share/gettext/intl
+       rm -f debian/$@/usr/share/gettext/config.rpath
+       rm -f debian/$@/usr/share/gettext/gettext.h
 ifeq (,$(findstring %$(DEB_HOST_ARCH)%,$(NOJAVA_ARCHS)))
        mv debian/$@/usr/share/gettext/gettext.jar debian/$@/usr/share/java
 endif
@@ -149,18 +154,13 @@
        cp -a debian/tmp/usr/share/locale debian/$@/usr/share
        find debian/$@/usr/share/locale | grep gettext-runtime | xargs rm
        cd debian/$@/usr/bin && rm -f gettext ngettext envsubst gettext.sh
-       cd debian/$@/usr/lib && rm -f libasprintf.so.* libgettextpo.so.* *.la
-       install -d debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
-       cd debian/$@/usr/lib && mv libgettextpo.so $(DEB_HOST_MULTIARCH)
-       cd debian/$@/usr/lib && mv libasprintf.so $(DEB_HOST_MULTIARCH)
+       cd debian/$@/usr/lib && rm -f libasprintf* libgettextpo* *.la
        cd debian/$@/usr/share/man/man1 && \
                rm -f gettext.1 ngettext.1 envsubst.1
        cd debian/$@/usr/lib && chmod 644 libgettextlib* libgettextsrc*
        $(STRIP) debian/$@/usr/lib/preloadable_libintl.so
        $(STRIP) debian/$@/usr/lib/libgettextlib*.so
        $(STRIP) debian/$@/usr/lib/libgettextsrc*.so
-       $(ATRIP) debian/$@/usr/lib/libasprintf.a
-       $(ATRIP) debian/$@/usr/lib/libgettextpo.a
        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
@@ -219,6 +219,36 @@
        chmod -R u+w,go=rX debian/$@
        dpkg --build debian/$@ ..
 
+libgettext-dev: build
+       rm -rf debian/$@
+       install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
+       cp -p debian/copyright debian/$@/usr/share/doc/$@
+       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
+       install -d debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+       cp -a debian/tmp/usr/lib/libgettextpo.a 
debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+       cp -a debian/tmp/usr/lib/libasprintf.a 
debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+       cp -a debian/tmp/usr/lib/libgettextpo.so 
debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+       cp -a debian/tmp/usr/lib/libasprintf.so 
debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+       cp -a debian/tmp/usr/include debian/$@/usr
+       install -d debian/$@/usr/share/info
+       cp -a debian/tmp/usr/share/info/autosprintf.info 
debian/$@/usr/share/info
+       cp -a debian/tmp/usr/share/aclocal debian/$@/usr/share
+       install -d debian/$@/usr/share/gettext
+       cp -a debian/tmp/usr/share/gettext/intl debian/$@/usr/share/gettext
+       cp -a debian/tmp/usr/share/gettext/config.rpath 
debian/$@/usr/share/gettext
+       cp -a debian/tmp/usr/share/gettext/gettext.h debian/$@/usr/share/gettext
+       $(ATRIP) debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)/libasprintf.a
+       $(ATRIP) debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)/libgettextpo.a
+       gzip -9n debian/$@/usr/share/info/*
+       dpkg-gencontrol -p$@ -Pdebian/$@
+       cd debian/$@ && \
+               md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums
+       chown -R 0:0 debian/$@
+       chmod -R u+w,go=rX debian/$@
+       dpkg --build debian/$@ ..
+
 gettext-el: build
        rm -rf debian/$@
        install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
@@ -298,4 +328,4 @@
 build-indep: build
 
 .PHONY: binary binary-arch binary-indep build-arch build-indep clean
-.PHONY: gettext-base gettext gettext-el gettext-doc autopoint libgettextpo0 
libasprintf0c2
+.PHONY: gettext-base gettext gettext-el gettext-doc autopoint libgettextpo0 
libasprintf0c2 libgettext-dev

Reply via email to