Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Feb 2014 13:46:07 +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: r343921 - in head/lang: perl5.14 perl5.14/files perl5.16 perl5.16/files perl5.18 perl5.18/files
Message-ID:  <201402121346.s1CDk78R009879@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Wed Feb 12 13:46:07 2014
New Revision: 343921
URL: http://svnweb.freebsd.org/changeset/ports/343921
QAT: https://qat.redports.org/buildarchive/r343921/

Log:
  Massive cleanup of the Perl ports:
  
  - Use SUB_FILES instead of own backed version
  - Have etc/perl5_version in the package instead of generating a static
    one at install
  - Move some mkdirs from pkg-install to pkg-plist
  - Move the bin/perl5 creation from plist to post-install
  
  Reviewed by:	az
  Sponsored by:	Absolight

Added:
  head/lang/perl5.14/files/perl-man.conf.in
     - copied unchanged from r343920, head/lang/perl5.14/files/perl-man.conf
  head/lang/perl5.14/files/perl5_version.in   (contents, props changed)
  head/lang/perl5.14/files/use.perl.in
     - copied, changed from r343736, head/lang/perl5.14/files/use.perl
  head/lang/perl5.16/files/perl-man.conf.in
     - copied unchanged from r343916, head/lang/perl5.16/files/perl-man.conf
  head/lang/perl5.16/files/perl5_version.in   (contents, props changed)
  head/lang/perl5.16/files/use.perl.in
     - copied, changed from r343736, head/lang/perl5.16/files/use.perl
  head/lang/perl5.18/files/perl-man.conf.in
     - copied unchanged from r343916, head/lang/perl5.18/files/perl-man.conf
  head/lang/perl5.18/files/perl5_version.in   (contents, props changed)
  head/lang/perl5.18/files/use.perl.in
     - copied, changed from r343736, head/lang/perl5.18/files/use.perl
Deleted:
  head/lang/perl5.14/files/perl-man.conf
  head/lang/perl5.14/files/use.perl
  head/lang/perl5.16/files/perl-man.conf
  head/lang/perl5.16/files/use.perl
  head/lang/perl5.18/files/perl-man.conf
  head/lang/perl5.18/files/use.perl
Modified:
  head/lang/perl5.14/Makefile
  head/lang/perl5.14/pkg-plist
  head/lang/perl5.16/Makefile
  head/lang/perl5.16/pkg-plist
  head/lang/perl5.18/Makefile
  head/lang/perl5.18/pkg-plist

Modified: head/lang/perl5.14/Makefile
==============================================================================
--- head/lang/perl5.14/Makefile	Wed Feb 12 13:40:02 2014	(r343920)
+++ head/lang/perl5.14/Makefile	Wed Feb 12 13:46:07 2014	(r343921)
@@ -3,7 +3,7 @@
 
 PORTNAME=	perl
 PORTVERSION=	${PERL_VERSION}
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	lang devel perl5
 MASTER_SITES=	CPAN \
 		${MASTER_SITE_LOCAL:S/$/:local/} \
@@ -64,6 +64,15 @@ LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COL
 CONFIGURE_ENV+=	${LOCALE_CLEANUP} UNAME_v="$$(uname -v | sed 'y/=/ /')"
 MAKE_ENV+=	${LOCALE_CLEANUP}
 
+SUB_LIST+=	PERL_VERSION=${PERL_VERSION} \
+		PERL_VER=${PERL_VER} \
+		PERL_ARCH=${PERL_ARCH}
+
+SUB_FILES=	perl5_version use.perl perl-man.conf
+
+PKGINSTALL=	${WRKDIR}/use.perl
+PKGDEINSTALL=	${WRKDIR}/use.perl
+
 .include <bsd.port.pre.mk>
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 
@@ -161,6 +170,7 @@ LINK_USRBIN=	yes
 .else
 LINK_USRBIN=	no
 .endif
+SUB_LIST+=	LINK_USRBIN=${LINK_USRBIN}
 
 BSDPAN_DEST=	${PREFIX}/lib/perl5/${PERL_VER}/BSDPAN
 BSDPAN_FILES=	BSDPAN.pm BSDPAN/Override.pm Config.pm \
@@ -170,24 +180,7 @@ BSDPAN_FILES=	BSDPAN.pm BSDPAN/Override.
 BSDPAN_VERSION=	20111107
 BSDPAN_WRKSRC=	${WRKDIR}/BSDPAN-${BSDPAN_VERSION}
 
-PKGINSTALL=	${WRKDIR}/pkg-install
-PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
-
 post-patch:
-	${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
-		-e 's|%%PERL_VERSION%%|${PERL_VERSION}|g;' \
-		-e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-		-e 's|%%PERL_ARCH%%|${PERL_ARCH}|g;' \
-		-e 's|%%PERL5_SIGNATURE%%|${LOCALBASE}/etc/perl5_version|g;' \
-		-e 's|%%LINK_USRBIN%%|${LINK_USRBIN}|g;' \
-		${FILESDIR}/use.perl \
-		> ${WRKDIR}/use.perl
-	${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
-		-e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-		${FILESDIR}/perl-man.conf \
-		> ${WRKDIR}/perl-man.conf
-	${CP} ${WRKDIR}/use.perl ${PKGINSTALL}
-	${CP} ${WRKDIR}/use.perl ${PKGDEINSTALL}
 	${SED} -i '' -e 's|%%PERL_PKGNAME%%|${PKGNAME}|g; s|%%PERL_VER%%|${PERL_VER}|g;' \
 		-e 's!%%BSDPAN_VERSION%%!${BSDPAN_VERSION}!g;' \
 		${BSDPAN_WRKSRC}/ExtUtils/*.pm
@@ -209,12 +202,14 @@ post-install:
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/machine
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/sys
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/auto
+	@${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION}
+	${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc
 .if ${OSVERSION} >= 900022
-	@${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PERL_VER}.conf
+	${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PERL_VER}.conf
 .endif
 .for files in ${BSDPAN_FILES}
-	${MKDIR} ${STAGEDIR}${BSDPAN_DEST}/${files:H}
+	@${MKDIR} ${STAGEDIR}${BSDPAN_DEST}/${files:H}
 	${INSTALL_DATA} \
 		${BSDPAN_WRKSRC}/${files} ${STAGEDIR}${BSDPAN_DEST}/${files}
 .endfor

Copied: head/lang/perl5.14/files/perl-man.conf.in (from r343920, head/lang/perl5.14/files/perl-man.conf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.14/files/perl-man.conf.in	Wed Feb 12 13:46:07 2014	(r343921, copy of r343920, head/lang/perl5.14/files/perl-man.conf)
@@ -0,0 +1,2 @@
+MANPATH %%PREFIX%%/lib/perl5/%%PERL_VER%%/man
+MANPATH %%PREFIX%%/lib/perl5/%%PERL_VER%%/perl/man

Added: head/lang/perl5.14/files/perl5_version.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.14/files/perl5_version.in	Wed Feb 12 13:46:07 2014	(r343921)
@@ -0,0 +1,2 @@
+# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%%
+PERL_VERSION=%%PERL_VERSION%%

Copied and modified: head/lang/perl5.14/files/use.perl.in (from r343736, head/lang/perl5.14/files/use.perl)
==============================================================================
--- head/lang/perl5.14/files/use.perl	Tue Feb 11 12:28:44 2014	(r343736, copy source)
+++ head/lang/perl5.14/files/use.perl.in	Wed Feb 12 13:46:07 2014	(r343921)
@@ -4,10 +4,8 @@
 
 LINK_USRBIN="%%LINK_USRBIN%%"
 : ${OSVERSION:=`/sbin/sysctl -n kern.osreldate`};
-PERL_ARCH="%%PERL_ARCH%%"
 PERL_VERSION="%%PERL_VERSION%%"
 PERL_VER="%%PERL_VER%%"
-PERL5_SIGNATURE="%%PERL5_SIGNATURE%%"
 banner="# added by use.perl $(/bin/date +'%F %T')"
 special_link_list="perl perl5"
 
@@ -44,20 +42,6 @@ do_create_links()
 	done
 }
 
-do_post_install()
-{
-	INCLUDEDIR=/usr/include
-	install -d ${PKG_PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/auto
-	install -d ${PKG_PREFIX}/lib/perl5/site_perl/${PERL_VER}/auto
-	install -d ${PKG_PREFIX}/lib/perl5/${PERL_VER}/man/man3
-	cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h >/dev/null
-}
-
-do_remove_perl5_signature()
-{
-	[ -f "${PERL5_SIGNATURE}" ] && /bin/rm "${PERL5_SIGNATURE}"
-}
-
 do_cleanup_manpath()
 {
 	if [ -f /etc/manpath.config ] ; then
@@ -73,13 +57,6 @@ do_cleanup_manpath()
 	fi
 }
 
-do_create_perl5_signature()
-{
-	echo "${banner}" >>"${PERL5_SIGNATURE}"
-	echo "# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=${PERL_VER}" >>"${PERL5_SIGNATURE}"
-	echo "PERL_VERSION=${PERL_VERSION}" >>"${PERL5_SIGNATURE}"
-}
-
 do_spam_manpath()
 {
 	if [ -f /etc/manpath.config ] ; then
@@ -89,11 +66,7 @@ do_spam_manpath()
 	fi
 }
 
-
 if [ "$2" = "POST-INSTALL" ] ; then
-	do_remove_perl5_signature
-	do_create_perl5_signature
-	do_post_install
 	if [ ${LINK_USRBIN} = yes ] ; then
 		do_remove_links
 		do_create_links
@@ -103,7 +76,6 @@ if [ "$2" = "POST-INSTALL" ] ; then
 		do_spam_manpath
 	fi
 elif [ "$2" = "POST-DEINSTALL" ] ; then
-	do_remove_perl5_signature
 	[ ${LINK_USRBIN} = yes ] && do_remove_links
 	[ "${OSVERSION}" -lt 900022 ] && do_cleanup_manpath
 fi

Modified: head/lang/perl5.14/pkg-plist
==============================================================================
--- head/lang/perl5.14/pkg-plist	Wed Feb 12 13:40:02 2014	(r343920)
+++ head/lang/perl5.14/pkg-plist	Wed Feb 12 13:46:07 2014	(r343921)
@@ -15,9 +15,8 @@ bin/instmodsh
 bin/json_pp
 bin/libnetcfg
 bin/perl
+bin/perl5
 bin/perl%%PERL_VERSION%%
-@exec ln -fs %D/%F %B/perl5
-@unexec rm -f %B/perl5 2>&1 >/dev/null || true
 bin/perlbug
 bin/perldoc
 bin/perlivp
@@ -42,6 +41,7 @@ bin/shasum
 bin/splain
 bin/xsubpp
 %%MANCONF%%etc/man.d/perl%%PERL_VER%%.conf
+etc/perl5_version
 lib/perl5/%%PERL_VER%%/AnyDBM_File.pm
 lib/perl5/%%PERL_VER%%/App/Cpan.pm
 lib/perl5/%%PERL_VER%%/App/Prove.pm
@@ -3003,6 +3003,7 @@ man/man1/xsubpp.1.gz
 @dirrm lib/perl5/%%PERL_VER%%/BSDPAN/ExtUtils
 @dirrm lib/perl5/%%PERL_VER%%/BSDPAN
 @unexec find %D/%%SITE_PERL%%/%%PERL_ARCH%%/ -name '*.ph' -delete 2>/dev/null || true
+@exec cd /usr/include && %D/bin/h2ph *.h machine/*.h sys/*.h >/dev/null
 %%GDBM%%@dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/auto/GDBM_File
 @dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/threads
 @dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/auto/threads/shared
@@ -3342,15 +3343,18 @@ man/man1/xsubpp.1.gz
 @dirrm lib/perl5/%%PERL_VER%%/autodie/exception
 @dirrm lib/perl5/%%PERL_VER%%/autodie
 @dirrmtry lib/perl5/%%PERL_VER%%/man/man3
+@exec install -d %D/lib/perl5/%%PERL_VER%%/man/man3
 @unexec /bin/rm -f %D/lib/perl5/%%PERL_VER%%/man/whatis
 @exec /usr/bin/makewhatis %D/lib/perl5/%%PERL_VER%%/man
 @dirrmtry lib/perl5/%%PERL_VER%%/man
 @dirrmtry lib/perl5/%%PERL_VER%%
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/sys
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/machine
+@exec install -d %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%
 @dirrmtry %%SITE_PERL%%/auto
+@exec install -d %D/%%SITE_PERL%%/auto
 @dirrmtry %%SITE_PERL%%
 @dirrmtry lib/perl5/site_perl
 @dirrmtry lib/perl5

Modified: head/lang/perl5.16/Makefile
==============================================================================
--- head/lang/perl5.16/Makefile	Wed Feb 12 13:40:02 2014	(r343920)
+++ head/lang/perl5.16/Makefile	Wed Feb 12 13:46:07 2014	(r343921)
@@ -3,7 +3,7 @@
 
 PORTNAME=	perl
 PORTVERSION=	${PERL_VERSION}
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	lang devel perl5
 MASTER_SITES=	CPAN \
 		${MASTER_SITE_LOCAL:S/$/:local/} \
@@ -64,6 +64,15 @@ LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COL
 CONFIGURE_ENV+=	${LOCALE_CLEANUP} UNAME_v="$$(uname -v | sed 'y/=/ /')"
 MAKE_ENV+=	${LOCALE_CLEANUP}
 
+SUB_LIST+=	PERL_VERSION=${PERL_VERSION} \
+		PERL_VER=${PERL_VER} \
+		PERL_ARCH=${PERL_ARCH}
+
+SUB_FILES=	perl5_version use.perl perl-man.conf
+
+PKGINSTALL=	${WRKDIR}/use.perl
+PKGDEINSTALL=	${WRKDIR}/use.perl
+
 .include <bsd.port.pre.mk>
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 
@@ -161,6 +170,7 @@ LINK_USRBIN=	yes
 .else
 LINK_USRBIN=	no
 .endif
+SUB_LIST+=	LINK_USRBIN=${LINK_USRBIN}
 
 BSDPAN_DEST=	${PREFIX}/lib/perl5/${PERL_VER}/BSDPAN
 BSDPAN_FILES=	BSDPAN.pm BSDPAN/Override.pm Config.pm \
@@ -170,24 +180,7 @@ BSDPAN_FILES=	BSDPAN.pm BSDPAN/Override.
 BSDPAN_VERSION=	20111107
 BSDPAN_WRKSRC=	${WRKDIR}/BSDPAN-${BSDPAN_VERSION}
 
-PKGINSTALL=	${WRKDIR}/pkg-install
-PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
-
 post-patch:
-	${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
-		-e 's|%%PERL_VERSION%%|${PERL_VERSION}|g;' \
-		-e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-		-e 's|%%PERL_ARCH%%|${PERL_ARCH}|g;' \
-		-e 's|%%PERL5_SIGNATURE%%|${LOCALBASE}/etc/perl5_version|g;' \
-		-e 's|%%LINK_USRBIN%%|${LINK_USRBIN}|g;' \
-		${FILESDIR}/use.perl \
-		> ${WRKDIR}/use.perl
-	${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
-		-e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-		${FILESDIR}/perl-man.conf \
-		> ${WRKDIR}/perl-man.conf
-	${CP} ${WRKDIR}/use.perl ${PKGINSTALL}
-	${CP} ${WRKDIR}/use.perl ${PKGDEINSTALL}
 	${SED} -i '' -e 's|%%PERL_PKGNAME%%|${PKGNAME}|g; s|%%PERL_VER%%|${PERL_VER}|g;' \
 		-e 's!%%BSDPAN_VERSION%%!${BSDPAN_VERSION}!g;' \
 		${BSDPAN_WRKSRC}/ExtUtils/*.pm
@@ -209,12 +202,14 @@ post-install:
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/machine
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/sys
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/auto
+	@${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION}
+	${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc
 .if ${OSVERSION} >= 900022
-	@${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PERL_VER}.conf
+	${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PERL_VER}.conf
 .endif
 .for files in ${BSDPAN_FILES}
-	${MKDIR} ${STAGEDIR}${BSDPAN_DEST}/${files:H}
+	@${MKDIR} ${STAGEDIR}${BSDPAN_DEST}/${files:H}
 	${INSTALL_DATA} \
 		${BSDPAN_WRKSRC}/${files} ${STAGEDIR}${BSDPAN_DEST}/${files}
 .endfor

Copied: head/lang/perl5.16/files/perl-man.conf.in (from r343916, head/lang/perl5.16/files/perl-man.conf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.16/files/perl-man.conf.in	Wed Feb 12 13:46:07 2014	(r343921, copy of r343916, head/lang/perl5.16/files/perl-man.conf)
@@ -0,0 +1,2 @@
+MANPATH %%PREFIX%%/lib/perl5/%%PERL_VER%%/man
+MANPATH %%PREFIX%%/lib/perl5/%%PERL_VER%%/perl/man

Added: head/lang/perl5.16/files/perl5_version.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.16/files/perl5_version.in	Wed Feb 12 13:46:07 2014	(r343921)
@@ -0,0 +1,2 @@
+# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%%
+PERL_VERSION=%%PERL_VERSION%%

Copied and modified: head/lang/perl5.16/files/use.perl.in (from r343736, head/lang/perl5.16/files/use.perl)
==============================================================================
--- head/lang/perl5.16/files/use.perl	Tue Feb 11 12:28:44 2014	(r343736, copy source)
+++ head/lang/perl5.16/files/use.perl.in	Wed Feb 12 13:46:07 2014	(r343921)
@@ -4,10 +4,8 @@
 
 LINK_USRBIN="%%LINK_USRBIN%%"
 : ${OSVERSION:=`/sbin/sysctl -n kern.osreldate`};
-PERL_ARCH="%%PERL_ARCH%%"
 PERL_VERSION="%%PERL_VERSION%%"
 PERL_VER="%%PERL_VER%%"
-PERL5_SIGNATURE="%%PERL5_SIGNATURE%%"
 banner="# added by use.perl $(/bin/date +'%F %T')"
 special_link_list="perl perl5"
 
@@ -44,20 +42,6 @@ do_create_links()
 	done
 }
 
-do_post_install()
-{
-	INCLUDEDIR=/usr/include
-	install -d ${PKG_PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/auto
-	install -d ${PKG_PREFIX}/lib/perl5/site_perl/${PERL_VER}/auto
-	install -d ${PKG_PREFIX}/lib/perl5/${PERL_VER}/man/man3
-	cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h >/dev/null
-}
-
-do_remove_perl5_signature()
-{
-	[ -f "${PERL5_SIGNATURE}" ] && /bin/rm "${PERL5_SIGNATURE}"
-}
-
 do_cleanup_manpath()
 {
 	if [ -f /etc/manpath.config ] ; then
@@ -73,13 +57,6 @@ do_cleanup_manpath()
 	fi
 }
 
-do_create_perl5_signature()
-{
-	echo "${banner}" >>"${PERL5_SIGNATURE}"
-	echo "# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=${PERL_VER}" >>"${PERL5_SIGNATURE}"
-	echo "PERL_VERSION=${PERL_VERSION}" >>"${PERL5_SIGNATURE}"
-}
-
 do_spam_manpath()
 {
 	if [ -f /etc/manpath.config ] ; then
@@ -91,9 +68,6 @@ do_spam_manpath()
 
 
 if [ "$2" = "POST-INSTALL" ] ; then
-	do_remove_perl5_signature
-	do_create_perl5_signature
-	do_post_install
 	if [ ${LINK_USRBIN} = yes ] ; then
 		do_remove_links
 		do_create_links
@@ -103,7 +77,6 @@ if [ "$2" = "POST-INSTALL" ] ; then
 		do_spam_manpath
 	fi
 elif [ "$2" = "POST-DEINSTALL" ] ; then
-	do_remove_perl5_signature
 	[ ${LINK_USRBIN} = yes ] && do_remove_links
 	[ "${OSVERSION}" -lt 900022 ] && do_cleanup_manpath
 fi

Modified: head/lang/perl5.16/pkg-plist
==============================================================================
--- head/lang/perl5.16/pkg-plist	Wed Feb 12 13:40:02 2014	(r343920)
+++ head/lang/perl5.16/pkg-plist	Wed Feb 12 13:46:07 2014	(r343921)
@@ -14,9 +14,8 @@ bin/instmodsh
 bin/json_pp
 bin/libnetcfg
 bin/perl
+bin/perl5
 bin/perl%%PERL_VERSION%%
-@exec ln -fs %D/%F %B/perl5
-@unexec rm -f %B/perl5 2>&1 >/dev/null || true
 bin/perlbug
 bin/perldoc
 bin/perlivp
@@ -42,6 +41,7 @@ bin/splain
 bin/xsubpp
 bin/zipdetails
 %%MANCONF%%etc/man.d/perl%%PERL_VER%%.conf
+etc/perl5_version
 lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/.packlist
 lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/B.pm
 lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/B/Concise.pm
@@ -2913,6 +2913,7 @@ man/man1/zipdetails.1.gz
 @dirrm lib/perl5/%%PERL_VER%%/BSDPAN/ExtUtils
 @dirrm lib/perl5/%%PERL_VER%%/BSDPAN
 @unexec find %D/%%SITE_PERL%%/%%PERL_ARCH%%/ -name '*.ph' -delete 2>/dev/null || true
+@exec cd /usr/include && %D/bin/h2ph *.h machine/*.h sys/*.h >/dev/null
 %%GDBM%%@dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/auto/GDBM_File
 @dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/threads
 @dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/auto/threads/shared
@@ -3245,15 +3246,18 @@ man/man1/zipdetails.1.gz
 @dirrm lib/perl5/%%PERL_VER%%/autodie/exception
 @dirrm lib/perl5/%%PERL_VER%%/autodie
 @dirrmtry lib/perl5/%%PERL_VER%%/man/man3
+@exec install -d %D/lib/perl5/%%PERL_VER%%/man/man3
 @unexec /bin/rm -f %D/lib/perl5/%%PERL_VER%%/man/whatis
 @exec /usr/bin/makewhatis %D/lib/perl5/%%PERL_VER%%/man
 @dirrmtry lib/perl5/%%PERL_VER%%/man
 @dirrmtry lib/perl5/%%PERL_VER%%
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/sys
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/machine
+@exec install -d %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%
 @dirrmtry %%SITE_PERL%%/auto
+@exec install -d %D/%%SITE_PERL%%/auto
 @dirrmtry %%SITE_PERL%%
 @dirrmtry lib/perl5/site_perl
 @dirrmtry lib/perl5

Modified: head/lang/perl5.18/Makefile
==============================================================================
--- head/lang/perl5.18/Makefile	Wed Feb 12 13:40:02 2014	(r343920)
+++ head/lang/perl5.18/Makefile	Wed Feb 12 13:46:07 2014	(r343921)
@@ -3,6 +3,7 @@
 
 PORTNAME=	perl
 PORTVERSION=	${PERL_VERSION}
+PORTREVISION=	1
 CATEGORIES=	lang devel perl5
 MASTER_SITES=	CPAN \
 		${MASTER_SITE_LOCAL:S/$/:local/} \
@@ -82,6 +83,15 @@ LOCALE_CLEANUP=	LANG="" LC_ALL="" LC_COL
 CONFIGURE_ENV+=	${LOCALE_CLEANUP} UNAME_v="$$(uname -v | sed 'y/=/ /')"
 MAKE_ENV+=	${LOCALE_CLEANUP}
 
+SUB_LIST+=	PERL_VERSION=${PERL_VERSION} \
+		PERL_VER=${PERL_VER} \
+		PERL_ARCH=${PERL_ARCH}
+
+SUB_FILES=	perl5_version use.perl perl-man.conf
+
+PKGINSTALL=	${WRKDIR}/use.perl
+PKGDEINSTALL=	${WRKDIR}/use.perl
+
 .include <bsd.port.pre.mk>
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 
@@ -142,6 +152,7 @@ LINK_USRBIN=	yes
 .else
 LINK_USRBIN=	no
 .endif
+SUB_LIST+=	LINK_USRBIN=${LINK_USRBIN}
 
 BSDPAN_DEST=	${PREFIX}/lib/perl5/${PERL_VER}/BSDPAN
 BSDPAN_FILES=	BSDPAN.pm BSDPAN/Override.pm Config.pm \
@@ -151,24 +162,7 @@ BSDPAN_FILES=	BSDPAN.pm BSDPAN/Override.
 BSDPAN_VERSION=	20111107
 BSDPAN_WRKSRC=	${WRKDIR}/BSDPAN-${BSDPAN_VERSION}
 
-PKGINSTALL=	${WRKDIR}/pkg-install
-PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
-
 post-patch:
-	${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
-		-e 's|%%PERL_VERSION%%|${PERL_VERSION}|g;' \
-		-e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-		-e 's|%%PERL_ARCH%%|${PERL_ARCH}|g;' \
-		-e 's|%%PERL5_SIGNATURE%%|${LOCALBASE}/etc/perl5_version|g;' \
-		-e 's|%%LINK_USRBIN%%|${LINK_USRBIN}|g;' \
-		${FILESDIR}/use.perl \
-		> ${WRKDIR}/use.perl
-	${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
-		-e 's|%%PERL_VER%%|${PERL_VER}|g;' \
-		${FILESDIR}/perl-man.conf \
-		> ${WRKDIR}/perl-man.conf
-	${CP} ${WRKDIR}/use.perl ${PKGINSTALL}
-	${CP} ${WRKDIR}/use.perl ${PKGDEINSTALL}
 	${SED} -i '' -e 's|%%PERL_PKGNAME%%|${PKGNAME}|g; s|%%PERL_VER%%|${PERL_VER}|g;' \
 		-e 's!%%BSDPAN_VERSION%%!${BSDPAN_VERSION}!g;' \
 		${BSDPAN_WRKSRC}/ExtUtils/*.pm
@@ -190,12 +184,14 @@ post-install:
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/machine
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/${PERL_ARCH}/sys
 	@${MKDIR} ${STAGEDIR}${SITE_PERL}/auto
+	@${LN} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION} ${STAGEDIR}${PREFIX}/bin/perl5
 	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/perl${PERL_VERSION}
+	${INSTALL_DATA} ${WRKDIR}/perl5_version ${STAGEDIR}${PREFIX}/etc
 .if ${OSVERSION} >= 900022
-	@${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PERL_VER}.conf
+	${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${STAGEDIR}${PREFIX}/etc/man.d/perl${PERL_VER}.conf
 .endif
 .for files in ${BSDPAN_FILES}
-	${MKDIR} ${STAGEDIR}${BSDPAN_DEST}/${files:H}
+	@${MKDIR} ${STAGEDIR}${BSDPAN_DEST}/${files:H}
 	${INSTALL_DATA} \
 		${BSDPAN_WRKSRC}/${files} ${STAGEDIR}${BSDPAN_DEST}/${files}
 .endfor

Copied: head/lang/perl5.18/files/perl-man.conf.in (from r343916, head/lang/perl5.18/files/perl-man.conf)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.18/files/perl-man.conf.in	Wed Feb 12 13:46:07 2014	(r343921, copy of r343916, head/lang/perl5.18/files/perl-man.conf)
@@ -0,0 +1,2 @@
+MANPATH %%PREFIX%%/lib/perl5/%%PERL_VER%%/man
+MANPATH %%PREFIX%%/lib/perl5/%%PERL_VER%%/perl/man

Added: head/lang/perl5.18/files/perl5_version.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.18/files/perl5_version.in	Wed Feb 12 13:46:07 2014	(r343921)
@@ -0,0 +1,2 @@
+# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%%
+PERL_VERSION=%%PERL_VERSION%%

Copied and modified: head/lang/perl5.18/files/use.perl.in (from r343736, head/lang/perl5.18/files/use.perl)
==============================================================================
--- head/lang/perl5.18/files/use.perl	Tue Feb 11 12:28:44 2014	(r343736, copy source)
+++ head/lang/perl5.18/files/use.perl.in	Wed Feb 12 13:46:07 2014	(r343921)
@@ -4,10 +4,8 @@
 
 LINK_USRBIN="%%LINK_USRBIN%%"
 : ${OSVERSION:=`/sbin/sysctl -n kern.osreldate`};
-PERL_ARCH="%%PERL_ARCH%%"
 PERL_VERSION="%%PERL_VERSION%%"
 PERL_VER="%%PERL_VER%%"
-PERL5_SIGNATURE="%%PERL5_SIGNATURE%%"
 banner="# added by use.perl $(/bin/date +'%F %T')"
 special_link_list="perl perl5"
 
@@ -44,20 +42,6 @@ do_create_links()
 	done
 }
 
-do_post_install()
-{
-	INCLUDEDIR=/usr/include
-	install -d ${PKG_PREFIX}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/auto
-	install -d ${PKG_PREFIX}/lib/perl5/site_perl/${PERL_VER}/auto
-	install -d ${PKG_PREFIX}/lib/perl5/${PERL_VER}/man/man3
-	cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h >/dev/null
-}
-
-do_remove_perl5_signature()
-{
-	[ -f "${PERL5_SIGNATURE}" ] && /bin/rm "${PERL5_SIGNATURE}"
-}
-
 do_cleanup_manpath()
 {
 	if [ -f /etc/manpath.config ] ; then
@@ -73,13 +57,6 @@ do_cleanup_manpath()
 	fi
 }
 
-do_create_perl5_signature()
-{
-	echo "${banner}" >>"${PERL5_SIGNATURE}"
-	echo "# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=${PERL_VER}" >>"${PERL5_SIGNATURE}"
-	echo "PERL_VERSION=${PERL_VERSION}" >>"${PERL5_SIGNATURE}"
-}
-
 do_spam_manpath()
 {
 	if [ -f /etc/manpath.config ] ; then
@@ -91,9 +68,6 @@ do_spam_manpath()
 
 
 if [ "$2" = "POST-INSTALL" ] ; then
-	do_remove_perl5_signature
-	do_create_perl5_signature
-	do_post_install
 	if [ ${LINK_USRBIN} = yes ] ; then
 		do_remove_links
 		do_create_links
@@ -103,7 +77,6 @@ if [ "$2" = "POST-INSTALL" ] ; then
 		do_spam_manpath
 	fi
 elif [ "$2" = "POST-DEINSTALL" ] ; then
-	do_remove_perl5_signature
 	[ ${LINK_USRBIN} = yes ] && do_remove_links
 	[ "${OSVERSION}" -lt 900022 ] && do_cleanup_manpath
 fi

Modified: head/lang/perl5.18/pkg-plist
==============================================================================
--- head/lang/perl5.18/pkg-plist	Wed Feb 12 13:40:02 2014	(r343920)
+++ head/lang/perl5.18/pkg-plist	Wed Feb 12 13:46:07 2014	(r343921)
@@ -14,9 +14,8 @@ bin/instmodsh
 bin/json_pp
 bin/libnetcfg
 bin/perl
+bin/perl5
 bin/perl%%PERL_VERSION%%
-@exec ln -fs %D/%F %B/perl5
-@unexec rm -f %B/perl5 2>&1 >/dev/null || true
 bin/perlbug
 bin/perldoc
 bin/perlivp
@@ -42,6 +41,7 @@ bin/splain
 bin/xsubpp
 bin/zipdetails
 %%MANCONF%%etc/man.d/perl%%PERL_VER%%.conf
+etc/perl5_version
 lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/.packlist
 lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/B.pm
 lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/B/Concise.pm
@@ -2938,6 +2938,7 @@ man/man1/zipdetails.1.gz
 @dirrm lib/perl5/%%PERL_VER%%/BSDPAN/ExtUtils
 @dirrm lib/perl5/%%PERL_VER%%/BSDPAN
 @unexec find %D/%%SITE_PERL%%/%%PERL_ARCH%%/ -name '*.ph' -delete 2>/dev/null || true
+@exec cd /usr/include && %D/bin/h2ph *.h machine/*.h sys/*.h >/dev/null
 %%GDBM%%@dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/auto/GDBM_File
 @dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/threads
 @dirrm lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/auto/threads/shared
@@ -3271,15 +3272,18 @@ man/man1/zipdetails.1.gz
 @dirrm lib/perl5/%%PERL_VER%%/autodie/exception
 @dirrm lib/perl5/%%PERL_VER%%/autodie
 @dirrmtry lib/perl5/%%PERL_VER%%/man/man3
+@exec install -d %D/lib/perl5/%%PERL_VER%%/man/man3
 @unexec /bin/rm -f %D/lib/perl5/%%PERL_VER%%/man/whatis
 @exec /usr/bin/makewhatis %D/lib/perl5/%%PERL_VER%%/man
 @dirrmtry lib/perl5/%%PERL_VER%%/man
 @dirrmtry lib/perl5/%%PERL_VER%%
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/sys
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/machine
+@exec install -d %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto
 @dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%
 @dirrmtry %%SITE_PERL%%/auto
+@exec install -d %D/%%SITE_PERL%%/auto
 @dirrmtry %%SITE_PERL%%
 @dirrmtry lib/perl5/site_perl
 @dirrmtry lib/perl5



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