aboutsummaryrefslogtreecommitdiff
path: root/math/crlibm
diff options
context:
space:
mode:
authorBrendan Fabeny <bf@FreeBSD.org>2012-01-12 23:13:33 +0000
committerBrendan Fabeny <bf@FreeBSD.org>2012-01-12 23:13:33 +0000
commitc17cbbe3cdd5088ecae392d1c662096328067fb4 (patch)
treec3a40b6a58541bfb3cddfd185e3ee2e5393a7e53 /math/crlibm
parent82e5900ceab391d1c1ccb155372c5e1e9278959d (diff)
downloadports-c17cbbe3cdd5088ecae392d1c662096328067fb4.tar.gz
ports-c17cbbe3cdd5088ecae392d1c662096328067fb4.zip
use archive in unmodified form; make the MPFR dependency optional;
compile test executables with appropriate flags; enable SSE2 math by default when possible
Notes
Notes: svn path=/head/; revision=289057
Diffstat (limited to 'math/crlibm')
-rw-r--r--math/crlibm/Makefile28
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>