Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
+42 -25
View File
@@ -1,6 +1,6 @@
$NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
$NetBSD: patch-aa,v 1.8 2016/05/22 17:50:57 wiz Exp $
--- Makefile.PL.orig 2010-03-03 21:26:10.000000000 +0000
--- Makefile.PL.orig 2016-05-07 03:14:29.000000000 +0000
+++ Makefile.PL
@@ -2,9 +2,6 @@
use ExtUtils::MakeMaker;
@@ -12,9 +12,9 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
# Uncomment and change this line if I fail to find it
# $paridir = "..";
@@ -16,137 +13,16 @@ unless (-t STDOUT) { # Better reports i
select $odef;
}
@@ -18,151 +15,16 @@ unless (-t STDOUT) { # Better reports i
chmod 0400, 'typemap' if $^O =~ /cygwin/ and -f 'typemap' and not -r 'typemap'; # bug in some installations of cygwin???
-my $ok23 = 0;
-grep {/^machine=(.*)$/i and $common::machine = $1} @ARGV;
@@ -26,7 +26,7 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
-grep {/^version23_ok=(.*)$/i and $ok23 = $1} @ARGV;
-
-# The REx should anchored-match versions to skip
-$common::skip_versions = $ok23 ? '(?!)' : '2\.(?:[3-9]|\d\d+)\.';
-$common::skip_versions = $ok23 ? '2\.(?:[4-9]|\d\d+)\.' : '2\.(?:[3-9]|\d\d+)\.';
-
-@ARGV = grep !/^((machine|paridir|pari_tgz|parilib|version23_ok)=.*|configure|force_download)$/i, @ARGV;
-
@@ -50,8 +50,29 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
- ld=$Config{ld}, ldflags='$Config{ldflags}'.
-EOP
-
-if ($^O eq 'solaris' and $Config{cc} eq 'gcc'
- and ( $Config{optimize} =~ s/(?<!\S)(-xarch=386|-xildoff)(?!\S)//g
- or $Config{cccdlflags} =~ s/(?<!\S)-KPIC(?!\S)/-fPIC/ )) {
- # Vendor's Perl has major problems with building extensions; try to fix this
- # One way is to use perlgcc; but it does not work with 5.8.4
- # See http://prefetch.net/blog/index.php/2006/07/29/building-perl-modules-for-solaris/
- print <<EOP;
-
-... Broken config of gcc-on-Solaris detected! I would try to work around this.
-... Reset: cccdlflags --> '$Config{cccdlflags}', optimize -> '$Config{optimize}'.
+my $pariprefix;
+my $addlibs;
+my $libpari = "pari";
+
+grep {/^pariprefix=(.*)$/i and $pariprefix = $1} @ARGV;
+grep {/^addlibs=(.*)$/i and $addlibs = $1} @ARGV;
+grep {/^libpari=(.*)$/i and $libpari = $1} @ARGV;
-EOP
-}
-
-if ($common::parilib) {
- $pari_version = '2001004'; # XXXX How to get a correct one?
- $pari_version = '2001007'; # XXXX How to get a correct one?
- $define = '-DNO_HIGHLEVEL_PARI';
- print <<EOP;
-Trying to use existing PARI library (at $common::parilib)
@@ -124,14 +145,7 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
-} elsif ($os eq 'linux') {
- $noexp2 = 1;
-}
+my $pariprefix;
+my $addlibs;
+my $libpari = "pari";
+
+grep {/^pariprefix=(.*)$/i and $pariprefix = $1} @ARGV;
+grep {/^addlibs=(.*)$/i and $addlibs = $1} @ARGV;
+grep {/^libpari=(.*)$/i and $libpari = $1} @ARGV;
-
-my %opts;
-unless ($common::parilib) {
- build_tests $paridir; # Convert the test suite
@@ -159,7 +173,7 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
# We want to find the offset of the least significant byte
# of SV.flags inside an SV.
@@ -164,67 +40,40 @@ my $perl_int_size = $Config{'ivsize'} ||
@@ -180,74 +42,36 @@ my $perl_int_size = $Config{'ivsize'} ||
$define .= ' -DLONG_SHORTER_THAN_IV' if $perl_int_size > $longsize;
$define .= ' -Derr=pari_err'; # On linux it can get a wrong dynamic loading
@@ -172,10 +186,10 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
-# XXXX because functions_hash = NULL???
-# $define .= ' -DNO_HIGHLEVEL_PARI' if $pari_version >= 2003000;
-$define .= ' -DNO_GRAPHICS_PARI' if $pari_version >= 2003000;
-
-# This is done in Makefile in GP/PARI, and in paricfg.h without do_configure
-$define .= ' -DDL_DFLT_NAME=NULL' if $common::do_configure;
-
-my $extra_inc = extra_includes($paridir);
+$define .= " -DNO_HIGHLEVEL_PARI";
@@ -199,12 +213,15 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
- macro => { %patchrc,
- PARI_DIR => $paridir,
- },
+# clean => { FILES => 'pari.ps test_eng/ex.t- libPARI.dumb.pod libPARI.pod t/55_*.t ftp-cmd' },
+# macro => { %patchrc,
+# PARI_DIR => $paridir,
+# },
);
-if (not $common::patches_run or @common::patches_fail) {
- my @patches_needed = patches_for($pari_version);
- my $msg = $common::patches_run ? "failed when applied" : "were not applied";
- push @common::patches_fail, @patches_needed unless $common::patches_run;
- warn "\nThe following patches were judged to be beneficial, but $msg:\n\t@common::patches_fail\n";
-}
-
-
-# Remake POD if the source changed.
-# Go to a subdirectory to build the headers and the library.
@@ -238,15 +255,15 @@ $NetBSD: patch-aa,v 1.6 2015/08/10 08:23:49 dholland Exp $
+ open( $fh, "<", "${pariprefix}/include/pari/paricfg.h" ) or die $!;
+ while( my $line = <$fh> )
+ {
+ next unless ( $line =~ m/^#define\s+PARIVERSION.*(\d+)\.(\d+)\.(\d+)/ );
+ $formatted_version = sprintf( "%d%03d%03d", $1, $2, $3 );
+ next unless ( $line =~ m/^#define\s+PARIVERSION.*(\d+)\.(\d+)\.(\d+)/ );
+ $formatted_version = sprintf( "%d%03d%03d", $1, $2, $3 );
+ }
+ close($fh);
+ return $formatted_version;
}
# Rewrite pic option to PIC in CCCDLFLAGS,
@@ -234,7 +83,8 @@ sub MY::const_config
@@ -257,7 +81,8 @@ sub MY::const_config
my $self = shift;
my $flags = $self->{'CCCDLFLAGS'}; # Tmp var needed with Perl4 !
$flags =~ s/(-[fK]?\s*)pic\b/${1}PIC/;