aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgordon <gordon@FreeBSD.org>2010-11-05 13:41:37 +0800
committergordon <gordon@FreeBSD.org>2010-11-05 13:41:37 +0800
commitd6c25de71f5f6876acc00946da632b4ccaec3955 (patch)
treea158655c1aa03c7627aa99de599b01635b637997
parent259d553c5df359c1f472841865fe6fb2ae257e87 (diff)
downloadfreebsd-ports-gnome-d6c25de71f5f6876acc00946da632b4ccaec3955.tar.gz
freebsd-ports-gnome-d6c25de71f5f6876acc00946da632b4ccaec3955.tar.zst
freebsd-ports-gnome-d6c25de71f5f6876acc00946da632b4ccaec3955.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)
-rw-r--r--lang/perl5.10/Makefile15
-rw-r--r--lang/perl5.10/files/perl-man.conf2
-rw-r--r--lang/perl5.10/files/use.perl16
-rw-r--r--lang/perl5.10/pkg-plist1
-rw-r--r--lang/perl5.12/Makefile15
-rw-r--r--lang/perl5.12/files/use.perl16
-rw-r--r--lang/perl5.12/pkg-plist1
-rw-r--r--lang/perl5.14/Makefile15
-rw-r--r--lang/perl5.14/files/use.perl16
-rw-r--r--lang/perl5.14/pkg-plist1
-rw-r--r--lang/perl5.16/Makefile15
-rw-r--r--lang/perl5.16/files/use.perl16
-rw-r--r--lang/perl5.16/pkg-plist1
13 files changed, 98 insertions, 32 deletions
diff --git a/lang/perl5.10/Makefile b/lang/perl5.10/Makefile
index 62011ffbc7f7..5444bade6450 100644
--- a/lang/perl5.10/Makefile
+++ b/lang/perl5.10/Makefile
@@ -7,7 +7,7 @@
PORTNAME= perl
PORTVERSION= ${PERL_VERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= lang devel perl5
MASTER_SITES= CPAN \
${MASTER_SITE_LOCAL:S/$/:local/} \
@@ -107,6 +107,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
@@ -206,6 +216,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.10/files/perl-man.conf b/lang/perl5.10/files/perl-man.conf
new file mode 100644
index 000000000000..95187b5b3c55
--- /dev/null
+++ b/lang/perl5.10/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.10/files/use.perl b/lang/perl5.10/files/use.perl
index e6314754e43f..d215b0c2ae4a 100644
--- a/lang/perl5.10/files/use.perl
+++ b/lang/perl5.10/files/use.perl
@@ -109,8 +109,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 } }
@@ -119,8 +119,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()
@@ -133,11 +133,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.10/pkg-plist b/lang/perl5.10/pkg-plist
index 6f4bb1893a6a..8567c6201ce9 100644
--- a/lang/perl5.10/pkg-plist
+++ b/lang/perl5.10/pkg-plist
@@ -42,6 +42,7 @@ bin/shasum
bin/splain
%%SUIDPERL%%bin/suidperl
bin/xsubpp
+%%MANCONF%%etc/man.d/perl%%PERL_VER%%.conf
lib/perl5/%%PERL_VER%%/AnyDBM_File.pm
lib/perl5/%%PERL_VER%%/App/Prove.pm
lib/perl5/%%PERL_VER%%/App/Prove/State.pm
diff --git a/lang/perl5.12/Makefile b/lang/perl5.12/Makefile
index f85502c6505e..1abe6f16da5f 100644
--- a/lang/perl5.12/Makefile
+++ b/lang/perl5.12/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.12/files/use.perl b/lang/perl5.12/files/use.perl
index 3603d6ea50ae..890d8f4f31d0 100644
--- a/lang/perl5.12/files/use.perl
+++ b/lang/perl5.12/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.12/pkg-plist b/lang/perl5.12/pkg-plist
index 1899193ab0d4..e0be89ea290d 100644
--- a/lang/perl5.12/pkg-plist
+++ b/lang/perl5.12/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
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
diff --git a/lang/perl5.16/Makefile b/lang/perl5.16/Makefile
index f85502c6505e..1abe6f16da5f 100644
--- a/lang/perl5.16/Makefile
+++ b/lang/perl5.16/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.16/files/use.perl b/lang/perl5.16/files/use.perl
index 3603d6ea50ae..890d8f4f31d0 100644
--- a/lang/perl5.16/files/use.perl
+++ b/lang/perl5.16/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.16/pkg-plist b/lang/perl5.16/pkg-plist
index 1899193ab0d4..e0be89ea290d 100644
--- a/lang/perl5.16/pkg-plist
+++ b/lang/perl5.16/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