summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-04-29 22:56:06 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-04-29 22:56:06 +0000
commit34f9bf6909906fd38708a02be6a1882168b8f631 (patch)
tree06b51fab29857441400d3af27ee1379fc35a05d8 /gnu
parent28d9bfb21210e90251556c888367330d5e9645ab (diff)
New configuration method, use a combination of hints and config.over. Also add in OpenBSD-specific patches
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/Configure4
-rw-r--r--gnu/usr.bin/perl/Makefile.bsd-wrapper8
-rw-r--r--gnu/usr.bin/perl/hints/openbsd.sh32
-rw-r--r--gnu/usr.bin/perl/installperl69
4 files changed, 91 insertions, 22 deletions
diff --git a/gnu/usr.bin/perl/Configure b/gnu/usr.bin/perl/Configure
index 5bcdbdaa5c4..4496e4a6421 100644
--- a/gnu/usr.bin/perl/Configure
+++ b/gnu/usr.bin/perl/Configure
@@ -18,7 +18,7 @@
# you may fetch it yourself from your nearest archive site.)
#
-# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+# $Id: Configure,v 1.5 1999/04/29 22:50:50 millert Exp $
#
# Generated on Tue Jul 7 10:10:21 EDT 1998 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by jhi@iki.fi)
@@ -2524,7 +2524,7 @@ $undef|false) afs=false ;;
fi
;;
esac
-if $afs; then
+if test $afs = "true"; then
echo "AFS may be running... I'll be extra cautious then..." >&4
else
echo "AFS does not seem to be running..." >&4
diff --git a/gnu/usr.bin/perl/Makefile.bsd-wrapper b/gnu/usr.bin/perl/Makefile.bsd-wrapper
index 7f06f0e3c5c..4e13aa4ae91 100644
--- a/gnu/usr.bin/perl/Makefile.bsd-wrapper
+++ b/gnu/usr.bin/perl/Makefile.bsd-wrapper
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.bsd-wrapper,v 1.23 1998/10/19 17:09:39 millert Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.24 1999/04/29 22:56:00 millert Exp $
#
-# Build wrapper for Perl 5.003.
+# Build wrapper for Perl 5.005_03.
#
# Our lndir is hacked; specify a full path to avoid potential conflicts
@@ -105,9 +105,9 @@ CLEANFILES= config.sh ${MAN} ${MANALL}
all: ${GENERATED}
(cd ${.OBJDIR}; ${MAKE})
-config.sh: config.sh.OpenBSD
+config.sh:
(cd ${.OBJDIR}; /usr/bin/env PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
- /bin/sh Configure -f config.sh.OpenBSD -dsE)
+ /bin/sh Configure -Dopenbsd_distribution=defined -dsE)
Makefile:
(cd ${.OBJDIR}; /bin/sh Makefile.SH)
diff --git a/gnu/usr.bin/perl/hints/openbsd.sh b/gnu/usr.bin/perl/hints/openbsd.sh
index e9d8ea483d5..81bdf6721f2 100644
--- a/gnu/usr.bin/perl/hints/openbsd.sh
+++ b/gnu/usr.bin/perl/hints/openbsd.sh
@@ -4,6 +4,9 @@
# Edited to allow Configure command-line overrides by
# Andy Dougherty <doughera@lafcol.lafayette.edu>
#
+# To build with distribution paths, use:
+# ./Configure -des -Dopenbsd_distribution=defined
+#
# OpenBSD has a better malloc than perl...
test "$usemymalloc" || usemymalloc='n'
@@ -15,10 +18,10 @@ usevfork='true'
# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions
# in 4.4BSD. Configure will find these but they are just emulated
# and do not have the same semantics as in 4.3BSD.
-d_setregid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
+d_setregid=$undef
+d_setreuid=$undef
+d_setrgid=$undef
+d_setruid=$undef
#
# Not all platforms support shared libs...
@@ -42,7 +45,7 @@ esac
libswanted=`echo $libswanted | sed 's/ crypt / /'`
# Configure can't figure this out non-interactively
-d_suidsafe='define'
+d_suidsafe=$define
# cc is gcc so we can do better than -O
# Allow a command-line override, such as -Doptimize=-g
@@ -58,4 +61,23 @@ $define|true|[yY]*)
esac
EOCBU
+# When building in the OpenBSD tree we use different paths
+# This is only part of the story, the rest comes from config.over
+case "$openbsd_distribution" in
+''|$undef|false) ;;
+*)
+ # We put things in /usr, not /usr/local
+ prefix='/usr'
+ prefixexp='/usr'
+ sysman='/usr/share/man/man1'
+ # Never look for things in /usr/local
+ glibpth='/usr/lib'
+ libpth='/usr/lib'
+ locincpth=''
+ loclibpth=''
+ ccflags=''
+ cppflags=''
+ ;;
+esac
+
# end
diff --git a/gnu/usr.bin/perl/installperl b/gnu/usr.bin/perl/installperl
index b1d5bfb5c93..f3ca6b182b0 100644
--- a/gnu/usr.bin/perl/installperl
+++ b/gnu/usr.bin/perl/installperl
@@ -1,4 +1,8 @@
#!./perl
+# $OpenBSD: installperl,v 1.7 1997/11/30 07:48:39 millert Exp $
+#
+# This is hacked up, in order to support DESTDIR and INSTALL_STRIP.
+#
BEGIN {
require 5.004;
@@ -25,7 +29,7 @@ use File::Copy ();
use File::Path ();
use ExtUtils::Packlist;
use Config;
-use subs qw(unlink link chmod);
+use subs qw(unlink link chmod cmd);
use vars qw($packlist);
# override the ones in the rest of the script
@@ -90,14 +94,38 @@ die "Patchlevel of perl ($patchlevel)",
"and patchlevel of config.sh ($Config{'PATCHLEVEL'}) don't match\n"
if $patchlevel != $Config{'PATCHLEVEL'};
-# Fetch some frequently-used items from %Config
-my $installbin = $Config{installbin};
-my $installscript = $Config{installscript};
-my $installprivlib = $Config{installprivlib};
-my $installarchlib = $Config{installarchlib};
-my $installsitelib = $Config{installsitelib};
-my $installsitearch = $Config{installsitearch};
-my $installman1dir = $Config{installman1dir};
+my $installbin;
+my $installscript;
+my $installprivlib;
+my $installarchlib;
+my $installsitelib;
+my $installsitearch;
+my $installman1dir;
+my $installdest = $ENV{"DESTDIR"};
+
+$installdest =~ s:/+$::;
+if ($installdest ne '') {
+ # Fetch some frequently-used items from %Config, prefixing with DESTDIR.
+ $installbin = "$installdest/$Config{installbin}";
+ $installscript = "$installdest/$Config{installscript}";
+ $installprivlib = "$installdest/$Config{installprivlib}";
+ $installarchlib = "$installdest/$Config{installarchlib}";
+ $installsitelib = "$installdest/$Config{installsitelib}";
+ $installsitearch = "$installdest/$Config{installsitearch}";
+ $installman1dir = "$installdest/$Config{installman1dir}";
+ # Also whack $mainperldir.
+ $mainperldir = "$installdest/$mainperldir";
+} else {
+ # Fetch some frequently-used items from %Config
+ $installbin = $Config{installbin};
+ $installscript = $Config{installscript};
+ $installprivlib = $Config{installprivlib};
+ $installarchlib = $Config{installarchlib};
+ $installsitelib = $Config{installsitelib};
+ $installsitearch = $Config{installsitearch};
+ $installman1dir = $Config{installman1dir};
+}
+
my $man1ext = $Config{man1ext};
my $libperl = $Config{libperl};
# Shared library and dynamic loading suffixes.
@@ -150,6 +178,14 @@ chmod(0755, "$installbin/$perldll");
my $packlist = ExtUtils::Packlist->new("$installarchlib/.packlist");
# First we install the version-numbered executables.
+my $installcmd;
+if (defined($ENV{"INSTALL"})) {
+ $installcmd = $ENV{"INSTALL"}
+ . " " . $ENV{"INSTALL_COPY"}
+ . " " . $ENV{"INSTALL_STRIP"};
+} else {
+ $installcmd = "cp";
+}
if ($Is_VMS) {
safe_unlink("$installbin/$perl$exe_ext");
@@ -171,7 +207,8 @@ elsif ($^O eq 'mpeix') {
}
elsif ($^O ne 'dos') {
safe_unlink("$installbin/$perl$ver$exe_ext");
- copy("perl$exe_ext", "$installbin/$perl$ver$exe_ext");
+ cmd("$installcmd perl$exe_ext $installbin/perl$ver$exe_ext");
+ #copy("perl$exe_ext", "$installbin/$perl$ver$exe_ext");
chmod(0755, "$installbin/$perl$ver$exe_ext");
}
else {
@@ -181,7 +218,8 @@ else {
safe_unlink("$installbin/s$perl$ver$exe_ext");
if ($d_dosuid) {
- copy("suidperl$exe_ext", "$installbin/s$perl$ver$exe_ext");
+ cmd("$installcmd suidperl$exe_ext $installbin/sperl$ver$exe_ext");
+ #copy("suidperl$exe_ext", "$installbin/s$perl$ver$exe_ext");
chmod(04711, "$installbin/s$perl$ver$exe_ext");
}
@@ -486,6 +524,15 @@ sub link {
$success;
}
+sub cmd {
+ my($cmd) = @_;
+ print STDERR " $cmd\n";
+ unless ($nonono) {
+ system $cmd;
+ warn "Command failed!!!\n" if $?;
+ }
+}
+
sub chmod {
my($mode,$name) = @_;