pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc Fix Darwin build (by linking with libperl to ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e1c2fb5bc5ce
branches:  trunk
changeset: 378101:e1c2fb5bc5ce
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Sat Mar 31 06:05:40 2018 +0000

description:
Fix Darwin build (by linking with libperl to resolve needed symbols) and
run (by installing as a .bundle where Perl can load it). Still works on
NetBSD. Bump PKGREVISION.

diffstat:

 textproc/highlight/distinfo                             |   4 +-
 textproc/highlight/patches/patch-examples_swig_makefile |   4 +-
 textproc/p5-highlight/Makefile                          |  22 +++++++++++++---
 textproc/p5-highlight/PLIST                             |   4 +-
 4 files changed, 24 insertions(+), 10 deletions(-)

diffs (81 lines):

diff -r e5158913001b -r e1c2fb5bc5ce textproc/highlight/distinfo
--- a/textproc/highlight/distinfo       Sat Mar 31 04:30:33 2018 +0000
+++ b/textproc/highlight/distinfo       Sat Mar 31 06:05:40 2018 +0000
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.9 2017/11/30 15:13:19 wiz Exp $
+$NetBSD: distinfo,v 1.10 2018/03/31 06:05:40 schmonz Exp $
 
 SHA1 (highlight-3.18.tar.bz2) = 985d0a3c707e3251fe50ffff66e11a8563777202
 RMD160 (highlight-3.18.tar.bz2) = 960b2a9ed6071b0f48ef45da2d006f5f00d9b578
 SHA512 (highlight-3.18.tar.bz2) = 1f939e117209e96d021216addc281ca7f265822f053f577ed7cb11b8ac9a1762bf84f8e1f9f5e67277004573b98e4b8732f48549aa674fe6801bfc1c0627b930
 Size (highlight-3.18.tar.bz2) = 619669 bytes
-SHA1 (patch-examples_swig_makefile) = fb10a544d5807b1dbf67d028852d5c5cbf0f9bde
+SHA1 (patch-examples_swig_makefile) = f46b559e8bb6c03a8af2a209b3ce79a4144d4044
 SHA1 (patch-makefile) = 1cf4c6225b36e822a40ec10917384367914ecb0f
 SHA1 (patch-src_makefile) = 592b8a2934d7e4c7f3c5a241737f4d09215932a4
diff -r e5158913001b -r e1c2fb5bc5ce textproc/highlight/patches/patch-examples_swig_makefile
--- a/textproc/highlight/patches/patch-examples_swig_makefile   Sat Mar 31 04:30:33 2018 +0000
+++ b/textproc/highlight/patches/patch-examples_swig_makefile   Sat Mar 31 06:05:40 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-examples_swig_makefile,v 1.2 2017/11/30 15:13:19 wiz Exp $
+$NetBSD: patch-examples_swig_makefile,v 1.3 2018/03/31 06:05:40 schmonz Exp $
 
 Use pkgsrc-specified compiler and flags.
 
@@ -27,7 +27,7 @@
 -      ${CXX} ${CFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PERL_INC} -I${HL_INC} 
 -      ${CXX} -shared -s highlight_wrap.o  -L${HL_SRC} -lhighlight ${LUA_LIBS} -o highlight.so
 +      ${CXX} ${CFLAGS} ${LDFLAGS} -c highlight_wrap.cpp ${LUA_CFLAGS} ${PERL_INC} -I${HL_INC} 
-+      ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -s highlight_wrap.o  -L${HL_SRC} -lhighlight ${LUA_LIBS} -o highlight.so
++      ${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -s highlight_wrap.o  -L${HL_SRC} -lhighlight ${LUA_LIBS} -lperl -o highlight.so
  
  php: lib-stamp
        swig -c++ -php -o highlight_wrap.cpp highlight.i
diff -r e5158913001b -r e1c2fb5bc5ce textproc/p5-highlight/Makefile
--- a/textproc/p5-highlight/Makefile    Sat Mar 31 04:30:33 2018 +0000
+++ b/textproc/p5-highlight/Makefile    Sat Mar 31 06:05:40 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.5 2017/06/05 14:25:00 ryoon Exp $
+# $NetBSD: Makefile,v 1.6 2018/03/31 06:05:40 schmonz Exp $
 
-PKGREVISION= 3
+PKGREVISION=           4
 .include "../../textproc/highlight/Makefile.common"
 
 PKGNAME=               p5-highlight-${VERSION}
@@ -17,10 +17,24 @@
 
 INSTALLATION_DIRS=     ${PERL5_SUB_INSTALLVENDORARCH}/auto/highlight
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Darwin"
+PERL_DLEXT=            bundle
+SUBST_CLASSES+=                load
+SUBST_STAGE.load=      pre-configure
+SUBST_FILES.load=      examples/swig/makefile
+SUBST_SED.load=                -e 's|-shared -s highlight_wrap\.o|-bundle -s highlight_wrap.o|g'
+.else
+PERL_DLEXT=            so
+.endif
+PLIST_SUBST+=          PERL_DLEXT=${PERL_DLEXT}
+
 do-install:
        cd ${WRKSRC}/examples/swig && \
        ${INSTALL_DATA} highlight.pm ${DESTDIR}${PREFIX}/${PERL5_SUB_INSTALLVENDORARCH}/ && \
-       ${INSTALL_DATA} highlight.so ${DESTDIR}${PREFIX}/${PERL5_SUB_INSTALLVENDORARCH}/auto/highlight/
+       ${INSTALL_LIB} highlight.so ${DESTDIR}${PREFIX}/${PERL5_SUB_INSTALLVENDORARCH}/auto/highlight/highlight.${PERL_DLEXT}
 
-.include "../../lang/perl5/buildlink3.mk"
+PERL5_LDFLAGS=         -L${PERL5_INSTALLARCHLIB}/CORE
+.include "../../lang/perl5/module.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r e5158913001b -r e1c2fb5bc5ce textproc/p5-highlight/PLIST
--- a/textproc/p5-highlight/PLIST       Sat Mar 31 04:30:33 2018 +0000
+++ b/textproc/p5-highlight/PLIST       Sat Mar 31 06:05:40 2018 +0000
@@ -1,3 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1 2014/08/18 01:26:58 schmonz Exp $
-${PERL5_SUB_INSTALLVENDORARCH}/auto/highlight/highlight.so
+@comment $NetBSD: PLIST,v 1.2 2018/03/31 06:05:40 schmonz Exp $
+${PERL5_SUB_INSTALLVENDORARCH}/auto/highlight/highlight.${PERL_DLEXT}
 ${PERL5_SUB_INSTALLVENDORARCH}/highlight.pm



Home | Main Index | Thread Index | Old Index