summaryrefslogtreecommitdiff
path: root/math/p5-Math-Pari
diff options
context:
space:
mode:
authorheinz <heinz@pkgsrc.org>2006-02-14 22:52:15 +0000
committerheinz <heinz@pkgsrc.org>2006-02-14 22:52:15 +0000
commit63d8091fc6090bd71a58698c1cfeafc47ecf94e6 (patch)
treecca404d044de23a80ebf6c69171b821056838279 /math/p5-Math-Pari
parent9345170372d06b1743dd59c9a52f921065f30577 (diff)
downloadpkgsrc-63d8091fc6090bd71a58698c1cfeafc47ecf94e6.tar.gz
Updated to version 2.010703.
This update fixes various segmentation faults during "make test" (using pari 2.1.6). Pkgsrc changes: - Removed files/Makefile.PL (not used anymore). Relevant changes since version 2.010501: ======================================== - various 64-bit fixes - extensive update ot test suite
Diffstat (limited to 'math/p5-Math-Pari')
-rw-r--r--math/p5-Math-Pari/Makefile5
-rw-r--r--math/p5-Math-Pari/distinfo10
-rw-r--r--math/p5-Math-Pari/files/Makefile.PL328
-rw-r--r--math/p5-Math-Pari/patches/patch-ab32
4 files changed, 23 insertions, 352 deletions
diff --git a/math/p5-Math-Pari/Makefile b/math/p5-Math-Pari/Makefile
index d91f1b247f6..d9c4b446ebf 100644
--- a/math/p5-Math-Pari/Makefile
+++ b/math/p5-Math-Pari/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.22 2006/01/11 21:24:09 joerg Exp $
+# $NetBSD: Makefile,v 1.23 2006/02/14 22:52:15 heinz Exp $
#
-DISTNAME= Math-Pari-2.010501
+DISTNAME= Math-Pari-2.010703
PKGNAME= p5-${DISTNAME}
-PKGREVISION= 2
SVR4_PKGNAME= p5mpa
CATEGORIES= math perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Math/}
diff --git a/math/p5-Math-Pari/distinfo b/math/p5-Math-Pari/distinfo
index 53aae8ab619..3b2beabb138 100644
--- a/math/p5-Math-Pari/distinfo
+++ b/math/p5-Math-Pari/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.6 2005/12/03 01:46:26 joerg Exp $
+$NetBSD: distinfo,v 1.7 2006/02/14 22:52:15 heinz Exp $
-SHA1 (Math-Pari-2.010501.tar.gz) = 61ba9cde47a624dfae562360b4e16f34409f4024
-RMD160 (Math-Pari-2.010501.tar.gz) = fcb7414d15cba962ff23a8b3a0fd4276da0db6fc
-Size (Math-Pari-2.010501.tar.gz) = 96680 bytes
-SHA1 (patch-ab) = 6b13e3e9f58d33e11c702ac9d5fd12a479664089
+SHA1 (Math-Pari-2.010703.tar.gz) = 6634d36a7698957493f77ec5acb18c3091ae4c5f
+RMD160 (Math-Pari-2.010703.tar.gz) = cf9ca6c8b6b154ca8f56d1f341c8d76f2142cf9e
+Size (Math-Pari-2.010703.tar.gz) = 108591 bytes
+SHA1 (patch-ab) = 985b0c43128fc1f587bf25f7f2b57f6c8bf3793f
diff --git a/math/p5-Math-Pari/files/Makefile.PL b/math/p5-Math-Pari/files/Makefile.PL
deleted file mode 100644
index 600621aa121..00000000000
--- a/math/p5-Math-Pari/files/Makefile.PL
+++ /dev/null
@@ -1,328 +0,0 @@
-# $Id: Makefile.PL,v 1.1 2001/10/02 01:34:23 mcr Exp $
-use ExtUtils::MakeMaker;
-use Config '%Config';
-use File::Copy 'copy';
-
-# Uncomment and change this line if I fail to find it
-$paridir = "../../../../math/pari/work/pari-2.1.1";
-
-unless (-t STDOUT) { # Better reports if run with redirections
- my $odef = select STDERR;
- $| = 1;
- select STDOUT;
- $| = 1;
- select $odef;
-}
-
-$latmus = 'src/test/in/nfields';
-
-sub format_pari {
- my $dir = shift;
- $dir =~ s/(\d+)\.(\d+).(\d+)/sprintf('%03d%03d%03d',$1,$2,$3)/e;
- $dir;
-}
-
-unless (defined $paridir) {
- # Assume we are inside:
- for $dir ('..', '../..') {
- $paridir = $dir, last
- if -e "$dir/$latmus";
- }
- unless (defined $paridir) {
- # Try to find alongside
- for $dir ('.', '..', '../..') {
- @dirs = <$dir/pari-[234].*>;
- @dirs = grep -e "$_/$latmus", @dirs;
- last if @dirs;
- }
- @gooddirs = grep !/alpha|beta/, @dirs;
- @gooddirs = grep !/alpha/, @dirs unless @gooddirs;
- @gooddirs = @dirs unless @gooddirs;
- @gooddirs = sort {format_pari($a) cmp format_pari($b)} @gooddirs;
- $paridir = $gooddirs[-1] if @gooddirs;
- }
-}
-
-$paridir = get_pari() if !$paridir;
-
-if ($paridir) {
- $pari_version = format_pari($paridir);
- print <<EOP;
-Found PARI build directory in $paridir
- (formatted $pari_version).
-EOP
- $pari_version =~ s/.*pari-0+([0-9]*).*/$1/;
- $common::pari_version = $pari_version;
-} else {
- die "Could not find PARI build directory, please edit Makefile.PL.\n";
-}
-$common::main_paridir = $paridir;
-$os = $Config{osname};
-
-if (@ARGV and $ARGV[0] =~ /^machine=(.*)$/i) {
- $common::machine = $1; shift;
-}
-
-#$define = "-Dshifts=pari_shifts -DDEBUG_PARI";
-$define = "-DPARI_VERSION_EXP=$pari_version -DDEBUG_PARI";
-#$libs = "-L$paridir -lpari -lgnuplot -lm";
-$libs = "-lgnuplot -lm";
-
-# Comment if your Pari is not c++, or your compiler is not gcc:
-# $cpp = "-x c++";
-
-$noexp2 = ''; # Should be used for generation of paricfg.h
-
-if ($os eq "solaris") {
- # Below -R specifies the path to search for this file when the
- # program will run, -L the path to search when the program is linked
- @sc_dirs = </opt/SUNWspro/SC*>;
- if (@sc_dirs) {
- $libs .= " -L$sc_dirs[-1]/lib -lsunmath -lm";
- } else {
- warn "Cannot find SUNWspro dirs, needed for -lsunmath, using NOEXP2.\n";
- $noexp2 = 1;
- }
-} elsif ($os eq "os2") {
- $noexp2 = 1;
- $define .= " -DMALLOC_PROCS";
-} elsif ($os eq 'linux') {
- $noexp2 = 1;
-}
-
-
-# We want to find the offset of the least significant byte
-# of SV.flags inside an SV.
-# It is enough to find the offset of the least significant byte inside a U32.
-# (Needed for recognizing Perl code supplied to lisseq and lisexpr.)
-
-$offset = index($Config{byteorder}, "1");
-$offset = 3 if $offset > 3; # SvFLAGS is actually I32
-
-$define .= " -DLSB_in_U32=$offset";
-$parisrc = "$paridir/src";
-$paritests = "$parisrc/test/in";
-
-opendir TESTS, $paritests
- or die "Cannot find tests in $paritests: $!";
-@tests = readdir TESTS;
-closedir TESTS or die "Cannot find tests (close): $!";
-$sou = 'test_eng/ex.t';
-next if -e $targ and -M $targ <= -M $sou;
-#if (not -e "$sou-" or -M "$sou-" > -M $sou) {
- system "$^X -pe 's,CHANGE_ME,$paridir,' $sou > $sou- "
- and die "Could not run test converter: $! $?";
-#}
-$sou = "$sou-";
-for $test (@tests) {
- next if $test =~ /^\.\.?$/;
- next if $test =~ /compat/;
- next if -d "$paritests/$test" and $test eq 'CVS';
- next if $test =~ /(~|\.(bak|orig|rej))$/;
- $targ = "t/$test.t";
- if (-f $targ) {
- chmod 0666, $targ;
- unlink $targ;
- }
- copy $sou, $targ or die "Cannot create test $test.t: $1";
-}
-$targ = 'libPARI.pod';
-if (not -e $targ
- or -M $targ > -M "$paridir/doc/usersch3.tex"
- or -M $targ > -M "paridoc_to_pod") {
- if (-f $targ) {
- chmod 0666, $targ;
- unlink $targ;
- }
- system "$^X paridoc_to_pod $paridir/doc/usersch3.tex > $targ "
- and die "Errors when converting documentation: $! $?"
-}
-
-@paricfg = <$paridir/o.*/paricfg.h>;
-push @paricfg, <$paridir/O*/paricfg.h>;
-
-@paricfg = grep !/Odos/, @paricfg unless $^O =~ /dos|djgcc/i;
-
-if (@paricfg > 1) {
- warn "Found multiple paricfg.h: @paricfg.\n";
- @paricfg = sort { -M $a <=> -M $b} @paricfg;
- warn "Choosing newest paricfg.h: $paricfg[0].\n";
-}
-if (@paricfg == 0) {
- warn <<EOW;
-Did not find paricfg.h. You will need to manually copy it to libPARI
- directory from the PARI build directory.
-EOW
-} else {
- copy $paricfg[0], 'libPARI/paricfg.h'
- or die "Could not copy $paricfg[0] to paricfg.h: $!"
- if not -e 'libPARI/paricfg.h' or -M $paricfg[0] < -M 'libPARI/paricfg.h';
-}
-
-$define .= ' -Derr=pari_err'; # On linux it can get a wrong dynamic loading
-
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile being created.
-&WriteMakefile(
- LIBS => $libs,
- INC => "-I$parisrc/headers -I$parisrc -I./libPARI",
- NAME => 'Math::Pari',
- MYEXTLIB => 'libPARI/libPARI$(LIB_EXT)',
- VERSION_FROM => 'Pari.pm',
- DEFINE => $define,
- dist => {COMPRESS=>'gzip -9f', SUFFIX=>'gz'},
- clean => { FILES => 'pari.ps' },
- );
-
-
-sub MY::postamble {
- '
-$(MYEXTLIB): libPARI/Makefile FORCE
- cd libPARI && $(MAKE) $(PASTHRU)
-';
-}
-
-sub MY::const_config
-{
- my $self = shift;
- my $flags = $self->{'CCCDLFLAGS'}; # Tmp var needed with Perl4 !
- $flags =~ s/(-[fK]?\s*)pic\b/${1}PIC/;
- $self->{'CCCDLFLAGS'} = $flags;
- if ($^O eq 'MSWin32' && $Config{'ccflags'} =~ /-DPERL_OBJECT/)
- {
- $self->{'LDFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g;
- $self->{'LDDLFLAGS'} =~ s/-(debug|pdb:\w+)\s+//g;
- }
- return $self->MM::const_config;
-}
-
-sub get_pari {
- $host = 'megrez.math.u-bordeaux.fr';
- $dir = '/pub/pari/unix/';
-
- print "Did not find PARI build directory around.\n";
-
- if (-t STDIN and (-t STDOUT or -p STDOUT)) { # Interactive
- $| = 1;
- $mess = <<EOP;
-Do you want to me to fetch PARI automatically?
-Make sure you have a large scrollback buffer to see the messages.
-Fetch? (y/n, press Enter)
-EOP
- chomp $mess;
- print "$mess ";
- $ans = <>;
- if ($ans !~ /y/i) {
- print "Well, as you wish... I give up...\n";
- return;
- }
- } else {
- print "Non-interactive session, autofetching...\n"
- }
-
- print "Getting PARI from ftp://$host$dir\n";
-
- eval { require Net::FTP }
- or die "You do not have Net::Ftp installed, cannot download, exiting...";
-
- $ftp = Net::FTP->new($host) or die "Cannot create FTP object: $!";
- $ftp->login("anonymous","Math::Pari@") or die "Cannot login anonymously: $!";
- $ftp->cwd($dir) or die "Cannot cwd: $!";
- $ftp->binary() or die "Cannot switch to binary: $!";
- @lst = $ftp->ls() or die "Cannot list: $!";
- #print "list = `@lst'\n";
-
- $match = 'pari.*(\d+\.\d+\.\d+).*\.t(ar\.)?gz$';
- $c = 0;
- for $file (@lst) {
- next unless $file =~ /$match/o;
- $c++;
- $version = $1;
- if ($file =~ /alpha/) {
- $alpha{$version} = $file;
- } elsif ($file =~ /beta/) {
- $beta{$version} = $file;
- } else {
- $golden{$version} = $file;
- }
- }
- die "Did not find any file matching /$match/ via FTP"
- unless $c;
-
- sub fmt_version {sprintf "%03d%03d%03d", split /\./, shift}
-
- for $type (qw(alpha beta golden)) {
- if (%$type) {
- $have{$type}++;
- $best = $type;
- @files = keys %$type;
- print "Available ${type} versions: `@files'\n";
- $ {"latest_$type"} = (sort {fmt_version($a) cmp fmt_version($b)}
- keys %$type)[-1];
- $ {"latest_${type}_file"} = $$type{$ {"latest_$type"}};
- print qq(Latest $type is ${"latest_${type}_file"}\n);
- }
- }
-
- # Special-case v2.0.14
- if (!%golden and $latest_beta eq '2.0.11' and $latest_alpha eq '2.0.14') {
- $best = 'alpha'; # It is tested!
- }
-
- if ($best) {
- $file = $ {"latest_${best}_file"};
- $version = $ {"latest_$best"};
- print qq(Picking $best version $version, file $file\n);
- if (-f $file) {
- print qq(Well, I already have it, using the disk copy...\n);
- } else {
- print qq(Downloading...\n);
- $ftp->get($file) or die "Cannot get: $!";
- print qq(Downloaded...\n);
- }
- print qq(Extracting...\n);
- print "zcat $file | tar -xvf -\n";
- system "zcat $file | tar -xvf -"
- and die "Cannot extract: $!, exitcode=$?.\n";
- ($dir = $file) =~ s/\.t(ar\.)?gz$// or die "malformed name `$file'";
- -d $dir or die "Did not find directory $dir!";
- print "cd $dir ; sh ./Configure\n";
- system "cd $dir ; sh ./Configure"
- and die "Cannot configure: $!, exitcode=$?.\n";
- print "Configuration of PARI successful.\n";
- my %patches = ('2.0.11'
- => [qw(
- patch11/diff_pari_gnuplot_aa
- patch11/patch_pari_round0
- patch11/patches_round1_short
- patch11/diff_pari_fixed_interfaces_011
- patch11/diff_pari_highlevel_hash_011a
- patch11/diff_pari_ret_proto_2011)],
- '2.0.12' => ['patch12/diff_for_perl_2012'],
- '2.0.13' => ['patch13/diff_for_perl_2013',
- 'patch13/diff_for_gnuplot_2013'],
- '2.0.14' => ['patch14/diff_for_perl_2014',
- 'patch14/diff_extra_2014',
- 'patch14/diff_last_2014',
- 'patch14/diff_plot_2014'],
- '2.0.15' => ['patch15/diff_cast_2015',
- 'patch15/diff_errout_2015',
- 'patch15/diff_gnuplot_2015',
- 'patch15/diff_proto_2015',
- 'patch15/diff_errpari_2015',
- 'patch15/diff_pari_gnuplot_2015'],
- '2.0.16' => ['patch16/diff_gnuplot_2016'],
- );
- if ($patches{$version}) {
- print "Patching...\n";
- foreach $patch (@{$patches{$version}}) {
- print "cd $dir ; patch -p1 < ../$patch\n";
- system "cd $dir ; patch -p1 < ../$patch";
- }
- print "Finished patching...\n";
- }
- }
-
- $ftp->quit or die "Cannot quit: $!";
- $dir;
-}
diff --git a/math/p5-Math-Pari/patches/patch-ab b/math/p5-Math-Pari/patches/patch-ab
index 694c46c34f7..7faf9cac788 100644
--- a/math/p5-Math-Pari/patches/patch-ab
+++ b/math/p5-Math-Pari/patches/patch-ab
@@ -1,17 +1,17 @@
-$NetBSD: patch-ab,v 1.3 2005/12/03 01:46:26 joerg Exp $
+$NetBSD: patch-ab,v 1.4 2006/02/14 22:52:15 heinz Exp $
---- utils/Math/PariBuild.pm.orig Sun Feb 1 10:30:06 2004
+--- utils/Math/PariBuild.pm.orig 2006-01-31 21:51:44.000000000 +0100
+++ utils/Math/PariBuild.pm
-@@ -674,7 +674,7 @@ sub find_machine_architecture () {
-
- if ($os =~ /^hp/) {
- $machine = 'hppa';
-- } elsif ($os eq 'os2' or $os eq 'freebsd') {
-+ } elsif ($os eq 'os2' or $os eq 'freebsd' or $os eq 'dragonfly') {
- $machine = 'ix86';
- } elsif (0 and $os =~ /win32/i and not $Config{gccversion}) {
- # Not needed with rename of kernel1.s to kernel1.c?
-@@ -714,6 +714,24 @@ sub find_machine_architecture () {
+@@ -699,7 +699,7 @@ sub find_machine_architecture () {
+ $machine = 'irix';
+ } elsif ($os =~ /^hp/) {
+ $machine = `uname -m` || 'hppa';
+- } elsif ($os eq 'os2' or $os eq 'netbsd'
++ } elsif ($os eq 'os2' or $os eq 'dragonfly'
+ or $os eq 'freebsd' or $os =~ /^cygwin/) {
+ chomp($machine = `uname -m`);
+ $machine ||= 'ix86';
+@@ -742,6 +742,24 @@ sub find_machine_architecture () {
} elsif ((split ' ', $Config{myuname})[3] eq 'sun') {
$machine = 'm86k';
}
@@ -31,8 +31,8 @@ $NetBSD: patch-ab,v 1.3 2005/12/03 01:46:26 joerg Exp $
+ $machine='sh5';
+ } elsif ($machine = 'sparc64') {
+ $machine='sparcv9';
-+ }
++ }
+ # these can be used verbatim: alpha amd64 m68k sparc vax
- }
-
- if ( $machine ne 'alpha'
+ } elsif ($os eq 'gnu') {
+ chomp($machine = `uname -m`);
+ $machine = 'ix86' if $machine =~ /^i386-/;