- 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.
This commit is contained in:
avsm 2001-01-28 15:28:54 +00:00
parent 34a18dc3f1
commit b486893f1e
6 changed files with 71 additions and 0 deletions

23
math/p5-Math-GMP/Makefile Normal file
View File

@ -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 <avsm@openbsd.org>
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 <bsd.port.mk>

View File

@ -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

View File

@ -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'
);

View File

@ -0,0 +1 @@
high speed arbitrary-size integer math

View File

@ -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.

View File

@ -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