summaryrefslogtreecommitdiff
path: root/lang/perl5-devel/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/perl5-devel/files')
-rw-r--r--lang/perl5-devel/files/patch-Configure33
-rw-r--r--lang/perl5-devel/files/patch-Makefile.SH10
-rw-r--r--lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__lib__ExtUtils__MM_Any.pm18
-rw-r--r--lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__t__INST_PREFIX.t20
-rw-r--r--lang/perl5-devel/files/patch-cpan_podlators_lib_Pod_Man.pm107
-rw-r--r--lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t39
-rw-r--r--lang/perl5-devel/files/patch-dist__Math-BigInt__lib__Math__BigInt.pm11
-rw-r--r--lang/perl5-devel/files/patch-hints__freebsd.sh51
-rw-r--r--lang/perl5-devel/files/patch-perl.c21
-rw-r--r--lang/perl5-devel/files/patch-vutil.h11
-rw-r--r--lang/perl5-devel/files/perl-man.conf.in2
-rw-r--r--lang/perl5-devel/files/perl5_version.in2
-rw-r--r--lang/perl5-devel/files/use.perl.in42
13 files changed, 367 insertions, 0 deletions
diff --git a/lang/perl5-devel/files/patch-Configure b/lang/perl5-devel/files/patch-Configure
new file mode 100644
index 000000000000..90a61877092d
--- /dev/null
+++ b/lang/perl5-devel/files/patch-Configure
@@ -0,0 +1,33 @@
+--- Configure.orig 2015-04-15 07:47:18 UTC
++++ Configure
+@@ -3833,7 +3833,10 @@ esac
+ . ./posthint.sh
+
+ : who configured the system
+-cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
++case "$cf_time" in
++"")
++ cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` ;;
++esac
+ case "$cf_by" in
+ "")
+ cf_by=`(logname) 2>/dev/null`
+@@ -5014,7 +5017,7 @@ esac
+ : Now check and see which directories actually exist, avoiding duplicates
+ for xxx in $dlist
+ do
+- if $test -d $xxx; then
++ if $test -d $xxx || [ $xxx = $prefix/lib ]; then
+ case " $libpth " in
+ *" $xxx "*) ;;
+ *) libpth="$libpth $xxx";;
+@@ -9515,8 +9518,7 @@ prefixvar=siteman3dir
+
+ : determine where add-on public executable scripts go
+ case "$sitescript" in
+-'') dflt=$siteprefix/script
+- $test -d $dflt || dflt=$sitebin ;;
++'') dflt=$sitebin ;;
+ *) dflt="$sitescript" ;;
+ esac
+ fn=d~+
diff --git a/lang/perl5-devel/files/patch-Makefile.SH b/lang/perl5-devel/files/patch-Makefile.SH
new file mode 100644
index 000000000000..1431abc495c2
--- /dev/null
+++ b/lang/perl5-devel/files/patch-Makefile.SH
@@ -0,0 +1,10 @@
+--- Makefile.SH.orig 2015-04-15 07:47:18 UTC
++++ Makefile.SH
+@@ -31,7 +31,6 @@ esac
+ pwd="`pwd`"
+ linklibperl='$(LIBPERL)'
+ linklibperl_nonshr=''
+-shrpldflags='$(LDDLFLAGS)'
+ ldlibpth=''
+ DPERL_EXTERNAL_GLOB='-DPERL_EXTERNAL_GLOB'
+ DPERL_IS_MINIPERL='-DPERL_IS_MINIPERL'
diff --git a/lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__lib__ExtUtils__MM_Any.pm b/lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__lib__ExtUtils__MM_Any.pm
new file mode 100644
index 000000000000..de33d8f36310
--- /dev/null
+++ b/lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__lib__ExtUtils__MM_Any.pm
@@ -0,0 +1,18 @@
+--- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm.orig 2015-04-15 07:47:18 UTC
++++ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Any.pm
+@@ -1871,13 +1871,14 @@ sub init_INSTALL_from_PREFIX {
+ ('$(PREFIX)') x 3;
+ }
+ else {
++ $self->{PREFIX} ||= $iprefix;
+ $self->{PERLPREFIX} ||= $iprefix;
+ $self->{SITEPREFIX} ||= $sprefix;
+ $self->{VENDORPREFIX} ||= $vprefix;
+
+ # Lots of MM extension authors like to use $(PREFIX) so we
+ # put something sensible in there no matter what.
+- $self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
++ #$self->{PREFIX} = '$('.uc $self->{INSTALLDIRS}.'PREFIX)';
+ }
+
+ my $arch = $Config{archname};
diff --git a/lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__t__INST_PREFIX.t b/lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__t__INST_PREFIX.t
new file mode 100644
index 000000000000..2857893c5809
--- /dev/null
+++ b/lang/perl5-devel/files/patch-cpan__ExtUtils-MakeMaker__t__INST_PREFIX.t
@@ -0,0 +1,20 @@
+--- cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t.orig 2015-04-15 07:47:18 UTC
++++ cpan/ExtUtils-MakeMaker/t/INST_PREFIX.t
+@@ -10,7 +10,7 @@ BEGIN {
+ }
+
+ use strict;
+-use Test::More tests => 52;
++use Test::More tests => 51;
+ use MakeMaker::Test::Utils;
+ use MakeMaker::Test::Setup::BFD;
+ use ExtUtils::MakeMaker;
+@@ -62,7 +62,7 @@ like( $stdout->read, qr{
+ (?:Writing\ MYMETA.yml\ and\ MYMETA.json\n)?
+ }x );
+
+-is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
++## is( $mm->{PREFIX}, '$(SITEPREFIX)', 'PREFIX set based on INSTALLDIRS' );
+
+ isa_ok( $mm, 'ExtUtils::MakeMaker' );
+
diff --git a/lang/perl5-devel/files/patch-cpan_podlators_lib_Pod_Man.pm b/lang/perl5-devel/files/patch-cpan_podlators_lib_Pod_Man.pm
new file mode 100644
index 000000000000..438678c83c59
--- /dev/null
+++ b/lang/perl5-devel/files/patch-cpan_podlators_lib_Pod_Man.pm
@@ -0,0 +1,107 @@
+--- cpan/podlators/lib/Pod/Man.pm.orig 2015-04-15 07:47:18 UTC
++++ cpan/podlators/lib/Pod/Man.pm
+@@ -876,25 +876,42 @@ sub devise_title {
+ }
+
+ # Determine the modification date and return that, properly formatted in ISO
+-# format. If we can't get the modification date of the input, instead use the
+-# current time. Pod::Simple returns a completely unuseful stringified file
+-# handle as the source_filename for input from a file handle, so we have to
+-# deal with that as well.
++# format.
++#
++# If POD_MAN_DATE is set, that overrides anything else. This can be used for
++# reproducible generation of the same file even if the input file timestamps
++# are unpredictable or the POD coms from standard input.
++#
++# Otherwise, use the modification date of the input if we can stat it. Be
++# aware that Pod::Simple returns the stringification of the file handle as
++# source_filename for input from a file handle, so we'll stat some random ref
++# string in that case. If that fails, instead use the current time.
++#
++# $self - Pod::Man object, used to get the source file
++#
++# Returns: YYYY-MM-DD date suitable for the left-hand footer
+ sub devise_date {
+ my ($self) = @_;
++
++ # If POD_MAN_DATE is set, always use it.
++ if ($ENV{POD_MAN_DATE}) {
++ return $ENV{POD_MAN_DATE};
++ }
++
++ # Otherwise, get the input filename and try to stat it. If that fails,
++ # use the current time.
+ my $input = $self->source_filename;
+ my $time;
+ if ($input) {
+- $time = (stat $input)[9] || time;
++ $time = (stat($input))[9] || time();
+ } else {
+- $time = time;
++ $time = time();
+ }
+
+- # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker
+- # uses this and it has to work in the core which can't load dynamic
+- # libraries.
+- my ($year, $month, $day) = (localtime $time)[5,4,3];
+- return sprintf ("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
++ # Can't use POSIX::strftime(), which uses Fcntl, because MakeMaker uses
++ # this and it has to work in the core which can't load dynamic libraries.
++ my ($year, $month, $day) = (localtime($time))[5,4,3];
++ return sprintf("%04d-%02d-%02d", $year + 1900, $month + 1, $day);
+ }
+
+ # Print out the preamble and the title. The meaning of the arguments to .TH
+@@ -1632,6 +1649,15 @@ argument.
+ Sets the centered page header to use instead of "User Contributed Perl
+ Documentation".
+
++=item date
++
++Sets the left-hand footer. If this option is not set, the contents of the
++environment variable POD_MAN_DATE, if set, will be used. Failing that,
++the modification date of the input file will be used, or the current time
++if stat() can't find that file (which will be the case if the input is
++from C<STDIN>). If obtained from the file modification date or the
++current time, he date will be formatted as C<YYYY-MM-DD>.
++
+ =item errors
+
+ How to report errors. C<die> says to throw an exception on any POD
+@@ -1642,13 +1668,6 @@ POD errors entirely, as much as possible
+
+ The default is C<pod>.
+
+-=item date
+-
+-Sets the left-hand footer. By default, the modification date of the input
+-file will be used, or the current date if stat() can't find that file (the
+-case if the input is from C<STDIN>), and the date will be formatted as
+-C<YYYY-MM-DD>.
+-
+ =item fixed
+
+ The fixed-width font to use for verbatim text and code. Defaults to
+@@ -1810,6 +1829,20 @@ option was set to C<die>.
+
+ =back
+
++=head1 ENVIRONMENT
++
++=over 4
++
++=item POD_MAN_DATE
++
++If set, this will be used as the value of the left-hand footer unless the
++C<date> option is explicitly set, overriding the timestamp of the input
++file or the current time. This is primarily useful to ensure reproducible
++builds of the same output file given the same souce and Pod::Man version,
++even when file timestamps may not be consistent.
++
++=back
++
+ =head1 BUGS
+
+ Encoding handling assumes that PerlIO is available and does not work
diff --git a/lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t b/lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t
new file mode 100644
index 000000000000..3023a2a5b49e
--- /dev/null
+++ b/lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t
@@ -0,0 +1,39 @@
+--- cpan/podlators/t/devise-date.t.orig 2015-04-15 07:47:18 UTC
++++ cpan/podlators/t/devise-date.t
+@@ -1,15 +1,28 @@
+-#!/usr/bin/perl -w
+-
+-# In order for MakeMaker to build in the core, nothing can use
+-# Fcntl which includes POSIX. devise_date()'s use of strftime()
+-# was replaced. This tests that it's identical.
++#!/usr/bin/perl
++#
++# In order for MakeMaker to build in the core, nothing can use Fcntl which
++# includes POSIX. devise_date()'s use of strftime() was replaced. This tests
++# that it's identical. It also tests special handling of the POD_MAN_DATE
++# environment variable.
+
++use 5.006;
+ use strict;
+-
+-use Test::More tests => 1;
++use warnings;
+
+ use Pod::Man;
+ use POSIX qw(strftime);
+
++use Test::More tests => 2;
++
++# Check that the results of device_date matches strftime. There is no input
++# file name, so this will use the current time.
+ my $parser = Pod::Man->new;
+-is $parser->devise_date, strftime("%Y-%m-%d", localtime);
++is(
++ $parser->devise_date,
++ strftime('%Y-%m-%d', localtime()),
++ 'devise_date matches strftime'
++);
++
++# Set the override environment variable and ensure that it's honored.
++local $ENV{POD_MAN_DATE} = '2014-01-01';
++is($parser->devise_date, '2014-01-01', 'devise_date honors POD_MAN_DATE');
diff --git a/lang/perl5-devel/files/patch-dist__Math-BigInt__lib__Math__BigInt.pm b/lang/perl5-devel/files/patch-dist__Math-BigInt__lib__Math__BigInt.pm
new file mode 100644
index 000000000000..467ac9d4a0f5
--- /dev/null
+++ b/lang/perl5-devel/files/patch-dist__Math-BigInt__lib__Math__BigInt.pm
@@ -0,0 +1,11 @@
+--- dist/Math-BigInt/lib/Math/BigInt.pm.orig 2015-04-15 07:47:18 UTC
++++ dist/Math-BigInt/lib/Math/BigInt.pm
+@@ -62,7 +62,7 @@ use overload
+ '>>=' => sub { $_[0]->brsft($_[1]); },
+
+ # not supported by Perl yet
+-'..' => \&_pointpoint,
++# '..' => \&_pointpoint,
+
+ '<=>' => sub { my $rc = $_[2] ?
+ ref($_[0])->bcmp($_[1],$_[0]) :
diff --git a/lang/perl5-devel/files/patch-hints__freebsd.sh b/lang/perl5-devel/files/patch-hints__freebsd.sh
new file mode 100644
index 000000000000..ad822d326369
--- /dev/null
+++ b/lang/perl5-devel/files/patch-hints__freebsd.sh
@@ -0,0 +1,51 @@
+--- hints/freebsd.sh.orig 2015-04-15 07:47:18 UTC
++++ hints/freebsd.sh
+@@ -88,6 +88,8 @@ case "$osvers" in
+ esac
+ libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ libswanted=`echo $libswanted | sed 's/ bind / /'`
++ libswanted=`echo $libswanted | sed 's/ dl / /'`
++ libswanted=`echo $libswanted | sed 's/ c / /'`
+ # iconv gone in Perl 5.8.1, but if someone compiles 5.8.0 or earlier.
+ libswanted=`echo $libswanted | sed 's/ iconv / /'`
+ d_setregid='define'
+@@ -102,6 +104,10 @@ case "$osvers" in
+ ;;
+ esac
+ libswanted=`echo $libswanted | sed 's/ malloc / /'`
++ libswanted=`echo $libswanted | sed 's/ bind / /'`
++ libswanted=`echo $libswanted | sed 's/ dl / /'`
++ libswanted=`echo $libswanted | sed 's/ iconv / /'`
++ libswanted=`echo $libswanted | sed 's/ c / /'`
+ ;;
+ esac
+
+@@ -126,7 +132,7 @@ case "$osvers" in
+ else
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+- ldflags="-Wl,-E "
++ ldflags="%%PTHREAD_LIBS%% -Wl,-E "
+ lddlflags="-shared "
+ fi
+ cccdlflags='-DPIC -fPIC'
+@@ -134,7 +140,7 @@ case "$osvers" in
+ *)
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+- ldflags="-Wl,-E "
++ ldflags="%%PTHREAD_LIBS%% -Wl,-E "
+ lddlflags="-shared "
+ cccdlflags='-DPIC -fPIC'
+ ;;
+@@ -191,7 +197,9 @@ esac
+
+ # 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'
++## not quite - modern FreeBSD perl port is supposed to take care of that
++## we just add extra libraries and cflags nowadays
++cat > /dev/null <<'EOCBU'
+ case "$usethreads" in
+ $define|true|[yY]*)
+ lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
diff --git a/lang/perl5-devel/files/patch-perl.c b/lang/perl5-devel/files/patch-perl.c
new file mode 100644
index 000000000000..cc7fe9dec935
--- /dev/null
+++ b/lang/perl5-devel/files/patch-perl.c
@@ -0,0 +1,21 @@
+--- perl.c.orig 2015-04-15 07:47:18 UTC
++++ perl.c
+@@ -1795,18 +1795,7 @@ S_Internals_V(pTHX_ CV *cv)
+ PUSHs(Perl_newSVpvn_flags(aTHX_ non_bincompat_options,
+ sizeof(non_bincompat_options) - 1, SVs_TEMP));
+
+-#ifdef __DATE__
+-# ifdef __TIME__
+- PUSHs(Perl_newSVpvn_flags(aTHX_
+- STR_WITH_LEN("Compiled at " __DATE__ " " __TIME__),
+- SVs_TEMP));
+-# else
+- PUSHs(Perl_newSVpvn_flags(aTHX_ STR_WITH_LEN("Compiled on " __DATE__),
+- SVs_TEMP));
+-# endif
+-#else
+ PUSHs(&PL_sv_undef);
+-#endif
+
+ for (i = 1; i <= local_patch_count; i++) {
+ /* This will be an undef, if PL_localpatches[i] is NULL. */
diff --git a/lang/perl5-devel/files/patch-vutil.h b/lang/perl5-devel/files/patch-vutil.h
new file mode 100644
index 000000000000..0ff04be80ab9
--- /dev/null
+++ b/lang/perl5-devel/files/patch-vutil.h
@@ -0,0 +1,11 @@
+--- vutil.h.orig 2015-04-15 07:47:18 UTC
++++ vutil.h
+@@ -115,7 +115,7 @@ S_croak_xs_usage(pTHX_ const CV *const c
+ Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
+ } else {
+ /* Pants. I don't think that it should be possible to get here. */
+- Perl_croak_nocontext("Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
++ Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
+ }
+ }
+
diff --git a/lang/perl5-devel/files/perl-man.conf.in b/lang/perl5-devel/files/perl-man.conf.in
new file mode 100644
index 000000000000..441fc5d4c44c
--- /dev/null
+++ b/lang/perl5-devel/files/perl-man.conf.in
@@ -0,0 +1,2 @@
+MANPATH %%PREFIX%%/%%SITEMAN3PREFIX%%/man
+MANPATH %%PREFIX%%/%%MAN3PREFIX%%/man
diff --git a/lang/perl5-devel/files/perl5_version.in b/lang/perl5-devel/files/perl5_version.in
new file mode 100644
index 000000000000..97e1f75dfb9f
--- /dev/null
+++ b/lang/perl5-devel/files/perl5_version.in
@@ -0,0 +1,2 @@
+# Do not modify PERL_VERSION here, instead use DEFAULT_VERSIONS= perl5=%%PERL_VER%%
+PERL_VERSION=%%PERL_VERSION%%
diff --git a/lang/perl5-devel/files/use.perl.in b/lang/perl5-devel/files/use.perl.in
new file mode 100644
index 000000000000..e50f83b9d0d2
--- /dev/null
+++ b/lang/perl5-devel/files/use.perl.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# $FreeBSD$
+
+: ${OSVERSION:=`/sbin/sysctl -n kern.osreldate`};
+PERL_VERSION="%%PERL_VERSION%%"
+banner="# added by use.perl $(/bin/date +'%F %T')"
+
+do_cleanup_manpath()
+{
+ if [ -f /etc/manpath.config ] ; then
+ /bin/cp -p /etc/manpath.config /etc/manpath.config.new
+ /usr/bin/awk 's=0;
+ /^#.*use.perl/ { s=1; mode=1 }
+ /^#/ { s=1; if (mode != 1) { mode=0 } }
+ /^OPTIONAL_MANPATH.*perl5/ { s=1; if (mode == 1) { mode=2 } }
+ /^$/ { s=1; if (mode != 2) { mode = 0 } }
+ { if (s != 1) { mode = 0 } if (mode == 0) print }' /etc/manpath.config >/etc/manpath.config.new
+ /bin/mv /etc/manpath.config /etc/manpath.config.bak
+ /bin/mv /etc/manpath.config.new /etc/manpath.config
+ /bin/rm /etc/manpath.config.bak
+ fi
+}
+
+do_spam_manpath()
+{
+ if [ -f /etc/manpath.config ] ; then
+ echo "${banner}" >>/etc/manpath.config
+ echo "OPTIONAL_MANPATH ${PKG_PREFIX}/%%SITEMAN3PREFIX%%/man" >>/etc/manpath.config
+ echo "OPTIONAL_MANPATH ${PKG_PREFIX}/%%MAN3PREFIX%%/man" >>/etc/manpath.config
+ fi
+}
+
+
+if [ "$2" = "POST-INSTALL" ] ; then
+ do_cleanup_manpath
+ do_spam_manpath
+elif [ "$2" = "POST-DEINSTALL" ] ; then
+ do_cleanup_manpath
+fi
+
+exit 0