[xml/sgml-pkgs] Bug#643034: add multi-arch support for libxslt

Steve Langasek steve.langasek at canonical.com
Mon Nov 7 20:59:08 UTC 2011


Package: libxslt
Version: 1.1.26-8
Followup-For: Bug #643034
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu precise ubuntu-patch

Hi Mike,

According to http://release.debian.org/~aba/la/current.txt, there are no
longer any references to the libxslt .la file in unstable, so perhaps this
change can be made now?

Attached is a slightly different version of this multiarch patch, which I am
uploading now to Ubuntu.  The main difference is that DEB_HOST_MULTIARCH is
explicitly set in debian/rules, so that direct invocations of debian/rules
work as intended.

Thanks,
-- 
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/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
=== modified file 'debian/control'
--- debian/control	2011-07-29 11:59:25 +0000
+++ debian/control	2011-11-07 20:54:51 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs at lists.alioth.debian.org>
 Uploaders: Mike Hommey <glandium at debian.org>
 Standards-Version: 3.9.2.0
-Build-Depends: debhelper (>= 7.0.50~), libxml2-dev (>= 2.6.27), python-all-dev (>= 2.6.6-3~), python-all-dbg, libgcrypt11-dev, autotools-dev, binutils (>= 2.14.90.0.7), perl
+Build-Depends: debhelper (>= 8.1.3~), libxml2-dev (>= 2.6.27), python-all-dev (>= 2.6.6-3~), python-all-dbg, libgcrypt11-dev, autotools-dev, binutils (>= 2.14.90.0.7), perl
 Homepage: http://xmlsoft.org/xslt/
 Vcs-Git: git://git.debian.org/debian-xml-sgml/libxslt.git
 Vcs-Browser: http://git.debian.org/?p=debian-xml-sgml/libxslt.git
@@ -12,6 +12,8 @@
 Package: libxslt1.1
 Section: libs
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: XSLT 1.0 processing library - runtime library
  XSLT is an XML language for defining transformations of XML files from
@@ -25,6 +27,7 @@
 Package: libxslt1-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Provides: libxslt-dev
 Depends: libxslt1.1 (= ${binary:Version}), libxml2-dev (>= 2.6.26), ${misc:Depends}
 Description: XSLT 1.0 processing library - development kit
@@ -53,6 +56,7 @@
 Package: xsltproc
 Section: text
 Architecture: any
+Multi-Arch: foreign
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: XSLT 1.0 command line processor
  XSLT is an XML language for defining transformations of XML files from

=== modified file 'debian/libxslt1-dev.install'
--- debian/libxslt1-dev.install	2010-04-09 15:18:51 +0000
+++ debian/libxslt1-dev.install	2011-11-07 18:55:55 +0000
@@ -1,12 +1,12 @@
 usr/include
-usr/lib/libxslt.a
-usr/lib/libexslt.a
-usr/lib/libxslt.la
-usr/lib/libexslt.la
-usr/lib/libxslt.so
-usr/lib/libexslt.so
-usr/lib/pkgconfig
-usr/lib/xsltConf.sh
+usr/lib/*/libxslt.a
+usr/lib/*/libexslt.a
+usr/lib/*/libxslt.la
+usr/lib/*/libexslt.la
+usr/lib/*/libxslt.so
+usr/lib/*/libexslt.so
+usr/lib/*/pkgconfig
+usr/lib/*/xsltConf.sh
 usr/bin/xslt-config
 usr/share/doc/libxslt1-dev
 usr/share/aclocal

=== modified file 'debian/libxslt1.1.install'
--- debian/libxslt1.1.install	2005-11-10 21:24:02 +0000
+++ debian/libxslt1.1.install	2011-11-07 18:55:40 +0000
@@ -1,2 +1,2 @@
-usr/lib/libexslt.so.*
-usr/lib/libxslt.so.*
+usr/lib/*/libexslt.so.*
+usr/lib/*/libxslt.so.*

=== modified file 'debian/rules'
--- debian/rules	2011-07-29 11:59:25 +0000
+++ debian/rules	2011-11-07 20:54:07 +0000
@@ -5,6 +5,8 @@
 # The current default version of python
 PYVER=$(shell pyversions -d)
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 CONFIGURE_FLAGS := CC="gcc -Wl,--as-needed" --cache-file="$(CURDIR)/build/config.cache"
 
 TARGETS := main $(PYVERS) $(PYVERS:%=%-dbg)
@@ -14,7 +16,7 @@
 configure-%:
 	dh_auto_configure --builddirectory=build/$* -- $(CONFIGURE_FLAGS)
 
-configure-main: CONFIGURE_FLAGS += --without-python
+configure-main: CONFIGURE_FLAGS += --without-python --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 configure-python%: CONFIGURE_FLAGS += --with-python=/usr/bin/$*
 
 override_dh_auto_build: $(TARGETS:%=build-%)
@@ -25,7 +27,8 @@
 	dh_auto_build --builddirectory=$(BUILD_DIR) -- $(BUILD_FLAGS)
 
 build-python%: BUILD_DIR=build/main/$*
-build-python%-dbg: BUILD_FLAGS = PYTHON_INCLUDES=/usr/include/$(*:-dbg=_d) LDFLAGS="-L$(CURDIR)/debian/tmp/usr/lib" CFLAGS="-Wall -g -O0"
+build-python%-dbg: BUILD_FLAGS = PYTHON_INCLUDES=/usr/include/$(*:-dbg=_d) \
+ LDFLAGS="-L$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)" CFLAGS="-Wall -g -O0"
 
 override_dh_auto_clean:
 	rm -rf build debian/tmp-dbg
@@ -55,7 +58,7 @@
 		doc/tutorial2 debian/tmp/usr/share/doc/libxslt1-dev
 	cp -a \
 		doc/EXSLT/html debian/tmp/usr/share/doc/libxslt1-dev/EXSLT
-	sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la
+	sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la
 
 install-python%-dbg:
 	$(MAKE) -C build/main/python$*-dbg DESTDIR=$(CURDIR)/debian/tmp-dbg install-pythonLTLIBRARIES

=== modified file 'xslt-config.in'
--- xslt-config.in	2007-05-18 15:56:02 +0000
+++ xslt-config.in	2011-11-07 20:54:39 +0000
@@ -4,7 +4,6 @@
 exec_prefix=@exec_prefix@
 exec_prefix_set=no
 includedir=@includedir@
-libdir=@libdir@
 
 usage()
 {
@@ -96,7 +95,7 @@
     shift
 done
 
-the_libs="@XSLT_LIBDIR@ @XSLT_LIBS@"
+the_libs="@XSLT_LIBS@"
 if test "$includedir" != "/usr/include"; then
     the_flags="$the_flags -I$includedir `@XML_CONFIG@ --cflags`"
 else



More information about the debian-xml-sgml-pkgs mailing list