[Pkg-cli-apps-commits] r5217 - in /packages/gnome-do/trunk/debian: changelog ltmain-add-as-needed.patch patches/10_sk_translation_update.dpatch rules

raof-guest at users.alioth.debian.org raof-guest at users.alioth.debian.org
Mon Jan 11 00:53:37 UTC 2010


Author: raof-guest
Date: Mon Jan 11 00:53:34 2010
New Revision: 5217

URL: http://svn.debian.org/wsvn/pkg-cli-apps/?sc=1&rev=5217
Log:
Add --as-needed magic to remove unnecessary C library dependencies

Added:
    packages/gnome-do/trunk/debian/ltmain-add-as-needed.patch
Modified:
    packages/gnome-do/trunk/debian/changelog
    packages/gnome-do/trunk/debian/patches/10_sk_translation_update.dpatch   (contents, props changed)
    packages/gnome-do/trunk/debian/rules

Modified: packages/gnome-do/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do/trunk/debian/changelog?rev=5217&op=diff
==============================================================================
--- packages/gnome-do/trunk/debian/changelog (original)
+++ packages/gnome-do/trunk/debian/changelog Mon Jan 11 00:53:34 2010
@@ -25,10 +25,16 @@
     + Use mono-csc instead of csc for MCS
     + Pass -f -i to autoreconf to keep the buildsystem's libtool in sync
       with Debian's.  Fixes libtool-related FTBFS (Closes: #560645)
+    + Apply ltmain-add-as-needed.patch after autoreconf-ing for --as-needed
+      magic.
+    + Pass --as-needed to the linker to eliminate dependencies on unneeded 
+      libs.
   * debian/README.source:
     + Add to really comply with policy; we've got a patch system!
-
- -- Christopher James Halse Rogers <raof at ubuntu.com>  Wed, 09 Dec 2009 11:19:06 +1100
+  * debian/ltmain-add-as-needed.patch:
+    + Patch to add --as-needed magic to ltmain.sh
+
+ --
 
 gnome-do (0.8.2+dfsg-1) unstable; urgency=low
 

Added: packages/gnome-do/trunk/debian/ltmain-add-as-needed.patch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do/trunk/debian/ltmain-add-as-needed.patch?rev=5217&op=file
==============================================================================
--- packages/gnome-do/trunk/debian/ltmain-add-as-needed.patch (added)
+++ packages/gnome-do/trunk/debian/ltmain-add-as-needed.patch Mon Jan 11 00:53:34 2010
@@ -1,0 +1,40 @@
+Description: Patch to add --as-needed magic to ltmain.sh
+ This patch needs to be applied after autoreconf is run, and autoreconf should
+ be copying files, not symlinking (ie: the '-s' option should not be given) so
+ that system-wide files aren't accidentally patched.
+ .
+ This should be more robust than copying a pre-patched version of ltmain.sh
+ from debian/ on build, as ltmain.sh needs to be exactly the same version as 
+ the rest of libtool.
+Author: Christopher James Halse Rogers <raof at ubuntu.com>
+
+--- libtool-2.2.6b/libltdl/config/ltmain.sh	2010-01-04 05:33:00.810981679 +0000
++++ libtool-as-needed/libltdl/config/ltmain.sh	2010-01-04 00:18:29.715388881 +0000
+@@ -4716,6 +4716,11 @@
+ 	arg=$func_stripname_result
+ 	;;
+ 
++      -Wl,--as-needed)
++	deplibs="$deplibs $arg"
++	continue
++	;;
++
+       -Wl,*)
+ 	func_stripname '-Wl,' '' "$arg"
+ 	args=$func_stripname_result
+@@ -5070,6 +5075,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)
+ 	  if test "$linkmode,$pass" = "prog,link"; then
+ 	    compile_deplibs="$deplib $compile_deplibs"

Modified: packages/gnome-do/trunk/debian/patches/10_sk_translation_update.dpatch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do/trunk/debian/patches/10_sk_translation_update.dpatch?rev=5217&op=diff
==============================================================================
    (empty)

Propchange: packages/gnome-do/trunk/debian/patches/10_sk_translation_update.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/gnome-do/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do/trunk/debian/rules?rev=5217&op=diff
==============================================================================
--- packages/gnome-do/trunk/debian/rules (original)
+++ packages/gnome-do/trunk/debian/rules Mon Jan 11 00:53:34 2010
@@ -6,8 +6,12 @@
 
 export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
 
+CFLAGS ?= -O2 -Wall -g
+LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
+
 configure: patch-stamp
 	autoreconf -f -i -I m4/shamrock
+	patch -p3 < debian/ltmain-add-as-needed.patch
 
 override_dh_auto_configure: configure
 	dh_auto_configure -- MCS=/usr/bin/mono-csc




More information about the Pkg-cli-apps-commits mailing list