svn commit: r391019 - in head/databases/p5-Memcached-libmemcached: . files
Steve Wills
swills at FreeBSD.org
Wed Jul 1 01:03:05 UTC 2015
Author: swills
Date: Wed Jul 1 01:03:03 2015
New Revision: 391019
URL: https://svnweb.freebsd.org/changeset/ports/391019
Log:
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
Added:
head/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL (contents, props changed)
head/databases/p5-Memcached-libmemcached/files/patch-Makefile.PL (contents, props changed)
Deleted:
head/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-10
head/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL-9
Modified:
head/databases/p5-Memcached-libmemcached/Makefile
Modified: head/databases/p5-Memcached-libmemcached/Makefile
==============================================================================
--- head/databases/p5-Memcached-libmemcached/Makefile Wed Jul 1 00:27:37 2015 (r391018)
+++ head/databases/p5-Memcached-libmemcached/Makefile Wed Jul 1 01:03:03 2015 (r391019)
@@ -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>
Added: head/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/p5-Memcached-libmemcached/files/extra-patch-Makefile.PL Wed Jul 1 01:03:03 2015 (r391019)
@@ -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 = "";
Added: head/databases/p5-Memcached-libmemcached/files/patch-Makefile.PL
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/databases/p5-Memcached-libmemcached/files/patch-Makefile.PL Wed Jul 1 01:03:03 2015 (r391019)
@@ -0,0 +1,22 @@
+--- Makefile.PL.orig 2015-05-07 17:56:22 UTC
++++ Makefile.PL
+@@ -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_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 at 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"
More information about the svn-ports-all
mailing list