diff options
author | swills <swills@FreeBSD.org> | 2015-07-01 09:03:03 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2015-07-01 09:03:03 +0800 |
commit | d739ec46176e3d24940c4d0fe60799064affead0 (patch) | |
tree | e5618b15aa1d00befbb85d35d014dddab2ac25d4 /databases | |
parent | c615166c479d17da05f8fbf78bbe11d98f23e03d (diff) | |
download | freebsd-ports-gnome-d739ec46176e3d24940c4d0fe60799064affead0.tar.gz freebsd-ports-gnome-d739ec46176e3d24940c4d0fe60799064affead0.tar.zst freebsd-ports-gnome-d739ec46176e3d24940c4d0fe60799064affead0.zip |
databases/p5-Memcached-libmemcached: improve patch
The patch to Makefile.PL needed to also replace $Config{lib_ext} (which
defaults to ".a") with ".so" so that we link against the right thing. This
avoids the need to patch databases/libmemcached.
While here, also avoid hard coding the path to PREFIX and split out the
libstdc++ to libc++ patch, avoiding duplication.
Pointyhat to: swills
Reported by: tijl, bapt
Diffstat (limited to 'databases')
-rw-r--r-- | databases/p5-Memcached-libmemcached/Makefile | 12 | ||||
-rw-r--r-- | databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL | 11 | ||||
-rw-r--r-- | databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-10 | 29 | ||||
-rw-r--r-- | databases/p5-Memcached-libmemcached/files/patch-Makefile.PL (renamed from databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-9) | 8 |
4 files changed, 22 insertions, 38 deletions
diff --git a/databases/p5-Memcached-libmemcached/Makefile b/databases/p5-Memcached-libmemcached/Makefile index 743f18061e50..e606dba45199 100644 --- a/databases/p5-Memcached-libmemcached/Makefile +++ b/databases/p5-Memcached-libmemcached/Makefile @@ -3,6 +3,7 @@ PORTNAME= Memcached-libmemcached PORTVERSION= 1.001801 +PORTREVISION= 1 CATEGORIES= databases devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- @@ -19,14 +20,13 @@ USE_LDCONFIG= yes post-extract: @${RM} -r ${WRKDIR}/src +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Makefile.PL + .include <bsd.port.pre.mk> -.if ${OPSYS} == FreeBSD -.if ${OSVERSION} > 1000000 -EXTRA_PATCHES= ${FILESDIR}/extra-patch-Makefile.PL-10 -.else -EXTRA_PATCHES= ${FILESDIR}/extra-patch-Makefile.PL-9 -.endif +.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1000000 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-Makefile.PL .endif .include <bsd.port.post.mk> diff --git a/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL b/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL new file mode 100644 index 000000000000..c9685df3280b --- /dev/null +++ b/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL @@ -0,0 +1,11 @@ +--- Makefile.PL.orig 2015-05-07 17:56:22 UTC ++++ Makefile.PL +@@ -54,7 +54,7 @@ if (my $gccversion = $Config{gccversion} + $opts{DEFINE} .= ' -Wmissing-prototypes'; + } + } +-$opts{LIBS} = ["-lstdc++"]; # else error: libmemcached.so: undefined symbol: __gxx_personality_v0 ++$opts{LIBS} = ["-lc++"]; # else error: libmemcached.so: undefined symbol: __gxx_personality_v0 + $opts{OPTIMIZE} = "-g" if $opt_g; + $opts{CCFLAGS} = "-pg" if $opt_pg; + my $coverage_flags = ""; diff --git a/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-10 b/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-10 deleted file mode 100644 index a0858407fe18..000000000000 --- a/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-10 +++ /dev/null @@ -1,29 +0,0 @@ ---- Makefile.PL.orig 2015-05-07 17:56:22 UTC -+++ Makefile.PL -@@ -30,7 +30,7 @@ $Data::Dumper::Indent = 1; - $Data::Dumper::Sortkeys = 1; - - my $lmcd_api_ver = "1.0"; # eg $lmcd_src/libmemcached-$lmcd_api_ver/ --my $lmcd_inst = getcwd()."/src_inst"; -+my $lmcd_inst = "/usr/local"; - my $lmcd_built_lib = "$lmcd_inst/lib/libmemcached$Config{lib_ext}"; - my $is_developer = (-d ".svn" || -d ".git"); - -@@ -54,7 +54,7 @@ if (my $gccversion = $Config{gccversion} - $opts{DEFINE} .= ' -Wmissing-prototypes'; - } - } --$opts{LIBS} = ["-lstdc++"]; # else error: libmemcached.so: undefined symbol: __gxx_personality_v0 -+$opts{LIBS} = ["-lc++"]; # else error: libmemcached.so: undefined symbol: __gxx_personality_v0 - $opts{OPTIMIZE} = "-g" if $opt_g; - $opts{CCFLAGS} = "-pg" if $opt_pg; - my $coverage_flags = ""; -@@ -76,7 +76,7 @@ WriteMakefile( - AUTHOR => 'Tim Bunce <Tim.Bunce@pobox.com>', - VERSION_FROM => 'libmemcached.pm', - ABSTRACT_FROM => 'libmemcached.pm', -- INC => "-I$lmcd_inst/include", -+ INC => "-I$lmcd_inst/include/", - # We want to link to *our* private libmemcached and not one that - # might already be installed on the system. The LIBS config gets - # appended to the link command line, so if we used "-L$dir -lmemcached" diff --git a/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-9 b/databases/p5-Memcached-libmemcached/files/patch-Makefile.PL index 3143aca52828..c00cc1dfcc13 100644 --- a/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-9 +++ b/databases/p5-Memcached-libmemcached/files/patch-Makefile.PL @@ -1,14 +1,16 @@ --- Makefile.PL.orig 2015-05-07 17:56:22 UTC +++ Makefile.PL -@@ -30,7 +30,7 @@ $Data::Dumper::Indent = 1; +@@ -30,8 +30,8 @@ $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = 1; my $lmcd_api_ver = "1.0"; # eg $lmcd_src/libmemcached-$lmcd_api_ver/ -my $lmcd_inst = getcwd()."/src_inst"; -+my $lmcd_inst = "/usr/local"; - my $lmcd_built_lib = "$lmcd_inst/lib/libmemcached$Config{lib_ext}"; +-my $lmcd_built_lib = "$lmcd_inst/lib/libmemcached$Config{lib_ext}"; ++my $lmcd_inst = "%%PREFIX%%"; ++my $lmcd_built_lib = "$lmcd_inst/lib/libmemcached.so"; my $is_developer = (-d ".svn" || -d ".git"); + my ($lmcd_h) = eval { build_libmemcached() }; @@ -76,7 +76,7 @@ WriteMakefile( AUTHOR => 'Tim Bunce <Tim.Bunce@pobox.com>', VERSION_FROM => 'libmemcached.pm', |