2020-01-20 22:25:24 +01:00
|
|
|
# $NetBSD: Makefile,v 1.87 2020/01/20 21:25:24 adam Exp $
|
1999-04-05 21:48:59 +02:00
|
|
|
|
2020-01-20 22:25:24 +01:00
|
|
|
DISTNAME= gmp-6.2.0
|
2004-08-18 14:41:32 +02:00
|
|
|
CATEGORIES= devel math
|
2017-01-19 19:52:01 +01:00
|
|
|
MASTER_SITES= https://gmplib.org/download/gmp/
|
|
|
|
MASTER_SITES+= ${MASTER_SITE_GNU:=gmp/}
|
2013-02-02 00:09:54 +01:00
|
|
|
# Use .tar.bz2 distfile so that no extra dependency on archivers/xz
|
|
|
|
# is needed when building lang/gcc* with option gcc-inplace-math.
|
2013-10-02 17:13:46 +02:00
|
|
|
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
|
2017-08-01 16:58:51 +02:00
|
|
|
HOMEPAGE= https://gmplib.org/
|
2004-08-18 14:41:32 +02:00
|
|
|
COMMENT= Library for arbitrary precision arithmetic
|
2015-03-30 20:48:08 +02:00
|
|
|
LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2
|
1999-04-05 21:48:59 +02:00
|
|
|
|
2006-12-02 23:32:59 +01:00
|
|
|
USE_LANGUAGES= c c++ c99
|
2004-02-12 10:00:29 +01:00
|
|
|
USE_LIBTOOL= yes
|
2020-01-20 22:25:24 +01:00
|
|
|
USE_TOOLS+= autoconf gm4 makeinfo
|
Changes 5.1.0:
BUGS FIXED
* When reading a C++ number (like mpz_class) in an istream reaches the end
of the stream, the eofbit is now set.
* The result sign of mpz_rootrem's remainder is now always correct.
* The mpz_remove function now handles negative divisors.
* Contains all fixes from release 5.0.5.
SPEEDUPS
* The n-factorial and n-over-k functions have been reimplemented for great
speedups for small and large operands.
* New subquadratic algorithm for the Kronecker/Jacobi/Legendre symbol.
* Major speedup for ARM, in particular ARM Cortex-A9 and A15, thanks to broad
assembly support.
* Significant speedup or POWER6 and POWER7 thanks to improved assembly.
* The performance under M$ Windows' 64-bit ABI has been greatly improved
thanks to complete assembly support.
* Minor speed improvements of many functions and for many platforms.
FEATURES
* Many new CPUs recognised.
* New functions for multi-factorials, and primorial: mpz_2fac_ui,
mpz_mfac_uiui and mpz_primorial_ui.
* The mpz_powm_sec function now uses side-channel silent division for
converting into Montgomery residues.
* The fat binary mechanism is now more robust in its CPU recognition.
MISC
* Inclusion of assembly code is now controlled by the configure options
--enable-assembly and --disable-assembly. The "none" CPU targets is gone.
* In C++, the conversions mpq_class->mpz_class, mpf_class->mpz_class and
mpf_class->mpq_class are now explicit.
* Includes "mini-gmp", a small, portable, but less efficient, implementation
of a subset of GMP's mpn and mpz interfaces. Used in GMP bootstrap, but it
can also be bundled with applications as a fallback when the real GMP
library is unavailable.
* The ABIs under AIX are no longer called aix32 and aix64, but mode64 and 32.
This is more consistent with other powerpc systems.
* The coverage of the testsuite has been improved, using the lcov tool. See
also http://gmplib.org/devel/lcov/.
* It is now possible to compile GMP using a C++ compiler.
* K&R C compilers are no longer supported.
* The BSD MP compatibility functions have been removed.
2013-01-31 21:30:25 +01:00
|
|
|
GNU_CONFIGURE= yes
|
2009-01-20 18:51:12 +01:00
|
|
|
CONFIGURE_ARGS+= --without-readline
|
2020-01-20 22:25:24 +01:00
|
|
|
INFO_FILES= yes
|
|
|
|
TEST_TARGET= check
|
1999-04-05 21:48:59 +02:00
|
|
|
|
Update to 6.0.0a:
Changes between 6.0.0 and 6.0.0a:
Not documented.
Changes between GMP version 5.1.* and 6.0.0
BUGS FIXED
* The function mpz_invert now considers any number invertible in Z/1Z.
* The mpn multiply code now handles operands of more than 2^31 limbs
correctly. (Note however that the mpz code is limited to 2^32 bits on
32-bit hosts and 2^37 bits on 64-bit hosts.)
* Contains all fixes from release 5.1.3.
SPEEDUPS
* Plain division of large operands is faster and more monotonous in operand
size.
* Major speedup for ARM, in particular ARM Cortex-A15, thanks to improved
assembly.
* Major speedup for SPARC T4/T5 and speedup also for T3, thanks to a lot of
new assembly.
* Speedup for Intel Sandy Bridge, Ivy Bridge, Haswell, thanks to rewritten
and vastly expanded assembly support. Speedup also for the older Core 2
and Nehalem.
* Faster mixed arithmetic between mpq_class and double.
* With g++, optimise more operations when one argument is a simple constant.
FEATURES
* Support for new Intel and AMD CPUs.
* Support for ARM64 alias Aarch64 alias ARMv8.
* New public functions mpn_sec_mul and mpn_sec_sqr, implementing side-channel
silent multiplication and squaring.
* New public functions mpn_sec_div_qr and mpn_sec_div_r, implementing
side-channel silent division.
* New public functions mpn_cnd_add_n and mpn_cnd_sub_n. Side-channel silent
conditional addition and subtraction.
* New public function mpn_sec_powm, implementing side-channel silent modexp.
* New public function mpn_sec_invert, implementing side-channel silent
modular inversion.
* Better support for applications which use the mpz_t type, but nevertheless
need to call some of the lower-level mpn functions. See the documentation
for mpz_limbs_read and related functions.
MISC
[FreeBSD bashing removed]
2014-04-17 15:08:24 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/a$//}
|
|
|
|
|
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
|
|
|
|
2013-05-10 02:44:29 +02:00
|
|
|
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
|
|
|
CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q}
|
|
|
|
.endif
|
|
|
|
|
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
|
|
|
|
|
2017-04-21 00:37:57 +02:00
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
|
2017-04-22 10:23:17 +02:00
|
|
|
. if !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"
|
|
|
|
###
|
2015-03-19 21:40:31 +01:00
|
|
|
### Support for a "fat" binary on i386, with CPU autodetection.
|
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
|
|
|
###
|
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
|
|
|
|
. endif
|
|
|
|
. endif
|
2007-06-18 04:45:31 +02:00
|
|
|
.endif
|
|
|
|
|
2007-11-25 09:35:31 +01:00
|
|
|
pre-configure:
|
2020-01-20 22:25:24 +01:00
|
|
|
cd ${WRKSRC} && autoconf
|
2007-11-25 09:35:31 +01:00
|
|
|
|
1999-04-05 21:48:59 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|