mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Build install Config_heavy.pl during build not install
Needed for noperm builds OK natano@
This commit is contained in:
parent
5f2ede6cf5
commit
5271000b44
@ -1098,6 +1098,18 @@ my $orig_heavy_txt = "";
|
||||
}
|
||||
|
||||
if ($orig_config_txt ne $config_txt or $orig_heavy_txt ne $heavy_txt) {
|
||||
# During the build don't look in /usr/local for libs or includes
|
||||
# but after, we want to let modules look there.
|
||||
my $install_heavy_txt = $heavy_txt;
|
||||
$install_heavy_txt =~ s,^(ccflags|cppflags)[^=]*='[^']+,$& -I/usr/local/include,gm;
|
||||
$install_heavy_txt =~ s,^(ldflags|lddlflags)[^=]*='[^']+,$& -L/usr/local/lib,gm;
|
||||
|
||||
open INSTALL_CONFIG_HEAVY, ">", "$Config_heavy.install"
|
||||
or die "Can't open install $Config_heavy: $!\n";
|
||||
print INSTALL_CONFIG_HEAVY $install_heavy_txt;
|
||||
close INSTALL_CONFIG_HEAVY;
|
||||
print "updated install $Config_heavy\n";
|
||||
|
||||
open CONFIG, ">", $Config_PM or die "Can't open $Config_PM: $!\n";
|
||||
open CONFIG_HEAVY, ">", $Config_heavy or die "Can't open $Config_heavy: $!\n";
|
||||
print CONFIG $config_txt;
|
||||
|
@ -696,6 +696,10 @@ sub installlib {
|
||||
return;
|
||||
}
|
||||
|
||||
# If we have different install version, install that instead
|
||||
return if -e "$_.install";
|
||||
$name =~ s/\.install$//;
|
||||
|
||||
# ignore patch backups, RCS files, emacs backup & temp files and the
|
||||
# .exists files, .PL files, and test files.
|
||||
return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util\.pl$|^filter-util\.pl$|^uupacktool\.pl$|^\.gitignore$} ||
|
||||
@ -765,19 +769,6 @@ sub installlib {
|
||||
return unless $do_installprivlib;
|
||||
}
|
||||
|
||||
if ($name eq 'Config_heavy.pl') {
|
||||
open my $ifh, '<', $_ or die $!;
|
||||
$_ = "$_.orig";
|
||||
open my $ofh, '>', $_ or die $!;
|
||||
while (my $l = <$ifh>) {
|
||||
$l =~ s,^(ccflags|cppflags)[^=]*='[^']+,$& -I/usr/local/include,;
|
||||
$l =~ s,^(ldflags|lddlflags)[^=]*='[^']+,$& -L/usr/local/lib,;
|
||||
print $ofh $l;
|
||||
}
|
||||
close $ifh;
|
||||
close $ofh;
|
||||
}
|
||||
|
||||
if ($Is_NetWare && !$opts{netware} && /\.(?:nlp|nlm|bs)$/) {
|
||||
# Don't copy .nlp,.nlm files, doesn't make sense on Windows and also
|
||||
# if copied will give problems when building new extensions.
|
||||
|
Loading…
Reference in New Issue
Block a user