diff options
author | tobez <tobez@FreeBSD.org> | 2002-06-16 20:40:13 +0800 |
---|---|---|
committer | tobez <tobez@FreeBSD.org> | 2002-06-16 20:40:13 +0800 |
commit | 12c0bd96d7fc9a9e342fafe015c9f7bc6967ec0c (patch) | |
tree | 945f22c8d6929f40370cd34db317b0c37e8cab19 /lang/perl5.8 | |
parent | a32ae4b37ff635528a37e7c61d5002fa68cdca7b (diff) | |
download | freebsd-ports-gnome-12c0bd96d7fc9a9e342fafe015c9f7bc6967ec0c.tar.gz freebsd-ports-gnome-12c0bd96d7fc9a9e342fafe015c9f7bc6967ec0c.tar.zst freebsd-ports-gnome-12c0bd96d7fc9a9e342fafe015c9f7bc6967ec0c.zip |
Fix manpath.config patching in case there is no system perl manpath
(read: -current). No PORTREVISION bump.
Diffstat (limited to 'lang/perl5.8')
-rw-r--r-- | lang/perl5.8/files/use.perl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lang/perl5.8/files/use.perl b/lang/perl5.8/files/use.perl index 7769cdd49d77..bed88bd46d44 100644 --- a/lang/perl5.8/files/use.perl +++ b/lang/perl5.8/files/use.perl @@ -109,15 +109,22 @@ NO_PERL_WRAPPER=yo 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>) { - print MPNEW <<EOF if m|^\s*OPTIONAL_MANPATH\s+\S+/lib/perl5/\S+/man\s*$|; + my $perl_port_manpath = <<EOF; # -- use.perl generated line -- # OPTIONAL_MANPATH %%PREFIX%%/lib/perl5/%%PERL_VERSION%%/man EOF + + 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'; |