1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00
freebsd-ports/math/gmp/Makefile
Kubilay Kocak 55c37aca95 The MCPU_OPTS conditional block currently incorrectly sets ABI=64 for
all ARCH strings that in 64. GMP expects mode64, mode32 or 32 as valid values
for the ABI option [1]. Using an invalid value causes the following
build error on powerpc64:

    configure: error: ABI=64 is not among the following valid choices:
    mode64 mode32 32

This is the minimum change to set the correct "mode64" ABI value when
ARCH is powerpc64, while also keeping all other semantics the same. A
more complete refactor of this port is possible, but would need an
exp-run to test for regressions.

The change was tested on powerpc64 (thanks justin) and amd64 (for regression)

While I'm here:

- Remove indefinite article from COMMENT

[1] https://gmplib.org/manual/Build-Options.html

PR:		ports/179127
Submitted by:	jhibbits
Reviewed by:	jhibbits, ak
Approved by:	maintainer timeout (6 months)
2013-12-14 04:47:22 +00:00

57 lines
1.2 KiB
Makefile

# Created by: Ying-Chieh Liao <ijliao@FreeBSD.org>
# $FreeBSD$
PORTNAME= gmp
PORTVERSION= 5.1.3
CATEGORIES= math devel
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= gmp
MAINTAINER= ale@FreeBSD.org
COMMENT= Free library for arbitrary precision arithmetic
LICENSE= LGPL3
OPTIONS_DEFINE= CPU_OPTS
CPU_OPTS_DESC= Enable assembly optimizations for your CPU
USE_XZ= yes
HAS_CONFIGURE= yes
GNU_CONFIGURE= no # needed, since the following line would add it
USE_AUTOTOOLS= libtool
USE_GNOME= ltverhack
CONFIGURE_ENV= MAKEINFO="makeinfo --no-split"
CONFIGURE_ARGS= --prefix=${PREFIX} \
--infodir=${PREFIX}/info \
--mandir=${PREFIX}/man \
--enable-cxx
USE_LDCONFIG= yes
INFO= gmp
.include <bsd.port.pre.mk>
.if ! ${PORT_OPTIONS:MCPU_OPTS}
CONFIGURE_ARGS+=--build=${ARCH}-portbld-freebsd${OSREL}
.elif ${ARCH:S/64//} != ${ARCH}
.if ${ARCH} == powerpc64
CONFIGURE_ENV+= ABI="mode64"
.else
CONFIGURE_ENV+= ABI="64"
.endif
.else
CONFIGURE_ENV+= ABI="32"
.endif
post-extract:
@${RM} -f ${WRKSRC}/doc/gmp.info*
post-patch:
@${REINPLACE_CMD} "s/\(athlon64\-\*\-\*\)/amd64-*-* | \1/;s/\(x86_64)\)/amd64 | \1/" \
${WRKSRC}/configure
regression-test check: build
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
.include <bsd.port.post.mk>