diff options
author | knu <knu@FreeBSD.org> | 2002-11-28 15:27:15 +0000 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2002-11-28 15:27:15 +0000 |
commit | c94b4113c2985ccccc96b2bdd69f3bd5c62af592 (patch) | |
tree | a97c7b9937dfc75d4ad22b223b7f7f65ca65a77e | |
parent | 165f56ae9278d236bba259647d25c368ac033098 (diff) | |
download | FreeBSD-ports-c94b4113c2985ccccc96b2bdd69f3bd5c62af592.zip FreeBSD-ports-c94b4113c2985ccccc96b2bdd69f3bd5c62af592.tar.gz |
Fix the build on CURRENT. This port requires math/libgmp4 on CURRENT.
PR: ports/45794
Submitted by: Volker Stolz <vs@foldr.org>
-rw-r--r-- | math/p5-Math-GMP/Makefile | 11 | ||||
-rw-r--r-- | math/p5-Math-GMP/files/patch-Makefile.PL | 14 |
2 files changed, 20 insertions, 5 deletions
diff --git a/math/p5-Math-GMP/Makefile b/math/p5-Math-GMP/Makefile index 769db89..61109947 100644 --- a/math/p5-Math-GMP/Makefile +++ b/math/p5-Math-GMP/Makefile @@ -14,9 +14,18 @@ PKGNAMEPREFIX= p5- MAINTAINER= ports@FreeBSD.org +.include <bsd.port.pre.mk> + +.if ${OSVERSION} >= 500000 +LIB_DEPENDS= gmp:${PORTSDIR}/math/libgmp4 +CONFIGURE_ENV+= GMP=${LOCALBASE} +.else +CONFIGURE_ENV+= GMP=/usr +.endif + PERL_CONFIGURE= yes MANPREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} MAN3= Math::GMP.3 -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/math/p5-Math-GMP/files/patch-Makefile.PL b/math/p5-Math-GMP/files/patch-Makefile.PL index 7508a1f..21ff9e1 100644 --- a/math/p5-Math-GMP/files/patch-Makefile.PL +++ b/math/p5-Math-GMP/files/patch-Makefile.PL @@ -1,15 +1,15 @@ ---- Makefile.PL Sat Sep 18 22:48:14 1999 -+++ Makefile.PL.new Wed Jan 3 11:14:11 2001 +--- Makefile.PL.orig Wed Nov 27 10:18:38 2002 ++++ Makefile.PL Wed Nov 27 10:50:17 2002 @@ -6,6 +6,8 @@ my $tar = (grep { -x "$_/tar" } @paths)[0] . "/tar"; my $gzip = (grep { -x "$_/gzip" } @paths)[0] . "/gzip"; -+# FreeBSD has GMP in the base system ++# FreeBSD has GMP in the base system or ports +if ("" ne "" ) { 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'; -@@ -13,6 +15,7 @@ +@@ -13,11 +15,12 @@ chdir 'gmp-2.0.2'; system "./configure --prefix=../gmp && make && make install"; chdir '..'; @@ -17,3 +17,9 @@ WriteMakefile( 'NAME' => 'Math::GMP', + 'VERSION_FROM' => 'GMP.pm', # finds $VERSION + 'LIBS' => ['-Lgmp/lib -lgmp'], # e.g., '-lm' + 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' +- 'INC' => '-I$(PREFIX)', # e.g., '-I/usr/include/other' ++ 'INC' => '-I'.$ENV{"GMP"}.'/include', # e.g., '-I/usr/include/other' + ); |