here is the cleaned-up patch

diff -Nru libhdate-1.4.20/debian/changelog libhdate-1.4.20/debian/changelog
--- libhdate-1.4.20/debian/changelog    2010-11-13 21:49:26.000000000 +0000
+++ libhdate-1.4.20/debian/changelog    2010-11-26 17:39:35.000000000 +0000
@@ -1,3 +1,21 @@
+libhdate (1.4.20-1ubuntu3) natty; urgency=low
+
+  * Clean up the ld-as-needed patch.
+
+ -- Matthias Klose <d...@ubuntu.com>  Fri, 26 Nov 2010 18:37:59 +0100
+
+libhdate (1.4.20-1ubuntu2) natty; urgency=low
+
+  * Fix build failure with ld --as-needed, in generated files too.
+
+ -- Matthias Klose <d...@ubuntu.com>  Wed, 24 Nov 2010 13:11:27 +0100
+
+libhdate (1.4.20-1ubuntu1) natty; urgency=low
+
+  * Fix build failure with ld --as-needed.
+
+ -- Matthias Klose <d...@ubuntu.com>  Wed, 24 Nov 2010 10:20:25 +0100
+
 libhdate (1.4.20-1) unstable; urgency=low
 
   * New upstream release
diff -Nru libhdate-1.4.20/debian/patches/ld-as-needed.patch 
libhdate-1.4.20/debian/patches/ld-as-needed.patch
--- libhdate-1.4.20/debian/patches/ld-as-needed.patch   1970-01-01 
00:00:00.000000000 +0000
+++ libhdate-1.4.20/debian/patches/ld-as-needed.patch   2010-11-26 
17:37:47.000000000 +0000
@@ -0,0 +1,88 @@
+--- libhdate-1.4.20.orig/bindings/perl/Makefile.in
++++ libhdate-1.4.20/bindings/perl/Makefile.in
+@@ -401,7 +401,7 @@ uninstall-am:
+ 
+ @with_perl_t...@hdate.so: hdate_wrap.cxx
+ @WITH_PERL_TRUE@      g++ -fpic -c hdate_wrap.cxx $(PE_CFLAGS) 
-I$(top_srcdir)/src
+...@with_perl_true@    g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o 
hdate.so
+...@with_perl_true@    g++ -shared hdate_wrap.o ../../src/.libs/libhdate.so -o 
hdate.so
+ 
+ @with_perl_t...@hdate_wrap.cxx: hdate.i
+ @WITH_PERL_TRUE@      swig -perl -c++ hdate.i
+--- libhdate-1.4.20.orig/bindings/perl/Makefile.am
++++ libhdate-1.4.20/bindings/perl/Makefile.am
+@@ -12,7 +12,7 @@ all-am: hdate.so
+ 
+ hdate.so: hdate_wrap.cxx
+       g++ -fpic -c hdate_wrap.cxx $(PE_CFLAGS) -I$(top_srcdir)/src
+-      g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o hdate.so
++      g++ -shared hdate_wrap.o ../../src/.libs/libhdate.so -o hdate.so
+ 
+ hdate_wrap.cxx: hdate.i
+       swig -perl -c++ hdate.i
+--- libhdate-1.4.20.orig/bindings/php/Makefile.in
++++ libhdate-1.4.20/bindings/php/Makefile.in
+@@ -401,7 +401,7 @@ uninstall-am:
+ 
+ @with_php_t...@hdate.so: hdate_wrap.cpp
+ @WITH_PHP_TRUE@       g++ -I$(top_srcdir)/src `php-config --includes` -fpic 
-c hdate_wrap.cpp
+...@with_php_true@     gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o 
-lstdc++ -o hdate.so
+...@with_php_true@     gcc -shared hdate_wrap.o ../../src/.libs/libhdate.so 
-lstdc++ -o hdate.so
+ 
+ @with_php_t...@hdate_wrap.cpp: hdate.i
+ @WITH_PHP_TRUE@       swig -php5 -c++ hdate.i
+--- libhdate-1.4.20.orig/bindings/php/Makefile.am
++++ libhdate-1.4.20/bindings/php/Makefile.am
+@@ -12,7 +12,7 @@ all-am: hdate.so
+ 
+ hdate.so: hdate_wrap.cpp
+       g++ -I$(top_srcdir)/src `php-config --includes` -fpic -c hdate_wrap.cpp
+-      gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o -lstdc++ -o 
hdate.so
++      gcc -shared hdate_wrap.o ../../src/.libs/libhdate.so -lstdc++ -o 
hdate.so
+ 
+ hdate_wrap.cpp: hdate.i
+       swig -php5 -c++ hdate.i
+--- libhdate-1.4.20.orig/bindings/ruby/Makefile.in
++++ libhdate-1.4.20/bindings/ruby/Makefile.in
+@@ -401,7 +401,7 @@ uninstall-am:
+ 
+ @with_ruby_t...@hdate.so: hdate_wrap.cxx
+ @WITH_RUBY_TRUE@      g++ -fpic -fno-strict-aliasing -g -O2 -c hdate_wrap.cxx 
$(RU_CFLAGS) -I$(top_srcdir)/src
+...@with_ruby_true@    gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o 
-rdynamic -Wl,-export-dynamic -lruby$(RU_VERSION) -lpthread -ldl -lcrypt -lm 
-lc -lstdc++ -o hdate.so
+...@with_ruby_true@    gcc -shared hdate_wrap.o ../../src/.libs/libhdate.so 
-rdynamic -Wl,-export-dynamic -lruby$(RU_VERSION) -lpthread -ldl -lcrypt -lm 
-lc -lstdc++ -o hdate.so
+ 
+ @with_ruby_t...@hdate_wrap.cxx: hdate.i
+ @WITH_RUBY_TRUE@      swig -c++ -ruby hdate.i
+--- libhdate-1.4.20.orig/bindings/ruby/Makefile.am
++++ libhdate-1.4.20/bindings/ruby/Makefile.am
+@@ -12,7 +12,7 @@ all-am: hdate.so
+ 
+ hdate.so: hdate_wrap.cxx
+       g++ -fpic -fno-strict-aliasing -g -O2 -c hdate_wrap.cxx $(RU_CFLAGS) 
-I$(top_srcdir)/src
+-      gcc -shared ../../src/.libs/libhdate.so hdate_wrap.o -rdynamic 
-Wl,-export-dynamic -lruby$(RU_VERSION) -lpthread -ldl -lcrypt -lm -lc -lstdc++ 
-o hdate.so
++      gcc -shared hdate_wrap.o ../../src/.libs/libhdate.so -rdynamic 
-Wl,-export-dynamic -lruby$(RU_VERSION) -lpthread -ldl -lcrypt -lm -lc -lstdc++ 
-o hdate.so
+ 
+ hdate_wrap.cxx: hdate.i
+       swig -c++ -ruby hdate.i
+--- libhdate-1.4.20.orig/bindings/python/Makefile.in
++++ libhdate-1.4.20/bindings/python/Makefile.in
+@@ -401,7 +401,7 @@ uninstall-am:
+ 
+ @with_python_t...@_hdate.so: hdate_wrap.cxx
+ @WITH_PYTHON_TRUE@    g++ -fpic -c hdate_wrap.cxx $(PY_CFLAGS) 
-I$(top_srcdir)/src
+...@with_python_true@  g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o 
_hdate.so
+...@with_python_true@  g++ -shared hdate_wrap.o ../../src/.libs/libhdate.so -o 
_hdate.so
+ 
+ @with_python_t...@hdate_wrap.cxx: hdate.i
+ @WITH_PYTHON_TRUE@    swig -python -c++ hdate.i
+--- libhdate-1.4.20.orig/bindings/python/Makefile.am
++++ libhdate-1.4.20/bindings/python/Makefile.am
+@@ -12,7 +12,7 @@ all-am: _hdate.so
+ 
+ _hdate.so: hdate_wrap.cxx
+       g++ -fpic -c hdate_wrap.cxx $(PY_CFLAGS) -I$(top_srcdir)/src
+-      g++ -shared ../../src/.libs/libhdate.so hdate_wrap.o -o _hdate.so
++      g++ -shared hdate_wrap.o ../../src/.libs/libhdate.so -o _hdate.so
+ 
+ hdate_wrap.cxx: hdate.i
+       swig -python -c++ hdate.i
diff -Nru libhdate-1.4.20/debian/patches/series 
libhdate-1.4.20/debian/patches/series
--- libhdate-1.4.20/debian/patches/series       2010-11-13 21:45:26.000000000 
+0000
+++ libhdate-1.4.20/debian/patches/series       2010-11-26 17:41:40.000000000 
+0000
@@ -1 +1,2 @@
 docdir.patch
+ld-as-needed.patch

Reply via email to