summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorAndrew Fresh <afresh1@cvs.openbsd.org>2014-12-24 03:53:06 +0000
committerAndrew Fresh <afresh1@cvs.openbsd.org>2014-12-24 03:53:06 +0000
commite72b3d47e36057e51a83918a9a84a172f1fd12a2 (patch)
treee422026d680c76038826d3a02016dcebed0a6711 /gnu/usr.bin
parenta0c2786d8f377a1fc46a5d8411d38c6cc538f848 (diff)
Avoid /usr/local while building perl, but allow it for ports
commit it deraadt@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/perl/hints/openbsd.sh4
-rw-r--r--gnu/usr.bin/perl/installperl13
2 files changed, 15 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/hints/openbsd.sh b/gnu/usr.bin/perl/hints/openbsd.sh
index f4b6def5241..a81b82a26e9 100644
--- a/gnu/usr.bin/perl/hints/openbsd.sh
+++ b/gnu/usr.bin/perl/hints/openbsd.sh
@@ -147,8 +147,8 @@ case "$openbsd_distribution" in
siteprefix='/usr/local'
siteprefixexp='/usr/local'
# Ports installs non-std libs in /usr/local/lib so look there too
- locincpth='/usr/local/include'
- loclibpth='/usr/local/lib'
+ locincpth=''
+ loclibpth=''
# Link perl with shared libperl
if [ "$usedl" = "$define" -a -r $src/shlib_version ]; then
useshrplib=true
diff --git a/gnu/usr.bin/perl/installperl b/gnu/usr.bin/perl/installperl
index e0335b7a63c..56bc9a74ba9 100644
--- a/gnu/usr.bin/perl/installperl
+++ b/gnu/usr.bin/perl/installperl
@@ -751,6 +751,19 @@ sub installlib {
return unless $do_installprivlib;
}
+ if ($name eq 'Config_heavy.pl') {
+ open my $ifh, '<', $_ or die $!;
+ $_ = "$_.local";
+ 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.