From 9d30f78a00bed11384c7259f662e9352754275db Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 19 Aug 2015 13:29:59 +0000 Subject: Convert ports to use the options helpers in categories [abc]*, and minor fixes. Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D3412? --- benchmarks/expedite/Makefile | 22 +++------------------- benchmarks/fio/Makefile | 9 ++------- benchmarks/gtkperf/Makefile | 17 +++++------------ benchmarks/imb/Makefile | 19 +++++++------------ benchmarks/iozone/Makefile | 13 +++---------- benchmarks/netio/Makefile | 8 ++------ benchmarks/netperf/Makefile | 36 +++++------------------------------- benchmarks/nqueens/Makefile | 3 +-- benchmarks/nuttcp/Makefile | 11 ++++------- benchmarks/polygraph/Makefile | 25 +++++++------------------ 10 files changed, 39 insertions(+), 124 deletions(-) (limited to 'benchmarks') diff --git a/benchmarks/expedite/Makefile b/benchmarks/expedite/Makefile index 74ba9d61cc12..eb605abfd991 100644 --- a/benchmarks/expedite/Makefile +++ b/benchmarks/expedite/Makefile @@ -24,24 +24,8 @@ OPENGL_DESC= Enable OpenGL evas engine SDL_DESC= Enable SDL evas engine X11_DESC= Enable X11 evas engine -.include - -.if ${PORT_OPTIONS:MOPENGL} -CONFIGURE_ARGS+= --enable-opengl-x11 -.else -CONFIGURE_ARGS+= --disable-opengl-x11 -.endif - -.if ${PORT_OPTIONS:MSDL} -CONFIGURE_ARGS+= --enable-software-sdl -.else -CONFIGURE_ARGS+= --disable-software-sdl -.endif - -.if ${PORT_OPTIONS:MX11} -CONFIGURE_ARGS+= --enable-software-x11 --enable-xrender-x11 -.else -CONFIGURE_ARGS+= --disable-software-x11 --disable-xrender-x11 -.endif +OPENGL_CONFIGURE_ENABLE= opengl-x11 +SDL_CONFIGURE_ENABLE= software-sdl +X11_CONFIGURE_ENABLE= software-x11 xrender-x11 .include diff --git a/benchmarks/fio/Makefile b/benchmarks/fio/Makefile index 4dacc2125911..109b21b617cd 100644 --- a/benchmarks/fio/Makefile +++ b/benchmarks/fio/Makefile @@ -16,20 +16,15 @@ USES= gmake tar:bzip2 OPTIONS_DEFINE= GNUPLOT EXAMPLES GNUPLOT_DESC= Support for plotting graphs -.include +GNUPLOT_BUILD_DEPENDS= ${LOCALBASE}/bin/gnuplot:${PORTSDIR}/math/gnuplot do-install: ${INSTALL_PROGRAM} ${WRKSRC}/fio ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/tools/fio_generate_plots ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/fio.1 ${STAGEDIR}${MAN1PREFIX}/man/man1/ ${INSTALL_MAN} ${WRKSRC}/tools/fio_generate_plots.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 -.if ${PORT_OPTIONS:MEXAMPLES} +do-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}) -.endif - -.if ${PORT_OPTIONS:MGNUPLOT} -BUILD_DEPENDS+= ${LOCALBASE}/bin/gnuplot:${PORTSDIR}/math/gnuplot -.endif .include diff --git a/benchmarks/gtkperf/Makefile b/benchmarks/gtkperf/Makefile index e68232208e8a..36295a2a52c4 100644 --- a/benchmarks/gtkperf/Makefile +++ b/benchmarks/gtkperf/Makefile @@ -17,18 +17,11 @@ GNU_CONFIGURE= yes USE_GNOME= gtk20 gnomeprefix OPTIONS_DEFINE= NLS +OPTIONS_SUB= yes -.include - -.if ${PORT_OPTIONS:MNLS} -USES+= gettext iconv -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ARGS+= --enable-nls -PLIST_SUB= NLS="" -.else -CONFIGURE_ARGS+= --disable-nls -PLIST_SUB= NLS="@comment " -.endif +NLS_USES= gettext iconv +NLS_CPPFLAGS= -I${LOCALBASE}/include +NLS_LDFLAGS= -L${LOCALBASE}/lib +NLS_CONFIGURE_ENABLE= nls .include diff --git a/benchmarks/imb/Makefile b/benchmarks/imb/Makefile index 33f680ee22cf..8b9d406a31a5 100644 --- a/benchmarks/imb/Makefile +++ b/benchmarks/imb/Makefile @@ -32,17 +32,12 @@ OPTIONS_DEFINE= CHECK_RESULTS DOCS OPENMPI CHECK_RESULTS_DESC= Check results (not valid as real benchmark data) CHECK_RESULTS_CFLAGS= -DCHECK -.include - -.if ${PORT_OPTIONS:MOPENMPI} -BUILD_DEPENDS+= ${LOCALBASE}/mpi/openmpi/lib/libmpi.so:${PORTSDIR}/net/openmpi -RUN_DEPENDS+= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi -MAKE_ENV+= MPI_HOME=${LOCALBASE}/mpi/openmpi -.else -BUILD_DEPENDS+= ${LOCALBASE}/bin/mpicc:${PORTSDIR}/net/mpich2 -RUN_DEPENDS+= ${LOCALBASE}/bin/mpirun:${PORTSDIR}/net/mpich2 -MAKE_ENV+= MPI_HOME=${LOCALBASE} -.endif +OPENMPI_BUILD_DEPENDS= ${LOCALBASE}/mpi/openmpi/lib/libmpi.so:${PORTSDIR}/net/openmpi +OPENMPI_RUN_DEPENDS= ${LOCALBASE}/mpi/openmpi/bin/mpirun:${PORTSDIR}/net/openmpi +OPENMPI_MAKE_ENV= MPI_HOME=${LOCALBASE}/mpi/openmpi +OPENMPI_BUILD_DEPENDS_OFF= ${LOCALBASE}/bin/mpicc:${PORTSDIR}/net/mpich2 +OPENMPI_RUN_DEPENDS_OFF= ${LOCALBASE}/bin/mpirun:${PORTSDIR}/net/mpich2 +OPENMPI_MAKE_ENV_OFF= MPI_HOME=${LOCALBASE} do-install: @${MKDIR} ${STAGEDIR}${DOCSDIR} @@ -53,4 +48,4 @@ do-install: (cd ${WRKSRC} && ${INSTALL_PROGRAM} IMB-EXT IMB-IO IMB-MPI1 \ ${STAGEDIR}${PREFIX}/bin) -.include +.include diff --git a/benchmarks/iozone/Makefile b/benchmarks/iozone/Makefile index 96993cb15fa9..f595c4b1c667 100644 --- a/benchmarks/iozone/Makefile +++ b/benchmarks/iozone/Makefile @@ -28,19 +28,12 @@ OPTIONS_DEFAULT=SSH THREADS SSH_DESC= Use ssh in distributed measurement THREADS_DESC= Enable threading (uses pthreads) -.include +THREADS_LDFLAGS= -lpthread +THREADS_CFLAGS_OFF= -DNO_THREADS -.if ${PORT_OPTIONS:MTHREADS} -LDFLAGS+= -lpthread -.else -CFLAGS+= -DNO_THREADS -.endif - -post-patch: -.if ${PORT_OPTIONS:MSSH} +post-patch-SSH-on: @${REINPLACE_CMD} -e 's|shell\,\"rsh\"|shell\,\"ssh\"|' \ ${WRKSRC}/iozone.c -.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/iozone ${STAGEDIR}${PREFIX}/bin diff --git a/benchmarks/netio/Makefile b/benchmarks/netio/Makefile index ff78bb24b217..9f31a8092a35 100644 --- a/benchmarks/netio/Makefile +++ b/benchmarks/netio/Makefile @@ -22,20 +22,16 @@ MAKE_ENV+= OUT=-o OPTIONS_DEFINE= IPV6 IPV6_PLIST_FILES= bin/netio6 -.include - do-build: @(cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} O=.o CFLAGS="${CFLAGS}" ${MAKE_CMD} all) -.if ${PORT_OPTIONS:MIPV6} +do-build-IPV6-on: @(cd ${WRKSRC} && \ ${MAKE_ENV} O=.6o X=6 CFLAGS="${CFLAGS} -DUSE_IPV6" ${MAKE_CMD} all) -.endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/netio ${STAGEDIR}${PREFIX}/bin -.if ${PORT_OPTIONS:MIPV6} +do-install-IPV6-on: ${INSTALL_PROGRAM} ${WRKSRC}/netio6 ${STAGEDIR}${PREFIX}/bin -.endif .include diff --git a/benchmarks/netperf/Makefile b/benchmarks/netperf/Makefile index 837c480798e8..2086a00d7e52 100644 --- a/benchmarks/netperf/Makefile +++ b/benchmarks/netperf/Makefile @@ -28,37 +28,11 @@ CONFIGURE_ARGS= --program-prefix="" --program-suffix="" --enable-dirty \ INFO= netperf -.include - -.if ${PORT_OPTIONS:MSOCKETS} -CONFIGURE_ARGS+= --enable-unixdomain -.else -CONFIGURE_ARGS+= --disable-unixdomain -.endif - -.if ${PORT_OPTIONS:MSCTP} -CONFIGURE_ARGS+= --enable-sctp -.else -CONFIGURE_ARGS+= --disable-sctp -.endif - -.if ${PORT_OPTIONS:MEXS} -CONFIGURE_ARGS+= --enable-exs -.else -CONFIGURE_ARGS+= --disable-exs -.endif - -.if ${PORT_OPTIONS:MHISTOGRAM} -CONFIGURE_ARGS+= --enable-histogram -.else -CONFIGURE_ARGS+= --disable-histogram -.endif - -.if ${PORT_OPTIONS:MOMNI} -CONFIGURE_ARGS+= --enable-omni -.else -CONFIGURE_ARGS+= --disable-omni -.endif +SOCKETS_CONFIGURE_ENABLE= unixdomain +SCTP_CONFIGURE_ENABLE= sctp +EXS_CONFIGURE_ENABLE= exs +HISTOGRAM_CONFIGURE_ENABLE= histogram +OMNI_CONFIGURE_ENABLE= omni SCRIPTS= arr_script packet_byte_script sctp_stream_script snapshot_script \ tcp_range_script tcp_rr_script tcp_stream_script udp_rr_script \ diff --git a/benchmarks/nqueens/Makefile b/benchmarks/nqueens/Makefile index 290297e0429a..b6ce2bdd2444 100644 --- a/benchmarks/nqueens/Makefile +++ b/benchmarks/nqueens/Makefile @@ -40,10 +40,9 @@ post-extract: do-build: cd ${WRKSRC} && \ ${CC} ${CFLAGS} -o qn24b_base base/queens.c -.if ${PORT_OPTIONS:MMPI} +do-build-MPI-on: cd ${WRKSRC} && \ ${MPICC} ${CFLAGS} -o qn24b_mpi mpi/main.c -.endif PLIST_FILES= ${PROGS:S/^/bin\//} diff --git a/benchmarks/nuttcp/Makefile b/benchmarks/nuttcp/Makefile index fbb4bb8da58a..d6a055425308 100644 --- a/benchmarks/nuttcp/Makefile +++ b/benchmarks/nuttcp/Makefile @@ -25,8 +25,6 @@ NUTTSCP_DESC= Install script for copying files over nuttcp OPTIONS_SUB= yes NUTTSCP_USES= perl5 -.include - post-extract: ${CP} ${DISTDIR}/beta/${NUTTSCPDISTFILE} ${WRKDIR}/nuttscp ${CP} ${DISTDIR}/beta/${PORTNAME}-${PORTVERSION}.c ${WRKDIR}/ @@ -38,12 +36,11 @@ post-extract: do-build: cd ${WRKDIR} && ${CC} -o ${PORTNAME} nuttcp-${PORTVERSION}.c -do-install: -. if ${PORT_OPTIONS:MNUTTSCP} - ${INSTALL_SCRIPT} ${WRKDIR}/nuttscp ${STAGEDIR}${PREFIX}/bin/ - ( cd ${STAGEDIR}${PREFIX}/bin; ${LN} -sf nuttscp nuttrcp ) -. endif +do-install-NUTTSCP-on: + ${INSTALL_SCRIPT} ${WRKDIR}/nuttscp ${STAGEDIR}${PREFIX}/bin/ + ( cd ${STAGEDIR}${PREFIX}/bin; ${LN} -sf nuttscp nuttrcp ) +do-install: ${INSTALL_PROGRAM} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKDIR}/${PORTNAME}.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/ diff --git a/benchmarks/polygraph/Makefile b/benchmarks/polygraph/Makefile index 5cac7c00784b..3a541f113f31 100644 --- a/benchmarks/polygraph/Makefile +++ b/benchmarks/polygraph/Makefile @@ -32,28 +32,17 @@ ZLIB_DESC= Enable HTTP compression support OPTIONS_DEFAULT= OPENSSL ZLIB -.include +GNUPLOT_RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot -.if ${PORT_OPTIONS:MGNUPLOT} -RUN_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot -.endif +OPENSSL_USE= OPENSSL=yes +PERL_USES= perl5 +PERL_USE= PERL5=run +ZLIB_CONFIGURE_WITH= zlib=/usr + +.include .if ${PORT_OPTIONS:MOPENSSL} -USE_OPENSSL= yes CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} -.else -CONFIGURE_ARGS+= --without-ssl -.endif - -.if ${PORT_OPTIONS:MPERL} -USES+= perl5 -USE_PERL5= run -.endif - -.if ${PORT_OPTIONS:MZLIB} -CONFIGURE_ARGS+= --with-zlib=/usr -.else -CONFIGURE_ARGS+= --without-zlib .endif .include -- cgit