Package: src:pcre3
Version: 8.31-5
Severity: normal
Tags: patch

Dear Maintainer,

For the ppc64el architecture in Ubuntu, since this package uses libtool, a full autoreconf is necessary. This is because we need new libtool macros for ppc64el.

In Ubuntu, the attached patch was applied to achieve the following:

  * Build using dh-autoreconf for new port support.
  * Enable parallel builds.
  * Disable JIT on ppc64el, needs explicit porting to ELFv2.

Thanks for considering the patch.

Erwan Prioul.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.13-1-powerpc64le (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

--- a/debian/rules
+++ b/debian/rules
@@ -12,6 +12,9 @@
 DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
 CFLAGS = -Wall -g
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  NJOBS = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+endif
 INSTALL = install
 INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
 INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
@@ -27,9 +30,10 @@
 INSTALL_PROGRAM += -s
 endif
 
-config.status: configure
+configure-stamp:
 	dh_testdir
 	# Add here commands to configure the package.
+	dh_autoreconf
 	CC_FOR_BUILD=cc CFLAGS="$(CFLAGS)" ./configure \
 		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 		--prefix=/usr --mandir=\$${prefix}/share/man \
@@ -38,25 +42,26 @@
 		--enable-utf8 --enable-unicode-properties \
 		--disable-silent-rules \
 		$(shell . debian/jit-test)
+	touch configure-stamp
 
 build: build-arch build-indep
 build-arch: build-stamp
 build-indep: build-stamp
-build-stamp:  config.status
+build-stamp:  configure-stamp
 	dh_testdir
 
 	# Add here commands to compile the package.
-	$(MAKE)
+	$(MAKE) $(NJOBS)
 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 	$(MAKE) check
 endif
 
 	touch build-stamp
 
-clean: config.status
+clean: 
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp
+	rm -f configure-stamp build-stamp
 	# Add here commands to clean up after the build process.
 	[ ! -f Makefile ] || $(MAKE) distclean
 ###	-test -r /usr/share/misc/config.sub && \
@@ -64,6 +69,7 @@
 ###	-test -r /usr/share/misc/config.guess && \
 ###	  cp -f /usr/share/misc/config.guess config.guess
 	rm -f dftables testsavedregex
+	dh_autoreconf_clean
 	dh_clean
 
 install: build
@@ -112,8 +118,8 @@
 	rm debian/libpcre3-dbg/usr/lib/debug/usr/lib/libpcre*
 	dh_compress -a
 	dh_fixperms -a
-	dh_makeshlibs -plibpcre3 --add-udeb="libpcre3-udeb" -V 'libpcre3 (>= 8.10)'
-	dh_makeshlibs -plibpcrecpp0 -V 'libpcrecpp0 (>= 7.7)'
+	dh_makeshlibs -plibpcre3 --add-udeb="libpcre3-udeb"
+	dh_makeshlibs -plibpcrecpp0
 	dh_installdeb -a
 #	dh_perl -a
 	dh_shlibdeps -a -ldebian/libpcre3/usr/lib/$(DEB_HOST_MULTIARCH)
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer:  Mark Baker <m...@mnb.org.uk>
 Standards-Version: 3.9.3
-Build-Depends: debhelper (>= 5.0.22), dpkg-dev (>= 1.16.0)
+Build-Depends: debhelper (>= 5.0.22), dpkg-dev (>= 1.16.0), dh-autoreconf
 
 Package: libpcre3
 Section: libs
--- a/sljit/sljitConfigInternal.h
+++ b/sljit/sljitConfigInternal.h
@@ -94,7 +94,11 @@
 #define SLJIT_CONFIG_ARM_V5 1
 #endif
 #elif defined(__ppc64__) || defined(__powerpc64__)
-#define SLJIT_CONFIG_PPC_64 1
+# if _CALL_ELF != 2
+#  define SLJIT_CONFIG_PPC_64 1
+# else
+#  define SLJIT_CONFIG_UNSUPPORTED 1
+# endif
 #elif defined(__ppc__) || defined(__powerpc__)
 #define SLJIT_CONFIG_PPC_32 1
 #elif defined(__mips__)

Reply via email to