From 6d7d7f33d46853564ffb91b0210c1da4296c913a Mon Sep 17 00:00:00 2001 From: bjs Date: Fri, 21 Nov 2008 11:27:30 +0000 Subject: 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++ --- devel/gmp/Makefile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'devel/gmp') 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 -- cgit v1.2.3