Bug#632034: llvm-2.9: Please build libllvm2.9 for multiarch

Steve Langasek steve.langasek at canonical.com
Wed Jun 29 08:56:31 UTC 2011


Package: llvm-2.9
Version: 2.9+dfsg-3
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch

Hi guys,

Please find attached a patch for llvm-2.9 to migrate the libllvm2.9 to the
multiarch directory.  Since mesa is using libllvm in Ubuntu, I've uploaded
this change to Ubuntu; it would be great if you would apply this patch in
Debian as well.

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-06-26 19:56:14 +0000
+++ debian/control	2011-06-29 08:35:58 +0000
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: LLVM Packaging Team <pkg-llvm-team at lists.alioth.debian.org>
 Uploaders: Arthur Loiret <aloiret at debian.org>, Sylvestre Ledru <sylvestre at debian.org>
-Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.5, expect,
+Build-Depends: debhelper (>= 8.1.3), flex, bison, dejagnu, tcl8.5, expect,
     autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo,
     sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9),
     lsb-release, patchutils, diffstat, xz-utils, 
@@ -19,6 +20,8 @@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Description: Low-Level Virtual Machine (LLVM), runtime library
  The Low-Level Virtual Machine (LLVM) is a collection of libraries and
  tools that make it easy to build compilers, optimizers, Just-In-Time

=== modified file 'debian/control.in/libllvm2.9'
--- debian/control.in/libllvm2.9	2011-04-17 02:30:13 +0000
+++ debian/control.in/libllvm2.9	2011-06-29 08:33:13 +0000
@@ -2,6 +2,8 @@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
 Description: Low-Level Virtual Machine (LLVM), runtime library
  The Low-Level Virtual Machine (LLVM) is a collection of libraries and
  tools that make it easy to build compilers, optimizers, Just-In-Time

=== modified file 'debian/control.in/source'
--- debian/control.in/source	2011-06-26 19:56:14 +0000
+++ debian/control.in/source	2011-06-29 08:37:13 +0000
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: LLVM Packaging Team <pkg-llvm-team at lists.alioth.debian.org>
 Uploaders: Arthur Loiret <aloiret at debian.org>, Sylvestre Ledru <sylvestre at debian.org>
-Build-Depends: debhelper (>= 6.0.0), flex, bison, dejagnu, tcl8.5, expect,
+Build-Depends: debhelper (>= 8.1.3), flex, bison, dejagnu, tcl8.5, expect,
     autoconf, automake1.9, perl, libtool, doxygen, chrpath, texinfo,
     sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9),
     lsb-release, patchutils, diffstat, xz-utils, 

=== modified file 'debian/debhelper.in/libllvm2.9.install'
--- debian/debhelper.in/libllvm2.9.install	2011-04-17 02:30:13 +0000
+++ debian/debhelper.in/libllvm2.9.install	2011-06-29 08:24:10 +0000
@@ -1 +1 @@
-debian/@TMP@/usr/lib/libLLVM-2.9.so.1	usr/lib
+debian/@TMP@/usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-2.9.so.1 usr/lib/@DEB_HOST_MULTIARCH@

=== modified file 'debian/debhelper.in/llvm-dev.links'
--- debian/debhelper.in/llvm-dev.links	2011-04-17 02:30:13 +0000
+++ debian/debhelper.in/llvm-dev.links	2011-06-28 23:40:54 +0000
@@ -1 +1 @@
-usr/lib/libLLVM-2.9.so.1		usr/lib/libLLVM-2.9.so
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-2.9.so.1		usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-2.9.so

=== modified file 'debian/packages.d/llvm.mk'
--- debian/packages.d/llvm.mk	2011-06-26 19:56:14 +0000
+++ debian/packages.d/llvm.mk	2011-06-29 08:23:50 +0000
@@ -31,6 +31,7 @@
 	--prefix=$(PF) --disable-assertions \
 	--enable-optimized --with-optimize-option=' $(opt_flags)' --enable-pic --enable-libffi \
 	--with-ocaml-libdir=$(OCAML_STDLIB_DIR)/llvm-$(UVERSION) \
+	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
     --with-binutils-include=/usr/include
 
 llvm_packages := libllvm$(pkg_version) $(llvm_packages)
@@ -64,8 +65,9 @@
 endif
 
 define llvm_extra_install
+	mkdir -p $(D)/debian/tmp-llvm/usr/lib/$(DEB_HOST_MULTIARCH)
 	mv $(D)/debian/tmp-llvm/$(PF)/lib/$(shlib_name).so \
-	  $(D)/debian/tmp-llvm/usr/lib/$(shlib_name).so.1
+	  $(D)/debian/tmp-llvm/usr/lib/$(DEB_HOST_MULTIARCH)/$(shlib_name).so.1
 endef
 
 define llvm-runtime_extra_binary

=== modified file 'debian/rules.d/binary.mk'
--- debian/rules.d/binary.mk	2011-05-17 15:20:50 +0000
+++ debian/rules.d/binary.mk	2011-06-28 23:40:46 +0000
@@ -16,6 +16,7 @@
 		-e "s/@PKG_VERSION@/$(pkg_version)/g" \
 		-e "s/@SHLIB_NAME@/$(shlib_name)/g" \
 		-e "s;@OCAML_STDLIB_DIR@;$(OCAML_STDLIB_DIR);g" \
+		-e "s/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
 		$(D)/debian/debhelper.in/$f > \
 		$(D)/debian/$(strip $(call pkgname,$*))$(strip $(suffix $(f))) \
 	&&) :
@@ -46,7 +47,7 @@
 	dh_installdirs -p$(call pkgname,$*)
 	dh_install -p$(call pkgname,$*)
 	$(call $*_extra_binary)
-	for dir in usr/lib $(PF)/lib usr/bin $(PF)/bin ; \
+	for dir in usr/lib usr/lib/$(DEB_HOST_MULTIARCH) $(PF)/lib $(PF)/lib/$(DEB_HOST_MULTIARCH) usr/bin $(PF)/bin ; \
 		do for i in $$(find $(D)/debian/$(strip $(call pkgname,$*))/$$dir 2>/dev/null || echo -n) ; \
 			do if objdump -p $$i 2>/dev/null | grep RPATH 2>&1 >/dev/null ; \
 				then echo "Removing hardcoded path library from $$i" ; \

=== modified file 'debian/rules.d/vars.mk'
--- debian/rules.d/vars.mk	2011-05-10 00:12:28 +0000
+++ debian/rules.d/vars.mk	2011-06-28 23:36:06 +0000
@@ -7,6 +7,8 @@
 PF		:= /usr/lib/llvm-$(UVERSION)
 D		:= $(CURDIR)
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 # remove upstream version
 PKGNAME		:= $(subst -$(UVERSION),,$(PKGSOURCE))
 



More information about the Pkg-llvm-team mailing list