Package: pcre3
Version: 1:8.31-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu raring ubuntu-patch

Hi Mark,

I've applied the attached patch to the pcre3 package in Ubuntu to make
libpcre3-dev Multi-Arch: same.  This requires post-processing of the
pcre-config script to make sure it's identical across all architectures, but
these edits do not impact the functionality of the script - the paths are
only needed when building for certain non-Linux architectures.  In fact, the
paths are being used on the kfreebsd architectures (bug #568744) but
shouldn't be.

This change is useful because it enables libglib2.0-dev to also be
co-installable, which is a prerequisite for cross-compiling some software.

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/
[email protected]                                     [email protected]
=== modified file 'debian/control'
--- debian/control	2012-09-13 19:58:45 +0000
+++ debian/control	2012-12-18 08:23:16 +0000
@@ -58,6 +58,7 @@
 Package: libpcre3-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends: libc6-dev, libpcre3 (= ${binary:Version}), libpcrecpp0 (= ${binary:Version}), ${misc:Depends}
 Conflicts: libpcre1-dev, libpcre2-dev
 Description: Perl 5 Compatible Regular Expression Library - development files

=== modified file 'debian/rules'
--- debian/rules	2012-05-01 22:38:42 +0000
+++ debian/rules	2012-12-18 07:29:25 +0000
@@ -85,6 +85,9 @@
 	mkdir -p debian/libpcre3/lib/$(DEB_HOST_MULTIARCH)
 	mv debian/libpcre3/usr/lib/$(DEB_HOST_MULTIARCH)/libpcre.so.* debian/libpcre3/lib/$(DEB_HOST_MULTIARCH)
 	ln -sf /lib/$(DEB_HOST_MULTIARCH)/libpcre.so.3 debian/libpcre3-dev/usr/lib/$(DEB_HOST_MULTIARCH)/libpcre.so
+	# we never need to reference the library path in pcre-config on
+	# Debian, so clip it out so that the script will be multiarch-safe.
+	sed -i -e"s,/$(DEB_HOST_MULTIARCH),,g" debian/libpcre3-dev/usr/bin/pcre-config
 
 	dh_link -a
 

Reply via email to