summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2015-08-25 10:03:08 +0000
committermakc <makc@FreeBSD.org>2015-08-25 10:03:08 +0000
commit9e5654a5c0aea99f1b9b5daff162b08b49242b7b (patch)
tree542278ecb4449b3df78960fd5f6cf7d8be50914f
parent76858881403322c6f97767f7d23afe1a13ec5546 (diff)
downloadFreeBSD-ports-9e5654a5c0aea99f1b9b5daff162b08b49242b7b.zip
FreeBSD-ports-9e5654a5c0aea99f1b9b5daff162b08b49242b7b.tar.gz
Convert my ports to new options helpers
-rw-r--r--devel/geany/Makefile10
-rw-r--r--devel/jakarta-commons-io/Makefile11
-rw-r--r--devel/qdevelop/Makefile16
-rw-r--r--emulators/qtemu/Makefile14
-rw-r--r--games/hex-a-hop/Makefile43
-rw-r--r--games/trophy/Makefile8
-rw-r--r--games/warmux/Makefile48
-rw-r--r--graphics/batik/Makefile11
-rw-r--r--irc/quassel/Makefile4
-rw-r--r--java/jakarta-commons-collections/Makefile6
-rw-r--r--java/jrosetta/Makefile15
-rw-r--r--math/jlatexmath/Makefile10
-rw-r--r--math/liborigin/Makefile6
-rw-r--r--math/qtiplot/Makefile71
-rw-r--r--multimedia/minitube/Makefile10
-rw-r--r--net-im/psimedia/Makefile6
-rw-r--r--print/hplip/Makefile22
-rw-r--r--print/texvc/Makefile14
-rw-r--r--science/kst2/Makefile17
-rw-r--r--science/openbabel/Makefile16
-rw-r--r--textproc/qstardict/Makefile28
-rw-r--r--textproc/stardict3/Makefile18
-rw-r--r--x11-themes/gtk-qt4-engine/Makefile15
23 files changed, 147 insertions, 272 deletions
diff --git a/devel/geany/Makefile b/devel/geany/Makefile
index f7da98c..44ee43f 100644
--- a/devel/geany/Makefile
+++ b/devel/geany/Makefile
@@ -30,14 +30,10 @@ VTE_DESC= Embedded virtual terminal
VTE_CONFIGURE_ENABLE= vte
VTE_USE= GNOME=vte
-.include <bsd.port.options.mk>
-
-post-patch:
-.if !${PORT_OPTIONS:MDOCS}
+post-patch-DOCS-off:
@${REINPLACE_CMD} -e '/^SUBDIRS/ s|doc||' ${WRKSRC}/Makefile.in
-.endif
-.if !${PORT_OPTIONS:MNLS}
+
+post-patch-NLS-off:
@${REINPLACE_CMD} -e '/^SUBDIRS/ s|po||' ${WRKSRC}/Makefile.in
-.endif
.include <bsd.port.mk>
diff --git a/devel/jakarta-commons-io/Makefile b/devel/jakarta-commons-io/Makefile
index 3e1bbdd..e31b9de8 100644
--- a/devel/jakarta-commons-io/Makefile
+++ b/devel/jakarta-commons-io/Makefile
@@ -27,20 +27,15 @@ PORTDOCS= LICENSE.txt NOTICE.txt RELEASE-NOTES.txt apidocs
JAR_VERSION= ${PORTNAME}-2.2-SNAPSHOT
OPTIONS_DEFINE= DOCS
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDOCS}
-ALL_TARGET+= javadoc
-.endif
+DOCS_ALL_TARGET= javadoc
do-install:
${INSTALL_DATA} ${WRKSRC}/target/${JAR_VERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
(cd ${WRKSRC}/target && ${COPYTREE_SHARE} apidocs ${STAGEDIR}${DOCSDIR})
(cd ${WRKSRC} && ${INSTALL_DATA} LICENSE.txt NOTICE.txt \
RELEASE-NOTES.txt ${STAGEDIR}${DOCSDIR})
-.endif
.include <bsd.port.mk>
diff --git a/devel/qdevelop/Makefile b/devel/qdevelop/Makefile
index 0404e55..761d8a6 100644
--- a/devel/qdevelop/Makefile
+++ b/devel/qdevelop/Makefile
@@ -25,15 +25,13 @@ DESKTOP_ENTRIES= "QDevelop" \
true
OPTIONS_DEFINE= TOOLS DOCS NLS
-OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
+OPTIONS_DEFAULT:= ${OPTIONS_DEFINE}
OPTIONS_SUB= yes
NLS_USE= QT4=linguisttools_build
TOOLS_DESC= Install Qt 4 development tools (qmake, moc, etc.)
TOOLS_USE= ${_TOOLS:C|.*|QT4=&_run|}
_TOOLS= assistant linguisttools moc qmake rcc uic
-.include <bsd.port.options.mk>
-
post-patch:
@${REINPLACE_CMD} -e "s|\"qmake\"|\"qmake-qt4\"|g" \
-e "s|\"linguist\"|\"linguist-qt4\"|g" \
@@ -51,20 +49,18 @@ post-patch:
${WRKSRC}/plugins/tools-regexp-planner/replugin.cpp \
${WRKSRC}/plugins/formatting-astyle/astyleplugin.cpp
-post-configure:
-.if ${PORT_OPTIONS:MNLS}
+post-configure-NLS-on:
${LRELEASE} ${WRKSRC}/QDevelop.pro
-.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/resources/images/logo.png ${STAGEDIR}${PREFIX}/share/pixmaps/qdevelop.png
-.if ${PORT_OPTIONS:MNLS}
+
+post-install-NLS-on:
@${MKDIR} ${STAGEDIR}${DATADIR}/translations
${INSTALL_DATA} ${WRKSRC}/resources/translations/*.qm ${STAGEDIR}${DATADIR}/translations
-.endif
-.if ${PORT_OPTIONS:MDOCS}
+
+post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/ChangeLog.txt ${WRKSRC}/README.txt ${STAGEDIR}${DOCSDIR}
-.endif
.include <bsd.port.mk>
diff --git a/emulators/qtemu/Makefile b/emulators/qtemu/Makefile
index 7658658..700e4ec 100644
--- a/emulators/qtemu/Makefile
+++ b/emulators/qtemu/Makefile
@@ -21,21 +21,17 @@ OPTIONS_SUB= yes
NLS_USE= QT4=linguisttools_build
-.include <bsd.port.options.mk>
-
-post-configure:
-.if ${PORT_OPTIONS:MNLS}
+post-configure-NLS-on:
(cd ${WRKSRC} && ${LRELEASE} qtemu.pro)
-.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/qtemu ${STAGEDIR}${PREFIX}/bin/qtemu
-.if ${PORT_OPTIONS:MNLS}
+
+do-install-NLS-on:
@${MKDIR} ${STAGEDIR}${DATADIR}/translations
${INSTALL_DATA} ${WRKSRC}/translations/qtemu*.qm ${STAGEDIR}${DATADIR}/translations
-.endif
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
(cd ${WRKSRC}/help && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
-.endif
.include <bsd.port.mk>
diff --git a/games/hex-a-hop/Makefile b/games/hex-a-hop/Makefile
index 512d351..b554a9a 100644
--- a/games/hex-a-hop/Makefile
+++ b/games/hex-a-hop/Makefile
@@ -20,41 +20,28 @@ LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= PANGO SOUND NLS DEBUG
OPTIONS_DEFAULT= SOUND
+
+DEBUG_CONFIGURE_ENABLE= debug
+
+NLS_USES= gettext
+NLS_CONFIGURE_ENV= ac_cv_header_libintl_h=yes
+NLS_CONFIGURE_ENV_OFF= ac_cv_header_libintl_h=no
+NLS_LDFLAGS= -lintl
+
PANGO_DESC= Use sdl_pango instead of sdl_ttf
+PANGO_USE= SDL=pango
+PANGO_USE_OFF= SDL=ttf
+PANGO_CONFIGURE_ENABLE= sdlttf
+
SOUND_DESC= Sound support
+SOUND_USE= SDL=mixer
+SOUND_CONFIGURE_ENABLE= sound
DESKTOP_ENTRIES="Hex-a-Hop" "${COMMENT}" \
"${DATADIR}/icon.bmp" \
"hex-a-hop" "LogicGame;Game;" false
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MDEBUG}
-CONFIGURE_ARGS+=--disable-debug
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-CONFIGURE_ENV+= ac_cv_header_libintl_h=yes
-LDFLAGS+= -lintl
-.else
-CONFIGURE_ENV+= ac_cv_header_libintl_h=no
-.endif
-
-.if ${PORT_OPTIONS:MPANGO}
-USE_SDL+= pango
-CONFIGURE_ARGS+=--disable-sdlttf
-.else
-USE_SDL+= ttf
-.endif
-
-.if ${PORT_OPTIONS:MSOUND}
-USE_SDL+= mixer
-.else
-CONFIGURE_ARGS+=--disable-sound
-.endif
-
-post-patch: .SILENT
+post-patch:
${REINPLACE_CMD} -E '/CFLAGS|CXXFLAGS/s/-g//' ${WRKSRC}/configure
.include <bsd.port.mk>
diff --git a/games/trophy/Makefile b/games/trophy/Makefile
index bb13f7b..8402108 100644
--- a/games/trophy/Makefile
+++ b/games/trophy/Makefile
@@ -24,16 +24,12 @@ PORTDOCS= AUTHORS COPYING ChangeLog README TODO
OPTIONS_DEFINE= DOCS
-.include <bsd.port.options.mk>
-
-pre-configure:
+post-patch:
${REINPLACE_CMD} -e "/^icondir =/s,icons,pixmaps," \
${WRKSRC}/resources/Makefile.in
-post-install:
-.if ${PORT_OPTIONS:MDOCS}
+post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR} && \
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
-.endif
.include <bsd.port.mk>
diff --git a/games/warmux/Makefile b/games/warmux/Makefile
index 467415a..ab69c7c 100644
--- a/games/warmux/Makefile
+++ b/games/warmux/Makefile
@@ -14,21 +14,30 @@ COMMENT= Turn-based artillery game with free software mascots
LIB_DEPENDS= libxml++-2.6.so:${PORTSDIR}/textproc/libxml++26 \
libcurl.so:${PORTSDIR}/ftp/curl
-CONFLICTS_INSTALL= wormux-*
-
GNU_CONFIGURE= yes
CONFIGURE_ENV= cxx_present=yes
USES= dos2unix gmake pkgconfig tar:bzip2
USE_SDL= sdl image mixer ttf gfx net
DOS2UNIX_GLOB= fixed_class.h
+WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}
+
OPTIONS_DEFINE= FRIBIDI SERVER NLS DEBUG
+OPTIONS_SUB= yes
+
+DEBUG_CONFIGURE_ENABLE= debug logging
+
FRIBIDI_DESC= Enable bi-directional unicode support
-SERVER_DESC= Enable dedicated server
+FRIBIDI_LIB_DEPENDS= libfribidi.so:${PORTSDIR}/converters/fribidi
+FRIBIDI_CONFIGURE_ENABLE= fribidi
-WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION:R}
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
+NLS_CPPFLAGS+= -I${LOCALBASE}/include
+NLS_LDFLAGS+= -L${LOCALBASE}/lib
-.include <bsd.port.options.mk>
+SERVER_DESC= Enable dedicated server
+SERVER_CONFIGURE_ENABLE= servers
post-patch:
${REINPLACE_CMD} -e "s,-Werror,," ${WRKSRC}/Makefile.in \
@@ -36,33 +45,4 @@ post-patch:
${REINPLACE_CMD} -e "s,warmux_files.desktop,," ${WRKSRC}/data/Makefile.in
${FIND} -d ${WRKSRC}/data/ -name "*.*~" -delete
-.if ${PORT_OPTIONS:MDEBUG}
-CONFIGURE_ARGS+= --enable-debug \
- --enable-logging
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-PLIST_SUB+= NLS=""
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
-.else
-CONFIGURE_ARGS+= --disable-nls
-PLIST_SUB+= NLS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MSERVER}
-PLIST_SUB+= SERVER=""
-CONFIGURE_ARGS+= --enable-servers
-.else
-PLIST_SUB+= SERVER="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MFRIBIDI}
-LIB_DEPENDS+= libfribidi.so:${PORTSDIR}/converters/fribidi
-CONFIGURE_ARGS+= --enable-fribidi
-.else
-CONFIGURE_ARGS+= --disable-fribidi
-.endif
-
.include <bsd.port.mk>
diff --git a/graphics/batik/Makefile b/graphics/batik/Makefile
index 8b9ff4b1..c35a513 100644
--- a/graphics/batik/Makefile
+++ b/graphics/batik/Makefile
@@ -27,24 +27,17 @@ INSTALL_WRKSRC= ${WRKSRC}/${PORTNAME}-${PORTVERSION}
DATADIR= ${JAVASHAREDIR}/${PORTNAME}
PORTDOCS= *
-
DOC_FILES1= CHANGES NOTICE README
OPTIONS_DEFINE= DOCS
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MDOCS}
-DISTFILES+= ${PORTNAME}-docs-${PORTVERSION}${EXTRACT_SUFX}
-.endif
+DOCS_DISTFILES= ${PORTNAME}-docs-${PORTVERSION}${EXTRACT_SUFX}
do-install:
(cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
-.if ${PORT_OPTIONS:MDOCS}
+do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
(cd ${WRKDIR}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
-.endif
.include <bsd.port.mk>
diff --git a/irc/quassel/Makefile b/irc/quassel/Makefile
index 236fa76..a405df8 100644
--- a/irc/quassel/Makefile
+++ b/irc/quassel/Makefile
@@ -67,10 +67,8 @@ GROUPS= ${USERS}
SUB_FILES= pkg-message
.endif
-pre-configure:
-.if !${PORT_OPTIONS:MNLS}
+post-patch-NLS-off:
${REINPLACE_CMD} -e '/add_subdirectory(po)/d' \
${WRKSRC}/CMakeLists.txt
-.endif
.include <bsd.port.mk>
diff --git a/java/jakarta-commons-collections/Makefile b/java/jakarta-commons-collections/Makefile
index ec3573c..4deeb77 100644
--- a/java/jakarta-commons-collections/Makefile
+++ b/java/jakarta-commons-collections/Makefile
@@ -24,17 +24,15 @@ OPTIONS_DEFINE= DOCS
DOCS_ALL_TARGET= javadoc
-.include <bsd.port.options.mk>
-
do-install:
@${MKDIR} ${STAGEDIR}${JAVAJARDIR}
${INSTALL_DATA} ${WRKSRC}/build/${PORTNAME}-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/${PORTNAME}.jar
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC}/build/docs && \
${COPYTREE_SHARE} apidocs ${STAGEDIR}${DOCSDIR})
${INSTALL_DATA} ${OTHERDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
-.endif
.include <bsd.port.mk>
diff --git a/java/jrosetta/Makefile b/java/jrosetta/Makefile
index 423d3c0..476a8cf 100644
--- a/java/jrosetta/Makefile
+++ b/java/jrosetta/Makefile
@@ -20,7 +20,7 @@ PLIST_FILES= %%JAVAJARDIR%%/jrosetta-api.jar \
%%JAVAJARDIR%%/jrosetta-engine.jar
OPTIONS_DEFINE= COMPILE
-COMPILE_DESC= Download and compile source instead of binaries
+COMPILE_DESC= Download and compile source instead of using provided binaries
.include <bsd.port.options.mk>
@@ -41,27 +41,24 @@ EXTRACT_ONLY=
NO_BUILD= yes
.endif
-.if ${PORT_OPTIONS:MCOMPILE}
-post-patch:
+post-patch-COMPILE-on:
${MKDIR} ${WRKDIR}/m2
${CP} ${FILESDIR}/settings.xml ${WRKDIR}
${REINPLACE_CMD} -e "s|WORK|${WRKDIR}|" ${WRKDIR}/settings.xml
-do-build:
+do-build-COMPILE-on:
(cd ${WRKSRC} && ${LOCALBASE}/bin/mvn -gs "${WRKDIR}/settings.xml" clean install)
-.endif
-do-install:
-.if ${PORT_OPTIONS:MCOMPILE}
+do-install-COMPILE-on:
${INSTALL_DATA} ${OUTPUT}/jrosetta-api/${PORTVERSION}/jrosetta-api-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/jrosetta-api.jar
${INSTALL_DATA} ${OUTPUT}/jrosetta-engine/${PORTVERSION}/jrosetta-engine-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/jrosetta-engine.jar
-.else
+
+do-install-COMPILE-off:
${INSTALL_DATA} ${DISTDIR}/jrosetta-api-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/jrosetta-api.jar
${INSTALL_DATA} ${DISTDIR}/jrosetta-engine-${PORTVERSION}.jar \
${STAGEDIR}${JAVAJARDIR}/jrosetta-engine.jar
-.endif
.include <bsd.port.mk>
diff --git a/math/jlatexmath/Makefile b/math/jlatexmath/Makefile
index 06107d8..e9c5e9a 100644
--- a/math/jlatexmath/Makefile
+++ b/math/jlatexmath/Makefile
@@ -35,8 +35,6 @@ FOP_RUN_DEPENDS:= ${FOP_BUILD_DEPENDS} \
${JAVALIBDIR}/xml-apis-ext.jar:${PORTSDIR}/textproc/xml-commons
FOP_ALL_TARGET= fop
-.include <bsd.port.options.mk>
-
post-patch:
${REINPLACE_CMD} -e 's|/usr/share/java/fop.jar|${LOCALBASE}/share/java/fop/build/fop.jar|' ${WRKSRC}/fop.properties
${REINPLACE_CMD} -e 's|/usr/share/java/batik.jar|${LOCALBASE}/share/java/batik/batik.jar|' ${WRKSRC}/fop.properties
@@ -47,10 +45,12 @@ pre-install:
-${RMDIR} ${WRKSRC}/examples/Macros/bin
do-install:
-.if ${PORT_OPTIONS:MFOP}
- ${INSTALL_DATA} ${WRKSRC}/dist/jlatexmath-fop-${PORTVERSION}.jar ${STAGEDIR}${JAVAJARDIR}/jlatexmath-fop.jar
-.endif
${INSTALL_DATA} ${WRKSRC}/dist/jlatexmath-${PORTVERSION}.jar ${STAGEDIR}${JAVAJARDIR}/jlatexmath.jar
+
+do-install-EXAMPLES-on:
(cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR})
+do-install-FOP-on:
+ ${INSTALL_DATA} ${WRKSRC}/dist/jlatexmath-fop-${PORTVERSION}.jar ${STAGEDIR}${JAVAJARDIR}/jlatexmath-fop.jar
+
.include <bsd.port.mk>
diff --git a/math/liborigin/Makefile b/math/liborigin/Makefile
index 4d324aa..20a1f54 100644
--- a/math/liborigin/Makefile
+++ b/math/liborigin/Makefile
@@ -22,11 +22,7 @@ PORTDOCS= *
OPTIONS_DEFINE= DOXYGEN
DOXYGEN_BUILD_DEPENDS= doxygen:${PORTSDIR}/devel/doxygen
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MDOXYGEN}
-post-patch:
+post-patch-DOXYGEN-off:
${REINPLACE_CMD} -e '/find_package(Doxygen)/d' ${WRKSRC}/CMakeLists.txt
-.endif
.include <bsd.port.mk>
diff --git a/math/qtiplot/Makefile b/math/qtiplot/Makefile
index a6a0c2f..2dd1e2f 100644
--- a/math/qtiplot/Makefile
+++ b/math/qtiplot/Makefile
@@ -29,49 +29,26 @@ DESKTOP_ENTRIES="QtiPlot" "Data analysis and plotting" \
"qtiplot" "" true
OPTIONS_DEFINE= DOCS PYTHON NLS DEBUG
-OPTIONS_DEFAULT= DOCS PYTHON NLS
+OPTIONS_DEFAULT= PYTHON
+OPTIONS_SUB= yes
DOCS_DESC= Install the QtiPlot Handbook
+DOCS_RUN_DEPENDS= qtiplot-doc>=0:${PORTSDIR}/math/qtiplot-doc
+DOCS_USE= QT4=assistant-adp_run
+
PYTHON_DESC= Python scripting support
+PYTHON_USES= python
+PYTHON_BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/PyQt4/QtGui.so:${PORTSDIR}/x11-toolkits/py-qt4-gui
+PYTHON_RUN_DEPENDS:= ${PYTHON_BUILD_DEPENDS}
+PYTHON_CONFIGURE_ENV= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} \
+ PYTHON_VERSION=${PYTHON_VERSION}
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MPYTHON}
-USES+= python
-BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/PyQt4/QtGui.so:${PORTSDIR}/x11-toolkits/py-qt4-gui
-RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/PyQt4/QtGui.so:${PORTSDIR}/x11-toolkits/py-qt4-gui
-PLIST_SUB+= PYTHON=""
-CONFIGURE_ENV+= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} \
- PYTHON_VERSION=${PYTHON_VERSION}
-.else
-PLIST_SUB+= PYTHON="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDOCS}
-RUN_DEPENDS+= qtiplot-doc>=0:${PORTSDIR}/math/qtiplot-doc
-USE_QT4+= assistant-adp_run
-.endif
-
-.if ${PORT_OPTIONS:MNLS}
-USE_QT4+= linguisttools_build
-PLIST_SUB+= NLS=""
-.else
-PLIST_SUB+= NLS="@comment "
-.endif
+NLS_USE= QT4=linguisttools_build
post-extract:
${CP} ${FILESDIR}/build.conf ${WRKSRC}
post-patch:
-.if ${PORT_OPTIONS:MPYTHON}
- ${REINPLACE_CMD} -e \
- '/^sys.path.append/s|"\."|"${DATADIR}"|' \
- ${WRKSRC}/${PORTNAME}/qtiplotrc.py
-.else
- ${REINPLACE_CMD} -e \
- "s/SCRIPTING_LANGS.*Python//" \
- ${WRKSRC}/build.conf
-.endif
${REINPLACE_CMD} -e \
's|/usr/local/qtiplot/fitPlugins|${DATADIR}/fitPlugins|' \
${WRKSRC}/qtiplot/src/core/ApplicationWindow.cpp
@@ -80,29 +57,37 @@ post-patch:
${WRKSRC}/fitPlugins/*/*.pro
${REINPLACE_CMD} -e '/^system($$$$LUPDATE/d; /^system($$$$LRELEASE/d' \
${WRKSRC}/${PORTNAME}/qtiplot.pro
-.if ${PORT_OPTIONS:MDEBUG}
+
+post-patch-PYTHON-on:
+ ${REINPLACE_CMD} -e \
+ '/^sys.path.append/s|"\."|"${DATADIR}"|' \
+ ${WRKSRC}/${PORTNAME}/qtiplotrc.py
+
+post-patch-PYTHON-off:
+ ${REINPLACE_CMD} -e \
+ "s/SCRIPTING_LANGS.*Python//" \
+ ${WRKSRC}/build.conf
+
+post-patch-DEBUG-on:
${REINPLACE_CMD} -e \
"/^CONFIG.*release/s|release|debug|" \
${WRKSRC}/build.conf
-.endif
-.if !${PORT_OPTIONS:MNLS}
+
+post-patch-NLS-off:
${REINPLACE_CMD} -e \
"/INSTALLS.*translations/d" \
${WRKSRC}/${PORTNAME}/qtiplot.pro
-.endif
-pre-configure:
-.if ${PORT_OPTIONS:MNLS}
+pre-configure-NLS-on:
cd ${WRKSRC}/qtiplot && ${LRELEASE} -compress qtiplot.pro
-.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/qtiplot_logo.png ${STAGEDIR}${PREFIX}/share/pixmaps/qtiplot.png
-.if ${PORT_OPTIONS:MPYTHON}
+
+post-install-PYTHON-on:
.for s in qtiplotrc.py qtiUtil.py
cd ${WRKSRC}/qtiplot && ${PYTHON_CMD} -c "import py_compile; py_compile.compile('${s}')"
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}/${s}c ${STAGEDIR}${DATADIR}/${s}c
.endfor
-.endif
.include <bsd.port.mk>
diff --git a/multimedia/minitube/Makefile b/multimedia/minitube/Makefile
index aad932c..d0eee62 100644
--- a/multimedia/minitube/Makefile
+++ b/multimedia/minitube/Makefile
@@ -20,17 +20,15 @@ OPTIONS_DEFINE= NLS
OPTIONS_SUB= yes
NLS_USE= QT4=linguisttools_build
-.include <bsd.port.options.mk>
-
pre-everything::
@${CAT} ${PKGMESSAGE}
-pre-configure:
-.if !${PORT_OPTIONS:MNLS}
- ${REINPLACE_CMD} -e '/include(locale\/locale.pri)/d' ${WRKSRC}/minitube.pro
-.endif
+post-patch:
# Remove BOM
${REINPLACE_CMD} -e '1 s|^.*/|/|g' \
${WRKSRC}/src/aggregatevideosource.cpp
+post-patch-NLS-off:
+ ${REINPLACE_CMD} -e '/include(locale\/locale.pri)/d' ${WRKSRC}/minitube.pro
+
.include <bsd.port.mk>
diff --git a/net-im/psimedia/Makefile b/net-im/psimedia/Makefile
index 9c03e7c..fcb6101 100644
--- a/net-im/psimedia/Makefile
+++ b/net-im/psimedia/Makefile
@@ -29,15 +29,13 @@ OPTIONS_SUB= yes
DEBUG_CONFIGURE_ON= --debug
DEBUG_CONFIGURE_OFF= --release
-.include <bsd.port.options.mk>
-
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${PSI_PLUGIN_DIR}
${INSTALL_LIB} ${WRKSRC}/gstprovider/libgstprovider.so \
${STAGEDIR}${PREFIX}/${PSI_PLUGIN_DIR}
-.if ${PORT_OPTIONS:MDEBUG}
+
+do-install-DEBUG-on:
${INSTALL_DATA} ${WRKSRC}/gstprovider/libgstprovider.so.debug \
${STAGEDIR}${PREFIX}/${PSI_PLUGIN_DIR}
-.endif
.include <bsd.port.mk>
diff --git a/print/hplip/Makefile b/print/hplip/Makefile
index 0238a6a..a5b0db6 100644
--- a/print/hplip/Makefile
+++ b/print/hplip/Makefile
@@ -99,17 +99,11 @@ SCAN_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pillow>0:${PORTSDIR}/graphics/py-pillow
SCAN_CONFIGURE_ENABLE= scan-build
XSANE_DESC= Install XSane for scanning (requires SCAN)
+XSANE_IMPLIES= SCAN
+XSANE_RUN_DEPENDS= xsane:${PORTSDIR}/graphics/xsane
DOCS_CONFIGURE_ENABLE= doc-build
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSCAN}
-. if ${PORT_OPTIONS:MXSANE}
-RUN_DEPENDS+= xsane:${PORTSDIR}/graphics/xsane
-. endif
-.endif
-
post-patch:
${REINPLACE_CMD} -e 's|-ldld||g; s|-ldl||g' \
-e 's,-lusb-1.0,-lusb,g' \
@@ -139,20 +133,20 @@ post-patch:
-e 's,^#!/usr/bin/python,#!${PYTHON_CMD},' \
-e 's,^#!/usr/bin/env python,#!${PYTHON_CMD},' \
-e 's,^#!/bin/env python,#!${PYTHON_CMD},'
-.if !${PORT_OPTIONS:MDOCS}
+
+post-patch-DOCS-off:
${REINPLACE_CMD} -e '/[[:space:]]install-docDATA/ s|install-docDATA||' \
${WRKSRC}/Makefile.in
-.endif
post-install:
-.if ${PORT_OPTIONS:MQT}
- ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart
- ${INSTALL_DATA} ${WRKSRC}/hplip-systray.desktop ${STAGEDIR}${PREFIX}/etc/xdg/autostart/hplip-systray.desktop
-.endif
${MKDIR} ${STAGEDIR}${PREFIX}/etc/hp
${INSTALL_DATA} ${WRKSRC}/hplip.conf ${STAGEDIR}${PREFIX}/etc/hp/hplip.conf.sample
${LN} -sf ${LOCALBASE}/bin/foomatic-rip ${STAGEDIR}${PREFIX}/libexec/cups/filter/foomatic-rip-hplip
${MKDIR} ${STAGEDIR}${PREFIX}/share/cups/model
${LN} -sf ${LOCALBASE}/share/ppd/HP ${STAGEDIR}${PREFIX}/share/cups/model/hplip
+post-install-QT-on:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart
+ ${INSTALL_DATA} ${WRKSRC}/hplip-systray.desktop ${STAGEDIR}${PREFIX}/etc/xdg/autostart/hplip-systray.desktop
+
.include <bsd.port.mk>
diff --git a/print/texvc/Makefile b/print/texvc/Makefile
index d205282..73c1b7b 100644
--- a/print/texvc/Makefile
+++ b/print/texvc/Makefile
@@ -18,16 +18,12 @@ BUILD_WRKSRC= ${WRKSRC}/src
PLIST_FILES= bin/texvc
OPTIONS_DEFINE= RASTER
-OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
-RASTER_DESC= rasterization support
-
-.include <bsd.port.options.mk>
+OPTIONS_DEFAULT:= ${OPTIONS_DEFINE}
-.if ${PORT_OPTIONS:MRASTER}
-USES+= ghostscript:run
-USE_TEX= latex dvipsk
-RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick
-.endif
+RASTER_DESC= rasterization support
+RASTER_USES= ghostscript:run
+RASTER_USE= TEX=latex,dvipsk
+RASTER_RUN_DEPENDS= convert:${PORTSDIR}/graphics/ImageMagick
do-install:
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/texvc ${STAGEDIR}${PREFIX}/bin
diff --git a/science/kst2/Makefile b/science/kst2/Makefile
index 3c8d2e4..a345ee0 100644
--- a/science/kst2/Makefile
+++ b/science/kst2/Makefile
@@ -38,32 +38,27 @@ MATLAB_LIB_DEPENDS= libmatio.so:${PORTSDIR}/math/matio
NETCDF_DESC= Support for data in NetCDF format (broken)
NETCDF_LIB_DEPENDS= libnetcdf.so:${PORTSDIR}/science/netcdf
+NETCDF_IGNORE= does not support NetCDF 4
TOOLKIT_DESC= Qt toolkit
QT4_USE= ${_USE_QT4:S/^/QT4=/}
QT5_USE= ${_USE_QT5:S/^/QT5=/}
QT5_CMAKE_ON= -Dkst_qt5=on
-.include <bsd.port.options.mk>
-
post-patch:
${REINPLACE_CMD} -e '/^Exec=kst2/s,\(kst2\).*,\1 %f,' \
${WRKSRC}/src/kst/kst2.desktop
-pre-configure:
-.if !${PORT_OPTIONS:MFITS}
+post-patch-FITS-off:
${REINPLACE_CMD} -e '/find_package(CFITSIO)/d' \
${CMAKE_SOURCE_PATH}/CMakeLists.txt
-.endif
-.if !${PORT_OPTIONS:MMATLAB}
+
+post-patch-MATLAB-off:
${REINPLACE_CMD} -e '/find_package(Matio)/d' \
${CMAKE_SOURCE_PATH}/CMakeLists.txt
-.endif
-.if !${PORT_OPTIONS:MNETCDF}
+
+post-patch-NETCDF-off:
${REINPLACE_CMD} -e '/find_package(Netcdf)/d' \
${CMAKE_SOURCE_PATH}/CMakeLists.txt
-.else
-IGNORE= does not support NetCDF 4
-.endif
.include <bsd.port.mk>
diff --git a/science/openbabel/Makefile b/science/openbabel/Makefile
index 787e095..ee9320a 100644
--- a/science/openbabel/Makefile
+++ b/science/openbabel/Makefile
@@ -29,21 +29,17 @@ CAIRO_DESC= PNG support via cairo library
CAIRO_LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo
CAIRO_USES= pkgconfig
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MPYTHON}
-USES+= python
-CMAKE_ARGS+= -DPYTHON_BINDINGS=on
-.endif
+PYTHON_USES= python
+PYTHON_CMAKE_ON= -DPYTHON_BINDINGS=on
post-patch:
-.if !${PORT_OPTIONS:MCAIRO}
- ${REINPLACE_CMD} -e '/find_package(Cairo)/d' \
- ${WRKSRC}/CMakeLists.txt
-.endif
${REINPLACE_CMD} -e '/pkgconfig/s,$${LIB_INSTALL_DIR},libdata,' \
${WRKSRC}/CMakeLists.txt
${REINPLACE_CMD} -e 's,share/man,man,' \
${WRKSRC}/doc/CMakeLists.txt
+post-patch-CAIRO-off:
+ ${REINPLACE_CMD} -e '/find_package(Cairo)/d' \
+ ${WRKSRC}/CMakeLists.txt
+
.include <bsd.port.mk>
diff --git a/textproc/qstardict/Makefile b/textproc/qstardict/Makefile
index 6edb649..ff38473 100644
--- a/textproc/qstardict/Makefile
+++ b/textproc/qstardict/Makefile
@@ -13,35 +13,27 @@ USES= dos2unix pkgconfig qmake tar:bzip2
USE_QT4= gui network xml uic_build moc_build rcc_build
DOS2UNIX_FILES= qstardict.pri
+# Path to dictionaries installed by stardict-* ports
DICPATH= ${LOCALBASE}/share/stardict/dic
OPTIONS_DEFINE= DBUS DOCS NLS
-OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
+OPTIONS_DEFAULT:= ${OPTIONS_DEFINE}
+OPTIONS_SUB= yes
-.include <bsd.port.options.mk>
+DBUS_USE= QT4=dbus
+DBUS_QMAKE_OFF= NO_DBUS=1
-.if ${PORT_OPTIONS:MNLS}
-PLIST_SUB+= NLS=""
-.else
-QMAKE_ARGS+= NO_TRANSLATIONS=1
-PLIST_SUB+= NLS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDBUS}
-USE_QT4+= dbus
-.else
-QMAKE_ARGS+= NO_DBUS=1
-.endif
+NLS_QMAKE_OFF= NO_TRANSLATIONS=1
post-patch:
@${REINPLACE_CMD} -e "s|/usr|${PREFIX}|g" \
${WRKSRC}/qstardict.pri
-.if !${PORT_OPTIONS:MDOCS}
- @${REINPLACE_CMD} -e "/^INSTALLS/s|docs||g" \
- ${WRKSRC}/qstardict.pro
-.endif
@${REINPLACE_CMD} -e "s|/usr/share/stardict/dic|${DICPATH}|g" \
-e "s|glib.*\.h|glib.h|g" \
${WRKSRC}/plugins/stardict/stardict.cpp
+post-patch-DOCS-off:
+ ${REINPLACE_CMD} -e "/^INSTALLS/s|docs||g" \
+ ${WRKSRC}/qstardict.pro
+
.include <bsd.port.mk>
diff --git a/textproc/stardict3/Makefile b/textproc/stardict3/Makefile
index 14902df..1702947 100644
--- a/textproc/stardict3/Makefile
+++ b/textproc/stardict3/Makefile
@@ -29,25 +29,20 @@ USE_GNOME= intltool
PROJECTHOST= stardict-3
OPTIONS_DEFINE= GNOME
+OPTIONS_SUB= yes
+
+GNOME_USE= GNOME=gnomeprefix,gnomedocutils,libgnomeui
+GNOME_USE_OFF= GNOME=gtk20
+GNOME_CONFIGURE_ENABLE= gnome-support schemas-install scrollkeeper
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGNOME}
-USE_GNOME+= gnomeprefix gnomedocutils libgnomeui
GCONF_SCHEMAS= stardict.schemas
INSTALLS_OMF= yes
-PLIST_SUB= GNOME=""
-.else
-USE_GNOME+= gtk20
-CONFIGURE_ARGS+=--disable-gnome-support --disable-schemas-install \
- --disable-scrollkeeper
-PLIST_SUB= GNOME="@comment "
.endif
post-patch:
-.if !${PORT_OPTIONS:MGNOME}
- @${REINPLACE_CMD} -e '/^SUBDIRS/s,help,,' ${WRKSRC}/dict/Makefile.in
-.endif
@${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,g' \
${WRKSRC}/dict/src/conf.cpp
@${REINPLACE_CMD} \
@@ -55,4 +50,7 @@ post-patch:
-e '/DEP_MODULES=/s/"$$/ gmodule-2.0"/' \
${WRKSRC}/dict/configure
+post-patch-GNOME-off:
+ ${REINPLACE_CMD} -e '/^SUBDIRS/s,help,,' ${WRKSRC}/dict/Makefile.in
+
.include <bsd.port.mk>
diff --git a/x11-themes/gtk-qt4-engine/Makefile b/x11-themes/gtk-qt4-engine/Makefile
index a4aba95..e0d3eb1 100644
--- a/x11-themes/gtk-qt4-engine/Makefile
+++ b/x11-themes/gtk-qt4-engine/Makefile
@@ -18,20 +18,15 @@ WRKSRC= ${WRKDIR}/${PORTNAME}
OPTIONS_DEFINE= BONOBO
BONOBO_DESC= Better support for Bonobo (GNOME) framework
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MBONOBO}
-USE_GNOME+= libbonoboui
-.endif
+BONOBO_USE= GNOME=libbonoboui
post-patch:
-.if !${PORT_OPTIONS:MBONOBO}
- @${REINPLACE_CMD} -e '/^PKGCONFIG(libbonoboui/d' \
- ${WRKSRC}/CMakeLists.txt
-.endif
@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \
${WRKSRC}/kcm_gtk/searchpaths.cpp \
${WRKSRC}/src/rcproperties.cpp
+post-patch-BONOBO-off:
+ ${REINPLACE_CMD} -e '/^PKGCONFIG(libbonoboui/d' \
+ ${WRKSRC}/CMakeLists.txt
+
.include <bsd.port.mk>
OpenPOWER on IntegriCloud