[Midnightbsd-cvs] mports [16420] trunk/Mk/components/options.mk: teach options about CONFIGURE_ENABLE

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jul 30 18:12:52 EDT 2014


Revision: 16420
          http://svnweb.midnightbsd.org/mports/?rev=16420
Author:   laffer1
Date:     2014-07-30 18:12:51 -0400 (Wed, 30 Jul 2014)
Log Message:
-----------
teach options about CONFIGURE_ENABLE

Modified Paths:
--------------
    trunk/Mk/components/options.mk

Modified: trunk/Mk/components/options.mk
===================================================================
--- trunk/Mk/components/options.mk	2014-07-30 21:52:14 UTC (rev 16419)
+++ trunk/Mk/components/options.mk	2014-07-30 22:12:51 UTC (rev 16420)
@@ -235,12 +235,72 @@
 .  if defined(OPTIONS_SUB)
 .    if ! ${PLIST_SUB:M${opt}=*}
 .      if ${PORT_OPTIONS:M${opt}}
-PLIST_SUB:=     ${PLIST_SUB} ${opt}=""
+PLIST_SUB:=	${PLIST_SUB} ${opt}="" NO_${opt}="@comment "
 .      else
-PLIST_SUB:=     ${PLIST_SUB} ${opt}="@comment "
+PLIST_SUB:=	${PLIST_SUB} ${opt}="@comment " NO_${opt}=""
 .      endif
 .    endif
 .  endif
+
+.  if ${PORT_OPTIONS:M${opt}}
+.    if defined(${opt}_USE)
+.      for option in ${${opt}_USE}
+_u=             ${option:C/=.*//g}
+USE_${_u:tu}+=  ${option:C/.*=//g:C/,/ /g}
+.      endfor
+.    endif
+.    if defined(${opt}_CONFIGURE_ENABLE)
+.      for iopt in ${${opt}_CONFIGURE_ENABLE}
+CONFIGURE_ARGS+=        --enable-${iopt}
+.      endfor
+.    endif
+.    if defined(${opt}_CONFIGURE_WITH)
+.      for iopt in ${${opt}_CONFIGURE_WITH}
+CONFIGURE_ARGS+=        --with-${iopt}
+.      endfor
+.    endif
+.    for configure in CONFIGURE CMAKE QMAKE
+.      if defined(${opt}_${configure}_ON)
+${configure}_ARGS+=     ${${opt}_${configure}_ON}
+.      endif
+.    endfor
+.    for flags in ${_OPTIONS_FLAGS}
+.      if defined(${opt}_${flags})
+${flags}+=      ${${opt}_${flags}}
+.      endif
+.    endfor
+.    for deptype in ${_OPTIONS_DEPENDS}
+.      if defined(${opt}_${deptype}_DEPENDS)
+${deptype}_DEPENDS+=    ${${opt}_${deptype}_DEPENDS}
+.      endif
+.    endfor
+.  else
+.    if defined(${opt}_CONFIGURE_ENABLE)
+.      for iopt in ${${opt}_CONFIGURE_ENABLE}
+CONFIGURE_ARGS+=        --disable-${iopt}
+.      endfor
+.    endif
+.    if defined(${opt}_CONFIGURE_WITH)
+.      for iopt in ${${opt}_CONFIGURE_WITH}
+CONFIGURE_ARGS+=        --without-${iopt:C/=.*//}
+.      endfor
+.    endif
+.    for configure in CONFIGURE CMAKE QMAKE
+.      if defined(${opt}_${configure}_OFF)
+${configure}_ARGS+=     ${${opt}_${configure}_OFF}
+.      endif
+.    endfor
+.    for flags in ${_OPTIONS_FLAGS}
+.      if defined(${opt}_${flags}_OFF)
+${flags}+=      ${${opt}_${flags}_OFF}
+.      endif
+.    endfor
+.    for deptype in ${_OPTIONS_DEPENDS}
+.      if defined(${opt}_${deptype}_DEPENDS_OFF)
+${deptype}_DEPENDS+=    ${${opt}_${deptype}_DEPENDS_OFF}
+.      endif
+.    endfor
+.  endif
 .endfor
 
 



More information about the Midnightbsd-cvs mailing list