openbsd-ports/math/p5-Math-GMP/patches/patch-Makefile_PL
avsm b486893f1e - initial import of p5-Math-GMP-1.03
--
Math::GMP is designed to be a drop-in replacement both for Math::BigInt
and for regular integer arithmetic. Unlike BigInt, though, Math::GMP
uses the GNU gmp library for all of its calculations, as opposed
to straight Perl functions. This results in a speed increase of
anywhere from 5 to 30 times.

A Math::GMP object can be used just as a normal numeric scalar would
be -- the module overloads the normal arithmetic operators to provide
as seamless an interface as possible.
2001-01-28 15:28:54 +00:00

29 lines
1.1 KiB
Plaintext

$OpenBSD: patch-Makefile_PL,v 1.1.1.1 2001/01/28 15:28:55 avsm Exp $
This makefile tries to use the bundled version of GMP, which is a
lot older than the one in our tree, so patch it away to use ours - avsm@
--- Makefile.PL.orig Sun Sep 19 03:48:14 1999
+++ Makefile.PL Sun Jan 28 15:11:12 2001
@@ -6,18 +6,9 @@ my @paths = qw(/bin /usr/bin /usr/local/
my $tar = (grep { -x "$_/tar" } @paths)[0] . "/tar";
my $gzip = (grep { -x "$_/gzip" } @paths)[0] . "/gzip";
-my $cmd = "$gzip -dc gmp-2.0.2.tar.gz | $tar xf -";
-system $cmd unless -d 'gmp-2.0.2';
-die "tar extraction of gmp-2.0.2.tar.gz failed" unless -d 'gmp-2.0.2';
-
-chdir 'gmp-2.0.2';
-system "./configure --prefix=../gmp && make && make install";
-chdir '..';
-
WriteMakefile(
'NAME' => 'Math::GMP',
'VERSION_FROM' => 'GMP.pm', # finds $VERSION
- 'LIBS' => ['-Lgmp/lib -lgmp'], # e.g., '-lm'
- 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
- 'INC' => '-Igmp/include', # e.g., '-I/usr/include/other'
+ 'LIBS' => ["$ENV{LDFLAGS} -lgmp"], # e.g., '-lm'
+ 'DEFINE' => '' # e.g., '-DHAVE_SOMETHING'
);