Convert a couple ports that use both _CMAKE_ON and _CMAKE_OFF to _CMAKE_BOOL.

Use options helpers all the way in math/carve, because I couldn't help myself.
This commit is contained in:
Adam Weinberger 2016-06-30 20:02:43 +00:00
parent 9ac8e558a6
commit a53681542b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=417839
9 changed files with 54 additions and 103 deletions

View file

@ -30,17 +30,13 @@ OPTIONS_DEFINE= ALSA JACK PORTAUDIO PULSEAUDIO
OPTIONS_DEFAULT= PORTAUDIO
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
ALSA_CMAKE_ON= -DBUILD_ALSA:BOOL=ON
ALSA_CMAKE_OFF= -DBUILD_ALSA:BOOL=OFF
ALSA_CMAKE_BOOL= BUILD_ALSA
JACK_LIB_DEPENDS= libjack.so:audio/jack
JACK_CMAKE_ON= -DBUILD_JACK:BOOL=ON
JACK_CMAKE_OFF= -DBUILD_JACK:BOOL=OFF
JACK_CMAKE_BOOL= BUILD_JACK
PORTAUDIO_LIB_DEPENDS= libportaudio.so:audio/portaudio
PORTAUDIO_CMAKE_ON= -DBUILD_PORTAUDIO:BOOL=ON
PORTAUDIO_CMAKE_OFF= -DBUILD_PORTAUDIO:BOOL=OFF
PORTAUDIO_CMAKE_BOOL= BUILD_PORTAUDIO
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
PULSEAUDIO_CMAKE_ON= -DBUILD_PULSEAUDIO:BOOL=ON
PULSEAUDIO_CMAKE_OFF= -DBUILD_PULSEAUDIO:BOOL=OFF
PULSEAUDIO_CMAKE_BOOL= BUILD_PULSEAUDIO
.include <bsd.port.pre.mk>

View file

@ -24,14 +24,12 @@ OPTIONS_SUB= yes
BOOST_DESC= C++ bindings (requires Boost)
BOOST_LIB_DEPENDS= libboost_system.so:devel/boost-libs
BOOST_CMAKE_ON= -DFTDIPP:BOOL=ON
BOOST_CMAKE_OFF= -DFTDIPP:BOOL=OFF
BOOST_CMAKE_BOOL= FTDIPP
BOOST_CXXFLAGS= -I${LOCALBASE}/include
PYTHON_DESC= Python bindings
PYTHON_BUILD_DEPENDS= swig2.0:devel/swig20
PYTHON_CMAKE_ON= -DPYTHON_BINDINGS:BOOL=ON
PYTHON_CMAKE_OFF= -DPYTHON_BINDINGS:BOOL=OFF
PYTHON_CMAKE_BOOL= PYTHON_BINDINGS
PYTHON_USES= python
.include <bsd.port.options.mk>

View file

@ -37,22 +37,18 @@ PLUGINS_DESC= Compile additional libpurple-plugins
CACA_LIB_DEPENDS= libcaca.so:graphics/libcaca \
libImlib2.so:graphics/imlib2
CACA_CMAKE_ON= -DENABLE_CACA:BOOL=ON -DENABLE_IMLIB:BOOL=ON
CACA_CMAKE_OFF= -DENABLE_CACA:BOOL=OFF -DENABLE_IMLIB:BOOL=OFF
CACA_CMAKE_BOOL= ENABLE_CACA ENABLE_IMLIB
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
GNUTLS_CMAKE_ON= -DENABLE_TLS:BOOL=ON
GNUTLS_CMAKE_OFF= -DENABLE_TLS:BOOL=OFF
GNUTLS_CMAKE_BOOL= ENABLE_TLS
PLUGINS_USE= GNOME=libxml2
PLUGINS_CMAKE_ON= -DENABLE_PLUGIN:BOOL=ON
PLUGINS_CMAKE_OFF= -DENABLE_PLUGIN:BOOL=OFF
PLUGINS_CMAKE_BOOL= ENABLE_PLUGIN
PLUGINS_PLIST_FILES= lib/purple-2/libcoincoin.so \
lib/purple-2/libgayattitude.so
VIDEO_USE= GSTREAMER=core,good
VIDEO_CMAKE_ON= -DENABLE_VIDEO:BOOL=ON
VIDEO_CMAKE_OFF= -DENABLE_VIDEO:BOOL=OFF
VIDEO_CMAKE_BOOL= ENABLE_VIDEO
VIDEO_LIB_DEPENDS= libgstfarsight-0.10.so:net-im/farsight2
post-patch:

View file

@ -15,6 +15,7 @@ LICENSE= GPLv2
LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs
OPTIONS_DEFINE= DOCS GUI
OPTIONS_SUB= yes
USES= cmake:outsource compiler:c++11-lib tar:tgz
USE_GL= glut
@ -26,17 +27,9 @@ CFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -std=c++11
LDFLAGS+= -L${LOCALBASE}/lib
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGUI}
LIB_DEPENDS+= libglui.so:devel/glui
PLIST_SUB+= GUI=""
CMAKE_ARGS+= -DCARVE_WITH_GUI:BOOL=true
.else
CONFIGURE_ARGS+=--with-gui=no
PLIST_SUB+= GUI="@comment "
CMAKE_ARGS+= -DCARVE_WITH_GUI:BOOL=false
.endif
GUI_LIB_DEPENDS= libglui.so:devel/glui
GUI_CONFIGURE_OFF= --with-gui=no
GUI_CMAKE_BOOL= CARVE_WITH_GUI
post-patch:
${FIND} ${WRKSRC} -name "*.cpp" -o -name "*.h" -o -name "*.hpp" | ${XARGS} \

View file

@ -57,24 +57,28 @@ CMAKE_ARGS+= -DBUILD_DOCUMENTATION:BOOL=ON \
-DOPENGL_gl_LIBRARY:FILEPATH=${LOCALBASE}/lib/libGL.so \
-DOPENGL_glu_LIBRARY:FILEPATH=${LOCALBASE}/lib/libGLU.so
SHARED_CMAKE_BOOL= BUILD_SHARED_LIBS
.for lib in EXPAT JPEG PNG TIFF ZLIB
SHARED_CMAKE_BOOL+= VTK_USE_SYSTEM_${lib}
.endfor
VTKMPEG2_CMAKE_BOOL= VTK_USE_PATENTED VTK_USE_MPEG2_ENCODER
THEORA_CMAKE_BOOL= VTK_USE_OGGTHEORA_ENCODER
GL2PS_CMAKE_BOOL= GTK_USE_GL2PS
OSMESA_CMAKE_BOOL= VTK_OPENGL_HAS_OSMESA
OSMESA_CMAKE_BOOL_OFF= VTK_USE_X
QT4_CMAKE_BOOL= VTK_USE_GUISUPPORT
TCLTK_CMAKE_BOOL= VTK_WRAP_TCL
DBGLEAKS_CMAKE_BOOL= VTK_DEBUG_LEAKS
LEGACY_CMAKE_BOOL_OFF= VTK_LEGACY_REMOVE
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSHARED}
CMAKE_ARGS+= -DBUILD_SHARED_LIBS:BOOL=ON \
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-DVTK_USE_SYSTEM_JPEG:BOOL=ON \
-DVTK_USE_SYSTEM_PNG:BOOL=ON \
-DVTK_USE_SYSTEM_TIFF:BOOL=ON \
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON
PLIST_SUB+= SHARED="" \
STATIC="@comment "
.else
CMAKE_ARGS+= -DBUILD_SHARED_LIBS:BOOL=OFF \
-DVTK_USE_SYSTEM_EXPAT:BOOL=OFF \
-DVTK_USE_SYSTEM_JPEG:BOOL=OFF \
-DVTK_USE_SYSTEM_PNG:BOOL=OFF \
-DVTK_USE_SYSTEM_TIFF:BOOL=OFF \
-DVTK_USE_SYSTEM_ZLIB:BOOL=OFF
PLIST_SUB+= SHARED="@comment " \
STATIC=""
.endif
@ -82,9 +86,7 @@ PLIST_SUB+= SHARED="@comment " \
.if ${PORT_OPTIONS:MVTKMPEG2}
LIB_DEPENDS+= libvtkMPEG2Encode.so:multimedia/vtkmpeg2encode
PLIST_SUB+= MPEG=""
CMAKE_ARGS+= -DVTK_USE_PATENTED:BOOL=ON \
-DVTK_USE_MPEG2_ENCODER:BOOL=ON \
-DvtkMPEG2Encode_INCLUDE_PATH=${LOCALBASE}/include/vtk-${PORTVERSION:R} \
CMAKE_ARGS+= -DvtkMPEG2Encode_INCLUDE_PATH=${LOCALBASE}/include/vtk-${PORTVERSION:R} \
-DvtkMPEG2Encode_LIBRARIES=${LOCALBASE}/lib/libvtkMPEG2Encode.so
.else
PLIST_SUB+= MPEG="@comment "
@ -94,15 +96,12 @@ PLIST_SUB+= MPEG="@comment "
LIB_DEPENDS+= libogg.so:audio/libogg \
libtheora.so:multimedia/libtheora
PLIST_SUB+= THEORA=""
CMAKE_ARGS+= -DVTK_USE_OGGTHEORA_ENCODER:BOOL=ON
.else
PLIST_SUB+= THEORA="@comment "
CMAKE_ARGS+= -DVTK_USE_OGGTHEORA_ENCODER:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MGL2PS}
LIB_DEPENDS+= libgl2ps.so:print/gl2ps
CMAKE_ARGS+= -DVTK_USE_GL2PS:BOOL=ON
PLIST_SUB+= GL2PS=""
.else
PLIST_SUB+= GL2PS="@comment "
@ -110,30 +109,25 @@ PLIST_SUB+= GL2PS="@comment "
.if ${PORT_OPTIONS:MOSMESA}
LIB_DEPENDS+= libOSMesa.so:graphics/libosmesa
CMAKE_ARGS+= -DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
-DOSMESA_INCLUDE_DIR:PATH=${LOCALBASE}/include/Mesa \
CMAKE_ARGS+= -DOSMESA_INCLUDE_DIR:PATH=${LOCALBASE}/include/Mesa \
-DOSMESA_LIBRARY:FILEPATH=${LOCALBASE}/lib/libOSMesa.so \
-DOPENGL_gl_LIBRARY:FILEPATH=${LOCALBASE}/lib/libOSMesa.so \
-DVTK_USE_X:BOOL=OFF
-DOPENGL_gl_LIBRARY:FILEPATH=${LOCALBASE}/lib/libOSMesa.so
PLIST_SUB+= X11="@comment "
.else
USE_GL= yes
CMAKE_ARGS+= -DVTK_USE_X:BOOL=ON
PLIST_SUB+= X11=""
.endif
.if ${PORT_OPTIONS:MQT4}
USE_QT4= corelib designer gui opengl qmake_build uic_build \
moc_build rcc_build
CMAKE_ARGS+= -DVTK_USE_GUISUPPORT:BOOL=ON \
-DVTK_USE_QVTK:BOOL=ON \
CMAKE_ARGS+= -DVTK_USE_QVTK:BOOL=ON \
-DVTK_USE_QT:BOOL=ON \
-DDESIRED_QT_VERSION:STRING=4 \
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QMAKE} \
-DVTK_INSTALL_QT_DIR:FILEPATH=/lib/qt4/plugins/designer
PLIST_SUB+= QT=""
.else
CMAKE_ARGS+= -DVTK_USE_GUISUPPORT:BOOL=OFF
PLIST_SUB+= QT="@comment "
.endif
@ -157,10 +151,8 @@ PLIST_SUB+= PYTHON="@comment "
.endif
.if ${PORT_OPTIONS:MTCLTK}
CMAKE_ARGS+= -DVTK_WRAP_TCL:BOOL=ON
PLIST_SUB+= TCLTK=""
.else
CMAKE_ARGS+= -DVTK_WRAP_TCL:BOOL=OFF
PLIST_SUB+= TCLTK="@comment "
.endif
@ -206,17 +198,9 @@ PLIST_SUB+= WRAPPING=""
PLIST_SUB+= WRAPPING="@comment "
.endif
.if ${PORT_OPTIONS:MDBGLEAKS}
CMAKE_ARGS+= -DVTK_DEBUG_LEAKS:BOOL=ON
.else
CMAKE_ARGS+= -DVTK_DEBUG_LEAKS:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MLEGACY}
CMAKE_ARGS+= -DVTK_LEGACY_REMOVE:BOOL=OFF
PLIST_SUB+= LEGACY=""
.else
CMAKE_ARGS+= -DVTK_LEGACY_REMOVE:BOOL=ON
PLIST_SUB+= LEGACY="@comment "
.endif

View file

@ -40,13 +40,9 @@ CMAKE_ARGS= -Wno-dev \
-DCLIENT_DATA_DIR=${DATADIR} \
-DSHARE_DIR=${LOCALBASE}/share
EMOTICONS_CMAKE_ON= -DWITH_EMOTICONS:BOOL=ON
EMOTICONS_CMAKE_OFF= -DWITH_EMOTICONS:BOOL=OFF
EXAMPLES_CMAKE_ON= -DWITH_EXAMPLES:BOOL=ON
EXAMPLES_CMAKE_OFF= -DWITH_EXAMPLES:BOOL=OFF
LUASCRIPTS_CMAKE_ON= -DWITH_LUASCRIPTS:BOOL=ON -DLUA_SCRIPT:BOOL=ON
LUASCRIPTS_CMAKE_OFF= -DWITH_LUASCRIPTS:BOOL=OFF
SOUNDS_CMAKE_ON= -DWITH_SOUNDS:BOOL=ON
SOUNDS_CMAKE_OFF= -DWITH_SOUNDS:BOOL=OFF
EMOTICONS_CMAKE_BOOL= WITH_EMOTICONS
EXAMPLES_CMAKE_BOOL= WITH_EXAMPLES
LUASCRIPTS_CMAKE_BOOL= WITH_LUASCRIPTS LUA_SCRIPT
SOUNDS_CMAKE_BOOL= WITH_SOUNDS
.include "${MASTERDIR}/Makefile"

View file

@ -45,18 +45,16 @@ LIBCANBERRA_LIB_DEPENDS=libcanberra-gtk.so:audio/libcanberra
LIBCANBERRA_CMAKE_ON= -DUSE_LIBGNOME2:BOOL=OFF -DUSE_LIBCANBERRA:BOOL=ON
LIBNOTIFY_LIB_DEPENDS= libnotify.so:devel/libnotify
LIBNOTIFY_CMAKE_ON= -DUSE_LIBNOTIFY:BOOL=ON
LIBNOTIFY_CMAKE_OFF= -DUSE_LIBNOTIFY:BOOL=OFF
LIBNOTIFY_CMAKE_BOOL= USE_LIBNOTIFY
GTK2_USE= gnome=gtk20
GTK2_CMAKE_ON= -DUSE_GTK:BOOL=ON -DUSE_GTK3:BOOL=OFF
GTK2_CMAKE_OFF= -DUSE_GTK:BOOL=OFF -DUSE_GTK3:BOOL=ON
GTK2_CMAKE_BOOL= USE_GTK
GTK2_CMAKE_BOOL_OFF= USE_GTK3
GTK3_USE= gnome=gtk30
GTK3_CMAKE_ON= -DUSE_GTK:BOOL=OFF -DUSE_GTK3:BOOL=ON
GTK3_CMAKE_OFF= -DUSE_GTK:BOOL=ON -DUSE_GTK3:BOOL=OFF
GTK3_CMAKE_BOOL= USE_GTK3
GTK3_CMAKE_BOOL_OFF= USE_GTK
FREE_SPACE_CMAKE_ON= -DFREE_SPACE_BAR_C:BOOL=ON
FREE_SPACE_CMAKE_OFF= -DFREE_SPACE_BAR_C:BOOL=OFF
FREE_SPACE_CMAKE_BOOL= FREE_SPACE_BAR_C
.include "${MASTERDIR}/Makefile"

View file

@ -38,27 +38,21 @@ BUILD_WRKSRC= ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}
INSTALL_WRKSRC= ${WRKSRC}/${PORTNAME}${PKGNAMESUFFIX}
ASPELL_LIB_DEPENDS= libaspell.so:textproc/aspell
ASPELL_CMAKE_ON= -DUSE_ASPELL:BOOL=ON
ASPELL_CMAKE_OFF= -DUSE_ASPELL:BOOL=OFF
ASPELL_CMAKE_BOOL= USE_ASPELL
FREE_SPACE_CMAKE_ON= -DFREE_SPACE_BAR_C:BOOL=ON
FREE_SPACE_CMAKE_OFF= -DFREE_SPACE_BAR_C:BOOL=OFF
FREE_SPACE_CMAKE_BOOL= FREE_SPACE_BAR_C
DBUS_NOTIFY_USE= QT4=dbus
DBUS_NOTIFY_CMAKE_ON= -DDBUS_NOTIFY:BOOL=ON
DBUS_NOTIFY_CMAKE_OFF= -DDBUS_NOTIFY:BOOL=OFF
DBUS_NOTIFY_CMAKE_BOOL= DBUS_NOTIFY
QTSCRIPT_USE= QT4=script
QTSCRIPT_RUN_DEPENDS= ${LOCALBASE}/lib/qt4/plugins/script/libqtscript_core.so:devel/qtscriptgenerator
QTSCRIPT_CMAKE_ON= -DUSE_JS:BOOL=ON
QTSCRIPT_CMAKE_OFF= -DUSE_JS:BOOL=OFF
QTSCRIPT_CMAKE_BOOL= USE_JS
QML_USE= QT4=declarative
QML_CMAKE_ON= -DUSE_QT_QML:BOOL=ON
QML_CMAKE_OFF= -DUSE_QT_QML:BOOL=OFF
QML_CMAKE_BOOL= USE_QT_QML
SQLITE_USE= QT4=sql-sqlite3
SQLITE_CMAKE_ON= -DUSE_QT_SQLITE:BOOL=ON
SQLITE_CMAKE_OFF= -DUSE_QT_SQLITE:BOOL=OFF
SQLITE_CMAKE_BOOL= USE_QT_SQLITE
.include "${MASTERDIR}/Makefile"

View file

@ -26,14 +26,10 @@ OPTIONS_DEFINE= PHP PYTHON RUBY JAVA DOCS
OPTIONS_SUB= yes
DOCS_BUILD_DEPENDS+= doxygen:devel/doxygen
PHP_CMAKE_ON= -DWITH_PHP5:BOOL=true
PHP_CMAKE_OFF= -DWITH_PHP5:BOOL=false
PYTHON_CMAKE_ON= -DWITH_PYTHON:BOOL=true
PYTHON_CMAKE_OFF= -DWITH_PYTHON:BOOL=false
RUBY_CMAKE_ON= -DWITH_RUBY:BOOL=true
RUBY_CMAKE_OFF= -DWITH_RUBY:BOOL=false
JAVA_CMAKE_ON= -DWITH_JAVA:BOOL=true
JAVA_CMAKE_OFF= -DWITH_JAVA:BOOL=false
PHP_CMAKE_BOOL= WITH_PHP5
PYTHON_CMAKE_BOOL= WITH_PYTHON
RUBY_CMAKE_BOOL= WITH_RUBY
JAVA_CMAKE_BOOL= WITH_JAVA
# Both install include/xqc.h
CONFLICTS= xqilla-[0-9]*