[Midnightbsd-cvs] mports [21766] trunk/Mk/components/options.mk: add cmake bool handling.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Aug 20 14:04:03 EDT 2016
Revision: 21766
http://svnweb.midnightbsd.org/mports/?rev=21766
Author: laffer1
Date: 2016-08-20 14:04:03 -0400 (Sat, 20 Aug 2016)
Log Message:
-----------
add cmake bool handling. dont turn off enabled configure enable options
Modified Paths:
--------------
trunk/Mk/components/options.mk
Modified: trunk/Mk/components/options.mk
===================================================================
--- trunk/Mk/components/options.mk 2016-08-20 18:03:39 UTC (rev 21765)
+++ trunk/Mk/components/options.mk 2016-08-20 18:04:03 UTC (rev 21766)
@@ -73,6 +73,17 @@
_ALL_EXCLUDE= ${OPTIONS_EXCLUDE_${ARCH}} ${OPTIONS_EXCLUDE} \
${OPTIONS_SLAVE} ${OPTIONS_EXCLUDE_${OPSYS}}
+.for opt in ${OPTIONS_DEFINE:O:u}
+. if !${_ALL_EXCLUDE:M${opt}}
+. for opt_implied in ${${opt}_IMPLIES}
+. if ${_ALL_EXCLUDE:M${opt_implied}}
+_ALL_EXCLUDE+= ${opt}
+. endif
+. endfor
+. endif
+.endfor
+
+
# Remove options the port maintainer doesn't want
.for opt in ${_ALL_EXCLUDE:O:u}
OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}}
@@ -322,6 +333,12 @@
. if defined(${opt}_CONFIGURE_WITH)
CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--with-/}
. endif
+. if defined(${opt}_CMAKE_BOOL)
+CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=true/}
+. endif
+. if defined(${opt}_CMAKE_BOOL_OFF)
+CMAKE_ARGS+= ${${opt}_CMAKE_BOOL_OFF:C/.*/-D&:BOOL=false/}
+. endif
. for configure in CONFIGURE CMAKE QMAKE
. if defined(${opt}_${configure}_ON)
${configure}_ARGS+= ${${opt}_${configure}_ON}
@@ -337,8 +354,8 @@
${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS}
. endif
. endfor
-. if defined(${opt}_CONFIGURE_ENABLE)
-. for iopt in ${${opt}_CONFIGURE_ENABLE}
+. if defined(${opt}_CONFIGURE_DISABLE)
+. for iopt in ${${opt}_CONFIGURE_DISABLE}
CONFIGURE_ARGS+= --disable-${iopt}
. endfor
. endif
More information about the Midnightbsd-cvs
mailing list