diff options
author | Ade Lovett <ade@FreeBSD.org> | 2008-08-26 18:59:39 +0000 |
---|---|---|
committer | Ade Lovett <ade@FreeBSD.org> | 2008-08-26 18:59:39 +0000 |
commit | 85a0fbb52a621c8e222cfb4943a0edb58bdbbcb1 (patch) | |
tree | 3f2bfd82dda98ec1a6ea779064dfa058ca6c05b0 /www/libapreq2 | |
parent | 43fb4e70c3035b2fad587c97abf7771fa111196e (diff) | |
download | ports-85a0fbb52a621c8e222cfb4943a0edb58bdbbcb1.tar.gz ports-85a0fbb52a621c8e222cfb4943a0edb58bdbbcb1.zip |
Notes
Diffstat (limited to 'www/libapreq2')
-rw-r--r-- | www/libapreq2/Makefile | 2 | ||||
-rw-r--r-- | www/libapreq2/files/patch-glue-perl-Makefile.PL | 113 |
2 files changed, 95 insertions, 20 deletions
diff --git a/www/libapreq2/Makefile b/www/libapreq2/Makefile index cc0338715baf..46984bb0b797 100644 --- a/www/libapreq2/Makefile +++ b/www/libapreq2/Makefile @@ -7,7 +7,7 @@ PORTNAME= libapreq2 PORTVERSION= 2.08 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= www devel MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} MASTER_SITE_SUBDIR=libapreq diff --git a/www/libapreq2/files/patch-glue-perl-Makefile.PL b/www/libapreq2/files/patch-glue-perl-Makefile.PL index 2e6a571fc098..5c5b336fd18f 100644 --- a/www/libapreq2/files/patch-glue-perl-Makefile.PL +++ b/www/libapreq2/files/patch-glue-perl-Makefile.PL @@ -1,29 +1,104 @@ ---- glue/perl/Makefile.PL.orig Wed Aug 9 06:26:45 2006 -+++ glue/perl/Makefile.PL Wed Oct 3 11:48:26 2007 -@@ -69,6 +69,7 @@ - $config =~ /^s,\@APR_INCLUDES\@,([^,]+)/m or - die "Can't find apache include directory"; - $apache_includes .= " $1"; -+ $apache_includes =~ s,\|\#_!!_\#\|,,g; +--- glue/perl/Makefile.PL.orig 2006-08-09 04:26:45.000000000 +0000 ++++ glue/perl/Makefile.PL 2008-08-25 18:07:08.000000000 +0000 +@@ -37,6 +37,50 @@ + read $file, $_[0], -s $file; + } - # $config =~ m/^s,\@APR_LDFLAGS\@,([^,]+)/m or - # die "Can't find apr ldflags"; -@@ -82,12 +83,11 @@ ++sub cmp_tuples { ++ my ($num_a, $num_b) = @_; ++ ++ while (@$num_a && @$num_b) { ++ my $cmp = shift @$num_a <=> shift @$num_b; ++ return $cmp if $cmp; ++ } ++ ++ return @$num_a <=> @$num_b; ++} ++ ++sub autoconf_foo { ++ my ($config, $re_start, $re_end, $re_match) = @_; ++ ++ $$config =~ /^${re_start}APACHE2_INCLUDES${re_end}($re_match)/m or ++ die "Can't find apache include directory"; ++ my $apache_includes = $1; ++ $$config =~ /^${re_start}APR_INCLUDES${re_end}($re_match)/m or ++ die "Can't find apache include directory"; ++ $apache_includes .= " $1"; ++ ++ my $apr_libs =""; ++ ++ $$config =~ m/^${re_start}APREQ_LIBNAME${re_end}($re_match)/m or ++ die "Can't find apreq libname"; ++ ++ my $apreq_libname = $1; ++ ++ $$config =~ m/^${re_start}PACKAGE_VERSION${re_end}($re_match)/m or ++ die "Can't find package version"; ++ my $version = $1; ++ ++ ## Code around an autoconf 2.60 bug ++ ## http://lists.gnu.org/archive/html/bug-autoconf/2006-06/msg00127.html ++ ## $ grep @PACKAGE_VERSION config.status-2.59 config.status-2.60 ++ ## config.status-2.59:s,@PACKAGE_VERSION@,2.09,;t t ++ ## config.status-2.60:s,@PACKAGE_VERSION@,|#_!!_#|2.09,g ++ foreach ($apache_includes, $apreq_libname, $version) { ++ s/\|#_!!_#\|//g; ++ } ++ ++ return ($apache_includes, $apr_libs, $apreq_libname, $version); ++} ++ + my ($apache_includes, $apache_dir, $apr_libs, $apreq_libname, $perl_lib); - $config =~ m/^s,\@APREQ_LIBNAME\@,([^,]+)/m or - die "Can't find apreq libname"; + if (WIN32) { +@@ -63,31 +107,22 @@ + } + else { + slurp my $config => "$base_dir/config.status"; +- $config =~ /^s,\@APACHE2_INCLUDES\@,([^,]+)/m or +- die "Can't find apache include directory"; +- $apache_includes = $1; +- $config =~ /^s,\@APR_INCLUDES\@,([^,]+)/m or +- die "Can't find apache include directory"; +- $apache_includes .= " $1"; +- +-# $config =~ m/^s,\@APR_LDFLAGS\@,([^,]+)/m or +-# die "Can't find apr ldflags"; +-# $apr_libs = $1; +- +-# $config =~ m/^s,\@APR_LIBS\@,([^,]+)/m or +-# die "Can't find apr libraries"; +-# $apr_libs .= " $1"; +- +- $apr_libs =""; +- +- $config =~ m/^s,\@APREQ_LIBNAME\@,([^,]+)/m or +- die "Can't find apreq libname"; - $apreq_libname = $1; -+ $apreq_libname = $1; $apreq_libname =~ s,^\|\#_!!_\#\|,,; - - $config =~ m/^s,\@PACKAGE_VERSION\@,([^,]+)/m or - die "Can't find package version"; -- $version = $1; - -+ $version = $1; $version =~ s,^\|\#_!!_\#\|,,; +- $config =~ m/^s,\@PACKAGE_VERSION\@,([^,]+)/m or +- die "Can't find package version"; +- $version = $1; + ++ $config =~ /GNU Autoconf (\d+\.\d+)/; ++ my $autoconf_ver = $1; ++ ++ ### XXX: Lord have mercy on us..... ++ if (cmp_tuples([split /\./, $autoconf_ver], [qw(2 61)]) > 0) { ++ ### Autoconf >=2.62 changed the format of the file ++ ### I.E.: S["APACHE2_INCLUDES"]="-I/usr/local/include/apache2" ++ ($apache_includes, $apr_libs, $apreq_libname, $version) = ++ autoconf_foo(\$config, qr/S\[\"/, qr/\"\]=\"/, qr/[^\"]+/); ++ } ++ else { ++ ### I.E.: s,@APACHE2_INCLUDES@,-I/usr/local/include/apache22,;t t ++ ($apache_includes, $apr_libs, $apreq_libname, $version) = ++ autoconf_foo(\$config, qr/s,\@/, qr/\@,/, qr/[^,]+/); ++ } } my $apreq_libs = WIN32 ? -@@ -415,8 +415,8 @@ +@@ -415,8 +450,8 @@ 'NAME' => '$class', 'VERSION' => '$version', 'TYPEMAPS' => [qw(@$mp2_typemaps $typemap)], |