summaryrefslogtreecommitdiff
path: root/lang/perl5/patches
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-06-24 06:43:43 +0000
committerjlam <jlam@pkgsrc.org>2005-06-24 06:43:43 +0000
commitc2fb31ba79b4e2677da1e193c01a2acd5a84987c (patch)
tree666a7e5cc344f7ca6390ba1b81aaa8b1490d242a /lang/perl5/patches
parentda0eb1e229aed50d42e5ca1cc26107c9a3660e51 (diff)
downloadpkgsrc-c2fb31ba79b4e2677da1e193c01a2acd5a84987c.tar.gz
Drop the perl-5.6.x package from pkgsrc. Remove lang/perl58 and update
lang/perl5 to perl-5.8.6nb4. Modify packages that referred to lang/perl58 to point to lang/perl5 instead.
Diffstat (limited to 'lang/perl5/patches')
-rw-r--r--lang/perl5/patches/patch-aa136
-rw-r--r--lang/perl5/patches/patch-ac20
-rw-r--r--lang/perl5/patches/patch-ad51
-rw-r--r--lang/perl5/patches/patch-ae61
-rw-r--r--lang/perl5/patches/patch-af35
-rw-r--r--lang/perl5/patches/patch-ag86
-rw-r--r--lang/perl5/patches/patch-ah44
-rw-r--r--lang/perl5/patches/patch-aj31
-rw-r--r--lang/perl5/patches/patch-al32
-rw-r--r--lang/perl5/patches/patch-am53
-rw-r--r--lang/perl5/patches/patch-ba111
-rw-r--r--lang/perl5/patches/patch-bb32
-rw-r--r--lang/perl5/patches/patch-bc15
-rw-r--r--lang/perl5/patches/patch-bd28
-rw-r--r--lang/perl5/patches/patch-be24
-rw-r--r--lang/perl5/patches/patch-bf24
-rw-r--r--lang/perl5/patches/patch-ca66
-rw-r--r--lang/perl5/patches/patch-cb25
-rw-r--r--lang/perl5/patches/patch-cc32
-rw-r--r--lang/perl5/patches/patch-cd12
-rw-r--r--lang/perl5/patches/patch-ce12
-rw-r--r--lang/perl5/patches/patch-cf12
-rw-r--r--lang/perl5/patches/patch-cg13
-rw-r--r--lang/perl5/patches/patch-ch13
-rw-r--r--lang/perl5/patches/patch-ci18
-rw-r--r--lang/perl5/patches/patch-cj123
-rw-r--r--lang/perl5/patches/patch-ck25
-rw-r--r--lang/perl5/patches/patch-cl21
-rw-r--r--lang/perl5/patches/patch-zc36
29 files changed, 615 insertions, 576 deletions
diff --git a/lang/perl5/patches/patch-aa b/lang/perl5/patches/patch-aa
index 25b0b41446d..68259c37791 100644
--- a/lang/perl5/patches/patch-aa
+++ b/lang/perl5/patches/patch-aa
@@ -1,96 +1,50 @@
-$NetBSD: patch-aa,v 1.25 2003/10/05 14:16:41 grant Exp $
+$NetBSD: patch-aa,v 1.26 2005/06/24 06:43:45 jlam Exp $
---- Configure.orig Sun Mar 18 22:03:33 2001
-+++ Configure Fri Oct 3 20:55:27 2003
-@@ -891,6 +891,8 @@
- sitelib=''
- sitelib_stem=''
- sitelibexp=''
-+installsiteman1dir=''
-+installsiteman3dir=''
- siteprefix=''
- siteprefixexp=''
- sizesize=''
-@@ -6598,7 +6600,7 @@
- esac
- for thisflag in $ldflags; do
- case "$thisflag" in
-- -L*|-R*)
-+ -L*|-R*|-Wl,-R*)
- case " $dflt " in
- *" $thisflag "*) ;;
- *) dflt="$dflt $thisflag" ;;
-@@ -6807,12 +6809,18 @@
- aix)
- # We'll set it in Makefile.SH...
- ;;
-- solaris|netbsd)
-+ solaris)
- xxx="-R $shrpdir"
- ;;
-+ netbsd)
-+ xxx="-Wl,-R$shrpdir"
-+ ;;
- freebsd)
- xxx="-Wl,-R$shrpdir"
- ;;
-+ bsdos)
-+ xxx="-Wl,-R$shrpdir"
-+ ;;
- linux|irix*|dec_osf)
- xxx="-Wl,-rpath,$shrpdir"
- ;;
-@@ -6966,6 +6974,17 @@
- ;;
- esac
+--- lib/ExtUtils/MM_Unix.pm.orig 2004-01-05 17:34:59.000000000 -0500
++++ lib/ExtUtils/MM_Unix.pm
+@@ -12,7 +12,7 @@ use DirHandle;
-+case "$installsiteman1dir" in
-+'') dflt="$installman1dir" ;;
-+*) dflt="$installsiteman1dir" ;;
-+esac
-+set installsiteman1dir installsiteman1dir none
-+eval $prefixit
-+fn=d~+
-+rp="Where do the site-specific manual pages (source) go?"
-+. ./getfile
-+installsiteman1dir="$ans"
-+
- : see if we can have long filenames
- echo " "
- first=123456789abcdef
-@@ -7090,6 +7109,17 @@
- ;;
- esac
+ use vars qw($VERSION @ISA
+ $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Win95 $Is_Dos $Is_VOS
+- $Is_QNX $Is_AIX $Is_OSF $Is_IRIX $Is_NetBSD $Is_BSD
++ $Is_QNX $Is_AIX $Is_OSF $Is_IRIX $Is_BSD $Is_Interix
+ $Is_SunOS4 $Is_Solaris $Is_SunOS
+ $Verbose %pm %static
+ %Config_Override
+@@ -36,11 +36,11 @@ $Is_QNX = $^O eq 'qnx';
+ $Is_AIX = $^O eq 'aix';
+ $Is_OSF = $^O eq 'dec_osf';
+ $Is_IRIX = $^O eq 'irix';
+-$Is_NetBSD = $^O eq 'netbsd';
++$Is_Interix = $^O eq 'interix';
+ $Is_SunOS4 = $^O eq 'sunos';
+ $Is_Solaris = $^O eq 'solaris';
+ $Is_SunOS = $Is_SunOS4 || $Is_Solaris;
+-$Is_BSD = $^O =~ /^(?:free|net|open)bsd|bsdos$/;
++$Is_BSD = $^O =~ /^(?:free|net|open)bsd|bsdos|dragonfly|interix$/;
-+case "$installsiteman3dir" in
-+'') dflt="$installman3dir" ;;
-+*) dflt="$installsiteman3dir" ;;
-+esac
-+set installsiteman3dir installsiteman3dir none
-+eval $prefixit
-+fn=d~+
-+rp="Where do the site-specific library man pages (source) go?"
-+. ./getfile
-+installsiteman3dir="$ans"
-+
- : see if we have to deal with yellow pages, now NIS.
- if $test -d /usr/etc/yp || $test -d /etc/yp; then
- if $test -f /usr/etc/nibindd; then
-@@ -14719,7 +14749,7 @@
- eval $inhdr
- : see if this is a ieeefp.h system
--set ieeefp.h i_ieeefp
-+set machine/ieeefp.h i_ieeefp
- eval $inhdr
+ =head1 NAME
+@@ -1120,16 +1120,16 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
- : see if this is a libutil.h system
-@@ -16145,6 +16175,8 @@
- installsitearch='$installsitearch'
- installsitebin='$installsitebin'
- installsitelib='$installsitelib'
-+installsiteman1dir='$installsiteman1dir'
-+installsiteman3dir='$installsiteman3dir'
- installstyle='$installstyle'
- installusrbinperl='$installusrbinperl'
- installvendorarch='$installvendorarch'
+ my $libs = '$(LDLOADLIBS)';
+
+- if ($Is_NetBSD) {
+- # Use nothing on static perl platforms, and to the flags needed
+- # to link against the shared libperl library on shared perl
+- # platforms. We peek at lddlflags to see if we need -Wl,-R
++ if ($Is_BSD) {
++ # Use nothing on static perl platforms, and add to the flags
++ # needed to link against the shared libperl library on shared
++ # perl platforms. We peek at lddlflags to see if we need -Wl,-R
+ # or -R to add paths to the run-time library search path.
+ if ($Config{'useshrplib'}) {
+ if ($Config{'lddlflags'} =~ /-Wl,-R/) {
+- $libs .= ' -L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -lperl';
++ $libs .= ' -L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -Wl,-R$(PERL_ARCHLIB)/CORE -lperl';
+ } elsif ($Config{'lddlflags'} =~ /-R/) {
+- $libs .= ' -L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -lperl';
++ $libs .= ' -L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -R$(PERL_ARCHLIB)/CORE -lperl';
+ }
+ }
+ }
diff --git a/lang/perl5/patches/patch-ac b/lang/perl5/patches/patch-ac
deleted file mode 100644
index 093b56b8373..00000000000
--- a/lang/perl5/patches/patch-ac
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ac,v 1.8 2001/09/05 17:13:41 jlam Exp $
-
---- lib/ExtUtils/Install.pm.orig Thu Feb 22 18:57:55 2001
-+++ lib/ExtUtils/Install.pm Sat Sep 1 03:57:59 2001
-@@ -156,7 +156,14 @@
- } else {
- inc_uninstall($_,$File::Find::dir,$verbose,0); # nonono set to 0
- }
-- $packlist->{$origfile}++;
-+ #
-+ # jlam 2001-05-21 - Fix a bug in the packlists where only the
-+ # filename and not the full pathname is recorded. The broken
-+ # line is:
-+ #
-+ # $packlist->{$origfile}++;
-+ #
-+ $packlist->{$targetfile}++;
-
- }, ".");
- chdir($cwd) or Carp::croak("Couldn't chdir to $cwd: $!");
diff --git a/lang/perl5/patches/patch-ad b/lang/perl5/patches/patch-ad
deleted file mode 100644
index d115dce9356..00000000000
--- a/lang/perl5/patches/patch-ad
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD: patch-ad,v 1.9 2001/09/05 17:13:41 jlam Exp $
-
---- pp.c.orig Sat Apr 7 23:09:16 2001
-+++ pp.c Sat Sep 1 03:57:59 2001
-@@ -1900,6 +1900,28 @@
- }
- }
-
-+/*
-+ * There are strange code-generation bugs caused on sparc64 by gcc-2.95.2.
-+ * These need to be revisited when a newer toolchain becomes available.
-+ */
-+#if defined(__sparc64__) && defined(__GNUC__)
-+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-+#undef SPARC64_WORKAROUND
-+#define SPARC64_WORKAROUND 1
-+#endif
-+#endif
-+
-+#if defined(SPARC64_WORKAROUND)
-+double
-+sparc64_workaround_modf(double theVal, double *theIntRes)
-+{
-+ double res, ret;
-+ ret = modf(theVal, &res);
-+ *theIntRes = res;
-+ return ret;
-+}
-+#endif
-+
- PP(pp_int)
- {
- dSP; dTARGET;
-@@ -1913,6 +1935,9 @@
- }
- else {
- if (value >= 0.0) {
-+#if defined(SPARC64_WORKAROUND)
-+ (void)sparc64_workaround_modf(value, &value);
-+#else
- #if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE)
- (void)Perl_modf(value, &value);
- #else
-@@ -1920,6 +1945,7 @@
- (void)Perl_modf(tmp, &tmp);
- value = (NV)tmp;
- #endif
-+#endif /* SPARC64_WORKAROUND */
- }
- else {
- #if defined(HAS_MODFL) || defined(LONG_DOUBLE_EQUALS_DOUBLE)
diff --git a/lang/perl5/patches/patch-ae b/lang/perl5/patches/patch-ae
index 4e41088bd59..8fee128b2e9 100644
--- a/lang/perl5/patches/patch-ae
+++ b/lang/perl5/patches/patch-ae
@@ -1,51 +1,12 @@
-$NetBSD: patch-ae,v 1.8 2001/09/05 17:13:41 jlam Exp $
+$NetBSD: patch-ae,v 1.9 2005/06/24 06:43:46 jlam Exp $
---- regcomp.c.orig Wed Mar 21 21:05:02 2001
-+++ regcomp.c Sat Sep 1 03:57:59 2001
-@@ -541,6 +541,17 @@
- cl->flags |= ANYOF_EOS;
- }
-
-+/*
-+ * There are strange code-generation bugs caused on sparc64 by gcc-2.95.2.
-+ * These need to be revisited when a newer toolchain becomes available.
-+ */
-+#if defined(__sparc64__) && defined(__GNUC__)
-+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-+#undef SPARC64_WORKAROUND
-+#define SPARC64_WORKAROUND 1
-+#endif
-+#endif
-+
- /* REx optimizer. Converts nodes into quickier variants "in place".
- Finds fixed substrings. */
-
-@@ -1076,11 +1087,28 @@
- int counted = mincount != 0;
-
- if (data->last_end > 0 && mincount != 0) { /* Ends with a string. */
-+#if defined(SPARC64_WORKAROUND)
-+ I32 b = 0;
-+ STRLEN l = 0;
-+ char *s = NULL;
-+ I32 old = 0;
-+
-+ if (pos_before >= data->last_start_min)
-+ b = pos_before;
-+ else
-+ b = data->last_start_min;
-+
-+ l = 0;
-+ s = SvPV(data->last_found, l);
-+ old = b - data->last_start_min;
-+
-+#else
- I32 b = pos_before >= data->last_start_min
- ? pos_before : data->last_start_min;
- STRLEN l;
- char *s = SvPV(data->last_found, l);
- I32 old = b - data->last_start_min;
-+#endif
-
- if (UTF)
- old = utf8_hop((U8*)s, old) - (U8*)s;
+--- makedepend.SH.orig 2003-06-05 14:11:10.000000000 -0400
++++ makedepend.SH
+@@ -83,7 +83,6 @@ if test -f Makefile; then
+ # 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
diff --git a/lang/perl5/patches/patch-af b/lang/perl5/patches/patch-af
deleted file mode 100644
index b205006e87d..00000000000
--- a/lang/perl5/patches/patch-af
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-af,v 1.11 2001/10/02 06:37:56 jlam Exp $
-
---- lib/ExtUtils/Liblist.pm.orig Thu Feb 22 21:57:55 2001
-+++ lib/ExtUtils/Liblist.pm
-@@ -68,20 +68,28 @@
- foreach $thislib (split ' ', $potential_libs){
-
- # Handle possible linker path arguments.
-- if ($thislib =~ s/^(-[LR])//){ # save path flag type
-+ if ($thislib =~ s/^(-[LR]|-Wl,-R)//){ # save path flag type
- my($ptype) = $1;
- unless (-d $thislib){
- warn "$ptype$thislib ignored, directory does not exist\n"
- if $verbose;
- next;
- }
-+ my($rtype) = $ptype;
-+ if (($ptype eq '-R') or ($ptype eq '-Wl,-R')) {
-+ if ($Config{'lddlflags'} =~ /-Wl,-R/) {
-+ $rtype = '-Wl,-R';
-+ } elsif ($Config{'lddlflags'} =~ /-R/) {
-+ $rtype = '-R';
-+ }
-+ }
- unless ($self->file_name_is_absolute($thislib)) {
- warn "Warning: $ptype$thislib changed to $ptype$pwd/$thislib\n";
- $thislib = $self->catdir($pwd,$thislib);
- }
- push(@searchpath, $thislib);
- push(@extralibs, "$ptype$thislib");
-- push(@ldloadlibs, "$ptype$thislib");
-+ push(@ldloadlibs, "$rtype$thislib");
- next;
- }
-
diff --git a/lang/perl5/patches/patch-ag b/lang/perl5/patches/patch-ag
deleted file mode 100644
index 6e2397cab54..00000000000
--- a/lang/perl5/patches/patch-ag
+++ /dev/null
@@ -1,86 +0,0 @@
-$NetBSD: patch-ag,v 1.9 2004/01/13 01:08:57 jlam Exp $
-
---- lib/ExtUtils/MM_Unix.pm.orig Thu Mar 15 10:25:20 2001
-+++ lib/ExtUtils/MM_Unix.pm
-@@ -604,8 +604,8 @@ MAN3PODS = ".join(" \\\n\t", sort keys %
- INST_HTMLSITELIBDIR INSTALLHTMLSITELIBDIR
- INST_HTMLSCRIPTDIR INSTALLHTMLSCRIPTDIR
- INST_HTMLLIBDIR HTMLEXT
-- INST_MAN1DIR INSTALLMAN1DIR MAN1EXT
-- INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
-+ INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR MAN1EXT
-+ INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR MAN3EXT
- /) {
- next unless defined $self->{$tmp};
- push @m, "$tmp = $self->{$tmp}\n";
-@@ -1059,6 +1059,22 @@ sub dynamic_lib {
- my($ldfrom) = '$(LDFROM)';
- $armaybe = 'ar' if ($^O eq 'dec_osf' and $armaybe eq ':');
- my(@m);
-+
-+ # Set LLIBPERL to nothing on static perl platforms, and to the flags
-+ # needed to link against the shared libperl library on shared perl
-+ # platforms. We peek at lddlflags to see if we need -Wl,-R or -R
-+ # to add paths to the run-time library search path.
-+ #
-+ my($llibperl) = '';
-+ if (($^O eq 'netbsd') and ($Config{'useshrplib'} eq 'true')) {
-+ if ($Config{'lddlflags'} =~ /-Wl,-R/) {
-+ $llibperl = '-L$(PERL_INC) -Wl,-R$(INSTALLARCHLIB)/CORE -Wl,-R$(PERL_ARCHLIB)/CORE -lperl';
-+ } elsif ($Config{'lddlflags'} =~ /-R/) {
-+ $llibperl = '-L$(PERL_INC) -R$(INSTALLARCHLIB)/CORE -R$(PERL_ARCHLIB)/CORE -lperl';
-+ }
-+ }
-+ push(@m,'LLIBPERL = '.$llibperl."\n");
-+
- push(@m,'
- # This section creates the dynamically loadable $(INST_DYNAMIC)
- # from $(OBJECT) and possibly $(MYEXTLIB).
-@@ -1088,7 +1104,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
- ');
-
- push(@m,' LD_RUN_PATH="$(LD_RUN_PATH)" $(LD) '.$ldrun.' $(LDDLFLAGS) '.$ldfrom.
-- ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)');
-+ ' $(OTHERLDFLAGS) -o $@ $(MYEXTLIB) $(PERL_ARCHIVE) $(LLIBPERL) $(LDLOADLIBS) $(PERL_ARCHIVE_AFTER) $(EXPORT_LIST)');
- push @m, '
- $(CHMOD) $(PERM_RWX) $@
- ';
-@@ -1888,7 +1904,9 @@ usually solves this kind of problem.
- }
- for $install_variable (qw/
- INSTALLMAN1DIR
-+ INSTALLSITEMAN1DIR
- INSTALLMAN3DIR
-+ INSTALLSITEMAN3DIR
- /)
- {
- $self->prefixify($install_variable,$search_prefix,$replace_prefix);
-@@ -1898,6 +1916,8 @@ usually solves this kind of problem.
- # installed
- $self->{INSTALLMAN1DIR} = $Config::Config{installman1dir}
- unless defined $self->{INSTALLMAN1DIR};
-+ $self->{INSTALLSITEMAN1DIR} = $Config::Config{installsiteman1dir}
-+ unless defined $self->{INSTALLSITEMAN1DIR};
- unless (defined $self->{INST_MAN1DIR}){
- if ($self->{INSTALLMAN1DIR} =~ /^(none|\s*)$/){
- $self->{INST_MAN1DIR} = $self->{INSTALLMAN1DIR};
-@@ -1909,6 +1929,8 @@ usually solves this kind of problem.
-
- $self->{INSTALLMAN3DIR} = $Config::Config{installman3dir}
- unless defined $self->{INSTALLMAN3DIR};
-+ $self->{INSTALLSITEMAN3DIR} = $Config::Config{installsiteman3dir}
-+ unless defined $self->{INSTALLSITEMAN3DIR};
- unless (defined $self->{INST_MAN3DIR}){
- if ($self->{INSTALLMAN3DIR} =~ /^(none|\s*)$/){
- $self->{INST_MAN3DIR} = $self->{INSTALLMAN3DIR};
-@@ -2153,8 +2175,8 @@ pure_site_install ::
- $(INST_SCRIPT) $(INSTALLSCRIPT) \
- $(INST_HTMLLIBDIR) $(INSTALLHTMLSITELIBDIR) \
- $(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \
-- $(INST_MAN1DIR) $(INSTALLMAN1DIR) \
-- $(INST_MAN3DIR) $(INSTALLMAN3DIR)
-+ $(INST_MAN1DIR) $(INSTALLSITEMAN1DIR) \
-+ $(INST_MAN3DIR) $(INSTALLSITEMAN3DIR)
- }.$self->{NOECHO}.q{$(WARN_IF_OLD_PACKLIST) \
- }.$self->catdir('$(PERL_ARCHLIB)','auto','$(FULLEXT)').q{
-
diff --git a/lang/perl5/patches/patch-ah b/lang/perl5/patches/patch-ah
index 5594b0dc301..002c1bb137e 100644
--- a/lang/perl5/patches/patch-ah
+++ b/lang/perl5/patches/patch-ah
@@ -1,8 +1,8 @@
-$NetBSD: patch-ah,v 1.5 2002/01/28 00:25:28 jlam Exp $
+$NetBSD: patch-ah,v 1.6 2005/06/24 06:43:46 jlam Exp $
---- perl.c.orig Thu Mar 22 00:05:02 2001
+--- perl.c.orig 2004-11-23 10:16:56.000000000 -0500
+++ perl.c
-@@ -3408,12 +3408,32 @@
+@@ -4314,12 +4314,33 @@ S_init_perllib(pTHX)
}
/* Use the ~-expanded versions of APPLLIB (undocumented),
@@ -10,56 +10,58 @@ $NetBSD: patch-ah,v 1.5 2002/01/28 00:25:28 jlam Exp $
+ SITEARCH SITELIB ARCHLIB PRIVLIB VENDORARCH and VENDORLIB
*/
#ifdef APPLLIB_EXP
- incpush(APPLLIB_EXP, TRUE, TRUE);
+ incpush(APPLLIB_EXP, TRUE, TRUE, TRUE);
#endif
+#ifdef SITEARCH_EXP
+ /* sitearch is always relative to sitelib on Windows for
+ * DLL-based path intuition to work correctly */
+# if !defined(WIN32)
-+ incpush(SITEARCH_EXP, FALSE, FALSE);
++ incpush(SITEARCH_EXP, FALSE, FALSE, TRUE);
+# endif
+#endif
+
+#ifdef SITELIB_EXP
+# if defined(WIN32)
-+ incpush(SITELIB_EXP, TRUE, FALSE); /* this picks up sitearch as well */
++ /* this picks up sitearch as well */
++ incpush(SITELIB_EXP, TRUE, FALSE, TRUE);
+# else
-+ incpush(SITELIB_EXP, FALSE, FALSE);
++ incpush(SITELIB_EXP, FALSE, FALSE, TRUE);
+# endif
+#endif
+
+#ifdef SITELIB_STEM /* Search for version-specific dirs below here */
-+ incpush(SITELIB_STEM, FALSE, TRUE);
++ incpush(SITELIB_STEM, FALSE, TRUE, TRUE);
+#endif
+
#ifdef ARCHLIB_EXP
- incpush(ARCHLIB_EXP, FALSE, FALSE);
+ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE);
#endif
-@@ -3445,26 +3465,6 @@
- incpush(PRIVLIB_EXP, TRUE, FALSE);
- #else
- incpush(PRIVLIB_EXP, FALSE, FALSE);
--#endif
--
+@@ -4353,27 +4374,6 @@ S_init_perllib(pTHX)
+ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE);
+ #endif
+
-#ifdef SITEARCH_EXP
- /* sitearch is always relative to sitelib on Windows for
- * DLL-based path intuition to work correctly */
-# if !defined(WIN32)
-- incpush(SITEARCH_EXP, FALSE, FALSE);
+- incpush(SITEARCH_EXP, FALSE, FALSE, TRUE);
-# endif
-#endif
-
-#ifdef SITELIB_EXP
-# if defined(WIN32)
-- incpush(SITELIB_EXP, TRUE, FALSE); /* this picks up sitearch as well */
+- /* this picks up sitearch as well */
+- incpush(SITELIB_EXP, TRUE, FALSE, TRUE);
-# else
-- incpush(SITELIB_EXP, FALSE, FALSE);
+- incpush(SITELIB_EXP, FALSE, FALSE, TRUE);
-# endif
-#endif
-
-#ifdef SITELIB_STEM /* Search for version-specific dirs below here */
-- incpush(SITELIB_STEM, FALSE, TRUE);
- #endif
-
+- incpush(SITELIB_STEM, FALSE, TRUE, TRUE);
+-#endif
+-
#ifdef PERL_VENDORARCH_EXP
+ /* vendorarch is always relative to vendorlib on Windows for
+ * DLL-based path intuition to work correctly */
diff --git a/lang/perl5/patches/patch-aj b/lang/perl5/patches/patch-aj
deleted file mode 100644
index 8f99b16aae7..00000000000
--- a/lang/perl5/patches/patch-aj
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-aj,v 1.7 2003/02/27 14:05:01 grant Exp $
-
---- makedepend.SH.orig Mon Mar 19 18:33:17 2001
-+++ makedepend.SH
-@@ -68,6 +68,7 @@ if test -f Makefile; then
- case "$osname" in
- os2) ;;
- netbsd) ;;
-+ freebsd) ;;
- *) $touch $firstmakefile ;;
- esac
- fi
-@@ -155,6 +156,8 @@ for file in `$cat .clist`; do
- $sed \
- -e '1d' \
- -e '/^#.*<stdin>/d' \
-+ -e '/^#.*<built-in>/d' \
-+ -e '/^#.*<command line>/d' \
- -e '/^#.*"-"/d' \
- -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \
- -e 's/^[ ]*#[ ]*line/#/' \
-@@ -196,7 +199,8 @@ if $test -s .deptmp; then
- $echo "Updating $mf..."
- $echo "# If this runs make out of memory, delete /usr/include lines." \
- >> $mf.new
-- $sed 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
-+ $sed 's|^\(.*\$(OBJ_EXT):\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp |\
-+ $sed -e 's|^0$||' \
- >>$mf.new
- else
- $MAKE hlist || ($echo "Searching for .h files..."; \
diff --git a/lang/perl5/patches/patch-al b/lang/perl5/patches/patch-al
deleted file mode 100644
index b178ce8899d..00000000000
--- a/lang/perl5/patches/patch-al
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-al,v 1.1 2003/05/27 21:57:26 jlam Exp $
-
---- lib/ExtUtils/MM_VMS.pm.orig Thu Feb 22 21:57:55 2001
-+++ lib/ExtUtils/MM_VMS.pm Tue May 27 17:08:08 2003
-@@ -512,6 +512,7 @@
- INSTALLARCHLIB INSTALLSCRIPT INSTALLBIN PERL_LIB PERL_ARCHLIB
- PERL_INC PERL_SRC FULLEXT INST_MAN1DIR INSTALLMAN1DIR
- INST_MAN3DIR INSTALLMAN3DIR INSTALLSITELIB INSTALLSITEARCH
-+ INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
- SITELIBEXP SITEARCHEXP ] ) {
- next unless defined $self->{$macro};
- $self->{$macro} = $self->fixpath($self->{$macro},1);
-@@ -603,7 +604,7 @@
- ';
-
- for $tmp (qw/
-- INST_MAN1DIR INSTALLMAN1DIR MAN1EXT INST_MAN3DIR INSTALLMAN3DIR MAN3EXT
-+ INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR MAN1EXT INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR MAN3EXT
- /) {
- next unless defined $self->{$tmp};
- push @m, "$tmp = $self->{$tmp}\n";
-@@ -1806,8 +1807,8 @@
- $(NOECHO) $(PERL) -e "print '$(INST_ARCHLIB) $(INSTALLSITEARCH) '" >>.MM_tmp
- $(NOECHO) $(PERL) -e "print '$(INST_BIN) $(INSTALLBIN) '" >>.MM_tmp
- $(NOECHO) $(PERL) -e "print '$(INST_SCRIPT) $(INSTALLSCRIPT) '" >>.MM_tmp
-- $(NOECHO) $(PERL) -e "print '$(INST_MAN1DIR) $(INSTALLMAN1DIR) '" >>.MM_tmp
-- $(NOECHO) $(PERL) -e "print '$(INST_MAN3DIR) $(INSTALLMAN3DIR) '" >>.MM_tmp
-+ $(NOECHO) $(PERL) -e "print '$(INST_MAN1DIR) $(INSTALLSITEMAN1DIR) '" >>.MM_tmp
-+ $(NOECHO) $(PERL) -e "print '$(INST_MAN3DIR) $(INSTALLSITEMAN3DIR) '" >>.MM_tmp
- $(MOD_INSTALL) <.MM_tmp
- $(NOECHO) Delete/NoLog/NoConfirm .MM_tmp;
- $(NOECHO) $(WARN_IF_OLD_PACKLIST) ].$self->catfile('$(PERL_ARCHLIB)','auto','$(FULLEXT)','.packlist').q[
diff --git a/lang/perl5/patches/patch-am b/lang/perl5/patches/patch-am
deleted file mode 100644
index 52df8e14849..00000000000
--- a/lang/perl5/patches/patch-am
+++ /dev/null
@@ -1,53 +0,0 @@
-$NetBSD: patch-am,v 1.1 2003/05/27 21:57:26 jlam Exp $
-
---- lib/ExtUtils/MakeMaker.pm.orig Thu Feb 22 21:57:55 2001
-+++ lib/ExtUtils/MakeMaker.pm Tue May 27 17:18:40 2003
-@@ -193,7 +193,8 @@
- INC INCLUDE_EXT INSTALLARCHLIB INSTALLBIN INSTALLDIRS INSTALLHTMLPRIVLIBDIR
- INSTALLHTMLSCRIPTDIR INSTALLHTMLSITELIBDIR INSTALLMAN1DIR
- INSTALLMAN3DIR INSTALLPRIVLIB INSTALLSCRIPT INSTALLSITEARCH
-- INSTALLSITELIB INST_ARCHLIB INST_BIN INST_EXE INST_LIB
-+ INSTALLSITELIB INSTALLSITEMAN1DIR INSTALLSITEMAN3DIR
-+ INST_ARCHLIB INST_BIN INST_EXE INST_LIB
- INST_HTMLLIBDIR INST_HTMLSCRIPTDIR
- INST_MAN1DIR INST_MAN3DIR INST_SCRIPT LDFROM LIB LIBPERL_A LIBS
- LINKTYPE MAKEAPERL MAKEFILE MAN1PODS MAN3PODS MAP_TARGET MYEXTLIB
-@@ -960,8 +961,8 @@
- INST_HTMLSCRIPTDIR INSTALLHTMLSCRIPTDIR
- INST_BIN INSTALLBIN
- INST_SCRIPT INSTALLSCRIPT
-- INST_MAN1DIR INSTALLMAN1DIR
-- INST_MAN3DIR INSTALLMAN3DIR
-+ INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR
-+ INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR
-
- The INSTALL... macros in turn default to their %Config
- ($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
-@@ -1391,8 +1392,8 @@
-
- =item INSTALLMAN3DIR
-
--This directory gets the man pages at 'make install' time. Defaults to
--$Config{installman3dir}.
-+This directory gets the man pages at 'make install' time if
-+INSTALLDIRS=perl. Defaults to $Config{installman3dir}.
-
- =item INSTALLPRIVLIB
-
-@@ -1413,6 +1414,16 @@
-
- Used by 'make install', which copies files from INST_LIB to this
- directory if INSTALLDIRS is set to site (default).
-+
-+=item INSTALLSITEMAN1DIR
-+
-+This directory gets the man pages at 'make install' time if
-+INSTALLDIRS=site. Defaults to $Config{installsiteman1dir}.
-+
-+=item INSTALLSITEMAN3DIR
-+
-+This directory gets the man pages at 'make install' time if
-+INSTALLDIRS=site. Defaults to $Config{installsiteman3dir}.
-
- =item INST_ARCHLIB
-
diff --git a/lang/perl5/patches/patch-ba b/lang/perl5/patches/patch-ba
index f342b3cca99..ba0598b86f1 100644
--- a/lang/perl5/patches/patch-ba
+++ b/lang/perl5/patches/patch-ba
@@ -1,58 +1,59 @@
-$NetBSD: patch-ba,v 1.1 2003/10/05 14:19:09 grant Exp $
+$NetBSD: patch-ba,v 1.2 2005/06/24 06:43:47 jlam Exp $
---- hints/netbsd.sh.orig Thu Feb 22 18:57:55 2001
-+++ hints/netbsd.sh Fri Jun 20 17:59:50 2003
-@@ -21,16 +21,32 @@
- if [ -f /usr/libexec/ld.elf_so ]; then
- d_dlopen=$define
- d_dlerror=$define
-- ccdlflags="-Wl,-E -Wl,-R${PREFIX}/lib $ccdlflags"
-+ case "$osvers" in
-+ 1.[0-5]|1.[0-5].*)
-+ # Include the whole libgcc.a, required for Xerces-P,
-+ # which needs __eh_alloc, __pure_virtual, and others.
-+ # XXX This should be obsoleted by gcc-3.0.
-+ ccdlflags="-Wl,-whole-archive -lgcc \
-+ -Wl,-no-whole-archive -Wl,-E \
-+ -Wl,-R$prefix/lib $ccdlflags"
-+ ;;
-+ *)
-+ ccdlflags="-Wl,-E -Wl,-R$prefix/lib $ccdlflags"
-+ ;;
-+ esac
- 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
-+ case "$osvers" in
-+ 1.3|1.3.1)
-+ d_dlopen=$undef
-+ ;;
-+ esac
- elif [ -f /usr/libexec/ld.so ]; then
- d_dlopen=$define
- d_dlerror=$define
-- ccdlflags="-Wl,-R${PREFIX}/lib $ccdlflags"
-+ 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"
-@@ -59,12 +75,13 @@
- d_setruid="$undef"
+--- hints/netbsd.sh.orig 2003-08-07 12:57:56.000000000 -0400
++++ hints/netbsd.sh 2004-06-06 18:45:19.000000000 -0400
+@@ -78,6 +78,30 @@
+ d_setreuid="$undef"
+ ;;
+ esac
++case "$osvers" in
++0.9*|1.*|2.*|3.*)
++ d_getprotoent_r="$undef"
++ d_getprotobyname_r="$undef"
++ d_getprotobynumber_r="$undef"
++ d_setprotoent_r="$undef"
++ d_endprotoent_r="$undef"
++ d_getservent_r="$undef"
++ d_getservbyname_r="$undef"
++ d_getservbyport_r="$undef"
++ d_setservent_r="$undef"
++ d_endservent_r="$undef"
++ d_getprotoent_r_proto="$undef"
++ d_getprotobyname_r_proto="$undef"
++ d_getprotobynumber_r_proto="$undef"
++ d_setprotoent_r_proto="$undef"
++ d_endprotoent_r_proto="$undef"
++ d_getservent_r_proto="$undef"
++ d_getservbyname_r_proto="$undef"
++ d_getservbyport_r_proto="$undef"
++ d_setservent_r_proto="$undef"
++ d_endservent_r_proto="$undef"
++ ;;
++esac
- # there's no problem with vfork.
--case "$usevfork" in
--'') usevfork=true ;;
--esac
-+usevfork=true
-+
-+# Using perl's malloc leads to trouble on some toolchain versions.
-+usemymalloc="$undef"
-
- # Pre-empt the /usr/bin/perl question of installperl.
--installusrbinperl='n'
-+installusrbinperl="$undef"
+ # These are obsolete in any netbsd.
+ d_setrgid="$undef"
+@@ -133,23 +157,6 @@
+ esac
+ EOCBU
- # Recognize the NetBSD packages collection.
- # GDBM might be here.
+-# Set sensible defaults for NetBSD: look for local software in
+-# /usr/pkg (NetBSD Packages Collection) and in /usr/local.
+-#
+-loclibpth="/usr/pkg/lib /usr/local/lib"
+-locincpth="/usr/pkg/include /usr/local/include"
+-case "$rpathflag" in
+-'')
+- ldflags=
+- ;;
+-*)
+- ldflags=
+- for yyy in $loclibpth; do
+- ldflags="$ldflags $rpathflag$yyy"
+- done
+- ;;
+-esac
+-
+ case `uname -m` in
+ alpha)
+ echo 'int main() {}' > try.c
diff --git a/lang/perl5/patches/patch-bb b/lang/perl5/patches/patch-bb
deleted file mode 100644
index cf591922306..00000000000
--- a/lang/perl5/patches/patch-bb
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-bb,v 1.1 2003/10/05 14:19:09 grant Exp $
-
---- hints/freebsd.sh.orig Sun Apr 8 16:09:16 2001
-+++ hints/freebsd.sh
-@@ -85,10 +85,17 @@ case "$osvers" in
- d_setreuid='define'
- d_setegid='undef'
- d_seteuid='undef'
-+ d_dosuid='define'
- ;;
- *) usevfork='true'
- usemymalloc='n'
- libswanted=`echo $libswanted | sed 's/ malloc / /'`
-+ libswanted=`echo $libswanted | sed 's/ bind / /'`
-+ d_setregid='define'
-+ d_setreuid='define'
-+ d_setegid='undef'
-+ d_seteuid='undef'
-+ d_dosuid='define'
- ;;
- esac
-
-@@ -115,7 +122,8 @@ case "$osvers" in
- fi
- lddlflags='-Bshareable'
- fi
-- cccdlflags='-DPIC -fpic'
-+ cccdlflags='-DPIC -fPIC'
-+ libswanted=`echo $libswanted | sed 's/ iconv / /'`
- ;;
- esac
-
diff --git a/lang/perl5/patches/patch-bc b/lang/perl5/patches/patch-bc
deleted file mode 100644
index 4a19ca1f77a..00000000000
--- a/lang/perl5/patches/patch-bc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-bc,v 1.1 2003/10/05 14:19:09 grant Exp $
-
---- hints/solaris_2.sh.orig 2001-02-23 13:57:55.000000000 +1100
-+++ hints/solaris_2.sh
-@@ -239,6 +239,10 @@ END
- # All Solaris versions of ld I've seen contain the magic
- # string used in the grep.
- :
-+ elif echo "$verbose" | grep "ld: Solaris Link Editors" >/dev/null 2>&1; then
-+ # This string has also been observed "in the wild" as
-+ # being the Solaris linker.
-+ :
- else
- # No evidence yet of /usr/ccs/bin/ld. Some versions
- # of egcs's ld wrapper call /usr/ccs/bin/ld in turn but
diff --git a/lang/perl5/patches/patch-bd b/lang/perl5/patches/patch-bd
new file mode 100644
index 00000000000..676131bdbf4
--- /dev/null
+++ b/lang/perl5/patches/patch-bd
@@ -0,0 +1,28 @@
+$NetBSD: patch-bd,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- lib/ExtUtils/instmodsh.orig 2004-01-05 17:34:59.000000000 -0500
++++ lib/ExtUtils/instmodsh
+@@ -58,16 +58,13 @@ while (1)
+ $reply =~ /^t\s*/ and do
+ {
+ my $file = (split(' ', $reply))[1];
+- my $tmp = "/tmp/inst.$$";
+- if (my $fh = IO::File->new($tmp, "w"))
+- {
+- $fh->print(join("\n", $Inst->files($module)));
+- $fh->close();
+- system("tar cvf $file -I $tmp");
+- unlink($tmp);
+- last CASE;
+- }
+- else { print("Can't open $file: $!\n"); }
++ # Use File::Temp to create the tempfile and avoid possible symlink
++ # race attacks against a known filename in /tmp [CAN-2004-0976].
++ my ($fh, $tmp) = File::Temp::tempfile(UNLINK => 1);
++ $fh->print(join("\n", $Inst->files($module)));
++ $fh->close();
++ system("tar cvf $file -T $tmp");
++ unlink($tmp);
+ last CASE;
+ };
+ $reply eq 'v' and do
diff --git a/lang/perl5/patches/patch-be b/lang/perl5/patches/patch-be
new file mode 100644
index 00000000000..d5dd53dbe56
--- /dev/null
+++ b/lang/perl5/patches/patch-be
@@ -0,0 +1,24 @@
+$NetBSD: patch-be,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- lib/perl5db.pl.orig 2004-11-17 07:51:18.000000000 -0500
++++ lib/perl5db.pl
+@@ -215,7 +215,7 @@ the TTY to use for debugging i/o.
+ =item * noTTY
+
+ if set, goes in NonStop mode. On interrupt, if TTY is not set,
+-uses the value of noTTY or F</tmp/perldbtty$$> to find TTY using
++uses the value of noTTY or F<$HOME/.perldbtty$$> to find TTY using
+ Term::Rendezvous. Current variant is to have the name of TTY in this
+ file.
+
+@@ -6004,8 +6004,8 @@ sub setterm {
+ eval "require Term::Rendezvous;" or die;
+
+ # See if we have anything to pass to Term::Rendezvous.
+- # Use /tmp/perldbtty$$ if not.
+- my $rv = $ENV{PERLDB_NOTTY} || "/tmp/perldbtty$$";
++ # Use $HOME/.perldbtty$$ if not [CAN-2004-0976].
++ my $rv = $ENV{PERLDB_NOTTY} || "$ENV{HOME}/.perldbtty$$";
+
+ # Rendezvous and get the filehandles.
+ my $term_rv = new Term::Rendezvous $rv;
diff --git a/lang/perl5/patches/patch-bf b/lang/perl5/patches/patch-bf
new file mode 100644
index 00000000000..cc65e2cc14a
--- /dev/null
+++ b/lang/perl5/patches/patch-bf
@@ -0,0 +1,24 @@
+$NetBSD: patch-bf,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- perlio.c.orig 2004-09-10 03:06:52.000000000 -0400
++++ perlio.c
+@@ -454,7 +454,8 @@ PerlIO_debug(const char *fmt, ...)
+ va_list ap;
+ dSYS;
+ va_start(ap, fmt);
+- if (!dbg) {
++ /* Tighten uid/gid checks [CAN-2005-0155] */
++ if (!dbg && !PL_tainting && PL_uid == PL_euid && PL_gid == PL_egid) {
+ char *s = PerlEnv_getenv("PERLIO_DEBUG");
+ if (s && *s)
+ dbg = PerlLIO_open3(s, O_WRONLY | O_CREAT | O_APPEND, 0666);
+@@ -471,7 +472,8 @@ PerlIO_debug(const char *fmt, ...)
+ s = CopFILE(PL_curcop);
+ if (!s)
+ s = "(none)";
+- sprintf(buffer, "%s:%" IVdf " ", s, (IV) CopLINE(PL_curcop));
++ /* Avoid PERLIO_DEBUG buffer overflow [CAN-2005-0156] */
++ sprintf(buffer, "%.40s:%" IVdf " ", s, (IV) CopLINE(PL_curcop));
+ len = strlen(buffer);
+ vsprintf(buffer+len, fmt, ap);
+ PerlLIO_write(dbg, buffer, strlen(buffer));
diff --git a/lang/perl5/patches/patch-ca b/lang/perl5/patches/patch-ca
index 493d7cb08c6..e5cc0bdc5db 100644
--- a/lang/perl5/patches/patch-ca
+++ b/lang/perl5/patches/patch-ca
@@ -1,8 +1,66 @@
-$NetBSD: patch-ca,v 1.1 2004/04/12 02:51:22 jschauma Exp $
+$NetBSD: patch-ca,v 1.2 2005/06/24 06:43:47 jlam Exp $
---- Configure.orig Fri Mar 26 10:34:43 2004
-+++ Configure Fri Mar 26 10:43:17 2004
-@@ -12495,7 +12495,15 @@
+--- Configure.orig 2004-09-10 02:25:52.000000000 -0400
++++ Configure
+@@ -3107,11 +3107,13 @@ EOM
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
++ dragonfly) osname=dragonfly
++ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` ;;
+ dynixptx*) osname=dynixptx
+ osvers=`echo "$4"|sed 's/^v//'`
+ ;;
+ freebsd) osname=freebsd
+- osvers="$3" ;;
++ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` ;;
+ genix) osname=genix ;;
+ gnu) osname=gnu
+ osvers="$3" ;;
+@@ -3133,7 +3135,7 @@ EOM
+ MiNT) osname=mint
+ ;;
+ netbsd*) osname=netbsd
+- osvers="$3"
++ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
+ ;;
+ news-os) osvers="$3"
+ case "$3" in
+@@ -3144,8 +3146,8 @@ EOM
+ next*) osname=next ;;
+ nonstop-ux) osname=nonstopux ;;
+ openbsd) osname=openbsd
+- osvers="$3"
+- ;;
++ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
++ ;;
+ os2) osname=os2
+ osvers="$4"
+ ;;
+@@ -7852,7 +7854,7 @@ if "$useshrplib"; then
+ solaris)
+ xxx="-R $shrpdir"
+ ;;
+- freebsd|netbsd|openbsd)
++ freebsd|netbsd|openbsd|dragonfly|interix)
+ xxx="-Wl,-R$shrpdir"
+ ;;
+ bsdos|linux|irix*|dec_osf)
+@@ -8973,6 +8975,13 @@ EOCP
+ ;;
+ esac
+
++: Look for a hint-file generated 'call-back-unit'. We need
++: to set some defaults for building perl in pkgsrc.
++if $test -f pkgsrc.cbu; then
++ echo "Setting pkgsrc-specific hints regarding compiler/linker flags..."
++ . ./pkgsrc.cbu
++fi
++
+ case "$vendorprefix" in
+ '') d_vendorbin="$undef"
+ vendorbin=''
+@@ -17290,7 +17299,15 @@ RCAT(Rei,ser)
ACAT(Cir,cus)
EOCP
$cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
diff --git a/lang/perl5/patches/patch-cb b/lang/perl5/patches/patch-cb
new file mode 100644
index 00000000000..f4377f8f8db
--- /dev/null
+++ b/lang/perl5/patches/patch-cb
@@ -0,0 +1,25 @@
+$NetBSD: patch-cb,v 1.1 2005/06/24 06:43:47 jlam Exp $
+--- Makefile.SH.orig 2004-10-21 08:30:02.000000000 -0700
++++ Makefile.SH 2005-03-08 18:05:48.000000000 -0700
+@@ -69,7 +69,11 @@
+ sunos*)
+ linklibperl="-lperl"
+ ;;
+- netbsd*|freebsd[234]*|openbsd*)
++ interix*)
++ linklibperl="-L. -lperl"
++ shrpldflags="$shrpldflags -Wl,--image-base,0x57000000"
++ ;;
++ netbsd*|freebsd[234]*|openbsd*|dragonfly*)
+ linklibperl="-L. -lperl"
+ ;;
+ aix*)
+@@ -77,7 +81,7 @@
+ case "$osvers" in
+ 3*) shrpldflags="$shrpldflags -e _nostart"
+ ;;
+- *) shrpldflags="$shrpldflags -b noentry"
++ *) shrpldflags="$shrpldflags -bnoentry"
+ ;;
+ esac
+ shrpldflags="$shrpldflags $ldflags $perllibs $cryptlib"
diff --git a/lang/perl5/patches/patch-cc b/lang/perl5/patches/patch-cc
new file mode 100644
index 00000000000..3e0e7cff248
--- /dev/null
+++ b/lang/perl5/patches/patch-cc
@@ -0,0 +1,32 @@
+$NetBSD: patch-cc,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- hints/interix.sh.orig Fri Apr 23 12:29:09 2004
++++ hints/interix.sh Fri Apr 23 12:32:55 2004
+@@ -0,0 +1,27 @@
++# hints/interix.sh
++#
++# Please check with tech-pkg@netbsd.org before making modifications
++# to this file.
++
++cc='gcc'
++cccdlflags="-DPIC $cccdlflags"
++ccdlflags='-Wl,-E'
++ccflags="-D_ALL_SOURCE $ccflags"
++d_poll="$undef"
++ld='gcc'
++lddlflags="-shared $lddlflags"
++rpathflag='-Wl,-R'
++sharpbang='#!'
++usemymalloc='false'
++usenm='false'
++
++# This script UU/usethreads.cbu will get 'called-back' by Configure
++# after it has prompted the user for whether to use threads.
++cat > UU/usethreads.cbu <<'EOCBU'
++case "$usethreads" in
++$define|true|[yY]*)
++ ccflags="-D_REENTRANT $ccflags"
++ libswanted="$libswanted pthread"
++ ;;
++esac
++EOCBU
diff --git a/lang/perl5/patches/patch-cd b/lang/perl5/patches/patch-cd
new file mode 100644
index 00000000000..5b8f03aa9c5
--- /dev/null
+++ b/lang/perl5/patches/patch-cd
@@ -0,0 +1,12 @@
+$NetBSD: patch-cd,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- lib/File/Find.pm.orig Fri Feb 27 11:31:34 2004
++++ lib/File/Find.pm Mon Apr 26 00:34:04 2004
+@@ -1221,6 +1221,7 @@
+
+ $File::Find::dont_use_nlink = 1
+ if $^O eq 'os2' || $^O eq 'dos' || $^O eq 'amigaos' || $^O eq 'MSWin32' ||
++ $^O eq 'interix' ||
+ $^O eq 'cygwin' || $^O eq 'epoc' || $^O eq 'qnx' ||
+ $^O eq 'nto';
+
diff --git a/lang/perl5/patches/patch-ce b/lang/perl5/patches/patch-ce
new file mode 100644
index 00000000000..c01c70988be
--- /dev/null
+++ b/lang/perl5/patches/patch-ce
@@ -0,0 +1,12 @@
+$NetBSD: patch-ce,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- lib/File/Temp.pm.orig Fri Apr 23 12:42:30 2004
++++ lib/File/Temp.pm Fri Apr 23 12:44:21 2004
+@@ -2012,6 +2012,7 @@
+
+ {
+ my $TopSystemUID = 10;
++ $TopSystemUID = 197108 if $^O eq 'interix'; # "Administrator"
+ sub top_system_uid {
+ my $self = shift;
+ if (@_) {
diff --git a/lang/perl5/patches/patch-cf b/lang/perl5/patches/patch-cf
new file mode 100644
index 00000000000..2142490c38c
--- /dev/null
+++ b/lang/perl5/patches/patch-cf
@@ -0,0 +1,12 @@
+$NetBSD: patch-cf,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- t/io/openpid.t.orig Fri Apr 23 12:45:43 2004
++++ t/io/openpid.t Fri Apr 23 12:45:56 2004
+@@ -23,6 +23,7 @@
+ use Config;
+ $| = 1;
+ $SIG{PIPE} = 'IGNORE';
++$SIG{HUP} = 'IGNORE' if $^O eq 'interix';
+
+ my $perl = which_perl();
+ $perl .= qq[ "-I../lib"];
diff --git a/lang/perl5/patches/patch-cg b/lang/perl5/patches/patch-cg
new file mode 100644
index 00000000000..881ce18429a
--- /dev/null
+++ b/lang/perl5/patches/patch-cg
@@ -0,0 +1,13 @@
+$NetBSD: patch-cg,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- t/op/groups.t.orig Fri Apr 23 12:46:39 2004
++++ t/op/groups.t Fri Apr 23 12:46:53 2004
+@@ -133,7 +133,7 @@
+
+ print "# gr = @gr\n";
+
+-if ($^O =~ /^(?:uwin|cygwin|solaris)$/) {
++if ($^O =~ /^(?:uwin|cygwin|interix|solaris)$/) {
+ # Or anybody else who can have spaces in group names.
+ $gr1 = join(' ', grep(!$did{$_}++, sort split(' ', join(' ', @gr))));
+ } else {
diff --git a/lang/perl5/patches/patch-ch b/lang/perl5/patches/patch-ch
new file mode 100644
index 00000000000..80db4adb75f
--- /dev/null
+++ b/lang/perl5/patches/patch-ch
@@ -0,0 +1,13 @@
+$NetBSD: patch-ch,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- hints/dec_osf.sh.orig 2004-05-14 03:44:00.000000000 +0200
++++ hints/dec_osf.sh
+@@ -243,7 +243,7 @@ case "`uname -r`" in
+ # fixed in 4.0E or better.
+ ;;
+ *)
+- lddlflags="$lddlflags $optimize"
++ lddlflags="$lddlflags"
+ ;;
+ esac
+ # -msym: If using a sufficiently recent /sbin/loader,
diff --git a/lang/perl5/patches/patch-ci b/lang/perl5/patches/patch-ci
new file mode 100644
index 00000000000..01324fa0395
--- /dev/null
+++ b/lang/perl5/patches/patch-ci
@@ -0,0 +1,18 @@
+$NetBSD: patch-ci,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- pp_sys.c.orig 2004-10-19 13:07:23.000000000 -0400
++++ pp_sys.c
+@@ -4450,9 +4450,11 @@ PP(pp_gmtime)
+ when = (Time_t)SvIVx(POPs);
+ #endif
+
+- if (PL_op->op_type == OP_LOCALTIME)
++ if (PL_op->op_type == OP_LOCALTIME) {
++ /* Explicitly invoke tzset() as localtime_r may not. */
++ tzset();
+ tmbuf = localtime(&when);
+- else
++ } else
+ tmbuf = gmtime(&when);
+
+ if (GIMME != G_ARRAY) {
diff --git a/lang/perl5/patches/patch-cj b/lang/perl5/patches/patch-cj
new file mode 100644
index 00000000000..a0b01800261
--- /dev/null
+++ b/lang/perl5/patches/patch-cj
@@ -0,0 +1,123 @@
+$NetBSD: patch-cj,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- /dev/null 2005-01-17 19:31:20.000000000 -0500
++++ hints/dragonfly.sh 2005-01-17 19:39:56.000000000 -0500
+@@ -0,0 +1,118 @@
++# hints/dragonfly.sh
++#
++# This file is mostly copied from hints/freebsd.sh with the OS version
++# information taken out and only the FreeBSD-4 information intact.
++# Please check with Todd Willey <xtoddx@gmail.com> before making
++# modifications to this file.
++
++case "$osvers" in
++*) usevfork='true'
++ case "$usemymalloc" in
++ "") usemymalloc='n'
++ ;;
++ esac
++ libswanted=`echo $libswanted | sed 's/ malloc / /'`
++ ;;
++esac
++
++# Dynamic Loading flags have not changed much, so they are separated
++# out here to avoid duplicating them everywhere.
++case "$osvers" in
++*)
++ objformat=`/usr/bin/objformat`
++ if [ x$objformat = xelf ]; then
++ libpth="/usr/lib /usr/local/lib"
++ glibpth="/usr/lib /usr/local/lib"
++ ldflags="-Wl,-E "
++ lddlflags="-shared "
++ else
++ if [ -e /usr/lib/aout ]; then
++ libpth="/usr/lib/aout /usr/local/lib /usr/lib"
++ glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
++ fi
++ lddlflags='-Bshareable'
++ fi
++ cccdlflags='-DPIC -fPIC'
++ ;;
++esac
++
++case "$osvers" in
++*)
++ ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
++ if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
++ usenm=false
++ fi
++ ;;
++esac
++
++cat <<'EOM' >&4
++
++Some users have reported that Configure halts when testing for
++the O_NONBLOCK symbol with a syntax error. This is apparently a
++sh error. Rerunning Configure with ksh apparently fixes the
++problem. Try
++ ksh Configure [your options]
++
++EOM
++
++# From: Anton Berezin <tobez@plab.ku.dk>
++# To: perl5-porters@perl.org
++# Subject: [PATCH 5.005_54] Configure - hints/freebsd.sh signal handler type
++# Date: 30 Nov 1998 19:46:24 +0100
++# Message-ID: <864srhhvcv.fsf@lion.plab.ku.dk>
++
++signal_t='void'
++d_voidsig='define'
++
++# This script UU/usethreads.cbu will get 'called-back' by Configure
++# after it has prompted the user for whether to use threads.
++cat > UU/usethreads.cbu <<'EOCBU'
++case "$usethreads" in
++$define|true|[yY]*)
++ lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
++ case "$osvers" in
++ *)
++ if [ ! -r "$lc_r" ]; then
++ cat <<EOM >&4
++POSIX threads should be supported by FreeBSD $osvers --
++but your system is missing the shared libc_r.
++(/sbin/ldconfig -r doesn't find any).
++
++Consider using the latest STABLE release.
++EOM
++ exit 1
++ fi
++ case "$osvers" in
++ *) ldflags="-pthread $ldflags"
++ ;;
++ esac
++ # Both in 4.x and 5.x gethostbyaddr_r exists but
++ # it is "Temporary function, not threadsafe"...
++ # Presumably earlier it didn't even exist.
++ d_gethostbyaddr_r="undef"
++ d_gethostbyaddr_r_proto="0"
++ ;;
++
++ esac
++
++ set `echo X "$libswanted "| sed -e 's/ c / c_r /'`
++ shift
++ libswanted="$*"
++ # Configure will probably pick the wrong libc to use for nm scan.
++ # The safest quick-fix is just to not use nm at all...
++ usenm=false
++
++ unset lc_r
++
++ # Even with the malloc mutexes the Perl malloc does not
++ # seem to be threadsafe in FreeBSD?
++ case "$usemymalloc" in
++ '') usemymalloc=n ;;
++ esac
++esac
++EOCBU
++
++# malloc wrap works
++case "$usemallocwrap" in
++'') usemallocwrap='define' ;;
++esac
diff --git a/lang/perl5/patches/patch-ck b/lang/perl5/patches/patch-ck
new file mode 100644
index 00000000000..966851d7721
--- /dev/null
+++ b/lang/perl5/patches/patch-ck
@@ -0,0 +1,25 @@
+$NetBSD: patch-ck,v 1.1 2005/06/24 06:43:47 jlam Exp $
+--- hints/aix_4.sh.orig 2004-09-09 23:29:04.000000000 -0700
++++ hints/aix_4.sh 2005-03-08 18:42:35.000000000 -0700
+@@ -103,9 +103,10 @@
+ esac
+
+ # uname -m output is too specific and not appropriate here
+-case "$archname" in
+- '') archname="$osname" ;;
+- esac
++#case "$archname" in
++# '') archname="$osname" ;;
++# esac
++archname="rs6000-$osname"
+
+ cc=${cc:-cc}
+ ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
+@@ -297,6 +298,7 @@
+ d_getgrent_r='undef'
+ d_getpwent_r='undef'
+ d_random_r='undef'
++ d_srandom_r='undef'
+ d_setgrent_r='undef'
+ d_setpwent_r='undef'
+ d_srand48_r='undef'
diff --git a/lang/perl5/patches/patch-cl b/lang/perl5/patches/patch-cl
new file mode 100644
index 00000000000..40d496bc5b6
--- /dev/null
+++ b/lang/perl5/patches/patch-cl
@@ -0,0 +1,21 @@
+$NetBSD: patch-cl,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- ext/SDBM_File/sdbm/sdbm.c.orig 2003-08-27 06:30:22.000000000 -0400
++++ ext/SDBM_File/sdbm/sdbm.c
+@@ -34,10 +34,12 @@
+ /*
+ * externals
+ */
+-#ifndef WIN32
+-#ifndef sun
+-extern int errno;
+-#endif
++#ifndef errno
++ extern int errno; /* ANSI allows errno to be an lvalue expr.
++ * For example in multithreaded environments
++ * something like this might happen:
++ * extern int *_errno(void);
++ * #define errno (*_errno()) */
+ #endif
+
+ extern Malloc_t malloc proto((MEM_SIZE));
diff --git a/lang/perl5/patches/patch-zc b/lang/perl5/patches/patch-zc
new file mode 100644
index 00000000000..d7b090de6fc
--- /dev/null
+++ b/lang/perl5/patches/patch-zc
@@ -0,0 +1,36 @@
+$NetBSD: patch-zc,v 1.1 2005/06/24 06:43:47 jlam Exp $
+
+--- Policy_sh.SH.orig Fri Aug 1 05:23:23 2003
++++ Policy_sh.SH Tue Aug 26 02:12:12 2003
+@@ -184,11 +184,11 @@
+ ;;
+ sitearch) dflt="$sitelib/$archname" ;;
+
+- siteman1) dflt="$siteprefix/man/man1" ;;
+- siteman3) dflt="$siteprefix/man/man3" ;;
++ siteman1dir) dflt="$siteprefix/man/man1" ;;
++ siteman3dir) dflt="$siteprefix/man/man3" ;;
+ # We don't know what to do with these yet.
+- sitehtml1) dflt='' ;;
+- sitehtm31dir) dflt='' ;;
++ sitehtml1dir) dflt='' ;;
++ sitehtml1dir) dflt='' ;;
+
+ # Directories for vendor-supplied add-on files
+ # These are all usually empty.
+@@ -213,11 +213,11 @@
+ ;;
+ vendorarch) dflt="$vendorlib/$archname" ;;
+
+- vendorman1) dflt="$vendorprefix/man/man1" ;;
+- vendorman3) dflt="$vendorprefix/man/man3" ;;
++ vendorman1dir) dflt="$vendorprefix/man/man1" ;;
++ vendorman3dir) dflt="$vendorprefix/man/man3" ;;
+ # We don't know what to do with these yet.
+- vendorhtml1) dflt='' ;;
+- vendorhtm3) dflt='' ;;
++ vendorhtml1dir) dflt='' ;;
++ vendorhtml3dir) dflt='' ;;
+
+ esac # End of vendorprefix != ''
+ fi