| @@ -1,79 +1,78 @@ | | | @@ -1,79 +1,78 @@ |
1 | # $NetBSD: Makefile,v 1.83 2017/04/22 07:01:07 adam Exp $ | | 1 | # $NetBSD: Makefile,v 1.84 2017/04/22 08:23:17 jperkin Exp $ |
2 | | | 2 | |
3 | DISTNAME= gmp-6.1.2 | | 3 | DISTNAME= gmp-6.1.2 |
4 | CATEGORIES= devel math | | 4 | CATEGORIES= devel math |
5 | MASTER_SITES= https://gmplib.org/download/gmp/ | | 5 | MASTER_SITES= https://gmplib.org/download/gmp/ |
6 | MASTER_SITES+= ${MASTER_SITE_GNU:=gmp/} | | 6 | MASTER_SITES+= ${MASTER_SITE_GNU:=gmp/} |
7 | # Use .tar.bz2 distfile so that no extra dependency on archivers/xz | | 7 | # Use .tar.bz2 distfile so that no extra dependency on archivers/xz |
8 | # is needed when building lang/gcc* with option gcc-inplace-math. | | 8 | # is needed when building lang/gcc* with option gcc-inplace-math. |
9 | EXTRACT_SUFX= .tar.bz2 | | 9 | EXTRACT_SUFX= .tar.bz2 |
10 | | | 10 | |
11 | MAINTAINER= pkgsrc-users@NetBSD.org | | 11 | MAINTAINER= pkgsrc-users@NetBSD.org |
12 | HOMEPAGE= http://gmplib.org/ | | 12 | HOMEPAGE= http://gmplib.org/ |
13 | COMMENT= Library for arbitrary precision arithmetic | | 13 | COMMENT= Library for arbitrary precision arithmetic |
14 | LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2 | | 14 | LICENSE= gnu-lgpl-v3 OR gnu-gpl-v2 |
15 | | | 15 | |
16 | INFO_FILES= yes | | 16 | INFO_FILES= yes |
17 | USE_LANGUAGES= c c++ c99 | | 17 | USE_LANGUAGES= c c++ c99 |
18 | USE_LIBTOOL= yes | | 18 | USE_LIBTOOL= yes |
19 | USE_TOOLS+= gm4 autoconf makeinfo | | 19 | USE_TOOLS+= gm4 autoconf makeinfo |
20 | GNU_CONFIGURE= yes | | 20 | GNU_CONFIGURE= yes |
21 | CONFIGURE_ARGS+= --without-readline | | 21 | CONFIGURE_ARGS+= --without-readline |
22 | | | 22 | |
23 | WRKSRC= ${WRKDIR}/${DISTNAME:S/a$//} | | 23 | WRKSRC= ${WRKDIR}/${DISTNAME:S/a$//} |
24 | | | 24 | |
25 | TEST_TARGET= check | | 25 | TEST_TARGET= check |
26 | | | 26 | |
27 | PLIST_VARS+= cxx | | 27 | PLIST_VARS+= cxx |
28 | | | 28 | |
29 | .include "../../mk/bsd.prefs.mk" | | 29 | .include "../../mk/bsd.prefs.mk" |
30 | | | 30 | |
31 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) | | 31 | .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) |
32 | CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q} | | 32 | CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q} |
33 | .endif | | 33 | .endif |
34 | | | 34 | |
35 | .if empty(PKGSRC_COMPILER:Msunpro) | | 35 | .if empty(PKGSRC_COMPILER:Msunpro) |
36 | CONFIGURE_ARGS+= --enable-cxx | | 36 | CONFIGURE_ARGS+= --enable-cxx |
37 | PLIST.cxx= yes | | 37 | PLIST.cxx= yes |
38 | .endif | | 38 | .endif |
39 | | | 39 | |
40 | .if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI) | | 40 | .if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI) |
41 | ABI= o32 | | 41 | ABI= o32 |
42 | .endif | | 42 | .endif |
43 | | | 43 | |
44 | .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32" | | 44 | .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32" |
45 | # The configure script thinks gcc 2.95 for ARM is too buggy to use. | | 45 | # The configure script thinks gcc 2.95 for ARM is too buggy to use. |
46 | GCC_REQD+= 3.0 | | 46 | GCC_REQD+= 3.0 |
47 | .endif | | 47 | .endif |
48 | | | 48 | |
49 | .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" | | 49 | .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" |
50 | # XXX SunOS should work, but currently bombs in mpn/fat.c | | 50 | . if !empty(PKGSRC_COMPILER:Msunpro) |
51 | . if ${OPSYS} == "SunOS" || !empty(PKGSRC_COMPILER:Msunpro) | | | |
52 | # don't use x86 assembly (it doesn't build) | | 51 | # don't use x86 assembly (it doesn't build) |
53 | CONFIGURE_ENV+= MPN_PATH="generic" | | 52 | CONFIGURE_ENV+= MPN_PATH="generic" |
54 | . else | | 53 | . else |
55 | PKG_OPTIONS_VAR= PKG_OPTIONS.gmp | | 54 | PKG_OPTIONS_VAR= PKG_OPTIONS.gmp |
56 | PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd | | 55 | PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd |
57 | PKG_SUGGESTED_OPTIONS= gmp-fat | | 56 | PKG_SUGGESTED_OPTIONS= gmp-fat |
58 | . include "../../mk/bsd.options.mk" | | 57 | . include "../../mk/bsd.options.mk" |
59 | ### | | 58 | ### |
60 | ### Support for a "fat" binary on i386, with CPU autodetection. | | 59 | ### Support for a "fat" binary on i386, with CPU autodetection. |
61 | ### | | 60 | ### |
62 | ### XXX Currently, the 'mmx' and 'simd' options imply the same thing, | | 61 | ### XXX Currently, the 'mmx' and 'simd' options imply the same thing, |
63 | ### as cpu detection is done at runtime. Is there a more elegant | | 62 | ### as cpu detection is done at runtime. Is there a more elegant |
64 | ### way to handle this? | | 63 | ### way to handle this? |
65 | ### | | 64 | ### |
66 | . if empty(PKG_OPTIONS:Mgmp-fat) && \ | | 65 | . if empty(PKG_OPTIONS:Mgmp-fat) && \ |
67 | (!empty(PKG_OPTIONS:Mmmx) || !empty(PKG_OPTIONS:Msimd)) | | 66 | (!empty(PKG_OPTIONS:Mmmx) || !empty(PKG_OPTIONS:Msimd)) |
68 | PKG_OPTIONS+= gmp-fat | | 67 | PKG_OPTIONS+= gmp-fat |
69 | . endif | | 68 | . endif |
70 | . if !empty(PKG_OPTIONS:Mgmp-fat) | | 69 | . if !empty(PKG_OPTIONS:Mgmp-fat) |
71 | CONFIGURE_ARGS+= --enable-fat | | 70 | CONFIGURE_ARGS+= --enable-fat |
72 | . endif | | 71 | . endif |
73 | . endif | | 72 | . endif |
74 | .endif | | 73 | .endif |
75 | | | 74 | |
76 | pre-configure: | | 75 | pre-configure: |
77 | cd ${WRKSRC} && type autoconf && autoconf | | 76 | cd ${WRKSRC} && type autoconf && autoconf |
78 | | | 77 | |
79 | .include "../../mk/bsd.pkg.mk" | | 78 | .include "../../mk/bsd.pkg.mk" |