diff --git a/science/cdf/Makefile b/science/cdf/Makefile index 38618629fa3f..8eecf6f26783 100644 --- a/science/cdf/Makefile +++ b/science/cdf/Makefile @@ -30,6 +30,8 @@ PKGMESSAGE= ${WRKDIR}/pkg-message DEFS= B C K PORTDOCS= CDF_copyright.txt CHANGES.txt Release.notes Welcome.txt +OPTIONS_DEFINE= DOCS EXAMPLES + .include .if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64" @@ -45,14 +47,10 @@ pre-configure: post-install: ${MV} ${STAGEDIR}${PREFIX}/lib/libcdf.so ${STAGEDIR}${PREFIX}/lib/libcdf.so.0 ${LN} -sf libcdf.so.0 ${STAGEDIR}${PREFIX}/lib/libcdf.so -.if !defined(NOPORTDOCS) ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} -.endif -.if !defined(NOPORTEXAMPLES) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/samples/* ${STAGEDIR}${EXAMPLESDIR} -.endif regression-test: (cd ${BUILD_WRKSRC} ; \ diff --git a/science/chemtool/Makefile b/science/chemtool/Makefile index cb605962f878..0e5550b72b1d 100644 --- a/science/chemtool/Makefile +++ b/science/chemtool/Makefile @@ -19,6 +19,8 @@ CFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS= --enable-emf=yes --with-localedir=${PREFIX} +OPTIONS_DEFINE= EXAMPLES + .include #isolate libEMF stuff @@ -30,10 +32,8 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src-cht/cht ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/chemtool.1 ${STAGEDIR}${MANPREFIX}/man/man1 ${INSTALL_MAN} ${WRKSRC}/cht.1 ${STAGEDIR}${MANPREFIX}/man/man1 -.if !defined(NOPORTEXAMPLES) @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && ${FIND} . | \ ${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${EXAMPLESDIR} -.endif .include diff --git a/science/colt/Makefile b/science/colt/Makefile index a8e0e291c85b..2d88d567d086 100644 --- a/science/colt/Makefile +++ b/science/colt/Makefile @@ -14,18 +14,24 @@ USE_JAVA= yes JAVA_VERSION= 1.6+ WRKSRC= ${WRKDIR}/${PORTNAME} -.if !defined(WITHOUT_COMPILE) +OPTIONS_DEFINE= DOCS COMPILE +OPTIONS_DEFAULT=COMPILE +COMPILE_DESC= Install the pre-compiled .jar file + +.include + +.if ${PORT_OPTIONS:MCOMPILE} USE_ANT= yes ALL_TARGET= build MAKE_ENV= LANG=en_US.ISO8859-1 -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} ALL_TARGET+= javadoc .endif .else NO_BUILD= yes .endif -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} PORTDOCS= * .endif @@ -33,15 +39,8 @@ PLIST_FILES= %%JAVAJARDIR%%/colt.jar .include -pre-fetch: - @${ECHO_MSG} "" - @${ECHO_MSG} "You may use the following build options:" - @${ECHO_MSG} "" - @${ECHO_MSG} " WITHOUT_COMPILE=yes Install the pre-compiled .jar file" - @${ECHO_MSG} "" - do-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${ECHO_MSG} -n ">> Installing documentation in ${STAGEDIR}${DOCSDIR}..." @cd ${WRKSRC}/doc && ${FIND} . -type d -exec ${MKDIR} ${STAGEDIR}${DOCSDIR}/{} \; @cd ${WRKSRC}/doc && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${STAGEDIR}${DOCSDIR}/{} \; diff --git a/science/dcl/Makefile b/science/dcl/Makefile index 161826cf918c..7e9f04e360ba 100644 --- a/science/dcl/Makefile +++ b/science/dcl/Makefile @@ -23,16 +23,14 @@ PORTEXAMPLES= * RESTRICTED= No commercial use +OPTIONS_DEFINE= DOCS EXAMPLES + post-install: -.if !defined(NOPORTEXAMPLES) @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} (cd ${WRKSRC}/demo/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}) -.endif -.if !defined(NOPORTDOCS) @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}/ .endfor -.endif .include diff --git a/science/getdp/Makefile b/science/getdp/Makefile index b1ba29fb826a..71378dcb4dbf 100644 --- a/science/getdp/Makefile +++ b/science/getdp/Makefile @@ -28,16 +28,14 @@ MAKE_JOBS_UNSAFE= yes WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +OPTIONS_DEFINE= DOCS EXAMPLES + post-patch: @${REINPLACE_CMD} -e 's/-lgfortran/& $${LDFLAGS}/' ${WRKSRC}/configure post-install: -.if !defined(NOPORTDOCS) cd ${WRKSRC}/doc && ${FIND} -s ${WRKSRC}/doc/* | ${SED} -e 's#${WRKSRC}/doc/##' | ${CPIO} -pmud -R ${BINOWN}:${BINGRP} ${STAGEDIR}${DOCSDIR} -.endif -.if !defined(NOPORTEXAMPLES) cd ${WRKSRC}/demos && ${FIND} -s ${WRKSRC}/demos/* | ${SED} -e 's#${WRKSRC}/demos/##' | ${CPIO} -pmud -R ${BINOWN}:${BINGRP} ${STAGEDIR}${EXAMPLESDIR} -.endif .include diff --git a/science/gnudatalanguage/Makefile b/science/gnudatalanguage/Makefile index cc4b86e37c3c..68ee2e8b077a 100644 --- a/science/gnudatalanguage/Makefile +++ b/science/gnudatalanguage/Makefile @@ -52,6 +52,8 @@ LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib SLAVEDIRS= science/py-gnudatalanguage +OPTIONS_DEFINE= EXAMPLES + .if defined(BUILD_PYTHON_MODULE) CATEGORIES+= python CMAKE_ARGS+= -DPYTHON_MODULE:BOOL=YES -DOPENMP:BOOL=NO @@ -134,10 +136,8 @@ do-install: .if !defined(BUILD_PYTHON_MODULE) post-stage: -. if !defined(NOPORTEXAMPLES) ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/testsuite (cd ${WRKSRC}/testsuite && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}/testsuite/) -. endif .endif .if defined(MAINTAINER_MODE) diff --git a/science/medit/Makefile b/science/medit/Makefile index 40744d1fe8c2..71019a669e05 100644 --- a/science/medit/Makefile +++ b/science/medit/Makefile @@ -34,7 +34,11 @@ LIBTARBALL= library.${LIBVERSION}${EXTRACT_SUFX} PLIST_FILES= bin/${PORTNAME} -. if !defined(NOPORTEXAMPLES) +OPTIONS_DEFINE= EXAMPLES + +.include + +. if ${PORT_OPTIONS:MEXAMPLES} || make(makesum) DISTFILES+= meshes.tar.gz EXTRACT_ONLY+= meshes.tar.gz MESHES= DEFAULT.medit ozark.gis part.bb part.mesh thepart.mesh @@ -55,7 +59,7 @@ pre-build: do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin -.if !defined(NOPORTEXAMPLES) +.if ${PORT_OPTIONS:MEXAMPLES} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${MESHES:S|^|${WRKSRC}/INRIA.dir/|} ${STAGEDIR}${EXAMPLESDIR} .endif diff --git a/science/ncs/Makefile b/science/ncs/Makefile index fef22449f8f3..f63789f64d22 100644 --- a/science/ncs/Makefile +++ b/science/ncs/Makefile @@ -41,6 +41,10 @@ NEED_ROOT= yes FORTRANLIBDIR= `${DIRNAME} \\`${FC} -print-libgcc-file-name\\`` FORTRANLIBDIR2= `${DIRNAME} \\`${FC} -print-libgcc-file-name\\``/../../../ +OPTIONS_DEFINE= DOCS EXAMPLES + +.include + .if defined(PACKAGE_BUILDING) TERM= vt100 # Force for pointyhat to override su .else @@ -70,7 +74,7 @@ RUN_DEPENDS+= ${MPI_HOME}/bin/mpirun:${PORTSDIR}/net/mpich2 MPI_LIBS= -lmpich -lmpl ${PTHREAD_LIBS} .endif -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} USE_TEX= tex:build BUILD_DEPENDS+= fig2dev:${PORTSDIR}/print/transfig ALL_TARGET= all pdf @@ -107,11 +111,11 @@ pre-everything:: @${ECHO_MSG} post-install: -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOCS:C|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .endif -.if !defined(NOPORTEXAMPLES) +.if ${PORT_OPTIONS:MEXAMPLES} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR} .endif diff --git a/science/ruby-dcl/Makefile b/science/ruby-dcl/Makefile index c9859cb430f9..388c82be2984 100644 --- a/science/ruby-dcl/Makefile +++ b/science/ruby-dcl/Makefile @@ -38,6 +38,8 @@ EXAMPLESDIR= ${RUBY_MODEXAMPLESDIR} PORTDOCS= ChangeLog README ToDo PORTEXAMPLES= * +OPTIONS_DEFINE= DOCS EXAMPLES + .include .if ${ARCH} == "ia64" @@ -45,15 +47,11 @@ BROKEN= Does not build on ${ARCH} (Needs to link against shared libraries) .endif post-install: -.if !defined(NOPORTEXAMPLES) ${MKDIR} ${STAGEDIR}${RUBY_MODEXAMPLESDIR} (cd ${WRKSRC}/demo/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_MODEXAMPLESDIR}) -.endif -.if !defined(PORT_OPTIONS:MDOCS) ${MKDIR} ${STAGEDIR}${RUBY_MODDOCDIR} .for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR} .endfor -.endif .include