| @@ -1,64 +1,74 @@ | | | @@ -1,64 +1,74 @@ |
1 | # $NetBSD: Makefile,v 1.53 2008/10/09 10:56:16 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.54 2008/11/21 11:27:31 bjs Exp $ |
2 | | | 2 | |
3 | DISTNAME= gmp-4.2.4 | | 3 | DISTNAME= gmp-4.2.4 |
| | | 4 | PKGREVISION= 1 |
4 | CATEGORIES= devel math | | 5 | CATEGORIES= devel math |
5 | MASTER_SITES= ${MASTER_SITE_GNU:=gmp/} | | 6 | MASTER_SITES= ${MASTER_SITE_GNU:=gmp/} |
6 | EXTRACT_SUFX= .tar.bz2 | | 7 | EXTRACT_SUFX= .tar.bz2 |
7 | | | 8 | |
8 | #PATCHFILES= | | 9 | PATCHFILES= mpf_set_str.c.4.diff |
9 | #PATCH_SITES+= http://www.gmplib.org/patches/ | | 10 | PATCHFILES+= mpf_eq.diff |
10 | #PATCH_DIST_STRIP= -p0 | | 11 | PATCH_SITES+= http://www.gmplib.org/patches/ |
| | | 12 | PATCH_DIST_STRIP= -p0 |
11 | | | 13 | |
12 | MAINTAINER= pkgsrc-users@NetBSD.org | | 14 | MAINTAINER= pkgsrc-users@NetBSD.org |
13 | HOMEPAGE= http://gmplib.org/ | | 15 | HOMEPAGE= http://gmplib.org/ |
14 | COMMENT= Library for arbitrary precision arithmetic | | 16 | COMMENT= Library for arbitrary precision arithmetic |
15 | #LICENSE= gnu-lgpl-v3 | | 17 | #LICENSE= gnu-lgpl-v3 |
16 | | | 18 | |
17 | PKG_DESTDIR_SUPPORT= user-destdir | | 19 | PKG_DESTDIR_SUPPORT= user-destdir |
18 | PKG_INSTALLATION_TYPES= overwrite pkgviews | | 20 | PKG_INSTALLATION_TYPES= overwrite pkgviews |
19 | | | 21 | |
20 | GNU_CONFIGURE= yes | | 22 | GNU_CONFIGURE= yes |
21 | INFO_FILES= yes | | 23 | INFO_FILES= yes |
22 | USE_LANGUAGES= c c++ c99 | | 24 | USE_LANGUAGES= c c++ c99 |
23 | USE_LIBTOOL= yes | | 25 | USE_LIBTOOL= yes |
24 | USE_TOOLS+= gm4 autoconf | | 26 | USE_TOOLS+= gm4 autoconf makeinfo |
25 | | | 27 | |
26 | CONFIGURE_ARGS+= --enable-cxx --without-readline | | 28 | CONFIGURE_ARGS+= --enable-cxx --without-readline |
27 | | | 29 | |
28 | TEST_TARGET= check | | 30 | TEST_TARGET= check |
29 | | | 31 | |
30 | .include "../../mk/bsd.prefs.mk" | | 32 | .include "../../mk/bsd.prefs.mk" |
31 | .if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI) | | 33 | .if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI) |
32 | ABI= o32 | | 34 | ABI= o32 |
33 | .endif | | 35 | .endif |
34 | | | 36 | |
35 | .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32" | | 37 | .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32" |
36 | # The configure script thinks gcc 2.95 for ARM is too buggy to use. | | 38 | # The configure script thinks gcc 2.95 for ARM is too buggy to use. |
37 | GCC_REQD+= 3.0 | | 39 | GCC_REQD+= 3.0 |
38 | .endif | | 40 | .endif |
39 | | | 41 | |
40 | .if ${MACHINE_ARCH} == "i386" | | 42 | .if ${MACHINE_ARCH} == "i386" |
41 | . if ${OPSYS} == "Darwin" | | 43 | . if ${OPSYS} == "Darwin" |
42 | # don't use x86 assembly (it doesn't build) | | 44 | # don't use x86 assembly (it doesn't build) |
43 | CONFIGURE_ENV+= MPN_PATH="generic" | | 45 | CONFIGURE_ENV+= MPN_PATH="generic" |
44 | . else | | 46 | . else |
45 | PKG_OPTIONS_VAR= PKG_OPTIONS.gmp | | 47 | PKG_OPTIONS_VAR= PKG_OPTIONS.gmp |
46 | PKG_SUPPORTED_OPTIONS= gmp-fat | | 48 | PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd |
47 | #PKG_SUGGESTED_OPTIONS= gmp-fat # XXX could be good for bulk builds (?) | | 49 | PKG_SUGGESTED_OPTIONS= gmp-fat |
48 | . include "../../mk/bsd.options.mk" | | 50 | . include "../../mk/bsd.options.mk" |
49 | ### | | 51 | ### |
50 | ### Support for a "fat" binary on i386. There's CPU autodetection, | | 52 | ### Support for a "fat" binary on i386. There's CPU autodetection, |
51 | ### so we'll be safe and filter out -march/-mcpu, et. al. | | 53 | ### so we'll be safe and filter out -march/-mcpu, et. al. |
52 | ### | | 54 | ### |
| | | 55 | ### XXX Currently, the 'mmx' and 'simd' options imply the same thing, |
| | | 56 | ### as cpu detection is done at runtime. Is there a more elegant |
| | | 57 | ### way to handle this? |
| | | 58 | ### |
| | | 59 | . if empty(PKG_OPTIONS:Mgmp-fat) && \ |
| | | 60 | (!empty(PKG_OPTIONS:Mmmx) || !empty(PKG_OPTIONS:Msimd)) |
| | | 61 | PKG_OPTIONS+= gmp-fat |
| | | 62 | . endif |
53 | . if !empty(PKG_OPTIONS:Mgmp-fat) | | 63 | . if !empty(PKG_OPTIONS:Mgmp-fat) |
54 | CONFIGURE_ARGS+= --enable-fat | | 64 | CONFIGURE_ARGS+= --enable-fat |
55 | BUILDLINK_TRANSFORM+= rm-optarg:-march rm-optarg:-mcpu | | 65 | BUILDLINK_TRANSFORM+= rm-optarg:-march rm-optarg:-mcpu |
56 | BUILDLINK_TRANSFORM+= rm:-mmmx rm:-msse rm:-msse2 rm:-msse3 rm:-m3dnow | | 66 | BUILDLINK_TRANSFORM+= rm:-mmmx rm:-msse rm:-msse2 rm:-msse3 rm:-m3dnow |
57 | . endif | | 67 | . endif |
58 | . endif | | 68 | . endif |
59 | .endif | | 69 | .endif |
60 | | | 70 | |
61 | pre-configure: | | 71 | pre-configure: |
62 | cd ${WRKSRC} && type autoconf && autoconf | | 72 | cd ${WRKSRC} && type autoconf && autoconf |
63 | | | 73 | |
64 | .include "../../mk/bsd.pkg.mk" | | 74 | .include "../../mk/bsd.pkg.mk" |