diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2014-12-17 13:21:56 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2014-12-17 13:21:56 +0000 |
commit | 64835f0cdc52b538b4d0bca8a163eaa4b2c88377 (patch) | |
tree | 4202a3b2243a0e4544eabc8d5f6b2ecccb217330 /lang/perl5.16 | |
parent | - Strip binary (diff) |
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
Notes
Notes:
svn path=/head/; revision=374847
Diffstat (limited to 'lang/perl5.16')
-rw-r--r-- | lang/perl5.16/Makefile | 18 | ||||
-rw-r--r-- | lang/perl5.16/files/patch-Makefile.SH | 2 |
2 files changed, 15 insertions, 5 deletions
diff --git a/lang/perl5.16/Makefile b/lang/perl5.16/Makefile index ad5613230363..6187aaa81197 100644 --- a/lang/perl5.16/Makefile +++ b/lang/perl5.16/Makefile @@ -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 diff --git a/lang/perl5.16/files/patch-Makefile.SH b/lang/perl5.16/files/patch-Makefile.SH index ac3caed87c42..28685ca0c0ef 100644 --- a/lang/perl5.16/files/patch-Makefile.SH +++ b/lang/perl5.16/files/patch-Makefile.SH @@ -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) |