Index: bsd.options.mk =================================================================== --- bsd.options.mk (revision 320407) +++ bsd.options.mk (working copy) @@ -306,10 +306,60 @@ .endif . undef opt .endfor -.endif ### +.for opt in ${COMPLETE_OPTIONS_LIST} +# PLIST_SUB +PLIST_SUB?= +. if defined(OPTIONS_SUB) +. if ! ${PLIST_SUB:M${opt}=*} +. if ${PORT_OPTIONS:M${opt}} +PLIST_SUB:= ${PLIST_SUB} ${opt}="" +. else +PLIST_SUB:= ${PLIST_SUB} ${opt}="@comment " +. endif +. endif +. endif + +# CONFIGURE +. if ${PORT_OPTIONS:M${opt}} +. if defined(${opt}_CONFIGURE_ENABLE) +CONFIGURE_ARGS+= --enable-${${opt}_CONFIGURE_ENABLE} +. endif +. if defined(${opt}_CONFIGURE_ON) +CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ON} +. endif +. else +. if defined(${opt}_CONFIGURE_ENABLE) +CONFIGURE_ARGS+= --disable-${${opt}_CONFIGURE_ENABLE} +. endif +. if defined(${opt}_CONFIGURE_OFF) +CONFIGURE_ARGS+= ${${opt}_CONFIGURE_OFF} +. endif +. endif + +. for flags in CFLAGS CXXFLAGS LDFLAGS CONFIGURE_ENV MAKE_ENV +. if ${PORT_OPTIONS:M${opt}} && defined(${opt}_${flags}) +${flags}+= ${${opt}_${flags}} +. endif +. endfor + +# DEPENDS +. for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN +. if ${PORT_OPTIONS:M${opt}} && defined(${opt}_${deptype}_DEPENDS) +${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS} +. endif +. endfor + +# USES +. if ${PORT_OPTIONS:M${opt}} && defined(${opt}_USES) +USES+= ${${opt}_USES} +. endif +.endfor + _OPTIONS_WITHOUT_GLOBALS:= ${COMPLETE_OPTIONS_LIST} .for opt in ${GLOBAL_OPTIONS} _OPTIONS_WITHOUT_GLOBALS:= ${_OPTIONS_WITHOUT_GLOBALS:N${opt}} .endfor + +.endif