diff options
author | Anton Berezin <tobez@FreeBSD.org> | 2005-02-01 13:36:41 +0000 |
---|---|---|
committer | Anton Berezin <tobez@FreeBSD.org> | 2005-02-01 13:36:41 +0000 |
commit | 4400a5e9853ae93bceb634729cd63ffbf9629bca (patch) | |
tree | 2c17cf871ed398bc2fe7742f4207c52a148ad113 /lang/perl5.6/files | |
parent | Update to 5.8.6. Also: (diff) |
Update to 5.6.2. Also:
- redirect output from h2ph to /dev/null [1];
- fix File::Path insecure file/directory permissions [2];
this resolves CAN-2004-0452
(http://vuxml.freebsd.org/c418d472-6bd1-11d9-93ca-000a95bc6fae.html);
- for OSVERSION < 500036, create symlinks in /usr/bin not only for
perl and suidperl, but also for a2p, c2ph, find2perl, h2ph, h2xs,
perlbug, perlcc, perldoc, pl2pm, pod2html, pod2latex, pod2man,
pod2text, s2p, and splain; perl and suidperl are still enough for
more recent FreeBSD versions [3];
- clean up created symlinks upon deinstallation [4];
- try to cleanup symlinks created by older versions of lang/perl5 and
lang/perl5.8, during both installation and deinstallation [5];
- added support for DISABLE_BSDPAN environment variable [6];
- be explicit about use.perl usage after installation of 4.X systems,
and on systems where lang/perl5.8 is prefered to lang/perl5; the exact
range is OSVERSION < 500036 || OSVERSION >= 502100 [7];
- respect __MAKE_CONF partially (the build-time value is used) [8];
- use.perl is now the same as pkg-install is now the same as
pkg-deinstall; apart from the changes already mentioned above, this
is a shell script now;
- use.perl's logic is also simplified in several ways [9];
- fix a BSDPAN bug [10];
- create and remove %%SITE_PERL%%/%%PERL_ARCH%%/auto, just
like lang/perl5.8 does, to silent pointyhat [11];
- apply a patch to handle daylight saving time correctly in
POSIX::strftime [12];
- the port now creates and uses shared libperl.so, as lang/perl5.8 port
does;
- move MAN3 manual pages under ${PREFIX}/lib/perl5/${PERL_VER}/perl, as
to avoid conflict with some of the p5 ports;
- do not build suidperl by default any longer; one should use
ENABLE_SUIDPERL to do that;
- move out manpage list to a separate Makefile.man;
- in general, the port layout is made much more similar to lang/perl5.8,
including.
Outstanding issues: Module::Build support for BSDPAN, SU_CMD support (PR
70831), PR 64963 (partially), and anything else that I forgot.
[1] Nudged by: krion
[2] Reported by: nectar
Patch from: Chris Turner @ RedHat
[3] PR: 55760, 57151, 58406
[4] Requested by: kris
PR: 54262
[5] PR: 51281, 51539
[6] PR: 57134
[7] PR: 60736
[8] PR: 74431
[9] Perl version submitted by des, implemented in sh
[10] Reported by: Alexander Nagilum <freebsd %at% nagilum de>
[11] PR: 71390
[12] PR: 74042, perl bug 18238
Diffstat (limited to 'lang/perl5.6/files')
-rw-r--r-- | lang/perl5.6/files/patch-Install.pm | 9 | ||||
-rw-r--r-- | lang/perl5.6/files/patch-POSIX.xs | 19 | ||||
-rw-r--r-- | lang/perl5.6/files/patch-Path.pm | 30 | ||||
-rw-r--r-- | lang/perl5.6/files/patch-Safe.pm | 20 | ||||
-rw-r--r-- | lang/perl5.6/files/patch-ac | 35 | ||||
-rw-r--r-- | lang/perl5.6/files/patch-freebsd.sh | 17 | ||||
-rw-r--r-- | lang/perl5.6/files/patch-makedepend | 13 | ||||
-rw-r--r-- | lang/perl5.6/files/use.perl | 368 |
8 files changed, 312 insertions, 199 deletions
diff --git a/lang/perl5.6/files/patch-Install.pm b/lang/perl5.6/files/patch-Install.pm index bbd42019def6..228b24a1088a 100644 --- a/lang/perl5.6/files/patch-Install.pm +++ b/lang/perl5.6/files/patch-Install.pm @@ -11,12 +11,3 @@ $FreeBSD$ if (-f $targetfile){ forceunlink($targetfile) unless $nonono; } else { -@@ -156,7 +156,7 @@ - } else { - inc_uninstall($_,$File::Find::dir,$verbose,0); # nonono set to 0 - } -- $packlist->{$origfile}++; -+ $packlist->{$targetfile}++; - - }, "."); - chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!"); diff --git a/lang/perl5.6/files/patch-POSIX.xs b/lang/perl5.6/files/patch-POSIX.xs new file mode 100644 index 000000000000..7a3caa960822 --- /dev/null +++ b/lang/perl5.6/files/patch-POSIX.xs @@ -0,0 +1,19 @@ +--- ext/POSIX/POSIX.xs.orig Tue Feb 1 11:55:24 2005 ++++ ext/POSIX/POSIX.xs Tue Feb 1 11:56:43 2005 +@@ -3860,6 +3860,16 @@ + mytm.tm_yday = yday; + mytm.tm_isdst = isdst; + mini_mktime(&mytm); ++ /* use libc to normalize the thing -- @@@ -- FreeBSD PR 74042, perl bug 18238 */ ++ { ++ struct tm mytm2; ++ time_t t; ++ mytm2 = mytm; ++ t = mktime(&mytm2); ++ mytm2 = *localtime(&t); ++ mytm.tm_gmtoff = mytm2.tm_gmtoff; ++ mytm.tm_zone = mytm2.tm_zone; ++ } + len = strftime(tmpbuf, sizeof tmpbuf, fmt, &mytm); + /* + ** The following is needed to handle to the situation where diff --git a/lang/perl5.6/files/patch-Path.pm b/lang/perl5.6/files/patch-Path.pm new file mode 100644 index 000000000000..2735b0f6a648 --- /dev/null +++ b/lang/perl5.6/files/patch-Path.pm @@ -0,0 +1,30 @@ +$FreeBSD$ +--- lib/File/Path.pm.orig Sat Jan 29 20:23:40 2005 ++++ lib/File/Path.pm Sat Jan 29 20:24:56 2005 +@@ -196,7 +196,7 @@ sub rmtree { + # it's also intended to change it to writable in case we have + # to recurse in which case we are better than rm -rf for + # subtrees with strange permissions +- chmod(0777, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) ++ chmod(0700, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) + or carp "Can't make directory $root read+writeable: $!" + unless $safe; + +@@ -230,7 +230,7 @@ sub rmtree { + print "skipped $root\n" if $verbose; + next; + } +- chmod 0777, $root ++ chmod 0700, $root + or carp "Can't make directory $root writeable: $!" + if $force_writeable; + print "rmdir $root\n" if $verbose; +@@ -252,7 +252,7 @@ sub rmtree { + print "skipped $root\n" if $verbose; + next; + } +- chmod 0666, $root ++ chmod 0600, $root + or carp "Can't make file $root writeable: $!" + if $force_writeable; + print "unlink $root\n" if $verbose; diff --git a/lang/perl5.6/files/patch-Safe.pm b/lang/perl5.6/files/patch-Safe.pm deleted file mode 100644 index 142b03ca4fba..000000000000 --- a/lang/perl5.6/files/patch-Safe.pm +++ /dev/null @@ -1,20 +0,0 @@ ---- ext/Opcode/Safe.pm.orig Fri Feb 23 03:57:54 2001 -+++ ext/Opcode/Safe.pm Mon Apr 21 16:24:39 2003 -@@ -213,7 +213,7 @@ sub reval { - # Create anon sub ref in root of compartment. - # Uses a closure (on $expr) to pass in the code to be executed. - # (eval on one line to keep line numbers as expected by caller) -- my $evalcode = sprintf('package %s; sub { eval $expr; }', $root); -+ my $evalcode = sprintf('package %s; sub { @_ = (); eval $expr; }', $root); - my $evalsub; - - if ($strict) { use strict; $evalsub = eval $evalcode; } -@@ -227,7 +227,7 @@ sub rdo { - my $root = $obj->{Root}; - - my $evalsub = eval -- sprintf('package %s; sub { do $file }', $root); -+ sprintf('package %s; sub { @_ = (); do $file }', $root); - return Opcode::_safe_call_sv($root, $obj->{Mask}, $evalsub); - } - diff --git a/lang/perl5.6/files/patch-ac b/lang/perl5.6/files/patch-ac deleted file mode 100644 index 41b4b73fb67a..000000000000 --- a/lang/perl5.6/files/patch-ac +++ /dev/null @@ -1,35 +0,0 @@ -$FreeBSD$ - ---- hints/freebsd.sh.orig Sun Jul 28 09:37:51 2002 -+++ hints/freebsd.sh Sun Jul 28 09:39:23 2002 -@@ -85,10 +85,20 @@ - d_setreuid='define' - d_setegid='undef' - d_seteuid='undef' -+ d_dosuid='define' - ;; - *) usevfork='true' -- usemymalloc='n' -+ case "$usemymalloc" in -+ "") usemymalloc='n' -+ ;; -+ esac - libswanted=`echo $libswanted | sed 's/ malloc / /'` -+ libswanted=`echo $libswanted | sed 's/ bind / /'` -+ d_setregid='define' -+ d_setreuid='define' -+ d_setegid='undef' -+ d_seteuid='undef' -+ d_dosuid='define' - ;; - esac - -@@ -115,7 +125,8 @@ - fi - lddlflags='-Bshareable' - fi -- cccdlflags='-DPIC -fpic' -+ cccdlflags='-DPIC -fPIC' -+ libswanted=`echo $libswanted | sed 's/ iconv / /'` - ;; - esac diff --git a/lang/perl5.6/files/patch-freebsd.sh b/lang/perl5.6/files/patch-freebsd.sh new file mode 100644 index 000000000000..b7c1121c17ed --- /dev/null +++ b/lang/perl5.6/files/patch-freebsd.sh @@ -0,0 +1,17 @@ +--- hints/freebsd.sh.orig Mon Jan 31 22:08:10 2005 ++++ hints/freebsd.sh Mon Jan 31 22:10:17 2005 +@@ -101,7 +101,14 @@ case "$osvers" in + "") usemymalloc='n' + ;; + esac ++ d_setregid='define' ++ d_setreuid='define' ++ d_setegid='define' ++ d_seteuid='define' + libswanted=`echo $libswanted | sed 's/ malloc / /'` ++ libswanted=`echo $libswanted | sed 's/ bind / /'` ++ libswanted=`echo $libswanted | sed 's/ iconv / /'` ++ libswanted=`echo $libswanted | sed 's/ dl / /'` + ;; + esac + diff --git a/lang/perl5.6/files/patch-makedepend b/lang/perl5.6/files/patch-makedepend deleted file mode 100644 index 39d99bc3ee42..000000000000 --- a/lang/perl5.6/files/patch-makedepend +++ /dev/null @@ -1,13 +0,0 @@ -$FreeBSD$ - ---- makedepend.SH.orig Wed May 29 19:29:05 2002 -+++ makedepend.SH Wed May 29 19:31:31 2002 -@@ -155,6 +155,8 @@ - $sed \ - -e '1d' \ - -e '/^#.*<stdin>/d' \ -+ -e '/^#.*<built-in>/d' \ -+ -e '/^#.*<command line>/d' \ - -e '/^#.*"-"/d' \ - -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ - -e 's/^[ ]*#[ ]*line/#/' \ diff --git a/lang/perl5.6/files/use.perl b/lang/perl5.6/files/use.perl index 0853b08da0a4..916f5f288e58 100644 --- a/lang/perl5.6/files/use.perl +++ b/lang/perl5.6/files/use.perl @@ -1,140 +1,264 @@ -#! %%PREFIX%%/bin/perl -w +#!/bin/sh + # $FreeBSD$ -use strict; -# XXX what to do with perldoc, pelbug, perlcc ?? +this=`echo -n $0 | /usr/bin/sed -e 's!^.*/!!'` +PERL_VERSION="%%PERL_VERSION%%" +MAKE_CONF=%%MAKE_CONF%% +banner=`date +"%F %T"` +banner="# added by use.perl $banner" +if [ -z "${OSVERSION}" ]; then + if [ -f /sbin/sysctl -a -x /sbin/sysctl ] ; then + osreldate=`/sbin/sysctl -n kern.osreldate` + else + osreldate=`/usr/sbin/sysctl -n kern.osreldate` + fi +else + osreldate=${OSVERSION} +fi -sub usage -{ - print STDERR <<EOF; -Usage: - $0 port -> /usr/bin/perl is the perl5 port - $0 system -> /usr/bin/perl is the system perl -EOF - exit 2; -} +if [ "x$this" = "xuse.perl" ]; then + PKG_PREFIX="%%PREFIX%%" + if [ "$1" = "port" ] ; then + need_remove_links=yes + need_create_links=yes + need_cleanup_make_conf=yes + need_cleanup_manpath=yes + need_spam_make_conf=yes + need_spam_manpath=yes + elif [ "$1" = "system" ] ; then + need_remove_links=yes + if [ $osreldate -lt 500036 ] ; then + need_base_system_perl=yes + fi + need_cleanup_make_conf=yes + need_cleanup_manpath=yes + else + echo 'Usage: + $0 port -> /usr/bin/perl is the perl5 port + $0 system -> /usr/bin/perl is the system perl' + exit 2; + fi +else + if [ "$2" = "POST-INSTALL" ] ; then + need_remove_links=yes + if [ $osreldate -ge 500036 -a $osreldate -lt 502100 ] ; then + need_create_links=yes + need_cleanup_make_conf=yes + need_cleanup_manpath=yes + need_spam_make_conf=yes + need_spam_manpath=yes + fi + need_post_install=yes + elif [ "$2" = "POST-DEINSTALL" ] ; then + need_remove_links=yes + if [ $osreldate -lt 500036 ] ; then + need_base_system_perl=yes + fi + need_cleanup_make_conf=yes + need_cleanup_manpath=yes + else + exit 0; + fi +fi -my $port_perl = '%%PREFIX%%/bin/perl'; -$port_perl =~ tr|/|/|s; +link_list=" + a2p + c2ph + find2perl + h2ph + h2xs + perlbug + perlcc + perldoc + pl2pm + pod2html + pod2latex + pod2man + pod2text + s2p + splain" +if [ $osreldate -ge 500036 ] ; then + link_list="" +fi +special_link_list=" + perl + perl5 + suidperl" -@ARGV == 1 or usage(); -if ($ARGV[0] eq 'port') { - switch_to_port(); -} elsif ($ARGV[0] eq 'system') { - switch_to_system(); -} else { - usage(); +do_remove_links() +{ + echo "Removing stale symlinks from /usr/bin..." + for binary in $link_list $special_link_list + do + if [ -L "/usr/bin/$binary" ] ; then + echo " Removing /usr/bin/$binary" + /bin/rm -f "/usr/bin/$binary" + else + echo " Skipping /usr/bin/$binary" + fi + done + bins=`/bin/ls /usr/bin/*perl*5.* ${PKG_PREFIX}/bin/*perl*5.* 2>/dev/null` + for binary in $bins + do + if [ -L "$binary" ] ; then + echo " Removing $binary installed by an older perl port" + /bin/rm -f "$binary" + fi + done + echo "Done." } -exit 0; - -# Both functions depend on the idea that switch_to_port leaves -# perl5 alone. If the wrapper is installed on a -current system, -# /usr/bin/perl5 will also be the wrapper. -sub switch_to_system +do_create_links() { - # protect against cases where people use PREFIX=/usr - if ($port_perl ne '/usr/bin/perl') { - unlink '/usr/bin/perl', '/usr/bin/suidperl', - '/usr/bin/perl%%PERL_VERSION%%'; - - link '/usr/bin/perl5', '/usr/bin/perl'; - link '/usr/bin/perl5', '/usr/bin/perl%%PERL_VERSION%%'; - - my $ident = `/usr/bin/ident -q /usr/bin/perl5`; - if ($ident =~ m#src/usr.bin/perl/perl.c#) { - link '/usr/bin/perl5', '/usr/bin/suidperl'; - } else { - link '/usr/bin/sperl5', '/usr/bin/suidperl'; - } - } - - open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!"; - print MK <<EOF; -# -- use.perl generated deltas -- # -# Created: @{[scalar localtime]} -# Setting to use base system perl: -.undef PERL_VER -.undef PERL_VERSION -.undef PERL_ARCH -.undef NOPERL -.undef NO_PERL - -EOF - close MK; - - open MPOLD, "< /etc/manpath.config" or die "/etc/manpath.config: $!"; - open MPNEW, "> /etc/manpath.config.new" or die "/etc/manpath.config.new: $!"; - while (<MPOLD>) { - next if m|use.perl generated line|; - next if m|^\s*OPTIONAL_MANPATH\s+\S+/lib/perl5/%%PERL_VERSION%%/man\s*$|; - print MPNEW; - } - close MPNEW; - close MPOLD; - rename '/etc/manpath.config', '/etc/manpath.config.bak'; - rename '/etc/manpath.config.new', '/etc/manpath.config'; + echo "Creating various symlinks in /usr/bin..." + for binary in $link_list + do + if [ -f "/usr/bin/$binary" ] ; then + echo " Backing up /usr/bin/$binary as /usr/bin/$binary.freebsd" + /bin/mv -f "/usr/bin/$binary" "/usr/bin/$binary.freebsd" + fi + if [ -e "/usr/bin/$binary" ] ; then + echo " *** /usr/bin/$binary is still there, which should not happen" + elif [ -e "$PKG_PREFIX/bin/$binary" ] ; then + echo " Symlinking $PKG_PREFIX/bin/$binary to /usr/bin/$binary" + /bin/ln -sf "$PKG_PREFIX/bin/$binary" "/usr/bin/$binary" + else + echo " *** $PKG_PREFIX/bin/$binary is not there, a symlink won't do any good" + fi + done + for binary in $special_link_list + do + if [ -f "/usr/bin/$binary" ] ; then + echo " Removing /usr/bin/$binary" + fi + bin=`echo $binary | /usr/bin/sed -e 's!perl5!perl!'` + bin=`echo $bin | /usr/bin/sed -e 's!suidperl!sperl!'` + if [ -e "/usr/bin/$binary.XXX" ] ; then + echo " *** /usr/bin/$binary is still there, which should not happen" + elif [ -e "$PKG_PREFIX/bin/${bin}%%PERL_VERSION%%" ] ; then + echo " Symlinking $PKG_PREFIX/bin/${bin}%%PERL_VERSION%% to /usr/bin/$binary" + /bin/ln -sf "$PKG_PREFIX/bin/${bin}%%PERL_VERSION%%" "/usr/bin/$binary" + else + echo " *** $PKG_PREFIX/bin/${bin}%%PERL_VERSION%% is not there, a symlink won't do any good" + fi + done + echo "Done." } -sub switch_to_port +do_base_system_perl() { - # protect against cases where people use PREFIX=/usr - if ($port_perl ne '/usr/bin/perl') { + echo "Restoring base system perl binaries..." + for binary in $link_list + do + if [ -e "/usr/bin/$binary" ] ; then + echo " *** /usr/bin/$binary is there, which should not happen" + else + if [ -f "/usr/bin/$binary.freebsd" ] ; then + echo " Moving /usr/bin/$binary.freebsd to /usr/bin/$binary" + /bin/mv -f "/usr/bin/$binary.freebsd" "/usr/bin/$binary" + else + echo " *** /usr/bin/$binary.freebsd is NOT there, nothing to restore" + fi + fi + done + for binary in $special_link_list + do + if [ -e "/usr/bin/$binary" ] ; then + echo " *** /usr/bin/$binary is there, which should not happen" + else + bin=`echo $binary | /usr/bin/sed -e 's!perl5!perl!'` + bin=`echo $bin | /usr/bin/sed -e 's!suidperl!sperl!'` + bins=`/bin/ls /usr/bin/${bin}5.* 2>/dev/null | /usr/bin/sort` + bin="" + for b in $bins + do + if [ -f $b -a ! -L $b ] ; then + bin=$b + fi + done + if [ -z $bin ] ; then + echo " *** cannot find what /usr/bin/$binary shall be restored FROM" + elif [ -f $bin ] ; then + echo " Hardlinking $bin to /usr/bin/$binary" + ln -f "$bin" "/usr/bin/$binary" + else + echo " *** $bin is NOT there, nothing to restore" + fi + fi + done + echo "Done." +} - my $need_perl5_link; - if (-e "/usr/bin/perl5" && !-l "/usr/bin/perl5") { - my $ident = `/usr/bin/ident -q /usr/bin/perl5`; - if ($ident =~ m#src/usr.bin/perl/perl.c#) { - rename '/usr/bin/perl', '/usr/bin/perl-wrapper'; - } else { - unlink '/usr/bin/perl'; - } - } else { - unlink "/usr/bin/perl5"; - $need_perl5_link = 1; - } +do_post_install() +{ + INCLUDEDIR=/usr/include + install -d ${PKG_PREFIX}/lib/perl5/site_perl/%%PERL_VERSION%%/%%PERL_ARCH%%/auto + install -d ${PKG_PREFIX}/lib/perl5/site_perl/%%PERL_VERSION%%/auto + install -d ${PKG_PREFIX}/lib/perl5/%%PERL_VERSION%%/man/man3 + cd ${INCLUDEDIR} && ${PKG_PREFIX}/bin/h2ph *.h machine/*.h sys/*.h >/dev/null +} - unlink '/usr/bin/suidperl', '/usr/bin/perl%%PERL_VERSION%%'; +do_cleanup_make_conf() +{ + echo -n "Cleaning up ${MAKE_CONF}..." + if [ -f ${MAKE_CONF} ] ; then + /usr/bin/awk 's=0; + /^#.*use.perl/ { s=1; mode=1 } + /^#/ { s=1; if (mode != 1) { mode=0 } } + /.*PERL.*=/ { s=1; if (mode == 1) { mode=2 } } + /^$/ { s=1; if (mode != 2) { mode = 0 } } + { if (s != 1) { mode = 0 } if (mode == 0) print }' ${MAKE_CONF} >${MAKE_CONF}.new + /bin/mv ${MAKE_CONF} ${MAKE_CONF}.bak + /bin/mv ${MAKE_CONF}.new ${MAKE_CONF} + fi + echo " Done." +} - symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl'; - symlink '%%PREFIX%%/bin/suidperl', '/usr/bin/suidperl'; - symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl%%PERL_VERSION%%'; - symlink '%%PREFIX%%/bin/perl', '/usr/bin/perl5' if $need_perl5_link; - } +do_cleanup_manpath() +{ + echo -n "Cleaning up /etc/manpath.config..." + if [ -f /etc/manpath.config ] ; then + /usr/bin/awk 's=0; + /^#.*use.perl/ { s=1; mode=1 } + /^#/ { s=1; if (mode != 1) { mode=0 } } + /^OPTIONAL_MANPATH.*perl5/ { s=1; if (mode == 1) { mode=2 } } + /^$/ { s=1; if (mode != 2) { mode = 0 } } + { 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 + fi + echo " Done." +} - open MK, ">> /etc/make.conf" or die "/etc/make.conf: $!"; - print MK <<EOF; -# -- use.perl generated deltas -- # -# Created: @{[scalar localtime]} -# Setting to use base perl from ports: -PERL_VER=%%PERL_VER%% -PERL_VERSION=%%PERL_VERSION%% -PERL_ARCH=%%PERL_ARCH%% -NOPERL=yo -NO_PERL=yo -NO_PERL_WRAPPER=yo +do_spam_make_conf() +{ + echo -n "Spamming ${MAKE_CONF}..." + echo "$banner" >>${MAKE_CONF} + echo "PERL_VER=%%PERL_VER%%" >>${MAKE_CONF} + echo "PERL_VERSION=%%PERL_VERSION%%" >>${MAKE_CONF} + if [ $osreldate -lt 500036 ] ; then + echo "NOPERL=yes" >>${MAKE_CONF} + fi + echo " Done." +} -EOF - close MK; +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." +} - my $perl_port_manpath = <<EOF; -# -- use.perl generated line -- # -OPTIONAL_MANPATH %%PREFIX%%/lib/perl5/%%PERL_VERSION%%/man -EOF +[ $need_remove_links ] && do_remove_links +[ $need_create_links ] && do_create_links +[ $need_base_system_perl ] && do_base_system_perl +[ $need_post_install ] && do_post_install +[ $need_cleanup_make_conf ] && do_cleanup_make_conf +[ $need_spam_make_conf ] && do_spam_make_conf +[ $need_cleanup_manpath ] && do_cleanup_manpath +[ $need_spam_manpath ] && do_spam_manpath - open MPOLD, "< /etc/manpath.config" or die "/etc/manpath.config: $!"; - open MPNEW, "> /etc/manpath.config.new" or die "/etc/manpath.config.new: $!"; - my $modified = 0; - while (<MPOLD>) { - if (!$modified && m|^\s*OPTIONAL_MANPATH\s+\S+/lib/perl5/\S+/man\s*$|) { - print MPNEW $perl_port_manpath; - $modified = 1; - } - print MPNEW; - } - print MPNEW $perl_port_manpath unless $modified; - close MPNEW; - close MPOLD; - rename '/etc/manpath.config', '/etc/manpath.config.bak'; - rename '/etc/manpath.config.new', '/etc/manpath.config'; -} +exit 0 |