diff options
author | mat <mat@FreeBSD.org> | 2014-02-12 21:46:07 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2014-02-12 21:46:07 +0800 |
commit | a2eb98aa5904e7a4abfd8a168c45bbf3141bac4f (patch) | |
tree | a9184b826f6d2e4d0e69c0d40cadfaf2a149d724 | |
parent | a30be86c016b08429174653c49ec4bfc94d252cc (diff) | |
download | freebsd-ports-gnome-a2eb98aa5904e7a4abfd8a168c45bbf3141bac4f.tar.gz freebsd-ports-gnome-a2eb98aa5904e7a4abfd8a168c45bbf3141bac4f.tar.zst freebsd-ports-gnome-a2eb98aa5904e7a4abfd8a168c45bbf3141bac4f.zip |
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
-rw-r--r-- | lang/perl5.14/Makefile | 35 | ||||
-rw-r--r-- | lang/perl5.14/files/perl-man.conf.in (renamed from lang/perl5.14/files/perl-man.conf) | 0 | ||||
-rw-r--r-- | lang/perl5.14/files/perl5_version.in | 2 | ||||
-rw-r--r-- | lang/perl5.14/files/use.perl.in (renamed from lang/perl5.18/files/use.perl) | 28 | ||||
-rw-r--r-- | lang/perl5.14/pkg-plist | 8 | ||||
-rw-r--r-- | lang/perl5.16/Makefile | 35 | ||||
-rw-r--r-- | lang/perl5.16/files/perl-man.conf.in (renamed from lang/perl5.16/files/perl-man.conf) | 0 | ||||
-rw-r--r-- | lang/perl5.16/files/perl5_version.in | 2 | ||||
-rw-r--r-- | lang/perl5.16/files/use.perl.in (renamed from lang/perl5.14/files/use.perl) | 27 | ||||
-rw-r--r-- | lang/perl5.16/pkg-plist | 8 | ||||
-rw-r--r-- | lang/perl5.18/Makefile | 34 | ||||
-rw-r--r-- | lang/perl5.18/files/perl-man.conf.in (renamed from lang/perl5.18/files/perl-man.conf) | 0 | ||||
-rw-r--r-- | lang/perl5.18/files/perl5_version.in | 2 | ||||
-rw-r--r-- | lang/perl5.18/files/use.perl.in (renamed from lang/perl5.16/files/use.perl) | 27 | ||||
-rw-r--r-- | lang/perl5.18/pkg-plist | 8 |
15 files changed, 69 insertions, 147 deletions
diff --git a/lang/perl5.14/Makefile b/lang/perl5.14/Makefile index d3601b67009b..85faeb9bcff7 100644 --- a/lang/perl5.14/Makefile +++ b/lang/perl5.14/Makefile @@ -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_COLLATE="" LC_CTYPE="" \ 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.pm Config.pm \ 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 diff --git a/lang/perl5.14/files/perl-man.conf b/lang/perl5.14/files/perl-man.conf.in index 7f265b64652b..7f265b64652b 100644 --- a/lang/perl5.14/files/perl-man.conf +++ b/lang/perl5.14/files/perl-man.conf.in diff --git a/lang/perl5.14/files/perl5_version.in b/lang/perl5.14/files/perl5_version.in new file mode 100644 index 000000000000..97e1f75dfb9f --- /dev/null +++ b/lang/perl5.14/files/perl5_version.in @@ -0,0 +1,2 @@ +# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%% +PERL_VERSION=%%PERL_VERSION%% diff --git a/lang/perl5.18/files/use.perl b/lang/perl5.14/files/use.perl.in index 3f1f15724d8f..a3c064d1ea16 100644 --- a/lang/perl5.18/files/use.perl +++ b/lang/perl5.14/files/use.perl.in @@ -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 diff --git a/lang/perl5.14/pkg-plist b/lang/perl5.14/pkg-plist index 4e515be24f5d..fc4e7cb20d18 100644 --- a/lang/perl5.14/pkg-plist +++ b/lang/perl5.14/pkg-plist @@ -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 diff --git a/lang/perl5.16/Makefile b/lang/perl5.16/Makefile index f2ba9297511a..df716f9f2702 100644 --- a/lang/perl5.16/Makefile +++ b/lang/perl5.16/Makefile @@ -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_COLLATE="" LC_CTYPE="" \ 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.pm Config.pm \ 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 diff --git a/lang/perl5.16/files/perl-man.conf b/lang/perl5.16/files/perl-man.conf.in index 7f265b64652b..7f265b64652b 100644 --- a/lang/perl5.16/files/perl-man.conf +++ b/lang/perl5.16/files/perl-man.conf.in diff --git a/lang/perl5.16/files/perl5_version.in b/lang/perl5.16/files/perl5_version.in new file mode 100644 index 000000000000..97e1f75dfb9f --- /dev/null +++ b/lang/perl5.16/files/perl5_version.in @@ -0,0 +1,2 @@ +# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%% +PERL_VERSION=%%PERL_VERSION%% diff --git a/lang/perl5.14/files/use.perl b/lang/perl5.16/files/use.perl.in index 3f1f15724d8f..e74d73e063e1 100644 --- a/lang/perl5.14/files/use.perl +++ b/lang/perl5.16/files/use.perl.in @@ -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 diff --git a/lang/perl5.16/pkg-plist b/lang/perl5.16/pkg-plist index 666fcc7328ba..b6e6c3e7ea2b 100644 --- a/lang/perl5.16/pkg-plist +++ b/lang/perl5.16/pkg-plist @@ -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 diff --git a/lang/perl5.18/Makefile b/lang/perl5.18/Makefile index 49fd05468596..8cbb1709d78c 100644 --- a/lang/perl5.18/Makefile +++ b/lang/perl5.18/Makefile @@ -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_COLLATE="" LC_CTYPE="" \ 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.pm Config.pm \ 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 diff --git a/lang/perl5.18/files/perl-man.conf b/lang/perl5.18/files/perl-man.conf.in index 7f265b64652b..7f265b64652b 100644 --- a/lang/perl5.18/files/perl-man.conf +++ b/lang/perl5.18/files/perl-man.conf.in diff --git a/lang/perl5.18/files/perl5_version.in b/lang/perl5.18/files/perl5_version.in new file mode 100644 index 000000000000..97e1f75dfb9f --- /dev/null +++ b/lang/perl5.18/files/perl5_version.in @@ -0,0 +1,2 @@ +# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%% +PERL_VERSION=%%PERL_VERSION%% diff --git a/lang/perl5.16/files/use.perl b/lang/perl5.18/files/use.perl.in index 3f1f15724d8f..e74d73e063e1 100644 --- a/lang/perl5.16/files/use.perl +++ b/lang/perl5.18/files/use.perl.in @@ -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 diff --git a/lang/perl5.18/pkg-plist b/lang/perl5.18/pkg-plist index 047340d3bbe1..32821a33c1e1 100644 --- a/lang/perl5.18/pkg-plist +++ b/lang/perl5.18/pkg-plist @@ -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 |