Fix manpath.config patching in case there is no system perl manpath

(read: -current).  No PORTREVISION bump.
This commit is contained in:
Anton Berezin 2002-06-16 12:40:13 +00:00
parent 5596d33392
commit c482b493eb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61363
7 changed files with 77 additions and 28 deletions

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';