From owner-svn-ports-head@FreeBSD.ORG Wed Dec 17 13:22:01 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 464FBCA4; Wed, 17 Dec 2014 13:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F6B9BA9; Wed, 17 Dec 2014 13:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBHDM1jQ083964; Wed, 17 Dec 2014 13:22:01 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBHDLvL9083912; Wed, 17 Dec 2014 13:21:57 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201412171321.sBHDLvL9083912@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Wed, 17 Dec 2014 13:21:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r374847 - in head: . Mk/Scripts Mk/Uses lang/perl5.14 lang/perl5.14/files lang/perl5.16 lang/perl5.16/files lang/perl5.18 lang/perl5.18/files lang/perl5.20 lang/perl5.20/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 13:22:01 -0000 Author: mat Date: Wed Dec 17 13:21:56 2014 New Revision: 374847 URL: https://svnweb.freebsd.org/changeset/ports/374847 QAT: https://qat.redports.org/buildarchive/r374847/ Log: Make Perl link all .so it builds with libperl.so. It makes upgrading from one Perl major version to another way easier. For binary package users, it means pkg upgrade will detect the libperl.so.x.yy change, and reinstall the affected packages. For users using ports, it will save rebuild time as it's easier to detect what ports really need to be rebuilt. PR: 195821 Differential Revision: https://reviews.freebsd.org/D1241 Submitted by: mat Reviewed by: antoine, bdrewery Exp-run by: antoine With hat: perl Sponsored by: Absolight Modified: head/CHANGES head/Mk/Scripts/qa.sh head/Mk/Uses/perl5.mk head/UPDATING head/lang/perl5.14/Makefile head/lang/perl5.14/files/patch-Makefile.SH head/lang/perl5.16/Makefile head/lang/perl5.16/files/patch-Makefile.SH head/lang/perl5.18/Makefile head/lang/perl5.18/files/patch-Makefile.SH head/lang/perl5.20/Makefile head/lang/perl5.20/files/patch-Makefile.SH Modified: head/CHANGES ============================================================================== --- head/CHANGES Wed Dec 17 13:21:20 2014 (r374846) +++ head/CHANGES Wed Dec 17 13:21:56 2014 (r374847) @@ -10,6 +10,15 @@ in the release notes and/or placed into All ports committers are allowed to commit to this file. +20141217: + AFFECTS: users of lang/perl5.* + AUTHOR: mat@FreeBSD.org + + Perl now links libperl.so with all .so it builds. The stage-qa checks have + been extended to check that libperl.so is in fact linked with .so in + SITE_ARCH and errors out if none of the .so build by a port are linked with + it. It also checks that the rpath and runpath elf attributes are present. + 20141130: AUTHOR: tijl@FreeBSD.org Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Wed Dec 17 13:21:20 2014 (r374846) +++ head/Mk/Scripts/qa.sh Wed Dec 17 13:21:56 2014 (r374847) @@ -206,7 +206,56 @@ libtool() { fi } -checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool" +libperl() { + local has_some_libperl_so files found + if [ -n "${SITE_ARCH_REL}" ]; then + has_some_libperl_so=0 + files=0 + while read f; do + # No results presents a blank line from heredoc. + [ -z "${f}" ] && continue + files=$((files+1)) + found=`readelf -d $f | awk "BEGIN {libperl=1; rpath=10; runpath=100} + /NEEDED.*${LIBPERL}/ { libperl = 0 } + /RPATH.*perl.*CORE/ { rpath = 0 } + /RUNPATH.*perl.*CORE/ { runpath = 0 } + END {print libperl+rpath+runpath} + "` + # FIXME When 8.4 goes out of commission, replace the ;; + # with ;& in the case below. Also, change the logic on + # detecting if there was a file with libperl.so + if [ "$found" -ne "0" ]; then + case "$found" in + *1) + warn "${f} is not linked with ${LIBPERL}, not respecting lddlflags?" + ;; #;& + *1?) + has_some_libperl_so=1 + warn "${f} does not have a rpath to ${LIBPERL}, not respecting lddlflags?" + ;; #;& + 1??) + has_some_libperl_so=1 + warn "${f} does not have a runpath to ${LIBPERL}, not respecting lddlflags?" + ;; #;& + esac + else + has_some_libperl_so=1 + fi + # Use heredoc to avoid losing rc from find|while subshell + done <<-EOT + $(find ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} -name '*.so') + EOT + + if [ $files -gt 0 -a $has_some_libperl_so -eq 0 ]; then + err "None of the .so in ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL} are linked with ${LIBPERL}, see above for the full list." + return 1 + else + return 0 + fi + fi +} + +checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo suidfiles libtool libperl" ret=0 cd ${STAGEDIR} Modified: head/Mk/Uses/perl5.mk ============================================================================== --- head/Mk/Uses/perl5.mk Wed Dec 17 13:21:20 2014 (r374846) +++ head/Mk/Uses/perl5.mk Wed Dec 17 13:21:56 2014 (r374847) @@ -105,6 +105,8 @@ PERL5= ${LOCALBASE}/bin/perl${PERL_VERS PERL= ${LOCALBASE}/bin/perl CONFIGURE_ENV+= ac_cv_path_PERL=${PERL} ac_cv_path_PERL_PATH=${PERL} +QA_ENV+= SITE_ARCH_REL=${SITE_ARCH_REL} LIBPERL=libperl.so.${PERL_VER} + # Define the want perl first if defined .if ${USE_PERL5:M5*} want_perl_sign= ${USE_PERL5:M5*:C|^[0-9.]+||} @@ -236,15 +238,15 @@ MAN3PREFIX?= ${SITE_PERL} .if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ - cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ - ${SCRIPTDIR}/configure; \ + cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ + ${SCRIPTDIR}/configure; \ fi @cd ${CONFIGURE_WRKSRC} && \ - ${SETENV} ${CONFIGURE_ENV} \ - ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} + ${SETENV} ${CONFIGURE_ENV} \ + ${PERL5} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} .if !${_USE_PERL5:Mmodbuild*} @cd ${CONFIGURE_WRKSRC} && \ - ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile + ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile .endif # ! modbuild .endif # !target(do-configure) .endif # configure Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Dec 17 13:21:20 2014 (r374846) +++ head/UPDATING Wed Dec 17 13:21:56 2014 (r374847) @@ -5,6 +5,27 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20141217: + AFFECTS: users of lang/perl5.* + AUTHOR: mat@FreeBSD.org + + Perl now links all .so it builds with libperl.so, it makes upgrading from one + Perl major version to another way easier. For binary package users, it means + pkg upgrade will detect the libperl.so.x.yy change, and reinstall the + affected packages. For users using ports, it will save rebuild time as it's + easier to detect what ports really need to be rebuilt. + + Ports users are encouraged to rebuild ports that install files in SITE_ARCH. + If using Perl 5.18, run: + + With portupgrade: + + portupgrade `find /usr/local/lib/perl5/site_perl/mach/5.18 -name '*.so'|xargs pkg which -qo|sort -u` + + With portmaster: + + portupgrade `find /usr/local/lib/perl5/site_perl/mach/5.18 -name '*.so'|xargs pkg which -qo|sort -u` + 20141216: AFFECTS: users of security/openssh-portable AUTHOR: bdrewery@FreeBSD.org Modified: head/lang/perl5.14/Makefile ============================================================================== --- head/lang/perl5.14/Makefile Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.14/Makefile Wed Dec 17 13:21:56 2014 (r374847) @@ -3,7 +3,7 @@ PORTNAME= perl PORTVERSION= ${PERL_VERSION} -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= ../../src @@ -56,7 +56,7 @@ USES= tar:bzip2 cpe HAS_CONFIGURE= yes CONFIGURE_SCRIPT=Configure CONFIGURE_ARGS= -sde -Dprefix=${PREFIX} \ - -Dlibperl=libperl.so.${PERL_VER} \ + -Dlibperl=libperl.so.${PERL_VERSION} \ -Darchlib=${PREFIX}/${_ARCH_LIB} \ -Dprivlib=${PREFIX}/${_PRIV_LIB} \ -Dman3dir=${PREFIX}/${MAN3PREFIX_REL}/man/man3 \ @@ -195,9 +195,19 @@ LINK_USRBIN= no .endif SUB_LIST+= LINK_USRBIN=${LINK_USRBIN} +# Put a symlink to the future libperl.so.x.yy so that -lperl works. +post-extract: + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so.${PERL_VER} + post-patch: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Configure ${WRKSRC}/hints/freebsd.sh + # Keep the following two sync'ed + ${REINPLACE_CMD} -e 's|lddlflags="-shared "|lddlflags="-shared -L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl "|' \ + ${WRKSRC}/hints/freebsd.sh + ${REINPLACE_CMD} -e 's|%%HOLDER%%|:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl|' \ + ${WRKSRC}/Makefile.SH .if ${PORT_OPTIONS:MPTHREAD} ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g;' \ -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g;' \ @@ -213,8 +223,8 @@ post-install: ${MKDIR} ${STAGEDIR}${SITE_ARCH}/auto ${MKDIR} ${STAGEDIR}${SITE_PERL}/auto ${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5 - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VERSION} + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VER} ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc ${FIND} ${STAGEDIR} -name '*.bs' -size 0 -delete Modified: head/lang/perl5.14/files/patch-Makefile.SH ============================================================================== --- head/lang/perl5.14/files/patch-Makefile.SH Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.14/files/patch-Makefile.SH Wed Dec 17 13:21:56 2014 (r374847) @@ -5,7 +5,7 @@ $spitshell >>$Makefile <<'!NO!SUBS!' rm -f $@ - $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) -+ $(LD) -o $@ $(SHRPLDFLAGS) -Wl,-soname,$(LIBPERL) $(obj) $(DYNALOADER) $(libs) ++ $(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs) !NO!SUBS! case "$osname" in aix) Modified: head/lang/perl5.16/Makefile ============================================================================== --- head/lang/perl5.16/Makefile Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.16/Makefile Wed Dec 17 13:21:56 2014 (r374847) @@ -3,7 +3,7 @@ PORTNAME= perl PORTVERSION= ${PERL_VERSION} -PORTREVISION= 17 +PORTREVISION= 18 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= ../../src @@ -56,7 +56,7 @@ USES= tar:bzip2 cpe HAS_CONFIGURE= yes CONFIGURE_SCRIPT=Configure CONFIGURE_ARGS= -sde -Dprefix=${PREFIX} \ - -Dlibperl=libperl.so.${PERL_VER} \ + -Dlibperl=libperl.so.${PERL_VERSION} \ -Darchlib=${PREFIX}/${_ARCH_LIB} \ -Dprivlib=${PREFIX}/${_PRIV_LIB} \ -Dman3dir=${PREFIX}/${MAN3PREFIX_REL}/man/man3 \ @@ -195,9 +195,19 @@ LINK_USRBIN= no .endif SUB_LIST+= LINK_USRBIN=${LINK_USRBIN} +# Put a symlink to the future libperl.so.x.yy so that -lperl works. +post-extract: + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so.${PERL_VER} + post-patch: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Configure ${WRKSRC}/hints/freebsd.sh + # Keep the following two sync'ed + ${REINPLACE_CMD} -e 's|lddlflags="-shared "|lddlflags="-shared -L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl "|' \ + ${WRKSRC}/hints/freebsd.sh + ${REINPLACE_CMD} -e 's|%%HOLDER%%|:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl|' \ + ${WRKSRC}/Makefile.SH .if ${PORT_OPTIONS:MPTHREAD} ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g;' \ -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g;' \ @@ -213,8 +223,8 @@ post-install: ${MKDIR} ${STAGEDIR}${SITE_ARCH}/auto ${MKDIR} ${STAGEDIR}${SITE_PERL}/auto ${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5 - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VERSION} + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VER} ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc ${FIND} ${STAGEDIR} -name '*.bs' -size 0 -delete Modified: head/lang/perl5.16/files/patch-Makefile.SH ============================================================================== --- head/lang/perl5.16/files/patch-Makefile.SH Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.16/files/patch-Makefile.SH Wed Dec 17 13:21:56 2014 (r374847) @@ -5,7 +5,7 @@ $spitshell >>$Makefile <<'!NO!SUBS!' rm -f $@ - $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) -+ $(LD) -o $@ $(SHRPLDFLAGS) -Wl,-soname,$(LIBPERL) $(obj) $(DYNALOADER) $(libs) ++ $(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs) !NO!SUBS! case "$osname" in aix) Modified: head/lang/perl5.18/Makefile ============================================================================== --- head/lang/perl5.18/Makefile Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.18/Makefile Wed Dec 17 13:21:56 2014 (r374847) @@ -3,7 +3,7 @@ PORTNAME= perl PORTVERSION= ${PERL_VERSION} -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= ../../src @@ -73,7 +73,7 @@ USES= tar:bzip2 cpe HAS_CONFIGURE= yes CONFIGURE_SCRIPT=Configure CONFIGURE_ARGS= -sde -Dprefix=${PREFIX} \ - -Dlibperl=libperl.so.${PERL_VER} \ + -Dlibperl=libperl.so.${PERL_VERSION} \ -Darchlib=${PREFIX}/${_ARCH_LIB} \ -Dprivlib=${PREFIX}/${_PRIV_LIB} \ -Dman3dir=${PREFIX}/${MAN3PREFIX_REL}/man/man3 \ @@ -173,9 +173,19 @@ LINK_USRBIN= no .endif SUB_LIST+= LINK_USRBIN=${LINK_USRBIN} +# Put a symlink to the future libperl.so.x.yy so that -lperl works. +post-extract: + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so.${PERL_VER} + post-patch: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Configure ${WRKSRC}/hints/freebsd.sh + # Keep the following two sync'ed + ${REINPLACE_CMD} -e 's|lddlflags="-shared "|lddlflags="-shared -L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl "|' \ + ${WRKSRC}/hints/freebsd.sh + ${REINPLACE_CMD} -e 's|%%HOLDER%%|:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl|' \ + ${WRKSRC}/Makefile.SH .if ${PORT_OPTIONS:MPTHREAD} ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g;' \ -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g;' \ @@ -191,8 +201,8 @@ post-install: ${MKDIR} ${STAGEDIR}${SITE_ARCH}/auto ${MKDIR} ${STAGEDIR}${SITE_PERL}/auto ${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5 - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VERSION} + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VER} ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc ${FIND} ${STAGEDIR} -name '*.bs' -size 0 -delete Modified: head/lang/perl5.18/files/patch-Makefile.SH ============================================================================== --- head/lang/perl5.18/files/patch-Makefile.SH Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.18/files/patch-Makefile.SH Wed Dec 17 13:21:56 2014 (r374847) @@ -1,11 +1,11 @@ --- Makefile.SH.orig 2014-10-01 15:23:34 UTC +++ Makefile.SH -@@ -805,7 +808,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI +@@ -805,7 +805,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI true) $spitshell >>$Makefile <<'!NO!SUBS!' rm -f $@ - $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) -+ $(LD) -o $@ $(SHRPLDFLAGS) -Wl,-soname,$(LIBPERL) $(obj) $(DYNALOADER) $(libs) ++ $(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs) !NO!SUBS! case "$osname" in aix) Modified: head/lang/perl5.20/Makefile ============================================================================== --- head/lang/perl5.20/Makefile Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.20/Makefile Wed Dec 17 13:21:56 2014 (r374847) @@ -3,7 +3,7 @@ PORTNAME= perl PORTVERSION= ${PERL_VERSION} -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= lang devel perl5 MASTER_SITES= CPAN MASTER_SITE_SUBDIR= ../../src @@ -74,7 +74,7 @@ USES= tar:bzip2 cpe HAS_CONFIGURE= yes CONFIGURE_SCRIPT=Configure CONFIGURE_ARGS= -sde -Dprefix=${PREFIX} \ - -Dlibperl=libperl.so.${PERL_VER} \ + -Dlibperl=libperl.so.${PERL_VERSION} \ -Darchlib=${PREFIX}/${_ARCH_LIB} \ -Dprivlib=${PREFIX}/${_PRIV_LIB} \ -Dman3dir=${PREFIX}/${MAN3PREFIX_REL}/man/man3 \ @@ -170,9 +170,19 @@ PLIST_SUB+= MANCONF="@comment " WITH_PTHREAD= yes .endif +# Put a symlink to the future libperl.so.x.yy so that -lperl works. +post-extract: + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so + ${LN} -s libperl.so.${PERL_VERSION} ${WRKSRC}/libperl.so.${PERL_VER} + post-patch: ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Configure ${WRKSRC}/hints/freebsd.sh + # Keep the following two sync'ed + ${REINPLACE_CMD} -e 's|lddlflags="-shared "|lddlflags="-shared -L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl "|' \ + ${WRKSRC}/hints/freebsd.sh + ${REINPLACE_CMD} -e 's|%%HOLDER%%|:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl|' \ + ${WRKSRC}/Makefile.SH .if ${PORT_OPTIONS:MPTHREAD} ${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g;' \ -e 's|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|g;' \ @@ -188,8 +198,8 @@ post-install: ${MKDIR} ${STAGEDIR}${SITE_ARCH}/auto ${MKDIR} ${STAGEDIR}${SITE_PERL}/auto ${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5 - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so - ${LN} -s libperl.so.${PERL_VER} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VERSION} + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so + ${LN} -sf libperl.so.${PERL_VERSION} ${STAGEDIR}${PREFIX}/${_ARCH_LIB}/CORE/libperl.so.${PERL_VER} ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc ${MKDIR} ${STAGEDIR}${SITE_ARCH}/machine Modified: head/lang/perl5.20/files/patch-Makefile.SH ============================================================================== --- head/lang/perl5.20/files/patch-Makefile.SH Wed Dec 17 13:21:20 2014 (r374846) +++ head/lang/perl5.20/files/patch-Makefile.SH Wed Dec 17 13:21:56 2014 (r374847) @@ -5,7 +5,7 @@ $spitshell >>$Makefile <<'!NO!SUBS!' rm -f $@ - $(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs) -+ $(LD) -o $@ $(SHRPLDFLAGS) -Wl,-soname,$(LIBPERL) $(obj) $(DYNALOADER) $(libs) ++ $(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs) !NO!SUBS! case "$osname" in aix)