summaryrefslogtreecommitdiff
path: root/lang/perl5.14
diff options
context:
space:
mode:
authorGordon Tetlow <gordon@FreeBSD.org>2010-11-05 05:41:37 +0000
committerGordon Tetlow <gordon@FreeBSD.org>2010-11-05 05:41:37 +0000
commitaad4dc8ca8295bbbbd7cccec4e1afecc93e5a2f8 (patch)
tree6f5f2e38840a389446d83fb5e6adb181ad2b7395 /lang/perl5.14
parentAdd patch to install a configuration file for the new man utility (diff)
Add patch to install a configuration file for the new man utility
instead of manipulating /etc/manpath.config. Approved by: maintainer (timeout), wes@ (mentor, implicit)
Notes
Notes: svn path=/head/; revision=264121
Diffstat (limited to 'lang/perl5.14')
-rw-r--r--lang/perl5.14/Makefile15
-rw-r--r--lang/perl5.14/files/use.perl16
-rw-r--r--lang/perl5.14/pkg-plist1
3 files changed, 24 insertions, 8 deletions
diff --git a/lang/perl5.14/Makefile b/lang/perl5.14/Makefile
index f85502c6505e..1abe6f16da5f 100644
--- a/lang/perl5.14/Makefile
+++ b/lang/perl5.14/Makefile
@@ -7,7 +7,7 @@
PORTNAME= perl
PORTVERSION= ${PERL_VERSION}
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang devel perl5
MASTER_SITES= CPAN \
${MASTER_SITE_LOCAL:S/$/:local/} \
@@ -97,6 +97,12 @@ CONFIGURE_ARGS+= -Ui_gdbm
PLIST_SUB+= GDBM="@comment "
.endif
+.if ${OSVERSION} >= 900022
+PLIST_SUB+= MANCONF=""
+.else
+PLIST_SUB+= MANCONF="@comment "
+.endif
+
.if defined(WITHOUT_PERL_MALLOC)
.undef WITH_PERL_MALLOC
.else
@@ -165,6 +171,10 @@ post-patch:
-e 's|%%LINK_USRBIN%%|${LINK_USRBIN}|g;' \
${FILESDIR}/use.perl \
> ${WRKDIR}/use.perl
+ ${SED} -e 's|%%PREFIX%%|${PREFIX}|g;' \
+ -e 's|%%PERL_VERSION%%|${PERL_VERSION}|g;' \
+ ${FILESDIR}/perl-man.conf \
+ > ${WRKDIR}/perl-man.conf
${SED} -e 's|%%PERL%%|${PERL}|g; s|%%PERL_VERSION%%|${PERL_VERSION}|g; s|%%PKGNAME%%|${PKGNAME}|g' \
${FILESDIR}/perl-after-upgrade \
> ${WRKDIR}/perl-after-upgrade
@@ -196,6 +206,9 @@ post-install:
@${INSTALL_SCRIPT} ${WRKDIR}/perl-after-upgrade ${PREFIX}/bin/perl-after-upgrade
@${INSTALL_MAN} ${WRKDIR}/perl-after-upgrade.1 ${MAN1PREFIX}/man/man1/perl-after-upgrade.1
@${LN} -sf ${PREFIX}/bin/perl${PERL_VERSION} ${PREFIX}/bin/perl5
+.if ${OSVERSION} >= 900022
+ @${INSTALL_DATA} ${WRKDIR}/perl-man.conf ${PREFIX}/etc/man.d/perl${PERL_VERSION}.conf
+.endif
.for files in ${BSDPAN_FILES}
${MKDIR} ${BSDPAN_DEST}/${files:H}
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
diff --git a/lang/perl5.14/files/use.perl b/lang/perl5.14/files/use.perl
index 3603d6ea50ae..890d8f4f31d0 100644
--- a/lang/perl5.14/files/use.perl
+++ b/lang/perl5.14/files/use.perl
@@ -110,8 +110,8 @@ do_cleanup_make_conf()
do_cleanup_manpath()
{
- echo -n "Cleaning up /etc/manpath.config..."
if [ -f /etc/manpath.config ] ; then
+ echo -n "Cleaning up /etc/manpath.config..."
/bin/cp -p /etc/manpath.config /etc/manpath.config.new
/usr/bin/awk 's=0;
/^#.*use.perl/ { s=1; mode=1 }
@@ -121,8 +121,8 @@ do_cleanup_manpath()
{ if (s != 1) { mode = 0 } if (mode == 0) print }' /etc/manpath.config >/etc/manpath.config.new
/bin/mv /etc/manpath.config /etc/manpath.config.bak
/bin/mv /etc/manpath.config.new /etc/manpath.config
+ echo " Done."
fi
- echo " Done."
}
do_spam_make_conf()
@@ -135,11 +135,13 @@ do_spam_make_conf()
do_spam_manpath()
{
- echo -n "Spamming /etc/manpath.config..."
- echo "$banner" >>/etc/manpath.config
- echo "OPTIONAL_MANPATH ${PKG_PREFIX}/lib/perl5/%%PERL_VERSION%%/man" >>/etc/manpath.config
- echo "OPTIONAL_MANPATH ${PKG_PREFIX}/lib/perl5/%%PERL_VERSION%%/perl/man" >>/etc/manpath.config
- echo " Done."
+ if [ -f /etc/manpath.config ] ; then
+ echo -n "Spamming /etc/manpath.config..."
+ echo "$banner" >>/etc/manpath.config
+ echo "OPTIONAL_MANPATH ${PKG_PREFIX}/lib/perl5/%%PERL_VERSION%%/man" >>/etc/manpath.config
+ echo "OPTIONAL_MANPATH ${PKG_PREFIX}/lib/perl5/%%PERL_VERSION%%/perl/man" >>/etc/manpath.config
+ echo " Done."
+ fi
}
[ "$need_remove_links" = "yes" ] && do_remove_links
diff --git a/lang/perl5.14/pkg-plist b/lang/perl5.14/pkg-plist
index 1899193ab0d4..e0be89ea290d 100644
--- a/lang/perl5.14/pkg-plist
+++ b/lang/perl5.14/pkg-plist
@@ -40,6 +40,7 @@ bin/s2p
bin/shasum
bin/splain
bin/xsubpp
+%%MANCONF%%etc/man.d/perl%%PERL_VER%%.conf
lib/perl5/%%PERL_VER%%/AnyDBM_File.pm
lib/perl5/%%PERL_VER%%/App/Cpan.pm
lib/perl5/%%PERL_VER%%/App/Prove.pm