Package: gettext
Version: 0.18.1.1-5
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu precise ubuntu-patch

Hi Santiago!

Because wine in Ubuntu has gettext support via libgettextpo0, and wine is a
target for multiarch for this Ubuntu cycle, I've applied the attached patch
to gettext in Ubuntu to split the library out into its own package so that
it's possible to install the i386 and amd64 versions alongside one another.

Ideally we would have something similar for libasprintf in gettext-base;
however, nothing outside of gettext is using libasprintf in the archive, so
that's a low priority.

For that matter, libgettextpo0 may be a low priority for Debian as well,
since the wine package in Debian doesn't seem to use this library.  This may
be something that will be enabled in a later upstream version of wine.

Thanks for considering the patch!

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru gettext-0.18.1.1/debian/changelog gettext-0.18.1.1/debian/changelog
diff -Nru gettext-0.18.1.1/debian/control gettext-0.18.1.1/debian/control
--- gettext-0.18.1.1/debian/control	2011-08-05 06:28:01.000000000 -0700
+++ gettext-0.18.1.1/debian/control	2011-10-20 10:55:43.000000000 -0700
@@ -18,11 +19,11 @@
 
 Package: gettext
 Architecture: any
-Depends: ${shlibs:Depends}, gettext-base, dpkg (>= 1.15.4) | install-info
+Depends: ${shlibs:Depends}, libgettextpo0 (= ${binary:Version}), gettext-base, dpkg (>= 1.15.4) | install-info
 Recommends: curl | wget | lynx-cur, autopoint
 Conflicts: autopoint (<= 0.17-11)
 Suggests: gettext-doc
-Provides: libgettextpo0, libasprintf-dev, libgettextpo-dev
+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.
@@ -55,3 +56,14 @@
  `configure.in' or `configure.ac' file, the gettext version used by the
  package, and copies the infrastructure files belonging to this version
  into the package.
+
+Package: libgettextpo0
+Architecture: any
+Multi-Arch: same
+Pre-Depends: multiarch-support
+Depends: ${shlibs:Depends}
+Breaks: gettext (<< 0.18.1.1-5ubuntu1)
+Replaces: gettext (<< 0.18.1.1-5ubuntu1)
+Description: GNU Internationalization library
+ This package contains the libgettextpo shared library for interfacing
+ programmatically with GNU gettext .po files.
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	2010-06-13 05:30:01.000000000 -0700
+++ gettext-0.18.1.1/debian/gettext.lintian-overrides	2011-10-19 23:11:52.000000000 -0700
@@ -15,7 +15,6 @@
 gettext: shlib-missing-in-control-file libgettextsrc 0.18.1 for usr/lib/libgettextsrc-0.18.1.so
 gettext: shlib-missing-in-control-file libgettextlib 0.18.1 for usr/lib/libgettextlib-0.18.1.so
 #
-# Only libgettextpo0 is to be used by other packages.
-# gettext Provides libgettextpo0, so yes, it's correct.
+# Not for use by other packages.
 #
-gettext: package-name-doesnt-match-sonames libgettextlib-0.18.1 libgettextpo0 libgettextsrc-0.18.1 libgnuintl8
+gettext: package-name-doesnt-match-sonames libgettextlib-0.18.1 libgettextsrc-0.18.1 libgnuintl8
diff -Nru gettext-0.18.1.1/debian/gettext.shlibs gettext-0.18.1.1/debian/gettext.shlibs
--- gettext-0.18.1.1/debian/gettext.shlibs	2008-06-11 03:17:50.000000000 -0700
+++ gettext-0.18.1.1/debian/gettext.shlibs	1969-12-31 16:00:00.000000000 -0800
@@ -1 +0,0 @@
-libgettextpo	0	libgettextpo0
diff -Nru gettext-0.18.1.1/debian/libgettextpo0.postinst gettext-0.18.1.1/debian/libgettextpo0.postinst
--- gettext-0.18.1.1/debian/libgettextpo0.postinst	1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.18.1.1/debian/libgettextpo0.postinst	2011-10-14 09:19:31.000000000 -0700
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+if [ "$1" = "configure" ]; then
+  ldconfig
+fi
diff -Nru gettext-0.18.1.1/debian/libgettextpo0.shlibs gettext-0.18.1.1/debian/libgettextpo0.shlibs
--- gettext-0.18.1.1/debian/libgettextpo0.shlibs	1969-12-31 16:00:00.000000000 -0800
+++ gettext-0.18.1.1/debian/libgettextpo0.shlibs	2011-10-14 09:19:31.000000000 -0700
@@ -0,0 +1 @@
+libgettextpo	0	libgettextpo0
diff -Nru gettext-0.18.1.1/debian/rules gettext-0.18.1.1/debian/rules
--- gettext-0.18.1.1/debian/rules	2011-08-05 06:44:29.000000000 -0700
+++ gettext-0.18.1.1/debian/rules	2011-10-20 11:27:57.000000000 -0700
@@ -52,11 +52,12 @@
 	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
+		autopoint libgettextpo0
 
 binary-arch: build
 	debian/rules gettext-base
 	debian/rules gettext
+	debian/rules libgettextpo0
 
 binary-indep: build
 	debian/rules gettext-el
@@ -123,7 +124,6 @@
 	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
 	cd debian/$@ && install -d usr/share/man usr/share/java \
 		usr/share/lintian/overrides
-	cd debian && install -m 644 $@.shlibs $@/DEBIAN/shlibs
 	cd debian && install -m 755 postinst $@/DEBIAN
 	cp -p debian/$@.lintian-overrides \
 		debian/$@/usr/share/lintian/overrides/$@
@@ -149,15 +149,15 @@
 	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.* *.la
+	cd debian/$@/usr/lib && rm -f libasprintf.so.* *.la libgettextpo.so.*
+	mkdir debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+	cd debian/$@/usr/lib/ && mv libgettextpo.so $(DEB_HOST_MULTIARCH)/
 	cd debian/$@/usr/share/man/man1 && \
 		rm -f gettext.1 ngettext.1 envsubst.1
-	cd debian/$@/usr/lib && chmod 644 libgettextlib* libgettextsrc* \
-		libgettextpo*
+	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
-	$(STRIP) debian/$@/usr/lib/libgettextpo.so.*
 	$(ATRIP) debian/$@/usr/lib/libasprintf.a
 	$(ATRIP) debian/$@/usr/lib/libgettextpo.a
 	rm -f debian/$@/usr/bin/autopoint
@@ -175,6 +175,26 @@
 	chmod -R u+w,go=rX debian/$@
 	dpkg --build debian/$@ ..
 
+libgettextpo0: build
+	rm -rf debian/$@
+	install -d debian/$@/DEBIAN debian/$@/usr/share/doc/$@
+	cd debian/$@ && install -d usr/lib/$(DEB_HOST_MULTIARCH)
+	cd debian && install -m 644 $@.shlibs $@/DEBIAN/shlibs
+	install -m 755 debian/$@.postinst debian/$@/DEBIAN/postinst
+	cp -p debian/copyright debian/$@/usr/share/doc/$@
+	cp -p debian/changelog debian/$@/usr/share/doc/$@/changelog.Debian
+	cp -p ChangeLog debian/$@/usr/share/doc/$@/changelog
+	cd debian/$@/usr/share/doc/$@ && gzip -9nf changelog changelog.Debian
+	cp -a debian/tmp/usr/lib/libgettextpo.so.* debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)
+	cd debian/$@/usr/lib/$(DEB_HOST_MULTIARCH) && chmod 644 libgettextpo*
+	$(STRIP) debian/$@/usr/lib/$(DEB_HOST_MULTIARCH)/libgettextpo.so.*
+	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/$@
@@ -254,4 +274,4 @@
 build-indep: build
 
 .PHONY: binary binary-arch binary-indep build-arch build-indep clean
-.PHONY: gettext-base gettext gettext-el gettext-doc autopoint
+.PHONY: gettext-base gettext gettext-el gettext-doc autopoint libgettextpo0

Reply via email to