summaryrefslogtreecommitdiff
path: root/devel/gmp
diff options
context:
space:
mode:
authorbjs <bjs@pkgsrc.org>2008-11-21 11:27:30 +0000
committerbjs <bjs@pkgsrc.org>2008-11-21 11:27:30 +0000
commit35b32192574c818c97d1395583238194dded7037 (patch)
tree49d69c99d60fc936c4984574a2f6a939c0811120 /devel/gmp
parenta54d1f643d158cc2b9ccaa1bb18e17226cf7f6e4 (diff)
downloadpkgsrc-35b32192574c818c97d1395583238194dded7037.tar.gz
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++
Diffstat (limited to 'devel/gmp')
-rw-r--r--devel/gmp/Makefile24
1 files changed, 17 insertions, 7 deletions
diff --git a/devel/gmp/Makefile b/devel/gmp/Makefile
index 215f61df001..fcdca07fe5e 100644
--- a/devel/gmp/Makefile
+++ b/devel/gmp/Makefile
@@ -1,13 +1,15 @@
-# $NetBSD: Makefile,v 1.53 2008/10/09 10:56:16 wiz Exp $
+# $NetBSD: Makefile,v 1.54 2008/11/21 11:27:31 bjs Exp $
DISTNAME= gmp-4.2.4
+PKGREVISION= 1
CATEGORIES= devel math
MASTER_SITES= ${MASTER_SITE_GNU:=gmp/}
EXTRACT_SUFX= .tar.bz2
-#PATCHFILES=
-#PATCH_SITES+= http://www.gmplib.org/patches/
-#PATCH_DIST_STRIP= -p0
+PATCHFILES= mpf_set_str.c.4.diff
+PATCHFILES+= mpf_eq.diff
+PATCH_SITES+= http://www.gmplib.org/patches/
+PATCH_DIST_STRIP= -p0
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://gmplib.org/
@@ -21,7 +23,7 @@ GNU_CONFIGURE= yes
INFO_FILES= yes
USE_LANGUAGES= c c++ c99
USE_LIBTOOL= yes
-USE_TOOLS+= gm4 autoconf
+USE_TOOLS+= gm4 autoconf makeinfo
CONFIGURE_ARGS+= --enable-cxx --without-readline
@@ -43,13 +45,21 @@ GCC_REQD+= 3.0
CONFIGURE_ENV+= MPN_PATH="generic"
. else
PKG_OPTIONS_VAR= PKG_OPTIONS.gmp
-PKG_SUPPORTED_OPTIONS= gmp-fat
-#PKG_SUGGESTED_OPTIONS= gmp-fat # XXX could be good for bulk builds (?)
+PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd
+PKG_SUGGESTED_OPTIONS= gmp-fat
. 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.
###
+### 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
BUILDLINK_TRANSFORM+= rm-optarg:-march rm-optarg:-mcpu