aboutsummaryrefslogtreecommitdiffstats
path: root/math/testu01/Makefile
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-11-26 17:00:44 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-11-26 17:00:44 +0800
commitde6d7b44bb7db63037273f806184459c77308d20 (patch)
tree9ae64534d342eb91685c005b893a83b6942d26d0 /math/testu01/Makefile
parent7e6080cb632da4793ddbd4f4c4feae20d8fe5d1c (diff)
downloadfreebsd-ports-gnome-de6d7b44bb7db63037273f806184459c77308d20.tar.gz
freebsd-ports-gnome-de6d7b44bb7db63037273f806184459c77308d20.tar.zst
freebsd-ports-gnome-de6d7b44bb7db63037273f806184459c77308d20.zip
- Add LICENSE (no commercial distribution allowed)
- Switch to USES=localbase - Switch to options helpers - Cosmetic fixes - Switch to new test framework
Diffstat (limited to 'math/testu01/Makefile')
-rw-r--r--math/testu01/Makefile65
1 files changed, 34 insertions, 31 deletions
diff --git a/math/testu01/Makefile b/math/testu01/Makefile
index b791d04ef8a4..7f4391866a60 100644
--- a/math/testu01/Makefile
+++ b/math/testu01/Makefile
@@ -13,59 +13,62 @@ EXTRACT_ONLY= ${PORTNAME}${EXTRACT_SUFX}
MAINTAINER= ports@FreeBSD.org
COMMENT= Utilities for statistical testing of uniform random number generators
+LICENSE= TestU01
+LICENSE_NAME= TestU01 license
+LICENSE_FILE= ${WRKSRC}/COPYING
+LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
+
LIB_DEPENDS= libgmp.so:math/gmp
-USES= gmake zip libtool
+CONFLICTS= emboss-[0-9]*
+
+USES= gmake zip libtool localbase
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --includedir="${PREFIX}/include/${PORTNAME}"
MAKE_ARGS= docdir="${DOCSDIR}" exdir="${EXAMPLESDIR}"
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-USE_LDCONFIG= yes
+USE_LDCONFIG= yes
+INSTALL_TARGET= install-strip
+
CFLAGS+= -fPIC
-PLIST_SUB= PORTNAME="${PORTNAME}"
-CONFLICTS= emboss-[0-9]*
OPTIONS_DEFINE= DOCS EXAMPLES
-.include <bsd.port.options.mk>
-
post-patch:
@${REINPLACE_CMD} -e 's|return|& (0)|' ${WRKSRC}/testu01/fftc.c
-.if empty(PORT_OPTIONS:MDOCS)
+
+post-patch-DOCS-off:
@${REINPLACE_CMD} -e '/^SUBDIRS \=/s/ doc / /' ${WRKSRC}/Makefile.in
@${FIND} -X ${WRKSRC} -name 'Makefile.in' | ${XARGS} ${REINPLACE_CMD} \
-e '/^install-data-am\: /s/install-docDATA//'
-.endif
-.if empty(PORT_OPTIONS:MEXAMPLES)
+
+
+post-patch-EXAMPLES-off:
@${REINPLACE_CMD} -e '/^SUBDIRS \=/s/ examples / /' ${WRKSRC}/Makefile.in
-.endif
-.if ${PORT_OPTIONS:MDOCS}
-post-install:
+
+post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- @${INSTALL_DATA} ${DISTDIR}/testu01.pdf ${STAGEDIR}${DOCSDIR}
-.endif
+ ${INSTALL_DATA} ${DISTDIR}/testu01.pdf ${STAGEDIR}${DOCSDIR}
-check regression-test test: build
+do-test:
@cd ${WRKSRC}/examples ; \
for f in [mx]*.c ; do \
- ${CC} ${CFLAGS} -c $${f} -I. -I../include ; \
+ ${CC} ${CFLAGS} -c $${f} -I. -I../include ; \
done ; \
for t in [befs]*.c; do \
- case $${t} in \
- ex3.c) x="my16807.o" ;; \
- ex7.c) x="mrg32k3a.o xorshift.o" ;; \
- scat.c) continue ;; \
- *) x="" ;; \
- esac ; \
- ${CC} ${CFLAGS} ${LDFLAGS} -o $${t%.c} $${t} -I. -I../include \
- -Wl,--as-needed $${x} ../testu01/.libs/libtestu01.so \
- ../probdist/.libs/libprobdist.so ../mylib/.libs/libmylib.so -lm ; \
- ${ECHO_CMD} "Running $${t%.c}..." ; \
- ${SETENV} \
- LD_LIBRARY_PATH=../testu01/.libs:../probdist/.libs:../mylib/.libs \
- ./$${t%.c} ; \
+ case $${t} in \
+ ex3.c) x="my16807.o" ;; \
+ ex7.c) x="mrg32k3a.o xorshift.o" ;; \
+ scat.c) continue ;; \
+ *) x="" ;; \
+ esac ; \
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $${t%.c} $${t} -I. -I../include \
+ -Wl,--as-needed $${x} ../testu01/.libs/libtestu01.so \
+ ../probdist/.libs/libprobdist.so ../mylib/.libs/libmylib.so -lm ; \
+ ${ECHO_CMD} "Running $${t%.c}..." ; \
+ ${SETENV} \
+ LD_LIBRARY_PATH=../testu01/.libs:../probdist/.libs:../mylib/.libs \
+ ./$${t%.c} ; \
done
.include <bsd.port.mk>