Bug#735437: gucharmap: use dh-autoreconf for better new-port coverage

Colin Watson cjwatson at ubuntu.com
Wed Jan 15 12:01:50 UTC 2014


Package: gucharmap
Version: 1:3.8.2-3
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch trusty

Hi,

The ppc64el port requires a patch to libtool.m4
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726404), which
requires autoreconfing a bunch of packages to pick it up.  gucharmap
could handle this quite easily by using dh-autoreconf, which will update
its copies of the libtool macros; in the process we can use
dh-autoreconf to patch ltmain.sh for --as-needed rather than keeping
another copy of that patch in the gucharmap source.

  * Use dh-autoreconf to update libtool.m4 for new ports.  Also use its
    --as-needed option, obsoleting 99_ltmain_as-needed.patch.

diff -Nru gucharmap-3.8.2/debian/control gucharmap-3.8.2/debian/control
--- gucharmap-3.8.2/debian/control	2013-09-19 20:09:12.000000000 +0100
+++ gucharmap-3.8.2/debian/control	2014-01-15 11:34:36.000000000 +0000
@@ -10,7 +10,7 @@
 Uploaders: Andreas Henriksson <andreas at fatal.se>, Emilio Pozuelo Monfort <pochu at debian.org>, Martin Pitt <mpitt at debian.org>, Michael Biebl <biebl at debian.org>
 Build-Depends: cdbs,
                debhelper (>= 8),
-               autotools-dev,
+               dh-autoreconf,
                desktop-file-utils,
                gobject-introspection (>= 1.0.0),
                valac (>= 0.16),
diff -Nru gucharmap-3.8.2/debian/control.in gucharmap-3.8.2/debian/control.in
--- gucharmap-3.8.2/debian/control.in	2013-09-19 20:05:13.000000000 +0100
+++ gucharmap-3.8.2/debian/control.in	2014-01-15 11:34:33.000000000 +0000
@@ -5,7 +5,7 @@
 Uploaders: @GNOME_TEAM@
 Build-Depends: cdbs,
                debhelper (>= 8),
-               autotools-dev,
+               dh-autoreconf,
                desktop-file-utils,
                gobject-introspection (>= 1.0.0),
                valac (>= 0.16),
diff -Nru gucharmap-3.8.2/debian/patches/99_ltmain_as-needed.patch gucharmap-3.8.2/debian/patches/99_ltmain_as-needed.patch
--- gucharmap-3.8.2/debian/patches/99_ltmain_as-needed.patch	2013-05-24 12:31:00.000000000 +0100
+++ gucharmap-3.8.2/debian/patches/99_ltmain_as-needed.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-Link with --as-needed, -z,defs and -O1
-
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5799,6 +5799,11 @@
- 	func_stripname ' ' '' "$arg"
- 	arg=$func_stripname_result
- 	;;
-+        
-+       -Wl,--as-needed)
-+        deplibs="$deplibs $arg"
-+        continue
-+        ;;
- 
-       -Wl,*)
- 	func_stripname '-Wl,' '' "$arg"
-@@ -6160,6 +6165,15 @@
- 	lib=
- 	found=no
- 	case $deplib in
-+        -Wl,--as-needed)
-+          if test "$linkmode,$pass" = "prog,link"; then
-+            compile_deplibs="$deplib $compile_deplibs"
-+            finalize_deplibs="$deplib $finalize_deplibs"
-+          else
-+            deplibs="$deplib $deplibs"
-+          fi
-+          continue
-+          ;;
- 	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
-         |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
- 	  if test "$linkmode,$pass" = "prog,link"; then
diff -Nru gucharmap-3.8.2/debian/patches/series gucharmap-3.8.2/debian/patches/series
--- gucharmap-3.8.2/debian/patches/series	2013-09-19 20:03:34.000000000 +0100
+++ gucharmap-3.8.2/debian/patches/series	2014-01-15 11:32:06.000000000 +0000
@@ -1,4 +1,3 @@
 unicode-source-generation.patch
 10_perl_5_18.patch
 revert-unicode-6.2.patch
-99_ltmain_as-needed.patch
diff -Nru gucharmap-3.8.2/debian/rules gucharmap-3.8.2/debian/rules
--- gucharmap-3.8.2/debian/rules	2013-07-28 04:29:42.000000000 +0100
+++ gucharmap-3.8.2/debian/rules	2014-01-15 11:31:56.000000000 +0000
@@ -5,9 +5,11 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/utils.mk
 include /usr/share/cdbs/1/class/gnome.mk
+include /usr/share/cdbs/1/rules/autoreconf.mk
 include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
 -include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
 
+DEB_DH_AUTORECONF_ARGS := --as-needed
 DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc \
 			     --enable-vala \
 			     --enable-introspection

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the pkg-gnome-maintainers mailing list