diff --git a/math/p5-Math-GMP/Makefile b/math/p5-Math-GMP/Makefile new file mode 100644 index 00000000000..2c29ca7371e --- /dev/null +++ b/math/p5-Math-GMP/Makefile @@ -0,0 +1,23 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/01/28 15:28:54 avsm Exp $ + +DISTNAME= Math-GMP-1.03 +PKGNAME= p5-${DISTNAME} +CATEGORIES= math perl5 +NEED_VERSION= 1.351 +MASTER_SITES= ${MASTER_SITE_PERL_CPAN} +MASTER_SITE_SUBDIR= Math + +MAINTAINER= Anil Madhavapeddy + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +LIB_DEPENDS= gmp.4::devel/gmp + +CONFIGURE_STYLE= perl +CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" + +.include diff --git a/math/p5-Math-GMP/files/md5 b/math/p5-Math-GMP/files/md5 new file mode 100644 index 00000000000..f39ea95feaf --- /dev/null +++ b/math/p5-Math-GMP/files/md5 @@ -0,0 +1,3 @@ +MD5 (Math-GMP-1.03.tar.gz) = 973c7497549b0d4ae1cc0592f982ee18 +RMD160 (Math-GMP-1.03.tar.gz) = bd43d89dd261900bc74e01c2e2e7c84ffb6f9f5a +SHA1 (Math-GMP-1.03.tar.gz) = c5eeae503cec9649c828b06fab1d3c490f3b9f1b diff --git a/math/p5-Math-GMP/patches/patch-Makefile_PL b/math/p5-Math-GMP/patches/patch-Makefile_PL new file mode 100644 index 00000000000..e2722826b2c --- /dev/null +++ b/math/p5-Math-GMP/patches/patch-Makefile_PL @@ -0,0 +1,28 @@ +$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' + ); diff --git a/math/p5-Math-GMP/pkg/COMMENT b/math/p5-Math-GMP/pkg/COMMENT new file mode 100644 index 00000000000..f8b05cdf808 --- /dev/null +++ b/math/p5-Math-GMP/pkg/COMMENT @@ -0,0 +1 @@ +high speed arbitrary-size integer math diff --git a/math/p5-Math-GMP/pkg/DESCR b/math/p5-Math-GMP/pkg/DESCR new file mode 100644 index 00000000000..7cb3b8c0198 --- /dev/null +++ b/math/p5-Math-GMP/pkg/DESCR @@ -0,0 +1,9 @@ +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. diff --git a/math/p5-Math-GMP/pkg/PLIST b/math/p5-Math-GMP/pkg/PLIST new file mode 100644 index 00000000000..a45f8bbd597 --- /dev/null +++ b/math/p5-Math-GMP/pkg/PLIST @@ -0,0 +1,7 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/01/28 15:28:55 avsm Exp $ +libdata/perl5/site_perl/${ARCH}-openbsd/Math/GMP.pm +libdata/perl5/site_perl/${ARCH}-openbsd/auto/Math/GMP/GMP.bs +libdata/perl5/site_perl/${ARCH}-openbsd/auto/Math/GMP/GMP.so +libdata/perl5/site_perl/${ARCH}-openbsd/auto/Math/GMP/autosplit.ix +man/man3/Math::GMP.3p +@dirrm libdata/perl5/site_perl/${ARCH}-openbsd/auto/Math/GMP