Index: head/Mk/bsd.apache.mk =================================================================== --- head/Mk/bsd.apache.mk (revision 365572) +++ head/Mk/bsd.apache.mk (revision 365573) @@ -1,504 +1,504 @@ # $FreeBSD$ # # bsd.apache.mk - Apache related macros. # Author: Clement Laforet # Author: Olli Hauer # # Please view me with 4 column tabs! # ========================================================================= # Parameter APACHE_PORT (user controlled): # # The parameter APACHE_PORT can be used in /etc/make.conf to # overwrite the default apache port. # # This parameter should never be used in the Makefile of a port! # # Example entry in /etc/make.conf: # APACHE_PORT= www/apache22 # # To get a list of "possible" valid values execute the command: # $> egrep 'apache[12]' ports/www/Makefile | awk '{print "www/" $3}' # # ========================================================================= # # This script will be included if one of the following parameter # is defined in the Makefile of the port # # USE_APACHE - Set apache and apxs as build and run dependency # USE_APACHE_BUILD - Set apache and apxs as build dependency # USE_APACHE_RUN - Set apache and apxs as run dependency # # The following example is representative of all three possible # parameters to use. # # Examples: # USE_APACHE= 22 # specify exact version # USE_APACHE= 22+ # specify [min] version, no [max] version # USE_APACHE= 22-24 # specify [min]-[max] range # USE_APACHE= -22 # specify [max] version, no [min] version # # Note: # - If "+" is specified and no apache is installed, then # ${DEFAULT_APACHE_VERSION} will be used. # # - Valid version numbers are specified in the variable # APACHE_SUPPORTED_VERSION below # # - The following values for USE_APACHE are reserverd and only valid # in apache-server ports! # USE_APACHE= common22 # # # The following variables can be used (ro) in ports Makefile # ========================================================================= # - APACHE_VERSION # - APACHEETCDIR # - APACHEINCLUDEDIR # - APACHEMODDIR # - DEFAULT_APACHE_VERSION # # # Parameters for building third party apache modules: # ========================================================================= # - AP_FAST_BUILD # automatic module build # # - AP_GENPLIST # automatic PLIST generation plus add # # the module disabled into httpd.conf # # (only if no pkg-plist exist) # # - MODULENAME # default: ${PORTNAME} # - SHORTMODNAME # default: ${MODULENAME:S/mod_//} # - SRC_FILE # default: ${MODULENAME}.c # # .if !defined(Apache_Pre_Include) Apache_Pre_Include= bsd.apache.mk .include "${PORTSDIR}/Mk/bsd.default-versions.mk" .if defined(DEFAULT_APACHE_VER) WARNING+= "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS=apache=${DEFAULT_APACHE_VER} instead" .endif DEFAULT_APACHE_VERSION?= ${APACHE_DEFAULT:S/.//} APACHE_SUPPORTED_VERSION= 24 22 # preferred version first # Print warnings _ERROR_MSG= : Error from bsd.apache.mk. # Important Note: # Keep apache version in ascending order! # The "+" sign is only valid as last sign, not between # two versions or in combination with range! .if defined(USE_APACHE) && !empty(USE_APACHE) . if ${USE_APACHE:Mcommon*} != "" AP_PORT_IS_SERVER= yes . elif ${USE_APACHE:C/\-//:S/^22//:S/^24//:C/\+$//} == "" AP_PORT_IS_MODULE= yes . if ${USE_APACHE:C/\-//:S/^22//:S/^24//} == "+" AP_PLUS= yes . endif . else IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) . endif # Catch unknown apache versions and silly USE_APACHE constructs . if empty(AP_PORT_IS_SERVER) && empty(AP_PORT_IS_MODULE) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) . endif # Catch USE_APACHE [min]-[max]+ . if defined(AP_PLUS) && ${USE_APACHE:C/[.+0-9]//g} == "-" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( ${USE_APACHE} ) . endif .elif defined(USE_APACHE) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE ( no version specified ) .endif # defined(USE_APACHE) # =============================================================== .if defined(AP_PORT_IS_SERVER) # MFC TODO: remove this check # used only by www/cakephp* ports .if defined(SLAVE_PORT_MODULES) DEFAULT_MODULES_CATEGORIES+= SLAVE_PORT ALL_MODULES_CATEGORIES+= SLAVE_PORT .endif # Module selection .for category in ${DEFAULT_MODULES_CATEGORIES} DEFAULT_MODULES+= ${${category}_MODULES} .endfor .for category in ${ALL_MODULES_CATEGORIES} AVAILABLE_MODULES+= ${${category}_MODULES} .endfor # detect invalid lowercase params in make.conf # keep this check until end of 2012 .if defined(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M[a-z]*} IGNORE= lowercase WITH_STATIC_MODULES="${WITH_STATIC_MODULES}"\ detected (make.conf), they shoud be UPPERCASE .endif # Setting "@comment " as default. .for module in ${AVAILABLE_MODULES:O} -${module}_PLIST_SUB= "@comment " +${module}PLIST_SUB= "@comment " _DISABLE_MODULES+= --disable-${module:tl} .endfor # Configure # dirty hacks to make sure all modules are disabled before we select them .if ${USE_APACHE:Mcommon2*} CONFIGURE_ARGS+= ${_DISABLE_MODULES:O:u} .endif # OPTIONS handling .for module in ${AVAILABLE_MODULES} . if ${PORT_OPTIONS:M${module}} _APACHE_MODULES+= ${module} . else WITHOUT_MODULES+= ${module} . endif .endfor .if !defined(WITH_STATIC_APACHE) # FYI #DYNAMIC_MODULES= so CONFIGURE_ARGS+= --enable-so .else CONFIGURE_ARGS+= --disable-so WITH_ALL_STATIC_MODULES= yes .endif .if ${PORT_OPTIONS:MSUEXEC} _APACHE_MODULES+= ${SUEXEC_MODULES} SUEXEC_CONFARGS= with-suexec # SUEXEC_DOCROOT should exist SUEXEC_DOCROOT?= ${PREFIX}/www/data #SUEXEC_DOCROOT?= ${WWWDIR} SUEXEC_USERDIR?= public_html # avoid duplicate search paths .if ${LOCALBASE} == ${PREFIX} SUEXEC_SAFEPATH?= ${LOCALBASE}/bin:/usr/bin:/bin .else SUEXEC_SAFEPATH?= ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin .endif SUEXEC_LOGFILE?= /var/log/httpd-suexec.log SUEXEC_UIDMIN?= 1000 SUEXEC_GIDMIN?= 1000 SUEXEC_CALLER?= ${WWWOWN} CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-caller=${SUEXEC_CALLER} \ --${SUEXEC_CONFARGS}-uidmin=${SUEXEC_UIDMIN} \ --${SUEXEC_CONFARGS}-gidmin=${SUEXEC_GIDMIN} \ --${SUEXEC_CONFARGS}-userdir="${SUEXEC_USERDIR}" \ --${SUEXEC_CONFARGS}-docroot="${SUEXEC_DOCROOT}" \ --${SUEXEC_CONFARGS}-safepath="${SUEXEC_SAFEPATH}" \ --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" \ --${SUEXEC_CONFARGS}-bin="${PREFIX}/sbin/suexec" . if defined(WITH_SUEXEC_UMASK) CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK} . endif .endif .if !defined(WITHOUT_MODULES) APACHE_MODULES= ${_APACHE_MODULES} .else .for module in ${_APACHE_MODULES:O:u} . if !${WITHOUT_MODULES:M${module}} APACHE_MODULES+= ${module} . endif .endfor .endif .if defined(WITH_STATIC_MODULES) . for module in ${APACHE_MODULES} . if ${WITH_STATIC_MODULES:M${module}} _CONFIGURE_ARGS+= --enable-${module:tl} . else _CONFIGURE_ARGS+= --enable-${module:tl}=shared . endif . endfor CONFIGURE_ARGS+= ${_CONFIGURE_ARGS:O} .elif defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) WITH_STATIC_MODULES= ${APACHE_MODULES} CONFIGURE_ARGS+= --enable-modules="${APACHE_MODULES:O:tl}" .else CONFIGURE_ARGS+= --enable-mods-shared="${APACHE_MODULES:O:tl}" .endif # ==================================== # start pkg-plist adjustments .if defined(WITH_STATIC_MODULES) .for module in ${APACHE_MODULES} . if !${WITH_STATIC_MODULES:M${module}} _SHARED_MODULES+= ${module} . endif .endfor SHARED_MODULES= ${_SHARED_MODULES} .elif !defined(WITH_ALL_STATIC_MODULES) SHARED_MODULES= ${APACHE_MODULES} .endif .for module in ${SHARED_MODULES} -${module}_PLIST_SUB= "" +${module}PLIST_SUB= "" .endfor .for module in ${AVAILABLE_MODULES:O:u} -PLIST_SUB+= MOD_${module}=${${module}_PLIST_SUB} +PLIST_SUB+= MOD_${module}=${${module}PLIST_SUB} .endfor # pkg-plist workaround STATIC support .if ${PORT_OPTIONS:MSUEXEC} PLIST_SUB+= SUEXEC="" .else PLIST_SUB+= SUEXEC="@comment " .endif .if ${PORT_OPTIONS:MLOG_FORENSIC} PLIST_SUB+= FORENSIC="" .else PLIST_SUB+= FORENSIC="@comment " .endif # end pkg-plist adjustments #### End of AP_PORT_IS_SERVER #### # =============================================================== .elif defined(AP_PORT_IS_MODULE) || defined(USE_APACHE_RUN) || defined(USE_APACHE_BUILD) APXS?= ${LOCALBASE}/sbin/apxs HTTPD?= ${LOCALBASE}/sbin/httpd MODULENAME?= ${PORTNAME} SHORTMODNAME?= ${MODULENAME:S/mod_//} SRC_FILE?= ${MODULENAME}.c .if exists(${HTTPD}) _APACHE_VERSION!= ${HTTPD} -V | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p' # XXX see mod_perl-2.0.6/Changes # Apache 2.4 and onwards doesn't require linking the MPM module # directly in the httpd binary anymore. APXS lost the MPM_NAME query, # so we can't assume a given MPM anymore. . if ${_APACHE_VERSION} <= 22 APACHE_MPM!= ${APXS} -q MPM_NAME . endif .elif defined(APACHE_PORT) _APACHE_VERSION!= ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p' .else _APACHE_VERSION:= ${DEFAULT_APACHE_VERSION} .endif .if defined(USE_APACHE) _USE_APACHE:= ${USE_APACHE} .elif defined(USE_APACHE_BUILD) _USE_APACHE:= ${USE_APACHE_BUILD} .elif defined(USE_APACHE_RUN) _USE_APACHE:= ${USE_APACHE_RUN} .endif _APACHE_VERSION_CHECK:= ${_USE_APACHE:C/^([1-9][0-9])$/\1-\1/} _APACHE_VERSION_MINIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/([1-9][0-9])[-+].*/\1/} _APACHE_VERSION_MINIMUM:= ${_APACHE_VERSION_MINIMUM_TMP:M[1-9][0-9]} _APACHE_VERSION_MAXIMUM_TMP:= ${_APACHE_VERSION_CHECK:C/.*-([1-9][0-9])/\1/} _APACHE_VERSION_MAXIMUM:= ${_APACHE_VERSION_MAXIMUM_TMP:M[1-9][0-9]} .if defined(_APACHE_VERSION) # Validate Apache version whether it meets USE_APACHE version restriction. . if !empty(_APACHE_VERSION_MINIMUM) && (${_APACHE_VERSION} < ${_APACHE_VERSION_MINIMUM}) _APACHE_VERSION_NONSUPPORTED= ${_APACHE_VERSION_MINIMUM} at least . elif !empty(_APACHE_VERSION_MAXIMUM) && (${_APACHE_VERSION} > ${_APACHE_VERSION_MAXIMUM}) _APACHE_VERSION_NONSUPPORTED= ${_APACHE_VERSION_MAXIMUM} at most . endif . if defined(_APACHE_VERSION_NONSUPPORTED) && !defined(AP_IGNORE_VERSION_CHECK) BROKEN= ${_ERROR_MSG} apache${_APACHE_VERSION} is installed (or APACHE_PORT is defined) and port requires apache${_APACHE_VERSION_NONSUPPORTED} . endif .else # defined(_APACHE_VERSION) . for ver in ${APACHE_SUPPORTED_VERSION} __VER= ${ver} . if !defined(_APACHE_VERSION) && \ !(!empty(_APACHE_VERSION_MINIMUM) && ( ${__VER} < ${_APACHE_VERSION_MINIMUM} )) && \ !(!empty(_APACHE_VERSION_MAXIMUM) && ( ${__VER} > ${_APACHE_VERSION_MAXIMUM} )) _APACHE_VERSION= ${ver} . endif . endfor .endif # defined(_APACHE_VERSION) APACHE_VERSION:= ${_APACHE_VERSION} .if exists(${APXS}) APXS_PREFIX!= ${APXS} -q prefix 2> /dev/null || echo NULL . if ${APXS_PREFIX} == NULL IGNORE= : Your apache does not support DSO modules . endif . if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX} IGNORE?= PREFIX must be equal to APXS_PREFIX. . endif .endif AP_BUILDEXT= la APACHEMODDIR= libexec/apache${APACHE_VERSION} APACHEINCLUDEDIR=include/apache${APACHE_VERSION} APACHEETCDIR= etc/apache${APACHE_VERSION} APACHE_PORT?= www/apache${APACHE_VERSION} PLIST_SUB+= APACHEMODDIR="${APACHEMODDIR}" \ APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \ APACHEETCDIR="${APACHEETCDIR}" \ APACHE_VERSION="${APACHE_VERSION}" SUB_LIST+= APACHEMODDIR="${APACHEMODDIR}" \ APACHEETCDIR="${APACHEETCDIR}" \ APACHE_VERSION="${APACHE_VERSION}" APACHE_PKGNAMEPREFIX= ap${APACHE_VERSION}- .if defined(AP_FAST_BUILD) PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX} .endif .if defined(USE_APACHE) || defined(USE_APACHE_BUILD) BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} .endif .if defined(USE_APACHE) || defined(USE_APACHE_RUN) RUN_DEPENDS+= ${APXS}:${PORTSDIR}/${APACHE_PORT} .endif PLIST_SUB+= AP_NAME="${SHORTMODNAME}" PLIST_SUB+= AP_MODULE="${MODULENAME}.so" .if defined(AP_GENPLIST) PLIST?= ${WRKDIR}/ap-plist .endif .if defined(AP_INC) AP_EXTRAS+= -I ${AP_INC} .endif .if defined(AP_LIB) AP_EXTRAS+= -L ${AP_LIB} .endif .endif # End of AP_PORT_IS_SERVER / AP_PORT_IS_MOULE .endif # End of !Apache_Pre_Include # =============================================================== .if defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) Apache_Post_Include= bsd.apache.mk .if defined(USE_APACHE_RUN) && !empty(USE_APACHE_RUN) . if ${USE_APACHE_RUN:C/\-//:S/^22//:S/^24//:C/\+$//} != "" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( ${USE_APACHE_RUN} ) . endif .elif defined(USE_APACHE_RUN) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_RUN ( no valid version specified ) .endif .if defined(USE_APACHE_BUILD) && !empty(USE_APACHE_BUILD) . if ${USE_APACHE_BUILD:C/\-//:S/^22//:S/^24//:C/\+$//} != "" IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( ${USE_APACHE_BUILD} ) . endif .elif defined(USE_APACHE_BUILD) IGNORE= ${_ERROR_MSG} Illegal use of USE_APACHE_BUILD ( no valid version specified ) .endif # Check if USE_APACHE(_BUILD|_RUN) are mixed together .if defined(USE_APACHE) && ( defined(USE_APACHE_BUILD) || defined(USE_APACHE_RUN) ) IGNORE= ${_ERROR_MSG} specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN .elif defined(USE_APACHE_BUILD) && defined(USE_APACHE_RUN) IGNORE= ${_ERROR_MSG} use USE_APACHE instead of USE_APACHE_BUILD and USE_APACHE_RUN together .endif .if defined(NO_BUILD) && defined(USE_APACHE) BROKEN= If NO_BUILD is used, then USE_APACHE_RUN is sufficient. Please fix your Makefile .endif .if defined(AP_PORT_IS_SERVER) .if !target(print-closest-mirrors) print-closest-mirrors: @${ECHO_MSG} -n "Fetching list of nearest mirror: " >&2 @MIRRORS=`${FETCH_CMD} -T 30 -qo - http://www.apache.org/dyn/closer.cgi/httpd/ 2> /dev/null\ | ${GREP} /httpd/ | ${SED} 's/.*href="\(.*\)">&2; if [ "x$$MIRRORS" != "x" ]; then \ ${ECHO_MSG} -n "MASTER_SITE_APACHE_HTTPD?= ";\ ${ECHO_MSG} $$MIRRORS; else \ ${ECHO_MSG} "No mirrors found!">&2 ; fi .endif .if !target(show-modules) show-modules: .if !empty(APACHE_MODULES) .for module in ${AVAILABLE_MODULES} @${PRINTF} "%-20s : " ${module} . if ${APACHE_MODULES:M${module}} @${ECHO} -n "enabled " . if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}} @${ECHO_CMD} " (static)" . else @${ECHO_CMD} "(shared)" . endif . else @${ECHO_CMD} disabled . endif .endfor .else .for module in ${AVAILABLE_MODULES} @${PRINTF} "%-20s : disabled\n" ${module} .endfor .endif .endif .elif defined(AP_PORT_IS_MODULE) .if defined(AP_MODENABLE) AP_MOD_EN= -a .else AP_MOD_EN= -A .endif PLIST_SUB+= AP_MOD_EN="${AP_MOD_EN}" .if defined(AP_FAST_BUILD) .if !target(ap-gen-plist) ap-gen-plist: .if defined(AP_GENPLIST) . if !exists(${PLIST}) @${ECHO} "===> Generating apache plist" @${ECHO} "@unexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST} @${ECHO} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST} @${ECHO} "@exec %D/sbin/apxs -e ${AP_MOD_EN} -n %%AP_NAME%% %D/%F" >> ${PLIST} @${ECHO} "@unexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"">> ${PLIST} . endif .else @${DO_NADA} .endif .endif .if !target(do-build) do-build: ap-gen-plist @cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.${AP_BUILDEXT} ${SRC_FILE} .endif .if !target(do-install) do-install: . if defined(NO_STAGE) @${APXS} -i ${AP_MOD_EN} -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT} . else @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} @${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.${AP_BUILDEXT} . if !defined(DEBUG) @${ECHO_MSG} "===> strip ${APACHEMODDIR}/${MODULENAME}.so" @[ -e ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so ] && ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so . else @${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so" . endif . endif .endif .endif # defined(AP_FAST_BUILD) .endif # defined(AP_PORT_IS_SERVER / AP_PORT_IS_MODULE) .endif # defined(_POSTMKINCLUDED) && !defined(Apache_Post_Include) Index: head/Mk/bsd.options.mk =================================================================== --- head/Mk/bsd.options.mk (revision 365572) +++ head/Mk/bsd.options.mk (revision 365573) @@ -1,491 +1,491 @@ # $FreeBSD$ # # These variables are used in port makefiles to define the options for a port. # # OPTIONS_DEFINE - List of options this ports accept # OPTIONS_DEFINE_${ARCH} - List of options this ports accept and are # specific to ${ARCH} # OPTIONS_DEFAULT - List of options activated by default # OPTIONS_DEFAULT_${ARCH} - List of options activated by default for a # given arch # # ${OPTION}_DESC - Description of the ${OPTION} # # OPTIONS_SINGLE - List of single-choice grouped options: 1 and # only 1 among N # OPTIONS_RADIO - List of radio-choice grouped options: 0 or 1 # among N # OPTIONS_MULTI - List of multiple-choice grouped options: at # least 1 among N # OPTIONS_GROUP - List of group-choice grouped options: 0 or # more among N # # OPTIONS_SINGLE_${NAME} - List of OPTIONS grouped as single choice (for # the single named as ${NAME} as defined in # OPTIONS_SINGLE) # OPTIONS_RADIO_${NAME} - List of OPTIONS grouped as radio choice (for # the radio named as ${NAME} as defined in # OPTIONS_RADIO) # OPTIONS_MULTI_${NAME} - List of OPTIONS grouped as multiple-choice # (for the multi named as ${NAME} as defined in # OPTIONS_MULTI) # OPTIONS_GROUP_${NAME} - List of OPTIONS grouped as group-choice (for # the group named as ${NAME} as defined in # OPTIONS_GROUP) # # OPTIONS_EXCLUDE - List of options unsupported (useful for slave ports) # OPTIONS_EXCLUDE_${ARCH} - List of options unsupported on a given ${ARCH} # OPTIONS_SLAVE - This is designed for slave ports, it removes an # option from the options list inherited from the # master port and it always adds it to PORT_OPTIONS # meaning activated # # These variables can be used in make.conf to configure options. They are # processed in the order listed below, i.e. later variables override the effects # of previous variables. Options saved using the options dialog are processed # right before OPTIONS_SET_FORCE. When building a port a dialog to configure # options will only appear if there are new options, i.e. options which have not # been configured before either using the option dialog in a previous build or # using the variables below. You can force the dialog to appear by running # "make config". # # OPTIONS_SET - List of options to enable for all ports. # OPTIONS_UNSET - List of options to disable for all ports. # ${OPTIONS_NAME}_SET - List of options to enable for a specific port. # ${OPTIONS_NAME}_UNSET - List of options to disable for a specific port. # # OPTIONS_SET_FORCE - List of options to enable for all ports. # OPTIONS_UNSET_FORCE - List of options to disable for all ports. # ${OPTIONS_NAME}_SET_FORCE - List of options to enable for a specific port. # ${OPTIONS_NAME}_UNSET_FORCE # - List of options to disable for a specific port. # # These variables can be used on the command line. They override the effects of # the make.conf variables above. # # WITH - Set options from the command line # WITHOUT - Unset options from the command line # # # The following knobs are there to simplify the handling of OPTIONS in simple # cases : # # OPTIONS_SUB When defined it will add to PLIST_SUB: # Option enabled ${opt}="" # Option disabled ${opt}="@comment " # # ${opt}_CONFIGURE_ON When option is enabled, it will add its content to # the CONFIGURE_ARGS. # ${opt}_CONFIGURE_OFF When option is disabled, it will add its content to # the CONFIGURE_ARGS. # ${opt}_CONFIGURE_ENABLE Will add to CONFIGURE_ARGS: # Option enabled --enable-${content} # Option disabled --disable-${content} # ${opt}_CONFIGURE_WITH Will add to CONFIGURE_ARGS: # Option enabled --with-${content} # Option disabled --without-${content} # # ${opt}_CMAKE_ON When option is enabled, it will add its content to # the CMAKE_ARGS. # ${opt}_CMAKE_OFF When option is disabled, it will add its content to # the CMAKE_ARGS. # # ${opt}_QMAKE_ON When option is enabled, it will add its content to # the QMAKE_ARGS. # ${opt}_QMAKE_OFF When option is disabled, it will add its content to # the QMAKE_ARGS. # # ${opt}_USE= FOO=bar When option is enabled, it will enable # USE_FOO+= bar # If you need more than one option, you can do # FOO=bar,baz and you'll get USE_FOO=bar baz # # For each of: # ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS CONFLICTS_BUILD # CONFLICTS_INSTALL CPPFLAGS CXXFLAGS DISTFILES EXTRA_PATCHES # INSTALL_TARGET LDFLAGS LIBS MAKE_ARGS MAKE_ENV PATCHFILES PATCH_SITES -# PLIST_DIRS PLIST_DIRSTRY PLIST_FILES INFO USES, defining ${opt}_${variable} will +# PLIST_DIRS PLIST_DIRSTRY PLIST_FILES PLIST_SUB INFO USES, defining ${opt}_${variable} will # add its content to the actual variable when the option is enabled. Defining # ${opt}_${variable}_OFF will add its content to the actual variable when the # option is disabled. # # For each of the depends target PKG FETCH EXTRACT PATCH BUILD LIB RUN, # defining ${opt}_${deptype}_DEPENDS will add its content to the actual # dependency when the option is enabled. Defining # ${opt}_${deptype}_DEPENDS_OFF will add its content to the actual dependency # when the option is enabled. ## # Set all the options available for the ports, beginning with the # global ones and ending with the ones decided by the maintainer. .if !defined(OPTIONSMKINCLUDED) OPTIONSMKINCLUDED= bsd.options.mk OPTIONS_NAME?= ${PKGORIGIN:S/\//_/} OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options _OPTIONS_FLAGS= ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \ CONFLICTS_BUILD CONFLICTS_INSTALL CPPFLAGS CXXFLAGS DISTFILES \ EXTRA_PATCHES INSTALL_TARGET LDFLAGS LIBS MAKE_ARGS MAKE_ENV \ PATCHFILES PATCH_SITES PLIST_DIRS PLIST_DIRSTRY PLIST_FILES \ - USES INFO + PLIST_SUB USES INFO _OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN # Set the default values for the global options, as defined by portmgr .if !defined(NOPORTDOCS) PORT_OPTIONS+= DOCS .else OPTIONS_WARNINGS+= "NOPORTDOCS" WITHOUT+= DOCS OPTIONS_WARNINGS_UNSET+= DOCS .endif .if !defined(WITHOUT_NLS) PORT_OPTIONS+= NLS .else WITHOUT+= NLS .endif .if !defined(NOPORTEXAMPLES) PORT_OPTIONS+= EXAMPLES .else OPTIONS_WARNINGS+= "NOPORTEXAMPLES" WITHOUT+= EXAMPLES OPTIONS_WARNINGS_UNSET+= EXAMPLES .endif PORT_OPTIONS+= IPV6 # Add per arch options .for opt in ${OPTIONS_DEFINE_${ARCH}} .if empty(OPTIONS_DEFINE:M${opt}) OPTIONS_DEFINE+= ${opt} .endif .endfor # Add per arch defaults OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${ARCH}} # Remove options the port maintainer doesn't want .for opt in ${OPTIONS_EXCLUDE_${ARCH}} ${OPTIONS_EXCLUDE} ${OPTIONS_SLAVE} OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}} OPTIONS_DEFINE:= ${OPTIONS_DEFINE:N${opt}} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} . for otype in SINGLE RADIO MULTI GROUP . for m in ${OPTIONS_${otype}} OPTIONS_${otype}_${m}:= ${OPTIONS_${otype}_${m}:N${opt}} . endfor . endfor .endfor # Remove empty SINGLE/GROUP/RADIO/MULTI # Can be empty because of exclude/slaves .for otype in SINGLE RADIO MULTI GROUP . for m in ${OPTIONS_${otype}} . if empty(OPTIONS_${otype}_${m}) OPTIONS_${otype}:= ${OPTIONS_${otype}:N${m}} . endif . endfor .endfor # Sort options ALL_OPTIONS:= ${OPTIONS_DEFINE:O:u} OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:O:u} # complete list COMPLETE_OPTIONS_LIST= ${ALL_OPTIONS} .for otype in SINGLE RADIO MULTI GROUP . for m in ${OPTIONS_${otype}} COMPLETE_OPTIONS_LIST+= ${OPTIONS_${otype}_${m}} . endfor .endfor ## Now create the list of activated options .if defined(OPTIONS_OVERRIDE) # Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done # before NEW_OPTIONS= PORT_OPTIONS:= ${OPTIONS_OVERRIDE} .else NEW_OPTIONS= ${COMPLETE_OPTIONS_LIST} ## Set default options defined by the port maintainer PORT_OPTIONS+= ${OPTIONS_DEFAULT} ## Set system-wide defined options (set by user in make.conf) . for opt in ${OPTIONS_SET} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor ## Remove the options excluded system-wide (set by user in make.conf) . for opt in ${OPTIONS_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endfor # XXX To remove once UNIQUENAME will be removed ## Set the options specified per-port (set by user in make.conf) . for opt in ${${UNIQUENAME}_SET} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor ## Unset the options excluded per-port (set by user in make.conf) . for opt in ${${UNIQUENAME}_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endfor # XXX To remove once UNIQUENAME will be removed ## Set the options specified per-port (set by user in make.conf) . for opt in ${${OPTIONS_NAME}_SET} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor ## Unset the options excluded per-port (set by user in make.conf) . for opt in ${${OPTIONS_NAME}_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endfor # XXX to remove once UNIQUENAME is removed ## options files (from dialog) . if exists(${OPTIONSFILE}) && !make(rmconfig) . include "${OPTIONSFILE}" . endif . sinclude "${OPTIONSFILE}.local" # XXX to remove once UNIQUENAME is removed ## options files (from dialog) . if exists(${OPTIONS_FILE}) && !make(rmconfig) . include "${OPTIONS_FILE}" . endif . sinclude "${OPTIONS_FILE}.local" ### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile # XXX once WITH_DEBUG is not magic any more, do remove the :NDEBUG from here. .for opt in ${ALL_OPTIONS:NDEBUG} .if defined(WITH_${opt}) OPTIONS_WARNINGS+= "WITH_${opt}" OPTIONS_WARNINGS_SET+= ${opt} PORT_OPTIONS+= ${opt} .endif .if defined(WITHOUT_${opt}) OPTIONS_WARNINGS+= "WITHOUT_${opt}" OPTIONS_WARNINGS_UNSET+= ${opt} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} .endif .endfor .if defined(OPTIONS_WARNINGS) WARNING+= "You are using the following deprecated options: ${OPTIONS_WARNINGS}" WARNING+= "If you added them on the command line, you should replace them by" WARNING+= "WITH=\"${OPTIONS_WARNINGS_SET}\" WITHOUT=\"${OPTIONS_WARNINGS_UNSET}\"" WARNING+= "" WARNING+= "If they are global options set in your make.conf, you should replace them with:" .if defined(OPTIONS_WARNINGS_SET) WARNING+= "OPTIONS_SET=${OPTIONS_WARNINGS_SET}" .endif .if defined(OPTIONS_WARNINGS_UNSET) WARNING+= "OPTIONS_UNSET=${OPTIONS_WARNINGS_UNSET}" .endif WARNING+= "" WARNING+= "If they are local to this port, you should use:" .if defined(OPTIONS_WARNINGS_SET) WARNING+= "${OPTIONS_NAME}_SET=${OPTIONS_WARNINGS_SET}" .endif .if defined(OPTIONS_WARNINGS_UNSET) WARNING+= "${OPTIONS_NAME}_UNSET=${OPTIONS_WARNINGS_UNSET}" .endif .endif ## Finish by using the options set by the port config dialog, if any . for opt in ${OPTIONS_FILE_SET} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor .for opt in ${OPTIONS_FILE_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} .endfor .endif ## FORCE ## Set system-wide defined options (set by user in make.conf) . for opt in ${OPTIONS_SET_FORCE} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor ## Remove the options excluded system-wide (set by user in make.conf) . for opt in ${OPTIONS_UNSET_FORCE} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endfor # XXX To remove once UNIQUENAME will be removed ## Set the options specified per-port (set by user in make.conf) . for opt in ${${UNIQUENAME}_SET_FORCE} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor ## Unset the options excluded per-port (set by user in make.conf) . for opt in ${${UNIQUENAME}_UNSET_FORCE} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endfor # XXX To remove once UNIQUENAME will be removed ## Set the options specified per-port (set by user in make.conf) . for opt in ${${OPTIONS_NAME}_SET_FORCE} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif . endfor ## Unset the options excluded per-port (set by user in make.conf) . for opt in ${${OPTIONS_NAME}_UNSET_FORCE} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endfor ## Cmdline always win over the rest .for opt in ${WITH} . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} . endif .endfor .for opt in ${WITHOUT} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} .endfor # Finally, add options required by slave ports PORT_OPTIONS+= ${OPTIONS_SLAVE} # Sort options and eliminate duplicates PORT_OPTIONS:= ${PORT_OPTIONS:O:u} ## Now some compatibility .if empty(PORT_OPTIONS:MDOCS) NOPORTDOCS= yes .endif .if empty(PORT_OPTIONS:MEXAMPLES) NOPORTEXAMPLES= yes .endif .if ${PORT_OPTIONS:MDEBUG} WITH_DEBUG= yes .endif .if defined(NO_OPTIONS_SORT) ALL_OPTIONS= ${OPTIONS_DEFINE} .endif .for opt in ${COMPLETE_OPTIONS_LIST} ${OPTIONS_SLAVE} ${OPTIONS_EXCLUDE_${ARCH}} ${OPTIONS_EXCLUDE} # PLIST_SUB PLIST_SUB?= SUB_LIST?= . if defined(OPTIONS_SUB) . if ! ${PLIST_SUB:M${opt}=*} . if ${PORT_OPTIONS:M${opt}} PLIST_SUB:= ${PLIST_SUB} ${opt}="" NO_${opt}="@comment " . else PLIST_SUB:= ${PLIST_SUB} ${opt}="@comment " NO_${opt}="" . endif . endif . if ! ${SUB_LIST:M${opt}=*} . if ${PORT_OPTIONS:M${opt}} SUB_LIST:= ${SUB_LIST} ${opt}="" NO_${opt}="@comment " . else SUB_LIST:= ${SUB_LIST} ${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 .endif Index: head/x11-themes/slim-themes/Makefile =================================================================== --- head/x11-themes/slim-themes/Makefile (revision 365572) +++ head/x11-themes/slim-themes/Makefile (revision 365573) @@ -1,117 +1,117 @@ # Created by: Eygene Ryabinkin # $FreeBSD$ PORTNAME= slim-themes PORTVERSION= 1.0.1 CATEGORIES= x11-themes MASTER_SITES= ${MASTER_SITE_BERLIOS:S/$/:old_themes/g} \ http://slim.berlios.de/themes/:new_themes MASTER_SITE_SUBDIR= slim/:old_themes DISTFILES= MAINTAINER= rea@FreeBSD.org COMMENT= Theme pack for SLiM login app # But that's not all, see below. OPTIONS_DEFINE= ALL_THEMES OPTIONS_DEFAULT= ALL_THEMES ALL_THEMES_DESC= Include all themes NO_BUILD= yes NO_WRKSUBDIR= yes SHAREMODE= 644 THEMEDIR_REL= share/slim/themes THEMEDIR= ${PREFIX}/${THEMEDIR_REL} PLIST_SUB+= THEMEDIR=${THEMEDIR_REL} # Format is 'variable name%description%archive name%unpacked dir%dest # dir%master site tag' # I am substituting ' ' -> '+' because make in 6.x isn't able to properly # catch quoted strings with spaces. 7.x and 8.x are fine with this, so # once 6.x will be deorbited, we could switch just to spaces. THEMELIST= GENTOO_SIMPLE%Gentoo+simple+theme%slim-gentoo-simple.tar.bz2%slim-gentoo-simple%gentoo-simple%old_themes \ ARCHLINUX_SIMPLE%ArchLinux+simple+theme%slim-archlinux-simple.tar.gz%slim-archlinux-simple%archlinux-simple%old_themes \ DEBIAN_MOREBLUE%Debian+moreblue+theme%slim-debian-moreblue.tar.bz2%debian-moreblue%debian-moreblue%old_themes \ FINGERPRINT%Fingerprint+theme%slim-fingerprint.tar.gz%fingerprint%fingerprint%old_themes \ FLAT%Flat+theme%slim-flat.tar.gz%flat%flat%old_themes \ LAKE%Lake+theme%slim-lake.tar.gz%lake%lake%old_themes \ RAINBOW%Rainbow+theme%slim-rainbow.tar.gz%rainbow%rainbow%old_themes \ REAR_WINDOW%Rear+Window+theme%slim-rear-window.tar.gz%rear-window%rear-window%old_themes \ SCOTLAND_ROAD%Scotland+Road+theme%slim-scotland-road.tar.gz%scotland-road%scotland-road%old_themes \ SUBWAY%Subway+theme%slim-subway.tar.gz%subway%subway%old_themes \ WAVE%Wave+theme%slim-wave.tar.gz%wave%wave%old_themes \ LUNAR_LINUX%Lunar+Linux+theme%slim-lunar-0.4.tar.bz2%slim-lunar-0.4%lunar%old_themes \ ZENWALK%Zenwalk+theme%slim-zenwalk.tar.gz%Zenwalk%zenwalk%old_themes \ PARALLEL_DIMS%Parallel+Dimensions+theme%slim-parallel-dimensions.tar.gz%parallel-dimensions%parallel-dimensions%old_themes \ CAPERNOITED%Capernoited+theme%slim-capernoited.tar.gz%capernoited%capernoited%old_themes \ MINDLOCK%Mindlock+theme%slim-mindlock.tar.gz%mindlock%mindlock%old_themes \ FLOWER2%Flower2+theme%slim-flower2.tar.gz%flower2%flower2%old_themes \ FREEBSD%FreeBSD+theme%fbsd-slim-theme.tar.bz2%fbsd%fbsd%new_themes \ GNEWSENSE%gNewSense+theme%slim-gnewsense-1.1.tar.bz2%slim-gnewsense-1.1%gnewsense%new_themes # Pollute OPTIONS and DISTFILES. Cool magic ;)) # We're using immediate assignment and two variables, because there is # no addition (+=) operator with immediate assignment. .for t in ${THEMELIST} n= ${t:C/^([^%]*)%.*$/\\1/1} d= ${t:C/^[^%]*%[^%]*%([^%]*)%.*$/\\1/1} desc= ${t:C/^[^%]*%([^%]*)%.*$/\\1/1:C/\+/ /g} sdir= ${t:C/^[^%]*%[^%]*%[^%]*%([^%]*)%.*$/\\1/1} ddir= ${t:C/^[^%]*%[^%]*%[^%]*%[^%]*%([^%]*)%.*$/\\1/1} mtag= ${t:C/^[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%([^%]*)$/\\1/1} .if ${mtag} == "" ${n}_DIST:= ${d} .else ${n}_DIST:= ${d}:${mtag} .endif ${n}_SDIR:= ${sdir} ${n}_DDIR:= ${ddir} OPTIONS_DEFINE:= ${OPTIONS_DEFINE} ${n} A+= ${n} ${n}_DESC:= ${desc} NEWTHEMES:= ${ALLTHEMES} ${n} ALLTHEMES:= ${NEWTHEMES} .endfor # t in ${THEMELIST} .include .for n in ${ALLTHEMES} .if ${PORT_OPTIONS:MALL_THEMES} || ${PORT_OPTIONS:M${n}} .if ! ${PORT_OPTIONS:M${n}} PORT_OPTIONS+= ${n} .endif NEWDISTFILES:= ${DISTFILES} ${${n}_DIST} DISTFILES:= ${NEWDISTFILES} SEEN_THEMES= yes -NEW_PLIST_SUB:= ${PLIST_SUB} ${n}="" -PLIST_SUB:= ${NEW_PLIST_SUB} +NEWPLIST_SUB:= ${PLIST_SUB} ${n}="" +PLIST_SUB:= ${NEWPLIST_SUB} .else -NEW_PLIST_SUB:= ${PLIST_SUB} ${n}="@comment " -PLIST_SUB:= ${NEW_PLIST_SUB} +NEWPLIST_SUB:= ${PLIST_SUB} ${n}="@comment " +PLIST_SUB:= ${NEWPLIST_SUB} .endif # ${PORT_OPTIONS:MALL_THEMES} || ${PORT_OPTIONS:M${n}} .endfor # n in ${THEMELIST} .if !defined(SEEN_THEMES) IGNORE= at least one theme must be selected .endif .if ${PORT_OPTIONS:MPARALLEL_DIMS} EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-parallel-dimensions-slim.theme post-patch: @${RM} ${WRKSRC}/parallel-dimensions/slim.theme.orig .endif # ${PORT_OPTIONS:MPARALLEL_DIMS} # Install selected themes. Another regexp voodoo, yay! \o/ do-install: ${MKDIR} ${STAGEDIR}${THEMEDIR} .for n in ${ALLTHEMES} .if ${PORT_OPTIONS:M${n}} ${MKDIR} ${STAGEDIR}${THEMEDIR}/${${n}_DDIR} cd "${WRKSRC}/${${n}_SDIR}" && \ ${COPYTREE_SHARE} . ${STAGEDIR}${THEMEDIR}/${${n}_DDIR} .endif # ${PORT_OPTIONS:M${n}} .endfor # t in ${THEMELIST} .include