Permalink
Browse files

NetBSD 1.4

  • Loading branch information...
itojun
itojun committed Oct 6, 1999
1 parent 8e5b747 commit aeaedd38dce5f4fbdcf3eec9d072531678813b90
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.20 1999/04/27 16:44:15 tron Exp $
+# FreeBSD Id: Makefile,v 1.20 1997/07/18 06:16:44 markm Exp
+#
+
+DISTNAME= perl5.004_04
+PKGNAME= perl-5.00404
+CATEGORIES= lang devel perl5
+MASTER_SITES= ftp://ftp.digital.com/pub/plan/perl/CPAN/src/5.0/ \
+ ftp://ftp.cdrom.com/pub/perl/CPAN/src/5.0/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://language.perl.com/index.html
+
+HAS_CONFIGURE= yes
+CONFIGURE_ENV+= PREFIX=${PREFIX}
+CONFIGURE_SCRIPT= Configure
+CONFIGURE_ARGS+= -sde -Dprefix=${PREFIX} -Doptimize="${CFLAGS}" \
+ -Darchname=${MACHINE_ARCH}-netbsd -Dusemymalloc=false
+MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}
+
+test:
+ @(cd ${WRKSRC}; ${MAKE} test)
+
+post-install:
+ @strip ${PREFIX}/bin/a2p
+ @strip ${PREFIX}/bin/perl
+
+.include "../../mk/bsd.pkg.mk"
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.3 1998/08/07 13:24:58 agc Exp $
+
+MD5 (perl5.004_04.tar.gz) = 2618029201ad19cfb9a7d02a498eb1f4
@@ -0,0 +1,174 @@
+$NetBSD: patch-aa,v 1.11 1998/12/02 21:14:41 tv Exp $
+
+--- Configure.orig Fri Oct 3 13:57:39 1997
++++ Configure Wed Dec 2 14:30:27 1998
+@@ -65,7 +65,7 @@
+ fi
+
+ : Proper PATH setting
+-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
++paths='/bin /usr/bin ${PREFIX}/bin /usr/ucb ${PREFIX} /usr/lbin'
+ paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+ paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
+ paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
+@@ -92,10 +92,10 @@
+ esac
+
+ : Sanity checks
+-if test ! -t 0; then
+- echo "Say 'sh $me', not 'sh <$me'"
+- exit 1
+-fi
++# if test ! -t 0; then
++# echo "Say 'sh $me', not 'sh <$me'"
++# exit 1
++# fi
+
+ : Test and see if we are running under ksh, either blatantly or in disguise.
+ if (PATH=.; alias -x) >/dev/null 2>&1; then
+@@ -725,7 +725,7 @@
+ archobjs=''
+ : Possible local include directories to search.
+ : Set locincpth to "" in a hint file to defeat local include searches.
+-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
++locincpth="${PREFIX}/include /opt/local/include /usr/gnu/include"
+ locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+ :
+ : no include file wanted by default
+@@ -735,14 +735,14 @@
+ xlibpth='/usr/lib/386 /lib/386'
+
+ : Possible local library directories to search.
+-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
++loclibpth="${PREFIX}/lib /opt/local/lib /usr/gnu/lib"
+ loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+
+ : general looking path for locating libraries
+ glibpth="/shlib /usr/shlib /usr/lib/pa1.1 /usr/lib/large"
+ glibpth="$glibpth /lib /usr/lib $xlibpth"
+ glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
+-glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
++glibpth="$glibpth /usr/ccs/lib /usr/ucblib ${PREFIX}/lib"
+
+ : Private path used by Configure to find libraries. Its value
+ : is prepended to libpth. This variable takes care of special
+@@ -753,9 +753,8 @@
+ defvoidused=15
+
+ : List of libraries we want.
+-libswanted='sfio net socket inet nsl nm ndbm gdbm dbm db malloc dl'
+-libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
+-libswanted="$libswanted ucb bsd BSD PW x"
++# libswanted='sfio net socket inet nsl nm ndbm gdbm dbm db malloc dl'
++libswanted='m posix crypt'
+ : We probably want to search /usr/shlib before most other libraries.
+ : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
+ glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
+@@ -2365,7 +2364,7 @@
+ : determine root of directory hierarchy where package will be installed.
+ case "$prefix" in
+ '')
+- dflt=`./loc . /usr/local /usr/local /local /opt /usr`
++ dflt=`./loc . ${PREFIX} ${PREFIX} /local /opt /usr`
+ ;;
+ *)
+ dflt="$prefix"
+@@ -2375,10 +2374,10 @@
+
+ By default, $package will be installed in $dflt/bin, manual
+ pages under $dflt/man, etc..., i.e. with $dflt as prefix for
+-all installation directories. Typically set to /usr/local, but you
++all installation directories. Typically set to ${PREFIX}, but you
+ may choose /usr if you wish to install $package among your system
+ binaries. If you wish to have binaries under /bin but manual pages
+-under /usr/local/man, that's ok: you will be prompted separately
++under ${PREFIX}/man, that's ok: you will be prompted separately
+ for each of the installation directories, the prefix being only used
+ to set the defaults.
+
+@@ -2426,7 +2425,7 @@
+ esac'
+
+ : determine where private library files go
+-: Usual default is /usr/local/lib/perl5. Also allow things like
++: Usual default is ${PREFIX}/lib/perl5. Also allow things like
+ : /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
+ case "$prefix" in
+ *perl*) set dflt privlib lib ;;
+@@ -2501,7 +2500,7 @@
+ case "$archlib" in
+ '')
+ case "$privlib" in
+- '') dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib`
++ '') dflt=`./loc . "." $prefixexp/lib ${PREFIX}/lib /usr/lib /lib`
+ set dflt
+ eval $prefixup
+ ;;
+@@ -2986,8 +2985,8 @@
+ syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
+ syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
+ syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
+- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+- syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
++ syspath="$syspath ${PREFIX}/man/u_man/man1 ${PREFIX}/man/l_man/man1"
++ syspath="$syspath /usr/man/man.L /local/man/man1 ${PREFIX}/man/man1"
+ sysman=`./loc . /usr/man/man1 $syspath`
+ ;;
+ esac
+@@ -3268,7 +3267,7 @@
+ : Set private lib path
+ case "$plibpth" in
+ '') if ./mips; then
+- plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
++ plibpth="$incpath/usr/lib ${PREFIX}/lib /usr/ccs/lib"
+ fi;;
+ esac
+ case "$libpth" in
+@@ -4742,15 +4741,15 @@
+ shrpdir=$archlibexp/CORE
+ xxx=''
+ tmp_shrpenv=''
+-if "$useshrplib"; then
++if true; then
+ case "$osname" in
+ aix)
+ # We'll set it in Makefile.SH...
+ ;;
+- solaris|netbsd)
++ solaris)
+ xxx="-R $shrpdir"
+ ;;
+- freebsd)
++ freebsd|netbsd)
+ xxx="-Wl,-R$shrpdir"
+ ;;
+ linux|irix*|dec_osf)
+@@ -4965,8 +4964,8 @@
+ esac
+
+ echo "If you don't want the manual sources installed, answer 'none'."
+-: We dont use /usr/local/man/man3 because some man programs will
+-: only show the /usr/local/man/man3 contents, and not the system ones,
++: We dont use ${PREFIX}/man/man3 because some man programs will
++: only show the ${PREFIX}/man/man3 contents, and not the system ones,
+ : thus man less will show the perl module less.pm, but not the system
+ : less command. We might also conflict with TCL man pages.
+ : However, something like /opt/perl/man/man3 is fine.
+@@ -5413,7 +5412,7 @@
+ : guess some guesses
+ $test -d /usr/share/scripts && dflt=/usr/share/scripts
+ $test -d /usr/share/bin && dflt=/usr/share/bin
+- $test -d /usr/local/script && dflt=/usr/local/script
++ $test -d ${PREFIX}/script && dflt=${PREFIX}/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
+@@ -8726,7 +8725,7 @@
+ case "$ranlib" in
+ :) ranlib='';;
+ '')
+- ranlib=`./loc ranlib X /usr/bin /bin /usr/local/bin`
++ ranlib=`./loc ranlib X /usr/bin /bin ${PREFIX}/bin`
+ $test -f $ranlib || ranlib=''
+ ;;
+ esac
@@ -0,0 +1,42 @@
+$NetBSD: patch-ab,v 1.3 1998/08/07 11:09:23 agc Exp $
+
+--- installperl.BAK Wed Nov 19 23:02:26 1997
++++ installperl Wed Nov 19 23:04:08 1997
+@@ -93,7 +93,7 @@
+ safe_unlink("$installbin/sperl$ver$exe_ext");
+ if ($d_dosuid) {
+ copy("suidperl$exe_ext", "$installbin/sperl$ver$exe_ext");
+- chmod(04711, "$installbin/sperl$ver$exe_ext");
++ chmod(04111, "$installbin/sperl$ver$exe_ext");
+ }
+
+ # Install library files.
+@@ -156,17 +156,17 @@
+ (-l $usrbinperl) &&
+ ((readlink $usrbinperl) eq $expinstperl));
+ }
+- if ((! $mainperl_is_instperl) &&
+- (yn("Many scripts expect perl to be installed as $usrbinperl.\n" .
+- "Do you wish to have $usrbinperl be the same as\n" .
+- "$expinstperl? [y] ")))
+- {
+- unlink($usrbinperl);
+- eval { CORE::link $instperl, $usrbinperl } ||
+- eval { symlink $expinstperl, $usrbinperl } ||
+- copy($instperl, $usrbinperl);
+- $mainperl_is_instperl = 1;
+- }
++# if ((! $mainperl_is_instperl) &&
++# (yn("Many scripts expect perl to be installed as $usrbinperl.\n" .
++# "Do you wish to have $usrbinperl be the same as\n" .
++# "$expinstperl? [y] ")))
++# {
++# unlink($usrbinperl);
++# eval { CORE::link $instperl, $usrbinperl } ||
++# eval { symlink $expinstperl, $usrbinperl } ||
++# copy($instperl, $usrbinperl);
++# $mainperl_is_instperl = 1;
++# }
+ }
+
+ # Make links to ordinary names if installbin directory isn't current directory.
@@ -0,0 +1,20 @@
+$NetBSD: patch-ac,v 1.3 1998/08/07 11:09:23 agc Exp $
+
+--- perl.h.BAK Wed Nov 19 23:07:32 1997
++++ perl.h Wed Nov 19 23:08:54 1997
+@@ -223,6 +223,15 @@
+ # include <sys/param.h>
+ #endif
+
++/* needed for IAMSUID case for 4.4BSD systems
++ * XXX there should probably be a Configure variable
++ */
++
++#ifdef I_SYS_PARAM
++#if (defined (BSD) && (BSD >= 199306))
++# include <sys/mount.h>
++#endif /* !BSD */
++#endif /* !I_SYS_PARAM */
+
+ /* Use all the "standard" definitions? */
+ #if defined(STANDARD_C) && defined(I_STDLIB)
@@ -0,0 +1,25 @@
+$NetBSD: patch-ad,v 1.3 1998/08/07 11:09:23 agc Exp $
+
+--- perl.c.BAK Wed Nov 19 23:09:31 1997
++++ perl.c Wed Nov 19 23:10:58 1997
+@@ -2036,6 +2036,20 @@
+ croak("Can't swap uid and euid"); /* really paranoid */
+ if (Stat(SvPVX(GvSV(curcop->cop_filegv)),&tmpstatbuf) < 0)
+ croak("Permission denied"); /* testing full pathname here */
++#if (defined(BSD) && (BSD >= 199306))
++#ifdef IAMSUID
++ {
++ struct statfs stfs;
++
++ if (fstatfs(fileno(rsfp),&stfs) < 0)
++ croak("Can't statfs filesystem of script \"%s\"",origfilename);
++
++ if (stfs.f_flags & MNT_NOSUID)
++ croak("Permission denied");
++ }
++#endif /* IAMSUID */
++#endif /* BSD */
++
+ if (tmpstatbuf.st_dev != statbuf.st_dev ||
+ tmpstatbuf.st_ino != statbuf.st_ino) {
+ (void)PerlIO_close(rsfp);
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.3 1998/08/07 11:09:23 agc Exp $
+
+--- makedepend.SH.BAK Wed Nov 19 23:11:49 1997
++++ makedepend.SH Wed Nov 19 23:12:34 1997
+@@ -66,6 +66,7 @@
+ # to be out of date. I don't know if OS/2 has touch, so do this:
+ case "$osname" in
+ os2) ;;
++ netbsd) ;;
+ *) $touch $firstmakefile ;;
+ esac
+ fi
@@ -0,0 +1,80 @@
+$NetBSD: patch-af,v 1.6 1998/12/02 21:14:41 tv Exp $
+
+--- hints/netbsd.sh.orig Thu May 8 11:52:59 1997
++++ hints/netbsd.sh Wed Dec 2 14:21:34 1998
+@@ -1,12 +1,11 @@
+ # hints/netbsd.sh
+ #
+-# talk to mrg@eterna.com.au if you want to change this file.
++# talk to packages@netbsd.org if you want to change this file.
+ #
+ # netbsd keeps dynamic loading dl*() functions in /usr/lib/crt0.o,
+ # so Configure doesn't find them (unless you abandon the nm scan).
+ # this should be *just* 0.9 below as netbsd 0.9a was the first to
+-# introduce shared libraries. however, they don't work/build on
+-# pmax, powerpc and alpha ports correctly, yet.
++# introduce shared libraries.
+
+ case "$archname" in
+ '')
+@@ -19,26 +18,26 @@
+ usedl="$undef"
+ ;;
+ *)
+- case `uname -m` in
+- alpha|powerpc|pmax)
++ if [ -f /usr/libexec/ld.elf_so ]; then
++ d_dlopen=$define
++ d_dlerror=$define
++ ccdlflags="-Wl,-E -Wl,-R${PREFIX}/lib $ccdlflags"
++ cccdlflags="-DPIC -fPIC $cccdlflags"
++ lddlflags="--whole-archive -shared $lddlflags"
++ elif [ "`uname -m`" = "pmax" ]; then
++# NetBSD 1.3 and 1.3.1 on pmax shipped an `old' ld.so, which will not work.
+ d_dlopen=$undef
+- ;;
+-# this doesn't work (yet).
+-# alpha)
+-# d_dlopen=$define
+-# d_dlerror=$define
+-# cccdlflags="-DPIC -fPIC $cccdlflags"
+-# lddlflags="-shared $lddlflags"
+-# ;;
+- *)
++ elif [ -f /usr/libexec/ld.so ]; then
+ d_dlopen=$define
+ d_dlerror=$define
++ ccdlflags="-Wl,-R${PREFIX}/lib $ccdlflags"
+ # we use -fPIC here because -fpic is *NOT* enough for some of the
+ # extensions like Tk on some netbsd platforms (the sparc is one)
+ cccdlflags="-DPIC -fPIC $cccdlflags"
+ lddlflags="-Bforcearchive -Bshareable $lddlflags"
+- ;;
+- esac
++ else
++ d_dlopen=$undef
++ fi
+ ;;
+ esac
+
+@@ -47,15 +46,18 @@
+ # way to make perl call setuid() or setgid(). if they aren't, then
+ # ($<, $>) = ($u, $u); will work (same for $(/$)). this is because
+ # you can not change the real userid of a process under 4.4BSD.
+-# netbsd fixed this in 1.2A.
++# netbsd fixed this in 1.3.2.
+ case "$osvers" in
+-0.9*|1.0*|1.1*|1.2_*|1.2|1.2.*)
++0.9*|1.[012]*|1.3|1.3.1)
+ d_setregid="$undef"
+ d_setreuid="$undef"
+ d_setrgid="$undef"
+ d_setruid="$undef"
+ ;;
+ esac
++
++# there's no problem with vfork.
++d_vfork="$define"
+
+ # Avoid telldir prototype conflict in pp_sys.c (NetBSD uses const DIR *)
+ # Configure should test for this. Volunteers?
Oops, something went wrong.

0 comments on commit aeaedd3

Please sign in to comment.