1 # $NetBSD: Makefile,v 1.59 2010/09/24 14:27:35 jwise Exp $
5 MASTER_SITES= ${MASTER_SITE_GNU:=gmp/}
8 MAINTAINER= pkgsrc-users@NetBSD.org
9 HOMEPAGE= http://gmplib.org/
10 COMMENT= Library for arbitrary precision arithmetic
11 LICENSE= gnu-lgpl-v3 AND gnu-gpl-v3
13 PKG_DESTDIR_SUPPORT= user-destdir
14 PKG_INSTALLATION_TYPES= overwrite pkgviews
18 USE_LANGUAGES= c c++ c99
20 USE_TOOLS+= gm4 autoconf makeinfo
22 CONFIGURE_ARGS+= --without-readline
28 .include "../../mk/bsd.prefs.mk"
30 .if empty(PKGSRC_COMPILER:Msunpro)
31 CONFIGURE_ARGS+= --enable-cxx
35 .if !empty(MACHINE_PLATFORM:MIRIX-5*) && !empty(ABI)
39 .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
40 # The configure script thinks gcc 2.95 for ARM is too buggy to use.
44 .if ${MACHINE_ARCH} == "i386"
45 # XXX SunOS should work, but currently bombs in mpn/fat.c
46 . if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS" || !empty(PKGSRC_COMPILER:Msunpro)
47 # don't use x86 assembly (it doesn't build)
48 CONFIGURE_ENV+= MPN_PATH="generic"
50 PKG_OPTIONS_VAR= PKG_OPTIONS.gmp
51 PKG_SUPPORTED_OPTIONS= gmp-fat mmx simd
52 PKG_SUGGESTED_OPTIONS= gmp-fat
53 . include "../../mk/bsd.options.mk"
55 ### Support for a "fat" binary on i386. There's CPU autodetection,
56 ### so we'll be safe and filter out -march/-mcpu, et. al.
58 ### XXX Currently, the 'mmx' and 'simd' options imply the same thing,
59 ### as cpu detection is done at runtime. Is there a more elegant
60 ### way to handle this?
62 . if empty(PKG_OPTIONS:Mgmp-fat) && \
63 (!empty(PKG_OPTIONS:Mmmx) || !empty(PKG_OPTIONS:Msimd))
66 . if !empty(PKG_OPTIONS:Mgmp-fat)
67 CONFIGURE_ARGS+= --enable-fat
68 BUILDLINK_TRANSFORM+= rm-optarg:-march rm-optarg:-mcpu
69 BUILDLINK_TRANSFORM+= rm:-mmmx rm:-msse rm:-msse2 rm:-msse3 rm:-m3dnow
75 cd ${WRKSRC} && type autoconf && autoconf
77 .include "../../mk/bsd.pkg.mk"