Package: postfix
Version: 2.8.4-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch oneiric

        Hi

 Attached debdiff fixes build for linux 3.x kernels + multiarch library
 pathes; from Ubuntu.

 I wonder whether upstream will take these; if not, I would think this
 could be rewritten by running "ld -o /dev/null -l$lib" directly in the
 loop rather than testing for filenames -- or something like that.

   Cheers,
-- 
Loïc Minier
diff -u postfix-2.8.4/makedefs postfix-2.8.4/makedefs
--- postfix-2.8.4/makedefs
+++ postfix-2.8.4/makedefs
@@ -363,9 +363,16 @@
                    exit 1
                fi
                SYSLIBS="-ldb"
+               SEARCHDIRS=$(${CC-gcc} -print-search-dirs 2>/dev/null \
+                       | grep libraries | cut -f2- -d= \
+                       | sed -e's/\:/\n/g' | xargs -n1 readlink -f \
+                       | grep -v 'gcc\|/[0-9.]\+$' | uniq)
+               if [ -z "$SEARCHDIRS" ]; then
+                       SEARCHDIRS="/usr/lib64 /lib64 /usr/lib /lib"
+               fi
                for name in nsl resolv
                do
-                   for lib in /usr/lib64 /lib64 /usr/lib /lib
+                   for lib in $SEARCHDIRS
                    do
                        test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
                            SYSLIBS="$SYSLIBS -l$name"
diff -u postfix-2.8.4/debian/changelog postfix-2.8.4/debian/changelog
--- postfix-2.8.4/debian/changelog
+++ postfix-2.8.4/debian/changelog
@@ -1,3 +1,10 @@
+postfix (2.8.4-1ubuntu2) oneiric; urgency=low
+
+  * makedefs: fix FTBFS for Linux 3.x + multiarch with same approach as in
+    2.8.1-1ubuntu1 for the backported chunk added in 2.8.3-1ubuntu1.
+
+ -- Lo?c Minier <[email protected]>  Mon, 26 Sep 2011 01:47:30 +0200
+
 postfix (2.8.4-1ubuntu1) oneiric; urgency=low
 
   * Add back in apport.  Debian lacks it, so the package is now

Reply via email to