Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Dec 2014 17:14:12 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r375473 - in head/lang: perl5.14 perl5.14/files perl5.16 perl5.16/files perl5.18 perl5.18/files perl5.20 perl5.20/files
Message-ID:  <201412241714.sBOHECpI039778@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Wed Dec 24 17:14:11 2014
New Revision: 375473
URL: https://svnweb.freebsd.org/changeset/ports/375473
QAT: https://qat.redports.org/buildarchive/r375473/

Log:
  Use a less kludgy way for handling libperl.so's versionning and linking.
  
  Sponsored by:	Absolight

Modified:
  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/lang/perl5.14/Makefile
==============================================================================
--- head/lang/perl5.14/Makefile	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.14/Makefile	Wed Dec 24 17:14:11 2014	(r375473)
@@ -68,6 +68,12 @@ CONFIGURE_ARGS=	-sde -Dprefix=${PREFIX} 
 	-Dotherlibdirs=${PREFIX}/lib/perl5/site_perl/${PERL_VER}:${PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH} \
 	-Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dusenm=n \
 	-Dcc="${CC}" -Duseshrplib -Dinc_version_list=none
+# Keep the following two in sync.
+# lddlflags is used for all .so linking
+# shrpldflags is used for libperl.so, so remove all the extra bits inherited from lddlflags.
+CONFIGURE_ARGS+= \
+	-Alddlflags='-L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl' \
+	-Dshrpldflags='$$(LDDLFLAGS:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl) -Wl,-soname,$$(LIBPERL:R)'
 LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
 		LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
 		LC_TIME=""
@@ -203,11 +209,6 @@ post-extract:
 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;' \

Modified: head/lang/perl5.14/files/patch-Makefile.SH
==============================================================================
--- head/lang/perl5.14/files/patch-Makefile.SH	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.14/files/patch-Makefile.SH	Wed Dec 24 17:14:11 2014	(r375473)
@@ -1,11 +1,10 @@
 --- Makefile.SH.orig	2012-12-19 12:25:23 UTC
 +++ Makefile.SH
-@@ -762,7 +762,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
- 	true)
- 		$spitshell >>$Makefile <<'!NO!SUBS!'
- 	rm -f $@
--	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
-+	$(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs)
- !NO!SUBS!
- 		case "$osname" in
- 		aix)
+@@ -28,7 +28,6 @@ esac
+ 
+ linklibperl='$(LIBPERL)'
+ linklibperl_nonshr=''
+-shrpldflags='$(LDDLFLAGS)'
+ ldlibpth=''
+ DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
+ DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL'

Modified: head/lang/perl5.16/Makefile
==============================================================================
--- head/lang/perl5.16/Makefile	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.16/Makefile	Wed Dec 24 17:14:11 2014	(r375473)
@@ -68,6 +68,12 @@ CONFIGURE_ARGS=	-sde -Dprefix=${PREFIX} 
 	-Dotherlibdirs=${PREFIX}/lib/perl5/site_perl/${PERL_VER}:${PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH} \
 	-Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dusenm=n \
 	-Dcc="${CC}" -Duseshrplib -Dinc_version_list=none
+# Keep the following two in sync.
+# lddlflags is used for all .so linking
+# shrpldflags is used for libperl.so, so remove all the extra bits inherited from lddlflags.
+CONFIGURE_ARGS+= \
+	-Alddlflags='-L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl' \
+	-Dshrpldflags='$$(LDDLFLAGS:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl) -Wl,-soname,$$(LIBPERL:R)'
 LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
 		LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
 		LC_TIME=""
@@ -203,11 +209,6 @@ post-extract:
 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;' \

Modified: head/lang/perl5.16/files/patch-Makefile.SH
==============================================================================
--- head/lang/perl5.16/files/patch-Makefile.SH	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.16/files/patch-Makefile.SH	Wed Dec 24 17:14:11 2014	(r375473)
@@ -1,11 +1,10 @@
 --- Makefile.SH.orig	2013-03-04 15:16:21 UTC
 +++ Makefile.SH
-@@ -795,7 +795,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
- 	true)
- 		$spitshell >>$Makefile <<'!NO!SUBS!'
- 	rm -f $@
--	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
-+	$(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs)
- !NO!SUBS!
- 		case "$osname" in
- 		aix)
+@@ -28,7 +28,6 @@ esac
+ 
+ linklibperl='$(LIBPERL)'
+ linklibperl_nonshr=''
+-shrpldflags='$(LDDLFLAGS)'
+ ldlibpth=''
+ DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
+ DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL'

Modified: head/lang/perl5.18/Makefile
==============================================================================
--- head/lang/perl5.18/Makefile	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.18/Makefile	Wed Dec 24 17:14:11 2014	(r375473)
@@ -85,6 +85,12 @@ CONFIGURE_ARGS=	-sde -Dprefix=${PREFIX} 
 	-Dotherlibdirs=${PREFIX}/lib/perl5/site_perl/${PERL_VER}:${PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH} \
 	-Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dusenm=n \
 	-Dcc="${CC}" -Duseshrplib -Dinc_version_list=none
+# Keep the following two in sync.
+# lddlflags is used for all .so linking
+# shrpldflags is used for libperl.so, so remove all the extra bits inherited from lddlflags.
+CONFIGURE_ARGS+= \
+	-Alddlflags='-L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl' \
+	-Dshrpldflags='$$(LDDLFLAGS:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl) -Wl,-soname,$$(LIBPERL:R)'
 LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
 		LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
 		LC_TIME=""
@@ -181,11 +187,6 @@ post-extract:
 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;' \

Modified: head/lang/perl5.18/files/patch-Makefile.SH
==============================================================================
--- head/lang/perl5.18/files/patch-Makefile.SH	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.18/files/patch-Makefile.SH	Wed Dec 24 17:14:11 2014	(r375473)
@@ -1,11 +1,10 @@
 --- Makefile.SH.orig	2014-10-01 15:23:34 UTC
 +++ Makefile.SH
-@@ -805,7 +805,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
- 	true)
- 		$spitshell >>$Makefile <<'!NO!SUBS!'
- 	rm -f $@
--	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
-+	$(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs)
- !NO!SUBS!
- 		case "$osname" in
- 		aix)
+@@ -40,7 +40,6 @@ esac
+ pwd="`pwd`"
+ linklibperl='$(LIBPERL)'
+ linklibperl_nonshr=''
+-shrpldflags='$(LDDLFLAGS)'
+ ldlibpth=''
+ DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
+ DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL'

Modified: head/lang/perl5.20/Makefile
==============================================================================
--- head/lang/perl5.20/Makefile	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.20/Makefile	Wed Dec 24 17:14:11 2014	(r375473)
@@ -85,6 +85,12 @@ CONFIGURE_ARGS=	-sde -Dprefix=${PREFIX} 
 	-Dsiteman1dir=${PREFIX}/man/man1 \
 	-Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dusenm=n \
 	-Dcc="${CC}" -Duseshrplib -Dinc_version_list=none
+# Keep the following two in sync.
+# lddlflags is used for all .so linking
+# shrpldflags is used for libperl.so, so remove all the extra bits inherited from lddlflags.
+CONFIGURE_ARGS+= \
+	-Alddlflags='-L${WRKSRC} -L${PREFIX}/${_ARCH_LIB}/CORE -Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE -lperl' \
+	-Dshrpldflags='$$(LDDLFLAGS:N-L${WRKSRC}:N-L${PREFIX}/${_ARCH_LIB}/CORE:N-Wl,-rpath=${PREFIX}/${_ARCH_LIB}/CORE:N-lperl) -Wl,-soname,$$(LIBPERL:R)'
 # When upgrading to 5.22+ remove this.
 CONFIGURE_ARGS+= \
 	-Dotherlibdirs=${PREFIX}/lib/perl5/site_perl/${PERL_VER}:${PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}
@@ -178,11 +184,6 @@ post-extract:
 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;' \

Modified: head/lang/perl5.20/files/patch-Makefile.SH
==============================================================================
--- head/lang/perl5.20/files/patch-Makefile.SH	Wed Dec 24 17:04:10 2014	(r375472)
+++ head/lang/perl5.20/files/patch-Makefile.SH	Wed Dec 24 17:14:11 2014	(r375473)
@@ -1,11 +1,10 @@
 --- Makefile.SH.orig	2014-09-14 11:30:59 UTC
 +++ Makefile.SH
-@@ -838,7 +838,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
- 	true)
- 		$spitshell >>$Makefile <<'!NO!SUBS!'
- 	rm -f $@
--	$(LD) -o $@ $(SHRPLDFLAGS) $(obj) $(DYNALOADER) $(libs)
-+	$(LD) -o $@ $(SHRPLDFLAGS%%HOLDER%%) -Wl,-soname,$(LIBPERL:R) $(obj) $(DYNALOADER) $(libs)
- !NO!SUBS!
- 		case "$osname" in
- 		aix)
+@@ -31,7 +31,6 @@ esac
+ pwd="`pwd`"
+ linklibperl='$(LIBPERL)'
+ linklibperl_nonshr=''
+-shrpldflags='$(LDDLFLAGS)'
+ ldlibpth=''
+ DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
+ DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412241714.sBOHECpI039778>