diff options
author | gordon <gordon@FreeBSD.org> | 2010-11-05 13:39:59 +0800 |
---|---|---|
committer | gordon <gordon@FreeBSD.org> | 2010-11-05 13:39:59 +0800 |
commit | 259d553c5df359c1f472841865fe6fb2ae257e87 (patch) | |
tree | 482d6adc136ef882e3714c1e71f76088b9553584 /lang/perl5.8 | |
parent | 3477f30094fdfbf5267be6b29cf64c006104d82a (diff) | |
download | freebsd-ports-gnome-259d553c5df359c1f472841865fe6fb2ae257e87.tar.gz freebsd-ports-gnome-259d553c5df359c1f472841865fe6fb2ae257e87.tar.zst freebsd-ports-gnome-259d553c5df359c1f472841865fe6fb2ae257e87.zip |
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)
Diffstat (limited to 'lang/perl5.8')
-rw-r--r-- | lang/perl5.8/Makefile | 15 | ||||
-rw-r--r-- | lang/perl5.8/files/perl-man.conf | 2 | ||||
-rw-r--r-- | lang/perl5.8/files/use.perl | 16 | ||||
-rw-r--r-- | lang/perl5.8/pkg-plist | 1 |
4 files changed, 26 insertions, 8 deletions
diff --git a/lang/perl5.8/Makefile b/lang/perl5.8/Makefile index 41debbab29bc..9ce1ee09e1c3 100644 --- a/lang/perl5.8/Makefile +++ b/lang/perl5.8/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/} \ @@ -109,6 +109,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 @@ -175,6 +181,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 @@ -205,6 +215,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.8/files/perl-man.conf b/lang/perl5.8/files/perl-man.conf new file mode 100644 index 000000000000..95187b5b3c55 --- /dev/null +++ b/lang/perl5.8/files/perl-man.conf @@ -0,0 +1,2 @@ +MANPATH %%PREFIX%%/lib/perl5/%%PERL_VERSION%%/man +MANPATH %%PREFIX%%/lib/perl5/%%PERL_VERSION%%/perl/man diff --git a/lang/perl5.8/files/use.perl b/lang/perl5.8/files/use.perl index 0694bf5c6643..ed6dd20654a8 100644 --- a/lang/perl5.8/files/use.perl +++ b/lang/perl5.8/files/use.perl @@ -130,8 +130,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..." /usr/bin/awk 's=0; /^#.*use.perl/ { s=1; mode=1 } /^#/ { s=1; if (mode != 1) { mode=0 } } @@ -140,8 +140,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() @@ -154,11 +154,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.8/pkg-plist b/lang/perl5.8/pkg-plist index aada99eff34b..3741ac0b080d 100644 --- a/lang/perl5.8/pkg-plist +++ b/lang/perl5.8/pkg-plist @@ -37,6 +37,7 @@ bin/splain %%SUIDPERL%%bin/suidperl %%NEED_USE_PERL%%bin/use.perl bin/xsubpp +%%MANCONF%%etc/man.d/perl%%PERL_VER%%.conf lib/perl5/%%PERL_VER%%/AnyDBM_File.pm lib/perl5/%%PERL_VER%%/Attribute/Handlers.pm lib/perl5/%%PERL_VER%%/AutoLoader.pm |