b6877af143
Changes between GMP version 6.1.* and 6.2.0 BUGS FIXED * gmp_snprintf now correctly reports an error (returns -1) when snprintf does. * Conversion to double is now more robust even if the configuration process does not recognize the float format. * mpz_powm could return a not completely normalised value, when the exponent was 1 and the base < 0. * mpf_set_str could create invalid mpf_t variables for input strings with many leading zeros. FEATURES * New C++ functions factorial, primorial and fibonacci for mpz_class. * Functions to detect primality now substitute the first 24 Miller-Rabin iterations with the BPSW test. * Mini-GMP: new functions mpz_2fac_ui and mpz_mfac_uiui. * Mini-GMP: mpz_sizeinbase, mpz_get_str, and mpz_set_str now support bases up to 62. * Mini-GMP: added support for the mpq_t layer. * MIPS r6 cores are now supported. SPEEDUPS * Major speedup for AMD Ryzen and Epyc thanks to an extensive set of assembly code. * Major speedup for IBM POWER9 thanks to assembly code making use of new madd instruction. * Speedup for 64-bit ARM CPUs thanks to new/improved assembly code. * The n-over-k function mpz_bin_ui has been reimplemented for great speedups for large operands. * Speedup for the worst case of mpz_perfect_power_p. * Speedup for gcd for small and medium size operands. * Speedup for really huge multiplies thanks to much larger FFT tables. MISC * Internal representation of the mpz_t variables now supports lazy allocation; memory is allocated only when a value is stored. * Small improvements and better coverage for the test suite. * The tune/speed program can measure some more functions. * The low-level function mpn_mul no longer diverts to mpn_sqr, users should call mpn_sqr directly when applicable. * New installed files gmp.pc and gmpxx.pc, for use with pkg-config.
72 lines
1.9 KiB
Makefile
72 lines
1.9 KiB
Makefile
# $NetBSD: Makefile,v 1.87 2020/01/20 21:25:24 adam Exp $
|
|
|
|
DISTNAME= gmp-6.2.0
|
|
CATEGORIES= devel math
|
|
MASTER_SITES= https://gmplib.org/download/gmp/
|
|
MASTER_SITES+= ${MASTER_SITE_GNU:=gmp/}
|
|
# Use .tar.bz2 distfile so that no extra dependency on archivers/xz
|
|
# is needed when building lang/gcc* with option gcc-inplace-math.
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
|
HOMEPAGE= https://gmplib.org/
|
|
COMMENT= Library for arbitrary precision arithmetic
|
|
LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2
|
|
|
|
USE_LANGUAGES= c c++ c99
|
|
USE_LIBTOOL= yes
|
|
USE_TOOLS+= autoconf gm4 makeinfo
|
|
GNU_CONFIGURE= yes
|
|
CONFIGURE_ARGS+= --without-readline
|
|
INFO_FILES= yes
|
|
TEST_TARGET= check
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/a$//}
|
|
|
|
PLIST_VARS+= cxx
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
|
CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q}
|
|
.endif
|
|
|
|
.if empty(PKGSRC_COMPILER:Msunpro)
|
|
CONFIGURE_ARGS+= --enable-cxx
|
|
PLIST.cxx= yes
|
|
.endif
|
|
|
|
.if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI)
|
|
ABI= o32
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
|
|
. if !empty(PKGSRC_COMPILER:Msunpro)
|
|
# don't use x86 assembly (it doesn't build)
|
|
CONFIGURE_ENV+= MPN_PATH="generic"
|
|
. else
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.gmp
|
|
PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd
|
|
PKG_SUGGESTED_OPTIONS= gmp-fat
|
|
. include "../../mk/bsd.options.mk"
|
|
###
|
|
### Support for a "fat" binary on i386, with CPU autodetection.
|
|
###
|
|
### 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
|
|
. if !empty(PKG_OPTIONS:Mgmp-fat)
|
|
CONFIGURE_ARGS+= --enable-fat
|
|
. endif
|
|
. endif
|
|
.endif
|
|
|
|
pre-configure:
|
|
cd ${WRKSRC} && autoconf
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|