diff options
author | bf <bf@FreeBSD.org> | 2012-01-13 07:13:33 +0800 |
---|---|---|
committer | bf <bf@FreeBSD.org> | 2012-01-13 07:13:33 +0800 |
commit | 3dbe6f5b9914302c4c83d1015078376d78242b6b (patch) | |
tree | 54af308768286dcf2de59f46a79450390d754a5b /math | |
parent | ac1e7569733e881e7d526b6d743706df7555cf1e (diff) | |
download | freebsd-ports-gnome-3dbe6f5b9914302c4c83d1015078376d78242b6b.tar.gz freebsd-ports-gnome-3dbe6f5b9914302c4c83d1015078376d78242b6b.tar.zst freebsd-ports-gnome-3dbe6f5b9914302c4c83d1015078376d78242b6b.zip |
use archive in unmodified form; make the MPFR dependency optional;
compile test executables with appropriate flags; enable SSE2 math
by default when possible
Diffstat (limited to 'math')
-rw-r--r-- | math/crlibm/Makefile | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/math/crlibm/Makefile b/math/crlibm/Makefile index 34d7428fb4a7..6f3534e532d7 100644 --- a/math/crlibm/Makefile +++ b/math/crlibm/Makefile @@ -7,6 +7,7 @@ PORTNAME= crlibm DISTVERSION= 1.0beta4 +PORTREVISION= 1 CATEGORIES= math MASTER_SITES= http://lipforge.ens-lyon.fr/frs/download.php/%SUBDIR%/:1,2,3 \ LOCAL/bf:4 @@ -23,27 +24,36 @@ COMMENT= Correctly-rounded mathematics library LICENSE= LGPL21 -LIB_DEPENDS= mpfr.4:${PORTSDIR}/math/mpfr - GNU_CONFIGURE= yes -CONFIGURE_ARGS = --enable-mpfr + CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib +OPTIONS= "TEST" "Include all test capabilities (requires MPFR)" "on" -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> +post-patch: #7-STABLE has log2() in libm after r226457 on 17 Oct 2011, but -#there was no accompanying OSVERSION bump +#there was no accompanying __FreeBSD_version bump .if ${OSVERSION} < 802502 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900027) -post-patch: @${REINPLACE_CMD} \ -e '/testfun_libm[[:blank:]]*=[[:blank:]]*log2;/s/log2/NULL/' \ ${WRKSRC}/tests/test_common.c +.endif + @${REINPLACE_CMD} -e 's/\($$(AM_CFLAGS)\) \($$(CFLAGS)\)/\2 \1/' \ + ${WRKSRC}/tests/Makefile.in +.if !empty(MACHINE_CPU:Msse2) +CFLAGS+= -msse2 -mfpmath=sse +CONFIGURE_ARGS+= --enable-sse2 .endif -post-build: - @cd ${WRKSRC}; ${STRIP_CMD} -x libcrlibm.a scs_lib/libscs.a +.if defined(WITH_TEST) +CONFIGURE_ARGS+= --enable-mpfr +LIB_DEPENDS+= mpfr.4:${PORTSDIR}/math/mpfr +.else +CONFIGURE_ARGS+= --disable-mpfr +.endif check regression-test test: build @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ @@ -58,4 +68,4 @@ post-install: .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> |