Improve general GNU hints, needed for GNU/Hurd.
authorPino Toscano <pino@debian.org>
Wed, 10 Aug 2011 05:11:33 +0000 (08:11 +0300)
committerSteffen Mueller <smueller@cpan.org>
Mon, 31 Oct 2011 07:40:19 +0000 (08:40 +0100)
Bug-Debian: http://bugs.debian.org/636609

Patch-Name: fixes/hurd-hints.diff

With minor modifications to add Pino to AUTHORS.

AUTHORS
MANIFEST
ext/ODBM_File/hints/gnu.pl [new file with mode: 0644]
hints/gnu.sh

diff --git a/AUTHORS b/AUTHORS
index 2ed9853..5685613 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -876,6 +876,7 @@ Philip Newton                       <pne@cpan.org>
 Philippe M. Chiasson           <gozer@ActiveState.com>
 Philippe Bruhat (BooK)         <book@cpan.org>
 Piers Cawley                   <pdcawley@bofh.org.uk>
+Pino Toscano                   <pino@debian.org>
 Piotr Fusik                    <pfusik@op.pl>
 Piotr Klaban                   <makler@oryl.man.torun.pl>
 Pradeep Hodigere               <phodigere@yahoo.com>
index 8336e2c..19eab08 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -3692,6 +3692,7 @@ ext/ODBM_File/hints/cygwin.pl     Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/dec_osf.pl Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/gnukfreebsd.pl     Hint for NDBM_File for named architecture
 ext/ODBM_File/hints/gnuknetbsd.pl      Hint for NDBM_File for named architecture
+ext/ODBM_File/hints/gnu.pl     Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/hpux.pl    Hint for ODBM_File for named architecture
 ext/ODBM_File/hints/linux.pl   Hint for NDBM_File for named architecture
 ext/ODBM_File/hints/sco.pl     Hint for ODBM_File for named architecture
diff --git a/ext/ODBM_File/hints/gnu.pl b/ext/ODBM_File/hints/gnu.pl
new file mode 100644 (file)
index 0000000..db63567
--- /dev/null
@@ -0,0 +1 @@
+do './hints/linux.pl' or die $@;
index c1ba2db..f075642 100644 (file)
@@ -8,10 +8,22 @@ set `echo X "$libswanted "| sed -e 's/ nsl / /' -e 's/ c / pthread /'`
 shift
 libswanted="$*"
 
+# Debian 4.0 puts ndbm in the -lgdbm_compat library.
+libswanted="$libswanted gdbm_compat"
+
 case "$optimize" in
 '') optimize='-O2' ;;
 esac
 
+case "$plibpth" in
+'') plibpth=`gcc -print-search-dirs | grep libraries |
+        cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
+    set X $plibpth # Collapse all entries on one line
+    shift
+    plibpth="$*"
+    ;;
+esac
+
 # Flags needed to produce shared libraries.
 lddlflags='-shared'