2012-05-11 16:08:59 +02:00
|
|
|
# $NetBSD: Makefile,v 1.63 2012/05/11 14:08:59 drochner Exp $
|
1999-04-05 21:48:59 +02:00
|
|
|
|
2012-05-11 16:08:59 +02:00
|
|
|
DISTNAME= gmp-5.0.5
|
2004-08-18 14:41:32 +02:00
|
|
|
CATEGORIES= devel math
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GNU:=gmp/}
|
|
|
|
EXTRACT_SUFX= .tar.bz2
|
1999-04-05 21:48:59 +02:00
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2007-12-02 14:04:06 +01:00
|
|
|
HOMEPAGE= http://gmplib.org/
|
2004-08-18 14:41:32 +02:00
|
|
|
COMMENT= Library for arbitrary precision arithmetic
|
Update to 4.3.1. Add gnu-gpl-v3 to LICENSE, since README claims it
also affects some files.
Changes between GMP version 4.3.0 and 4.3.1
Bugs:
* Fixed bug in mpn_gcdext, affecting also mpz_gcdext and mpz_invert.
The bug could cause a cofactor to have a leading zero limb, which
could lead to crashes or miscomputation later on.
* Fixed some minor documentation issues.
Features:
* Workarounds for various issues with Mac OS X's build tools.
* Recognise more IBM "POWER" processor variants.
Changes between GMP version 4.2.X and 4.3.0
Bugs:
* Fixed bug in mpz_perfect_power_p with recognition of negative perfect
powers that can be written both as an even and odd power.
* We might accidentally have added bugs since there is a large amount of
new code in this release.
Speedups:
* Vastly improved assembly code for x86-64 processors from AMD and Intel.
* Major improvements also for many other processor families, such as
Alpha, PowerPC, and Itanium.
* New sub-quadratic mpn_gcd and mpn_gcdext, as well as improved basecase
gcd code.
* The multiply FFT code has been slightly improved.
* Balanced multiplication now uses 4-way Toom in addition to schoolbook,
Karatsuba, 3-way Toom, and FFT.
* Unbalanced multiplication has been vastly improved.
* Improved schoolbook division by means of faster quotient approximation.
* Several new algorithms for division and mod by single limbs, giving
many-fold speedups.
* Improved nth root computations.
* The mpz_nextprime function uses sieving and is much faster.
* Countless minor tweaks.
Features:
* Updated support for fat binaries for x86_32 include current processors
* Lots of new mpn internal interfaces. Some of them will become public
in a future GMP release.
* Support for the 32-bit ABI under x86-apple-darwin.
* x86 CPU recognition code should now default better for future
processors.
* The experimental nails feature does not work in this release, but
it might be re-enabled in the future.
Misc:
* The gmp_version variable now always contains three parts. For this
release, it is "4.3.0".
2009-08-16 15:42:33 +02:00
|
|
|
LICENSE= gnu-lgpl-v3 AND gnu-gpl-v3
|
1999-04-05 21:48:59 +02:00
|
|
|
|
Update to version 4.2.2. Support DESTDIR installation. Add option
to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin").
This isn't enabled by default now, but it might be useful for build builds,
as it uses cpuid at runtime to choose the most appropriate assembler code.
Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary.
NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved,
see below. Thus, I recommend that we test building the assembler code
on Darwin at some point.
Changes between GMP version 4.2.1 and 4.2.2:
* License is now LGPL version 3.
Bugs:
* Shared library numbers corrected for libcxx.
* Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage.
Note that this only affects C++ programs.
* Fix crash in mpz_set_d for arguments with large negative exponent.
* Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist.
* Fix assembly syntax problem for powerpc-ibm-aix with AIX
native assembler.
* Fix problems with x86 --enable-fat, where the compiler where told to
generate code for the build machine, not plain i386 code as it should.
* Improved recognition of powerpc systems wrt Altivec/VMX capability.
* Misc minor fixes, mainly workarounds for compiler/assembler bugs.
Speedups:
* "Core 2" and Pentium 4 processors, running in 64-bit mode will get a
slight boost as they are now specifically recognized.
Features:
* New support for x86_64-solaris
* New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin.
(Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
2004-01-19 14:15:52 +01:00
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
|
2008-08-17 09:56:11 +02:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
INFO_FILES= yes
|
2006-12-02 23:32:59 +01:00
|
|
|
USE_LANGUAGES= c c++ c99
|
2004-02-12 10:00:29 +01:00
|
|
|
USE_LIBTOOL= yes
|
Enable building the fat binary unless we're using Darwin;
this seems to make the most sense for bulk builds to me.
Should any other platforms fail, we can make a note of it
and exclude them along with Darwin.
Also, add two distribution patches from upstream:
[2008-11-09]
When calling mpf_set_str (perhaps indirectly via
mpf_init_set_str or mpf_inp_str, or via the C++ interface) with the
argument for the base set to 0, any exponent will be ignored.
[2008-11-08]
The mpf_eq function sometimes compares too few bits, not
just too many (the latter is documented).
This might lead to precision loss. When the experimental
--enable-nails feature is enabled at the same time --enable-cxx is
enabled, make check fails. This failure is actually due to bugs
in tests/cxx/t-prec.cc, which makes it use mpf_eq incorrectly.
This patch makes mpf_eq compare the right number of bits,
neither too few, nor to many.
The patch also fixes the test case, and documentation.
(not strictly necessary, but I figured I'd keep in line with
their recommendations)
PKGREVISION++
2008-11-21 12:27:30 +01:00
|
|
|
USE_TOOLS+= gm4 autoconf makeinfo
|
2008-08-17 09:56:11 +02:00
|
|
|
|
2009-01-20 18:51:12 +01:00
|
|
|
CONFIGURE_ARGS+= --without-readline
|
1999-04-05 21:48:59 +02:00
|
|
|
|
2003-08-21 22:09:29 +02:00
|
|
|
TEST_TARGET= check
|
|
|
|
|
2009-01-20 18:51:12 +01:00
|
|
|
PLIST_VARS+= cxx
|
|
|
|
|
2004-12-18 16:43:19 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
2009-01-20 18:51:12 +01:00
|
|
|
|
|
|
|
.if empty(PKGSRC_COMPILER:Msunpro)
|
|
|
|
CONFIGURE_ARGS+= --enable-cxx
|
|
|
|
PLIST.cxx= yes
|
|
|
|
.endif
|
|
|
|
|
2008-03-11 19:47:40 +01:00
|
|
|
.if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI)
|
2004-12-18 16:43:19 +01:00
|
|
|
ABI= o32
|
|
|
|
.endif
|
|
|
|
|
2003-10-28 23:33:57 +01:00
|
|
|
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
|
|
|
|
# The configure script thinks gcc 2.95 for ARM is too buggy to use.
|
2004-02-01 02:43:28 +01:00
|
|
|
GCC_REQD+= 3.0
|
2003-10-28 23:33:57 +01:00
|
|
|
.endif
|
|
|
|
|
Update to version 4.2.2. Support DESTDIR installation. Add option
to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin").
This isn't enabled by default now, but it might be useful for build builds,
as it uses cpuid at runtime to choose the most appropriate assembler code.
Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary.
NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved,
see below. Thus, I recommend that we test building the assembler code
on Darwin at some point.
Changes between GMP version 4.2.1 and 4.2.2:
* License is now LGPL version 3.
Bugs:
* Shared library numbers corrected for libcxx.
* Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage.
Note that this only affects C++ programs.
* Fix crash in mpz_set_d for arguments with large negative exponent.
* Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist.
* Fix assembly syntax problem for powerpc-ibm-aix with AIX
native assembler.
* Fix problems with x86 --enable-fat, where the compiler where told to
generate code for the build machine, not plain i386 code as it should.
* Improved recognition of powerpc systems wrt Altivec/VMX capability.
* Misc minor fixes, mainly workarounds for compiler/assembler bugs.
Speedups:
* "Core 2" and Pentium 4 processors, running in 64-bit mode will get a
slight boost as they are now specifically recognized.
Features:
* New support for x86_64-solaris
* New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin.
(Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
|
|
|
.if ${MACHINE_ARCH} == "i386"
|
2010-09-24 16:27:35 +02:00
|
|
|
# XXX SunOS should work, but currently bombs in mpn/fat.c
|
|
|
|
. if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS" || !empty(PKGSRC_COMPILER:Msunpro)
|
2007-06-18 04:45:31 +02:00
|
|
|
# don't use x86 assembly (it doesn't build)
|
|
|
|
CONFIGURE_ENV+= MPN_PATH="generic"
|
Update to version 4.2.2. Support DESTDIR installation. Add option
to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin").
This isn't enabled by default now, but it might be useful for build builds,
as it uses cpuid at runtime to choose the most appropriate assembler code.
Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary.
NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved,
see below. Thus, I recommend that we test building the assembler code
on Darwin at some point.
Changes between GMP version 4.2.1 and 4.2.2:
* License is now LGPL version 3.
Bugs:
* Shared library numbers corrected for libcxx.
* Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage.
Note that this only affects C++ programs.
* Fix crash in mpz_set_d for arguments with large negative exponent.
* Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist.
* Fix assembly syntax problem for powerpc-ibm-aix with AIX
native assembler.
* Fix problems with x86 --enable-fat, where the compiler where told to
generate code for the build machine, not plain i386 code as it should.
* Improved recognition of powerpc systems wrt Altivec/VMX capability.
* Misc minor fixes, mainly workarounds for compiler/assembler bugs.
Speedups:
* "Core 2" and Pentium 4 processors, running in 64-bit mode will get a
slight boost as they are now specifically recognized.
Features:
* New support for x86_64-solaris
* New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin.
(Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
|
|
|
. else
|
|
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.gmp
|
Enable building the fat binary unless we're using Darwin;
this seems to make the most sense for bulk builds to me.
Should any other platforms fail, we can make a note of it
and exclude them along with Darwin.
Also, add two distribution patches from upstream:
[2008-11-09]
When calling mpf_set_str (perhaps indirectly via
mpf_init_set_str or mpf_inp_str, or via the C++ interface) with the
argument for the base set to 0, any exponent will be ignored.
[2008-11-08]
The mpf_eq function sometimes compares too few bits, not
just too many (the latter is documented).
This might lead to precision loss. When the experimental
--enable-nails feature is enabled at the same time --enable-cxx is
enabled, make check fails. This failure is actually due to bugs
in tests/cxx/t-prec.cc, which makes it use mpf_eq incorrectly.
This patch makes mpf_eq compare the right number of bits,
neither too few, nor to many.
The patch also fixes the test case, and documentation.
(not strictly necessary, but I figured I'd keep in line with
their recommendations)
PKGREVISION++
2008-11-21 12:27:30 +01:00
|
|
|
PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd
|
|
|
|
PKG_SUGGESTED_OPTIONS= gmp-fat
|
Update to version 4.2.2. Support DESTDIR installation. Add option
to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin").
This isn't enabled by default now, but it might be useful for build builds,
as it uses cpuid at runtime to choose the most appropriate assembler code.
Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary.
NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved,
see below. Thus, I recommend that we test building the assembler code
on Darwin at some point.
Changes between GMP version 4.2.1 and 4.2.2:
* License is now LGPL version 3.
Bugs:
* Shared library numbers corrected for libcxx.
* Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage.
Note that this only affects C++ programs.
* Fix crash in mpz_set_d for arguments with large negative exponent.
* Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist.
* Fix assembly syntax problem for powerpc-ibm-aix with AIX
native assembler.
* Fix problems with x86 --enable-fat, where the compiler where told to
generate code for the build machine, not plain i386 code as it should.
* Improved recognition of powerpc systems wrt Altivec/VMX capability.
* Misc minor fixes, mainly workarounds for compiler/assembler bugs.
Speedups:
* "Core 2" and Pentium 4 processors, running in 64-bit mode will get a
slight boost as they are now specifically recognized.
Features:
* New support for x86_64-solaris
* New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin.
(Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
|
|
|
. include "../../mk/bsd.options.mk"
|
|
|
|
###
|
|
|
|
### Support for a "fat" binary on i386. There's CPU autodetection,
|
|
|
|
### so we'll be safe and filter out -march/-mcpu, et. al.
|
|
|
|
###
|
Enable building the fat binary unless we're using Darwin;
this seems to make the most sense for bulk builds to me.
Should any other platforms fail, we can make a note of it
and exclude them along with Darwin.
Also, add two distribution patches from upstream:
[2008-11-09]
When calling mpf_set_str (perhaps indirectly via
mpf_init_set_str or mpf_inp_str, or via the C++ interface) with the
argument for the base set to 0, any exponent will be ignored.
[2008-11-08]
The mpf_eq function sometimes compares too few bits, not
just too many (the latter is documented).
This might lead to precision loss. When the experimental
--enable-nails feature is enabled at the same time --enable-cxx is
enabled, make check fails. This failure is actually due to bugs
in tests/cxx/t-prec.cc, which makes it use mpf_eq incorrectly.
This patch makes mpf_eq compare the right number of bits,
neither too few, nor to many.
The patch also fixes the test case, and documentation.
(not strictly necessary, but I figured I'd keep in line with
their recommendations)
PKGREVISION++
2008-11-21 12:27:30 +01:00
|
|
|
### XXX Currently, the 'mmx' and 'simd' options imply the same thing,
|
|
|
|
### as cpu detection is done at runtime. Is there a more elegant
|
|
|
|
### way to handle this?
|
|
|
|
###
|
|
|
|
. if empty(PKG_OPTIONS:Mgmp-fat) && \
|
|
|
|
(!empty(PKG_OPTIONS:Mmmx) || !empty(PKG_OPTIONS:Msimd))
|
|
|
|
PKG_OPTIONS+= gmp-fat
|
|
|
|
. endif
|
Update to version 4.2.2. Support DESTDIR installation. Add option
to build a "fat" binary on (${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin").
This isn't enabled by default now, but it might be useful for build builds,
as it uses cpuid at runtime to choose the most appropriate assembler code.
Insofar as I can tell, no BUILDLINK_A[BP]I_DEPENDS bump is necessary.
NOTE: Support for Darwin-*-i386 and Darwin-*-x86_64 has been improved,
see below. Thus, I recommend that we test building the assembler code
on Darwin at some point.
Changes between GMP version 4.2.1 and 4.2.2:
* License is now LGPL version 3.
Bugs:
* Shared library numbers corrected for libcxx.
* Fixed serious bug in gmpxx.h where a=a+b*c would generate garbage.
Note that this only affects C++ programs.
* Fix crash in mpz_set_d for arguments with large negative exponent.
* Fix 32-bit ABI bug with Itanium assembly for popcount and hamdist.
* Fix assembly syntax problem for powerpc-ibm-aix with AIX
native assembler.
* Fix problems with x86 --enable-fat, where the compiler where told to
generate code for the build machine, not plain i386 code as it should.
* Improved recognition of powerpc systems wrt Altivec/VMX capability.
* Misc minor fixes, mainly workarounds for compiler/assembler bugs.
Speedups:
* "Core 2" and Pentium 4 processors, running in 64-bit mode will get a
slight boost as they are now specifically recognized.
Features:
* New support for x86_64-solaris
* New, rudimentary support for x86-apple-darwin and x86_64-apple-darwin.
(Please see http://gmplib.org/macos.html for more information.)
2007-10-30 02:36:59 +01:00
|
|
|
. if !empty(PKG_OPTIONS:Mgmp-fat)
|
|
|
|
CONFIGURE_ARGS+= --enable-fat
|
|
|
|
BUILDLINK_TRANSFORM+= rm-optarg:-march rm-optarg:-mcpu
|
|
|
|
BUILDLINK_TRANSFORM+= rm:-mmmx rm:-msse rm:-msse2 rm:-msse3 rm:-m3dnow
|
|
|
|
. endif
|
|
|
|
. endif
|
2007-06-18 04:45:31 +02:00
|
|
|
.endif
|
|
|
|
|
2007-11-25 09:35:31 +01:00
|
|
|
pre-configure:
|
|
|
|
cd ${WRKSRC} && type autoconf && autoconf
|
|
|
|
|
1999-04-05 21:48:59 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|