freebsd-ports/devel/apr0/files/patch-apr-0.9.20__buildconf
Olli Hauer 7a20a86f74 - update apr to version 0.9.20
Changes with APR 0.9.20

  *) Security: CVE-2011-0419
     Reimplement apr_fnmatch() from scratch using a non-recursive
     algorithm; now has improved compliance with the fnmatch() spec.
     [William Rowe]

  *) Updated config.guess and config.sub.  [Rainer Jung]

  *) Fix flag character '#' in combination with format character 'x' in
     apr snprintf implementations.  [Rainer Jung]

with hat apache@

PR:		ports/162247
Submitted by:	Takefu <takefu@airport.fm>
Feature safe:	yes
2011-11-13 22:31:25 +00:00

75 lines
2.6 KiB
Text

--- ./apr-0.9.20/buildconf.orig 2006-09-20 16:04:09.000000000 +0000
+++ ./apr-0.9.20/buildconf 2010-10-20 21:08:11.863623823 +0000
@@ -23,7 +23,7 @@
#
build/buildcheck.sh || exit 1
-libtoolize=`build/PrintPath glibtoolize libtoolize`
+libtoolize="${LIBTOOLIZE}"
if [ "x$libtoolize" = "x" ]; then
echo "libtoolize not found in path"
exit 1
@@ -35,29 +35,48 @@
# Note: APR supplies its own config.guess and config.sub -- we do not
# rely on libtool's versions
#
-echo "Copying libtool helper files ..."
+echo "buildconf: copying libtool helper files using $libtoolize"
# Remove any libtool files so one can switch between libtool 1.3
# and libtool 1.4 by simply rerunning the buildconf script.
-(cd build ; rm -f ltconfig ltmain.sh libtool.m4)
-
-$libtoolize --copy --automake
-
-ltpath=`dirname $libtoolize`
-ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4}
+(cd build ; rm -f ltconfig ltmain.sh libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4)
-if [ ! -f $ltfile ]; then
+lt_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
+lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
+IFS=.; set $lt_version; IFS=' '
+if test "$1" = "1"; then
+ $libtoolize --copy --automake
+ if [ -f libtool.m4 ]; then
+ ltfile=`pwd`/libtool.m4
+ else
+ ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
+ < $libtoolize`"
+ ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
+ # Expecting the code above to be very portable, but just in case...
+ if [ -z "$ltfile" -o ! -f "$ltfile" ]; then
+ ltpath=`dirname $libtoolize`
+ ltfile=${LIBTOOL_M4}
+ fi
+ fi
+ if [ ! -f $ltfile ]; then
echo "$ltfile not found"
exit 1
+ fi
+ # Do we need this anymore?
+ echo "buildconf: Using libtool.m4 at ${ltfile}."
+ cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
+fi
+if test "$1" = "2"; then
+ $libtoolize --copy
+ # Wouldn't it just be better to define top_builddir??
+ mv build/libtool.m4 build/libtool.m4.$$
+ cat build/libtool.m4.$$ | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
+ chmod 664 build/libtool.m4.$$
+ rm build/libtool.m4.$$
fi
-echo "buildconf: Using libtool.m4 at ${ltfile}."
-
-cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
-
-# This is just temporary until people's workspaces are cleared -- remove
-# any old aclocal.m4 left over from prior build so it doesn't cause errors.
-rm -f aclocal.m4
+# Clean up any leftovers
+rm -f aclocal.m4 libtool.m4
#
# Generate the autoconf header and ./configure