diff --git a/Mk/Uses/7z.mk b/Mk/Uses/7z.mk index fb029b3317d7..f2a7d81639e4 100644 --- a/Mk/Uses/7z.mk +++ b/Mk/Uses/7z.mk @@ -1,57 +1,57 @@ # Extract 7-Zip archives # # Feature: 7z # Usage: USES=7z or USES=7z:ARGS # Valid ARGS: 7-zip, partial # # 7-zip Extract using 7zz(1) instead of bsdtar(1) # partial Extract only files tagged with :7z or in EXTRACT_ONLY_7z # # MAINTAINER: jbeich@FreeBSD.org .if !defined(_INCLUDE_USES_7Z_MK) _INCLUDE_USES_7Z_MK= yes 7-ZIP_CMD?= 7zz 7-ZIP_BEFORE_ARGS?= x -bd -y -o${7-ZIP_WRKDIR} >/dev/null 7-ZIP_AFTER_ARGS?= # empty 7-ZIP_WRKDIR?= ${EXTRACT_WRKDIR} -.if !empty(7z_ARGS:N7-zip:Npartial) +. if !empty(7z_ARGS:N7-zip:Npartial) IGNORE= USES=7z has invalid arguments: ${7z_ARGS:N7-zip:Npartial} -.endif +. endif -.if ${7z_ARGS:M7-zip} +. if ${7z_ARGS:M7-zip} EXTRACT_DEPENDS+= ${7-ZIP_CMD}:archivers/7-zip -.endif +. endif -.if ! ${7z_ARGS:Mpartial} +. if ! ${7z_ARGS:Mpartial} EXTRACT_SUFX?= .7z -.endif +. endif -.if ${7z_ARGS:M7-zip} && ! ${7z_ARGS:Mpartial} +. if ${7z_ARGS:M7-zip} && ! ${7z_ARGS:Mpartial} EXTRACT_CMD?= ${7-ZIP_CMD} EXTRACT_BEFORE_ARGS?= ${7-ZIP_BEFORE_ARGS} EXTRACT_AFTER_ARGS?= ${7-ZIP_AFTER_ARGS} -.endif +. endif -.if ! ${7z_ARGS:M7-zip} && ${7z_ARGS:Mpartial} && defined(EXTRACT_ONLY) +. if ! ${7z_ARGS:M7-zip} && ${7z_ARGS:Mpartial} && defined(EXTRACT_ONLY) EXTRACT_ONLY+= ${EXTRACT_ONLY_7z} -.endif +. endif -.if ${7z_ARGS:M7-zip} && ${7z_ARGS:Mpartial} +. if ${7z_ARGS:M7-zip} && ${7z_ARGS:Mpartial} EXTRACT_ONLY?= ${DISTFILES:N*\:*7z*:C/:.*//} EXTRACT_ONLY_7z?= ${DISTFILES:M*\:*7z*:C/:.*//} _USES_extract+= 520:do-7-zip-extract do-7-zip-extract: @for file in ${EXTRACT_ONLY_7z}; do \ if ! ${7-ZIP_CMD} ${7-ZIP_BEFORE_ARGS} \ ${_DISTDIR}/$$file ${7-ZIP_AFTER_ARGS}; \ then \ exit 1; \ fi; \ done -.endif +. endif .endif diff --git a/Mk/Uses/ada.mk b/Mk/Uses/ada.mk index a0ec072e0205..e695e3c64a2f 100644 --- a/Mk/Uses/ada.mk +++ b/Mk/Uses/ada.mk @@ -1,28 +1,28 @@ # Establish Ada-capable compiler as a build dependency # To change default compiler, define ADA_DEFAULT in make.conf # # Feature: ada # Usage: USES=ada # Valid ARGS: run # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ADA_MK) _INCLUDE_USES_ADA_MK= yes DEPRECATED= Depends on expired lang/gcc6-aux EXPIRATION_DATE=2022-06-30 CC= ada -. if ${ada_ARGS:Mrun} +. if ${ada_ARGS:Mrun} RUN_DEPENDS+= ${LOCALBASE}/gcc6-aux/bin/ada:lang/gcc6-aux -. endif +. endif BUILD_DEPENDS+= ${LOCALBASE}/gcc6-aux/bin/ada:lang/gcc6-aux MAKE_ENV+= PATH=${LOCALBASE}/gcc6-aux/bin:${PATH} \ ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat CONFIGURE_ENV+= PATH=${LOCALBASE}/gcc6-aux/bin:${PATH} \ ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat .endif diff --git a/Mk/Uses/alias.mk b/Mk/Uses/alias.mk index 524d1d9f9214..5eee3a957158 100644 --- a/Mk/Uses/alias.mk +++ b/Mk/Uses/alias.mk @@ -1,28 +1,28 @@ # Add __FreeBSD__ definition to CFLAGS # Used by DPorts when masquerading as FreeBSD allows port to build without # additional patches # # Feature: alias # Usage: USES=alias or USES=alias:ARGS # Valid ARGS: 9 (default), 10, 11 # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ALIAS_MK) _INCLUDE_USES_ALIAS_MK= yes -.if ${OPSYS} != FreeBSD +. if ${OPSYS} != FreeBSD -.if empty(alias_ARGS) +. if empty(alias_ARGS) CFLAGS+= -D__FreeBSD__=9 -.else -. if ${alias_ARGS} == 9 || ${alias_ARGS} == 10 || ${alias_ARGS} == 11 +. else +. if ${alias_ARGS} == 9 || ${alias_ARGS} == 10 || ${alias_ARGS} == 11 CFLAGS+= -D__FreeBSD__=${alias_ARGS} -. else +. else IGNORE= invalid MAJOR RELEASE argument (${alias_ARGS}) for USES=alias -. endif -.endif +. endif +. endif -.endif # OPSYS != FreeBSD +. endif # OPSYS != FreeBSD .endif diff --git a/Mk/Uses/angr.mk b/Mk/Uses/angr.mk index 7d2489854e6c..a1e41b042dae 100644 --- a/Mk/Uses/angr.mk +++ b/Mk/Uses/angr.mk @@ -1,65 +1,65 @@ # Shared namespace for angr-related ports. # # Feature: angr # Usage: USES=angr[:ARGS] # Valid ARGS: binaries, nose # # binaries The port requires the special angr binaries to be present for # testing. # nose The port is using nosetests for the test target. # # Variables, which can be set by the port: # # ANGR_VERSION - The version of the angr project programs. # ANGR_BINARIES_TAGNAME - The tagname of the angr binaries. # ANGR_NOSETESTS - The path to the nosetests program. # # Other information: # - USES=angr:nose implies USES=python:test unless USES=python has already # been specified yet. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ANGR_MK) _INCLUDE_USES_ANGR_MK= yes # Arguments validation. _valid_ARGS= binaries nose -.for _arg in ${angr_ARGS} -. if !${_valid_ARGS:M${_arg}} +. for _arg in ${angr_ARGS} +. if !${_valid_ARGS:M${_arg}} IGNORE= USES=angr: invalid argument: ${_arg} -. endif -.endfor +. endif +. endfor # Set the default angr version for all angr-related ports. ANGR_VERSION?= 9.0.5405 ANGR_BINARIES_TAGNAME?= v${ANGR_VERSION} -.if "${angr_ARGS:Mbinaries}" != "" +. if "${angr_ARGS:Mbinaries}" != "" USE_GITHUB?= yes GH_TUPLE+= angr:binaries:${ANGR_BINARIES_TAGNAME}:binaries # Provide the binaries directory where it is expected by the test scripts. pre-test: angr-provide-test-binaries angr-provide-test-binaries: @${LN} -Fs ${WRKSRC_binaries} ${WRKDIR}/binaries -.endif # "${angr_ARGS:Mbinaries}" != "" +. endif # "${angr_ARGS:Mbinaries}" != "" -.if "${angr_ARGS:Mnose}" != "" +. if "${angr_ARGS:Mnose}" != "" # Ensure that python.mk variables are available. -. if !${USES:Mpython*} +. if !${USES:Mpython*} python_ARGS= test _USES_POST+= python:test .include "${USESDIR}/python.mk" -. endif # !${USES:Mpython*} +. endif # !${USES:Mpython*} TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose@${PY_FLAVOR} TEST_WRKSRC?= ${WRKSRC}/tests ANGR_NOSETESTS?= nosetests-${PYTHON_VER} do-test: @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${ANGR_NOSETESTS}) -.endif # "${angr_ARGS:Mnose}" != "" +. endif # "${angr_ARGS:Mnose}" != "" .endif diff --git a/Mk/Uses/ansible.mk b/Mk/Uses/ansible.mk index d46be3f98eed..6e0e2e9ba501 100644 --- a/Mk/Uses/ansible.mk +++ b/Mk/Uses/ansible.mk @@ -1,80 +1,80 @@ # Shared namespace for Ansible-related ports. # # Feature: ansible # Usage: USES=ansible:ARGS # Valid ARGS: env, module, plugin # # env The port does not depend on Ansible but needs some Ansible # variables set. # module The port is an Ansible module. (*) # plugin The port is an Ansible plugin. (*) # # (*) See Ansible documentation to learn about the difference # between a module and a plugin: # https://docs.ansible.com/ansible/latest/dev_guide/developing_locally.html # # Variables for ports: # # ANSIBLE_CMD - Path to the ansible program. # ANSIBLE_DOC_CMD - Path to the ansible-doc program. # ANSIBLE_RUN_DEPENDS - RUN_DEPENDS with the Ansible port. # # ANSIBLE_DATADIR - Path to the root of the directory structure where all # Ansible's modules and plugins are stored. # ANSIBLE_ETCDIR - Path to the Ansible etc directory. # ANSIBLE_PLUGINS_PREFIX # - Path to the "plugins" directory # within ${ANSIBLE_DATADIR}. # ANSIBLE_MODULESDIR - Path to the directory for local Ansible modules. # ANSIBLE_PLUGINSDIR - Path to the directory for local Ansible plugins. # ANSIBLE_PLUGIN_TYPE - Ansible plugin type (e.g., "connection", "inventory", # or "vars"). # # Other information: # - USES=ansible implies USES=python:env automatically if no USES=python has # been specified yet. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ANSIBLE_MK) _INCLUDE_USES_ANSIBLE_MK= yes _valid_ARGS= env module plugin -.for _arg in ${ansible_ARGS} -. if !${_valid_ARGS:M${_arg}} +. for _arg in ${ansible_ARGS} +. if !${_valid_ARGS:M${_arg}} IGNORE= USES=ansible: invalid argument: ${_arg} -. endif -.endfor -.if ${ansible_ARGS:[#]} != 1 +. endif +. endfor +. if ${ansible_ARGS:[#]} != 1 IGNORE= USES=ansible: too many arguments: ${ansible_ARGS} -.endif -.if empty(ansible_ARGS) +. endif +. if empty(ansible_ARGS) IGNORE= USES=ansible: no arguments specified -.endif +. endif -.if !${USES:Mpython*} +. if !${USES:Mpython*} python_ARGS= env _USES_POST+= python:env .include "${USESDIR}/python.mk" -.endif +. endif ANSIBLE_CMD?= ${LOCALBASE}/bin/ansible ANSIBLE_DOC_CMD?= ${LOCALBASE}/bin/ansible-doc ANSIBLE_RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}ansible>0:sysutils/ansible@${PY_FLAVOR} ANSIBLE_DATADIR?= ${PREFIX}/share/${PYTHON_PKGNAMEPREFIX}ansible ANSIBLE_ETCDIR?= ${PREFIX}/etc/ansible ANSIBLE_PLUGINS_PREFIX?= ${ANSIBLE_DATADIR}/plugins -.if ${ansible_ARGS} == "module" +. if ${ansible_ARGS} == "module" ANSIBLE_MODULESDIR?= ${ANSIBLE_PLUGINS_PREFIX}/modules -.elif ${ansible_ARGS} == "plugin" -. if empty(ANSIBLE_PLUGIN_TYPE) +. elif ${ansible_ARGS} == "plugin" +. if empty(ANSIBLE_PLUGIN_TYPE) IGNORE= ANSIBLE_PLUGIN_TYPE must be set -. endif +. endif ANSIBLE_PLUGINSDIR?= ${ANSIBLE_PLUGINS_PREFIX}/${ANSIBLE_PLUGIN_TYPE} -.endif +. endif -.if ${ansible_ARGS} == "module" || ${ansible_ARGS} == "plugin" +. if ${ansible_ARGS} == "module" || ${ansible_ARGS} == "plugin" RUN_DEPENDS+= ${ANSIBLE_RUN_DEPENDS} -.endif +. endif .endif diff --git a/Mk/Uses/apache.mk b/Mk/Uses/apache.mk index 244001c4d5ed..c711648af941 100644 --- a/Mk/Uses/apache.mk +++ b/Mk/Uses/apache.mk @@ -1,435 +1,435 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # apache.mk - Apache related macros. # Author: Clement Laforet # Author: Olli Hauer # Author: Bernard Spil # # Please view me with 4 column tabs! # Feature: apache # Usage: USES=apache or USES=apache:args # Valid args: , build, run, server # # version If your port requires a specific Apache httpd version, you can # set this to [min]-[max] or min+ or -max or an explicit version # # USES=apache:2.2 # Only use Apache 2.2 # USES=apache:2.4+ # Use Apache 2.4 or newer # USES=apache:2.2-2.4 # Use Apache 2.2 or 2.4 # USES=apache:-2.4 # Use Apache 2.4 or earlier # USES=apache # Use the default apache version # # Valid version numbers are specified in the variable # APACHE_SUPPORTED_VERSIONS below # # build Indicates that Apache is needed at build time and adds it to # BUILD_DEPENDS. # run Indicates that Apache is needed at run time and adds it to # RUN_DEPENDS. # server Indicates that the port is a server port. # # If build and run are omitted, Apache will be added as BUILD_DEPENDS and # RUN_DEPENDS # # Variables, which can be set by the port: # # 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 Name of the Apache module # default: ${PORTNAME} # SHORTMODNAME Short name of the Apache module # default: ${MODULENAME:S/mod_//} # SRC_FILE Source file of the APACHE MODULE # default: ${MODULENAME}.c # # Variables, for internal use by the Apache ports framework only # The following values for USE_APACHE are reserved and only valid # in apache-server ports! # USES= apache:server,2.2 # # # The following variables can be read by ports and must not be modified # # APACHE_VERSION The major-minor release version of the chosen # Apache server, e.g. 2.2 or 2.4 # # APACHEETCDIR Location of the Apache configuration directory # Default: ${LOCALBASE}/etc/apache24 # # APACHEINCLUDEDIR Location of the Apache include files # Default: ${LOCALBASE}/include/apache24 # # APACHEMODDIR Location of the Apache modules # Default: ${LOCALBASE}/libxexec/apache24 # # APACHE_DEFAULT Default Apache version # .if !defined(_INCLUDE_USES_APACHE_PRE_MK) _INCLUDE_USES_APACHE_PRE_MK= yes _USES_POST+= apache # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _APACHE_SUPPORTED_VERSIONS= 2.4 2.2 2.5 # preferred version first # Print warnings _ERROR_MSG= : Error from apache.mk. # Important Note: # The "+" sign is only valid as last sign, not between # two versions or in combination with range! -.if defined(apache_ARGS) && !empty(apache_ARGS) +. if defined(apache_ARGS) && !empty(apache_ARGS) # Preserve original arguments list _APACHE_ARGS= ${apache_ARGS} -. if ${_APACHE_ARGS:Mserver} || ${_APACHE_ARGS:Mcommon} +. if ${_APACHE_ARGS:Mserver} || ${_APACHE_ARGS:Mcommon} _APACHE_PORT_IS_SERVER= yes _APACHE_ARGS:= ${_APACHE_ARGS:Nserver} -. endif -. if ${_APACHE_ARGS:Mbuild} +. endif +. if ${_APACHE_ARGS:Mbuild} _APACHE_BUILD_DEP= yes _APACHE_ARGS:= ${_APACHE_ARGS:Nbuild} -. endif -. if ${_APACHE_ARGS:Mrun} +. endif +. if ${_APACHE_ARGS:Mrun} _APACHE_RUN_DEP= yes _APACHE_ARGS:= ${_APACHE_ARGS:Nrun} -. endif -. if empty(_APACHE_ARGS) +. endif +. if empty(_APACHE_ARGS) _APACHE_ARGS= ${APACHE_DEFAULT} -. endif +. endif # _APACHE_ARGS must now contain a version(-range) -. if !empty(_APACHE_ARGS:C/^2\.[0-9]//:S/^-//:C/^2\.[0-9]//:C/\+$//) +. if !empty(_APACHE_ARGS:C/^2\.[0-9]//:S/^-//:C/^2\.[0-9]//:C/\+$//) IGNORE= ${_ERROR_MSG} Illegal use of USES= ${USES:Mapache*} # Catch USES= apache:[min]-[max]+ -. elif ${apache_ARGS:C/[.a-z0-9]//g} == "-+" +. elif ${apache_ARGS:C/[.a-z0-9]//g} == "-+" IGNORE= ${_ERROR_MSG} Illegal use of USES= ${USES:Mapache*} -. endif -.endif # defined(apache_ARGS) +. endif +. endif # defined(apache_ARGS) # The port does not specify a build, run or server dependency, assume both # build and run are required. -.if !defined(_APACHE_BUILD_DEP) && !defined(_APACHE_RUN_DEP) && \ +. if !defined(_APACHE_BUILD_DEP) && !defined(_APACHE_RUN_DEP) && \ !defined(_APACHE_PORT_IS_SERVER) _APACHE_BUILD_DEP= yes _APACHE_RUN_DEP= yes -.endif +. endif -.if defined(DEFAULT_APACHE_VER) +. if defined(DEFAULT_APACHE_VER) IGNORE+= "DEFAULT_APACHE_VER is defined, consider using DEFAULT_VERSIONS+=apache=${DEFAULT_APACHE_VER} instead" -.endif +. endif -.if defined(WITH_MODULES) || defined(WITHOUT_MODULES) +. if defined(WITH_MODULES) || defined(WITHOUT_MODULES) IGNORE= ${_ERROR_MSG} WITH(OUT)_MODULES has been removed, use www_${PORTNAME}_(UN)SET -.endif +. endif # =============================================================== -.if defined(_APACHE_PORT_IS_SERVER) +. if defined(_APACHE_PORT_IS_SERVER) # Module selection -.for category in ${DEFAULT_MODULES_CATEGORIES} +. for category in ${DEFAULT_MODULES_CATEGORIES} DEFAULT_MODULES+= ${${category}_MODULES} -.endfor +. endfor -.for category in ${ALL_MODULES_CATEGORIES} +. for category in ${ALL_MODULES_CATEGORIES} AVAILABLE_MODULES+= ${${category}_MODULES} -.endfor +. endfor # OPTIONS handling -.for module in ${AVAILABLE_MODULES} -. if ${PORT_OPTIONS:M${module}} +. for module in ${AVAILABLE_MODULES} +. if ${PORT_OPTIONS:M${module}} _APACHE_ENABLED_MODS+= ${module} -. else +. else _APACHE_DISABLED_MODS+= ${module} -. endif -.endfor +. endif +. endfor -.if !defined(WITH_STATIC_APACHE) +. if !defined(WITH_STATIC_APACHE) CONFIGURE_ARGS+= --enable-so -.else +. else CONFIGURE_ARGS+= --disable-so WITH_ALL_STATIC_MODULES= yes -.endif +. endif -.if ${PORT_OPTIONS:MSUEXEC} +. if ${PORT_OPTIONS:MSUEXEC} _APACHE_ENABLED_MODS+= ${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} +. if ${LOCALBASE} == ${PREFIX} SUEXEC_SAFEPATH?= ${LOCALBASE}/bin:/usr/bin:/bin -.else +. else SUEXEC_SAFEPATH?= ${PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:/bin -.endif +. 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}-bin="${PREFIX}/sbin/suexec" -. if defined(WITH_SUEXEC_UMASK) +. if defined(WITH_SUEXEC_UMASK) CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK} -. endif +. endif -. if !${PORT_OPTIONS:MSUEXEC_SYSLOG} +. if !${PORT_OPTIONS:MSUEXEC_SYSLOG} CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-logfile="${SUEXEC_LOGFILE}" -. endif +. endif -.endif +. endif -.if !defined(_APACHE_DISABLED_MODS) +. if !defined(_APACHE_DISABLED_MODS) APACHE_MODULES= ${_APACHE_ENABLED_MODS} -.else -.for module in ${_APACHE_ENABLED_MODS:O:u} -. if !${_APACHE_DISABLED_MODS:M${module}} +. else +. for module in ${_APACHE_ENABLED_MODS:O:u} +. if !${_APACHE_DISABLED_MODS:M${module}} APACHE_MODULES+= ${module} -. endif -.endfor -.endif +. endif +. endfor +. endif -.if defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) +. if defined(WITH_STATIC_APACHE) || defined(WITH_ALL_STATIC_MODULES) WITH_STATIC_MODULES= ${APACHE_MODULES} -.endif +. endif -.for module in ${AVAILABLE_MODULES} -. if !empty(WITH_STATIC_MODULES:M${module}) +. for module in ${AVAILABLE_MODULES} +. if !empty(WITH_STATIC_MODULES:M${module}) CONFIGURE_ARGS+= --enable-${module:tl}=static PLIST_SUB+= MOD_${module}="@comment " -. elif !empty(APACHE_MODULES:M${module}) +. elif !empty(APACHE_MODULES:M${module}) CONFIGURE_ARGS+= --enable-${module:tl}=shared PLIST_SUB+= MOD_${module}="" -. else +. else CONFIGURE_ARGS+= --disable-${module:tl} PLIST_SUB+= MOD_${module}="@comment " -. endif -.endfor +. endif +. endfor # pkg-plist workaround STATIC support -.if ${PORT_OPTIONS:MSUEXEC} +. if ${PORT_OPTIONS:MSUEXEC} PLIST_SUB+= SUEXEC="" -.else +. else PLIST_SUB+= SUEXEC="@comment " -.endif +. endif -.if ${PORT_OPTIONS:MLOG_FORENSIC} +. if ${PORT_OPTIONS:MLOG_FORENSIC} PLIST_SUB+= FORENSIC="" -.else +. else PLIST_SUB+= FORENSIC="@comment " -.endif +. endif #### End of _APACHE_PORT_IS_SERVER #### # =============================================================== -.else +. else HTTPD?= ${LOCALBASE}/sbin/httpd MODULENAME?= ${PORTNAME} SHORTMODNAME?= ${MODULENAME:S/mod_//} SRC_FILE?= ${MODULENAME}.c -.if exists(${HTTPD}) +. if exists(${HTTPD}) _APACHE_VERSION!= ${HTTPD} -v | ${SED} -ne 's/^Server version: Apache\/\([1-9]\.[0-9]*\).*/\1/p' -.endif +. endif # Validate Apache version whether it meets the version restriction. _APACHE_VERSION_CHECK:= ${_APACHE_ARGS:C/^([1-9]\.[0-9])$/\1-\1/} _APACHE_VERSION_MIN_TMP:= ${_APACHE_VERSION_CHECK:C/([1-9]\.[0-9])[-+].*/\1/} _APACHE_VERSION_MIN:= ${_APACHE_VERSION_MIN_TMP:M[1-9].[0-9]} _APACHE_VERSION_MAX_TMP:= ${_APACHE_VERSION_CHECK:C/.*-([1-9]\.[0-9])/\1/} _APACHE_VERSION_MAX:= ${_APACHE_VERSION_MAX_TMP:M[1-9].[0-9]} # Remove from _WANTED_VERSIONS that which is not wanted _APACHE_WANTED_VERSIONS= ${_APACHE_SUPPORTED_VERSIONS} -.for _ver in ${_APACHE_SUPPORTED_VERSIONS:O} -. if !empty(_APACHE_VERSION_MIN) && ${_ver} < ${_APACHE_VERSION_MIN} +. for _ver in ${_APACHE_SUPPORTED_VERSIONS:O} +. if !empty(_APACHE_VERSION_MIN) && ${_ver} < ${_APACHE_VERSION_MIN} _APACHE_WANTED_VERSIONS:= ${_APACHE_WANTED_VERSIONS:N${_ver}} -. endif -. if !empty(_APACHE_VERSION_MAX) && ${_ver} > ${_APACHE_VERSION_MAX} +. endif +. if !empty(_APACHE_VERSION_MAX) && ${_ver} > ${_APACHE_VERSION_MAX} _APACHE_WANTED_VERSIONS:= ${_APACHE_WANTED_VERSIONS:N${_ver}} -. endif -.endfor +. endif +. endfor # Check if installed Apache version matches a wanted version -.if defined(_APACHE_VERSION) && $(_APACHE_WANTED_VERSIONS:M${_APACHE_VERSION}) +. if defined(_APACHE_VERSION) && $(_APACHE_WANTED_VERSIONS:M${_APACHE_VERSION}) _APACHE_WANTED_VERSION= ${_APACHE_VERSION} -.endif +. endif # Select Apache version if not already set -.for _ver in ${APACHE_DEFAULT} ${_APACHE_SUPPORTED_VERSIONS} -. if !defined(_APACHE_WANTED_VERSION) && ${_APACHE_WANTED_VERSIONS:M${_ver}} +. for _ver in ${APACHE_DEFAULT} ${_APACHE_SUPPORTED_VERSIONS} +. if !defined(_APACHE_WANTED_VERSION) && ${_APACHE_WANTED_VERSIONS:M${_ver}} _APACHE_WANTED_VERSION= ${_ver} -. endif -.endfor +. endif +. endfor APACHE_VERSION:= ${_APACHE_WANTED_VERSION} -.if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${APACHE_VERSION} +. if defined(_APACHE_VERSION) && ${_APACHE_VERSION} != ${APACHE_VERSION} BROKEN= ${_ERROR_MSG} Apache ${_APACHE_VERSION} is installed and port requires ${_APACHE_WANTED_VERSION} -.endif +. endif -.if ${APACHE_VERSION} >= 2.5 +. if ${APACHE_VERSION} >= 2.5 APXS?= ${LOCALBASE}/bin/apxs -.else +. else APXS?= ${LOCALBASE}/sbin/apxs -.endif +. endif -.if exists(${APXS}) +. if exists(${APXS}) APXS_PREFIX!= ${APXS} -q prefix 2> /dev/null || echo NULL -. if ${APXS_PREFIX} == NULL +. if ${APXS_PREFIX} == NULL IGNORE= : Your apache does not support DSO modules -. endif -. if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX} +. endif +. if defined(AP_GENPLIST) && ${APXS_PREFIX} != ${PREFIX} IGNORE?= PREFIX must be equal to APXS_PREFIX. -. endif -.endif +. endif +. endif APACHEMODDIR= libexec/apache${APACHE_VERSION:S/.//} APACHEINCLUDEDIR= include/apache${APACHE_VERSION:S/.//} APACHEETCDIR= etc/apache${APACHE_VERSION:S/.//} -.if ${APACHE_VERSION} == 2.5 +. if ${APACHE_VERSION} == 2.5 _APACHE_PORT?= www/apache${APACHE_VERSION:S/.//}-devel -.else +. else _APACHE_PORT?= www/apache${APACHE_VERSION:S/.//} -.endif +. endif 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:S/.//}- -.if defined(AP_FAST_BUILD) +. if defined(AP_FAST_BUILD) PKGNAMEPREFIX?= ${APACHE_PKGNAMEPREFIX} -.endif +. endif -.if defined(_APACHE_BUILD_DEP) +. if defined(_APACHE_BUILD_DEP) BUILD_DEPENDS+= ${APXS}:${_APACHE_PORT} -.endif +. endif -.if defined(_APACHE_RUN_DEP) +. if defined(_APACHE_RUN_DEP) RUN_DEPENDS+= ${APXS}:${_APACHE_PORT} -.endif +. endif PLIST_SUB+= AP_NAME="${SHORTMODNAME}" PLIST_SUB+= AP_MODULE="${MODULENAME}.so" -.if defined(AP_GENPLIST) +. if defined(AP_GENPLIST) PLIST?= ${WRKDIR}/ap-plist -.endif +. endif -.if defined(AP_INC) +. if defined(AP_INC) AP_EXTRAS+= -I ${AP_INC} -.endif -.if defined(AP_LIB) +. endif +. if defined(AP_LIB) AP_EXTRAS+= -L ${AP_LIB} -.endif +. endif -.endif # End of _APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MOULE +. endif # End of _APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MOULE .endif # End of !_INCLUDE_USES_APACHE_PRE_MK # =============================================================== .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_APACHE_POST_MK) _INCLUDE_USES_APACHE_POST_MK= apache.mk -.if defined(NO_BUILD) && !defined(_APACHE_RUN_DEP) +. if defined(NO_BUILD) && !defined(_APACHE_RUN_DEP) BROKEN= If NO_BUILD is used, then apache:run is sufficient. Please fix your Makefile -.endif +. endif -.if defined(_APACHE_PORT_IS_SERVER) -.if !target(print-closest-mirrors) +. if defined(_APACHE_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 +. endif -.if !target(show-modules) +. if !target(show-modules) show-modules: -.if !empty(APACHE_MODULES) -.for module in ${AVAILABLE_MODULES} +. if !empty(APACHE_MODULES) +. for module in ${AVAILABLE_MODULES} @${PRINTF} "%-20s : " ${module} -. if ${APACHE_MODULES:M${module}} +. if ${APACHE_MODULES:M${module}} @${ECHO_CMD} -n "enabled " -. if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}} +. if !empty(WITH_STATIC_MODULES) && ${WITH_STATIC_MODULES:M${module}} @${ECHO_CMD} " (static)" -. else +. else @${ECHO_CMD} "(shared)" -. endif -. else +. endif +. else @${ECHO_CMD} disabled -. endif -.endfor -.else -.for module in ${AVAILABLE_MODULES} +. endif +. endfor +. else +. for module in ${AVAILABLE_MODULES} @${PRINTF} "%-20s : disabled\n" ${module} -.endfor -.endif -.endif +. endfor +. endif +. endif -.else +. else -.if defined(AP_MODENABLE) +. if defined(AP_MODENABLE) AP_MOD_EN= -a -.else +. else AP_MOD_EN= -A -.endif +. endif PLIST_SUB+= AP_MOD_EN="${AP_MOD_EN}" -.if defined(AP_FAST_BUILD) -.if !target(ap-gen-plist) +. if defined(AP_FAST_BUILD) +. if !target(ap-gen-plist) _USES_build+= 490:ap-gen-plist ap-gen-plist: -.if defined(AP_GENPLIST) -. if !exists(${PLIST}) +. if defined(AP_GENPLIST) +. if !exists(${PLIST}) @${ECHO_MSG} "===> Generating apache plist" @${ECHO_CMD} "%%APACHEMODDIR%%/%%AP_MODULE%%" >> ${PLIST} @${ECHO_CMD} "@postexec %D/sbin/apxs -e ${AP_MOD_EN} -n %%AP_NAME%% %D/%F" >> ${PLIST} @${ECHO_CMD} "@postunexec ${SED} -i '' -E '/LoadModule[[:blank:]]+%%AP_NAME%%_module/d' %D/%%APACHEETCDIR%%/httpd.conf" >> ${PLIST} @${ECHO_CMD} "@postunexec echo \"Don't forget to remove all ${MODULENAME}-related directives in your httpd.conf\"" >> ${PLIST} -. endif -.endif -.endif +. endif +. endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: (cd ${WRKSRC} && ${APXS} -c ${AP_EXTRAS} -o ${MODULENAME}.la ${SRC_FILE}) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEMODDIR} ${APXS} -S LIBEXECDIR=${STAGEDIR}${PREFIX}/${APACHEMODDIR} -i -n ${SHORTMODNAME} ${WRKSRC}/${MODULENAME}.la -. if !defined(DEBUG) +. if !defined(DEBUG) @${ECHO_MSG} "===> strip ${APACHEMODDIR}/${MODULENAME}.so" @[ -e ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so ] && ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${APACHEMODDIR}/${MODULENAME}.so -. else +. else @${ECHO_MSG} "===> DEBUG is set, will not strip ${APACHEMODDIR}/${MODULENAME}.so" -. endif -.endif +. endif +. endif -.endif # defined(AP_FAST_BUILD) -.endif # defined(_APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MODULE) +. endif # defined(AP_FAST_BUILD) +. endif # defined(_APACHE_PORT_IS_SERVER / _APACHE_PORT_IS_MODULE) .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_APACHE_PRE_MK) diff --git a/Mk/Uses/autoreconf.mk b/Mk/Uses/autoreconf.mk index ac50a82f2af3..8353e5a01818 100644 --- a/Mk/Uses/autoreconf.mk +++ b/Mk/Uses/autoreconf.mk @@ -1,91 +1,91 @@ # Run autoreconf in AUTORECONF_WRKSRC to update configure, Makefile.in and # other build scripts. # # Autoreconf runs the following commands provided by devel/autoconf and # devel/automake. Each command applies to a single configure.ac or # configure.in (old name). If configure.ac defines subdirectories with their # own configure.ac (using AC_CONFIG_SUBDIRS), autoreconf will recursively # update those as well. # # aclocal Looks up definitions of m4 macros used in configure.ac that are # not provided by autoconf and copies them from their source *.m4 # file to aclocal.m4. Local *.m4 files included with the source # code take precedence over systemwide *.m4 files. # autoconf Generates configure from configure.ac using macro definitions # provided by autoconf itself and aclocal.m4. # autoheader Generates a configuration header (typically config.h.in) from # configure.ac and the macro definitions in aclocal.m4. Run by # autoreconf if configure.ac (or one of the macros it uses) # contains AC_CONFIG_HEADERS, AC_CONFIG_HEADER (undocumented), or # AM_CONFIG_HEADER (obsolete). # automake Generates Makefile.in from Makefile.am for each Makefile # listed in configure.ac (using AC_CONFIG_FILES). Also updates # build scripts like compile, depcomp, install-sh, ylwrap,... # Run by autoreconf if configure.ac (or one of the macros it # uses) contains AM_INIT_AUTOMAKE. # # Autoreconf may also run these additional commands provided by other ports. # A port needs to have a build depdendency on these ports when that's the case. # # autopoint Provided by devel/gettext-tools. Updates gettext related *.m4 # files included with the source code and build scripts such as # config.rpath. Run by autoreconf if configure.ac (or one of the # macros it uses) contains AM_GNU_GETTEXT. A build dependency on # devel/gettext-tools can be added with USES+=gettext-tools. # Note that autoreconf runs autopoint even if a port has an NLS # option and the option is disabled. The build dependency on # gettext-tools is not optional. If the run dependency on # gettext is optional this can be specified with # NLS_USES=gettext-runtime. # libtoolize Provided by devel/libtool. Updates libtool related *.m4 files # included with the source code and build scripts such as # ltmain.sh. Run by autoreconf if configure.ac (or one of the # macros it uses) contains AC_PROG_LIBTOOL or LT_INIT. A build # dependency on devel/libtool is added implicitly when USES # contains both autoreconf and libtool. # # Feature: autoreconf # Usage: USES=autoreconf or USES=autoreconf:args # Valid args: build Don't run autoreconf, only add build dependencies # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_AUTORECONF_MK) _INCLUDE_USES_AUTORECONF_MK= yes _USES_POST+= autoreconf AUTORECONF?= ${LOCALBASE}/bin/autoreconf AUTORECONF_WRKSRC?= ${WRKSRC} .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_AUTORECONF_POST_MK) _INCLUDE_USES_AUTORECONF_POST_MK= yes BUILD_DEPENDS+= autoconf>=2.69:devel/autoconf \ automake>=1.16.1:devel/automake -.if defined(libtool_ARGS) && empty(libtool_ARGS:Mbuild) +. if defined(libtool_ARGS) && empty(libtool_ARGS:Mbuild) BUILD_DEPENDS+= libtoolize:devel/libtool -.endif +. endif -.if empty(autoreconf_ARGS) +. if empty(autoreconf_ARGS) _USES_configure+= 470:do-autoreconf do-autoreconf: -.for f in AUTHORS ChangeLog INSTALL NEWS README +. for f in AUTHORS ChangeLog INSTALL NEWS README # Don't modify time stamps if the files already exist @test -e ${AUTORECONF_WRKSRC}/${f} || ${TOUCH} ${AUTORECONF_WRKSRC}/${f} -.endfor -.if defined(_USE_GNOME) && ${_USE_GNOME:Mintltool} +. endfor +. if defined(_USE_GNOME) && ${_USE_GNOME:Mintltool} @(cd ${AUTORECONF_WRKSRC} && \ if test -f configure.ac; then configure=configure.ac; \ else configure=configure.in; fi && \ if ${EGREP} -q '^(AC|IT)_PROG_INTLTOOL' $${configure}; \ then ${LOCALBASE}/bin/intltoolize -f -c; fi) -.endif +. endif @(cd ${AUTORECONF_WRKSRC} && ${AUTORECONF} -f -i) -.elif ! ${autoreconf_ARGS:Mbuild} +. elif ! ${autoreconf_ARGS:Mbuild} IGNORE= Incorrect 'USES+=autoreconf:${autoreconf_ARGS}' expecting 'USES+=autoreconf[:build]' -.endif +. endif .endif diff --git a/Mk/Uses/bdb.mk b/Mk/Uses/bdb.mk index c80db16b58a2..645b9e9a7b0e 100644 --- a/Mk/Uses/bdb.mk +++ b/Mk/Uses/bdb.mk @@ -1,240 +1,240 @@ # Provide support for Berkeley DB # Feature: bdb # Usage: USES= bdb[:version] # # If no version is given (by the maintainer via the port or # by the user via defined variable), try to find the # currently installed version. Fall back to default if # necessary (db5 if compatible). # This adds a "debug-bdb" make target which will dump the # related data. # INVALID_BDB_VER # - This variable can be defined when the port does not # support one or more versions of Berkeley DB. # _WITH_BDB_VER # - User defined port specific variable to set Berkeley DB # version. # WITH_BDB_HIGHEST # - Use the highest installed version of Berkeley DB. # WITH_BDB6_PERMITTED # - If defined, BerkeleyDB 6 is added to the # default version set, making it eligible even # if not already installed. This is due to its # stricter Affero GNU Public License. # # These variables will then be filled in by this .mk file: # # BDB_LIB_NAME # - This variable is automatically set to the name of the # Berkeley DB library (default: db41). # BDB_LIB_CXX_NAME # - This variable is automatically set to the name of the # Berkeley DB C++ library (default: db41_cxx). # BDB_INCLUDE_DIR # - This variable is automatically set to the location of # the Berkeley DB include directory (default: # ${LOCALBASE}/include/db41). # BDB_LIB_DIR # - This variable is automatically set to the location of # the Berkeley DB library directory. # BDB_VER # - Detected Berkeley DB version. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_BDB_MK) _INCLUDE_USES_BDB_MK= yes -.if !empty(bdb_ARGS) +. if !empty(bdb_ARGS) _bdb_ARGS:= ${bdb_ARGS} -.endif +. endif _bdb_ARGS?= yes # TODO: avoid malformed conditional with invalid _bdb_ARGS/BDB_DEFAULT # check if + works properly from test builds 01h12m23s BDB_UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME} _BDB_DEFAULT_save:=${BDB_DEFAULT} _DB_PORTS= 5 18 _DB_DEFAULTS= 5 # # Since 2020-12-02, this name is not fitting too much but # retained for now for compatibility. The name of this variable # is subject to change especially once db6 were removed. -. if defined(WITH_BDB6_PERMITTED) +. if defined(WITH_BDB6_PERMITTED) _DB_DEFAULTS+= 18 -. endif +. endif # Dependency lines for different db versions db5_DEPENDS= libdb-5.3.so:databases/db5 db18_DEPENDS= libdb-18.1.so:databases/db18 # Detect db versions by finding some files db5_FIND= ${LOCALBASE}/include/db5/db.h db18_FIND= ${LOCALBASE}/include/db18/db.h # Override the global BDB_DEFAULT with the # port specific _WITH_BDB_VER -.if defined(${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER) +. if defined(${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER) BDB_DEFAULT= ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER} -.endif +. endif # Override _bdb_ARGS with global BDB_DEFAULT if the maintainer did not # ask for a more specific version. -. if ${_bdb_ARGS} == yes -. if ${BDB_DEFAULT} != 1 +. if ${_bdb_ARGS} == yes +. if ${BDB_DEFAULT} != 1 _bdb_ARGS= ${BDB_DEFAULT} -. else +. else _bdb_ARGS:= 5+ +. endif . endif -. endif # Compatiblity hack: # upgrade older plussed versions to 5+ _BDB_OLDPLUSVERS=4+ 40+ 41+ 42+ 43+ 44+ 45+ 46+ 47+ 48+ -.for i in ${_bdb_ARGS} -. if ${_BDB_OLDPLUSVERS:M${i}} +. for i in ${_bdb_ARGS} +. if ${_BDB_OLDPLUSVERS:M${i}} _bdb_ARGS:= 5+ -. endif -.endfor +. endif +. endfor # 1. detect installed versions _INST_BDB_VER= -.for bdb in ${_DB_PORTS} -. if exists(${db${bdb}_FIND}) +. for bdb in ${_DB_PORTS} +. if exists(${db${bdb}_FIND}) _INST_BDB_VER+=${bdb} -. endif -.endfor +. endif +. endfor # 2. parse supported versions: # 2a. build list from _bdb_ARGS _SUPP_BDB_VER= __bdb_ARGS:=${_bdb_ARGS:C,\+$,,} -.if !empty(_bdb_ARGS:M*+) -. for bdb in ${_DB_PORTS} -. if ${__bdb_ARGS} <= ${bdb} +. if !empty(_bdb_ARGS:M*+) +. for bdb in ${_DB_PORTS} +. if ${__bdb_ARGS} <= ${bdb} _SUPP_BDB_VER+=${bdb:C/\.//} -. endif -. endfor -.else +. endif +. endfor +. else _SUPP_BDB_VER=${_bdb_ARGS} -.endif +. endif # 2b. expand INVALID_BDB_VER if given with "+": -.if !empty(INVALID_BDB_VER:M*+) +. if !empty(INVALID_BDB_VER:M*+) _INV_BDB:=${INVALID_BDB_VER:C,\+$,,} _INV_BDB_VER:= -. for bdb in ${_DB_PORTS} -. if ${_INV_BDB} <= ${bdb} +. for bdb in ${_DB_PORTS} +. if ${_INV_BDB} <= ${bdb} _INV_BDB_VER+=${bdb:C/\.//} -. endif -. endfor -.else +. endif +. endfor +. else _INV_BDB_VER:=${INVALID_BDB_VER} -.endif +. endif # 2c. strip versions from INVALID_BDB_VER out of _SUPP_BDB_VER -.for unsupp in ${_INV_BDB_VER} +. for unsupp in ${_INV_BDB_VER} _SUPP_BDB_VER:=${_SUPP_BDB_VER:N${unsupp}} -.endfor +. endfor # 3a. calculate intersection in _INST_BDB_VER to see if there # is a usable installed version -.for i in ${_INST_BDB_VER} -. if empty(_SUPP_BDB_VER:M${i}) +. for i in ${_INST_BDB_VER} +. if empty(_SUPP_BDB_VER:M${i}) _INST_BDB_VER:= ${_INST_BDB_VER:N${i}} -. endif -.endfor +. endif +. endfor _ELIGIBLE_BDB_VER:=${_INST_BDB_VER} # 3b. if there is no usable version installed, check defaults -.if empty(_INST_BDB_VER) +. if empty(_INST_BDB_VER) _DFLT_BDB_VER:=${_DB_DEFAULTS} # make sure we use a reasonable version for package builds _WITH_BDB_HIGHEST=yes -. for i in ${_DFLT_BDB_VER} -. if empty(_SUPP_BDB_VER:M${i}) +. for i in ${_DFLT_BDB_VER} +. if empty(_SUPP_BDB_VER:M${i}) _DFLT_BDB_VER:= ${_DFLT_BDB_VER:N${i}} -. endif -. endfor +. endif +. endfor _ELIGIBLE_BDB_VER:=${_DFLT_BDB_VER} -.endif +. endif # 4. elect a version _BDB_VER= -.for i in ${_ELIGIBLE_BDB_VER} -. if !empty(WITH_BDB_HIGHEST) || !empty(_WITH_BDB_HIGHEST) || empty(${_BDB_VER}) +. for i in ${_ELIGIBLE_BDB_VER} +. if !empty(WITH_BDB_HIGHEST) || !empty(_WITH_BDB_HIGHEST) || empty(${_BDB_VER}) _BDB_VER:=${i} -. endif -.endfor +. endif +. endfor # 5. catch errors or set variables -.if empty(_BDB_VER) +. if empty(_BDB_VER) IGNORE= cannot install: no eligible BerkeleyDB version. Requested: ${_bdb_ARGS}, incompatible: ${_INV_BDB_VER}. Try: make debug-bdb -.else -. if defined(BDB_BUILD_DEPENDS) +. else +. if defined(BDB_BUILD_DEPENDS) BUILD_DEPENDS+= ${db${_BDB_VER}_FIND}:${db${_BDB_VER}_DEPENDS:C/^libdb.*://} -. else +. else LIB_DEPENDS+= ${db${_BDB_VER}_DEPENDS} -. endif -. if ${_BDB_VER} == 5 +. endif +. if ${_BDB_VER} == 5 BDB_LIB_NAME= db-5.3 BDB_LIB_CXX_NAME= db_cxx-5.3 BDB_LIB_DIR= ${LOCALBASE}/lib/db5 -. elif ${_BDB_VER} == 18 +. elif ${_BDB_VER} == 18 BDB_LIB_NAME= db-18.1 BDB_LIB_CXX_NAME= db_cxx-18.1 BDB_LIB_DIR= ${LOCALBASE}/lib/db18 -. endif +. endif BDB_LIB_NAME?= db${_BDB_VER} BDB_LIB_CXX_NAME?= db${_BDB_VER}_cxx BDB_INCLUDE_DIR?= ${LOCALBASE}/include/db${_BDB_VER} BDB_LIB_DIR?= ${LOCALBASE}/lib -.endif +. endif BDB_VER= ${_BDB_VER} debug-bdb: @${ECHO_CMD} "--INPUTS----------------------------------------------------" @${ECHO_CMD} "${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER: ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}" @${ECHO_CMD} "BDB_DEFAULT: ${_BDB_DEFAULT_save}" @${ECHO_CMD} "BDB_BUILD_DEPENDS: ${BDB_BUILD_DEPENDS}" @${ECHO_CMD} "bdb_ARGS (original): ${bdb_ARGS}" @${ECHO_CMD} "WITH_BDB_HIGHEST (original): ${WITH_BDB_HIGHEST}" @${ECHO_CMD} "--PROCESSING------------------------------------------------" @${ECHO_CMD} "supported versions: ${_SUPP_BDB_VER}" @${ECHO_CMD} "invalid versions: ${_INV_BDB_VER}" @${ECHO_CMD} "installed versions: ${_INST_BDB_VER}" @${ECHO_CMD} "eligible versions: ${_ELIGIBLE_BDB_VER}" @${ECHO_CMD} "bdb_ARGS (effective): ${_bdb_ARGS}" @${ECHO_CMD} "WITH_BDB_HIGHEST (override): ${_WITH_BDB_HIGHEST}" @${ECHO_CMD} "--OUTPUTS---------------------------------------------------" @${ECHO_CMD} "IGNORE=${IGNORE}" @${ECHO_CMD} "BDB_VER=${BDB_VER}" @${ECHO_CMD} "BDB_INCLUDE_DIR=${BDB_INCLUDE_DIR}" @${ECHO_CMD} "BDB_LIB_NAME=${BDB_LIB_NAME}" @${ECHO_CMD} "BDB_LIB_CXX_NAME=${BDB_LIB_CXX_NAME}" @${ECHO_CMD} "BDB_LIB_DIR=${BDB_LIB_DIR}" @${ECHO_CMD} "BUILD_DEPENDS=${BUILD_DEPENDS:M*\:databases/db*}" @${ECHO_CMD} "LIB_DEPENDS=${LIB_DEPENDS:M*\:databases/db*}" @${ECHO_CMD} "------------------------------------------------------------" # Obsolete variables - ports can define these to want users about # variables that may be in /etc/make.conf but that are no longer # effective: -.if defined(OBSOLETE_BDB_VAR) -. for var in ${OBSOLETE_BDB_VAR} -. if defined(${var}) +. if defined(OBSOLETE_BDB_VAR) +. for var in ${OBSOLETE_BDB_VAR} +. if defined(${var}) BAD_VAR+= ${var}, -. endif -. endfor -. if defined(BAD_VAR) +. endif +. endfor +. if defined(BAD_VAR) _IGNORE_MSG= Obsolete variable(s) ${BAD_VAR} use DEFAULT_VERSIONS or ${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER to select Berkeley DB version -. if defined(IGNORE) +. if defined(IGNORE) IGNORE+= ${_IGNORE_MSG} -. else +. else IGNORE= ${_IGNORE_MSG} +. endif +. endif . endif -. endif -.endif .endif diff --git a/Mk/Uses/bison.mk b/Mk/Uses/bison.mk index e74526f7087a..ed3f5cad2a3c 100644 --- a/Mk/Uses/bison.mk +++ b/Mk/Uses/bison.mk @@ -1,38 +1,38 @@ # handle dependency on the bison port # # Feature: bison # Usage: USES=bison or USES=bison:ARGS # Valid ARGS: build (default, implicit), run, both, alias, wrappers # # 'alias' will automatically create a BINARY_ALIAS to use base # byacc invoked as bison # 'wrapper' will automatically create BINARY_WRAPPER to use base # byacc with a wrapper to mimic a bit more bison # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_BISON_MK) _INCLUDE_USES_BISON_MK= yes _BISON_DEPENDS= bison:devel/bison -.if empty(bison_ARGS) +. if empty(bison_ARGS) bison_ARGS= build -.endif +. endif -.if ${bison_ARGS} == "build" +. if ${bison_ARGS} == "build" BUILD_DEPENDS+= ${_BISON_DEPENDS} -.elif ${bison_ARGS} == "run" +. elif ${bison_ARGS} == "run" RUN_DEPENDS+= ${_BISON_DEPENDS} -.elif ${bison_ARGS} == "both" +. elif ${bison_ARGS} == "both" BUILD_DEPENDS+= ${_BISON_DEPENDS} RUN_DEPENDS+= ${_BISON_DEPENDS} -.elif ${bison_ARGS} == "alias" +. elif ${bison_ARGS} == "alias" BINARY_ALIAS+= bison=byacc -.elif ${bison_ARGS} == "wrapper" +. elif ${bison_ARGS} == "wrapper" BINARY_WRAPPERS+= bison -.else +. else IGNORE= USES=bison - invalid args: [${bison_ARGS}] specified -.endif +. endif .endif diff --git a/Mk/Uses/blaslapack.mk b/Mk/Uses/blaslapack.mk index 6a9d7f2c1320..467173412d07 100644 --- a/Mk/Uses/blaslapack.mk +++ b/Mk/Uses/blaslapack.mk @@ -1,50 +1,50 @@ # Handle dependencies on Blas / Lapack # # Feature: blaslapack # Usage: USES=blaslapack or USES=blaslapack:ARGS # Valid ARGS: atlas gotoblas netlib (default) openblas # # Provides: BLASLIB and LAPACKLIB # # Maintainer: thierry@FreeBSD.org .if !defined(_INCLUDE_USES_BLASLAPACK_MK) _INCLUDE_USES_BLASLAPACK_MK= yes _valid_ARGS= atlas gotoblas netlib openblas _DEFAULT_BLASLAPACK= netlib -.if empty(blaslapack_ARGS) +. if empty(blaslapack_ARGS) blaslapack_ARGS= ${_DEFAULT_BLASLAPACK} -.endif +. endif LDFLAGS+= -L${LOCALBASE}/lib -.if ${blaslapack_ARGS} == atlas +. if ${blaslapack_ARGS} == atlas LIB_DEPENDS+= libatlas.so:math/atlas _BLASLIB= ptf77blas LAPACKLIB= -lalapack -lptcblas _ATLASLIB= atlas ATLASLIB= -l${_ATLASLIB} -.elif ${blaslapack_ARGS} == gotoblas +. elif ${blaslapack_ARGS} == gotoblas LIB_DEPENDS+= libgoto2.so:math/gotoblas LIB_DEPENDS+= liblapack.so:math/lapack _BLASLIB= goto2p LAPACKLIB= -lgoto2p -.elif ${blaslapack_ARGS} == netlib +. elif ${blaslapack_ARGS} == netlib LIB_DEPENDS+= libblas.so:math/blas LIB_DEPENDS+= liblapack.so:math/lapack _BLASLIB= blas LAPACKLIB= -llapack -.elif ${blaslapack_ARGS} == openblas +. elif ${blaslapack_ARGS} == openblas LIB_DEPENDS+= libopenblas.so:math/openblas _BLASLIB= openblas LAPACKLIB= -lopenblas -.else +. else IGNORE= USES=blaslapack: invalid arguments: ${blaslapack_ARGS} -.endif +. endif BLASLIB= -l${_BLASLIB} .endif diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk index ce7cba801d69..6c6872eb0024 100644 --- a/Mk/Uses/cabal.mk +++ b/Mk/Uses/cabal.mk @@ -1,269 +1,269 @@ # Provide support for building Haskell packages using Cabal. # # Feature: cabal # Usage: USES=cabal or USES=cabal:ARGS # Valid ARGS: hpack, nodefault # # hpack: The port doesn't have a .cabal file and needs devel/hs-hpack to # generate it from package.yaml file # nodefault: Do not fetch the default distribution file from Hackage. If # USE_GITHUB or USE_GITLAB is specified in the port, this argument # is implied. # # Variables, which can be set by the port: # # USE_CABAL List of Haskell packages required to build a port. # Should be listed along with version, like profunctors-5.3 # Package revision can be specified too with # usual "_" syntax: invariant-0.5.1_1 # When creating a new port, the initial list can be built # using make-use-cabal auxiliary target. # # CABAL_FLAGS List of Cabal flags to be passed verbatim into --flags # argument of cabal-install utility. Used for both # cabal configure and cabal build. # # EXECUTABLES List of executable Cabal targets to be built and installed. # default: ${PORTNAME} # # opt_USE_CABAL Variant of USE_CABAL to be used with options framework. # opt_CABAL_FLAGS Variant of CABAL_FLAGS to be used with options framework. # Note that it works a bit differently from CABAL_FLAGS: # it appends "${opt_CABAL_FLAGS}" when the option is enabled # and "-${opt_CABAL_FLAGS}" otherwise. # opt_EXECUTABLES Variant of EXECUTABLES to be used with options framework. # # FOO_DATADIR_VARS Additional environment vars to add to FOO executable's # wrapper script. # # CABAL_PROJECT Sets how to treat existing cabal.project file. Possible # values are "remove" and "append". # # MAINTAINER: haskell@FreeBSD.org .if !defined(_INCLUDE_USES_CABAL_MK) _INCLUDE_USES_CABAL_MK= yes _valid_ARGS= hpack nodefault _cabal_project_valid_VALUES= append remove . for arg in ${cabal_ARGS} . if !${_valid_ARGS:M${arg}} IGNORE= USES=cabal: invalid arguments: ${arg} . endif . endfor . if defined(CABAL_PROJECT) && !${_cabal_project_valid_VALUES:M${CABAL_PROJECT}} IGNORE= CABAL_PROJECT: invalid value: ${CABAL_PROJECT} . endif PKGNAMEPREFIX?= hs- EXECUTABLES?= ${PORTNAME} CABAL_HOME= ${WRKDIR}/cabal-home CABAL_LIBEXEC= libexec/cabal CABAL_EXTRACT_SUFX= .tar.gz CABAL_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/powerpc64/ppc64/} CABAL_DEPSDIR= ${WRKSRC}/${CABAL_DEPS_SUBDIR} CABAL_DEPS_SUBDIR= _cabal_deps . if !defined(CABAL_BOOTSTRAP) BUILD_DEPENDS+= cabal:devel/hs-cabal-install \ ghc:lang/ghc . endif . if ${cabal_ARGS:Mhpack} EXTRACT_DEPENDS+= hpack:devel/hs-hpack . endif # Inherited via lang/ghc we need to depend on iconv and libgmp.so (stage q/a) iconv_ARGS= translit .include "${USESDIR}/iconv.mk" LIB_DEPENDS+= libgmp.so:math/gmp \ libffi.so:devel/libffi DIST_SUBDIR?= cabal . if !defined(USE_GITHUB) && !defined(USE_GITLAB) && !${cabal_ARGS:Mnodefault} _hackage_is_default= yes . else _hackage_is_default= no . endif . if ${_hackage_is_default} == yes MASTER_SITES= https://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ \ http://hackage.haskell.org/package/${PORTNAME}-${PORTVERSION}/ DISTFILES+= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} EXTRACT_ONLY+= ${PORTNAME}-${PORTVERSION}${CABAL_EXTRACT_SUFX} . else . if defined(USE_GITHUB) && !defined(DISTFILES) && !${USE_GITHUB:Mnodefault} EXTRACT_ONLY+= ${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX} . endif . if defined(USE_GITLAB) && !defined(DISTFILES) && !${USE_GITLAB:Mnodefault} EXTRACT_ONLY+= ${DISTNAME}${_GITLAB_EXTRACT_SUFX} . endif . endif _USES_extract= 701:cabal-post-extract _USES_patch= 701:cabal-post-patch _USES_configure=301:cabal-pre-configure _USES_stage= 751:cabal-post-install-script BUILD_TARGET?= ${EXECUTABLES:S/^/exe:&/} . if defined(USE_LOCALE) LOCALE_ENV= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} . endif _use_cabal= ${USE_CABAL:O:u} . for package in ${_use_cabal} _PKG_GROUP= ${package:C/[\.-]//g} _PKG_WITHOUT_REV= ${package:C/_[0-9]+//} _REV= ${package:C/[^_]*//:S/_//} MASTER_SITES+= https://hackage.haskell.org/package/:${package:C/[\.-]//g} \ http://hackage.haskell.org/package/:${package:C/[\.-]//g} DISTFILES+= ${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX}:${package:C/[\.-]//g} . if !defined(CABAL_BOOTSTRAP) EXTRACT_ONLY+= ${package:C/_[0-9]+//}/${package:C/_[0-9]+//}${CABAL_EXTRACT_SUFX} . endif . if ${package:C/[^_]*//:S/_//} != "" DISTFILES+= ${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal:${package:C/[\.-]//g} . endif . endfor # Auxiliary targets used during port creation/updating. # Fetches and unpacks package source from Hackage using only PORTNAME and PORTVERSION. cabal-extract: ${WRKDIR} ${RM} -rf ${CABAL_HOME}/.cabal ${SETENV} HOME=${CABAL_HOME} cabal new-update . if ${_hackage_is_default} == yes cd ${WRKDIR} && \ ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal get ${PORTNAME}-${PORTVERSION} . else ${MV} ${CABAL_HOME} /tmp/${PORTNAME}-cabal-home cd ${.CURDIR} && ${MAKE} extract CABAL_BOOTSTRAP=yes ${RM} -rf ${CABAL_HOME} ${MV} /tmp/${PORTNAME}-cabal-home ${CABAL_HOME} . endif # Fetches and unpacks dependencies sources for a cabal-extract'ed package. # Builds them as side-effect. . if !target(cabal-extract-deps) cabal-extract-deps: . if ${cabal_ARGS:Mhpack} cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack . endif cd ${WRKSRC} && \ ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-configure --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CONFIGURE_ARGS} cd ${WRKSRC} && \ ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-build --disable-benchmarks --disable-tests --dependencies-only ${BUILD_ARGS} ${BUILD_TARGET} . endif # Generates USE_CABAL= ... line ready to be pasted into the port based on artifacts of cabal-extract-deps. make-use-cabal: @echo ==================== @echo -n USE_CABAL= @find ${CABAL_HOME} -name '*.conf' -exec basename {} + | sed -E 's|-[0-9a-z]{64}\.conf||' | sort | sed 's/$$/ \\/' @find ${CABAL_HOME} -name 'hsc2hs*.tar.gz' -exec basename {} + | sed -E 's|\.tar\.gz||' | sed 's/$$/ \\/' @find ${CABAL_HOME} -name 'alex*.tar.gz' -exec basename {} + | sed -E 's|\.tar\.gz||' | sed 's/$$/ \\/' @find ${CABAL_HOME} -name 'happy*.tar.gz' -exec basename {} + | sed -E 's|\.tar\.gz||' | sed 's/$$/ \\/' # Re-generates USE_CABAL items to have revision numbers. make-use-cabal-revs: . for package in ${_use_cabal} @(${SETENV} HTTP_ACCEPT="application/json" fetch -q -o - http://hackage.haskell.org/package/${package:C/_[0-9]+//}/revisions/ | python3 -c "import sys, json; print(('${package:C/_[0-9]+//}_' + str(json.load(sys.stdin)[-1]['number'])).replace('_0',''), end='')") @echo ' \' . endfor . if !defined(CABAL_BOOTSTRAP) # Main targets implementation. cabal-post-extract: # Remove the project file as requested . if "${CABAL_PROJECT}" == "remove" ${RM} ${WRKSRC}/cabal.project . endif # Save the original project file so that users can patch them . if "${CABAL_PROJECT}" == "append" ${MV} ${WRKSRC}/cabal.project ${WRKSRC}/cabal.project.${PORTNAME} . endif @/bin/test ! -f ${WRKSRC}/cabal.project || (echo "cabal.project file is already present in WRKSRC! Set CABAL_PROJECT variable." && false) # Move extracted dependencies into ${CABAL_DEPSDIR} directory ${MKDIR} ${CABAL_DEPSDIR} . for package in ${_use_cabal} # Copy revised .cabal file if present . if ${package:C/[^_]*//:S/_//} != "" cp ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal `find ${WRKDIR}/${package:C/_[0-9]+//} -name '*.cabal' -depth 1` . endif # Move the dependency source itself cd ${WRKDIR} && \ mv ${package:C/_[0-9]+//} ${CABAL_DEPSDIR}/ . endfor # Create the cabal-install config ${MKDIR} ${CABAL_HOME}/.cabal ${ECHO_CMD} "jobs: ${MAKE_JOBS_NUMBER}" > ${CABAL_HOME}/.cabal/config cabal-post-patch: # Create our own cabal.project ${ECHO_CMD} "packages: ." > ${WRKSRC}/cabal.project . for package in ${_use_cabal} ${ECHO_CMD} " ${CABAL_DEPS_SUBDIR}/${package:C/_[0-9]+//}" >> ${WRKSRC}/cabal.project . endfor # Append the (possibly patched) original cabal.project, if requested . if "${CABAL_PROJECT}" == "append" ${CAT} ${WRKSRC}/cabal.project.${PORTNAME} >> ${WRKSRC}/cabal.project . endif cabal-pre-configure: # Generate .cabal file with hpack if requested . if ${cabal_ARGS:Mhpack} cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack . endif . if !target(do-build) do-build: cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} HOME=${CABAL_HOME} cabal new-build --offline --disable-benchmarks --disable-tests --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} . endif . if !target(do-install) do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC} . for exe in ${EXECUTABLES} ${INSTALL_PROGRAM} \ $$(find ${WRKSRC}/dist-newstyle -name ${exe} -type f -perm +111) \ ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC}/${exe} ${ECHO_CMD} '#!/bin/sh' > ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} 'export ${exe:S/-/_/}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} -. for dep in ${${exe}_DATADIR_VARS} +. for dep in ${${exe}_DATADIR_VARS} ${ECHO_CMD} 'export ${dep:S/-/_/}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} -. endfor +. endfor ${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${ECHO_CMD} 'exec ${PREFIX}/${CABAL_LIBEXEC}/${exe} "$$@"' >> ${STAGEDIR}${PREFIX}/bin/${exe} ${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${exe} . endfor . endif . if !defined(SKIP_CABAL_PLIST) cabal-post-install-script: . for exe in ${EXECUTABLES} ${ECHO_CMD} 'bin/${exe}' >> ${TMPPLIST} ${ECHO_CMD} '${CABAL_LIBEXEC}/${exe}' >> ${TMPPLIST} . endfor . endif . endif # !defined(CABAL_BOOTSTRAP) .endif diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index ed6d2c8cfc42..4d4a0921abfc 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -1,405 +1,405 @@ # This file contains logic to ease porting of Rust packages or # binaries using the `cargo` command. # # Feature: cargo # Usage: USES=cargo # Valid ARGS: none # # MAINTAINER: rust@FreeBSD.org .if !defined(_INCLUDE_USES_CARGO_MK) _INCLUDE_USES_CARGO_MK= yes -.if !empty(cargo_ARGS) +. if !empty(cargo_ARGS) IGNORE+= USES=cargo takes no arguments -.endif +. endif .sinclude "${MASTERDIR}/Makefile.crates" # List of static dependencies. The format is cratename-version. # CARGO_CRATES will be downloaded from MASTER_SITE_CRATESIO. CARGO_CRATES?= # List of features to build (space separated list). # Use special token --no-default-features to disable default # features by passing it to cargo build/install/test. CARGO_FEATURES?= # Name of the local directory for vendoring crates. CARGO_VENDOR_DIR?= ${WRKSRC}/cargo-crates # Default path for cargo manifest. CARGO_CARGOTOML?= ${WRKSRC}/Cargo.toml CARGO_CARGOLOCK?= ${WRKSRC}/Cargo.lock # Save crates inside ${DISTDIR}/rust/crates by default. CARGO_DIST_SUBDIR?= rust/crates # Generate list of DISTFILES. # Prefer canonical file extension .crate going forward -.if make(makesum) +. if make(makesum) CARGO_CRATE_EXT= .crate -.else +. else # If there is a rust/crates/*.tar.gz in distinfo keep using the old # extension. We need to delay eval until the last moment for # DISTINFO_FILE. We cache the command output to avoid multiple # slow grep runs for every CARGO_CRATE_EXT access. CARGO_CRATE_EXT= ${defined(_CARGO_CRATE_EXT_CACHE):?${_CARGO_CRATE_EXT_CACHE}:${:!if ${GREP} -q '\(${CARGO_DIST_SUBDIR}/.*\.tar\.gz\)' "${DISTINFO_FILE}" 2>/dev/null; then ${ECHO_CMD} .tar.gz; else ${ECHO_CMD} .crate; fi!:_=_CARGO_CRATE_EXT_CACHE}} -.endif +. endif _CARGO_CRATES:= ${CARGO_CRATES:N*@git+*} _CARGO_GIT_SOURCES:= ${CARGO_CRATES:M*@git+*} # enumerate crates for unqiue and sane distfile group names _CARGO_CRATES:= ${empty(_CARGO_CRATES):?:${_CARGO_CRATES:range:@i@$i ${_CARGO_CRATES:[$i]}@}} # split up crates into (index, crate, name, version) 4-tuples _CARGO_CRATES:= ${_CARGO_CRATES:C/^([-_a-zA-Z0-9]+)-([0-9].*)/\0 \1 \2/} -.for _index _crate _name _version in ${_CARGO_CRATES} +. for _index _crate _name _version in ${_CARGO_CRATES} # Resolving CRATESIO alias is very inefficient with many MASTER_SITES, consume MASTER_SITE_CRATESIO directly MASTER_SITES+= ${MASTER_SITE_CRATESIO:S,%SUBDIR%,${_name}/${_version},:S,$,:_cargo_${_index},} DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:_cargo_${_index} # Provide pointer to the crate's extraction dir WRKSRC_crate_${_name}= ${CARGO_VENDOR_DIR}/${_crate} # ... also with version suffix in case of multiple versions of the # same crate WRKSRC_crate_${_crate}= ${CARGO_VENDOR_DIR}/${_crate} -.endfor +. endfor _CARGO_AWK= ${AWK} -vCP="${CP}" -vFIND="${FIND}" -vGREP="${GREP}" \ -vCARGO_VENDOR_DIR="${CARGO_VENDOR_DIR}" \ -vGIT_SOURCES="${_CARGO_GIT_SOURCES}" \ -vWRKDIR="${WRKDIR}" -vWRKSRC="${WRKSRC}" \ -f${SCRIPTSDIR}/split-url.awk \ -f${SCRIPTSDIR}/cargo-crates-git-common.awk -f -.if !empty(_CARGO_GIT_SOURCES) -. for _index _site _filename _wrksrc _crates in ${:!${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-fetch.awk /dev/null!} +. if !empty(_CARGO_GIT_SOURCES) +. for _index _site _filename _wrksrc _crates in ${:!${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-fetch.awk /dev/null!} MASTER_SITES+= ${_site}:_cargo_git${_index} DISTFILES+= ${_filename}:_cargo_git${_index} -. for _crate in ${_crates:S/,/ /g} +. for _crate in ${_crates:S/,/ /g} # Make sure the build dependencies checks below can work for git sourced crates too _CARGO_CRATES+= @git ${_crate} ${_crate} @git # Provide pointer to the crate's extraction dir # # This might not point to the actual crate's sources since a # single git source can contain multiple crates. We cannot collect # subdir information until after the full extraction is done and we # cannot set make variables at that point. This is better than # nothing. WRKSRC_crate_${_crate}= ${WRKDIR}/${_wrksrc} +. endfor . endfor -. endfor -.endif +. endif # Build dependencies. CARGO_BUILDDEP?= yes -.if ${CARGO_BUILDDEP:tl} == "yes" +. if ${CARGO_BUILDDEP:tl} == "yes" BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.59.0:lang/${RUST_DEFAULT} -.endif +. endif # Location of toolchain (default to lang/rust's toolchain) CARGO?= ${LOCALBASE}/bin/cargo RUSTC?= ${LOCALBASE}/bin/rustc RUSTDOC?= ${LOCALBASE}/bin/rustdoc # Location of the cargo output directory. CARGO_TARGET_DIR?= ${WRKDIR}/target # Default target platform (affects some RUSTFLAGS if passed) CARGO_BUILD_TARGET?= ${_CARGO_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl} _CARGO_RUST_ARCH_amd64= x86_64 _CARGO_RUST_ARCH_i386= i686 _CARGO_RUST_ARCH_riscv64= riscv64gc # Environment for cargo # - CARGO_HOME: local cache of the registry index # - CARGO_BUILD_JOBS: configure number of jobs to run # - CARGO_TARGET_DIR: location of where to place all generated artifacts # - RUST_BACKTRACE: produce backtraces when something in the build panics # - RUSTC: path of rustc binary (default to lang/rust) # - RUSTDOC: path of rustdoc binary (default to lang/rust) # - RUSTFLAGS: custom flags to pass to all compiler invocations that Cargo performs CARGO_ENV+= \ CARGO_HOME=${WRKDIR}/cargo-home \ CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \ CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET} \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ CARGO_TARGET_${CARGO_BUILD_TARGET:S/-/_/g:tu}_LINKER="${CC}" \ RUSTC=${RUSTC} \ RUSTDOC=${RUSTDOC} \ RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:C/.+/-C link-arg=&/}" -.if ${ARCH} != powerpc +. if ${ARCH} != powerpc CARGO_ENV+= RUST_BACKTRACE=1 -.endif +. endif # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk -.if ${ARCH} == amd64 || ${ARCH} == i386 +. if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} -.elif ${ARCH:Mpowerpc*} +. elif ${ARCH:Mpowerpc*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} -.else +. else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} -.endif +. endif -.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 +. if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 USE_GCC?= yes STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip -.endif +. endif # Helper to shorten cargo calls. _CARGO_RUN= ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENV} CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${_CARGO_RUN} # User arguments for cargo targets. CARGO_BUILD_ARGS?= CARGO_INSTALL_ARGS?= CARGO_INSTALL_PATH?= . CARGO_TEST_ARGS?= CARGO_UPDATE_ARGS?= # Use module targets ? CARGO_BUILD?= yes CARGO_CONFIGURE?= yes CARGO_INSTALL?= yes CARGO_TEST?= yes # rustc stashes intermediary files in TMPDIR (default /tmp) which # might cause issues for users that for some reason space limit # their /tmp. WRKDIR should have plenty of space. # Allow users and ports to still overwrite it. -.if ${TMPDIR:U/tmp} == /tmp +. if ${TMPDIR:U/tmp} == /tmp TMPDIR= ${WRKDIR} -.endif +. endif # Manage crate features. -.if !empty(CARGO_FEATURES:M--no-default-features) +. if !empty(CARGO_FEATURES:M--no-default-features) CARGO_BUILD_ARGS+= --no-default-features CARGO_INSTALL_ARGS+= --no-default-features CARGO_TEST_ARGS+= --no-default-features -.endif -.if !empty(CARGO_FEATURES:N--no-default-features) +. endif +. if !empty(CARGO_FEATURES:N--no-default-features) CARGO_BUILD_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_INSTALL_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_TEST_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' -.endif +. endif -.if !defined(WITH_DEBUG) +. if !defined(WITH_DEBUG) CARGO_BUILD_ARGS+= --release CARGO_TEST_ARGS+= --release -.else +. else CARGO_INSTALL_ARGS+= --debug -.endif +. endif -.if ${_CARGO_CRATES:Mcmake} +. if ${_CARGO_CRATES:Mcmake} BUILD_DEPENDS+= cmake:devel/cmake -.endif +. endif -.if ${_CARGO_CRATES:Mgettext-sys} +. if ${_CARGO_CRATES:Mgettext-sys} CARGO_ENV+= GETTEXT_BIN_DIR=${LOCALBASE}/bin \ GETTEXT_INCLUDE_DIR=${LOCALBASE}/include \ GETTEXT_LIB_DIR=${LOCALBASE}/lib -.endif +. endif -.if ${_CARGO_CRATES:Mjemalloc-sys} +. if ${_CARGO_CRATES:Mjemalloc-sys} BUILD_DEPENDS+= gmake:devel/gmake -.endif +. endif -.if ${_CARGO_CRATES:Mlibgit2-sys} +. if ${_CARGO_CRATES:Mlibgit2-sys} # Use the system's libgit2 instead of building the bundled version CARGO_ENV+= LIBGIT2_SYS_USE_PKG_CONFIG=1 -.endif +. endif -.if ${_CARGO_CRATES:Mlibssh2-sys} +. if ${_CARGO_CRATES:Mlibssh2-sys} # Use the system's libssh2 instead of building the bundled version CARGO_ENV+= LIBSSH2_SYS_USE_PKG_CONFIG=1 -.endif +. endif -.if ${_CARGO_CRATES:Monig_sys} +. if ${_CARGO_CRATES:Monig_sys} # onig_sys always prefers the system library but will try to link # statically with it. Since devel/oniguruma doesn't provide a static # library it'll link to libonig.so instead. Strictly speaking setting # RUSTONIG_SYSTEM_LIBONIG is not necessary, but will force onig_sys to # always use the system's libonig as returned by `pkg-config oniguruma`. CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 -.endif +. endif -.if ${_CARGO_CRATES:Mopenssl-src} +. if ${_CARGO_CRATES:Mopenssl-src} DEV_WARNING+= "Please make sure this port uses the system OpenSSL and consider removing CARGO_CRATES=${CARGO_CRATES:Mopenssl-src-[0-9]*} (a vendored copy of OpenSSL) from the build, e.g., by patching Cargo.toml appropriately." -.endif +. endif -.if ${_CARGO_CRATES:Mopenssl-sys} +. if ${_CARGO_CRATES:Mopenssl-sys} # Make sure that openssl-sys can find the correct version of OpenSSL CARGO_ENV+= OPENSSL_LIB_DIR=${OPENSSLLIB} \ OPENSSL_INCLUDE_DIR=${OPENSSLINC} -.endif +. endif -.if ${_CARGO_CRATES:Mpkg-config} +. if ${_CARGO_CRATES:Mpkg-config} .include "${USESDIR}/pkgconfig.mk" -.endif +. endif -.for _index _crate _name _version in ${_CARGO_CRATES} +. for _index _crate _name _version in ${_CARGO_CRATES} # Split up semantic version and try to sanitize it by removing # pre-release identifier (-) or build metadata (+) -. if ${_version:S/./ /:S/./ /:C/[-+].*//:_:[#]} == 3 -. for _major _minor _patch in $_ +. if ${_version:S/./ /:S/./ /:C/[-+].*//:_:[#]} == 3 +. for _major _minor _patch in $_ # FreeBSD 12.0 changed ABI: r318736 and r320043 # https://github.com/rust-lang/libc/commit/78f93220d70e # https://github.com/rust-lang/libc/commit/969ad2b73cdc -. if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 38)) +. if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 38)) DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on FreeBSD 12.0. Consider updating to the latest version \(higher than 0.2.37\)." -. endif -. if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 49)) +. endif +. if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 49)) DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)." -. endif +. endif # FreeBSD 12.0 updated base OpenSSL in r339270: # https://github.com/sfackler/rust-openssl/commit/276577553501 -. if ${_name} == openssl && !exists(${PATCHDIR}/patch-openssl-1.1.1) && ${_major} == 0 && (${_minor} < 10 || (${_minor} == 10 && ${_patch} < 4)) +. if ${_name} == openssl && !exists(${PATCHDIR}/patch-openssl-1.1.1) && ${_major} == 0 && (${_minor} < 10 || (${_minor} == 10 && ${_patch} < 4)) DEV_WARNING+= "CARGO_CRATES=${_crate} does not support OpenSSL 1.1.1. Consider updating to the latest version \(higher than 0.10.3\)." -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor _USES_extract+= 600:cargo-extract cargo-extract: # target for preparing crates directory. It will put all crates in # the local crates directory. @${ECHO_MSG} "===> Moving crates to ${CARGO_VENDOR_DIR}" @${MKDIR} ${CARGO_VENDOR_DIR} -.for _index _crate _name _version in ${_CARGO_CRATES} -. if ${_index} != @git +. for _index _crate _name _version in ${_CARGO_CRATES} +. if ${_index} != @git @${MV} ${WRKDIR}/${_crate} ${CARGO_VENDOR_DIR}/${_crate} @${PRINTF} '{"package":"%s","files":{}}' \ $$(${SHA256} -q ${DISTDIR}/${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}) \ > ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json @if [ -r ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig ]; then \ ${MV} ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig \ ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig-cargo; \ fi -. endif -.endfor +. endif +. endfor -.if ${CARGO_CONFIGURE:tl} == "yes" +. if ${CARGO_CONFIGURE:tl} == "yes" _USES_configure+= 250:cargo-configure # configure hook. Place a config file for overriding crates-io index # by local source directory. cargo-configure: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh @${ECHO_MSG} "===> Cargo config:" @${MKDIR} ${WRKDIR}/.cargo @: > ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "[source.cargo]" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config.toml -.if !empty(_CARGO_GIT_SOURCES) +. if !empty(_CARGO_GIT_SOURCES) @${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-configure.awk \ /dev/null >> ${WRKDIR}/.cargo/config.toml -.endif +. endif @${CAT} ${WRKDIR}/.cargo/config.toml @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "opt-level = 2" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "debug = false" >> ${CARGO_CARGOTOML}; \ fi @${ECHO_MSG} "===> Updating Cargo.lock" @${CARGO_CARGO_RUN} update \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_UPDATE_ARGS} -.endif +. endif -.if !target(do-build) && ${CARGO_BUILD:tl} == "yes" +. if !target(do-build) && ${CARGO_BUILD:tl} == "yes" do-build: @${CARGO_CARGO_RUN} build \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_BUILD_ARGS} -.endif +. endif -.if !target(do-install) && ${CARGO_INSTALL:tl} == "yes" +. if !target(do-install) && ${CARGO_INSTALL:tl} == "yes" do-install: -. for path in ${CARGO_INSTALL_PATH} +. for path in ${CARGO_INSTALL_PATH} @${CARGO_CARGO_RUN} install \ --no-track \ --path "${path}" \ --root "${STAGEDIR}${PREFIX}" \ --verbose \ --verbose \ ${CARGO_INSTALL_ARGS} -. endfor -.endif +. endfor +. endif -.if !target(do-test) && ${CARGO_TEST:tl} == "yes" +. if !target(do-test) && ${CARGO_TEST:tl} == "yes" do-test: @${CARGO_CARGO_RUN} test \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_TEST_ARGS} -.endif +. endif # # Helper targets for port maintainers # # cargo-audit generates a vulnerability report using # security/cargo-audit based on the crates in Cargo.lock. cargo-audit: configure @if ! type cargo-audit > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"security/cargo-audit\""; exit 1; \ fi @${ECHO_MSG} "===> Checking for vulnerable crates" @${CARGO} audit --file ${CARGO_CARGOLOCK} # cargo-crates will output the crates list from Cargo.lock. If there # is no Cargo.lock for some reason, try and generate it first. cargo-crates: cargo-crates-generate-lockfile @${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} # cargo-crates-generate-lockfile will try to generate a Cargo.lock file # if it does not exist. cargo-crates-generate-lockfile: extract @if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ ${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ cd ${WRKSRC}; ${_CARGO_RUN} generate-lockfile \ --manifest-path ${CARGO_CARGOTOML} \ --verbose; \ fi # cargo-crates-licenses will try to grab license information from # all downloaded crates. cargo-crates-licenses: configure @${FIND} ${CARGO_VENDOR_DIR} -name 'Cargo.toml' -maxdepth 2 \ -exec ${GREP} -H '^license' {} \; \ | ${SED} \ -e 's@^${CARGO_VENDOR_DIR}/@@' \ -e 's@/Cargo.toml:license.*= *"@|@' \ -e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' # cargo-crates-merge will in-place update CARGO_CRATES in the port # based on the crates list from Cargo.lock. If there is no Cargo.lock # for some reason, try and generate it first. cargo-crates-merge: @if ! type portedit > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"ports-mgmt/portfmt\""; exit 1; \ fi @${MAKE} clean cargo-crates-generate-lockfile @f="${MASTERDIR}/Makefile"; [ -r "${MASTERDIR}/Makefile.crates" ] && f="${MASTERDIR}/Makefile.crates"; \ ${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} | \ portedit merge -i $$f; \ ${MAKE} clean makesum; \ ${ECHO_MSG} "${DISTINFO_FILE} and CARGO_CRATES in $$f were updated"; .endif diff --git a/Mk/Uses/charsetfix.mk b/Mk/Uses/charsetfix.mk index 1e3e6f61eb3b..bbf446c35f80 100644 --- a/Mk/Uses/charsetfix.mk +++ b/Mk/Uses/charsetfix.mk @@ -1,25 +1,25 @@ # Lookup in Makefile.in to prevent a package from installing/modifying charset.alias # # Feature: charsetfix # Usage: USES=charsetfix # Valid ARGS: does not require args # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_CHARSETFIX_MK) _INCLUDE_USES_CHARSETFIX_MK= yes -.if !empty(charsetfix_ARGS) +. if !empty(charsetfix_ARGS) IGNORE= USES=charsetfix does not require args -.endif +. endif CHARSETFIX_MAKEFILEIN?= Makefile.in _USES_patch+= 600:charsetfix-post-patch charsetfix-post-patch: @${FIND} ${WRKSRC} -name "${CHARSETFIX_MAKEFILEIN}" -type f | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} \ -e 's|need_charset_alias=true|need_charset_alias=false|g ; \ s|test -f $$(charset_alias)|false|g ;\ s|test -f $$(DESTDIR)$$(libdir)/charset.alias|false|g' .endif diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk index bef3b30ac601..a4c1edd3f0b2 100644 --- a/Mk/Uses/cmake.mk +++ b/Mk/Uses/cmake.mk @@ -1,162 +1,162 @@ # Provide support for CMake based projects # # Feature: cmake # Usage: USES=cmake or USES=cmake:ARGS # Valid ARGS: insource, run, noninja, testing # ARGS description: # insource do not perform an out-of-source build # noninja don't use ninja instead of make # Setting this should be an exception, and hints to an issue # inside the ports build system. # A few corner cases never use ninja, and are handled, to reduce # the usage of 'noninja'.: # 1) fortran ports # 2) ports that set BUILD_- or INSTALL_WRKSRC to # something different than CONFIGURE_WRKSRC # run add a runtime dependency on cmake # testing add the test target based on ctest # Additionally, CMAKE_TESTING_ON, CMAKE_TESTING_OFF, CMAKE_TESTING_ARGS, CMAKE_TESTING_TARGET # can be defined to override the default values. # # # Additional variables that affect cmake behaviour: # # User defined variables: # CMAKE_NOCOLOR - Disable colour build output # Default: not set, unless BATCH or PACKAGE_BUILDING is defined # # Variables for ports: # CMAKE_ON Appends -D:bool=ON to the CMAKE_ARGS, # CMAKE_OFF Appends -D:bool=OFF to the CMAKE_ARGS. # CMAKE_ARGS - Arguments passed to cmake # Default: see below # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). # Projects may have their own build profiles. # CMake supports the following types: Debug, # Release, RelWithDebInfo and MinSizeRel. # Debug and Release profiles respect system # CFLAGS, RelWithDebInfo and MinSizeRel will set # CFLAGS to "-O2 -g" and "-Os -DNDEBUG". # Default: Release, if WITH_DEBUG is not set, # Debug otherwise # CMAKE_SOURCE_PATH - Path to the source directory # Default: ${WRKSRC} # # MAINTAINER: kde@FreeBSD.org .if !defined(_INCLUDE_USES_CMAKE_MK) _INCLUDE_USES_CMAKE_MK= yes _valid_ARGS= insource run noninja testing # Sanity check -.for arg in ${cmake_ARGS} +. for arg in ${cmake_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= cmake:${cmake_ARGS}' usage: argument [${arg}] is not recognized . endif -.endfor +. endfor CMAKE_BIN= ${LOCALBASE}/bin/cmake BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake -.if ${cmake_ARGS:Mrun} +. if ${cmake_ARGS:Mrun} RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake -.endif +. endif -.if defined(WITH_DEBUG) +. if defined(WITH_DEBUG) CMAKE_BUILD_TYPE?= Debug -.else +. else CMAKE_BUILD_TYPE?= Release -.endif #defined(WITH_DEBUG) +. endif #defined(WITH_DEBUG) PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" -.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) +. if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) INSTALL_TARGET?= install/strip -.endif +. endif CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ -DCMAKE_C_FLAGS_DEBUG:STRING="${CFLAGS}" \ -DCMAKE_C_FLAGS_RELEASE:STRING="${CFLAGS}" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ -DCMAKE_CXX_FLAGS_DEBUG:STRING="${CXXFLAGS}" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="${CXXFLAGS}" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \ -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" \ -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON # Handle the option-like CMAKE_ON and CMAKE_OFF lists. -.for _bool_kind in ON OFF -. if defined(CMAKE_${_bool_kind}) +. for _bool_kind in ON OFF +. if defined(CMAKE_${_bool_kind}) CMAKE_ARGS+= ${CMAKE_${_bool_kind}:C/.*/-D&:BOOL=${_bool_kind}/} -. endif -.endfor +. endif +. endfor CMAKE_INSTALL_PREFIX?= ${PREFIX} -.if defined(BATCH) || defined(PACKAGE_BUILDING) +. if defined(BATCH) || defined(PACKAGE_BUILDING) CMAKE_NOCOLOR= yes -.endif +. endif -.if defined(CMAKE_NOCOLOR) +. if defined(CMAKE_NOCOLOR) CMAKE_ARGS+= -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -.endif +. endif _CMAKE_MSG= "===> Performing in-source build" CMAKE_SOURCE_PATH?= ${WRKSRC} -.if empty(cmake_ARGS:Minsource) +. if empty(cmake_ARGS:Minsource) _CMAKE_MSG= "===> Performing out-of-source build" CONFIGURE_WRKSRC= ${WRKDIR}/.build BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} TEST_WRKSRC?= ${CONFIGURE_WRKSRC} -.endif +. endif # By default we use the ninja generator. # Except, if cmake:run is set (cmake not wanted as generator) # fortran is used, as the ninja-generator does not handle it. # or if CONFIGURE_WRKSRC does not match BUILD_WRKSRC or INSTALL_WRKSRC # as the build.ninja file won't be where ninja expects it. -.if empty(cmake_ARGS:Mnoninja) && empty(cmake_ARGS:Mrun) && empty(USES:Mfortran) -. if "${CONFIGURE_WRKSRC}" == "${BUILD_WRKSRC}" && "${CONFIGURE_WRKSRC}" == "${INSTALL_WRKSRC}" -. if ! empty(USES:Mgmake) +. if empty(cmake_ARGS:Mnoninja) && empty(cmake_ARGS:Mrun) && empty(USES:Mfortran) +. if "${CONFIGURE_WRKSRC}" == "${BUILD_WRKSRC}" && "${CONFIGURE_WRKSRC}" == "${INSTALL_WRKSRC}" +. if ! empty(USES:Mgmake) BROKEN= USES=gmake is incompatible with cmake's ninja-generator -. endif +. endif . include "${USESDIR}/ninja.mk" +. endif . endif -.endif -.if !target(do-configure) +. if !target(do-configure) do-configure: @${ECHO_MSG} ${_CMAKE_MSG} ${MKDIR} ${CONFIGURE_WRKSRC} @cd ${CONFIGURE_WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} -.endif +. endif -.if !target(do-test) && ${cmake_ARGS:Mtesting} +. if !target(do-test) && ${cmake_ARGS:Mtesting} CMAKE_TESTING_ON?= BUILD_TESTING CMAKE_TESTING_TARGET?= test # Handle the option-like CMAKE_TESTING_ON and CMAKE_TESTING_OFF lists. -.for _bool_kind in ON OFF -. if defined(CMAKE_TESTING_${_bool_kind}) +. for _bool_kind in ON OFF +. if defined(CMAKE_TESTING_${_bool_kind}) CMAKE_TESTING_ARGS+= ${CMAKE_TESTING_${_bool_kind}:C/.*/-D&:BOOL=${_bool_kind}/} -. endif -.endfor +. endif +. endfor do-test: @cd ${BUILD_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} -.endif +. endif .endif #!defined(_INCLUDE_USES_CMAKE_MK) diff --git a/Mk/Uses/compiler.mk b/Mk/Uses/compiler.mk index 0c2421eed598..c684f4f0800a 100644 --- a/Mk/Uses/compiler.mk +++ b/Mk/Uses/compiler.mk @@ -1,199 +1,199 @@ # Allows to determine the compiler being used # # Feature: compiler # Usage: USES=compiler or USES=compiler:ARGS # Valid ARGS: env (default, implicit) c++0x c++11-lib c++11-lang c11 nestedfct features # # c++0x: The port needs a compiler understanding C++0X # c++11-lang: The port needs a compiler understanding C++11 # c++14-lang: The port needs a compiler understanding C++14 # c++17-lang: The port needs a compiler understanding C++17 # gcc-c++11-lib:The port needs g++ compiler with a C++11 library # c++11-lib: The port needs a compiler understanding C++11 and with a C++11 ready standard library # c11: The port needs a compiler understanding C11 # nestedfct: The port needs a compiler understanding nested functions # features: The port will determine the features supported by the default compiler # # Variable to test after # # COMPILER_TYPE: can be gcc or clang # ALT_COMPILER_TYPE: can be gcc or clang depending on COMPILER_TYPE, only set if the base system has 2 compilers # COMPILER_VERSION: first 2 digits of the version: 33 for clang 3.3.*, 47 for gcc 4.7.* # ALT_COMPILER_VERSION: first 2 digits of the version: 33 for clang 3.3.*, 47 for gcc 4.7.* of the ALT_COMPILER_TYPE # # COMPILER_FEATURES: the list of features supported by the compiler includes the standard C++ library. # CHOSEN_COMPILER_TYPE: can be gcc or clang (type of compiler chosen by the framework) # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_COMPILER_MK) _INCLUDE_USES_COMPILER_MK= yes -.if empty(compiler_ARGS) +. if empty(compiler_ARGS) compiler_ARGS= env -.endif +. endif VALID_ARGS= c++11-lib c++11-lang c++14-lang c++17-lang c11 features env nestedfct c++0x gcc-c++11-lib _CC_hash:= ${CC:hash} _CXX_hash:= ${CXX:hash} -.if ${compiler_ARGS} == gcc-c++11-lib +. if ${compiler_ARGS} == gcc-c++11-lib _COMPILER_ARGS+= features gcc-c++11-lib -.elif ${compiler_ARGS} == c++11-lib +. elif ${compiler_ARGS} == c++11-lib _COMPILER_ARGS+= features c++11-lib -.elif ${compiler_ARGS} == c++0x +. elif ${compiler_ARGS} == c++0x _COMPILER_ARGS+= features c++0x -.elif ${compiler_ARGS} == c++11-lang +. elif ${compiler_ARGS} == c++11-lang _COMPILER_ARGS+= features c++11-lang -.elif ${compiler_ARGS} == c++14-lang +. elif ${compiler_ARGS} == c++14-lang _COMPILER_ARGS+= features c++14-lang -.elif ${compiler_ARGS} == c++17-lang +. elif ${compiler_ARGS} == c++17-lang _COMPILER_ARGS+= features c++17-lang -.elif ${compiler_ARGS} == c11 +. elif ${compiler_ARGS} == c11 _COMPILER_ARGS+= features c11 -.elif ${compiler_ARGS} == features +. elif ${compiler_ARGS} == features _COMPILER_ARGS+= features -.elif ${compiler_ARGS} == env +. elif ${compiler_ARGS} == env _COMPILER_ARGS+= env -.elif ${compiler_ARGS} == nestedfct +. elif ${compiler_ARGS} == nestedfct _COMPILER_ARGS+= env nestedfct -.else +. else IGNORE= Invalid argument "${compiler_ARGS}", valid arguments are: ${VALID_ARGS} _COMPILER_ARGS= # -.endif +. endif -.if ${_COMPILER_ARGS:Mc++*} || ${_COMPILER_ARGS:Mc11} +. if ${_COMPILER_ARGS:Mc++*} || ${_COMPILER_ARGS:Mc11} _COMPILER_ARGS+= features -.endif +. endif -.if defined(_CCVERSION_${_CC_hash}) +. if defined(_CCVERSION_${_CC_hash}) _CCVERSION= ${_CCVERSION_${_CC_hash}} -.else +. else _CCVERSION!= ${CC} --version _CCVERSION_${_CC_hash}= ${_CCVERSION} PORTS_ENV_VARS+= _CCVERSION_${_CC_hash} -.endif +. endif COMPILER_VERSION= ${_CCVERSION:M[0-9]*.[0-9]*:[1]:C/([0-9]+)\.([0-9]+)\..*/\1\2/} -.if ${_CCVERSION:Mclang} +. if ${_CCVERSION:Mclang} COMPILER_TYPE= clang -.else +. else COMPILER_TYPE= gcc -.endif +. endif ALT_COMPILER_VERSION= 0 ALT_COMPILER_TYPE= none _ALTCCVERSION= none -.if defined(_ALTCCVERSION_${_CC_hash}) +. if defined(_ALTCCVERSION_${_CC_hash}) _ALTCCVERSION= ${_ALTCCVERSION_${_CC_hash}} -.else -.if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) -.if ${ARCH} == amd64 || ${ARCH} == i386 # clang often non-default for a reason +. else +. if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) +. if ${ARCH} == amd64 || ${ARCH} == i386 # clang often non-default for a reason _ALTCCVERSION!= /usr/bin/clang --version -.endif -.elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) +. endif +. elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) _ALTCCVERSION!= /usr/bin/gcc --version -.endif +. endif _ALTCCVERSION_${_CC_hash}= ${_ALTCCVERSION} PORTS_ENV_VARS+= _ALTCCVERSION_${_CC_hash} -.endif +. endif ALT_COMPILER_VERSION= ${_ALTCCVERSION:M[0-9]*.[0-9]*:[1]:C/([0-9]+)\.([0-9]+)\..*/\1\2/} -.if ${_ALTCCVERSION:Mclang} +. if ${_ALTCCVERSION:Mclang} ALT_COMPILER_TYPE= clang -.elif ${_ALTCCVERSION} != none +. elif ${_ALTCCVERSION} != none ALT_COMPILER_TYPE= gcc -.endif +. endif CHOSEN_COMPILER_TYPE= ${COMPILER_TYPE} -.if ${_COMPILER_ARGS:Mnestedfct} -.if ${COMPILER_TYPE} == clang +. if ${_COMPILER_ARGS:Mnestedfct} +. if ${COMPILER_TYPE} == clang USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.endif -.endif +. endif +. endif -.if ${_COMPILER_ARGS:Mfeatures} -.if defined(_CXXINTERNAL_${_CXX_hash}) +. if ${_COMPILER_ARGS:Mfeatures} +. if defined(_CXXINTERNAL_${_CXX_hash}) _CXXINTERNAL= ${_CXXINTERNAL_${_CXX_hash}} -.else +. else _CXXINTERNAL!= ${CXX} -\#\#\# /dev/null 2>&1 _CXXINTERNAL_${_CXX_hash}= ${_CXXINTERNAL} PORTS_ENV_VARS+= _CXXINTERNAL_${_CXX_hash} -.endif -.if ${_CXXINTERNAL:M\"-lc++\"} +. endif +. if ${_CXXINTERNAL:M\"-lc++\"} COMPILER_FEATURES= libc++ -.else +. else COMPILER_FEATURES= libstdc++ -.endif +. endif CSTD= c89 c99 c11 gnu89 gnu99 gnu11 CXXSTD= c++98 c++0x c++11 c++14 c++17 gnu++98 gnu++11 gnu++14 gnu++17 -.for std in ${CSTD} ${CXXSTD} +. for std in ${CSTD} ${CXXSTD} _LANG=c -.if ${CXXSTD:M${std}} +. if ${CXXSTD:M${std}} _LANG=c++ -.endif -.if defined(CC_OUTPUT_${_CC_hash}_${std:hash}) +. endif +. if defined(CC_OUTPUT_${_CC_hash}_${std:hash}) OUTPUT_${std}= ${CC_OUTPUT_${_CC_hash}_${std:hash}} -.else +. else OUTPUT_${std}!= if ${CC} -std=${std} -c -x ${_LANG} /dev/null -o /dev/null 2>&1; then echo yes; fi; echo CC_OUTPUT_${_CC_hash}_${std:hash}= ${OUTPUT_${std}} PORTS_ENV_VARS+= CC_OUTPUT_${_CC_hash}_${std:hash} -.endif -.if !${OUTPUT_${std}:M*error*} +. endif +. if !${OUTPUT_${std}:M*error*} COMPILER_FEATURES+= ${std} -.endif -.endfor -.endif +. endif +. endfor +. endif -.if ${_COMPILER_ARGS:Mc++11-lib} -.if !${COMPILER_FEATURES:Mc++11} +. if ${_COMPILER_ARGS:Mc++11-lib} +. if !${COMPILER_FEATURES:Mc++11} USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} +. elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.endif -.endif +. endif +. endif -.if (${_COMPILER_ARGS:Mc++17-lang} && !${COMPILER_FEATURES:Mc++17}) || \ +. if (${_COMPILER_ARGS:Mc++17-lang} && !${COMPILER_FEATURES:Mc++17}) || \ (${_COMPILER_ARGS:Mc++14-lang} && !${COMPILER_FEATURES:Mc++14}) || \ (${_COMPILER_ARGS:Mc++11-lang} && !${COMPILER_FEATURES:Mc++11}) || \ (${_COMPILER_ARGS:Mc++0x} && !${COMPILER_FEATURES:Mc++0x}) || \ (${_COMPILER_ARGS:Mc11} && !${COMPILER_FEATURES:Mc11}) -.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 +. if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.elif ${COMPILER_TYPE} == gcc -.if ${ALT_COMPILER_TYPE} == clang +. elif ${COMPILER_TYPE} == gcc +. if ${ALT_COMPILER_TYPE} == clang CPP= clang-cpp CC= clang CXX= clang++ CHOSEN_COMPILER_TYPE= clang -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang10:devel/llvm10 CPP= ${LOCALBASE}/bin/clang-cpp10 CC= ${LOCALBASE}/bin/clang10 CXX= ${LOCALBASE}/bin/clang++10 CHOSEN_COMPILER_TYPE= clang -.endif -.endif -.endif +. endif +. endif +. endif -.if ${_COMPILER_ARGS:Mgcc-c++11-lib} +. if ${_COMPILER_ARGS:Mgcc-c++11-lib} USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc -.if ${COMPILER_FEATURES:Mlibc++} +. if ${COMPILER_FEATURES:Mlibc++} CXXFLAGS+= -nostdinc++ -isystem /usr/include/c++/v1 LDFLAGS+= -L${WRKDIR} _USES_configure+= 200:gcc-libc++-configure gcc-libc++-configure: @${LN} -fs /usr/lib/libc++.so ${WRKDIR}/libstdc++.so -.endif -.endif +. endif +. endif .endif diff --git a/Mk/Uses/corosync.mk b/Mk/Uses/corosync.mk index ee14d99f2080..634ff3cc3bb1 100644 --- a/Mk/Uses/corosync.mk +++ b/Mk/Uses/corosync.mk @@ -1,40 +1,40 @@ # Provide support for corosync ports # # Feature: corosync # Usage: USES=coroync # # MAINTAINER: dpejesh@yahoo.com .if !defined(_INCLUDE_USES_COROSYNC_MK) _INCLUDE_USES_COROSYNC_MK= yes # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _VALID_COROSYNC_VER= 2 3 -.if ! ${_VALID_COROSYNC_VER:M${COROSYNC_DEFAULT}} +. if ! ${_VALID_COROSYNC_VER:M${COROSYNC_DEFAULT}} IGNORE= Invalid corosync default version ${COROSYNC_DEFAULT}; valid versions are ${_VALID_COROSYNC_VER} -.endif +. endif -.if exists(${LOCALBASE}/sbin/corosync) +. if exists(${LOCALBASE}/sbin/corosync) _COROSYNC_INSTALLED_VER!= ${LOCALBASE}/sbin/corosync -v 2>/dev/null _COROSYNC_INSTALLED_VER:= ${_COROSYNC_INSTALLED_VER:M'*':C/'//g} _COROSYNC_INSTALLED_VER_MAJOR= ${_COROSYNC_INSTALLED_VER:C/([0-9]*).[0-9]*.*/\1/g} _COROSYNC_INSTALLED_VER_MINOR= ${_COROSYNC_INSTALLED_VER:C/[0-9]*.([0-9]*).*/\1/g} # Currently corosync 3 is tagged 2.99.x so this is a temporary # work around until the final version is released. -. if ${_COROSYNC_INSTALLED_VER_MAJOR} == 2 && ${_COROSYNC_INSTALLED_VER_MINOR} == 99 +. if ${_COROSYNC_INSTALLED_VER_MAJOR} == 2 && ${_COROSYNC_INSTALLED_VER_MINOR} == 99 _COROSYNC_INSTALLED_VER_MAJOR= 3 _COROSYNC_INSTALLED_VER_MINOR= 0 -. endif +. endif -. if ${COROSYNC_DEFAULT} != ${_COROSYNC_INSTALLED_VER_MAJOR} +. if ${COROSYNC_DEFAULT} != ${_COROSYNC_INSTALLED_VER_MAJOR} IGNORE= DEFAULT_VERSIONS=corosync=${COROSYNC_DEFAULT} but ${_COROSYNC_INSTALLED_VER} is installed +. endif . endif -.endif BUILD_DEPENDS+= corosync:net/corosync${COROSYNC_DEFAULT} RUN_DEPENDS+= corosync:net/corosync${COROSYNC_DEFAULT} .endif diff --git a/Mk/Uses/cran.mk b/Mk/Uses/cran.mk index 80741990b26d..e357f296ad8e 100644 --- a/Mk/Uses/cran.mk +++ b/Mk/Uses/cran.mk @@ -1,75 +1,75 @@ # Use the Comprehensive R Archive Network # # Feature: cran # Usage: USES=cran or USES=cran:ARGS # Valid ARGS: auto-plist, compiles # # auto-plist The pkg-plist is to be automatically generated # compiles The port has code that needs to be compiled # # MAINTAINER= ports@FreeBSD.org .if !defined(_INCLUDE_USES_CRAN_MK) _INCLUDE_USES_CRAN_MK= yes MASTER_SITES?= CRAN/src/contrib CRAN_ARCHIVE/src/contrib BUILD_DEPENDS+= ${LOCALBASE}/bin/R:math/R RUN_DEPENDS+= ${LOCALBASE}/bin/R:math/R PKGNAMEPREFIX?= R-cran- R_LIB_DIR= lib/R/library R_MOD_DIR?= ${R_LIB_DIR}/${PORTNAME} PLIST_SUB+= R_MOD_DIR=${R_MOD_DIR} WRKSRC?= ${WRKDIR}/${PORTNAME} NO_BUILD= yes R_COMMAND= ${LOCALBASE}/bin/R -.if !target(do-test) +. if !target(do-test) R_POSTCMD_CHECK_OPTIONS?= --timings -.if !exists(${LOCALBASE}/bin/pdflatex) +. if !exists(${LOCALBASE}/bin/pdflatex) R_POSTCMD_CHECK_OPTIONS+= --no-manual --no-build-vignettes -.endif +. endif do-test: @${FIND} ${WRKSRC} \( -name '*.o' -o -name '*.so' \) -delete @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} _R_CHECK_FORCE_SUGGESTS_=FALSE \ ${R_COMMAND} ${R_PRECMD_CHECK_OPTIONS} CMD check \ ${R_POSTCMD_CHECK_OPTIONS} ${PORTNAME} -.endif +. endif -.if !target(do-install) +. if !target(do-install) R_POSTCMD_INSTALL_OPTIONS+= -l ${STAGEDIR}${PREFIX}/${R_LIB_DIR} R_POSTCMD_INSTALL_OPTIONS+= --install-tests -.if empty(PORT_OPTIONS:MDOCS) +. if empty(PORT_OPTIONS:MDOCS) R_POSTCMD_INSTALL_OPTIONS+= --no-docs --no-html -.endif +. endif do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${R_LIB_DIR} @cd ${WRKDIR} ; ${SETENV} ${MAKE_ENV} ${R_COMMAND} \ ${R_PRECMD_INSTALL_OPTIONS} CMD INSTALL \ ${R_POSTCMD_INSTALL_OPTIONS} ${PORTNAME} -.endif +. endif -.if ${cran_ARGS:Mauto-plist} +. if ${cran_ARGS:Mauto-plist} _USES_install+= 750:cran-auto-plist cran-auto-plist: @${FIND} -ds ${STAGEDIR}${PREFIX}/${R_MOD_DIR} \( -type f -or -type l \) -print | \ ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} -.endif +. endif -.if ${cran_ARGS:Mcompiles} +. if ${cran_ARGS:Mcompiles} _USES_install+= 755:cran-strip cran-strip: ${FIND} ${STAGEDIR}${PREFIX}/${R_MOD_DIR} -name '*.so' -exec ${STRIP_CMD} {} + .include "${USESDIR}/fortran.mk" -.else +. else NO_ARCH= yes -.endif +. endif .endif #_INCLUDE_USES_CRAN_MK diff --git a/Mk/Uses/desktop-file-utils.mk b/Mk/Uses/desktop-file-utils.mk index 2266e84ea27c..6b9830fbe1fa 100644 --- a/Mk/Uses/desktop-file-utils.mk +++ b/Mk/Uses/desktop-file-utils.mk @@ -1,19 +1,19 @@ # handle dependency depends on desktop-file-utils and package regen # # Feature: desktop-file-utils # Usage: USES=desktop-file-utils # Valid ARGS: does not require args # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_DESKTOP_FILE_UTILS_MK) _INCLUDE_USES_DESKTOP_FILE_UTILS_MK= yes -.if !empty(desktop-file-utils_ARGS) +. if !empty(desktop-file-utils_ARGS) IGNORE= USES=desktop-file-utils does not require args -.endif +. endif BUILD_DEPENDS+= update-desktop-database:devel/desktop-file-utils RUN_DEPENDS+= update-desktop-database:devel/desktop-file-utils .endif diff --git a/Mk/Uses/desthack.mk b/Mk/Uses/desthack.mk index f29c4c972e71..a8c327422652 100644 --- a/Mk/Uses/desthack.mk +++ b/Mk/Uses/desthack.mk @@ -1,18 +1,18 @@ # Handle gnu configure that does not properly support DESTDIR # # Feature: desthack # Usage: USES=desthack # Valid ARGS: none # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_DESTHACK_MK) _INCLUDE_USES_DESTHACK_MK= yes -.if !empty(desthack_ARGS) +. if !empty(desthack_ARGS) IGNORE= USES=desthack does not require args -.endif +. endif GNU_CONFIGURE_PREFIX= \$${${DESTDIRNAME}}${PREFIX} GNU_CONFIGURE_MANPREFIX= \$${${DESTDIRNAME}}${MANPREFIX} .endif diff --git a/Mk/Uses/display.mk b/Mk/Uses/display.mk index 1e7fe7f6cdef..d8ed976b5bff 100644 --- a/Mk/Uses/display.mk +++ b/Mk/Uses/display.mk @@ -1,35 +1,35 @@ # Feature: display # Usage: USES=display or USES=display:ARGS # Valid ARGS: install (default, implicit), any target # # Except the target where the DISPLAY is needed # # MAINTAINER: x11@FreeBSD.org .if !defined(_INCLUDE_USES_DISPLAY_MK) _INCLUDE_USES_DISPLAY_MK= yes -.if empty(display_ARGS) +. if empty(display_ARGS) display_ARGS= install -.endif +. endif -.if !defined(DISPLAY) +. if !defined(DISPLAY) BUILD_DEPENDS+= Xvfb:x11-servers/xorg-vfbserver \ ${LOCALBASE}/share/fonts/misc/8x13O.pcf.gz:x11-fonts/xorg-fonts-miscbitmaps \ ${LOCALBASE}/share/fonts/misc/fonts.alias:x11-fonts/font-alias \ ${LOCALBASE}/share/X11/xkb/rules/base:x11/xkeyboard-config \ xkbcomp:x11/xkbcomp XVFBPORT!= port=0; while test -S /tmp/.X11-unix/X$${port} ; do port=$$(( port + 1 )) ; done ; ${ECHO_CMD} $$port XVFBPIDFILE= /tmp/.xvfb-${XVFBPORT}.pid MAKE_ENV+= DISPLAY=":${XVFBPORT}" _USES_${display_ARGS}+= 290:start-display 860:stop-display start-display: daemon -p ${XVFBPIDFILE} Xvfb :${XVFBPORT} stop-display: pkill -15 -F ${XVFBPIDFILE} -.endif +. endif .endif diff --git a/Mk/Uses/dos2unix.mk b/Mk/Uses/dos2unix.mk index 965175cc6c08..2e8db690dc91 100644 --- a/Mk/Uses/dos2unix.mk +++ b/Mk/Uses/dos2unix.mk @@ -1,44 +1,44 @@ # Provide support to convert files from dos2unix # # DOS2UNIX_REGEX a regular expression to match files that needs to be converted # DOS2UNIX_FILES list of files of glob pattern relative to ${WRKSRC} # DOS2UNIX_GLOB list of glob pattern find(1) will match with # DOS2UNIX_WRKSRC top-level path for directory traversal instead of ${WRKSRC} # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_DOS2UNIX_MK) _INCLUDE_USES_DOS2UNIX_MK= yes -.if !empty(dos2unix_ARGS) +. if !empty(dos2unix_ARGS) IGNORE= USES=dos2unix takes no arguments -.endif +. endif -.if !defined(DOS2UNIX_FILES) && !defined(DOS2UNIX_REGEX) && !defined(DOS2UNIX_GLOB) +. if !defined(DOS2UNIX_FILES) && !defined(DOS2UNIX_REGEX) && !defined(DOS2UNIX_GLOB) _DOS2UNIX_ALL= yes -.endif +. endif DOS2UNIX_WRKSRC?= ${WRKSRC} _USES_patch+= 200:dos2unix dos2unix: @${ECHO_MSG} "===> Converting DOS text files to UNIX text files" -.if defined(_DOS2UNIX_ALL) +. if defined(_DOS2UNIX_ALL) @${FIND} ${DOS2UNIX_WRKSRC} -type f -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' -.else -.if defined(DOS2UNIX_FILES) +. else +. if defined(DOS2UNIX_FILES) @(cd ${DOS2UNIX_WRKSRC}; \ ${ECHO_CMD} ${DOS2UNIX_FILES} | ${XARGS} ${SED} -i '' -e 's/ $$//' ) -.elif defined(DOS2UNIX_REGEX) +. elif defined(DOS2UNIX_REGEX) @${FIND} -E ${DOS2UNIX_WRKSRC} -type f -iregex '${DOS2UNIX_REGEX}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' -.else -.for f in ${DOS2UNIX_GLOB} +. else +. for f in ${DOS2UNIX_GLOB} @${FIND} ${DOS2UNIX_WRKSRC} -type f -name '${f}' -print0 | \ ${XARGS} -0 ${SED} -i '' -e 's/ $$//' -.endfor -.endif -.endif +. endfor +. endif +. endif .endif diff --git a/Mk/Uses/drupal.mk b/Mk/Uses/drupal.mk index c793f6827bb1..efb4b90aa0de 100644 --- a/Mk/Uses/drupal.mk +++ b/Mk/Uses/drupal.mk @@ -1,115 +1,115 @@ # Support for Drupal ports and modules. # # Feature: drupal # Usage: USES=drupal or USES=drupal:ARGS # Valid ARGS: module theme # # module The port is a drupal module # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_DRUPAL_Mk) _INCLUDE_USES_DRUPAL_Mk= yes -.if ${drupal_ARGS:M[7]} +. if ${drupal_ARGS:M[7]} _DRUPAL_VERSION= ${drupal_ARGS:M[7]} -.endif +. endif VALID_VERSIONS= 7 -.if ${drupal_ARGS:N[7]:Ntheme:Nmodule} +. if ${drupal_ARGS:N[7]:Ntheme:Nmodule} IGNORE= Unknown argument for USES=drupal: ${drupal_ARGS:N[7]:Ntheme:Nmodule} -.endif +. endif _DRUPAL_COMP= ${drupal_ARGS:N[7]} -.if !defined(_DRUPAL_VERSION) || ! ${VALID_VERSIONS:M${_DRUPAL_VERSION}} +. if !defined(_DRUPAL_VERSION) || ! ${VALID_VERSIONS:M${_DRUPAL_VERSION}} IGNORE= Missing or invalid argument for USES=drupal, a version must be provided: ${VALID_VERSIONS} -.endif +. endif -.if ${drupal_ARGS:Mmodule} && ${drupal_ARGS:Mtheme} +. if ${drupal_ARGS:Mmodule} && ${drupal_ARGS:Mtheme} IGNORE= theme and module arguments are mutually exclusive for USES=drupal -.endif +. endif DRUPAL_BASE?= www/drupal${_DRUPAL_VERSION} DRUPAL_DIR= ${PREFIX}/${DRUPAL_BASE} DRUPAL_DOCSDIR?= ${PREFIX}/${DRUPAL_BASE}/doc PLIST_SUB+= DRUPAL_BASE=${DRUPAL_BASE} SUB_LIST+= DRUPAL_BASE=${DRUPAL_BASE} DRUPAL_DIR=${DRUPAL_DIR} -.if ! ${_DRUPAL_COMP} +. if ! ${_DRUPAL_COMP} DOCSDIR?= ${DRUPAL_DOCSDIR} -.endif +. endif -.if ${_DRUPAL_COMP} +. if ${_DRUPAL_COMP} _USES_POST+= drupal PKGNAMEPREFIX= drupal${_DRUPAL_VERSION}- # drupal contributions must be licensed under the GPLv2 or GPLv3. This is # documented at: http://drupal.org/licensing/faq/ -.if !defined(LICENSE) +. if !defined(LICENSE) LICENSE= GPLv2 GPLv3 LICENSE_COMB= dual -.endif +. endif -.if defined(DRUPAL_MODSUBDIR) +. if defined(DRUPAL_MODSUBDIR) DRUPAL_MODDIR?= ${DRUPAL_BASE}/sites/all/${_DRUPAL_COMP}s/${DRUPAL_MODSUBDIR} -.else +. else DRUPAL_MODDIR?= ${DRUPAL_BASE}/sites/all/${_DRUPAL_COMP}s -.endif +. endif DRUPAL_MODLIB?= ${DRUPAL_BASE}/sites/all/libraries DOCSDIR?= ${DRUPAL_DOCSDIR}/${PORTNAME} MASTER_SITE_DRUPAL+= \ http://ftp.drupal.org/files/projects/ \ http://ftp.osuosl.org/pub/drupal/files/projects/ MASTER_SITE_DRUPAL_SUBDIR= MASTER_SITES?= ${MASTER_SITE_DRUPAL} MASTER_SITE_SUBDIR?= ${MASTER_SITE_DRUPAL_SUBDIR} DIST_SUBDIR= drupal NO_BUILD?= yes WRKSRC?= ${WRKDIR}/${PORTNAME} RUN_DEPENDS+= ${LOCALBASE}/${DRUPAL_BASE}/index.php:${DRUPAL_BASE} PLIST_SUB+= DRUPAL_MODDIR=${DRUPAL_MODDIR} PLIST_FILES+= "@owner www" \ "@group www" \ ${MODULE_FILES:C|^|%%DRUPAL_MODDIR%%/|} \ "@owner root" \ "@group wheel" PLIST_DIRS+= ${MODULE_DIRS:C|^|%%DRUPAL_MODDIR%%/|} -.endif +. endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_DRUPAL_POST_MK) _INCLUDE_USES_DRUPAL_POST_MK= yes -.if ${_DRUPAL_COMP} -.if ${PORT_OPTIONS:MDOCS} +. if ${_DRUPAL_COMP} +. if ${PORT_OPTIONS:MDOCS} PLIST_FILES+= ${DOC_FILES:C|^|%%DOCSDIR%%/|} PLIST_DIRS+= ${DOC_DIRS:C|^|%%DOCSDIR%%/|} PLIST_DIRS+= %%DOCSDIR%% -.endif +. endif do-install: @${MKDIR} ${DRUPAL_MODDIR:C|^|${STAGEDIR}${PREFIX}/|} -.if defined(MODULE_DIRS) +. if defined(MODULE_DIRS) @${MKDIR} ${MODULE_DIRS:C|^|${STAGEDIR}${PREFIX}/${DRUPAL_MODDIR}/|} -.endif -.for f in ${MODULE_FILES} +. endif +. for f in ${MODULE_FILES} @${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/${DRUPAL_MODDIR}/${f} -.endfor +. endfor @${MKDIR} ${STAGEDIR}${DOCSDIR} ${DOC_DIRS:C|^|${STAGEDIR}${DOCSDIR}/|} -.for f in ${DOC_FILES} +. for f in ${DOC_FILES} @${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/${f} -.endfor +. endfor -.endif +. endif .endif diff --git a/Mk/Uses/elixir.mk b/Mk/Uses/elixir.mk index 7176d2aa6d3a..fbfe407907d6 100644 --- a/Mk/Uses/elixir.mk +++ b/Mk/Uses/elixir.mk @@ -1,124 +1,124 @@ # Handle Elixir related ports # # Feature: elixir # Usage: USES=elixir # Valid ARGS: does not require args # # Additional variables: # # ELIXIR_APP_NAME - Elixir app name as installed in Elixir's lib directory # ELIXIR_LIB_ROOT - Elixir default library path # ELIXIR_APP_ROOT - Root directory for this Elixir app # ELIXIR_HIDDEN - Applications to be hidden from the code path; usually ${PORTNAME} # ELIXIR_LOCALE - An UTF-8 locale to be used by Elixir during builds (any UTF-8 locale is good) # MIX_CMD - The "mix" command # MIX_COMPILE - The "mix" command used to compile an Elixir app # MIX_REWRITE - Automatically replace Mix dependencies with code paths # MIX_BUILD_DEPS - List of BUILD_DEPENDS in category/portname format # (commonly referenced to as "deps" in Erlang and Elixir) # MIX_RUN_DEPS - List of RUN_DEPENDS in category/portname format # MIX_DOC_DIRS - Extra doc directories to be installed in DOCSDIR # MIX_DOC_FILES - Extra doc files to be installed in DOCSDIR (usually README.md) # MIX_ENV - Environment for the Mix build (same format as MAKE_ENV) # MIX_ENV_NAME - Name of the Mix build environment, usually "prod" # MIX_BUILD_NAME - Name of the build output in _build/, usually ${MIX_ENV_NAME} # MIX_TARGET - Name of the Mix target, usually "compile" # MIX_EXTRA_APPS - List of sub-applications to be built, if any # MIX_EXTRA_DIRS - List of extra directories to be installed in ELIXIR_APP_ROOT # MIX_EXTRA_FILES - List of extra files to be installed in ELIXIR_APP_ROOT # # MAINTAINER: olgeni@FreeBSD.org .if !defined(_INCLUDE_USES_ELIXIR_MK) _INCLUDE_USES_ELIXIR_MK=yes -.if !empty(elixir_ARGS) +. if !empty(elixir_ARGS) IGNORE= USES=elixir does not require args -.endif +. endif ELIXIR_APP_NAME?= ${PORTNAME} ELIXIR_LIB_ROOT?= ${LOCALBASE}/lib/elixir/lib ELIXIR_APP_ROOT?= ${PREFIX}/lib/elixir/lib/${ELIXIR_APP_NAME} ELIXIR_HIDDEN?= "^${ELIXIR_APP_NAME}$$" ELIXIR_LOCALE?= en_US.UTF-8 MIX_CMD?= ${LOCALBASE}/bin/mix MIX_COMPILE?= ${SETENV} ${MIX_ENV} LANG=${ELIXIR_LOCALE} LC_ALL=${ELIXIR_LOCALE} MIX_ENV=${MIX_ENV_NAME} ELIXIR_HIDDEN=${ELIXIR_HIDDEN} ${MIX_CMD} ${MIX_TARGET} MIX_REWRITE?= MIX_BUILD_DEPS?= MIX_RUN_DEPS?= MIX_DOC_DIRS?= MIX_DOC_FILES?= README.md MIX_ENV?= MIX_ENV_NAME?= prod MIX_BUILD_NAME?= prod MIX_TARGET?= compile MIX_EXTRA_APPS?= MIX_EXTRA_DIRS?= MIX_EXTRA_FILES?= BUILD_DEPENDS+= elixir:lang/elixir RUN_DEPENDS+= elixir:lang/elixir -.for depend in ${MIX_BUILD_DEPS} +. for depend in ${MIX_BUILD_DEPS} BUILD_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.for depend in ${MIX_RUN_DEPS} +. for depend in ${MIX_RUN_DEPS} RUN_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.if !target(do-build) +. if !target(do-build) do-build: -.if ${MIX_REWRITE} != "" +. if ${MIX_REWRITE} != "" @${REINPLACE_CMD} -i '' -E -e "s@\{.*(only|optional): .*},?@@" ${WRKSRC}/mix.exs -.for depend in ${MIX_BUILD_DEPS} +. for depend in ${MIX_BUILD_DEPS} @if [ $$(echo ${depend:T} | sed -e "s/erlang-//") != ${depend:T} ]; then \ ${REINPLACE_CMD} -i '' -E -e "s@\{ *:(${depend:T:S/erlang-//}), *(github:|\").*} *,?@@" ${WRKSRC}/mix.exs; \ else \ ${REINPLACE_CMD} -i '' -E -e "s@\{ *:(${depend:T:S/elixir-//}), *(github:|\").*}@{ :\1, path: \"${ELIXIR_LIB_ROOT}/\\1\", compile: false }@" ${WRKSRC}/mix.exs; \ fi -.endfor -.endif +. endfor +. endif @${RM} ${WRKSRC}/mix.lock @cd ${WRKSRC} && ${MIX_COMPILE} -.for app in ${MIX_EXTRA_APPS} +. for app in ${MIX_EXTRA_APPS} @${RM} ${WRKSRC}/${app}/mix.lock @cd ${WRKSRC}/${app} && ${MIX_COMPILE} -.endfor -.endif # .if !target(do-build) +. endfor +. endif # .if !target(do-build) -.if !target(do-install) +. if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT} @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/lib cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${STAGEDIR}${ELIXIR_APP_ROOT}/lib @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin ${INSTALL_DATA} ${WRKSRC}/_build/${MIX_BUILD_NAME}/lib/${ELIXIR_APP_NAME}/ebin/* \ ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin if [ -d ${WRKSRC}/priv ]; then \ ${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/priv; \ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${ELIXIR_APP_ROOT}/priv; \ fi -.if ${MIX_DOC_FILES} != "" || ${MIX_DOC_DIRS} != "" +. if ${MIX_DOC_FILES} != "" || ${MIX_DOC_DIRS} != "" @${MKDIR} ${STAGEDIR}${DOCSDIR} -.endif -.for file in ${MIX_DOC_FILES} +. endif +. for file in ${MIX_DOC_FILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR} -.endfor -.for dir in ${MIX_DOC_DIRS} +. endfor +. for dir in ${MIX_DOC_DIRS} cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${STAGEDIR}${DOCSDIR} -.endfor -.for file in ${MIX_EXTRA_FILES} +. endfor +. for file in ${MIX_EXTRA_FILES} ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${ELIXIR_APP_ROOT} -.endfor -.for dir in ${MIX_EXTRA_DIRS} +. endfor +. for dir in ${MIX_EXTRA_DIRS} @${MKDIR} ${STAGEDIR}${ELIXIR_APP_ROOT}/${dir} cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}${ELIXIR_APP_ROOT}/${dir} -.endfor -.for app in ${MIX_EXTRA_APPS} +. endfor +. for app in ${MIX_EXTRA_APPS} ${INSTALL_DATA} ${WRKSRC}/${app}/_build/${MIX_BUILD_NAME}/lib/*/ebin/* \ ${STAGEDIR}${ELIXIR_APP_ROOT}/ebin -.endfor -.endif # .if !target(do-install) +. endfor +. endif # .if !target(do-install) .endif #!defined(_INCLUDE_USES_ELIXIR_MK) diff --git a/Mk/Uses/emacs.mk b/Mk/Uses/emacs.mk index e2c19e5f53c1..83cfd57871cb 100644 --- a/Mk/Uses/emacs.mk +++ b/Mk/Uses/emacs.mk @@ -1,154 +1,154 @@ # Provide support for ports requiring Emacs. This includes flavors with proper # dependencies and useful variables. # # Feature: emacs # Usage: USES=emacs or USES=emacs:args # Valid ARGS: build, run, noflavors # # build Indicates that Emacs is required at build time. # run Indicates that Emacs is required at run time. # noflavors Prevents flavors. This is implied when there is no run # dependency on Emacs. # # If build and run are omitted from the argument list, Emacs will be added to # BUILD_DEPENDS and RUN_DEPENDS. EMACS_NO_DEPENDS can be set to prevent both # dependencies. # # Variables, which can be set in make.conf: # DEFAULT_VERSIONS+= The default flavor for Emacs ports (ports with # USES=emacs, but not the Emacs ports themselves) # can be added to DEFAULT_VERSIONS. For example, # DEFAULT_VERSIONS+= emacs=nox # Valid flavors: full canna nox devel_full devel_nox # Flavors specified on the command line take # precedence. # # Variables, which can be set by ports: # EMACS_FLAVORS_EXCLUDE: Do NOT build these Emacs flavors. # If EMACS_FLAVORS_EXCLUDE is not defined and # - there is a run dependency on Emacs # - the noflavors argument is not specified # then all valid Emacs flavors are assumed. # # EMACS_NO_DEPENDS: Do NOT add build or run dependencies on Emacs. # This will prevent flavors. # # Variables, which can be read by ports: # EMACS_CMD: Emacs command with full path (e.g. /usr/local/bin/emacs-28.1) # EMACS_FLAVOR: Used for dependencies (e.g. BUILD_DEPENDS= dash.el${EMACS_PKGNAMESUFFIX}>0:devel/dash@${EMACS_FLAVOR}) # EMACS_LIBDIR: Emacs Library directory without ${PREFIX} (e.g. share/emacs) # EMACS_LIBDIR_WITH_VER: Library directory without ${PREFIX} including version (e.g. share/emacs/28.1) # EMACS_MAJOR_VER: Emacs major version (e.g. 28) # EMACS_PKGNAMESUFFIX: PKGNAMESUFFIX to distinguish Emacs flavors # EMACS_SITE_LISPDIR: Emacs site-lisp directory without ${PREFIX} (e.g. share/emacs/site-lisp) # EMACS_VER: Emacs version (e.g. 28.1) # EMACS_VERSION_SITE_LISPDIR: Include version (e.g. share/emacs/28.1/site-lisp) #------------------------------------------------------------------------------- # # MAINTAINER: emacs@FreeBSD.org .if !defined(_INCLUDE_USES_EMACS_MK) _INCLUDE_USES_EMACS_MK= yes # Make sure that no dependency or some other environment variable # pollutes the build/run dependency detection .undef _EMACS_BUILD_DEP .undef _EMACS_RUN_DEP .undef _EMACS_NOFLAVORS _EMACS_ARGS= ${emacs_ARGS:S/,/ /g} -.if ${_EMACS_ARGS:Mbuild} +. if ${_EMACS_ARGS:Mbuild} _EMACS_BUILD_DEP= yes _EMACS_ARGS:= ${_EMACS_ARGS:Nbuild} -.endif -.if ${_EMACS_ARGS:Mrun} +. endif +. if ${_EMACS_ARGS:Mrun} _EMACS_RUN_DEP= yes _EMACS_ARGS:= ${_EMACS_ARGS:Nrun} -.endif -.if ${_EMACS_ARGS:Mnoflavors} +. endif +. if ${_EMACS_ARGS:Mnoflavors} _EMACS_NOFLAVORS= yes _EMACS_ARGS:= ${_EMACS_ARGS:Nnoflavors} -.endif +. endif # If the port does not specify a build or run dependency, and does not define # EMACS_NO_DEPENDS, assume both dependencies are required. -.if !defined(_EMACS_BUILD_DEP) && !defined(_EMACS_RUN_DEP) && \ +. if !defined(_EMACS_BUILD_DEP) && !defined(_EMACS_RUN_DEP) && \ !defined(EMACS_NO_DEPENDS) _EMACS_BUILD_DEP= yes _EMACS_RUN_DEP= yes -.endif +. endif # Only set FLAVORS when... -.if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) +. if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) FLAVORS= full canna nox devel_full devel_nox # Sort the default to be first -.if defined(EMACS_DEFAULT) +. if defined(EMACS_DEFAULT) FLAVORS:= ${EMACS_DEFAULT} ${FLAVORS:N${EMACS_DEFAULT}} -.endif -.for flavor in ${EMACS_FLAVORS_EXCLUDE} +. endif +. for flavor in ${EMACS_FLAVORS_EXCLUDE} FLAVORS:= ${FLAVORS:N${flavor}} -.endfor -.endif +. endfor +. endif # Only set FLAVOR when... -.if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) && empty(FLAVOR) -.if defined(EMACS_DEFAULT) +. if defined(_EMACS_RUN_DEP) && !defined(_EMACS_NOFLAVORS) && empty(FLAVOR) +. if defined(EMACS_DEFAULT) FLAVOR= ${EMACS_DEFAULT} -.else +. else FLAVOR= ${FLAVORS:[1]} -.endif # defined(EMACS_DEFAULT) -.endif # !defined(_EMACS_NOFLAVORS) && defined(_EMACS_RUN_DEP) && empty(FLAVOR) +. endif # defined(EMACS_DEFAULT) +. endif # !defined(_EMACS_NOFLAVORS) && defined(_EMACS_RUN_DEP) && empty(FLAVOR) -.if !empty(FLAVOR) +. if !empty(FLAVOR) EMACS_FLAVOR= ${FLAVOR} -.else +. else EMACS_FLAVOR= full -.endif +. endif -.if ${FLAVOR:Mdevel*} +. if ${FLAVOR:Mdevel*} EMACS_VER= 29.0.50 EMACS_PORTDIR= editors/emacs-devel -.else +. else EMACS_VER= 28.1 EMACS_PORTDIR= editors/emacs -.endif +. endif EMACS_MAJOR_VER= ${EMACS_VER:C/\..*//} EMACS_LIBDIR= share/emacs EMACS_LIBDIR_WITH_VER= share/emacs/${EMACS_VER} EMACS_PORT_NAME= emacs${EMACS_MAJOR_VER} -.if ${EMACS_FLAVOR} == "devel_full" +. if ${EMACS_FLAVOR} == "devel_full" EMACS_PKGNAMESUFFIX= -emacs_devel -.elif ${EMACS_FLAVOR} == "devel_nox" +. elif ${EMACS_FLAVOR} == "devel_nox" EMACS_PKGNAMESUFFIX= -emacs_devel_nox -.elif ${EMACS_FLAVOR} == "full" +. elif ${EMACS_FLAVOR} == "full" EMACS_PKGNAMESUFFIX= -.else +. else EMACS_PKGNAMESUFFIX= -emacs_${EMACS_FLAVOR} -.endif +. endif EMACS_CMD= ${PREFIX}/bin/emacs-${EMACS_VER} EMACS_SITE_LISPDIR= ${EMACS_LIBDIR}/site-lisp EMACS_VERSION_SITE_LISPDIR= ${EMACS_LIBDIR_WITH_VER}/site-lisp -.if defined(_EMACS_BUILD_DEP) +. if defined(_EMACS_BUILD_DEP) BUILD_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTDIR}@${EMACS_FLAVOR:C/devel_//} -.endif -.if defined(_EMACS_RUN_DEP) +. endif +. if defined(_EMACS_RUN_DEP) RUN_DEPENDS+= ${EMACS_CMD}:${EMACS_PORTDIR}@${EMACS_FLAVOR:C/devel_//} -.endif +. endif MAKE_ARGS+= EMACS=${EMACS_CMD} SCRIPTS_ENV+= EMACS_LIBDIR=${EMACS_LIBDIR} \ EMACS_VER=${EMACS_VER} \ EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \ EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR} \ EMACS_VERSION_SITE_LISPDIR=${EMACS_VERSION_SITE_LISPDIR} PLIST_SUB+= EMACS_LIBDIR=${EMACS_LIBDIR} \ EMACS_VER=${EMACS_VER} \ EMACS_LIBDIR_WITH_VER=${EMACS_LIBDIR_WITH_VER} \ EMACS_SITE_LISPDIR=${EMACS_SITE_LISPDIR} \ EMACS_VERSION_SITE_LISPDIR=${EMACS_VERSION_SITE_LISPDIR} .endif # _INCLUDE_USES_EMACS_MK diff --git a/Mk/Uses/erlang.mk b/Mk/Uses/erlang.mk index c729ed007fc9..df6927c3d501 100644 --- a/Mk/Uses/erlang.mk +++ b/Mk/Uses/erlang.mk @@ -1,136 +1,136 @@ # Handle Erlang related ports # # Feature: erlang # Usage: USES=erlang # Valid ARGS: rebar, rebar3, or no argument (custom build) # # Additional variables: # # ERL_APP_NAME - Erlang app name as installed in Erlang's lib dir (minus version) # ERL_APP_ROOT - Root directory for this Erlang app # REBAR_CMD - Path to the "rebar" command # REBAR3_CMD - Path to the "rebar3" command # REBAR_PROFILE - Rebar profile # REBAR_TARGETS - Rebar target list (usually compile, maybe escriptize) # ERL_BUILD_NAME - Build name for rebar3 # ERL_BUILD_DEPS - List of BUILD_DEPENDS in category/portname format # ERL_RUN_DEPS - List of RUN_DEPENDS in category/portname format # ERL_DOCS - List of documentation files and directories # # MAINTAINER: olgeni@FreeBSD.org .if !defined(_INCLUDE_USES_ERLANG_MK) _INCLUDE_USES_ERLANG_MK=yes ERL_APP_NAME?= ${PORTNAME} ERL_APP_ROOT?= ${PREFIX}/lib/erlang/lib/${ERL_APP_NAME}-${PORTVERSION} REBAR_CMD= ${LOCALBASE}/bin/rebar REBAR3_CMD= ${LOCALBASE}/bin/rebar3 REBAR_PROFILE?= default REBAR_TARGETS?= compile ERL_BUILD_NAME?= default ERL_BUILD_DEPS?= ERL_RUN_DEPS?= ERL_DOCS?= README* # VERSION is used in every Erlang pkg-plist PLIST_SUB+= VERSION="${PORTVERSION}" BUILD_DEPENDS+= erl:lang/erlang RUN_DEPENDS+= erl:lang/erlang -.if ${erlang_ARGS:Mrebar} +. if ${erlang_ARGS:Mrebar} BUILD_DEPENDS+= rebar>=0:devel/rebar -.endif +. endif -.if ${erlang_ARGS:Mrebar3} +. if ${erlang_ARGS:Mrebar3} BUILD_DEPENDS+= rebar3>=0:devel/rebar3 -.endif +. endif -.for depend in ${ERL_BUILD_DEPS} +. for depend in ${ERL_BUILD_DEPS} BUILD_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.for depend in ${ERL_RUN_DEPS} +. for depend in ${ERL_RUN_DEPS} RUN_DEPENDS+= ${depend:T}>=0:${depend} -.endfor +. endfor -.if ${erlang_ARGS:Mrebar} +. if ${erlang_ARGS:Mrebar} ERLANG_COMPILE= ${REBAR_CMD} -.endif +. endif -.if ${erlang_ARGS:Mrebar3} +. if ${erlang_ARGS:Mrebar3} ERLANG_COMPILE= HOME=${WRKDIR} ${REBAR3_CMD} -.endif +. endif _USES_patch+= 650:post-patch-erlang post-patch-erlang: @${FIND} ${WRKSRC} -name .gitignore -delete # Attempt to remove all traces of {vsn, ....}; replace with actual PORTVERSION @if [ -f ${WRKSRC}/src/${ERL_APP_NAME}.app.src ]; then \ ${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \ ${WRKSRC}/src/${ERL_APP_NAME}.app.src; \ fi @if [ -f ${WRKSRC}/ebin/${ERL_APP_NAME}.app ]; then \ ${REINPLACE_CMD} -i '' -e 's/{ *vsn,.*}/{vsn, "${PORTVERSION}"}/' \ ${WRKSRC}/ebin/${ERL_APP_NAME}.app; \ fi @${GREP} -l "%%LOCALBASE%%" $$(${FIND} ${WRKSRC} -type f) \ | ${XARGS} ${REINPLACE_CMD} -i '' -e "s@%%LOCALBASE%%@${LOCALBASE}@" @${GREP} -l "%%PORTVERSION%%" $$(${FIND} ${WRKSRC} -type f) \ | ${XARGS} ${REINPLACE_CMD} -i '' -e "s@%%PORTVERSION%%@${PORTVERSION}@" # Always try to build with the system version of rebar and rebar3 @if [ -f ${WRKSRC}/rebar.config ]; then \ ${REINPLACE_CMD} -i '' -e "s@\./rebar3@${REBAR3_CMD}@; s@\./rebar@${REBAR_CMD}@" \ ${WRKSRC}/rebar.config; \ fi @${RM} ${WRKSRC}/src/*.orig ${WRKSRC}/include/*.orig -.if !target(do-build) +. if !target(do-build) do-build: # This will cause calls to local rebar and rebar3 to fail; makes it easier to spot them @${RM} ${WRKSRC}/rebar ${WRKSRC}/rebar3 -.for target in ${REBAR_TARGETS} +. for target in ${REBAR_TARGETS} # Remove rebar.lock every time - it can be created again after each run of rebar3 @${RM} ${WRKSRC}/rebar.lock @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} -.endfor -.endif # !target(do-build) +. endfor +. endif # !target(do-build) -.if !target(do-install) +. if !target(do-install) do-install: @${MKDIR} ${STAGEDIR}${ERL_APP_ROOT} @${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/src cd ${WRKSRC}/src && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/src @${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/ebin -.if ${erlang_ARGS:Mrebar3} +. if ${erlang_ARGS:Mrebar3} ${INSTALL_DATA} ${WRKSRC}/_build/${ERL_BUILD_NAME}/lib/${ERL_APP_NAME}/ebin/* \ ${STAGEDIR}${ERL_APP_ROOT}/ebin -.else +. else ${INSTALL_DATA} ${WRKSRC}/ebin/* ${STAGEDIR}${ERL_APP_ROOT}/ebin -.endif +. endif if [ -d ${WRKSRC}/include ]; then \ ${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/include; \ cd ${WRKSRC}/include && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/include; \ fi if [ -d ${WRKSRC}/priv ]; then \ ${MKDIR} ${STAGEDIR}${ERL_APP_ROOT}/priv; \ cd ${WRKSRC}/priv && ${COPYTREE_SHARE} \* ${STAGEDIR}${ERL_APP_ROOT}/priv; \ fi -.if ${ERL_DOCS} != "" +. if ${ERL_DOCS} != "" @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for file in ${ERL_DOCS} +. for file in ${ERL_DOCS} if [ -d "${WRKSRC}/${file}" ]; then \ cd ${WRKSRC} && ${COPYTREE_SHARE} ${file} ${STAGEDIR}${DOCSDIR}; \ else \ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}; \ fi -.endfor -.endif # .if ${ERL_DOCS} != "" -.if ${REBAR_TARGETS:Mescriptize} +. endfor +. endif # .if ${ERL_DOCS} != "" +. if ${REBAR_TARGETS:Mescriptize} @${MKDIR} ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin -.endif -.endif # !target(do-install) +. endif +. endif # !target(do-install) .endif #!defined(_INCLUDE_USES_ERLANG_MK) diff --git a/Mk/Uses/fakeroot.mk b/Mk/Uses/fakeroot.mk index 2bef8fe2b8c7..160a7736faef 100644 --- a/Mk/Uses/fakeroot.mk +++ b/Mk/Uses/fakeroot.mk @@ -1,15 +1,15 @@ # Changes some default behaviour of build systems to allow installing as user. # # Feature: fakeroot # Usage: USES=fakeroot # Valid ARGS: none # # MAINTAINER: bapt@FreeBSD.org .if !defined(_INCLUDE_USES_FAKEROOT_MK) _INCLUDE_USES_FAKEROOT_MK= yes BUILD_DEPENDS+= fakeroot:security/fakeroot -.if ${UID} != 0 +. if ${UID} != 0 FAKEROOT?= fakeroot -.endif +. endif .endif diff --git a/Mk/Uses/fam.mk b/Mk/Uses/fam.mk index 6cdd1ff333e5..cc4edd6f52ce 100644 --- a/Mk/Uses/fam.mk +++ b/Mk/Uses/fam.mk @@ -1,60 +1,60 @@ # MAINTAINER: ports@FreeBSD.org # # Feature: fam # Usage: USES=fam or USES=fam:ARG # Valid ARG: gamin, fam # # User-specified File Alteration Monitor wish: # Usage: WITH_FAM_SYSTEM=ARG # Valid ARG: gamin (default), fam # # Handle dependency on File Alteration Monitor .if !defined(_INCLUDE_USES_FAM_MK) _INCLUDE_USES_FAM_MK= yes _fam_DEPENDS= libfam.so.0:devel/fam _gamin_DEPENDS= libfam.so.0:devel/gamin _FAM_SYSTEMS= fam gamin _DEFAULT_FAM= gamin -.if exists(${LOCALBASE}/libexec/gam_server) +. if exists(${LOCALBASE}/libexec/gam_server) _HAVE_FAM= gamin -.elif exists(${LOCALBASE}/bin/fam) +. elif exists(${LOCALBASE}/bin/fam) _HAVE_FAM= fam -.endif +. endif # Sanity checks -.if defined(WITH_FAM_SYSTEM) && defined(_HAVE_FAM) && ${_HAVE_FAM} != ${WITH_FAM_SYSTEM} +. if defined(WITH_FAM_SYSTEM) && defined(_HAVE_FAM) && ${_HAVE_FAM} != ${WITH_FAM_SYSTEM} IGNORE= FAM mismatch: ${_HAVE_FAM} is installed, but ${WITH_FAM_SYSTEM} desired -.endif +. endif -.if !empty(fam_ARGS) -.for _fam_ARGS in ${fam_ARGS} -. if ! ${_FAM_SYSTEMS:M${_fam_ARGS}} +. if !empty(fam_ARGS) +. for _fam_ARGS in ${fam_ARGS} +. if ! ${_FAM_SYSTEMS:M${_fam_ARGS}} IGNORE= Incorrect 'USES+= fam:${fam_ARGS}' usage: argument [${_fam_ARGS}] is not recognized -. endif -.endfor -. if defined(_HAVE_FAM) && ${_HAVE_FAM} != ${fam_ARGS} +. endif +. endfor +. if defined(_HAVE_FAM) && ${_HAVE_FAM} != ${fam_ARGS} IGNORE= FAM mismatch: port wants to use ${fam_ARGS} while you have ${_HAVE_FAM} -. endif -. if defined(WITH_FAM_SYSTEM) && ${WITH_FAM_SYSTEM} != ${fam_ARGS} +. endif +. if defined(WITH_FAM_SYSTEM) && ${WITH_FAM_SYSTEM} != ${fam_ARGS} IGNORE= FAM mismatch: port wants to use ${fam_ARGS} while you wish to use ${WITH_FAM_SYSTEM} +. endif . endif -.endif # Proceed -.if !empty(fam_ARGS) +. if !empty(fam_ARGS) _USE_FAM= ${fam_ARGS} -.elif defined(_HAVE_FAM) +. elif defined(_HAVE_FAM) _USE_FAM= ${_HAVE_FAM} -.elif defined(WITH_FAM_SYSTEM) +. elif defined(WITH_FAM_SYSTEM) _USE_FAM= ${WITH_FAM_SYSTEM} -.else +. else _USE_FAM= ${_DEFAULT_FAM} -.endif +. endif LIB_DEPENDS+= ${_${_USE_FAM}_DEPENDS} .endif diff --git a/Mk/Uses/firebird.mk b/Mk/Uses/firebird.mk index 80c06442a251..23aaf9c5eb65 100644 --- a/Mk/Uses/firebird.mk +++ b/Mk/Uses/firebird.mk @@ -1,33 +1,33 @@ # Provide support for Firebird # Feature: firebird # Usage: USES= firebird[:version] # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_FIREBIRD_MK) _INCLUDE_USES_FIREBIRD_MK= yes -.if !empty(firebird_ARGS) +. if !empty(firebird_ARGS) FIREBIRD_VER= ${firebird_ARGS} -.else +. else FIREBIRD_VER= ${FIREBIRD_DEFAULT} -.endif +. endif # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. VALID_FIREBIRD_VER= 2.5 3.0 4.0 -.for v in ${FIREBIRD_DEFAULT} -. if ! ${VALID_FIREBIRD_VER:M$v} +. for v in ${FIREBIRD_DEFAULT} +. if ! ${VALID_FIREBIRD_VER:M$v} IGNORE= Invalid Firebird default version ${FIREBIRD_DEFAULT}; valid versions are ${VALID_FIREBIRD_VER} -. endif -.endfor +. endif +. endfor -.for w in ${FIREBIRD_VER} -. if ! ${VALID_FIREBIRD_VER:M$w} +. for w in ${FIREBIRD_VER} +. if ! ${VALID_FIREBIRD_VER:M$w} IGNORE= Invalid Firebird version ${FIREBIRD_VER}; valid versions are ${VALID_FIREBIRD_VER} -. endif -.endfor +. endif +. endfor LIB_DEPENDS+= libfbclient.so:databases/firebird${FIREBIRD_VER:S/.//}-client .endif diff --git a/Mk/Uses/fonts.mk b/Mk/Uses/fonts.mk index 1547744747bc..0c3957410c17 100644 --- a/Mk/Uses/fonts.mk +++ b/Mk/Uses/fonts.mk @@ -1,74 +1,74 @@ # handle fonts # Feature: fonts # Usage: USES=fonts # Valid ARGS: fc, fontsdir, fcfontsdir, none (empty means fcfontsdir) # fc Add @fc ${FONTSDIR} to PLIST_FILES # fontsdir Add @fontsdir ${FONTSDIR} to PLIST_FILES # fcfontsdir Add @fcfontsdir ${FONTSDIR} to PLIST_FILES # none No special handling of ${FONTSDIR} in PLIST_FILES # Ports should use USES=fonts with an argument only when necessary. # By default, @fcfontsdir ${FONTSDIR} is added and it updates font # information cache file of fontconfig library, and XLFD entries # in fonts.dir and fonts.scale file, which are directly used by # X server and xfs font server. # # Xorg supports TrueType and OpenType via either of the two font # subsystems. @fcfontsdir is designed to update configuration files for # both of them to register a font file. Specifically, fc-cache and # mkfontdir utilities are used, respectively. # # Ports to install fonts with which mkfontdir or fc-cache do not work well # should use :fc and/or :fontsdir argument. fc-cache and mkfontdir # get information such as fontname, encoding, etc. from a font file. # However, mkfontdir does not understand information in some scalable # fonts. Typical examples are TrueType Collection format and # CJK (Chinese, Japanese, and Korean) TrueType font. The former is # a format which contains multiple fonts in a single file. # While Xorg supports it, mkfontdir does not generate correct # fonts.dir entries from a TTC font. CJK fonts often require # modifiers in a XFLD entry to enable special feature which mkfontdir # does not support, either. # # Note that ports which do not want mkfontdir need to use # a separate FONTSDIR, not shared ones such as misc or TTF. # This is because other ports using @fcfontsdir or @fontsdir # update fonts.dir in these font directories upon installation # and deinstallation. mkfontdir will overwrite manually-added entries. .if !defined(_INCLUDE_USES_FONTS_MK) _INCLUDE_USES_FONTS_MK= yes -.if empty(fonts_ARGS) +. if empty(fonts_ARGS) fonts_ARGS= fontsdir -.endif +. endif -.if !empty(fonts_ARGS:Nfc:Nfontsdir:Nnone) +. if !empty(fonts_ARGS:Nfc:Nfontsdir:Nnone) IGNORE= USES=fonts - invalid ARGS (${fonts_ARGS}) -.endif +. endif -.if !empty(fonts_ARGS:Mfc) || !empty(fonts_ARGS:Mfontsdir) +. if !empty(fonts_ARGS:Mfc) || !empty(fonts_ARGS:Mfontsdir) RUN_DEPENDS+= fc-cache:x11-fonts/fontconfig -.endif -.if !empty(fonts_ARGS:Mfontsdir) +. endif +. if !empty(fonts_ARGS:Mfontsdir) RUN_DEPENDS+= mkfontscale:x11-fonts/mkfontscale -.endif +. endif FONTNAME?= ${PORTNAME} FONTSDIR?= ${PREFIX}/share/fonts/${FONTNAME} -.if !empty(fonts_ARGS:Mfontsdir) +. if !empty(fonts_ARGS:Mfontsdir) PLIST_FILES+= "@${fonts_ARGS} ${FONTSDIR}" -.endif -.if defined(FONTPATHSPEC) && !empty(FONTPATHSPEC) +. endif +. if defined(FONTPATHSPEC) && !empty(FONTPATHSPEC) FONTPATHD?= ${LOCALBASE}/etc/X11/fontpath.d PLIST_FILES+= "${FONTPATHD}/${FONTPATHSPEC}" _USES_install+= 690:fonts-install-fontpathd fonts-install-fontpathd: @${MKDIR} ${STAGEDIR}${FONTPATHD} ${RLN} ${STAGEDIR}${FONTSDIR} ${STAGEDIR}${FONTPATHD}/${FONTPATHSPEC} -.endif +. endif SUB_LIST+= FONTSDIR="${FONTSDIR}" PLIST_SUB+= FONTSDIR="${FONTSDIR:S,^${PREFIX}/,,}" .endif diff --git a/Mk/Uses/fortran.mk b/Mk/Uses/fortran.mk index 734730bc2aca..b8accb6c84d1 100644 --- a/Mk/Uses/fortran.mk +++ b/Mk/Uses/fortran.mk @@ -1,44 +1,44 @@ # Fortran support # # Feature: fortran # Usage: USES=fortran # Valid ARGS: flang, gfortran (default) # # MAINTAINER: fortran@FreeBSD.org .if !defined(_INCLUDE_USES_FORTRAN_MK) _INCLUDE_USES_FORTRAN_MK= yes -.if empty(fortran_ARGS) +. if empty(fortran_ARGS) fortran_ARGS= ${FORTRAN_DEFAULT} -.endif +. endif -.if ${fortran_ARGS} == flang -.if ${ARCH} == amd64 +. if ${fortran_ARGS} == flang +. if ${ARCH} == amd64 BUILD_DEPENDS+= flang>0:devel/flang RUN_DEPENDS+= flang>0:devel/flang F77= flang FC= flang LDFLAGS+= -L${LOCALBASE}/flang/lib -Wl,--as-needed -lflang -lexecinfo -Wl,--no-as-needed -.else +. else IGNORE= USES=fortran: flang argument only available for amd64 -.endif -.elif ${fortran_ARGS} == gfortran +. endif +. elif ${fortran_ARGS} == gfortran _GCC_VER= ${GCC_DEFAULT:S/.//} BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} F77= gfortran${_GCC_VER} FC= gfortran${_GCC_VER} FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} FCFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} \ -L${LOCALBASE}/lib/gcc${_GCC_VER} -B${LOCALBASE}/bin -.else +. else IGNORE= USES=fortran: invalid arguments: ${fortran_ARGS} -.endif +. endif USE_BINUTILS= yes CONFIGURE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" .endif diff --git a/Mk/Uses/fpc.mk b/Mk/Uses/fpc.mk index 5371544865fa..f5f5517d3d4d 100644 --- a/Mk/Uses/fpc.mk +++ b/Mk/Uses/fpc.mk @@ -1,216 +1,216 @@ # Support for FPC-based ports. This automatically will install free pascal # compiler and units. # # Feature: fpc # Usage: USES=fpc # Valid ARGS: (none), run, base, all # # run - Free pascal units will be registered also as run dependencies. # # base - This automatically will install all base units of fpc # (gdbint graph ibase libasync hash httpd mysql netdb odbc # oracle pasjpeg paszlib pthreads postgres regexpr and sqlite). # # all - This automatically will install all free pascal units. # # if you need install additional fpc units, they can be listed there (USE_FPC=gtk2 x11 opengl). # # Example: # # USES+= fpc:run # USE_FPC=gtk2 # .if !defined(_INCLUDE_USES_FPC_MK) FPC_Include_MAINTAINER= acm@FreeBSD.org _INCLUDE_USES_FPC_MK= yes -.if defined(DEFAULT_FPC_VER) +. if defined(DEFAULT_FPC_VER) WARNING+= "DEFAULT_FPC_VER is defined, consider using DEFAULT_VERSIONS=fpc=${DEFAULT_FPC_VER} instead" -.endif +. endif -.if ${fpc_ARGS:Nrun:Nbase:Nall} +. if ${fpc_ARGS:Nrun:Nbase:Nall} IGNORE= Unknown argument for USES=fpc: ${fpc_ARGS:Nrun:Nbase:Nall} -.endif +. endif DEFAULT_FPC_VER= ${FPC_DEFAULT} # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. FPC_VER= ${DEFAULT_FPC_VER} FPC_ARCH= ${ARCH:S/amd64/x86_64/} -.if exists(${LOCALBASE}/bin/fpc) +. if exists(${LOCALBASE}/bin/fpc) FPC_CURRENT_VER!= ${LOCALBASE}/bin/fpc -iV -. if ${FPC_CURRENT_VER} != ${FPC_VER} +. if ${FPC_CURRENT_VER} != ${FPC_VER} IGNORE= incompatible fpc ${FPC_CURRENT_VER} compiler, please install ${FPC_VER} version -. endif -.endif +. endif +. endif -.if ${ARCH} == "i386" +. if ${ARCH} == "i386" PPNAME= ppc386 -.elif ${ARCH} == "amd64" +. elif ${ARCH} == "amd64" PPNAME= ppcx64 -.else +. else PPNAME= ppc_not_yet_ported ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64 -.endif +. endif BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \ ${PPNAME}:lang/fpc BUILDNAME= ${FPC_ARCH}-${OPSYS:tl} UNITSDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/units/${BUILDNAME} MKINSTDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME} _FPC_ALL_UNITS= a52 aspell bfd bzip2 cairo chm dblib dbus dts fastcgi \ fcl-async fcl-base fcl-db fcl-extra fcl-fpcunit fcl-image \ fcl-js fcl-json fcl-net fcl-passrc fcl-pdf fcl-registry \ fcl-report fcl-res fcl-sdo fcl-sound fcl-stl fcl-web fcl-xml \ fftw fpindexer fppkg fv gdbint gdbm gnutls gmp googleapi \ graph gtk2 hermes httpd22 httpd24 ibase iconvenc imagemagick \ ldap libcups libcurl libenet libfontconfig libgd libmagic \ libmicrohttpd libpng libvlc libxml2 lua mad modplug \ mysql ncurses newt numlib odata odbc oggvorbis openal opengl openssl \ oracle pasjpeg pastojs pcap postgres proj4 pthreads pxlib \ regexpr rexx rsvg rtl-console rtl-extra rtl-generics rtl-objpas \ rtl-unicode sdl sqlite svgalib symbolic syslog tplylib unzip \ users utmp uuid vcl-compat webidl x11 xforms zlib -.if ${fpc_ARGS:Mbase} +. if ${fpc_ARGS:Mbase} USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \ postgres pthreads regexpr sqlite -.endif +. endif -.if ${fpc_ARGS:Mall} +. if ${fpc_ARGS:Mall} USE_FPC= ${_FPC_ALL_UNITS} -.endif +. endif -.if defined(USE_FPC) && ${USE_FPC:tl} != "yes" -. for UNITS in ${USE_FPC} -. if ${_FPC_ALL_UNITS:M${UNITS}}=="" +. if defined(USE_FPC) && ${USE_FPC:tl} != "yes" +. for UNITS in ${USE_FPC} +. if ${_FPC_ALL_UNITS:M${UNITS}}=="" IGNORE= cannot install: unknown FPC unit ${UNITS} -. endif -. endfor -.endif +. endif +. endfor +. endif # Base units gdbint_UNIT= devel/fpc-gdbint graph_UNIT= graphics/fpc-graph httpd22_UNIT= www/fpc-httpd22 httpd24_UNIT= www/fpc-httpd24 ibase_UNIT= databases/fpc-ibase mysql_UNIT= databases/fpc-mysql odbc_UNIT= databases/fpc-odbc oracle_UNIT= databases/fpc-oracle pasjpeg_UNIT= graphics/fpc-pasjpeg postgres_UNIT= databases/fpc-postgres pthreads_UNIT= devel/fpc-pthreads regexpr_UNIT= devel/fpc-regexpr sqlite_UNIT= databases/fpc-sqlite # Extra units a52_UNIT= audio/fpc-a52 aspell_UNIT= textproc/fpc-aspell bfd_UNIT= devel/fpc-bfd bzip2_UNIT= archivers/fpc-bzip2 cairo_UNIT= graphics/fpc-cairo chm_UNIT= misc/fpc-chm dblib_UNIT= databases/fpc-dblib dbus_UNIT= devel/fpc-dbus dts_UNIT= multimedia/fpc-dts fastcgi_UNIT= www/fpc-fastcgi fcl_async_UNIT= devel/fpc-fcl-async fcl_base_UNIT= devel/fpc-fcl-base fcl_db_UNIT= devel/fpc-fcl-db fcl_extra_UNIT= devel/fpc-fcl-extra fcl_fpcunit_UNIT= devel/fpc-fcl-fpcunit fcl_image_UNIT= devel/fpc-fcl-image fcl_js_UNIT= devel/fpc-fcl-js fcl_json_UNIT= devel/fpc-fcl-json fcl_net_UNIT= devel/fpc-fcl-net fcl_passrc_UNIT= devel/fpc-fcl-passrc fcl_pdf_UNIT= devel/fpc-fcl-pdf fcl_registry_UNIT= devel/fpc-fcl-registry fcl_report_UNIT= devel/fpc-fcl-report fcl_res_UNIT= devel/fpc-fcl-res fcl_sdo_UNIT= devel/fpc-fcl-sdo fcl_sound_UNIT= devel/fpc-fcl-sound fcl_stl_UNIT= devel/fpc-fcl-stl fcl_web_UNIT= devel/fpc-fcl-web fcl_xml_UNIT= devel/fpc-fcl-xml fftw_UNIT= math/fpc-fftw fpindexer_UNIT= databases/fpc-fpindexer fppkg_UNIT= devel/fpc-fppkg fpvectorial_UNIT= graphics/fpc-fpvectorial fv_UNIT= devel/fpc-fv hermes_UNIT= graphics/fpc-hermes gdbm_UNIT= databases/fpc-gdbm gnutls_UNIT= security/fpc-gnutls gmp_UNIT= math/fpc-gmp googleapi_UNIT= www/fpc-googleapi gtk2_UNIT= x11-toolkits/fpc-gtk2 iconvenc_UNIT= converters/fpc-iconvenc imagemagick_UNIT= graphics/fpc-imagemagick ldap_UNIT= net/fpc-ldap libcurl_UNIT= ftp/fpc-libcurl libcups_UNIT= print/fpc-libcups libenet_UNIT= net/fpc-libenet libfontconfig_UNIT= x11-fonts/fpc-libfontconfig libgd_UNIT= graphics/fpc-libgd libmagic_UNIT= devel/fpc-libmagic libmicrohttpd_UNIT= www/fpc-libmicrohttpd libpng_UNIT= graphics/fpc-libpng libvlc_UNIT= multimedia/fpc-libvlc libxml2_UNIT= textproc/fpc-libxml2 lua_UNIT= lang/fpc-lua mad_UNIT= audio/fpc-mad modplug_UNIT= audio/fpc-modplug newt_UNIT= devel/fpc-newt ncurses_UNIT= graphics/fpc-ncurses numlib_UNIT= math/fpc-numlib odata_UNIT= devel/fpc-odata oggvorbis_UNIT= audio/fpc-oggvorbis openal_UNIT= audio/fpc-openal opengl_UNIT= graphics/fpc-opengl openssl_UNIT= security/fpc-openssl pastojs_UNIT= lang/fpc-pastojs pcap_UNIT= net/fpc-pcap proj4_UNIT= graphics/fpc-proj4 pxlib_UNIT= databases/fpc-pxlib rexx_UNIT= lang/fpc-rexx rsvg_UNIT= graphics/fpc-rsvg rtl_console_UNIT= lang/fpc-rtl-console rtl_extra_UNIT= lang/fpc-rtl-extra rtl_generics_UNIT= lang/fpc-rtl-generics rtl_objpas_UNIT= lang/fpc-rtl-objpas rtl_unicode_UNIT= lang/fpc-rtl-unicode sdl_UNIT= devel/fpc-sdl svgalib_UNIT= graphics/fpc-svgalib symbolic_UNIT= devel/fpc-symbolic syslog_UNIT= sysutils/fpc-syslog tplylib_UNIT= devel/fpc-tplylib unzip_UNIT= archivers/fpc-unzip users_UNIT= sysutils/fpc-users utmp_UNIT= sysutils/fpc-utmp uuid_UNIT= sysutils/fpc-uuid vcl_compat_UNIT= graphics/fpc-vcl-compat webidl_UNIT= www/fpc-webidl x11_UNIT= x11/fpc-x11 xforms_UNIT= x11-toolkits/fpc-xforms zlib_UNIT= devel/fpc-zlib .endif .if defined(USE_FPC) -. for UNIT in ${USE_FPC} -. if ${_FPC_ALL_UNITS:M${UNIT}} != "" +. for UNIT in ${USE_FPC} +. if ${_FPC_ALL_UNITS:M${UNIT}} != "" BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} -. if ${fpc_ARGS:Mrun} || ${fpc_ARGS:Mbase} +. if ${fpc_ARGS:Mrun} || ${fpc_ARGS:Mbase} RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} -. endif -. endif -. endfor +. endif +. endif +. endfor .endif diff --git a/Mk/Uses/fuse.mk b/Mk/Uses/fuse.mk index e56f955d1103..9250a86e2429 100644 --- a/Mk/Uses/fuse.mk +++ b/Mk/Uses/fuse.mk @@ -1,24 +1,24 @@ # Handle dependency on the fuse port # # Feature: fuse # Usage: USES=fuse[:version] # Valid ARGS: 2 [default], 3 # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_FUSE_MK) _INCLUDE_USES_FUSE_MK= yes -.if !empty(fuse_ARGS) +. if !empty(fuse_ARGS) LIBFUSE_VER= ${fuse_ARGS} -.endif +. endif LIBFUSE_VER?= 2 -.if ${LIBFUSE_VER} == 2 +. if ${LIBFUSE_VER} == 2 LIB_DEPENDS+= libfuse.so:sysutils/fusefs-libs -.elif ${LIBFUSE_VER} == 3 +. elif ${LIBFUSE_VER} == 3 LIB_DEPENDS+= libfuse3.so:sysutils/fusefs-libs3 -.else +. else IGNORE= cannot install: unknown FUSE library version: ${LIBFUSE_VERSION} -.endif +. endif .endif diff --git a/Mk/Uses/gem.mk b/Mk/Uses/gem.mk index 274640eb89cb..499bc1fb752a 100644 --- a/Mk/Uses/gem.mk +++ b/Mk/Uses/gem.mk @@ -1,141 +1,141 @@ # Support rubygem packages # # Feature: gem # Usage: USES=gem[:noautoplist] # Valid args: noautoplist Don't generate the plist automatically # # MAINTAINER: ruby@FreeBSD.org .if !defined(_INCLUDE_USES_GEM_MK) _INCLUDE_USES_GEM_MK= yes _valid_ARGS= noautoplist # Sanity check -.for arg in ${gem_ARGS} +. for arg in ${gem_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= gem:${gem_ARGS}' usage: argument [${arg}] is not recognized . endif -.endfor +. endfor BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems RUN_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems PKGNAMEPREFIX?= rubygem- EXTRACT_SUFX= .gem EXTRACT_ONLY= DIST_SUBDIR= rubygem EXTRACT_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER} GEMS_DIR= ${GEMS_BASE_DIR}/gems DOC_DIR= ${GEMS_BASE_DIR}/doc CACHE_DIR= ${GEMS_BASE_DIR}/cache SPEC_DIR= ${GEMS_BASE_DIR}/specifications EXT_DIR= ${GEMS_BASE_DIR}/extensions PLUGINS_DIR= ${GEMS_BASE_DIR}/plugins GEM_NAME?= ${DISTNAME} GEM_LIB_DIR?= ${GEMS_DIR}/${GEM_NAME} GEM_DOC_DIR?= ${DOC_DIR}/${GEM_NAME} GEM_SPEC?= ${SPEC_DIR}/${GEM_NAME}.gemspec GEM_CACHE?= ${CACHE_DIR}/${GEM_NAME}.gem GEMSPEC= ${PORTNAME}.gemspec GEM_ENV+= RB_USER_INSTALL=yes USE_LOCALE?= en_US.UTF-8 GEM_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ REV="${RUBY_GEM}" \ GEMS_BASE_DIR="lib/ruby/gems/${RUBY_VER}" \ GEMS_DIR="${GEMS_DIR}" \ DOC_DIR="${DOC_DIR}" \ CACHE_DIR="${CACHE_DIR}" \ SPEC_DIR="${SPEC_DIR}" \ EXT_DIR="${EXT_DIR}" \ PLUGINS_DIR="${PLUGINS_DIR}" \ PORT="${PORTNAME}-${PORTVERSION}" \ GEM_NAME="${GEM_NAME}" \ GEM_LIB_DIR="${GEM_LIB_DIR}" \ GEM_DOC_DIR="${GEM_DOC_DIR}" \ GEM_SPEC="${GEM_SPEC}" \ GEM_CACHE="${GEM_CACHE}" \ EXTRACT_SUFX="${EXTRACT_SUFX}" RUBYGEMBIN= ${LOCALBASE}/bin/gem -. if defined(DISTFILES) +. if defined(DISTFILES) GEMFILES= ${DISTFILES:C/:[^:]+$//} -. else +. else GEMFILES= ${DISTNAME}${EXTRACT_SUFX} -. endif +. endif RUBYGEM_ARGS=-l --no-update-sources --install-dir ${STAGEDIR}${PREFIX}/lib/ruby/gems/${RUBY_VER} --ignore-dependencies --bindir=${STAGEDIR}${PREFIX}/bin -.if ${PORT_OPTIONS:MDOCS} +. if ${PORT_OPTIONS:MDOCS} RUBYGEM_ARGS+= --document rdoc,ri -.else +. else RUBYGEM_ARGS+= --no-document -.endif +. endif -.if !target(do-extract) +. if !target(do-extract) do-extract: @${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} spec --ruby ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} > ${GEMSPEC} ; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Extraction failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) -.endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: (cd ${BUILD_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- ${CONFIGURE_ARGS}) ${RM} -r ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/build_info/ ${FIND} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} -type f -name '*.so' -exec ${STRIP_CMD} {} + ${FIND} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR} -type f \( -name mkmf.log -or -name gem_make.out \) -delete ${FIND} ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR}/ext -type f -not -name '*.so' -delete 2> /dev/null || ${TRUE} ${FIND} ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR}/ext -type d -empty -delete 2> /dev/null || ${TRUE} ${RM} -r ${STAGEDIR}${PREFIX}/${CACHE_DIR} 2> /dev/null || ${TRUE} ${RMDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR} 2> /dev/null || ${TRUE} ${RMDIR} ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} 2> /dev/null || ${TRUE} -.if !${PORT_OPTIONS:MDOCS} +. if !${PORT_OPTIONS:MDOCS} -@${RMDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR} -.endif -.endif +. endif +. endif -.if empty(gem_ARGS:Mnoautoplist) +. if empty(gem_ARGS:Mnoautoplist) _USES_install+= 820:gem-autoplist gem-autoplist: @${ECHO_CMD} ${GEM_SPEC} >> ${TMPPLIST} -.if ${PORT_OPTIONS:MDOCS} +. if ${PORT_OPTIONS:MDOCS} @${FIND} -ds ${STAGEDIR}${PREFIX}/${DOC_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} -.endif +. endif @${FIND} -ds ${STAGEDIR}${PREFIX}/${GEM_LIB_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} @if [ -d ${STAGEDIR}${PREFIX}/${EXT_DIR} ]; then \ ${FIND} -ds ${STAGEDIR}${PREFIX}/${EXT_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ fi @if [ -d ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} ]; then \ ${FIND} -ds ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ fi -.endif +. endif .endif diff --git a/Mk/Uses/gettext-runtime.mk b/Mk/Uses/gettext-runtime.mk index 568db58b87f0..374a19b45ec4 100644 --- a/Mk/Uses/gettext-runtime.mk +++ b/Mk/Uses/gettext-runtime.mk @@ -1,26 +1,26 @@ # Handle dependency on the gettext-runtime (libintl) port # # Feature: gettext-runtime # Usage: USES=gettext-runtime or USES=gettext-runtime:ARGS # Valid ARGS: lib (default), build, run # # MAINTAINER: tijl@FreeBSD.org .if !defined(_INCLUDE_USES_GETTEXT_RUNTIME_MK) _INCLUDE_USES_GETTEXT_RUNTIME_MK= yes -.if empty(gettext-runtime_ARGS) +. if empty(gettext-runtime_ARGS) gettext-runtime_ARGS= lib -.endif +. endif -.if ${gettext-runtime_ARGS:Mlib} +. if ${gettext-runtime_ARGS:Mlib} LIB_DEPENDS+= libintl.so:devel/gettext-runtime -.endif -.if ${gettext-runtime_ARGS:Mbuild} +. endif +. if ${gettext-runtime_ARGS:Mbuild} BUILD_DEPENDS+= gettext:devel/gettext-runtime -.endif -.if ${gettext-runtime_ARGS:Mrun} +. endif +. if ${gettext-runtime_ARGS:Mrun} RUN_DEPENDS+= gettext:devel/gettext-runtime -.endif +. endif .endif diff --git a/Mk/Uses/gettext-tools.mk b/Mk/Uses/gettext-tools.mk index 63e251bde988..948a505ed8b9 100644 --- a/Mk/Uses/gettext-tools.mk +++ b/Mk/Uses/gettext-tools.mk @@ -1,23 +1,23 @@ # Handle dependency on the gettext-tools port # # Feature: gettext-tools # Usage: USES=gettext-tools or USES=gettext-tools:ARGS # Valid ARGS: build (default), run # # MAINTAINER: tijl@FreeBSD.org .if !defined(_INCLUDE_USES_GETTEXT_TOOLS_MK) _INCLUDE_USES_GETTEXT_TOOLS_MK= yes -.if empty(gettext-tools_ARGS) +. if empty(gettext-tools_ARGS) gettext-tools_ARGS= build -.endif +. endif -.if ${gettext-tools_ARGS:Mbuild} +. if ${gettext-tools_ARGS:Mbuild} BUILD_DEPENDS+= msgfmt:devel/gettext-tools -.endif -.if ${gettext-tools_ARGS:Mrun} +. endif +. if ${gettext-tools_ARGS:Mrun} RUN_DEPENDS+= msgfmt:devel/gettext-tools -.endif +. endif .endif diff --git a/Mk/Uses/gettext.mk b/Mk/Uses/gettext.mk index 936f2056f3f2..bedcbfcce669 100644 --- a/Mk/Uses/gettext.mk +++ b/Mk/Uses/gettext.mk @@ -1,19 +1,19 @@ # Sets a library dependency on gettext-runtime and a build dependency # on gettext-tools. Same as "USES=gettext-runtime gettext-tools". # # Feature: gettext # Usage: USES=gettext # # MAINTAINER: tijl@FreeBSD.org .if !defined(_INCLUDE_USES_GETTEXT_MK) _INCLUDE_USES_GETTEXT_MK= yes -.if !empty(gettext_ARGS) +. if !empty(gettext_ARGS) IGNORE= USES=gettext does not take arguments -.endif +. endif .include "${USESDIR}/gettext-runtime.mk" .include "${USESDIR}/gettext-tools.mk" .endif diff --git a/Mk/Uses/ghostscript.mk b/Mk/Uses/ghostscript.mk index b59bbc28e034..ea76af70ef47 100644 --- a/Mk/Uses/ghostscript.mk +++ b/Mk/Uses/ghostscript.mk @@ -1,105 +1,105 @@ # Provide support for ghostscript ports. # # Feature: ghostscript # Usage: USES=ghostscript or USES=ghostscript:args # Valid ARGS: , build, run, test, x11 # # version The chooseable versions are 7, 8, 9 and agpl. If no version is # specified version agpl is selected. # # USES=ghostscript:7 # Use Ghostscript 7 # USES=ghostscript:run # Use the set default Ghostscript as a run dependency # USES=ghostscript:8,build # Use ghostscript 8 as a build dependency. # # x11 Indicate that X11 support is required. # build Indicates that Ghostscript is needed at build time and adds # it as BUILD_DEPENDS. # run Indicates that Ghostscript is needed at run time and adds # it as RUN_DEPENDS. # test Indicates that Ghostscript is needed at test time and adds # it as TEST_DEPENDS. # # If build and run are omitted, Ghostscript will be added as BUILD_DEPENDS and # RUN_DEPENDS. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_GHOSTSCRIPT_MK) _INCLUDE_USES_GHOSTSCRIPT_MK= yes # allowed versions # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _GS_VERSION= 7 8 9 agpl _GS_ARGS= ${ghostscript_ARGS} -.if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun:Ntest} +. if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun:Ntest} IGNORE?= Unknown ghostscript argument ${_GS_ARGS} -.endif +. endif -.if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl} +. if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl} IGNORE?= Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT}, please select one of ${_GS_VERSION} -.endif +. endif # Make sure that no dependency or some other environment variable # pollutes the build/run dependency detection .undef _GS_BUILD_DEP .undef _GS_RUN_DEP .undef _GS_TEST_DEP -.if ${_GS_ARGS:Mbuild} +. if ${_GS_ARGS:Mbuild} _GS_BUILD_DEP= yes -.endif -.if ${_GS_ARGS:Mrun} +. endif +. if ${_GS_ARGS:Mrun} _GS_RUN_DEP= yes -.endif -.if ${_GS_ARGS:Mtest} +. endif +. if ${_GS_ARGS:Mtest} _GS_TEST_DEP= yes -.endif +. endif # The port does not specify a build, run, or test dependency, assume that # a build and run dependency is required. -.if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP) && !defined(_GS_TEST_DEP) +. if !defined(_GS_BUILD_DEP) && !defined(_GS_RUN_DEP) && !defined(_GS_TEST_DEP) _GS_BUILD_DEP= yes _GS_RUN_DEP= yes -.endif +. endif .undef _GS_SELECTED -.for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} +. for V in ${_GS_ARGS} ${GHOSTSCRIPT_DEFAULT} _V=${V} -.if ${_V:M9} +. if ${_V:M9} _GS_SELECTED?= 9 -.elif ${_V:Magpl} +. elif ${_V:Magpl} _GS_SELECTED?= 9-agpl -.elif ${_V:M8} +. elif ${_V:M8} _GS_SELECTED?= 8 -.elif ${_V:M7} +. elif ${_V:M7} _GS_SELECTED?= 7 -.endif -.endfor +. endif +. endfor # Resolve minor version number for X11.so library. -.if !empty(_GS_SELECTED:M9-agpl) +. if !empty(_GS_SELECTED:M9-agpl) _GS_VERSION_MINOR= 9.16_2 -.elif !empty(_GS_SELECTED:M9) +. elif !empty(_GS_SELECTED:M9) _GS_VERSION_MINOR= 9.06_11 -.elif !empty(_GS_SELECTED:M8) +. elif !empty(_GS_SELECTED:M8) _GS_VERSION_MINOR= 8.71_19 -.elif !empty(_GS_SELECTED:M7) +. elif !empty(_GS_SELECTED:M7) _GS_VERSION_MINOR= 7.07_32 -.endif +. endif # dependencies _GS_PORT= ghostscript${_GS_SELECTED}-base _GS_X11_PORT= ghostscript${_GS_SELECTED}-x11 -.for type in BUILD RUN TEST -.if defined(_GS_${type}_DEP) +. for type in BUILD RUN TEST +. if defined(_GS_${type}_DEP) ${type}_DEPENDS+= ${_GS_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_PORT} -.if ${_GS_ARGS:Mx11} +. if ${_GS_ARGS:Mx11} ${type}_DEPENDS+= ${_GS_X11_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_X11_PORT} -.endif -.endif -.endfor +. endif +. endif +. endfor .endif # _INCLUDE_USES_GHOSTSCRIPT_MK diff --git a/Mk/Uses/gl.mk b/Mk/Uses/gl.mk index 6bfba723773e..252fb80921be 100644 --- a/Mk/Uses/gl.mk +++ b/Mk/Uses/gl.mk @@ -1,54 +1,54 @@ # Use OpenGL and related libraries and ports # # Feature: gl # Usage: USES=gl # USE_GL=egl gbm gl glesv1 glesv2 glew glu glut opengl # # USE_GL specifies which GL components to add as dependencies. # Not specifying USE_GL with USES=gl is an error. # USE_GL=yes implies USE_GL=glu. This is deprecated # # MAINTAINER: x11@FreeBSD.org .if !defined(_INCLUDE_USES_GL_MK) _INCLUDE_USES_GL_MK=yes _GL_egl_LIB_DEPENDS= libEGL.so:graphics/libglvnd _GL_gbm_LIB_DEPENDS= libgbm.so:graphics/${GL_DEFAULT} _GL_gl_LIB_DEPENDS= libGL.so:graphics/libglvnd _GL_gl_USE_XORG= xorgproto _GL_glesv1_LIB_DEPENDS= libGLESv1_CM.so:graphics/libglvnd _GL_glesv2_LIB_DEPENDS= libGLESv2.so:graphics/libglvnd _GL_glew_LIB_DEPENDS= libGLEW.so:graphics/glew _GL_glu_LIB_DEPENDS= libGLU.so:graphics/libGLU _GL_glu_USE_XORG= xorgproto _GL_glut_LIB_DEPENDS= libglut.so:graphics/freeglut _GL_opengl_LIB_DEPENDS= libOpenGL.so:graphics/libglvnd -.if !empty(gl_ARGS) +. if !empty(gl_ARGS) IGNORE= USES=gl takes no arguments -.endif +. endif -.if !defined(USE_GL) +. if !defined(USE_GL) IGNORE= need to specify gl component with USE_GL -.elif ${USE_GL:tl} == yes +. elif ${USE_GL:tl} == yes DEV_WARNING+= "USE_GL=yes is deprecated, please add USE_GL=glu (default) or specify component" USE_GL= glu -.endif +. endif -.for _component in ${USE_GL} -.if !defined(_GL_${_component}_LIB_DEPENDS) +. for _component in ${USE_GL} +. if !defined(_GL_${_component}_LIB_DEPENDS) IGNORE= uses unknown GL component -.else +. else USE_XORG+= ${_GL_${_component}_USE_XORG} LIB_DEPENDS+= ${_GL_${_component}_LIB_DEPENDS} -.endif -.endfor +. endif +. endfor # We only need to include xorg.mk if we want USE_XORG modules -.if defined(USE_XORG) && !empty(USE_XORG) +. if defined(USE_XORG) && !empty(USE_XORG) .include "${USESDIR}/xorg.mk" -.endif +. endif # _INCLUDE_USES_GL_MK .endif diff --git a/Mk/Uses/gmake.mk b/Mk/Uses/gmake.mk index 50b9df2ecb3c..f39f3f685277 100644 --- a/Mk/Uses/gmake.mk +++ b/Mk/Uses/gmake.mk @@ -1,19 +1,19 @@ # Provide support to use the GNU make # # Feature: gmake # Usage: USES=gmake # # MAINTAINER: tijl@FreeBSD.org .if !defined(_INCLUDE_USES_GMAKE_MK) _INCLUDE_USES_GMAKE_MK= yes -.if !empty(gmake_ARGS) +. if !empty(gmake_ARGS) IGNORE= Incorrect 'USES+= gmake:${gmake_ARGS}' gmake takes no arguments -.endif +. endif BUILD_DEPENDS+= gmake>=4.3:devel/gmake CONFIGURE_ENV+= MAKE=gmake MAKE_CMD= gmake .endif diff --git a/Mk/Uses/gnome.mk b/Mk/Uses/gnome.mk index f79319ebd250..b15f55c4bc7b 100644 --- a/Mk/Uses/gnome.mk +++ b/Mk/Uses/gnome.mk @@ -1,426 +1,426 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Please view me with 4 column tabs! # ======================= USERS ================================= # # There are no significant user-definable settings in here. # This file is a framework to make it easier to create GNOME ports. # # ======================= /USERS ================================ # Please make sure all changes to this file are passed through the maintainer. # Do not commit them yourself (unless of course you're the Port's Wraith ;). # This section defines possible names of GNOME components and all information # necessary for ports to use those components. # Ports can use this as follows: # # USE_GNOME= glib20 introspection:build # # .include # # As a result proper LIB_DEPENDS/RUN_DEPENDS will be added and CONFIGURE_ENV # and MAKE_ENV defined. # # # GCONF_SCHEMAS - Set the following to list of all the gconf schema files # that your port installs. These schema files and # %gconf.xml files will be automatically added to # the ${PLIST}. For example, if your port has # "etc/gconf/schemas/(foo.schemas and bar.schemas)", # add the following to your Makefile: # "GCONF_SCHEMAS=foo.schemas bar.schemas". # # GLIB_SCHEMAS - Set the following to list of all gsettings schema files # (*.gschema.xml) that your ports installs. The # schema files will be automatically added to # the ${PLIST}. For example, if your port has # "share/glib-2.0/schemas/(foo.gschema.xml and bar.gschema.xml)", # add the following to your Makefile: # "GLIB_SCHEMAS=foo.gschema.xml bar.gschema.xml". # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_GNOME_MK) _INCLUDE_USES_GNOME_MK= yes _USES_POST+= gnome -.if !empty(gnome_ARGS) +. if !empty(gnome_ARGS) IGNORE= USES=gnome takes no arguments -.endif +. endif # non-version specific components _USE_GNOME_ALL= intlhack intltool introspection \ gnomemimedata gnomeprefix # GNOME 2 components _USE_GNOME_ALL+= atk cairo \ gdkpixbuf2 gconf2 glib20 \ gtk-update-icon-cache gtk20 \ gtksharp20 gtksourceview2 gvfs libartlgpl2 \ libglade2 libgnomecanvas \ libgsf libidl librsvg2 libwnck \ libxml2 libxslt \ pango pangox-compat \ vte # GNOME 3 components _USE_GNOME_ALL+=dconf evolutiondataserver3 gnomecontrolcenter3 gnomedesktop3 \ gnomemenus3 gsound gtk30 gtkhtml4 gtksourceview3 \ gtksourceview4 libgda5 \ libgda5-ui libgnomekbd libwnck3 metacity nautilus3 \ pygobject3 vte3 # GNOME 40 components _USE_GNOME_ALL+=gtk40 libadwaita gtksourceview5 # C++ bindings _USE_GNOME_ALL+=atkmm cairomm gconfmm26 glibmm gtkmm24 \ gtkmm30 gtksourceviewmm3 libgdamm5 libxml++26 libsigc++20 \ pangomm # glib-mkenums often fails with C locale # https://gitlab.gnome.org/GNOME/glib/issues/1430 USE_LOCALE?= en_US.UTF-8 GNOME_HTML_DIR?= ${PREFIX}/share/doc GCONF_CONFIG_OPTIONS?= merged GCONF_CONFIG_DIRECTORY?=etc/gconf/gconf.xml.defaults GCONF_CONFIG_SOURCE?=xml:${GCONF_CONFIG_OPTIONS}:${PREFIX}/${GCONF_CONFIG_DIRECTORY} GNOME_LOCALSTATEDIR?= ${PREFIX}/share gnomeprefix_CONFIGURE_ENV=GTKDOC="false" gnomeprefix_CONFIGURE_ARGS=--localstatedir=${GNOME_LOCALSTATEDIR} \ --with-html-dir=${GNOME_HTML_DIR} \ --disable-gtk-doc \ --with-gconf-source=${GCONF_CONFIG_SOURCE} atkmm_LIB_DEPENDS= libatkmm-1.6.so:accessibility/atkmm atkmm_USE_GNOME_IMPL= glibmm atk libxml++26_LIB_DEPENDS= libxml++-2.6.so:textproc/libxml++26 libxml++26_USE_GNOME_IMPL= glibmm libxml2 cairo_LIB_DEPENDS= libcairo.so:graphics/cairo cairomm_LIB_DEPENDS= libcairomm-1.0.so:graphics/cairomm cairomm_USE_GNOME_IMPL= cairo libxml++26 gconfmm26_LIB_DEPENDS= libgconfmm-2.6.so:devel/gconfmm26 gconfmm26_USE_GNOME_IMPL= glibmm gconf2 glibmm_LIB_DEPENDS= libglibmm-2.4.so:devel/glibmm glibmm_USE_GNOME_IMPL= libsigc++20 glib20 gsound_BUILD_DEPENDS= gsound-play:audio/gsound gsound_LIB_DEPENDS= libgsound.so:audio/gsound gsound_RUN_DEPENDS= gsound-play:audio/gsound gsound_USE_GNOME_IMPL= glib20 gtkmm24_LIB_DEPENDS= libgtkmm-2.4.so:x11-toolkits/gtkmm24 gtkmm24_USE_GNOME_IMPL= glibmm cairomm atkmm pangomm gtk20 gtkmm30_LIB_DEPENDS= libgtkmm-3.0.so:x11-toolkits/gtkmm30 gtkmm30_USE_GNOME_IMPL= glibmm cairomm atkmm pangomm gtk30 gtksourceviewmm3_LIB_DEPENDS= libgtksourceviewmm-3.0.so:x11-toolkits/gtksourceviewmm3 gtksourceviewmm3_USE_GNOME_IMPL= gtkmm30 gtksourceview3 libgdamm5_LIB_DEPENDS= libgdamm-5.0.so:databases/libgdamm5 libgdamm5_USE_GNOME_IMPL= libgda5 glibmm libsigc++20_LIB_DEPENDS= libsigc-2.0.so:devel/libsigc++20 pangomm_LIB_DEPENDS= libpangomm-1.4.so:x11-toolkits/pangomm pangomm_USE_GNOME_IMPL= pango glibmm cairomm gnomemimedata_BUILD_DEPENDS=${LOCALBASE}/libdata/pkgconfig/gnome-mime-data-2.0.pc:misc/gnome-mime-data gnomemimedata_RUN_DEPENDS=${LOCALBASE}/libdata/pkgconfig/gnome-mime-data-2.0.pc:misc/gnome-mime-data glib20_LIB_DEPENDS= libglib-2.0.so:devel/glib20 \ libintl.so:devel/gettext-runtime atk_LIB_DEPENDS= libatk-1.0.so:accessibility/atk atk_USE_GNOME_IMPL= glib20 dconf_BUILD_DEPENDS= dconf:devel/dconf dconf_LIB_DEPENDS= libdconf.so:devel/dconf dconf_RUN_DEPENDS= dconf:devel/dconf dconf_USE_GNOME_IMPL= glib20 pango_LIB_DEPENDS= libpango-1.0.so:x11-toolkits/pango pango_USE_GNOME_IMPL= glib20 pangox-compat_LIB_DEPENDS= libpangox-1.0.so:x11-toolkits/pangox-compat pangox-compat_USE_GNOME_IMPL= glib20 pango gdkpixbuf2_LIB_DEPENDS= libgdk_pixbuf-2.0.so:graphics/gdk-pixbuf2 gdkpixbuf2_USE_GNOME_IMPL=glib20 gtk-update-icon-cache_RUN_DEPENDS= gtk-update-icon-cache:graphics/gtk-update-icon-cache gtk-update-icon-cache_USE_GNOME_IMPL= atk pango gdkpixbuf2 gtk20_LIB_DEPENDS= libgtk-x11-2.0.so:x11-toolkits/gtk20 gtk20_USE_GNOME_IMPL= atk pango GTK2_VERSION= 2.10.0 gtk30_LIB_DEPENDS= libgtk-3.so:x11-toolkits/gtk30 gtk30_USE_GNOME_IMPL= atk pango GTK3_VERSION= 3.0.0 gtk40_LIB_DEPENDS= libgtk-4.so:x11-toolkits/gtk40 gtk40_USE_GNOME_IMPL= atk pango GTK4_VERSION= 4.0.0 libidl_LIB_DEPENDS= libIDL-2.so:devel/libIDL libidl_USE_GNOME_IMPL= glib20 libglade2_LIB_DEPENDS= libglade-2.0.so:devel/libglade2 libglade2_USE_GNOME_IMPL=libxml2 gtk20 libxml2_BUILD_DEPENDS= xml2-config:textproc/libxml2 libxml2_LIB_DEPENDS= libxml2.so:textproc/libxml2 libxml2_RUN_DEPENDS= xml2-config:textproc/libxml2 libxslt_BUILD_DEPENDS= xsltproc:textproc/libxslt libxslt_LIB_DEPENDS= libxslt.so:textproc/libxslt libxslt_RUN_DEPENDS= ${libxslt_BUILD_DEPENDS} libxslt_USE_GNOME_IMPL= libxml2 introspection_BUILD_DEPENDS= g-ir-scanner:devel/gobject-introspection introspection_LIB_DEPENDS= libgirepository-1.0.so:devel/gobject-introspection introspection_RUN_DEPENDS= g-ir-scanner:devel/gobject-introspection introspection_USE_GNOME_IMPL= glib20 introspection_MAKE_ENV= GI_SCANNER_DISABLE_CACHE=1 gconf2_LIB_DEPENDS= libgconf-2.so:devel/gconf2 gconf2_USE_GNOME_IMPL= libxml2 libgnomecanvas_LIB_DEPENDS= libgnomecanvas-2.so:graphics/libgnomecanvas libgnomecanvas_USE_GNOME_IMPL= libglade2 libartlgpl2 libartlgpl2_LIB_DEPENDS= libart_lgpl_2.so:graphics/libart_lgpl gnomedesktop3_LIB_DEPENDS= libgnome-desktop-3.so:x11/gnome-desktop gnomedesktop3_USE_GNOME_IMPL= gtk30 libwnck_LIB_DEPENDS= libwnck-1.so:x11-toolkits/libwnck libwnck_USE_GNOME_IMPL= gtk20 libwnck3_LIB_DEPENDS= libwnck-3.so:x11-toolkits/libwnck3 libwnck3_USE_GNOME_IMPL=gtk30 vte_LIB_DEPENDS= libvte.so:x11-toolkits/vte vte_USE_GNOME_IMPL= gtk20 vte3_LIB_DEPENDS= libvte-2.91.so:x11-toolkits/vte3 vte3_USE_GNOME_IMPL= gtk30 libadwaita_LIB_DEPENDS= libadwaita-1.so:x11-toolkits/libadwaita libadwaita_USE_GNOME_IMPL= gtk40 # Use librsvg2-rust where lang/rust is available -.if ${LIBRSVG2_DEFAULT:Mrust} +. if ${LIBRSVG2_DEFAULT:Mrust} librsvg2_BUILD_DEPENDS= librsvg2-rust>=0:graphics/librsvg2-rust librsvg2_LIB_DEPENDS= librsvg-2.so:graphics/librsvg2-rust librsvg2_RUN_DEPENDS= librsvg2-rust>=0:graphics/librsvg2-rust -.else +. else librsvg2_BUILD_DEPENDS= librsvg2>=0:graphics/librsvg2 librsvg2_LIB_DEPENDS= librsvg-2.so:graphics/librsvg2 librsvg2_RUN_DEPENDS= librsvg2>=0:graphics/librsvg2 -.endif +. endif librsvg2_USE_GNOME_IMPL=gdkpixbuf2 pango nautilus3_LIB_DEPENDS= libnautilus-extension.so:x11-fm/nautilus nautilus3_USE_GNOME_IMPL=gnomedesktop3 libxml2 metacity_LIB_DEPENDS= libmetacity.so:x11-wm/metacity gnomecontrolcenter3_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gnome-keybindings.pc:sysutils/gnome-control-center gnomecontrolcenter3_RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gnome-keybindings.pc:sysutils/gnome-control-center gnomecontrolcenter3_USE_GNOME_IMPL= gnomedesktop3 libgda5_LIB_DEPENDS= libgda-5.0.so:databases/libgda5 libgda5_USE_GNOME_IMPL= glib20 libxslt libgda5-ui_LIB_DEPENDS= libgda-ui-5.0.so:databases/libgda5-ui libgda5-ui_USE_GNOME_IMPL=glib20 libxslt libgda5 gtksourceview2_LIB_DEPENDS= libgtksourceview-2.0.so:x11-toolkits/gtksourceview2 gtksourceview2_USE_GNOME_IMPL=gtk20 libxml2 gtksourceview3_LIB_DEPENDS= libgtksourceview-3.0.so:x11-toolkits/gtksourceview3 gtksourceview3_USE_GNOME_IMPL=gtk30 libxml2 gtksourceview4_LIB_DEPENDS= libgtksourceview-4.so:x11-toolkits/gtksourceview4 gtksourceview4_USE_GNOME_IMPL=gtk30 libxml2 gtksourceview5_LIB_DEPENDS= libgtksourceview-5.so:x11-toolkits/gtksourceview5 gtksourceview5_USE_GNOME_IMPL=gtk40 libxml2 libgsf_LIB_DEPENDS= libgsf-1.so:devel/libgsf libgsf_USE_GNOME_IMPL= glib20 libxml2 pygobject3_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR} pygobject3_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gobject3>=0:devel/py-gobject3@${PY_FLAVOR} pygobject3_USE_GNOME_IMPL= glib20 intltool_BUILD_DEPENDS= ${LOCALBASE}/bin/intltool-extract:textproc/intltool intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} \ 's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \ s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";| ; \ s|/usr/bin/iconv|${ICONV_CMD}|g ; \ s|unpack *[(]'"'"'U\*'"'"'|unpack ('"'"'C*'"'"'|' ; \ ${FIND} ${WRKSRC} -name configure | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} \ 's/DATADIRNAME=lib/DATADIRNAME=share/' intlhack_USE_GNOME_IMPL=intltool gtkhtml4_LIB_DEPENDS= libgtkhtml-4.0.so:www/gtkhtml4 gtkhtml4_USE_GNOME_IMPL=gtk30 libxml2 evolutiondataserver3_LIB_DEPENDS= libedataserver-1.2.so:databases/evolution-data-server evolutiondataserver3_USE_GNOME_IMPL= libxml2 gtk30 gnomemenus3_BUILD_DEPENDS= gnome-menus>=3.2.0:x11/gnome-menus gnomemenus3_RUN_DEPENDS= gnome-menus>=3.2.0:x11/gnome-menus gnomemenus3_USE_GNOME_IMPL= glib20 gtksharp20_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gtk-sharp-2.0.pc:x11-toolkits/gtk-sharp20 gtksharp20_RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gtk-sharp-2.0.pc:x11-toolkits/gtk-sharp20 gtksharp20_USE_GNOME_IMPL= gtk20 libgnomekbd_LIB_DEPENDS= libgnomekbd.so:x11/libgnomekbd libgnomekbd_USE_GNOME_IMPL= gtk30 libxml2 gvfs_BUILD_DEPENDS= gvfs>=0:devel/gvfs gvfs_RUN_DEPENDS= gvfs>=0:devel/gvfs gvfs_USE_GNOME_IMPL= glib20 # End component definition section -.if defined(USE_GNOME) +. if defined(USE_GNOME) # First of all expand all USE_GNOME_IMPL recursively -. for component in ${_USE_GNOME_ALL} -. for subcomponent in ${${component}_USE_GNOME_IMPL} +. for component in ${_USE_GNOME_ALL} +. for subcomponent in ${${component}_USE_GNOME_IMPL} ${component}_USE_GNOME_IMPL+=${${subcomponent}_USE_GNOME_IMPL} -. endfor -. endfor +. endfor +. endfor # Then use already expanded USE_GNOME_IMPL to expand USE_GNOME. # Also, check to see if each component has a desktop requirement. If it does, # and if the user's chosen desktop is not of the same version, mark the # port as IGNORE. -. for component in ${USE_GNOME:C/^([^:]+).*/\1/} -. if ${_USE_GNOME_ALL:M${component}}=="" +. for component in ${USE_GNOME:C/^([^:]+).*/\1/} +. if ${_USE_GNOME_ALL:M${component}}=="" IGNORE= cannot install: Unknown component ${component} -. endif +. endif _USE_GNOME+= ${${component}_USE_GNOME_IMPL} ${component} -. endfor +. endfor # Setup the GTK+ API version for pixbuf loaders, input method modules, # and theme engines. PLIST_SUB+= GTK2_VERSION="${GTK2_VERSION}" \ GTK3_VERSION="${GTK3_VERSION}" \ GTK4_VERSION="${GTK4_VERSION}" -.if defined(_USE_GNOME) && empty(_USE_GNOME:Mglib20:u) && defined(GLIB_SCHEMAS) +. if defined(_USE_GNOME) && empty(_USE_GNOME:Mglib20:u) && defined(GLIB_SCHEMAS) IGNORE= GLIB_SCHEMAS is set, but needs USE_GNOME=glib20 to work -.endif +. endif -.if defined(_USE_GNOME) && empty(_USE_GNOME:Mgconf2:u) && defined(GCONF_SCHEMAS) +. if defined(_USE_GNOME) && empty(_USE_GNOME:Mgconf2:u) && defined(GCONF_SCHEMAS) IGNORE= GCONF_SCHEMAS is set, but needs USE_GNOME=gconf2 to work -.endif +. endif # Then traverse through all components, check which of them # exist in ${_USE_GNOME} and set variables accordingly -.ifdef _USE_GNOME +. ifdef _USE_GNOME -. for component in ${_USE_GNOME:O:u} -. if defined(${component}_PATCH_DEPENDS) +. for component in ${_USE_GNOME:O:u} +. if defined(${component}_PATCH_DEPENDS) PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS} -. endif +. endif -. if ${USE_GNOME:M${component}\:build} && defined(${component}_BUILD_DEPENDS) +. if ${USE_GNOME:M${component}\:build} && defined(${component}_BUILD_DEPENDS) BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} -. elif ${USE_GNOME:M${component}\:run} && defined(${component}_RUN_DEPENDS) +. elif ${USE_GNOME:M${component}\:run} && defined(${component}_RUN_DEPENDS) RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. else -. if defined(${component}_LIB_DEPENDS) +. else +. if defined(${component}_LIB_DEPENDS) LIB_DEPENDS+= ${${component}_LIB_DEPENDS} -. else +. else BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. endif -. endif +. endif +. endif -. if defined(${component}_CONFIGURE_ARGS) +. if defined(${component}_CONFIGURE_ARGS) CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS} -. endif +. endif -. if defined(${component}_CONFIGURE_ENV) +. if defined(${component}_CONFIGURE_ENV) CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV} -. endif +. endif -. if defined(${component}_MAKE_ENV) +. if defined(${component}_MAKE_ENV) MAKE_ENV+= ${${component}_MAKE_ENV} -. endif +. endif -. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) +. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET} -. endif +. endif -. if defined(${component}_PRE_PATCH) +. if defined(${component}_PRE_PATCH) GNOME_PRE_PATCH+= ; ${${component}_PRE_PATCH} -. endif -. endfor -.endif +. endif +. endfor +. endif -. if defined(GCONF_SCHEMAS) +. if defined(GCONF_SCHEMAS) MAKE_ENV+= GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 -. endif -.endif +. endif +. endif -.if defined(USE_GNOME_SUBR) +. if defined(USE_GNOME_SUBR) GNOME_SUBR= ${LOCALBASE}/etc/gnome.subr RUN_DEPENDS+= ${GNOME_SUBR}:sysutils/gnome_subr SUB_LIST+= GNOME_SUBR=${GNOME_SUBR} -.endif +. endif .endif # end of the part .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GNOME_POST_MK) _INCLUDE_USES_GNOME_POST_MK= yes -.if defined(GNOME_PRE_PATCH) +. if defined(GNOME_PRE_PATCH) _USES_patch+= 290:gnome-pre-patch gnome-pre-patch: @${GNOME_PRE_PATCH:C/^;//1} -.endif +. endif -.if defined(GCONF_SCHEMAS) +. if defined(GCONF_SCHEMAS) _USES_install+= 690:gnome-post-gconf-schemas gnome-post-gconf-schemas: @for i in ${GCONF_SCHEMAS}; do \ ${ECHO_CMD} "@preunexec env GCONF_CONFIG_SOURCE=xml:${GCONF_CONFIG_OPTIONS}:%D/${GCONF_CONFIG_DIRECTORY} HOME=${WRKDIR} gconftool-2 --makefile-uninstall-rule %D/etc/gconf/schemas/$${i} > /dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ ${ECHO_CMD} "etc/gconf/schemas/$${i}" >> ${TMPPLIST}; \ ${ECHO_CMD} "@postexec env GCONF_CONFIG_SOURCE=xml:${GCONF_CONFIG_OPTIONS}:%D/${GCONF_CONFIG_DIRECTORY} HOME=${WRKDIR} gconftool-2 --makefile-install-rule %D/etc/gconf/schemas/$${i} > /dev/null || /usr/bin/true" \ >> ${TMPPLIST}; \ done -.endif +. endif -.if defined(GLIB_SCHEMAS) +. if defined(GLIB_SCHEMAS) _USES_install+= 690:gnome-post-glib-schemas gnome-post-glib-schemas: @for i in ${GLIB_SCHEMAS}; do \ ${ECHO_CMD} "share/glib-2.0/schemas/$${i}" >> ${TMPPLIST}; \ done -.endif +. endif .endif # End of use part. diff --git a/Mk/Uses/gnustep.mk b/Mk/Uses/gnustep.mk index 27b947392b15..fa12bbac54dc 100644 --- a/Mk/Uses/gnustep.mk +++ b/Mk/Uses/gnustep.mk @@ -1,93 +1,93 @@ # Handle GNUstep related ports # # Feature: gnustep # Usage: USES=gnustep # # Defined specific dependencies under USE_GNUSTEP # Expected arguments for USE_GNUSTEP: # # base: depends on the gnustep-base port # gui: depends on the gnustep-gui port # back: depends on the gnustep-back port # build: prepare the build dependencies for a regular GNUstep port # .if !defined(_INCLUDE_USES_GNUSTEP_MK) _INCLUDE_USES_GNUSTEP_MK= yes .include "${USESDIR}/gmake.mk" GNUSTEP_PREFIX?= ${LOCALBASE}/GNUstep DEFAULT_LIBVERSION?= 0.0.1 GNUSTEP_SYSTEM_ROOT= ${GNUSTEP_PREFIX}/System GNUSTEP_MAKEFILES= ${GNUSTEP_SYSTEM_ROOT}/Library/Makefiles GNUSTEP_SYSTEM_LIBRARIES= ${GNUSTEP_SYSTEM_ROOT}/Library/Libraries GNUSTEP_SYSTEM_TOOLS= ${GNUSTEP_SYSTEM_ROOT}/Tools GNUSTEP_LOCAL_ROOT= ${GNUSTEP_PREFIX}/Local GNUSTEP_LOCAL_LIBRARIES= ${GNUSTEP_LOCAL_ROOT}/Library/Libraries GNUSTEP_LOCAL_TOOLS= ${GNUSTEP_LOCAL_ROOT}/Tools LIB_DIRS+= ${GNUSTEP_SYSTEM_LIBRARIES} \ ${GNUSTEP_LOCAL_LIBRARIES} -.for a in CFLAGS CPPFLAGS CXXFLAGS OBJCCFLAGS OBJCFLAGS LDFLAGS +. for a in CFLAGS CPPFLAGS CXXFLAGS OBJCCFLAGS OBJCFLAGS LDFLAGS MAKE_ENV+= ADDITIONAL_${a}="${ADDITIONAL_${a}} ${${a}}" -.endfor -.for a in FLAGS INCLUDE_DIRS LIB_DIRS +. endfor +. for a in FLAGS INCLUDE_DIRS LIB_DIRS MAKE_ENV+= ADDITIONAL_${a}="${ADDITIONAL_${a}}" -.endfor +. endfor MAKE_ARGS+=messages=yes # BFD ld can't link Objective-C programs for some reason. Most things are fine # with LLD, but the things that don't (e.g. sope) need gold. -.if defined(LLD_UNSAFE) +. if defined(LLD_UNSAFE) MAKE_ARGS+=LDFLAGS='-fuse-ld=gold' BUILD_DEPENDS+= ${LOCALBASE}/bin/ld.gold:devel/binutils -.else +. else MAKE_ARGS+=LDFLAGS='-fuse-ld=${OBJC_LLD}' -.endif +. endif MAKEFILE= GNUmakefile #MAKE_ENV+= GNUSTEP_CONFIG_FILE=${PORTSDIR}/devel/gnustep-make/files/GNUstep.conf GNU_CONFIGURE_PREFIX= ${GNUSTEP_PREFIX} -.if ${MACHINE_ARCH} == "i386" +. if ${MACHINE_ARCH} == "i386" GNU_ARCH= ix86 -.else +. else GNU_ARCH= ${MACHINE_ARCH} -.endif +. endif PLIST_SUB+= GNU_ARCH=${GNU_ARCH} VERSION=${PORTVERSION} PLIST_SUB+= MAJORVERSION=${PORTVERSION:C/([0-9]).*/\1/1} PLIST_SUB+= LIBVERSION=${DEFAULT_LIBVERSION} PLIST_SUB+= MAJORLIBVERSION=${DEFAULT_LIBVERSION:C/([0-9]).*/\1/1} -.if defined(USE_GNUSTEP) -. if ${USE_GNUSTEP:Mbase} +. if defined(USE_GNUSTEP) +. if ${USE_GNUSTEP:Mbase} LIB_DEPENDS+= libgnustep-base.so:lang/gnustep-base -. endif +. endif -. if ${USE_GNUSTEP:Mbuild} +. if ${USE_GNUSTEP:Mbuild} PATH:= ${GNUSTEP_SYSTEM_TOOLS}:${GNUSTEP_LOCAL_TOOLS}:${PATH} MAKE_ENV+= PATH="${PATH}" GNUSTEP_MAKEFILES="${GNUSTEP_MAKEFILES}" # All GNUstep things installed from ports should be in the System domain. # Things installed from source can then freely live in the Local domain without # conflicts. MAKE_ENV+= GNUSTEP_INSTALLATION_DOMAIN=SYSTEM CONFIGURE_ENV+= PATH="${PATH}" GNUSTEP_MAKEFILES="${GNUSTEP_MAKEFILES}" BUILD_DEPENDS+= gnustep-make>0:devel/gnustep-make .include "${USESDIR}/objc.mk" -. endif +. endif -. if ${USE_GNUSTEP:Mgui} +. if ${USE_GNUSTEP:Mgui} LIB_DEPENDS+= libgnustep-gui.so:x11-toolkits/gnustep-gui -. endif +. endif -. if ${USE_GNUSTEP:Mback} +. if ${USE_GNUSTEP:Mback} BUILD_DEPENDS+= gnustep-back>0:x11-toolkits/gnustep-back RUN_DEPENDS+= gnustep-back>0:x11-toolkits/gnustep-back -. endif +. endif -.endif +. endif .endif diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index f6b564b7be38..034416dda1c1 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -1,255 +1,255 @@ # This file contains logic to ease porting of Go binaries using the # `go` command. # # Feature: go # Usage: USES=go # Valid ARGS: (none), modules, no_targets, run # # (none) Setup GOPATH and build in GOPATH mode. # modules If the upstream uses Go modules, this can be set to build # in modules-aware mode. # no_targets Indicates that Go is needed at build time as a part of # make/CMake build. This will setup build environment like # GO_ENV, GO_BUILDFLAGS but will not create post-extract and # do-{build,install,test} targets. # run Indicates that Go is needed at run time and adds it to # RUN_DEPENDS. # # You can set the following variables to control the process. # # GO_MODULE # The name of the module as specified by "module" directive in go.mod. # In most cases, this is the only required variable for ports that # use Go modules. # # GO_PKGNAME # The name of the package when building in GOPATH mode. This # is the directory that will be created in ${GOPATH}/src. If not set # explicitly and GH_SUBDIR or GL_SUBDIR is present, GO_PKGNAME will # be inferred from it. # It is not needed when building in modules-aware mode. # # GO_TARGET # The packages to build. The default value is ${GO_PKGNAME}. # GO_TARGET can also be a tuple in the form package:path where path can be # either a simple filename or a full path starting with ${PREFIX}. # # GO_TESTTARGET # The packages to test. The default value is `./...` (the current package # and all subpackages). # # CGO_CFLAGS # Additional CFLAGS variables to be passed to the C compiler by the `go` # command # # CGO_LDFLAGS # Additional LDFLAGS variables to be passed to the C compiler by the `go` # command # # GO_BUILDFLAGS # Additional build arguments to be passed to the `go build` command # # GO_TESTFLAGS # Additional build arguments to be passed to the `go test` command # # GO_PORT # The Go port to use. By default this is lang/go but can be set # to lang/go-devel in make.conf for testing with future Go versions. # # This variable must not be set by individual ports! # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes -.if !empty(go_ARGS:Nmodules:Nno_targets:Nrun) +. if !empty(go_ARGS:Nmodules:Nno_targets:Nrun) IGNORE= USES=go has invalid arguments: ${go_ARGS:Nmodules:Nno_targets:Nrun} -.endif +. endif # Settable variables -.if empty(GO_PKGNAME) -. if !empty(GH_SUBDIR) +. if empty(GO_PKGNAME) +. if !empty(GH_SUBDIR) GO_PKGNAME= ${GH_SUBDIR:S|^src/||} -. elif !empty(GL_SUBDIR) +. elif !empty(GL_SUBDIR) GO_PKGNAME= ${GL_SUBDIR:S|^src/||} -. else +. else GO_PKGNAME= ${PORTNAME} +. endif . endif -.endif GO_TARGET?= ${GO_PKGNAME} GO_TESTTARGET?= ./... GO_BUILDFLAGS+= -v -buildmode=exe -trimpath -.if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) +. if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) GO_BUILDFLAGS+= -ldflags=-s -.endif +. endif GO_TESTFLAGS+= -v CGO_ENABLED?= 1 CGO_CFLAGS+= -I${LOCALBASE}/include CGO_LDFLAGS+= -L${LOCALBASE}/lib -.if ${ARCH} == armv6 || ${ARCH} == armv7 +. if ${ARCH} == armv6 || ${ARCH} == armv7 GOARM?= ${ARCH:C/armv//} -.endif +. endif GO_GOPROXY?= https://proxy.golang.org GO_GOSUMDB?= sum.golang.org # Read-only variables GO_CMD= ${LOCALBASE}/bin/go GO_WRKDIR_BIN= ${WRKDIR}/bin GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ CGO_CFLAGS="${CGO_CFLAGS}" \ CGO_LDFLAGS="${CGO_LDFLAGS}" \ GOARM=${GOARM} -.if ${go_ARGS:Mmodules} +. if ${go_ARGS:Mmodules} GO_BUILDFLAGS+= -mod=vendor GO_TESTFLAGS+= -mod=vendor GO_GOPATH= ${DISTDIR}/go/${PKGORIGIN:S,/,_,g} GO_WRKSRC= ${WRKSRC} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="${GO_WRKDIR_BIN}" \ GO111MODULE=on \ GOFLAGS=-modcacherw \ GOSUMDB=${GO_GOSUMDB} -. if defined(GO_MODULE) +. if defined(GO_MODULE) GO_MODNAME= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\1/} GO_MODVERSION= ${GO_MODULE:C/^([^@]*)(@([^@]*)?)/\2/:M@*:S/^@//:S/^$/${DISTVERSIONFULL}/} GO_MODFILE= ${GO_MODVERSION}.mod GO_DISTFILE= ${GO_MODVERSION}.zip DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} MASTER_SITES+= ${GO_GOPROXY}/${GO_MODNAME:C/([A-Z])/!\1/g:tl}/@v/ DISTFILES+= ${GO_MODFILE} ${GO_DISTFILE} EXTRACT_ONLY+= ${GO_DISTFILE} WRKSRC= ${WRKDIR}/${GO_MODNAME}@${GO_MODVERSION} FETCH_DEPENDS+= ${GO_CMD}:${GO_PORT} \ ca_root_nss>0:security/ca_root_nss USES+= zip -. else +. else GO_ENV+= GO_NO_VENDOR_CHECKS=1 -. endif -.else +. endif +. else GO_GOPATH= ${WRKDIR} GO_WRKSRC= ${WRKDIR}/src/${GO_PKGNAME} GO_ENV+= GOPATH="${GO_GOPATH}" \ GOBIN="" \ GO111MODULE=off -.endif +. endif GO_PORT?= lang/go BUILD_DEPENDS+= ${GO_CMD}:${GO_PORT} -.if ${go_ARGS:Mrun} +. if ${go_ARGS:Mrun} RUN_DEPENDS+= ${GO_CMD}:${GO_PORT} -.endif +. endif _USES_POST+= go .endif # !defined(_INCLUDE_USES_GO_MK) .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) _INCLUDE_USES_GO_POST_MK= yes -.if !target(post-fetch) && ${go_ARGS:Mmodules} && defined(GO_MODULE) +. if !target(post-fetch) && ${go_ARGS:Mmodules} && defined(GO_MODULE) post-fetch: @${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies"; @(cd ${DISTDIR}/${DIST_SUBDIR}; \ [ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \ ${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x) -.endif +. endif -.if !target(post-extract) -. if empty(go_ARGS) +. if !target(post-extract) +. if empty(go_ARGS) post-extract: @${MKDIR} ${GO_WRKSRC:H} @${LN} -sf ${WRKSRC} ${GO_WRKSRC} -. elif ${go_ARGS:Mmodules} && defined(GO_MODULE) +. elif ${go_ARGS:Mmodules} && defined(GO_MODULE) post-extract: @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=off ${GO_CMD} mod vendor) -. endif -.endif +. endif +. endif -.if !target(do-build) && empty(go_ARGS:Mno_targets) +. if !target(do-build) && empty(go_ARGS:Mno_targets) do-build: (cd ${GO_WRKSRC}; \ for t in ${GO_TARGET}; do \ out=$$(${BASENAME} $$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^[^:]*:([^:]+).*$$/\1/' -e 's/^\.$$/${PORTNAME}/')); \ pkg=$$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^([^:]*).*$$/\1/' -e 's/^${PORTNAME}$$/./'); \ ${ECHO_MSG} "===> Building $${out} from $${pkg}"; \ ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ -o ${GO_WRKDIR_BIN}/$${out} \ $${pkg}; \ done) -.endif +. endif -.if !target(do-install) && empty(go_ARGS:Mno_targets) +. if !target(do-install) && empty(go_ARGS:Mno_targets) do-install: for t in ${GO_TARGET}; do \ dst=$$(${ECHO_CMD} $${t} | \ ${SED} -Ee 's/^[^:]*:([^:]+).*$$/\1/' -e 's/^\.$$/${PORTNAME}/'); \ src=$$(${BASENAME} $${dst}); \ case $${dst} in \ /*) dst=${STAGEDIR}$${dst}; ${MKDIR} $$(${DIRNAME} $${dst}) ;; \ *) dst=${STAGEDIR}${PREFIX}/bin/$${src} ;; \ esac; \ ${ECHO_MSG} "===> Installing $${src} as $${dst}"; \ ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/$${src} $${dst}; \ done -.endif +. endif -.if !target(do-test) && empty(go_ARGS:Mno_targets) +. if !target(do-test) && empty(go_ARGS:Mno_targets) do-test: (cd ${GO_WRKSRC}; \ for t in ${GO_TESTTARGET}; do \ ${ECHO_MSG} "===> Testing $${t}"; \ ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} test ${GO_TESTFLAGS} $${t}; \ done) -.endif +. endif -.if ${go_ARGS:Mmodules} && defined(GO_MODULE) +. if ${go_ARGS:Mmodules} && defined(GO_MODULE) gomod-clean: -.if exists(${GO_CMD}) +. if exists(${GO_CMD}) @${ECHO_MSG} "===> Cleaning Go module cache" @${SETENV} ${GO_ENV} ${GO_CMD} clean -modcache -.else +. else @${ECHO_MSG} "===> Skipping since ${GO_CMD} is not installed" -.endif +. endif # Hook up to distclean -.if !target(post-clean) && !make(clean) +. if !target(post-clean) && !make(clean) post-clean: gomod-clean @${RM} -r ${GO_GOPATH} -.endif -.endif +. endif +. endif # Helper targets for port maintainers -.if ${go_ARGS:Mmodules} && !defined(GO_MODULE) +. if ${go_ARGS:Mmodules} && !defined(GO_MODULE) _MODULES2TUPLE_CMD= modules2tuple gomod-vendor-deps: @if ! type ${GO_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"${GO_PORT}\""; exit 1; \ fi; \ if ! type ${_MODULES2TUPLE_CMD} > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"ports-mgmt/modules2tuple\""; exit 1; \ fi gomod-vendor: gomod-vendor-deps patch @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt gomod-vendor-diff: gomod-vendor-deps patch @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ [ -r vendor/modules.txt ] && ${_MODULES2TUPLE_CMD} vendor/modules.txt | ${SED} 's|GH_TUPLE=| |; s| \\$$||' | ${GREP} -v ' \\' > ${WRKDIR}/GH_TUPLE-new.txt && \ echo ${GH_TUPLE} | ${TR} -s " " "\n" | ${SED} "s|^| |" > ${WRKDIR}/GH_TUPLE-old.txt && \ ${DIFF} ${WRKDIR}/GH_TUPLE-old.txt ${WRKDIR}/GH_TUPLE-new.txt || exit 0 -.endif +. endif .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_GO_POST_MK) diff --git a/Mk/Uses/gperf.mk b/Mk/Uses/gperf.mk index 3a342ed17f30..abe9932dbf87 100644 --- a/Mk/Uses/gperf.mk +++ b/Mk/Uses/gperf.mk @@ -1,33 +1,33 @@ # handle dependency on gperf # # Feature: gperf # Usage: USES=gperf # # Take no arguments .if !defined(_INCLUDE_USES_GPERF_MK) _INCLUDE_USES_GPERF_MK= yes -.if !exists(/usr/bin/gperf) +. if !exists(/usr/bin/gperf) BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:devel/gperf GPERF= ${LOCALBASE}/bin/gperf -.else +. else _GPERF_VERSION!= /usr/bin/gperf --version | head -1 || true _GPERF_MAJ_VERSION= ${_GPERF_VERSION:M[0-9].[0-9].[0-9]:C/.*([0-9]).[0-9].[0-9].*/\1/g} -.if empty(_GPERF_MAJ_VERSION) +. if empty(_GPERF_MAJ_VERSION) _GPERF_MAJ_VERSION= 0 -.endif +. endif -.if ${_GPERF_MAJ_VERSION} < 3 +. if ${_GPERF_MAJ_VERSION} < 3 BUILD_DEPENDS+= ${LOCALBASE}/bin/gperf:devel/gperf GPERF= ${LOCALBASE}/bin/gperf -.else +. else GPERF= /usr/bin/gperf -.endif -.endif +. endif +. endif CONFIGURE_ENV+= GPERF=${GPERF} MAKE_ENV+= GPERF=${GPERF} .endif diff --git a/Mk/Uses/gssapi.mk b/Mk/Uses/gssapi.mk index 9449b97c9494..c1b3d5954c3b 100644 --- a/Mk/Uses/gssapi.mk +++ b/Mk/Uses/gssapi.mk @@ -1,186 +1,186 @@ # handle dependency on Kerberos port # # Feature: gssapi # Usage: USES=gssapi or USES=gssapi:ARGS # Valid ARGS: base (default, implicit), heimdal, mit. # "bootstrap" is a special prefix only for krb5 or heimdal ports. # ("bootstrap,mit") # flags is a special suffix to define CFLAGS, LDFLAGS, and LDADD. # ("base,flags") # # MAINTAINER: hrs@FreeBSD.org # # User defined variables: # HEIMDAL_HOME (default: ${LOCALBASE}) # KRB5_HOME (default: ${LOCALBASE}) # # Exported variables: # GSSAPIBASEDIR # GSSAPICPPFLAGS # GSSAPIINCDIR # GSSAPILDFLAGS # GSSAPILIBDIR # GSSAPILIBS # GSSAPI_CONFIGURE_ARGS # KRB5CONFIG # # Affected variables: # PREFIX (bootstrap) # CPPFLAGS (flags) # LDADD (flags) # LDCFLAGS # # Notes: # - GSSAPILIBDIR is prepended to "-Wl,-rpath," in LDFLAGS. # - bootstrap sets PREFIX based on KRB5_HOME or HEIMDAL_HOME. # # Usage: # # A typical example: # # OPTIONS_SINGLE= GSSAPI # OPTIONS_SINGLE_GSSAPI= GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE # # GSSAPI_BASE_USES= gssapi # GSSAPI_BASE_CONFIGURE_ON= \ # --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} # # GSSAPI_HEIMDAL_USES=gssapi:heimdal # GSSAPI_HEIMDAL_CONFIGURE_ON= \ # --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} # # GSSAPI_MIT_USES= gssapi:mit # GSSAPI_MIT_CONFIGURE_ON= \ # --with-gssapi=${GSSAPIBASEDIR} ${GSSAPI_CONFIGURE_ARGS} # # GSSAPI_NONE_CONFIGURE_ON= --without-gssapi # # If pathname is required for Kerberos implementation, use ${GSSAPIBASEDIR}. # # CPPFLAGS, LDFLAGS, and LDADD can automatically be set by using "flags" # modifier. It is useful if the port does not use a configure script. # # How To Debug: # # A port maintainer can try "make debug-krb" to confirm if building # a GSSAPI library works fine. It will perform a library link test and # show which library and what parameters will be used. # If it works but your port does not build, some parameters are missing in # the building phase of the port. If it does not work, the problem is in # the GSSAPI library, not your port. Please contact MAINTAINER of this file # in that case. # .if !defined(_INCLUDE_USES_GSSAPI_MK) _INCLUDE_USES_GSSAPI_MK= yes _HEIMDAL_DEPENDS=${GSSAPILIBDIR}/libgssapi.so:security/heimdal _MITKRB5_DEPENDS=${GSSAPILIBDIR}/libkrb5support.so:security/krb5 _HEADERS= sys/types.h sys/stat.h stdint.h -.if empty(gssapi_ARGS) +. if empty(gssapi_ARGS) gssapi_ARGS= base -.endif -.for _A in ${gssapi_ARGS} +. endif +. for _A in ${gssapi_ARGS} _local:= ${_A} -.if ${_local} == "base" -. if ${SSL_DEFAULT} != base +. if ${_local} == "base" +. if ${SSL_DEFAULT} != base IGNORE= You are using OpenSSL from ports and have selected GSSAPI from base, please select another GSSAPI value -. endif +. endif HEIMDAL_HOME= /usr GSSAPIBASEDIR= ${HEIMDAL_HOME} GSSAPILIBDIR= ${GSSAPIBASEDIR}/lib GSSAPIINCDIR= ${GSSAPIBASEDIR}/include _HEADERS+= gssapi/gssapi.h gssapi/gssapi_krb5.h krb5.h GSSAPICPPFLAGS= -I"${GSSAPIINCDIR}" GSSAPILIBS= -lkrb5 -lgssapi -lgssapi_krb5 GSSAPILDFLAGS= -.elif ${_local} == "heimdal" +. elif ${_local} == "heimdal" HEIMDAL_HOME?= ${LOCALBASE} GSSAPIBASEDIR= ${HEIMDAL_HOME} GSSAPILIBDIR= ${GSSAPIBASEDIR}/lib/heimdal GSSAPIINCDIR= ${GSSAPIBASEDIR}/include/heimdal _HEADERS+= gssapi/gssapi.h gssapi/gssapi_krb5.h krb5.h -.if !defined(_KRB_BOOTSTRAP) +. if !defined(_KRB_BOOTSTRAP) BUILD_DEPENDS+= ${_HEIMDAL_DEPENDS} RUN_DEPENDS+= ${_HEIMDAL_DEPENDS} -.else +. else PREFIX= ${HEIMDAL_HOME} -.endif +. endif GSSAPICPPFLAGS= -I"${GSSAPIINCDIR}" GSSAPILIBS= -lkrb5 -lgssapi GSSAPILDFLAGS= -L"${GSSAPILIBDIR}" _RPATH= ${GSSAPILIBDIR} -.elif ${_local} == "mit" +. elif ${_local} == "mit" KRB5_HOME?= ${LOCALBASE} GSSAPIBASEDIR= ${KRB5_HOME} GSSAPILIBDIR= ${GSSAPIBASEDIR}/lib GSSAPIINCDIR= ${GSSAPIBASEDIR}/include _HEADERS+= gssapi/gssapi.h gssapi/gssapi_krb5.h krb5.h -.if !defined(_KRB_BOOTSTRAP) +. if !defined(_KRB_BOOTSTRAP) BUILD_DEPENDS+= ${_MITKRB5_DEPENDS} RUN_DEPENDS+= ${_MITKRB5_DEPENDS} -.else +. else PREFIX= ${KRB5_HOME} -.endif +. endif GSSAPILIBS= -lkrb5 -lgssapi_krb5 GSSAPICPPFLAGS= -I"${GSSAPIINCDIR}" GSSAPILDFLAGS= -L"${GSSAPILIBDIR}" _RPATH= ${GSSAPILIBDIR} -.elif ${_local} == "bootstrap" +. elif ${_local} == "bootstrap" _KRB_BOOTSTRAP= 1 -.elif ${_local} == "flags" +. elif ${_local} == "flags" _KRB_USEFLAGS= 1 -.else +. else IGNORE= USES=gssapi - invalid args: [${_local}] specified -.endif -.endfor +. endif +. endfor KRB5CONFIG=${GSSAPIBASEDIR}/bin/krb5-config # Fix up -Wl,-rpath in LDFLAGS -.if defined(_RPATH) && !empty(_RPATH) -.if !empty(LDFLAGS:M-Wl,-rpath,*) -.for F in ${LDFLAGS:M-Wl,-rpath,*} +. if defined(_RPATH) && !empty(_RPATH) +. if !empty(LDFLAGS:M-Wl,-rpath,*) +. for F in ${LDFLAGS:M-Wl,-rpath,*} LDFLAGS:= -Wl,-rpath,${_RPATH}:${F:S/-Wl,-rpath,//} \ ${LDFLAGS:N-Wl,-rpath,*} -.endfor -.else +. endfor +. else LDFLAGS+= -Wl,-rpath,${_RPATH}:/usr/lib -.endif +. endif _DEBUG_KRB_RPATH= -Wl,-rpath,${_RPATH} -.endif -.if defined(_KRB_USEFLAGS) && !empty(_KRB_USEFLAGS) +. endif +. if defined(_KRB_USEFLAGS) && !empty(_KRB_USEFLAGS) CPPFLAGS+= ${GSSAPICPPFLAGS} LDFLAGS+= ${GSSAPILDFLAGS} LDADD+= ${GSSAPILIBS} -.endif +. endif GSSAPI_CONFIGURE_ARGS= \ CFLAGS="${GSSAPICPPFLAGS} ${CFLAGS}" \ LDFLAGS="${GSSAPILDFLAGS} ${LDFLAGS}" \ LIBS="${GSSAPILIBS} ${LIBS}" \ KRB5CONFIG="${KRB5CONFIG}" debug-krb: @(for I in ${_HEADERS}; do echo "#include <$$I>"; done; \ echo "int main() { gss_acquire_cred(0, 0, 0, 0, 0, 0, 0, 0);" \ "krb5_init_context(0);" \ "gsskrb5_register_acceptor_identity(0); return 0;}" \ ) > /tmp/${.TARGET}.c ${CC} ${CFLAGS} -o /tmp/${.TARGET}.x ${GSSAPICPPFLAGS} \ ${GSSAPILIBS} ${GSSAPILDFLAGS} ${_DEBUG_KRB_RPATH} \ /tmp/${.TARGET}.c && \ ldd /tmp/${.TARGET}.x; \ ${RM} /tmp/${.TARGET}.x @echo "PREFIX: ${PREFIX}" @echo "GSSAPIBASEDIR: ${GSSAPIBASEDIR}" @echo "GSSAPIINCDIR: ${GSSAPIINCDIR}" @echo "GSSAPILIBDIR: ${GSSAPILIBDIR}" @echo "GSSAPILIBS: ${GSSAPILIBS}" @echo "GSSAPICPPFLAGS: ${GSSAPICPPFLAGS}" @echo "GSSAPILDFLAGS: ${GSSAPILDFLAGS}" @echo "GSSAPI_CONFIGURE_ARGS: ${GSSAPI_CONFIGURE_ARGS}" @echo "KRB5CONFIG: ${KRB5CONFIG}" @echo "CFLAGS: ${CFLAGS}" @echo "LDFLAGS: ${LDFLAGS}" @echo "LDADD: ${LDADD}" .endif diff --git a/Mk/Uses/horde.mk b/Mk/Uses/horde.mk index 2a7378c817ee..5b3089d88c46 100644 --- a/Mk/Uses/horde.mk +++ b/Mk/Uses/horde.mk @@ -1,158 +1,158 @@ # Feature: horde # Usage: USES=horde # Valid ARGS: none # # MAINTAINER= horde@FreeBSD.org .if !defined(_INCLUDE_USES_HORDE_MK) _INCLUDE_USES_HORDE_MK= yes MASTER_SITES?= https://pear.horde.org/get/ HORDE_DIR?= www/horde CPE_VENDOR?= horde IGNORE_WITH_PHP=80 81 DIST_SUBDIR= Horde PEAR_CHANNEL= horde horde-Horde_ActiveSync-DEPEND= ${PEARDIR}/Horde/ActiveSync.php:comms/pear-Horde_ActiveSync horde-Horde_Alarm-DEPEND= ${PEARDIR}/Horde/Alarm.php:devel/pear-Horde_Alarm horde-Horde_Auth-DEPEND= ${PEARDIR}/Horde/Auth.php:security/pear-Horde_Auth horde-Horde_Autoloader-DEPEND= ${PEARDIR}/Horde/Autoloader.php:devel/pear-Horde_Autoloader horde-Horde_Autoloader_Cache-DEPEND= ${PEARDIR}/Horde/Autoloader/Cache.php:devel/pear-Horde_Autoloader_Cache horde-Horde_Argv-DEPEND= ${PEARDIR}/Horde/Argv/Parser.php:devel/pear-Horde_Argv horde-Horde_Browser-DEPEND= ${PEARDIR}/Horde/Browser.php:www/pear-Horde_Browser horde-Horde_Cache-DEPEND= ${PEARDIR}/Horde/Cache.php:devel/pear-Horde_Cache horde-Horde_Cli-DEPEND= ${PEARDIR}/Horde/Cli.php:devel/pear-Horde_Cli horde-Horde_Compress-DEPEND= ${PEARDIR}/Horde/Compress.php:archivers/pear-Horde_Compress horde-Horde_Compress_Fast-DEPEND= ${PEARDIR}/Horde/Compress/Fast.php:archivers/pear-Horde_Compress_Fast horde-Horde_Constraint-DEPEND= ${PEARDIR}/Horde/Constraint.php:devel/pear-Horde_Constraint horde-Horde_Controller-DEPEND= ${PEARDIR}/Horde/Controller.php:devel/pear-Horde_Controller horde-Horde_Core-DEPEND= ${PEARDIR}/Horde.php:devel/pear-Horde_Core horde-Horde_Crypt-DEPEND= ${PEARDIR}/Horde/Crypt.php:security/pear-Horde_Crypt horde-Horde_Crypt_Blowfish-DEPEND= ${PEARDIR}/Horde/Crypt/Blowfish.php:security/pear-Horde_Crypt_Blowfish horde-Horde_CssMinify-DEPEND= ${PEARDIR}/Horde/CssMinify.php:textproc/pear-Horde_CssMinify horde-Horde_Css_Parser-DEPEND= ${PEARDIR}/Horde/Css/Parser.php:www/pear-Horde_Css_Parser horde-Horde_Data-DEPEND= ${PEARDIR}/Horde/Data.php:devel/pear-Horde_Data horde-Horde_Date-DEPEND= ${PEARDIR}/Horde/Date.php:devel/pear-Horde_Date horde-Horde_Date_Parser-DEPEND= ${PEARDIR}/Horde/Date/Parser.php:devel/pear-Horde_Date_Parser horde-Horde_Dav-DEPEND= ${PEARDIR}/Horde/Dav/Client.php:www/pear-Horde_Dav horde-Horde_Db-DEPEND= ${PEARDIR}/Horde/Db.php:databases/pear-Horde_Db horde-Horde_Editor-DEPEND= ${PEARDIR}/Horde/Editor.php:www/pear-Horde_Editor horde-Horde_Exception-DEPEND= ${PEARDIR}/Horde/Exception.php:devel/pear-Horde_Exception horde-Horde_Feed-DEPEND= ${PEARDIR}/Horde/Feed.php:www/pear-Horde_Feed horde-Horde_Form-DEPEND= ${PEARDIR}/Horde/Form.php:www/pear-Horde_Form horde-Horde_Group-DEPEND= ${PEARDIR}/Horde/Group/Base.php:security/pear-Horde_Group horde-Horde_HashTable-DEPEND= ${PEARDIR}/Horde/HashTable/Base.php:databases/pear-Horde_HashTable horde-Horde_History-DEPEND= ${PEARDIR}/Horde/History.php:devel/pear-Horde_History horde-Horde_Http-DEPEND= ${PEARDIR}/Horde/Http.php:www/pear-Horde_Http horde-Horde_Icalendar-DEPEND= ${PEARDIR}/Horde/Icalendar.php:devel/pear-Horde_Icalendar horde-Horde_Idna-DEPEND= ${PEARDIR}/Horde/Idna.php:dns/pear-Horde_Idna horde-Horde_Image-DEPEND= ${PEARDIR}/Horde/Image.php:graphics/pear-Horde_Image horde-Horde_Imap_Client-DEPEND= ${PEARDIR}/Horde/Imap/Client.php:mail/pear-Horde_Imap_Client horde-Horde_Imsp-DEPEND= ${PEARDIR}/Horde/Imsp.php:databases/pear-Horde_Imsp horde-Horde_Itip-DEPEND= ${PEARDIR}/Horde/Itip.php:devel/pear-Horde_Itip horde-Horde_Injector-DEPEND= ${PEARDIR}/Horde/Injector.php:devel/pear-Horde_Injector horde-Horde_JavascriptMinify-DEPEND= ${PEARDIR}/Horde/JavascriptMinify.php:textproc/pear-Horde_JavascriptMinify horde-Horde_Kolab_Format-DEPEND= ${PEARDIR}/Horde/Kolab/Format.php:textproc/pear-Horde_Kolab_Format horde-Horde_Kolab_Server-DEPEND= ${PEARDIR}/Horde/Kolab/Server/Factory.php:net/pear-Horde_Kolab_Server horde-Horde_Kolab_Session-DEPEND= ${PEARDIR}/Horde/Kolab/Session.php:net/pear-Horde_Kolab_Session horde-Horde_Kolab_Storage-DEPEND= ${PEARDIR}/Horde/Kolab/Storage.php:mail/pear-Horde_Kolab_Storage horde-Horde_Ldap-DEPEND= ${PEARDIR}/Horde/Ldap.php:net/pear-Horde_Ldap horde-Horde_ListHeaders-DEPEND= ${PEARDIR}/Horde/ListHeaders.php:mail/pear-Horde_ListHeaders horde-Horde_Lock-DEPEND= ${PEARDIR}/Horde/Lock.php:devel/pear-Horde_Lock horde-Horde_Log-DEPEND= ${PEARDIR}/Horde/Log.php:sysutils/pear-Horde_Log horde-Horde_LoginTasks-DEPEND= ${PEARDIR}/Horde/LoginTasks.php:devel/pear-Horde_LoginTasks horde-Horde_Mail-DEPEND= ${PEARDIR}/Horde/Mail/Transport.php:mail/pear-Horde_Mail horde-Horde_Mail_Autoconfig-DEPEND= ${PEARDIR}/Horde/Mail/Autoconfig.php:mail/pear-Horde_Mail_Autoconfig horde-Horde_Mapi-DEPEND= ${PEARDIR}/Horde/Mapi.php:mail/pear-Horde_Mapi horde-Horde_Memcache-DEPEND= ${PEARDIR}/Horde/Memcache.php:databases/pear-Horde_Memcache horde-Horde_Mime-DEPEND= ${PEARDIR}/Horde/Mime.php:mail/pear-Horde_Mime horde-Horde_Mime_Viewer-DEPEND= ${PEARDIR}/Horde/Mime/Viewer.php:mail/pear-Horde_Mime_Viewer horde-Horde_Mongo-DEPEND= ${PEARDIR}/Horde/Mongo/Client.php:databases/pear-Horde_Mongo horde-Horde_Nls-DEPEND= ${PEARDIR}/Horde/Nls.php:devel/pear-Horde_Nls horde-Horde_Notification-DEPEND= ${PEARDIR}/Horde/Notification.php:devel/pear-Horde_Notification horde-Horde_Oauth-DEPEND= ${PEARDIR}/Horde/Oauth/Consumer.php:security/pear-Horde_Oauth horde-Horde_Pack-DEPEND= ${PEARDIR}/Horde/Pack.php:archivers/pear-Horde_Pack horde-Horde_Pdf-DEPEND= ${PEARDIR}/Horde/Pdf/Writer.php:textproc/pear-Horde_Pdf horde-Horde_Perms-DEPEND= ${PEARDIR}/Horde/Perms.php:security/pear-Horde_Perms horde-Horde_Prefs-DEPEND= ${PEARDIR}/Horde/Prefs.php:devel/pear-Horde_Prefs horde-Horde_Queue-DEPEND= ${PEARDIR}/Horde/Queue/Runner.php:devel/pear-Horde_Queue horde-Horde_Rdo-DEPEND= ${PEARDIR}/Horde/Rdo.php:devel/pear-Horde_Rdo horde-Horde_Role-DEPEND= ${PEARDIR}/PEAR/Installer/Role/Horde/Role.php:devel/pear-Horde_Role horde-Horde_Rpc-DEPEND= ${PEARDIR}/Horde/Rpc.php:net/pear-Horde_Rpc horde-Horde_Routes-DEPEND= ${PEARDIR}/Horde/Routes/Route.php:www/pear-Horde_Routes horde-Horde_Secret-DEPEND= ${PEARDIR}/Horde/Secret.php:security/pear-Horde_Secret horde-Horde_Serialize-DEPEND= ${PEARDIR}/Horde/Serialize.php:devel/pear-Horde_Serialize horde-Horde_SessionHandler-DEPEND= ${PEARDIR}/Horde/SessionHandler.php:www/pear-Horde_SessionHandler horde-Horde_Scheduler-DEPEND= ${PEARDIR}/Horde/Scheduler.php:devel/pear-Horde_Scheduler horde-Horde_Scribe-DEPEND= ${PEARDIR}/Horde/Scribe.php:net/pear-Horde_Scribe horde-Horde_Share-DEPEND= ${PEARDIR}/Horde/Share/Base.php:security/pear-Horde_Share horde-Horde_Smtp-DEPEND= ${PEARDIR}/Horde/Smtp.php:mail/pear-Horde_Smtp horde-Horde_Socket_Client-DEPEND= ${PEARDIR}/Horde/Socket/Client.php:net/pear-Horde_Socket_Client horde-Horde_SpellChecker-DEPEND= ${PEARDIR}/Horde/SpellChecker.php:textproc/pear-Horde_SpellChecker horde-Horde_Stream-DEPEND= ${PEARDIR}/Horde/Stream.php:devel/pear-Horde_Stream horde-Horde_Stream_Filter-DEPEND= ${PEARDIR}/Horde/Stream/Filter/Crc32.php:devel/pear-Horde_Stream_Filter horde-Horde_Stream_Wrapper-DEPEND= ${PEARDIR}/Horde/Stream/Wrapper/StringStream.php:devel/pear-Horde_Stream_Wrapper horde-Horde_Service_Facebook-DEPEND= ${PEARDIR}/Horde/Service/Facebook.php:www/pear-Horde_Service_Facebook horde-Horde_Service_Twitter-DEPEND= ${PEARDIR}/Horde/Service/Twitter.php:www/pear-Horde_Service_Twitter horde-Horde_Service_UrlShortener-DEPEND= ${PEARDIR}/Horde/Service/UrlShortener.php:www/pear-Horde_Service_UrlShortener horde-Horde_Service_Weather-DEPEND= ${PEARDIR}/Horde/Service/Weather.php:www/pear-Horde_Service_Weather horde-Horde_Support-DEPEND= ${PEARDIR}/Horde/Support/Array.php:devel/pear-Horde_Support horde-Horde_SyncMl-DEPEND= ${PEARDIR}/Horde/SyncMl.php:comms/pear-Horde_SyncMl horde-Horde_Url-DEPEND= ${PEARDIR}/Horde/Url.php:net/pear-Horde_Url horde-Horde_Util-DEPEND= ${PEARDIR}/Horde/Util.php:devel/pear-Horde_Util horde-Horde_Template-DEPEND= ${PEARDIR}/Horde/Template.php:www/pear-Horde_Template horde-Horde_Text_Diff-DEPEND= ${PEARDIR}/Horde/Text/Diff.php:textproc/pear-Horde_Text_Diff horde-Horde_Text_Filter-DEPEND= ${PEARDIR}/Horde/Text/Filter.php:textproc/pear-Horde_Text_Filter horde-Horde_Text_Filter_Csstidy-DEPEND= ${PEARDIR}/Horde/Text/Filter/Csstidy.php:textproc/pear-Horde_Text_Filter_Csstidy horde-Horde_Text_Flowed-DEPEND= ${PEARDIR}/Horde/Text/Flowed.php:textproc/pear-Horde_Text_Flowed horde-Horde_Thrift-DEPEND= ${PEARDIR}/Horde/Thrift.php:devel/pear-Horde_Thrift horde-Horde_Timezone-DEPEND= ${PEARDIR}/Horde/Timezone.php:devel/pear-Horde_Timezone horde-Horde_Token-DEPEND= ${PEARDIR}/Horde/Token.php:devel/pear-Horde_Token horde-Horde_Translation-DEPEND= ${PEARDIR}/Horde/Translation.php:devel/pear-Horde_Translation horde-Horde_Tree-DEPEND= ${PEARDIR}/Horde/Tree.php:devel/pear-Horde_Tree horde-Horde_Vfs-DEPEND= ${PEARDIR}/Horde/Vfs.php:sysutils/pear-Horde_Vfs horde-Horde_View-DEPEND= ${PEARDIR}/Horde/View.php:devel/pear-Horde_View horde-Horde_Xml_Element-DEPEND= ${PEARDIR}/Horde/Xml/Element.php:textproc/pear-Horde_Xml_Element horde-Horde_Xml_Wbxml-DEPEND= ${PEARDIR}/Horde/Xml/Wbxml.php:textproc/pear-Horde_Xml_Wbxml horde-content-DEPEND= ${LOCALBASE}/${HORDE_DIR}/content/lib/Tagger.php:devel/horde-content horde-gollem-DEPEND= ${LOCALBASE}/${HORDE_DIR}/gollem/index.php:ftp/horde-gollem horde-horde-DEPEND= ${LOCALBASE}/${HORDE_DIR}/index.php:www/horde-base horde-imp-DEPEND= ${LOCALBASE}/${HORDE_DIR}/imp/index.php:mail/horde-imp horde-ingo-DEPEND= ${LOCALBASE}/${HORDE_DIR}/ingo/index.php:mail/horde-ingo horde-kronolith-DEPEND= ${LOCALBASE}/${HORDE_DIR}/kronolith/index.php:deskutils/horde-kronolith horde-mnemo-DEPEND= ${LOCALBASE}/${HORDE_DIR}/mnemo/index.php:deskutils/horde-mnemo horde-nag-DEPEND= ${LOCALBASE}/${HORDE_DIR}/nag/index.php:deskutils/horde-nag horde-timeobjects-DEPEND= ${LOCALBASE}/${HORDE_DIR}/timeobjects/lib/Driver.php:devel/horde-timeobjects horde-trean-DEPEND= ${LOCALBASE}/${HORDE_DIR}/trean/index.php:www/horde-trean horde-turba-DEPEND= ${LOCALBASE}/${HORDE_DIR}/turba/index.php:mail/horde-turba -.if defined(USE_HORDE_RUN) -. for DEP in ${USE_HORDE_RUN} -. if !defined(horde-${DEP}-DEPEND) +. if defined(USE_HORDE_RUN) +. for DEP in ${USE_HORDE_RUN} +. if !defined(horde-${DEP}-DEPEND) UNKNOWN_HORDE_PACKAGES+= ${DEP} -. else +. else RUN_DEPENDS+= ${horde-${DEP}-DEPEND}@${PHP_FLAVOR} +. endif +. endfor . endif -. endfor -.endif -.if defined(USE_HORDE_BUILD) -. for DEP in ${USE_HORDE_BUILD} -. if !defined(horde-${DEP}-DEPEND) +. if defined(USE_HORDE_BUILD) +. for DEP in ${USE_HORDE_BUILD} +. if !defined(horde-${DEP}-DEPEND) UNKNOWN_HORDE_PACKAGES+= ${DEP} -. else +. else BUILD_DEPENDS+= ${horde-${DEP}-DEPEND}@${PHP_FLAVOR} +. endif +. endfor . endif -. endfor -.endif -.if defined(UNKNOWN_HORDE_PACKAGES) +. if defined(UNKNOWN_HORDE_PACKAGES) IGNORE= unknown Horde package(s): ${UNKNOWN_HORDE_PACKAGES} -.endif +. endif .include "${USESDIR}/pear.mk" .endif diff --git a/Mk/Uses/iconv.mk b/Mk/Uses/iconv.mk index 4b9fafc10d35..8561e51c666b 100644 --- a/Mk/Uses/iconv.mk +++ b/Mk/Uses/iconv.mk @@ -1,67 +1,67 @@ # handle dependency on the iconv port # # Feature: iconv # Usage: USES=iconv or USES=iconv:ARGS # Valid ARGS: lib (default, implicit), build, patch, # wchar_t (port uses "WCHAR_T" extension), # translit (port uses "//TRANSLIT" extension) # # MAINTAINER: desktop@FreeBSD.org .if !defined(_INCLUDE_USES_ICONV_MK) _INCLUDE_USES_ICONV_MK= yes -.if !exists(/usr/include/iconv.h) || ${iconv_ARGS:Mwchar_t} || ${iconv_ARGS:Mtranslit} +. if !exists(/usr/include/iconv.h) || ${iconv_ARGS:Mwchar_t} || ${iconv_ARGS:Mtranslit} ICONV_CMD= ${LOCALBASE}/bin/iconv ICONV_LIB= -liconv ICONV_PREFIX= ${LOCALBASE} ICONV_CONFIGURE_ARG= --with-libiconv-prefix=${LOCALBASE} ICONV_CONFIGURE_BASE= --with-libiconv=${LOCALBASE} ICONV_INCLUDE_PATH= ${LOCALBASE}/include ICONV_LIB_PATH= ${LOCALBASE}/lib/libiconv.so -.if ${iconv_ARGS:Mbuild} +. if ${iconv_ARGS:Mbuild} BUILD_DEPENDS+= ${ICONV_CMD}:converters/libiconv -.elif ${iconv_ARGS:Mpatch} +. elif ${iconv_ARGS:Mpatch} PATCH_DEPENDS+= ${ICONV_CMD}:converters/libiconv -.else +. else LIB_DEPENDS+= libiconv.so:converters/libiconv -.endif +. endif -.else +. else ICONV_CMD= /usr/bin/iconv ICONV_LIB= ICONV_PREFIX= /usr ICONV_CONFIGURE_ARG= ICONV_CONFIGURE_BASE= ICONV_INCLUDE_PATH= /usr/include ICONV_LIB_PATH= /usr/lib/libc.so -.if exists(${LOCALBASE}/include/iconv.h) +. if exists(${LOCALBASE}/include/iconv.h) # Check that libiconv iconv.h is recent enough for LIBICONV_PLUG to work. BUILD_DEPENDS+= libiconv>=1.14_11:converters/libiconv -.endif +. endif # LIBICONV_PLUG makes libiconv iconv.h act like libc iconv.h. CPPFLAGS+= -DLIBICONV_PLUG CFLAGS+= -DLIBICONV_PLUG CXXFLAGS+= -DLIBICONV_PLUG OBJCFLAGS+= -DLIBICONV_PLUG -.endif +. endif # These are the most common names for the iconv-related variables found in # CMake-based ports. We set them here via CMAKE_ARGS to make sure that the best # combination is always used (ie. we prefer the version in libc whenever it is # available, and sometimes have to fall back to the iconv.h header from ports # while still using the library from base). CMAKE_ARGS+= -DICONV_INCLUDE_DIR=${ICONV_INCLUDE_PATH} \ -DICONV_LIBRARIES=${ICONV_LIB_PATH} \ -DICONV_LIBRARY=${ICONV_LIB_PATH} \ -DLIBICONV_INCLUDE_DIR=${ICONV_INCLUDE_PATH} \ -DLIBICONV_LIBRARIES=${ICONV_LIB_PATH} \ -DLIBICONV_LIBRARY=${ICONV_LIB_PATH} .endif diff --git a/Mk/Uses/imake.mk b/Mk/Uses/imake.mk index 85b43071555c..06981bc9f819 100644 --- a/Mk/Uses/imake.mk +++ b/Mk/Uses/imake.mk @@ -1,48 +1,48 @@ # Provide support for imake based projects # # Feature: imake # Usage: USES=imake # Valid ARGS: env: do not define any target # notall: do not pass -a to xmkmf # noman: do not add install-man to # INSTALL_TARGET # # MAINTAINER: x11@FreeBSD.org .if !defined(_INCLUDE_USES_IMAKE_MK) _INCLUDE_USES_IMAKE_MK= yes -.if ${imake_ARGS:Nnotall:Nenv:Nnoman} +. if ${imake_ARGS:Nnotall:Nenv:Nnoman} IGNORE= USES=imake:${imake_ARGS:S/ /,/g} is not a valid argument -.endif +. endif BUILD_DEPENDS+= imake:devel/imake -.if defined(USE_GCC) +. if defined(USE_GCC) IMAKECPP= ${CPP} IMAKECPPFLAGS= -DCppCmd=${CPP} -DCcCmd=${CC} -DCplusplusCmd=${CXX} -.else +. else IMAKECPP= tradcpp IMAKECPPFLAGS= -DCppCmd=tradcpp -DCcCmd=${CC} -DCplusplusCmd=${CXX} BUILD_DEPENDS+= tradcpp:devel/tradcpp -.endif +. endif MAKE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" CONFIGURE_ENV+= IMAKECPP=${IMAKECPP} IMAKECPPFLAGS="${IMAKECPPFLAGS}" -.if ! ${imake_ARGS:Mnotall} +. if ! ${imake_ARGS:Mnotall} XMKMF_ARGS+= -a -.endif +. endif -.if ! ${imake_ARGS:Menv} -.if !target(do-configure) +. if ! ${imake_ARGS:Menv} +. if !target(do-configure) do-configure: @(cd ${CONFIGURE_WRKSRC} && ${SETENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) -.endif +. endif -.if ! ${imake_ARGS:Mnoman} +. if ! ${imake_ARGS:Mnoman} LATE_INSTALL_ARGS= install.man -.endif +. endif -.endif +. endif .endif diff --git a/Mk/Uses/jpeg.mk b/Mk/Uses/jpeg.mk index 71b6b22b1e19..f4108fde2f73 100644 --- a/Mk/Uses/jpeg.mk +++ b/Mk/Uses/jpeg.mk @@ -1,36 +1,36 @@ # Handle dependency on jpeg # # Feature: jpeg # Usage: USES=jpeg or USES=jpeg:ARGS # Valid ARGS: lib (default, implicit), build, run, both # # User defined variables: # JPEG_PORT - jpeg implementation # Valid values: graphics/jpeg-turbo, graphics/mozjpeg # Default value: graphics/jpeg-turbo # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_JPEG_MK) _INCLUDE_USES_JPEG_MK= yes JPEG_PORT?= graphics/jpeg-turbo -.if empty(jpeg_ARGS) +. if empty(jpeg_ARGS) jpeg_ARGS= lib -.endif +. endif -.if ${jpeg_ARGS} == lib +. if ${jpeg_ARGS} == lib LIB_DEPENDS+= libjpeg.so:${JPEG_PORT} -.elif ${jpeg_ARGS} == build +. elif ${jpeg_ARGS} == build BUILD_DEPENDS+= cjpeg:${JPEG_PORT} -.elif ${jpeg_ARGS} == run +. elif ${jpeg_ARGS} == run RUN_DEPENDS+= cjpeg:${JPEG_PORT} -.elif ${jpeg_ARGS} == both +. elif ${jpeg_ARGS} == both BUILD_DEPENDS+= cjpeg:${JPEG_PORT} RUN_DEPENDS+= cjpeg:${JPEG_PORT} -.else +. else IGNORE= USES=jpeg - invalid args: [${jpeg_ARGS}] specified -.endif +. endif .endif diff --git a/Mk/Uses/kde.mk b/Mk/Uses/kde.mk index 0c6bedceec96..7e7048481e8a 100644 --- a/Mk/Uses/kde.mk +++ b/Mk/Uses/kde.mk @@ -1,911 +1,911 @@ # Provides support for KDE and KF5-based ports. # # Feature: kde # Valid ARGS: 5 # # 5: Depend on KDE Frameworks 5 components and variables. # # Variables that can be set by a port: # # USE_KDE List of KF5/Plasma5 components (other ports) that this # port depends on. # * foo_build Add a build-time dependency (BUILD_DEPENDS) # * foo_run Add a run-time dependency (RUN_DEPENDS) # * foo (default) Add both dependencies on component , or # a LIB_DEPENDS if applicable. # # To simplify the ports, also: # CATEGORIES If the port is part of one of the KDE Software distribution, # it can add, in addition to 'kde' one of the following: # kde-applications: part of applications release # kde-frameworks: part of frameworks release # kde-plasma: part of plasma release # this will then set default values for MASTER_SITES and DIST_SUBDIR # as well as CPE_VENDOR and LICENSE. # # option DOCS If the port is part of kde-applications (see CATEGORIES, # above) and has an option defined for DOCS then a dependency # for doctools_build is added. The option itself doesn't # have to do anything -- the dependency is always there. # # KDE_INVENT If the port does not have a regular release, and should # be fetched from KDE Invent (a GitLab instance) it can set # KDE_INVENT to 3 space-separated values: # * a full 40-character commit hash # * a category name inside KDE Invent # * a repository name inside KDE Invent # Default values for category and name are: # * the first item in CATEGORIES that is not "kde"; this # is useful when the FreeBSD ports category and the KDE # category are the same (which happens sometimes) # * PORTNAME, often the FreeBSD port name is the same # as the upstream name and it will not need to be specified. # Sometimes `KDE_INVENT=` will do and often # `KDE_INVENT= ` is enough. # # Setting KDE_INVENT is the equivalent of a handful of USE_GITLAB # and related settings. # # MAINTAINER: kde@FreeBSD.org .if !defined(_INCLUDE_USES_KDE_MK) _INCLUDE_USES_KDE_MK= yes _KDE_SUPPORTED= 5 . if empty(kde_ARGS) IGNORE= kde needs a version (${_KDE_SUPPORTED}) . endif . for ver in ${_KDE_SUPPORTED:O:u} . if ${kde_ARGS:M${ver}} . if !defined(_KDE_VERSION) _KDE_VERSION= ${ver} . else IGNORE?= cannot be installed: different KDE versions specified via kde:[${_KDE_SUPPORTED:S/ //g}] #' . endif . endif . endfor . if empty(_KDE_VERSION) IGNORE?= kde:[${_KDE_SUPPORTED:S/ //g}] needs an argument #' . else _KDE_RELNAME= KDE${_KDE_VERSION} # === VERSIONS OF THE DIFFERENT COMPONENTS ===================================== # Current KDE desktop. KDE_PLASMA_VERSION?= 5.24.4 KDE_PLASMA_BRANCH?= stable # Current KDE frameworks. KDE_FRAMEWORKS_VERSION?= 5.93.0 KDE_FRAMEWORKS_BRANCH?= stable # Current KDE applications. KDE_APPLICATIONS_VERSION?= 22.04.0 KDE_APPLICATIONS_SHLIB_VER?= 5.20.0 # G as in KDE Gear, and as in "don't make the variable name longer than required" KDE_APPLICATIONS_SHLIB_G_VER?= 22.04.0 KDE_APPLICATIONS_BRANCH?= stable # Extended KDE universe applications. CALLIGRA_VERSION?= 2.9.11 CALLIGRA_BRANCH?= stable # ============================================================================== # === INSTALLATION PREFIXES AND HEADER LOCATION ================================ # Define unversioned prefix variable. KDE_PREFIX= ${LOCALBASE} # ============================================================================== # === CATEGORIES HANDLING -- SETTING DEFAULT VALUES ============================ # Doing MASTER_SITES magic based on the category of the port _KDE_CATEGORIES_SUPPORTED= kde-applications kde-frameworks kde-plasma . for cat in ${_KDE_CATEGORIES_SUPPORTED} . if ${CATEGORIES:M${cat}} . if !defined(_KDE_CATEGORY) _KDE_CATEGORY= ${cat} . else IGNORE?= cannot be installed: multiple kde-<...> categories specified via CATEGORIES=${CATEGORIES} #' . endif . endif . endfor # Doing source-selection if the sources are on KDE invent . if defined(KDE_INVENT) _invent_hash= ${KDE_INVENT:[1]} _invent_category= ${KDE_INVENT:[2]} _invent_name= ${KDE_INVENT:[3]} # Fill in default values if bits are missing . if empty(_invent_category) _invent_category= ${CATEGORIES:Nkde:[1]} . endif . if empty(_invent_name) _invent_name= ${PORTNAME} . endif # If valid, use it for GitLab . if empty(_invent_hash) || empty(_invent_category) || empty(_invent_name) IGNORE?= invalid KDE_INVENT value '${KDE_INVENT}' . else USE_GITLAB= yes GL_SITE= https://invent.kde.org GL_ACCOUNT= ${_invent_category} GL_PROJECT= ${_invent_name} GL_COMMIT= ${_invent_hash} . endif . endif . if defined(_KDE_CATEGORY) # KDE is normally licensed under the LGPL 2.0. LICENSE?= LGPL20 # Set CPE Vendor Information # As _KDE_CATEGORY is set we can assume it is port release by KDE and the # vendor is therefore kde. CPE_VENDOR?= kde . if ${_KDE_CATEGORY:Mkde-applications} PORTVERSION?= ${KDE_APPLICATIONS_VERSION} MASTER_SITES?= KDE/${KDE_APPLICATIONS_BRANCH}/release-service/${KDE_APPLICATIONS_VERSION}/src # Let bsd.port.mk create the plist-entries for the documentation. # KDE Applications ports install their documentation to # ${PREFIX}/share/doc. This is only done if the port # defines OPTION DOCS -- the _KDE_OPTIONS here is to # avoid make errors when there are no options defined at all. _KDE_OPTIONS= bogus ${OPTIONS_DEFINE} -. if ${_KDE_OPTIONS:MDOCS} +. if ${_KDE_OPTIONS:MDOCS} DOCSDIR= ${PREFIX}/share/doc PORTDOCS?= HTML/* USE_KDE+= doctools_build -. endif +. endif # Further pass along a SHLIB_VER PLIST_SUB PLIST_SUB+= KDE_APPLICATIONS_SHLIB_VER=${KDE_APPLICATIONS_SHLIB_VER} \ KDE_APPLICATIONS_VERSION_SHORT="${KDE_APPLICATIONS_VERSION:R:R}" DIST_SUBDIR?= KDE/release-service/${KDE_APPLICATIONS_VERSION} . elif ${_KDE_CATEGORY:Mkde-plasma} PORTVERSION?= ${KDE_PLASMA_VERSION} PKGNAMEPREFIX?= plasma5- MASTER_SITES?= KDE/${KDE_PLASMA_BRANCH}/plasma/${KDE_PLASMA_VERSION} DIST_SUBDIR?= KDE/plasma/${KDE_PLASMA_VERSION} . elif ${_KDE_CATEGORY:Mkde-frameworks} PORTVERSION?= ${KDE_FRAMEWORKS_VERSION} PKGNAMEPREFIX?= kf5- # This is a slight duplication of _USE_FRAMEWORKS_PORTING -- it maybe would be # better to rely on ${_USE_FRAMEWORKS_PORTING:S/^/k/g} _PORTINGAIDS= kjs kjsembed kdelibs4support kdesignerplugin kdewebkit khtml kmediaplayer kross kxmlrpcclient . if ${_PORTINGAIDS:M*${PORTNAME}*} MASTER_SITES?= KDE/${KDE_FRAMEWORKS_BRANCH}/frameworks/${KDE_FRAMEWORKS_VERSION:R}/portingAids . else MASTER_SITES?= KDE/${KDE_FRAMEWORKS_BRANCH}/frameworks/${KDE_FRAMEWORKS_VERSION:R} . endif DIST_SUBDIR?= KDE/frameworks/${KDE_FRAMEWORKS_VERSION} . else IGNORE?= unknown CATEGORY value '${_KDE_CATEGORY}' #' . endif . endif #defined(_KDE_CATEGORY) # ============================================================================== # === SET UP CMAKE ENVIRONMENT ================================================= # Help cmake to find files when testing ports with non-default PREFIX. CMAKE_ARGS+= -DCMAKE_PREFIX_PATH="${LOCALBASE}" # We set KDE_INSTALL_USE_QT_SYS_PATHS to install mkspecs files, plugins and # imports to the Qt 5 install directory. CMAKE_ARGS+= -DCMAKE_MODULE_PATH="${LOCALBASE};${KDE_PREFIX}" \ -DCMAKE_INSTALL_PREFIX="${KDE_PREFIX}" \ -DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=true # Set man-page installation prefix. CMAKE_ARGS+= -DKDE_INSTALL_MANDIR:PATH="${KDE_PREFIX}/man" \ -DMAN_INSTALL_DIR:PATH="${KDE_PREFIX}/man" # Disable autotests unless TEST_TARGET is defined. . if !defined(TEST_TARGET) CMAKE_ARGS+= -DBUILD_TESTING:BOOL=false . endif # ============================================================================== # === SET UP PLIST_SUB ========================================================= # Prefix and include directory. PLIST_SUB+= KDE_PREFIX="${KDE_PREFIX}" # KDE Applications version. PLIST_SUB+= KDE_APPLICATIONS_VERSION="${KDE_APPLICATIONS_VERSION}" \ KDE_FRAMEWORKS_VERSION="${KDE_FRAMEWORKS_VERSION}" \ KDE_PLASMA_VERSION="${KDE_PLASMA_VERSION}" # ============================================================================== _USE_KDE_BOTH= akonadi attica libkcddb libkcompactdisc libkdcraw libkdegames \ libkeduvocdocument libkexiv2 libkipi libksane okular \ baloo baloo-widgets kate marble # List of components of the KDE Frameworks distribution. # The *_TIER variables are internal, primarily for checking # that our list of frameworks matches the structure offered upstream. _USE_FRAMEWORKS_TIER1= apidox archive attica5 breeze-icons codecs config \ coreaddons dbusaddons dnssd holidays i18n idletime itemmodels \ itemviews kirigami2 kquickcharts oxygen-icons5 plotting prison \ qqc2-desktop-style solid sonnet syntaxhighlighting \ threadweaver wayland widgetsaddons windowsystem # NOT LISTED TIER1: modemmanagerqt networkmanagerqt (not applicable) _USE_FRAMEWORKS_TIER2= auth completion crash doctools \ filemetadata kimageformats jobwidgets notifications \ package pty syndication unitconversion _USE_FRAMEWORKS_TIER3= activities activities-stats baloo5 bookmarks configwidgets \ designerplugin emoticons globalaccel guiaddons \ iconthemes init kcmutils kdav kdeclarative \ kded kdesu kdewebkit kio kwayland-server newstuff notifyconfig parts \ people plasma-framework purpose runner service texteditor \ textwidgets wallet xmlgui xmlrpcclient _USE_FRAMEWORKS_TIER4= frameworkintegration calendarcore contacts # Porting Aids frameworks provide code and utilities to ease the transition from # kdelibs 4 to KDE Frameworks 5. Code should aim to port away from this framework, # new projects should avoid using these libraries. _USE_FRAMEWORKS_PORTING=js jsembed kdelibs4support khtml mediaplayer kross _USE_FRAMEWORKS_ALL= ecm \ ${_USE_FRAMEWORKS_TIER1} \ ${_USE_FRAMEWORKS_TIER2} \ ${_USE_FRAMEWORKS_TIER3} \ ${_USE_FRAMEWORKS_TIER4} \ ${_USE_FRAMEWORKS_PORTING} \ ${_USE_FRAMEWORKS_EXTRA} \ kpublictransport kosm \ plasma-wayland-protocols # List of components of the KDE Plasma distribution. _USE_PLASMA_ALL= activitymanagerd breeze breeze-gtk \ decoration discover drkonqi hotkeys \ infocenter kde-cli-tools kde-gtk-config \ kdeplasma-addons kgamma5 kmenuedit kscreen \ kscreenlocker ksshaskpass ksysguard ksystemstats kwallet-pam \ kwayland-integration kwin kwrited layer-shell-qt libkscreen \ libksysguard milou oxygen plasma-browser-integration \ plasma-desktop plasma-disks plasma-integration plasma-pa \ plasma-sdk plasma-workspace plasma-workspace-wallpapers \ polkit-kde-agent-1 powerdevil systemsettings # List of components of the KDE PIM distribution (part of applications). _USE_KDEPIM5_ALL= akonadicontacts akonadiimportwizard akonadimime akonadinotes \ akonadicalendar akonadisearch \ calendarcore calendarsupport calendarutils \ contacts eventviews gapi grantleetheme \ gravatar identitymanagement imap \ incidenceeditor kdepim-addons \ kdepim-runtime5 kitinerary kontactinterface kpkpass \ ksmtp ldap libkdepim libkleo libksieve mailcommon \ mailimporter mailtransport mbox messagelib \ mime pimcommon pimtextedit tnef \ kalarm kontact kmail mbox-importer \ akonadiconsole akregator grantlee-editor kaddressbook \ kalarm kmail-account-wizard kmail knotes kontact \ korganizer pim-data-exporter _USE_KDE5_ALL= ${_USE_FRAMEWORKS_ALL} \ ${_USE_PLASMA_ALL} \ ${_USE_KDEPIM5_ALL} \ ${_USE_KDE_BOTH} # ====================== frameworks components ================================= kde-activities_PORT= x11/kf5-kactivities kde-activities_LIB= libKF5Activities.so kde-activities-stats_PORT= x11/kf5-kactivities-stats kde-activities-stats_LIB= libKF5ActivitiesStats.so kde-apidox_PORT= devel/kf5-kapidox kde-apidox_PATH= ${KDE_PREFIX}/bin/kapidox-generate kde-apidox_TYPE= run kde-archive_PORT= archivers/kf5-karchive kde-archive_LIB= libKF5Archive.so kde-attica5_PORT= x11-toolkits/kf5-attica kde-attica5_LIB= libKF5Attica.so kde-auth_PORT= devel/kf5-kauth kde-auth_LIB= libKF5Auth.so kde-baloo5_PORT= sysutils/kf5-baloo kde-baloo5_LIB= libKF5Baloo.so kde-bookmarks_PORT= devel/kf5-kbookmarks kde-bookmarks_LIB= libKF5Bookmarks.so kde-breeze-icons_PORT= x11-themes/kf5-breeze-icons kde-breeze-icons_PATH= ${KDE_PREFIX}/share/icons/breeze/index.theme kde-breeze-icons_TYPE= run kde-codecs_PORT= textproc/kf5-kcodecs kde-codecs_LIB= libKF5Codecs.so kde-completion_PORT= x11-toolkits/kf5-kcompletion kde-completion_LIB= libKF5Completion.so kde-config_PORT= devel/kf5-kconfig kde-config_LIB= libKF5ConfigCore.so kde-configwidgets_PORT= x11-toolkits/kf5-kconfigwidgets kde-configwidgets_LIB= libKF5ConfigWidgets.so kde-coreaddons_PORT= devel/kf5-kcoreaddons kde-coreaddons_LIB= libKF5CoreAddons.so kde-crash_PORT= devel/kf5-kcrash kde-crash_LIB= libKF5Crash.so kde-dbusaddons_PORT= devel/kf5-kdbusaddons kde-dbusaddons_LIB= libKF5DBusAddons.so kde-designerplugin_PORT= x11-toolkits/kf5-kdesignerplugin kde-designerplugin_PATH= ${KDE_PREFIX}/bin/kgendesignerplugin kde-designerplugin_TYPE= run kde-dnssd_PORT= dns/kf5-kdnssd kde-dnssd_LIB= libKF5DNSSD.so kde-doctools_PORT= devel/kf5-kdoctools kde-doctools_PATH= ${KDE_PREFIX}/bin/meinproc5 kde-ecm_PORT= devel/kf5-extra-cmake-modules kde-ecm_PATH= ${LOCALBASE}/share/ECM/cmake/ECMConfig.cmake kde-emoticons_PORT= x11-themes/kf5-kemoticons kde-emoticons_LIB= libKF5Emoticons.so kde-filemetadata_PORT= devel/kf5-kfilemetadata kde-filemetadata_LIB= libKF5FileMetaData.so kde-frameworkintegration_PORT= x11/kf5-frameworkintegration kde-frameworkintegration_LIB= libKF5Style.so kde-globalaccel_PORT= x11/kf5-kglobalaccel kde-globalaccel_LIB= libKF5GlobalAccel.so kde-guiaddons_PORT= x11-toolkits/kf5-kguiaddons kde-guiaddons_LIB= libKF5GuiAddons.so kde-holidays_PORT= net/kf5-kholidays kde-holidays_LIB= libKF5Holidays.so kde-i18n_PORT= devel/kf5-ki18n kde-i18n_LIB= libKF5I18n.so kde-iconthemes_PORT= x11-themes/kf5-kiconthemes kde-iconthemes_LIB= libKF5IconThemes.so kde-idletime_PORT= devel/kf5-kidletime kde-idletime_LIB= libKF5IdleTime.so kde-init_PORT= x11/kf5-kinit kde-init_PATH= ${KDE_PREFIX}/bin/kdeinit5 kde-itemmodels_PORT= devel/kf5-kitemmodels kde-itemmodels_LIB= libKF5ItemModels.so kde-itemviews_PORT= x11-toolkits/kf5-kitemviews kde-itemviews_LIB= libKF5ItemViews.so kde-jobwidgets_PORT= x11-toolkits/kf5-kjobwidgets kde-jobwidgets_LIB= libKF5JobWidgets.so kde-js_PORT= www/kf5-kjs kde-js_LIB= libKF5JS.so kde-jsembed_PORT= www/kf5-kjsembed kde-jsembed_LIB= libKF5JsEmbed.so kde-kcmutils_PORT= devel/kf5-kcmutils kde-kcmutils_LIB= libKF5KCMUtils.so kde-kdeclarative_PORT= devel/kf5-kdeclarative kde-kdeclarative_LIB= libKF5Declarative.so kde-kded_PORT= x11/kf5-kded kde-kded_PATH= ${KDE_PREFIX}/bin/kded5 kde-kdelibs4support_PORT= x11/kf5-kdelibs4support kde-kdelibs4support_LIB= libKF5KDELibs4Support.so kde-kdesu_PORT= security/kf5-kdesu kde-kdesu_LIB= libKF5Su.so kde-kdewebkit_PORT= www/kf5-kdewebkit kde-kdewebkit_LIB= libKF5WebKit.so kde-khtml_PORT= www/kf5-khtml kde-khtml_LIB= libKF5KHtml.so kde-kimageformats_PORT= graphics/kf5-kimageformats kde-kimageformats_PATH= ${QT_PLUGINDIR}/imageformats/kimg_xcf.so kde-kimageformats_TYPE= run kde-kio_PORT= devel/kf5-kio kde-kio_LIB= libKF5KIOCore.so kde-kirigami2_PORT= x11-toolkits/kf5-kirigami2 kde-kirigami2_PATH= ${QT_QMLDIR}/org/kde/kirigami.2/libKirigamiPlugin.so kde-kquickcharts_PORT= graphics/kf5-kquickcharts kde-kquickcharts_PATH= ${QT_QMLDIR}/org/kde/quickcharts/libQuickCharts.so kde-kross_PORT= lang/kf5-kross kde-kross_LIB= libKF5KrossCore.so kde-kwayland-server_PORT= x11/plasma5-kwayland-server kde-kwayland-server_LIB= libKWaylandServer.so kde-layer-shell-qt_PORT= x11/plasma5-layer-shell-qt kde-layer-shell-qt_LIB= libLayerShellQtInterface.so kde-mediaplayer_PORT= multimedia/kf5-kmediaplayer kde-mediaplayer_LIB= libKF5MediaPlayer.so.5 kde-newstuff_PORT= devel/kf5-knewstuff kde-newstuff_LIB= libKF5NewStuff.so kde-notifications_PORT= devel/kf5-knotifications kde-notifications_LIB= libKF5Notifications.so kde-notifyconfig_PORT= devel/kf5-knotifyconfig kde-notifyconfig_LIB= libKF5NotifyConfig.so kde-oxygen-icons5_PORT= x11-themes/kf5-oxygen-icons5 kde-oxygen-icons5_PATH= ${KDE_PREFIX}/share/icons/oxygen/index.theme kde-oxygen-icons5_TYPE= run kde-package_PORT= devel/kf5-kpackage kde-package_LIB= libKF5Package.so kde-parts_PORT= devel/kf5-kparts kde-parts_LIB= libKF5Parts.so kde-people_PORT= devel/kf5-kpeople kde-people_LIB= libKF5People.so kde-plasma-framework_PORT= x11/kf5-plasma-framework kde-plasma-framework_LIB= libKF5Plasma.so kde-plasma-wayland-protocols_PORT= x11/plasma-wayland-protocols kde-plasma-wayland-protocols_PATH= ${KDE_PREFIX}/lib/cmake/PlasmaWaylandProtocols/PlasmaWaylandProtocolsConfig.cmake kde-plotting_PORT= graphics/kf5-kplotting kde-plotting_LIB= libKF5Plotting.so kde-prison_PORT= graphics/kf5-prison kde-prison_LIB= libKF5Prison.so kde-pty_PORT= devel/kf5-kpty kde-pty_LIB= libKF5Pty.so kde-purpose_PORT= misc/kf5-purpose kde-purpose_LIB= libKF5Purpose.so kde-qqc2-desktop-style_PORT= x11-themes/kf5-qqc2-desktop-style kde-qqc2-desktop-style_PATH= ${QT_PLUGINDIR}/kf5/kirigami/org.kde.desktop.so kde-runner_PORT= x11/kf5-krunner kde-runner_LIB= libKF5Runner.so kde-service_PORT= devel/kf5-kservice kde-service_PATH= ${KDE_PREFIX}/bin/kbuildsycoca5 kde-solid_PORT= devel/kf5-solid kde-solid_LIB= libKF5Solid.so kde-sonnet_PORT= textproc/kf5-sonnet kde-sonnet_LIB= libKF5SonnetCore.so kde-syndication_PORT= net/kf5-syndication kde-syndication_LIB= libKF5Syndication.so kde-syntaxhighlighting_PORT= textproc/kf5-syntax-highlighting kde-syntaxhighlighting_LIB= libKF5SyntaxHighlighting.so kde-texteditor_PORT= devel/kf5-ktexteditor kde-texteditor_LIB= libKF5TextEditor.so kde-textwidgets_PORT= x11-toolkits/kf5-ktextwidgets kde-textwidgets_LIB= libKF5TextWidgets.so kde-threadweaver_PORT= devel/kf5-threadweaver kde-threadweaver_LIB= libKF5ThreadWeaver.so kde-unitconversion_PORT= devel/kf5-kunitconversion kde-unitconversion_LIB= libKF5UnitConversion.so kde-wallet_PORT= sysutils/kf5-kwallet kde-wallet_LIB= libKF5Wallet.so kde-wayland_PORT= x11/kf5-kwayland kde-wayland_LIB= libKF5WaylandClient.so kde-widgetsaddons_PORT= x11-toolkits/kf5-kwidgetsaddons kde-widgetsaddons_LIB= libKF5WidgetsAddons.so kde-windowsystem_PORT= x11/kf5-kwindowsystem kde-windowsystem_LIB= libKF5WindowSystem.so kde-xmlgui_PORT= x11-toolkits/kf5-kxmlgui kde-xmlgui_LIB= libKF5XmlGui.so kde-xmlrpcclient_PORT= net/kf5-kxmlrpcclient kde-xmlrpcclient_LIB= libKF5XmlRpcClient.so # ====================== end of frameworks components ========================== # ====================== plasma components ===================================== kde-activitymanagerd_PORT= x11/plasma5-kactivitymanagerd kde-activitymanagerd_LIB= libkactivitymanagerd_plugin.so kde-breeze_PORT= x11-themes/plasma5-breeze kde-breeze_PATH= ${KDE_PREFIX}/share/QtCurve/Breeze.qtcurve kde-breeze-gtk_PORT= x11-themes/plasma5-breeze-gtk kde-breeze-gtk_PATH= ${KDE_PREFIX}/share/themes/Breeze/gtk-2.0/gtkrc kde-decoration_PORT= x11-wm/plasma5-kdecoration kde-decoration_LIB= libkdecorations2.so kde-discover_PORT= sysutils/plasma5-discover kde-discover_PATH= ${KDE_PREFIX}/bin/plasma-discover kde-drkonqi_PORT= sysutils/plasma5-drkonqi kde-drkonqi_PATH= ${KDE_PREFIX}/lib/libexec/drkonqi kde-hotkeys_PORT= devel/plasma5-khotkeys kde-hotkeys_LIB= libkhotkeysprivate.so.5 kde-infocenter_PORT= sysutils/plasma5-kinfocenter kde-infocenter_PATH= ${KDE_PREFIX}/bin/kinfocenter kde-kde-cli-tools_PORT= sysutils/plasma5-kde-cli-tools kde-kde-cli-tools_PATH= ${KDE_PREFIX}/bin/kcmshell5 kde-kde-gtk-config_PORT= x11-themes/plasma5-kde-gtk-config kde-kde-gtk-config_PATH= ${KDE_PREFIX}/lib/kconf_update_bin/gtk_theme kde-kdeplasma-addons_PORT= x11-toolkits/plasma5-kdeplasma-addons kde-kdeplasma-addons_LIB= libplasmapotdprovidercore.so kde-kgamma5_PORT= x11/plasma5-kgamma5 kde-kgamma5_PATH= ${QT_PLUGINDIR}/plasma/kcms/systemsettings/kcm_kgamma.so kde-kmenuedit_PORT= sysutils/plasma5-kmenuedit kde-kmenuedit_PATH= ${KDE_PREFIX}/bin/kmenuedit kde-kscreen_PORT= x11/plasma5-kscreen kde-kscreen_PATH= ${KDE_PREFIX}/bin/kscreen-console kde-kscreenlocker_PORT= security/plasma5-kscreenlocker kde-kscreenlocker_LIB= libKScreenLocker.so kde-ksshaskpass_PORT= security/plasma5-ksshaskpass kde-ksshaskpass_PATH= ${KDE_PREFIX}/bin/ksshaskpass kde-ksysguard_PORT= sysutils/plasma5-ksysguard kde-ksysguard_PATH= ${KDE_PREFIX}/bin/ksysguard kde-ksystemstats_PORT= sysutils/plasma5-ksystemstats kde-ksystemstats_PATH= ${KDE_PREFIX}/bin/ksystemstats kde-kwallet-pam_PORT= security/plasma5-kwallet-pam kde-kwallet-pam_PATH= ${KDE_PREFIX}/lib/pam_kwallet5.so kde-kwayland-integration_PORT= x11/plasma5-kwayland-integration kde-kwayland-integration_PATH= ${QT_PLUGINDIR}/kf5/org.kde.kidletime.platforms/KF5IdleTimeKWaylandPlugin.so kde-kwin_PORT= x11-wm/plasma5-kwin kde-kwin_PATH= ${KDE_PREFIX}/bin/kwin_x11 kde-kwrited_PORT= devel/plasma5-kwrited kde-kwrited_PATH= ${QT_PLUGINDIR}/kf5/kded/kwrited.so kde-libkscreen_PORT= x11/plasma5-libkscreen kde-libkscreen_LIB= libKF5Screen.so kde-libksysguard_PORT= sysutils/plasma5-libksysguard kde-libksysguard_LIB= libksgrd.so kde-milou_PORT= deskutils/plasma5-milou kde-milou_LIB= libmilou.so.5 kde-oxygen_PORT= x11-themes/plasma5-oxygen kde-oxygen_PATH= ${QT_PLUGINDIR}/styles/oxygen.so kde-plasma-browser-integration_PORT= www/plasma5-plasma-browser-integration kde-plasma-browser-integration_PATH= ${KDE_PREFIX}/bin/plasma-browser-integration-host kde-plasma-desktop_PORT= x11/plasma5-plasma-desktop kde-plasma-desktop_PATH= ${KDE_PREFIX}/bin/kaccess kde-plasma-disks_PORT= sysutils/plasma5-plasma-disks kde-plasma-disks_PATH= ${KDE_PREFIX}/lib/libexec/kauth/kded-smart-helper kde-plasma-integration_PORT= x11/plasma5-plasma-integration kde-plasma-integration_PATH= ${QT_PLUGINDIR}/platformthemes/KDEPlasmaPlatformTheme.so kde-plasma-pa_PORT= audio/plasma5-plasma-pa kde-plasma-pa_PATH= ${QT_PLUGINDIR}/kcms/kcm_pulseaudio.so kde-plasma-sdk_PORT= devel/plasma5-plasma-sdk kde-plasma-sdk_PATH= ${KDE_PREFIX}/bin/plasmoidviewer kde-plasma-workspace_PORT= x11/plasma5-plasma-workspace kde-plasma-workspace_LIB= libkworkspace5.so kde-plasma-workspace-wallpapers_PORT= x11-themes/plasma5-plasma-workspace-wallpapers kde-plasma-workspace-wallpapers_PATH= ${KDE_PREFIX}/share/wallpapers/Autumn/contents/images/1280x1024.jpg kde-polkit-kde-agent-1_PORT= sysutils/plasma5-polkit-kde-agent-1 kde-polkit-kde-agent-1_PATH= ${KDE_PREFIX}/lib/libexec/polkit-kde-authentication-agent-1 kde-powerdevil_PORT= sysutils/plasma5-powerdevil kde-powerdevil_LIB= libpowerdevilcore.so kde-systemsettings_PORT= sysutils/plasma5-systemsettings kde-systemsettings_PATH= ${KDE_PREFIX}/bin/systemsettings5 # ====================== end of plasma components ============================== # ====================== pim5 components ======================================= kde-akonadicontacts_PORT= net/akonadi-contacts kde-akonadicontacts_LIB= libKF5AkonadiContact.so kde-akonadiimportwizard_PORT= deskutils/akonadi-import-wizard kde-akonadiimportwizard_LIB= libKPimImportWizard.so kde-akonadimime_PORT= net/akonadi-mime kde-akonadimime_LIB= libKF5AkonadiMime.so kde-akonadinotes_PORT= net/akonadi-notes kde-akonadinotes_LIB= libKF5AkonadiNotes.so kde-akonadicalendar_PORT= net/akonadi-calendar kde-akonadicalendar_LIB= libKF5AkonadiCalendar.so kde-akonadisearch_PORT= net/akonadi-search kde-akonadisearch_LIB= libKF5AkonadiSearchCore.so kde-calendarsupport_PORT= net/calendarsupport kde-calendarsupport_LIB= libKF5CalendarSupport.so kde-calendarcore_PORT= net/kf5-kcalendarcore kde-calendarcore_LIB= libKF5CalendarCore.so kde-calendarutils_PORT= net/kcalutils kde-calendarutils_LIB= libKF5CalendarUtils.so kde-contacts_PORT= net/kf5-kcontacts kde-contacts_LIB= libKF5Contacts.so kde-eventviews_PORT= net/eventviews kde-eventviews_LIB= libKF5EventViews.so kde-gapi_PORT= net/libkgapi kde-gapi_LIB= libKPimGAPICore.so kde-grantleetheme_PORT= deskutils/grantleetheme kde-grantleetheme_LIB= libKF5GrantleeTheme.so kde-gravatar_PORT= net/libgravatar kde-gravatar_LIB= libKF5Gravatar.so kde-identitymanagement_PORT= net/kidentitymanagement kde-identitymanagement_LIB= libKF5IdentityManagement.so kde-imap_PORT= net/kimap kde-imap_LIB= libKF5IMAP.so kde-incidenceeditor_PORT= net/incidenceeditor kde-incidenceeditor_LIB= libKF5IncidenceEditor.so kde-kdav_PORT= net/kf5-kdav kde-kdav_LIB= libKF5DAV.so kde-kdepim-addons_PORT= deskutils/kdepim-addons kde-kdepim-addons_PATH= ${KDE_PREFIX}/lib/contacteditor/editorpageplugins/cryptopageplugin.so kde-kdepim-runtime5_PORT= deskutils/kdepim-runtime kde-kdepim-runtime5_PATH= ${KDE_PREFIX}/bin/gidmigrator kde-kitinerary_PORT= net/kitinerary kde-kitinerary_LIB= libKPimItinerary.so kde-kontactinterface_PORT= net/kontactinterface kde-kontactinterface_LIB= libKF5KontactInterface.so kde-kpkpass_PORT= security/kpkpass kde-kpkpass_LIB= libKPimPkPass.so kde-ksmtp_PORT= net/ksmtp kde-ksmtp_LIB= libKPimSMTP.so kde-ldap_PORT= net/kldap kde-ldap_LIB= libKF5Ldap.so kde-libkdepim_PORT= deskutils/libkdepim kde-libkdepim_LIB= libKF5Libkdepim.so kde-libkleo_PORT= security/libkleo kde-libkleo_LIB= libKF5Libkleo.so kde-libksieve_PORT= net/libksieve kde-libksieve_LIB= libKF5KSieve.so kde-mailcommon_PORT= net/mailcommon kde-mailcommon_LIB= libKF5MailCommon.so kde-mailimporter_PORT= net/mailimporter kde-mailimporter_LIB= libKF5MailImporter.so kde-mailtransport_PORT= net/kmailtransport kde-mailtransport_LIB= libKF5MailTransport.so kde-mbox_PORT= net/kmbox kde-mbox_LIB= libKF5Mbox.so kde-messagelib_PORT= net/messagelib kde-messagelib_LIB= libKF5MessageList.so kde-mime_PORT= net/kmime kde-mime_LIB= libKF5Mime.so kde-pimcommon_PORT= net/pimcommon kde-pimcommon_LIB= libKF5PimCommon.so kde-pimtextedit_PORT= net/kpimtextedit kde-pimtextedit_LIB= libKF5PimTextEdit.so kde-tnef_PORT= net/ktnef kde-tnef_LIB= libKF5Tnef.so # PIM Applications kde-akonadiconsole_PORT= deskutils/akonadiconsole kde-akonadiconsole_PATH= ${KDE_PREFIX}/bin/akonadiconsole kde-akregator_PORT= deskutils/akregator kde-akregator_PATH= ${KDE_PREFIX}/bin/akregator kde-grantlee-editor_PORT= deskutils/grantlee-editor kde-grantlee-editor_PATH= ${KDE_PREFIX}/bin/contactthemeeditor kde-kaddressbook_PORT= deskutils/kaddressbook kde-kaddressbook_PATH= ${KDE_PREFIX}/bin/kaddressbook kde-kalarm_PORT= deskutils/kalarm kde-kalarm_PATH= ${KDE_PREFIX}/bin/kalarm kde-kmail_PORT= deskutils/kmail kde-kmail_PATH= ${KDE_PREFIX}/bin/kmail kde-kmail-account-wizard_PORT= deskutils/kmail-account-wizard kde-kmail-account-wizard_PATH= ${KDE_PREFIX}/bin/accountwizard kde-knotes_PORT= deskutils/knotes kde-knotex_PATH= ${KDE_PREFIX}/bin/knotes kde-kontact_PORT= deskutils/kontact kde-kontact_PATH= ${KDE_PREFIX}/bin/kontact kde-korganizer_PORT= deskutils/korganizer kde-korganizer_PATH= ${KDE_PREFIX}/bin/korganizer kde-mbox-importer_PORT= deskutils/mbox-importer kde-mbox-importer_PATH= ${KDE_PREFIX}/bin/mboximporter kde-pim-data-exporter_PORT= deskutils/pim-data-exporter kde-pim-data-exporter_PATH= ${KDE_PREFIX}/bin/pimdataexporter # ====================== end of pim5 components ================================ # ====================== multiversion component ================================ kde-akonadi5_PORT= databases/akonadi kde-akonadi5_LIB= libKF5AkonadiPrivate.so kde-baloo-widgets5_PORT= sysutils/baloo-widgets kde-baloo-widgets5_LIB= libKF5BalooWidgets.so kde-kate5_PORT= editors/kate kde-kate5_PATH= ${QT_PLUGINDIR}/ktexteditor/katebacktracebrowserplugin.so kde-libkcddb5_PORT= audio/libkcddb kde-libkcddb5_LIB= libKF5Cddb.so kde-libkcompactdisc5_PORT= audio/libkcompactdisc kde-libkcompactdisc5_LIB= libKF5CompactDisc.so kde-libkdcraw5_PORT= graphics/libkdcraw kde-libkdcraw5_LIB= libKF5KDcraw.so kde-libkdegames5_PORT= games/libkdegames kde-libkdegames5_LIB= libKF5KDEGames.so kde-libkeduvocdocument5_PORT= misc/libkeduvocdocument kde-libkeduvocdocument5_LIB= libKEduVocDocument.so kde-libkexiv25_PORT= graphics/libkexiv2 kde-libkexiv25_LIB= libKF5KExiv2.so kde-libkipi5_PORT= graphics/libkipi kde-libkipi5_LIB= libKF5Kipi.so kde-libksane5_PORT= graphics/libksane kde-libksane5_LIB= libKF5Sane.so kde-marble5_PORT= astro/marble kde-marble5_LIB= libmarblewidget-qt5.so kde-kpublictransport_PORT= devel/kpublictransport kde-kpublictransport_LIB= libKPublicTransport.so kde-kosm_PORT= astro/kosmindoormap kde-kosm_LIB= libKOSM.so kde-okular5_PORT= graphics/okular kde-okular5_LIB= libOkular5Core.so # ====================== end of multiversion components ======================== # ====================== select the proper multiversion component ============== . for comp in ${_USE_KDE_BOTH} kde-${comp}_PORT= ${kde-${comp}${_KDE_VERSION}_PORT} . if defined(kde-${comp}${_KDE_VERSION}_LIB) kde-${comp}_LIB= ${kde-${comp}${_KDE_VERSION}_LIB} . else . if defined(kde-${comp}${_KDE_VERSION}_PATH}) kde-${comp}_PATH= ${kde-${comp}${_KDE_VERSION}_LIB} . endif # If neither is defined, this gets caught below when checking components . endif . endfor #=============================================================================== # end of component list ######################################################## _USE_KDE_ALL= ${_USE_${_KDE_RELNAME}_ALL} # Iterate through components deprived of suffix. . for component in ${USE_KDE:O:u:C/_.+//} # Check that the component is valid. . if ${_USE_KDE_ALL:M${component}} != "" # Skip meta-components (currently none). . if defined(kde-${component}_PORT) && (defined(kde-${component}_PATH) || defined(kde-${component}_LIB)) # Check if a dependency type is explicitly requested. . if ${USE_KDE:M${component}_*} != "" && ${USE_KDE:M${component}} == "" kde-${component}_TYPE= # empty . if ${USE_KDE:M${component}_build} != "" kde-${component}_TYPE+= build . endif . if ${USE_KDE:M${component}_run} != "" kde-${component}_TYPE+= run . endif . endif # ${USE_KDE:M${component}_*} != "" && ${USE_KDE:M${component}} == "" # If no dependency type is set, default to full dependency. . if !defined(kde-${component}_TYPE) kde-${component}_TYPE= build run . endif # Set real dependencies. . if defined(kde-${component}_LIB) && ${kde-${component}_TYPE:Mbuild} && ${kde-${component}_TYPE:Mrun} LIB_DEPENDS+= ${kde-${component}_LIB}:${kde-${component}_PORT} . else kde-${component}_PATH?= ${KDE_PREFIX}/lib/${kde-${component}_LIB} kde-${component}_DEPENDS= ${kde-${component}_PATH}:${kde-${component}_PORT} . if ${kde-${component}_TYPE:Mbuild} != "" BUILD_DEPENDS+= ${kde-${component}_DEPENDS} . endif . if ${kde-${component}_TYPE:Mrun} != "" RUN_DEPENDS+= ${kde-${component}_DEPENDS} . endif . endif # ${kde-${component}_LIB} && ${kde-${component}_TYPE:Mbuild} && ${kde-${component}_TYPE:Mrun} . endif # defined(kde-${component}_PORT) && defined(kde-${component}_PATH) . else # ! ${_USE_KDE_ALL:M${component}} != "" IGNORE= cannot be installed: unknown USE_KDE component '${component}' . endif # ${_USE_KDE_ALL:M${component}} != "" . endfor . endif .endif diff --git a/Mk/Uses/kmod.mk b/Mk/Uses/kmod.mk index 26400765b6b6..a40155f1863b 100644 --- a/Mk/Uses/kmod.mk +++ b/Mk/Uses/kmod.mk @@ -1,81 +1,81 @@ # Handles common items for kernel module ports. # # Feature: kmod # Usage: USES=kmod # Valid ARGS: (none) debug # # MAINTAINER: rene@FreeBSD.org .if !defined(_INCLUDE_USES_KMOD_MK) _INCLUDE_USES_KMOD_MK= yes _USES_POST+= kmod -.if empty(kmod_ARGS) +. if empty(kmod_ARGS) _DEBUG_KMOD= -.elif ${kmod_ARGS} == "debug" +. elif ${kmod_ARGS} == "debug" _DEBUG_KMOD= yes -.else +. else IGNORE= USES=kmod takes either no arguments or 'debug' -.endif +. endif -.if !exists(${SRC_BASE}/sys/Makefile) && target(build) +. if !exists(${SRC_BASE}/sys/Makefile) && target(build) IGNORE= requires kernel source files in SRC_BASE=${SRC_BASE} -.endif +. endif CATEGORIES+= kld SSP_UNSAFE= kernel module supports SSP natively KMODDIR?= /boot/modules -.if ${KMODDIR} == /boot/kernel +. if ${KMODDIR} == /boot/kernel KMODDIR= /boot/modules -.endif +. endif _DEBUG_KMOD_SH= \ ${ECHO_CMD} -n "\"@dir /%%KERN_DEBUGDIR%%/%%KMODDIR%%\"" ; \ skd=`${ECHO_CMD} ${KMODDIR} | ${SED} "s,/, ,g"` ; \ l=`${ECHO_CMD} $$skd | wc -w` ; \ while [ $$l -gt 0 ] ; do \ c=0 ; \ r="" ; \ for p in $$skd ; do \ c=$$(($$c+1)) ; \ if [ $$c -eq $$l ] ; then \ break ; \ fi ; \ r="$$r/$$p" ; \ done ; \ ${ECHO_CMD} -n " \"@dir /%%KERN_DEBUGDIR%%$$r\"" ; \ l=$$(($$l-1)) ; \ done PLIST_SUB+= KMODDIR="${KMODDIR:C,^/,,}" MAKE_ENV+= KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" NO_XREF=yes PLIST_FILES+= "@kld ${KMODDIR}" STRIP_CMD+= --strip-debug # do not strip kernel symbols -.if !empty(_DEBUG_KMOD) +. if !empty(_DEBUG_KMOD) KERN_DEBUGDIR?= ${DEBUGDIR} PLIST_SUB+= KERN_DEBUGDIR="${KERN_DEBUGDIR:C,^/,,}" MAKE_ENV+= KERN_DEBUGDIR="${KERN_DEBUGDIR}" _KMOD_DIRS!= ${_DEBUG_KMOD_SH} PLIST_FILES+= ${_KMOD_DIRS} -.endif +. endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_KMOD_POST_MK) _INCLUDE_USES_KMOD_POST_MK= yes _USES_install+= 290:${STAGEDIR}${KMODDIR} ${STAGEDIR}${KMODDIR}: @${MKDIR} ${.TARGET} -.if !empty(_DEBUG_KMOD) +. if !empty(_DEBUG_KMOD) _USES_install+= 291:${STAGEDIR}${KERN_DEBUGDIR}${KMODDIR} ${STAGEDIR}${KERN_DEBUGDIR}${KMODDIR}: @${MKDIR} ${.TARGET} -.endif +. endif .endif diff --git a/Mk/Uses/kodi.mk b/Mk/Uses/kodi.mk index 0ea01ab64792..135ec49d20f2 100644 --- a/Mk/Uses/kodi.mk +++ b/Mk/Uses/kodi.mk @@ -1,44 +1,44 @@ # Support Kodi Home Theater Addons # # Feature: kodi # Usage: USES=kodi[:noautoplist] # Valid args: noautoplist Don't generate the plist automatically # # MAINTAINER: decke@FreeBSD.org .if !defined(_INCLUDE_USES_KODI_MK) _INCLUDE_USES_KODI_MK= yes _valid_ARGS= noautoplist # Sanity check -.for arg in ${kodi_ARGS} +. for arg in ${kodi_ARGS} . if empty(_valid_ARGS:M${arg}) IGNORE= Incorrect 'USES+= kodi:${kodi_ARGS}' usage: argument [${arg}] is not recognized . endif -.endfor +. endfor BUILD_DEPENDS+= ${LOCALBASE}/include/kodi/AddonBase.h:multimedia/kodi LIB_DEPENDS+= libp8-platform.so:devel/p8-platform \ libkodiplatform.so:devel/kodi-platform RUN_DEPENDS+= kodi:multimedia/kodi PKGNAMEPREFIX?= kodi-addon- KODI_ADDON?= ${PORTNAME} PLIST_SUB+= DISTVERSION="${DISTVERSION}" -.if empty(kodi_ARGS:Mnoautoplist) +. if empty(kodi_ARGS:Mnoautoplist) _USES_install+= 820:kodi-autoplist kodi-autoplist: @${FIND} -ds ${STAGEDIR}${PREFIX}/lib/kodi/addons/${KODI_ADDON} \( -type f -or -type l \) -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} @if [ -d ${STAGEDIR}${PREFIX}/share/kodi/addons/${KODI_ADDON} ]; then \ ${FIND} -ds ${STAGEDIR}${PREFIX}/share/kodi/addons/${KODI_ADDON} -type f -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \ fi -.endif +. endif .endif # !defined(_INCLUDE_USES_KODI_MK) diff --git a/Mk/Uses/lazarus.mk b/Mk/Uses/lazarus.mk index a60b620f6a3e..8f703935ae93 100644 --- a/Mk/Uses/lazarus.mk +++ b/Mk/Uses/lazarus.mk @@ -1,141 +1,141 @@ # Support for Lazarus-based ports. # # Feature: lazarus # Usage: USES=lazarus # Valid ARGS: (none), gtk2, qt5, flavors # # (none) - This automatically build lazarus-app with gtk2 interface # # gtk2 - This automatically build lazarus-app with gtk2 interface # # qt5 - This automatically build lazarus-app with qt5 interface # # flavors - This automatically build lazarus-app with flavors feature # # If the port not requires compile lazarus project files automatically, you can # defined the following: # # NO_LAZBUILD= yes # # Variables for ports: # # LAZARUS_PROJECT_FILES - List of lpi files. It must not be empty # Default: empty # LAZARUS_DIR - Path to lazarus installation directory # Default: ${LOCALBASE}/share/lazarus-${LAZARUS_VER} # LAZBUILD_ARGS - lazbuild extra args. It could be -d most of cases. # See man lazbuild for more information # Default: empty # LAZARUS_NO_FLAVORS - Do NOT build these lazarus flavors. # If LAZARUS_NO_FLAVORS is not define then all # valid lazarus flavors are assumed. # # Example: # # USES+= lazarus:flavors # LAZARUS_NO_FLAVORS=qt5 # .if !defined(_INCLUDE_USES_LAZARUS_MK) LAZARUS_Include_MAINTAINER= acm@FreeBSD.org _INCLUDE_USES_LAZARUS_MK= yes -.if defined(DEFAULT_LAZARUS_VER) +. if defined(DEFAULT_LAZARUS_VER) WARNING+= "DEFAULT_LAZARUS_VER is defined, consider using DEFAULT_VERSIONS=lazarus=${DEFAULT_LAZARUS_VER} instead" -.endif +. endif -.if ${lazarus_ARGS:Ngtk2:Nqt5:Nflavors} +. if ${lazarus_ARGS:Ngtk2:Nqt5:Nflavors} IGNORE= Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt5:Nflavors} -.endif +. endif -.if !empty(LAZARUS_NO_FLAVORS) -.if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5} +. if !empty(LAZARUS_NO_FLAVORS) +. if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5} IGNORE= Unknown argument for LAZARUS_NO_FLAVORS: ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5} -.endif -.endif +. endif +. endif DEFAULT_LAZARUS_VER= ${LAZARUS_DEFAULT} DEFAULT_FPC_VER= ${FPC_DEFAULT} # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. LAZARUS_VER= ${DEFAULT_LAZARUS_VER} FPC_VER= ${DEFAULT_FPC_VER} LAZARUS_ARCH= ${ARCH:S/amd64/x86_64/} LAZARUS_PROJECT_FILES?= # empty LAZARUS_DIR?= ${LOCALBASE}/share/lazarus-${LAZARUS_VER} ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= not yet ported to anything other than i386 and amd64 BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \ fpcres:lang/fpc-utils BUILDNAME= ${LAZARUS_ARCH}-${OPSYS:tl} LCL_UNITS_DIR= ${LOCALBASE}/share/lazarus-${LAZARUS_VER}/lcl/units/${BUILDNAME} MKINSTDIR= ${LOCALBASE}/lib/fpc/${FPC_VER}/fpmkinst/${BUILDNAME} LAZARUS_FLAVORS= gtk2 qt5 -.if ${lazarus_ARGS:Mflavors} -. if defined(LAZARUS_NO_FLAVORS) -. for flavor in ${LAZARUS_NO_FLAVORS} +. if ${lazarus_ARGS:Mflavors} +. if defined(LAZARUS_NO_FLAVORS) +. for flavor in ${LAZARUS_NO_FLAVORS} FLAVORS:= ${LAZARUS_FLAVORS:N${flavor}} -. endfor -. else +. endfor +. else FLAVORS:= ${LAZARUS_FLAVORS} -. endif +. endif -. if empty(FLAVOR) +. if empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} -. endif -.endif +. endif +. endif LAZARUS_PKGNAMESUFFIX= -${FLAVOR} -.if !defined(WANT_LAZARUS_DEVEL) +. if !defined(WANT_LAZARUS_DEVEL) LAZARUS_DEVELSUFFIX= # -.else +. else LAZARUS_DEVELSUFFIX= -devel -.endif +. endif -.if ${lazarus_ARGS:Mgtk2} || ${FLAVOR} == gtk2 +. if ${lazarus_ARGS:Mgtk2} || ${FLAVOR} == gtk2 BUILD_DEPENDS+= ${MKINSTDIR}/gtk2.fpm:x11-toolkits/fpc-gtk2 LIB_DEPENDS+= libglib-2.0.so:devel/glib20 \ libgtk-x11-2.0.so:x11-toolkits/gtk20 \ libatk-1.0.so:accessibility/atk \ libpango-1.0.so:x11-toolkits/pango \ libgdk_pixbuf-2.0.so:graphics/gdk-pixbuf2 LCL_PLATFORM= gtk2 BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus${LAZARUS_DEVELSUFFIX} -.endif +. endif -.if ${lazarus_ARGS:Mqt5} || ${FLAVOR} == qt5 +. if ${lazarus_ARGS:Mqt5} || ${FLAVOR} == qt5 LIB_DEPENDS+= libQt5Pas.so:x11-toolkits/qt5pas LCL_PLATFORM= qt5 BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt5${LAZARUS_DEVELSUFFIX} -.endif +. endif LAZBUILD_CMD= ${LOCALBASE}/bin/lazbuild LAZBUILD_ARGS?= # empty _USES_POST+= lazarus .endif # End of _INCLUDE_USES_LAZARUS_MK .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LAZARUS_POST_MK) _INCLUDE_USES_LAZARUS_POST_MK= yes -.if !defined(NO_LAZBUILD) -.if !target(do-build) +. if !defined(NO_LAZBUILD) +. if !target(do-build) do-build: -. for PROJECT_FILE in ${LAZARUS_PROJECT_FILES} +. for PROJECT_FILE in ${LAZARUS_PROJECT_FILES} @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ ${LAZBUILD_ARGS} --ws=${LCL_PLATFORM} --lazarusdir=${LAZARUS_DIR} ${PROJECT_FILE}) -. endfor -.endif # !target(do-build) -.endif +. endfor +. endif # !target(do-build) +. endif .endif # End of _INCLUDE_USES_LAZARUS_POST_MK diff --git a/Mk/Uses/lha.mk b/Mk/Uses/lha.mk index fa7675e9cc04..04dcf8d474c2 100644 --- a/Mk/Uses/lha.mk +++ b/Mk/Uses/lha.mk @@ -1,20 +1,20 @@ # handle lha archives # # Feature: lha # Usage: USES=lha # .if !defined(_INCLUDE_USES_LHA_Mk) _INCLUDE_USES_LHA_MK= yes EXTRACT_SUFX?= .lzh -.if !empty(lha_ARGS) +. if !empty(lha_ARGS) IGNORE= Incorrect 'USES+=lha:${lha_ARGS}' expecting 'USES+=lha' -.endif +. endif EXTRACT_DEPENDS+= lha:archivers/lha EXTRACT_CMD?= ${LHA_CMD} EXTRACT_BEFORE_ARGS?= xfpw=${EXTRACT_WRKDIR} EXTRACT_AFTER_ARGS?= .endif diff --git a/Mk/Uses/libtool.mk b/Mk/Uses/libtool.mk index 29bc15fa1501..6c6074be8fb8 100644 --- a/Mk/Uses/libtool.mk +++ b/Mk/Uses/libtool.mk @@ -1,82 +1,82 @@ # Bring libtool scripts up to date. # # Feature: libtool # Usage: USES=libtool or USES=libtool:args # Valid args: keepla Don't remove libtool libraries (*.la) from the stage # directory. Some ports need them at runtime (e.g. ports # that call lt_dlopen from libltdl). # build Add a build dependency on devel/libtool. This can # be used when a port does not generate its own libtool # script and relies on the system to provide one. # # MAINTAINER: tijl@FreeBSD.org .if !defined(_INCLUDE_USES_LIBTOOL_MK) _INCLUDE_USES_LIBTOOL_MK= yes _USES_POST+= libtool -.if ${libtool_ARGS:Mbuild} +. if ${libtool_ARGS:Mbuild} BUILD_DEPENDS+= libtool:devel/libtool -.endif +. endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) _INCLUDE_USES_LIBTOOL_POST_MK= yes _USES_configure+= 480:patch-libtool patch-libtool: @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ -type f | while read i; do ${SED} -i.libtool.bak \ -e '/dragonfly\*/!s/^ *freebsd\*[ )]/dragonfly* | &/' \ -e '/gcc_dir=\\`/s/gcc /$$CC /' \ -e '/gcc_ver=\\`/s/gcc /$$CC /' \ -e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/' \ -e '/archive_expsym_cmds[0-9A-Z_]*=.$$CC.*-retain-/ { \ s/-retain-symbols-file/-version-script/; \ s/$$export_symbols/$$lib-ver/; \ s/$$CC/echo "{ global:" > $$lib-ver~ \ sed -e "s|$$|;|" < $$export_symbols >> $$lib-ver~ \ echo "local: *; };" >> $$lib-ver~&/; }' \ -e '/objformat=/s/echo aout/echo elf/' \ -e '/STRIP -V/s/"GNU strip"/"strip"/' \ -e "/freebsd-elf\\*)/,/;;/ { \ /deplibs_check_method=/s/=.*/=pass_all/; \ /library_names_spec=.*\\.so/ \ s/=.*/='\$$libname\$$release.so\$$versuffix \ \$$libname\$$release.so\$$major \$$libname.so' \ soname_spec='\$$libname\$$release.so\$$major'/; \ /library_names_spec=.*shared_ext/ \ s/=.*/='\$$libname\$$release\$$shared_ext\$$versuffix \ \$$libname\$$release\$$shared_ext\$$major \ \$$libname\$$shared_ext' \ soname_spec='\$$libname\$$release\$$shared_ext\$$major'/; \ }" $${i} && ${TOUCH} -mr $${i}.libtool.bak $${i}; done @${FIND} ${WRKDIR} -type f -name ltmain.sh | \ ${XARGS} ${REINPLACE_CMD} \ -e '/case $$version_type in/,+2 \ s/darwin|linux|/darwin|freebsd-elf|linux|/' \ -e '/freebsd-elf)/,+2 { \ /major=/s/=.*/=.$$(($$current - $$age))/; \ /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }' \ -e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\ -e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ -e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ -e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ -e 's/|-p|-pg|/|-B*|-fstack-protector*|-fuse-ld=*|-p|-pg|/' _USES_stage+= 790:patch-lafiles patch-lafiles: -.if ${libtool_ARGS:Mkeepla} +. if ${libtool_ARGS:Mkeepla} @${FIND} ${STAGEDIR} -type f -name '*.la' | \ ${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" -.else +. else @${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ 'case `${REALPATH} -q "{}"` in \ *.la) ${ECHO_CMD} "{}" ;; esac' \; | \ ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} @${FIND} ${STAGEDIR} -type f -name '*.la' | \ ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} -.endif +. endif .endif diff --git a/Mk/Uses/linux.mk b/Mk/Uses/linux.mk index 28ce77dc89b1..1a8a28f5008f 100644 --- a/Mk/Uses/linux.mk +++ b/Mk/Uses/linux.mk @@ -1,290 +1,290 @@ # Ports Linux compatibility framework # # Feature: linux:args # Usage: USES=linux or USES=linux:args # Valid args: c7 Depend on CentOS 7 packages (default) # Additional variables: # USE_LINUX List of Linux packages to depend on. # USE_LINUX_RPM When defined, additional variables and targets useful to Linux # infrastructure ports are made available. Possible values: # yes Set default LIB_DISTNAMES. # nolib Set default BIN_DISTNAMES. # noarch Set default SHARE_DISTNAMES. # Additional variables when USE_LINUX_RPM is defined: # BIN_DISTNAMES List of architecture dependent distnames. # LIB_DISTNAMES List of distnames with additional 32 bit version. # SHARE_DISTNAMES List of architecture independent distnames. # SRC_DISTFILES List of source distfiles that need to be distributed # with binary packages to comply with some licenses. # # MAINTAINER: emulation@FreeBSD.org .ifndef _INCLUDE_USES_LINUX_MK _INCLUDE_USES_LINUX_MK= yes _USES_POST+= linux -.if empty(linux_ARGS) -.if exists(${LINUXBASE}/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7) +. if empty(linux_ARGS) +. if exists(${LINUXBASE}/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7) linux_ARGS= c7 -.else +. else linux_ARGS= ${LINUX_DEFAULT} -.endif -.endif +. endif +. endif -.if ${linux_ARGS} == c7 +. if ${linux_ARGS} == c7 LINUX_DIST_VER?= 7.9.2009 -.else +. else IGNORE= Invalid Linux distribution: ${linux_ARGS} -.endif +. endif -.ifndef ONLY_FOR_ARCHS +. ifndef ONLY_FOR_ARCHS ONLY_FOR_ARCHS= aarch64 amd64 i386 ONLY_FOR_ARCHS_REASON= Linux compatibility is only available on aarch64, amd64 and i386 -.endif +. endif _linux_c7_alsa-lib-devel= linux-c7-alsa-lib-devel>0:audio/linux-c7-alsa-lib-devel _linux_${linux_ARGS}_alsa-plugins-oss= linux-${linux_ARGS}-alsa-plugins-oss>0:audio/linux-${linux_ARGS}-alsa-plugins-oss _linux_${linux_ARGS}_alsa-plugins-pulseaudio=linux-${linux_ARGS}-alsa-plugins-pulseaudio>0:audio/linux-${linux_ARGS}-alsa-plugins-pulseaudio _linux_${linux_ARGS}_alsalib= linux-${linux_ARGS}-alsa-lib>0:audio/linux-${linux_ARGS}-alsa-lib _linux_c7_at-spi2-atk= linux-c7-at-spi2-atk>0:accessibility/linux-c7-at-spi2-atk _linux_c7_at-spi2-core= linux-c7-at-spi2-core>0:accessibility/linux-c7-at-spi2-core _linux_${linux_ARGS}_atk= linux-${linux_ARGS}-atk>0:accessibility/linux-${linux_ARGS}-atk _linux_${linux_ARGS}_avahi-libs= linux-${linux_ARGS}-avahi-libs>0:net/linux-${linux_ARGS}-avahi-libs _linux_c7_base= linux_base-c7>=7.6.1810_7:emulators/linux_base-c7 _linux_${linux_ARGS}_cairo= linux-${linux_ARGS}-cairo>0:graphics/linux-${linux_ARGS}-cairo _linux_c7_cairo-gobject= linux-c7-cairo-gobject>0:graphics/linux-c7-cairo-gobject _linux_${linux_ARGS}_cups-libs= linux-${linux_ARGS}-cups-libs>0:print/linux-${linux_ARGS}-cups-libs _linux_${linux_ARGS}_curl= linux-${linux_ARGS}-curl>0:ftp/linux-${linux_ARGS}-curl _linux_${linux_ARGS}_cyrus-sasl2= linux-${linux_ARGS}-cyrus-sasl-lib>0:security/linux-${linux_ARGS}-cyrus-sasl2 _linux_${linux_ARGS}_dbusglib= linux-${linux_ARGS}-dbus-glib>0:devel/linux-${linux_ARGS}-dbus-glib _linux_${linux_ARGS}_dbuslibs= linux-${linux_ARGS}-dbus-libs>0:devel/linux-${linux_ARGS}-dbus-libs _linux_${linux_ARGS}_devtools= linux-${linux_ARGS}-devtools>0:devel/linux-${linux_ARGS}-devtools _linux_c7_dosfstools= linux-c7-dosfstools>0:sysutils/linux-c7-dosfstools _linux_${linux_ARGS}_dri= linux-${linux_ARGS}-dri>0:graphics/linux-${linux_ARGS}-dri _linux_${linux_ARGS}_elfutils-libelf= linux-${linux_ARGS}-elfutils-libelf>0:devel/linux-${linux_ARGS}-elfutils-libelf _linux_c7_elfutils-libs= linux-c7-elfutils-libs>0:devel/linux-c7-elfutils-libs _linux_${linux_ARGS}_expat= linux-${linux_ARGS}-expat>0:textproc/linux-${linux_ARGS}-expat _linux_c7_flac= linux-c7-flac-libs>0:audio/linux-c7-flac _linux_${linux_ARGS}_fontconfig= linux-${linux_ARGS}-fontconfig>0:x11-fonts/linux-${linux_ARGS}-fontconfig _linux_c7_freetype= linux-c7-freetype>0:print/linux-c7-freetype _linux_c7_fribidi= linux-c7-fribidi>0:converters/linux-c7-fribidi _linux_${linux_ARGS}_gdkpixbuf2= linux-${linux_ARGS}-gdk-pixbuf2>0:graphics/linux-${linux_ARGS}-gdk-pixbuf2 _linux_${linux_ARGS}_gnutls= linux-${linux_ARGS}-gnutls>0:security/linux-${linux_ARGS}-gnutls _linux_c7_graphite2= linux-c7-graphite2>0:graphics/linux-c7-graphite2 _linux_c7_gsm= linux-c7-gsm>0:audio/linux-c7-gsm _linux_${linux_ARGS}_gtk2= linux-${linux_ARGS}-gtk2>0:x11-toolkits/linux-${linux_ARGS}-gtk2 _linux_c7_gtk3= linux-c7-gtk3>0:x11-toolkits/linux-c7-gtk3 _linux_c7_harfbuzz= linux-c7-harfbuzz>0:print/linux-c7-harfbuzz _linux_${linux_ARGS}_icu= linux-${linux_ARGS}-icu>0:devel/linux-${linux_ARGS}-icu _linux_${linux_ARGS}_jasper= linux-${linux_ARGS}-jasper-libs>0:graphics/linux-${linux_ARGS}-jasper _linux_c7_jbigkit= linux-c7-jbigkit-libs>0:graphics/linux-c7-jbigkit _linux_${linux_ARGS}_jpeg= linux-${linux_ARGS}-jpeg>0:graphics/linux-${linux_ARGS}-jpeg _linux_c7_libaio= linux-c7-libaio>0:devel/linux-c7-libaio _linux_${linux_ARGS}_libasyncns= linux-${linux_ARGS}-libasyncns>0:dns/linux-${linux_ARGS}-libasyncns _linux_c7_libaudiofile= linux-c7-audiofile>0:audio/linux-c7-audiofile _linux_c7_libcroco= linux-c7-libcroco>0:textproc/linux-c7-libcroco _linux_c7_libdrm= linux-c7-libdrm>0:graphics/linux-c7-libdrm _linux_c7_libepoxy= linux-c7-libepoxy>0:graphics/linux-c7-libepoxy _linux_${linux_ARGS}_libgcrypt= linux-${linux_ARGS}-libgcrypt>0:security/linux-${linux_ARGS}-libgcrypt _linux_${linux_ARGS}_libgfortran= linux-${linux_ARGS}-libgfortran>0:devel/linux-${linux_ARGS}-libgfortran _linux_c7_libglvnd= linux-c7-libglvnd>0:graphics/linux-c7-libglvnd _linux_${linux_ARGS}_libgpg-error= linux-${linux_ARGS}-libgpg-error>0:security/linux-${linux_ARGS}-libgpg-error _linux_${linux_ARGS}_libogg= linux-${linux_ARGS}-libogg>0:audio/linux-${linux_ARGS}-libogg _linux_${linux_ARGS}_libpciaccess= linux-${linux_ARGS}-libpciaccess>0:devel/linux-${linux_ARGS}-libpciaccess _linux_c7_librsvg2= linux-c7-librsvg2>0:graphics/linux-c7-librsvg2 _linux_${linux_ARGS}_libsndfile= linux-${linux_ARGS}-libsndfile>0:audio/linux-${linux_ARGS}-libsndfile _linux_${linux_ARGS}_libssh2= linux-${linux_ARGS}-libssh2>0:security/linux-${linux_ARGS}-libssh2 _linux_${linux_ARGS}_libtasn1= linux-${linux_ARGS}-libtasn1>0:security/linux-${linux_ARGS}-libtasn1 _linux_${linux_ARGS}_libthai= linux-${linux_ARGS}-libthai>0:devel/linux-${linux_ARGS}-libthai _linux_${linux_ARGS}_libtheora= linux-${linux_ARGS}-libtheora>0:multimedia/linux-${linux_ARGS}-libtheora _linux_${linux_ARGS}_libunwind= linux-${linux_ARGS}-libunwind>0:devel/linux-${linux_ARGS}-libunwind _linux_${linux_ARGS}_libv4l= linux-${linux_ARGS}-libv4l>0:multimedia/linux-${linux_ARGS}-libv4l _linux_${linux_ARGS}_libvorbis= linux-${linux_ARGS}-libvorbis>0:audio/linux-${linux_ARGS}-libvorbis _linux_c7_libxkbcommon= linux-c7-libxkbcommon>0:x11/linux-c7-libxkbcommon _linux_${linux_ARGS}_libxml2= linux-${linux_ARGS}-libxml2>0:textproc/linux-${linux_ARGS}-libxml2 _linux_${linux_ARGS}_lttng-ust= linux-${linux_ARGS}-lttng-ust>0:sysutils/linux-${linux_ARGS}-lttng-ust _linux_c7_lz4= linux-c7-lz4>0:archivers/linux-c7-lz4 _linux_c7_make= linux-c7-make>0:devel/linux-c7-make _linux_c7_nettle= linux-c7-nettle>0:security/linux-c7-nettle _linux_${linux_ARGS}_nspr= linux-${linux_ARGS}-nspr>0:devel/linux-${linux_ARGS}-nspr _linux_${linux_ARGS}_nss= linux-${linux_ARGS}-nss>0:security/linux-${linux_ARGS}-nss _linux_c7_numactl-libs= linux-c7-numactl-libs>0:sysutils/linux-c7-numactl-libs _linux_${linux_ARGS}_openal-soft= linux-${linux_ARGS}-openal-soft>0:audio/linux-${linux_ARGS}-openal-soft _linux_${linux_ARGS}_openldap= linux-${linux_ARGS}-openldap>0:net/linux-${linux_ARGS}-openldap _linux_c7_openmotif= linux-c7-motif>0:x11-toolkits/linux-c7-openmotif _linux_c7_openssl= ${_linux_c7_base} _linux_c7_p11-kit= linux-c7-p11-kit>0:security/linux-c7-p11-kit _linux_${linux_ARGS}_pango= linux-${linux_ARGS}-pango>0:x11-toolkits/linux-${linux_ARGS}-pango _linux_${linux_ARGS}_pixman= linux-${linux_ARGS}-pixman>0:x11/linux-${linux_ARGS}-pixman _linux_${linux_ARGS}_png= linux-${linux_ARGS}-libpng>0:graphics/linux-${linux_ARGS}-png _linux_${linux_ARGS}_pulseaudio-libs= linux-${linux_ARGS}-pulseaudio-libs>0:audio/linux-${linux_ARGS}-pulseaudio-libs _linux_c7_qt= linux-c7-qt>0:devel/linux-c7-qt _linux_c7_qt-x11= linux-c7-qt-x11>0:x11-toolkits/linux-c7-qt-x11 _linux_c7_qtwebkit= linux-c7-qtwebkit>0:www/linux-c7-qtwebkit _linux_${linux_ARGS}_sdl12= linux-${linux_ARGS}-sdl>0:devel/linux-${linux_ARGS}-sdl12 _linux_${linux_ARGS}_sdlimage= linux-${linux_ARGS}-sdl_image>0:graphics/linux-${linux_ARGS}-sdl_image _linux_${linux_ARGS}_sdlmixer= linux-${linux_ARGS}-sdl_mixer>0:audio/linux-${linux_ARGS}-sdl_mixer _linux_${linux_ARGS}_sdlttf= linux-${linux_ARGS}-sdl_ttf>0:graphics/linux-${linux_ARGS}-sdl_ttf _linux_${linux_ARGS}_sqlite3= linux-${linux_ARGS}-sqlite>0:databases/linux-${linux_ARGS}-sqlite3 _linux_c7_systemd-libs= linux-c7-systemd-libs>0:devel/linux-c7-systemd-libs _linux_${linux_ARGS}_tcl85= linux-${linux_ARGS}-tcl85>0:lang/linux-${linux_ARGS}-tcl85 _linux_${linux_ARGS}_tcp_wrappers-libs= linux-${linux_ARGS}-tcp_wrappers-libs>0:net/linux-${linux_ARGS}-tcp_wrappers-libs _linux_${linux_ARGS}_tiff= linux-${linux_ARGS}-libtiff>0:graphics/linux-${linux_ARGS}-tiff _linux_${linux_ARGS}_tk85= linux-${linux_ARGS}-tk85>0:x11-toolkits/linux-${linux_ARGS}-tk85 _linux_c7_trousers= linux-c7-trousers>0:security/linux-c7-trousers _linux_${linux_ARGS}_userspace-rcu= linux-${linux_ARGS}-userspace-rcu>0:sysutils/linux-${linux_ARGS}-userspace-rcu _linux_c7_wayland= linux-c7-wayland>0:graphics/linux-c7-wayland _linux_c7_xcb-util= linux-c7-xcb-util>0:x11/linux-c7-xcb-util _linux_c7_xorglibs= linux-c7-xorg-libs>=7.7_7:x11/linux-c7-xorg-libs USE_LINUX?= base -.for i in ${USE_LINUX} +. for i in ${USE_LINUX} _i_args:= ${i:C/^[^:]*:?//:S/,/ /g} -.if ${_i_args:Mpatch} +. if ${_i_args:Mpatch} PATCH_DEPENDS+= ${_linux_${linux_ARGS}_${i:C/:.*//}} -.endif -.if ${_i_args:Mbuild} +. endif +. if ${_i_args:Mbuild} BUILD_DEPENDS+= ${_linux_${linux_ARGS}_${i:C/:.*//}} -.endif -.if ${_i_args:Mrun} || empty(_i_args) +. endif +. if ${_i_args:Mrun} || empty(_i_args) RUN_DEPENDS+= ${_linux_${linux_ARGS}_${i:C/:.*//}} -.endif -.if !defined(_linux_${linux_ARGS}_${i:C/:.*//}) +. endif +. if !defined(_linux_${linux_ARGS}_${i:C/:.*//}) DEV_ERROR+= "USE_LINUX=${i}: package does not exist" -.endif -.endfor +. endif +. endfor -.ifdef USE_LINUX_RPM +. ifdef USE_LINUX_RPM -.if ${linux_ARGS} == c7 -.ifndef MASTER_SITES +. if ${linux_ARGS} == c7 +. ifndef MASTER_SITES MASTER_SITES= ${MASTER_SITE_CENTOS_LINUX} MASTER_SITE_SUBDIR= altarch/${LINUX_DIST_VER}/os/aarch64/Packages/:DEFAULT,aarch64 \ altarch/${LINUX_DIST_VER}/updates/aarch64/Packages/:DEFAULT,aarch64 \ centos/${LINUX_DIST_VER}/os/x86_64/Packages/:DEFAULT,amd64 \ centos/${LINUX_DIST_VER}/updates/x86_64/Packages/:DEFAULT,amd64 \ altarch/${LINUX_DIST_VER}/os/i386/Packages/:DEFAULT,i386 \ altarch/${LINUX_DIST_VER}/updates/i386/Packages/:DEFAULT,i386 \ centos/${LINUX_DIST_VER}/os/Source/SPackages/:SOURCE \ centos/${LINUX_DIST_VER}/updates/Source/SPackages/:SOURCE -.endif +. endif DIST_SUBDIR?= centos -.endif # ${linux_ARGS} == * +. endif # ${linux_ARGS} == * PKGNAMEPREFIX?= linux-${linux_ARGS}- EXTRACT_SUFX?= .rpm EXTRACT_SUFX_aarch64?= .aarch64${EXTRACT_SUFX} EXTRACT_SUFX_amd64?= .x86_64${EXTRACT_SUFX} EXTRACT_SUFX_i386?= .i686${EXTRACT_SUFX} EXTRACT_SUFX_noarch?= .noarch${EXTRACT_SUFX} SRC_SUFX?= .src${EXTRACT_SUFX} NO_BUILD= yes NO_WRKSUBDIR= yes USE_LINUX_PREFIX= yes -.endif # USE_LINUX_RPM +. endif # USE_LINUX_RPM .endif # ! _INCLUDE_USES_LINUX_MK .ifdef _POSTMKINCLUDED && ! _INCLUDE_USES_LINUX_POST_MK _INCLUDE_USES_LINUX_POST_MK= yes -.ifdef USE_LINUX_RPM +. ifdef USE_LINUX_RPM -.if ${USE_LINUX_RPM} == noarch +. if ${USE_LINUX_RPM} == noarch NO_ARCH= yes SHARE_DISTNAMES?= ${DISTNAME} -.elif ${USE_LINUX_RPM} == nolib +. elif ${USE_LINUX_RPM} == nolib BIN_DISTNAMES?= ${DISTNAME} -.else +. else LIB_DISTNAMES?= ${DISTNAME} -.endif -.if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Maarch64)) \ +. endif +. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Maarch64)) \ && empty(NOT_FOR_ARCHS:Maarch64) DISTFILES_aarch64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_aarch64}:aarch64/} \ ${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_aarch64}:aarch64/} \ ${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/} \ ${LIB_DISTNAMES_aarch64:S/$/${EXTRACT_SUFX_aarch64}:aarch64/} -.endif -.if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mamd64)) \ +. endif +. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mamd64)) \ && empty(NOT_FOR_ARCHS:Mamd64) -.if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mi386)) \ +. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mi386)) \ && empty(NOT_FOR_ARCHS:Mi386) DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \ ${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \ ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \ ${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \ ${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}:amd64/} \ ${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/} -.else +. else DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}/} \ ${LIB_DISTNAMES_amd64:S/$/${EXTRACT_SUFX_amd64}:amd64/} \ ${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_amd64}/} \ ${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/} -.endif -.endif -.if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mi386)) \ +. endif +. endif +. if !(defined(ONLY_FOR_ARCHS) && empty(ONLY_FOR_ARCHS:Mi386)) \ && empty(NOT_FOR_ARCHS:Mi386) DISTFILES_i386?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \ ${LIB_DISTNAMES_i386:S/$/${EXTRACT_SUFX_i386}:amd64,i386/} \ ${BIN_DISTNAMES:S/$/${EXTRACT_SUFX_i386}:i386/} \ ${SHARE_DISTNAMES:S/$/${EXTRACT_SUFX_noarch}/} -.endif +. endif SRC_DISTFILES?= ${DISTNAME}${SRC_SUFX}:SOURCE -.ifdef USE_LINUX_RPM_BAD_PERMS +. ifdef USE_LINUX_RPM_BAD_PERMS EXTRACT_DEPENDS+= rpm2archive:archivers/rpm4 EXTRACT_CMD= rpm2archive EXTRACT_BEFORE_ARGS= - < EXTRACT_AFTER_ARGS= | ${TAR} xf - --no-same-owner --no-same-permissions -.endif +. endif -.if ${USE_LINUX_RPM} != noarch +. if ${USE_LINUX_RPM} != noarch PLIST?= ${PKGDIR}/pkg-plist.${ARCH} -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: (cd ${WRKSRC} && \ ${FIND} * | ${CPIO} -dumpl --quiet ${STAGEDIR}${PREFIX}) -.for d in bin lib lib64 sbin +. for d in bin lib lib64 sbin [ ! -e ${STAGEDIR}${PREFIX}/${d} -o -L ${STAGEDIR}${PREFIX}/${d} ] || \ (cd ${STAGEDIR}${PREFIX} && \ ${FIND} ${d} | ${CPIO} -dumpl --quiet usr && ${RM} -r ${d}) -.endfor +. endfor [ ! -e ${STAGEDIR}${PREFIX}/usr/share/icons -o \ -L ${STAGEDIR}${PREFIX}/usr/share/icons ] || \ (cd ${STAGEDIR}${PREFIX}/usr/share && ${FIND} icons | \ ${CPIO} -dumpl --quiet ${STAGEDIR}${LOCALBASE}/share && \ ${RM} -r icons) -.endif +. endif -.endif # USE_LINUX_RPM +. endif # USE_LINUX_RPM -.ifdef DISTNAME_aarch64 +. ifdef DISTNAME_aarch64 DISTFILES_aarch64?= ${DISTNAME_aarch64}${EXTRACT_SUFX} -.endif -.ifdef DISTNAME_amd64 +. endif +. ifdef DISTNAME_amd64 DISTFILES_amd64?= ${DISTNAME_amd64}${EXTRACT_SUFX} -.endif -.ifdef DISTNAME_i386 +. endif +. ifdef DISTNAME_i386 DISTFILES_i386?= ${DISTNAME_i386}${EXTRACT_SUFX} -.endif +. endif -.ifndef DISTFILES -.ifdef DISTFILES_aarch64 || DISTFILES_amd64 || DISTFILES_i386 -.if make(makesum) +. ifndef DISTFILES +. ifdef DISTFILES_aarch64 || DISTFILES_amd64 || DISTFILES_i386 +. if make(makesum) _ALL_DISTFILES= ${DISTFILES_aarch64} ${DISTFILES_amd64} ${DISTFILES_i386} DISTFILES= ${_ALL_DISTFILES:O:u} -.else +. else DISTFILES= ${DISTFILES_${ARCH}} -.endif +. endif EXTRACT_ONLY?= ${DISTFILES_${ARCH}:C/:[^:]+$//} -.endif -.endif -.if !empty(SRC_DISTFILES) && (make(makesum) || defined(PACKAGE_BUILDING)) +. endif +. endif +. if !empty(SRC_DISTFILES) && (make(makesum) || defined(PACKAGE_BUILDING)) DISTFILES+= ${SRC_DISTFILES} -.endif +. endif .endif # _POSTMKINCLUDED && ! _INCLUDE_USES_LINUX_POST_MK diff --git a/Mk/Uses/localbase.mk b/Mk/Uses/localbase.mk index 32ffa6de5231..58103a6b85ce 100644 --- a/Mk/Uses/localbase.mk +++ b/Mk/Uses/localbase.mk @@ -1,29 +1,29 @@ # handle enforcing localbase in path # # Feature: localbase # Usage: USES=localbase or USES=localbase:args # Valid ARGS: ldflags Set LDFLAGS instead of LIBS # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_LOCALBASE_MK) _INCLUDE_USES_LOCALBASE_MK= yes _USES_POST+= localbase .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LOCALBASE_POST_MK) _INCLUDE_USES_LOCALBASE_POST_MK=yes CPPFLAGS+= -isystem ${LOCALBASE}/include CFLAGS+= -isystem ${LOCALBASE}/include CXXFLAGS+= -isystem ${LOCALBASE}/include -.if ${localbase_ARGS:Mldflags} +. if ${localbase_ARGS:Mldflags} LDFLAGS+= -L${LOCALBASE}/lib -.else +. else LIBS+= -L${LOCALBASE}/lib -.endif +. endif # Use CONFIGURE_ENV instead of CMAKE_ARGS because devel/cmake itself also needs # this, and CMAKE_ARGS is not used when bootstrapping CMake. CONFIGURE_ENV+= CMAKE_PREFIX_PATH="${LOCALBASE}" .endif diff --git a/Mk/Uses/lua.mk b/Mk/Uses/lua.mk index 26b1b5d72dd7..7088d5e29720 100644 --- a/Mk/Uses/lua.mk +++ b/Mk/Uses/lua.mk @@ -1,280 +1,280 @@ # Provide support for lua # # MAINTAINER: ports@FreeBSD.org # Usage: # # USES+= lua[:options,...] # # Options: # # NN (e.g. 52) - specify an allowed Lua version (can use multiple times) # NN+ (e.g. 52+) - specify a minimum Lua version (discouraged) # -NN (e.g. -53) - specify a maximum allowed version # NN-NN (e.g. 51-53) - specify a range of allowed versions # # flavors define FLAVOR / FLAVORS as luaNN from the allowed versions # # noflavors don't use flavors # # module (implies flavors) specifies that the port is a Lua module # (i.e. that it installes files in MODLIBDIR etc.) # # build add dependency to BUILD_DEPENDS instead of LIB_DEPENDS # run add dependency to RUN_DEPENDS instead of LIB_DEPENDS # # env define only the LUA_* vars and add them to PLIST_SUB and # MAKE_ENV, do not add dependencies or other global state # # core for building Lua itself # # If more than one version is allowed, then the LUA_DEFAULT version (as set # in DEFAULT_VERSIONS) is chosen if it is in the allowed range, otherwise # the closest allowed version to the default is chosen, preferring the # larger version in case of a tie. # # But if "flavors" was requested, and FLAVOR is set, we use that version # exactly. (It is an error to specify a flavor that isn't supported, but # that is checked in bsd.port.mk, not here.) # # LUA_FLAVOR is defined to the desired flavor whether or not "flavors" was # selected; ports should use this to specify the flavor of dependencies # which are Lua modules or otherwise Lua-flavored. # # It's not generally expected that applications that embed Lua, or apps # written in Lua, would use USES=lua:flavors. Given that Lua is lightweight # and does not carry around a whole lot of module ecosystem with it, it is # best that application ports simply specify the Lua version or range of # versions that they support, and let the default one or the latest one be # used. However, they should still use LUA_FLAVOR as needed when specifying # dependencies. # # We assume Lua versions can be represented as 2 digits. # .if !defined(_INCLUDE_USES_LUA_MK) _INCLUDE_USES_LUA_MK= yes # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _LUA_VALID_VERSIONS:= 54 53 52 51 -.if defined(_LUA_EXTRA_VER) +. if defined(_LUA_EXTRA_VER) _LUA_VALID_VERSIONS+= ${_LUA_EXTRA_VER} -.endif +. endif _LUA_DEFAULT_VERSION:= ${LUA_DEFAULT:S/.//} # args _LUA_ARG_FLAVORS:= _LUA_ARG_MODULE:= _LUA_ARG_ENV:= _LUA_ARG_CORE:= -.if ${lua_ARGS:Mmodule} +. if ${lua_ARGS:Mmodule} _LUA_ARG_FLAVORS:=yes _LUA_ARG_MODULE:=yes -.endif -.if ${lua_ARGS:Mflavors} +. endif +. if ${lua_ARGS:Mflavors} _LUA_ARG_FLAVORS:=yes -.endif -.if ${lua_ARGS:Mnoflavors} +. endif +. if ${lua_ARGS:Mnoflavors} _LUA_ARG_FLAVORS:= -.endif -.if ${lua_ARGS:Menv} +. endif +. if ${lua_ARGS:Menv} _LUA_ARG_ENV:=yes -.endif -.if ${lua_ARGS:Mcore} +. endif +. if ${lua_ARGS:Mcore} _LUA_ARG_CORE:=yes _LUA_ARG_ENV:=yes _LUA_ARG_FLAVORS:= _LUA_ARG_MODULE:= -.endif +. endif # core is for building Lua itself, so it overrides all version checks -.if ${_LUA_ARG_CORE} +. if ${_LUA_ARG_CORE} _LUA_WANTED_VERSION:=${lua_ARGS:M[1-9][0-9]:[1]} -. if ${lua_ARGS:M[1-9][0-9]:[#]} != 1 +. if ${lua_ARGS:M[1-9][0-9]:[#]} != 1 IGNORE= USES=lua:core must also specify exactly one version number # set to avoid spurious errors below _LUA_WANTED_VERSION:=${_LUA_DEFAULT_VERSION} -. endif +. endif _LUA_VALID_VERSIONS:=${_LUA_WANTED_VERSION} _LUA_WANTED_VERSIONS:=${_LUA_WANTED_VERSION} _LUA_DEFAULT_VERSION:=${_LUA_WANTED_VERSION} -.endif # _LUA_ARG_CORE +. endif # _LUA_ARG_CORE -.if ! ${_LUA_VALID_VERSIONS:M${_LUA_DEFAULT_VERSION}} +. if ! ${_LUA_VALID_VERSIONS:M${_LUA_DEFAULT_VERSION}} IGNORE= Invalid lua version ${LUA_DEFAULT} -.endif +. endif # # Parse a ver+ argument # -.if ${lua_ARGS:M??+} +. if ${lua_ARGS:M??+} _LUA_MIN_VERSION:= ${lua_ARGS:M??+:S/+//} _LUA_MAX_VERSION:= 99 -.endif +. endif # # Parse a -ver argument # -.if ${lua_ARGS:M-??} +. if ${lua_ARGS:M-??} _LUA_MAX_VERSION:= ${lua_ARGS:M-??:S/-//} _LUA_MIN_VERSION:= 0 -.endif +. endif # # Parse a ver-ver argument # -.if ${lua_ARGS:M??-??} +. if ${lua_ARGS:M??-??} _LUA_MIN_VERSION:= ${lua_ARGS:M??-??:C/-.*//} _LUA_MAX_VERSION:= ${lua_ARGS:M??-??:C/.*-//} -.endif +. endif # # Parse one or more ver arguments # -.if ${lua_ARGS:M[1-9][0-9]} -. for _v in ${lua_ARGS:M[1-9][0-9]} -. if ${_LUA_VALID_VERSIONS:M${_v}} +. if ${lua_ARGS:M[1-9][0-9]} +. for _v in ${lua_ARGS:M[1-9][0-9]} +. if ${_LUA_VALID_VERSIONS:M${_v}} _LUA_WANTED_VERSIONS+=${_v} -. endif -. endfor -. if empty(_LUA_WANTED_VERSIONS) +. endif +. endfor +. if empty(_LUA_WANTED_VERSIONS) IGNORE= USES=lua:nn did not find any valid version number +. endif . endif -.endif # # Resolve version ranges. Append anything within the range to the list of # wanted versions. # -.if defined(_LUA_MIN_VERSION) && defined(_LUA_MAX_VERSION) -. for _v in ${_LUA_VALID_VERSIONS} -. if ${_LUA_MIN_VERSION} <= ${_v} && ${_LUA_MAX_VERSION} >= ${_v} +. if defined(_LUA_MIN_VERSION) && defined(_LUA_MAX_VERSION) +. for _v in ${_LUA_VALID_VERSIONS} +. if ${_LUA_MIN_VERSION} <= ${_v} && ${_LUA_MAX_VERSION} >= ${_v} _LUA_WANTED_VERSIONS+=${_v} -. endif -. endfor -. if empty(_LUA_WANTED_VERSIONS) +. endif +. endfor +. if empty(_LUA_WANTED_VERSIONS) IGNORE= USES=lua:xx-yy did not find any valid version +. endif . endif -.endif # # If no version was specified with any of the ver or ver+ arguments, allow # all versions. # -.if empty(_LUA_WANTED_VERSIONS) +. if empty(_LUA_WANTED_VERSIONS) _LUA_WANTED_VERSIONS:= ${_LUA_VALID_VERSIONS} -.endif +. endif # The "preferred" version, which must always exist, is defined as the # closest value to the default version, preferring higher versions in # case of ties. We find this by constructing values in sequence: # VV VV+1 VV-1 VV+2 VV-2 ... # and then filtering against the allowed versions. The result is the # final list of "wanted" versions, with the preferred version first. _LUA_NUM_ASC:= \ ${:U:range=99:@_v@${${_v} > ${_LUA_DEFAULT_VERSION}:?${_v}:}@} _LUA_NUM_DESC:= \ ${:U:range=99:[-1..1]:@_v@${${_v} <= ${_LUA_DEFAULT_VERSION}:?${_v}:}@} _LUA_NUM_ALL:= \ ${:U:range=99:@_v@${_LUA_NUM_DESC:[${_v}]} ${_LUA_NUM_ASC:[${_v}]}@} _LUA_WANTED_VERSIONS:= \ ${_LUA_NUM_ALL:@_v@${_LUA_WANTED_VERSIONS:M${_v}}@} -.if ${_LUA_ARG_FLAVORS} -. if empty(FLAVORS) +. if ${_LUA_ARG_FLAVORS} +. if empty(FLAVORS) FLAVORS= ${_LUA_WANTED_VERSIONS:S/^/lua/} -. endif -. if empty(FLAVOR) +. endif +. if empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} -. endif +. endif _LUA_WANTED_VERSION:= ${FLAVOR:S/^lua//} -.else +. else _LUA_WANTED_VERSION:= ${_LUA_WANTED_VERSIONS:[1]} -.endif +. endif # If we're building Lua itself, everything should be in $PREFIX. If # we're building a module or app, then the stuff we're installing goes # in $PREFIX but references to Lua itself are in $LOCALBASE. # # The assumption is the LUA_MOD* directories are where we're going to # install (this is common for both modules and apps), and so we also # define LUA_REFMOD* relative to LOCALBASE for use when specifying # dependencies and so on. -.if ${_LUA_ARG_CORE} +. if ${_LUA_ARG_CORE} LUA_BASE=${PREFIX} -.else +. else LUA_BASE=${LOCALBASE} -.endif +. endif LUA_PREFIX=${PREFIX} # # Exported variables # LUA_VER_STR= ${_LUA_WANTED_VERSION} LUA_VER= ${_LUA_WANTED_VERSION:S/^5/5./} LUA_FLAVOR= ${_LUA_WANTED_VERSION:S/^/lua/} LUA_CMD= lua${LUA_VER_STR} LUAC_CMD= luac${LUA_VER_STR} LUA_PKGNAMEPREFIX= lua${LUA_VER_STR}- LUA_LIBDIR= ${LUA_BASE}/lib LUA_INCDIR= ${LUA_BASE}/include/lua${LUA_VER_STR} LUA_MODLIBDIR= ${LUA_PREFIX}/lib/lua/${LUA_VER} LUA_MODSHAREDIR= ${LUA_PREFIX}/share/lua/${LUA_VER} LUA_MODDOCSDIR= ${LUA_PREFIX}/share/doc/lua${LUA_VER_STR} LUA_MODEXAMPLESDIR= ${LUA_PREFIX}/share/examples/lua${LUA_VER_STR} LUA_REFMODLIBDIR= ${LUA_BASE}/lib/lua/${LUA_VER} LUA_REFMODSHAREDIR= ${LUA_BASE}/share/lua/${LUA_VER} PLIST_SUB+= LUA_MODLIBDIR=${LUA_MODLIBDIR:S,^${LUA_PREFIX}/,,} \ LUA_MODSHAREDIR=${LUA_MODSHAREDIR:S,^${LUA_PREFIX}/,,} \ LUA_MODDOCSDIR=${LUA_MODDOCSDIR:S,^${LUA_PREFIX}/,,} \ LUA_INCDIR=${LUA_INCDIR:S,^${LUA_BASE}/,,} \ LUA_VER=${LUA_VER} \ LUA_VER_STR=${LUA_VER_STR} MAKE_ENV+= LUA_MODLIBDIR=${LUA_MODLIBDIR} \ LUA_MODSHAREDIR=${LUA_MODSHAREDIR} \ LUA_MODDOCSDIR=${LUA_MODDOCSDIR} \ LUA_INCDIR=${LUA_INCDIR} \ LUA_LIBDIR=${LUA_LIBDIR} \ LUA_VER=${LUA_VER} \ LUA_VER_STR=${LUA_VER_STR} # if building a module or Lua itself, or if the port defined LUA_DOCSUBDIR, # then define LUA_DOCSDIR and LUA_EXAMPLESDIR too -.if ${_LUA_ARG_CORE} || ${_LUA_ARG_MODULE} +. if ${_LUA_ARG_CORE} || ${_LUA_ARG_MODULE} LUA_DOCSUBDIR?=${PORTNAME} -.endif -.if !empty(LUA_DOCSUBDIR) +. endif +. if !empty(LUA_DOCSUBDIR) LUA_DOCSDIR= ${LUA_MODDOCSDIR}/${LUA_DOCSUBDIR} LUA_EXAMPLESDIR=${LUA_MODEXAMPLESDIR}/${LUA_DOCSUBDIR} PLIST_SUB+= LUA_DOCSDIR=${LUA_DOCSDIR:S,^${LUA_PREFIX}/,,} PLIST_SUB+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR:S,^${LUA_PREFIX}/,,} MAKE_ENV+= LUA_DOCSDIR=${LUA_DOCSDIR} MAKE_ENV+= LUA_EXAMPLESDIR=${LUA_EXAMPLESDIR} -.endif +. endif -.if empty(_LUA_ARG_ENV) -. if ${lua_ARGS:Mbuild} +. if empty(_LUA_ARG_ENV) +. if ${lua_ARGS:Mbuild} BUILD_DEPENDS+= ${LUA_CMD}:lang/lua${LUA_VER_STR} -. endif -. if ${lua_ARGS:Mrun} +. endif +. if ${lua_ARGS:Mrun} RUN_DEPENDS+= ${LUA_CMD}:lang/lua${LUA_VER_STR} -. endif -. if !${lua_ARGS:Mbuild} && !${lua_ARGS:Mrun} +. endif +. if !${lua_ARGS:Mbuild} && !${lua_ARGS:Mrun} LIB_DEPENDS+= liblua-${LUA_VER}.so:lang/lua${LUA_VER_STR} +. endif . endif -.endif .endif diff --git a/Mk/Uses/lxqt.mk b/Mk/Uses/lxqt.mk index ca6487bb3dce..035c2d5e0174 100644 --- a/Mk/Uses/lxqt.mk +++ b/Mk/Uses/lxqt.mk @@ -1,105 +1,105 @@ # This file contains some variable definitions that are supposed to make your # life easier, when dealing with ports related to the LXQt Desktop Environment. # # Feature: lxqt # Usage: USES=lxqt # Valid ARGS: does not require args # # Available LXQt components are: # # buildtools - Helpers CMake modules # globalkeys - Keyboard shortcuts daemon # libfmqt - Libfm Qt bindings # lxqt - LXQt core library # qtxdg - Qt implementation of freedesktop.org xdg specs # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_LXQT_MK) _INCLUDE_USES_LXQT_MK= yes -.if !empty(lxqt_ARGS) +. if !empty(lxqt_ARGS) IGNORE= Incorrect 'USES+=lxqt:${lxqt_ARGS} takes no arguments -.endif +. endif _LXQT_PROJECT= ${DISTNAME:S/-${DISTVERSION}//:tl} MASTER_SITE_LXQT+= \ https://github.com/lxqt/%SUBDIR%/releases/download/${PORTVERSION}/ \ https://downloads.lxqt.org/downloads/%SUBDIR%/${PORTVERSION}/ MASTER_SITE_LXQT_SUBDIR= ${_LXQT_PROJECT} MASTER_SITES?= ${MASTER_SITE_LXQT} MASTER_SITE_SUBDIR?= ${MASTER_SITE_LXQT_SUBDIR} DIST_SUBDIR= lxqt PLIST_SUB+= LXQT_INCLUDEDIR="include/lxqt" \ LXQT_SHAREDIR="share/lxqt" \ LXQT_TRANSLATIONS="share/lxqt/translations" \ VERSION="${PORTVERSION}" CMAKE_ARGS+= -DCMAKE_INSTALL_MANDIR=${PREFIX}/share/man # Available LXQt components are: _USE_LXQT_ALL= buildtools globalkeys libfmqt lxqt qtxdg _DATAROOTDIR= ${LOCALBASE}/share buildtools_BUILD_DEPENDS= ${_DATAROOTDIR}/cmake/lxqt-build-tools/lxqt-build-tools-config.cmake:devel/lxqt-build-tools globalkeys_LIB_DEPENDS= liblxqt-globalkeys.so:x11/lxqt-globalkeys globalkeys_USE_LXQT_REQ= lxqt libfmqt_LIB_DEPENDS= libfm-qt.so:x11/libfm-qt lxqt_LIB_DEPENDS= liblxqt.so:devel/liblxqt lxqt_USE_LXQT_REQ= qtxdg qtxdg_LIB_DEPENDS= libQt5Xdg.so:devel/libqtxdg -.if defined(USE_LXQT) +. if defined(USE_LXQT) # First, expand all USE_LXQT_REQ recursively. -.for comp in ${_USE_LXQT_ALL} -. for subcomp in ${${comp}_USE_LXQT_REQ} +. for comp in ${_USE_LXQT_ALL} +. for subcomp in ${${comp}_USE_LXQT_REQ} ${comp}_USE_LXQT_REQ+= ${${subcomp}_USE_LXQT_REQ} -. endfor -.endfor +. endfor +. endfor # Then, use already expanded USE_LXQT_REQ to expand USE_LXQT. -.for comp in ${USE_LXQT} -. if empty(_USE_LXQT_ALL:M${comp}) +. for comp in ${USE_LXQT} +. if empty(_USE_LXQT_ALL:M${comp}) IGNORE= cannot install: Unknown component ${comp} -. else +. else _USE_LXQT+= ${${comp}_USE_LXQT_REQ} ${comp} -. endif -.endfor +. endif +. endfor # Remove duplicate components USE_LXQT= ${_USE_LXQT:O:u} -.for comp in ${USE_LXQT} -. if defined(${comp}_BUILD_DEPENDS) +. for comp in ${USE_LXQT} +. if defined(${comp}_BUILD_DEPENDS) BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS} -. endif +. endif -. if defined(${comp}_LIB_DEPENDS) +. if defined(${comp}_LIB_DEPENDS) LIB_DEPENDS+= ${${comp}_LIB_DEPENDS} -. endif +. endif -. if defined(${comp}_RUN_DEPENDS) +. if defined(${comp}_RUN_DEPENDS) RUN_DEPENDS+= ${${comp}_RUN_DEPENDS} -. endif -.endfor +. endif +. endfor -.endif # end of defined(USE_LXQT) +. endif # end of defined(USE_LXQT) .endif # end of !defined(_INCLUDE_USES_LXQT_MK) .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LXQT_POST_MK) _INCLUDE_USES_LXQT_POST_MK= yes .endif diff --git a/Mk/Uses/magick.mk b/Mk/Uses/magick.mk index 1d44270031ab..2299ad60fe93 100644 --- a/Mk/Uses/magick.mk +++ b/Mk/Uses/magick.mk @@ -1,93 +1,93 @@ # Handle dependency on ImageMagick # # Feature: magick # Usage: USES=magick:ARGS # Valid ARGS: [version],[kinds],[flavor] # # version The chooseable versions are , 6 and 7. # USES=magick -- depend on ${IMAGEMAGICK_DEFAULT} (default) # USES=magick:6 -- depend on ImageMagick6 # USES=magick:7 -- depend on ImageMagick7 # # flavor The flavors are and nox11 # USES=magick -- depend on the default flavor (default) # USES=magick:nox11 -- depend on the nox11 flavor # # kinds The dependency kinds are , lib, build, run and test # USES=magick -- add a LIB_DEPENDS (default) # USES=magick:lib -- add a LIB_DEPENDS # USES=magick:build -- add a BUILD_DEPENDS # USES=magick:run -- add a RUN_DEPENDS # USES=magick:test -- add a TEST_DEPENDS # USES=build,run -- add a BUILD_- and RUN_DEPENDS # # In short, on a default ports tree # USES=magick # is equivalent to # USES=magick:7,lib # # MAINTAINER: tcberner@FreeBSD.org # .if ! defined(_INCLUDE_USES_MAGICK_MK) _INCLUDE_USES_MAGICK_MK= YES #=== Version selection === _magick_versions= 6 7 _magick_version= # . for _ver in ${_magick_versions:O:u} . if ${magick_ARGS:M${_ver}} . if empty(_magick_version) _magick_version= ${_ver} . else IGNORE= Incorrect USES=magick:${magick_ARGS} - multiple versions defined . endif . endif . endfor # Fallback to the default version -.if empty(_magick_version) +. if empty(_magick_version) _magick_version= ${IMAGEMAGICK_DEFAULT} -.endif +. endif #=== Flavor selection === _magick_flavors= nox11 _magick_flavor= # . for _flavor in ${_magick_flavors:O:u} . if ${magick_ARGS:M${_flavor}} . if empty(_magick_flavor) _magick_flavor= -${_flavor} . else IGNORE= Incorrect USES=magick:${magick_ARGS} - multiple flavors defined . endif . endif . endfor #=== Dependeny selection === _magick_depends= lib build run test _magick_depend= # . for _depend in ${_magick_depends:O:u} . if ${magick_ARGS:M${_depend}} _magick_depend+= ${_depend} . endif . endfor -.if empty(_magick_depend) +. if empty(_magick_depend) _magick_depend= lib -.endif +. endif #=== Dependency setup === _MAGICK_PORT= graphics/ImageMagick${_magick_version}${_magick_flavor} _MAGICK_LIB= libMagick++-${_magick_version}.so _MAGICK_PKG= ImageMagick${_magick_version}${_magick_flavor} _MAGICK_BUILD_DEPENDS= ${_MAGICK_PKG}>=${_magick_version}:${_MAGICK_PORT} _MAGICK_LIB_DEPENDS= ${_MAGICK_LIB}:${_MAGICK_PORT} _MAGICK_RUN_DEPENDS= ${_MAGICK_PKG}>=${_magick_version}:${_MAGICK_PORT} _MAGICK_TEST_DEPENDS= ${_MAGICK_PKG}>=${_magick_version}:${_MAGICK_PORT} #=== Actual dependency creation === . for _kind in ${_magick_depend} ${_kind:tu}_DEPENDS+= ${_MAGICK_${_kind:tu}_DEPENDS} . endfor .endif diff --git a/Mk/Uses/makeinfo.mk b/Mk/Uses/makeinfo.mk index 07a1764b8057..ea7351f826e2 100644 --- a/Mk/Uses/makeinfo.mk +++ b/Mk/Uses/makeinfo.mk @@ -1,20 +1,20 @@ # handle dependency on the makeinfo port # # Feature: makeinfo # Usage: USES=makeinfo # Valid ARGS: none # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_MAKEINFO_MK) _INCLUDE_USES_MAKEINFO_MK= yes -.if !empty(makeinfo_ARGS) +. if !empty(makeinfo_ARGS) IGNORE= USES=makeinfo - expects no arguments -.endif +. endif # Depend specifically on makeinfo from ports BUILD_DEPENDS+= ${LOCALBASE}/bin/makeinfo:print/texinfo MAKEINFO?= ${LOCALBASE}/bin/makeinfo .endif diff --git a/Mk/Uses/makeself.mk b/Mk/Uses/makeself.mk index 6bab118411c0..6198672a982c 100644 --- a/Mk/Uses/makeself.mk +++ b/Mk/Uses/makeself.mk @@ -1,21 +1,21 @@ # handle makeself archives # # Feature: makeself # Usage: USES=makeself # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_MAKESELF_Mk) _INCLUDE_USES_MAKESELF_MK= yes -.if !empty(makeself_ARGS) +. if !empty(makeself_ARGS) IGNORE= Incorrect 'USES+= makeself:${makeself_ARGS}' makeself takes no arguments -.endif +. endif EXTRACT_DEPENDS+= ${UNMAKESELF_CMD}:archivers/unmakeself EXTRACT_CMD= ${UNMAKESELF_CMD} EXTRACT_BEFORE_ARGS= EXTRACT_AFTER_ARGS= .endif diff --git a/Mk/Uses/mate.mk b/Mk/Uses/mate.mk index a94ed49112b9..34ccb7d831c3 100644 --- a/Mk/Uses/mate.mk +++ b/Mk/Uses/mate.mk @@ -1,225 +1,225 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Please view me with 4 column tabs! # ======================= USERS ================================= # # There are no significant user-definable settings in here. # This file is a framework to make it easier to create MATE ports. # # ======================= /USERS ================================ # # Please make sure all changes to this file are passed through the maintainer. # Do not commit them yourself (unless of course you're the Port's Wraith ;). # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_MATE_MK) _INCLUDE_USES_MATE_MK= yes _USES_POST+= mate -.if !empty(mate_ARGS) +. if !empty(mate_ARGS) IGNORE= USES=mate takes no arguments -.endif +. endif # This section defines possible names of MATE components and all information # necessary for ports to use those components. # Ports can use this as follows: # # USE_MATE= caja common desktop # # .include # # As a result proper LIB_DEPENDS/RUN_DEPENDS will be added and CONFIGURE_ENV # and MAKE_ENV defined. # # non-version specific components. Do not use :build/:run on those. _USE_MATE_ALL= autogen intlhack intltool # MATE components, you can use the :build or :run if need. Without the :build # and :run, it will be added in both build and run dependency. It will check # for the library dependency first. If not exists then do the build/run on # the *.pc file instead. _USE_MATE_ALL+= caja common controlcenter desktop dialogs docutils icontheme \ libmatekbd libmateweather \ marco menus mixer notificationdaemon panel polkit pluma \ session settingsdaemon caja_DETECT= ${LOCALBASE}/libdata/pkgconfig/libcaja-extension.pc caja_BUILD_DEPENDS= ${caja_DETECT}:x11-fm/caja caja_LIB_DEPENDS= libcaja-extension.so:x11-fm/caja caja_RUN_DEPENDS= ${caja_DETECT}:x11-fm/caja common_DETECT= ${LOCALBASE}/bin/mate-autogen common_BUILD_DEPENDS= ${common_DETECT}:devel/mate-common common_RUN_DEPENDS= ${common_DETECT}:devel/mate-common controlcenter_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-window-settings-2.0.pc controlcenter_BUILD_DEPENDS= ${controlcenter_DETECT}:sysutils/mate-control-center controlcenter_LIB_DEPENDS= libmate-window-settings.so:sysutils/mate-control-center controlcenter_RUN_DEPENDS= ${controlcenter_DETECT}:sysutils/mate-control-center desktop_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-desktop-2.0.pc desktop_BUILD_DEPENDS= ${desktop_DETECT}:x11/mate-desktop desktop_LIB_DEPENDS= libmate-desktop-2.so:x11/mate-desktop desktop_RUN_DEPENDS= ${desktop_DETECT}:x11/mate-desktop dialogs_DETECT= ${LOCALBASE}/bin/matedialog dialogs_BUILD_DEPENDS= ${dialogs_DETECT}:x11/mate-dialogs dialogs_RUN_DEPENDS= ${dialogs_DETECT}:x11/mate-dialogs docutils_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-doc-utils.pc docutils_BUILD_DEPENDS= ${docutils_DETECT}:textproc/mate-doc-utils docutils_RUN_DEPENDS= ${docutils_DETECT}:textproc/mate-doc-utils icontheme_DETECT= ${LOCALBASE}/share/icons/mate/index.theme icontheme_BUILD_DEPENDS=${icontheme_DETECT}:x11-themes/mate-icon-theme icontheme_RUN_DEPENDS= ${icontheme_DETECT}:x11-themes/mate-icon-theme intltool_DETECT= ${LOCALBASE}/bin/intltool-extract intltool_BUILD_DEPENDS= ${intltool_DETECT}:textproc/intltool intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${REINPLACE_CMD} -e \ 's|mkdir $$lang or|mkdir $$lang, 0777 or| ; \ s|^push @INC, "/.*|push @INC, "${LOCALBASE}/share/intltool";| ; \ s|/usr/bin/iconv|${LOCALBASE}/bin/iconv|g ; \ s|unpack *[(]'"'"'U\*'"'"'|unpack ('"'"'C*'"'"'|' -.if ${USE_MATE:Mintlhack}!="" +. if ${USE_MATE:Mintlhack}!="" USE_MATE+= intltool -.endif +. endif libmatekbd_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatekbd.pc libmatekbd_BUILD_DEPENDS= ${libmatekbd_DETECT}:x11/libmatekbd libmatekbd_LIB_DEPENDS= libmatekbd.so:x11/libmatekbd libmatekbd_RUN_DEPENDS= ${libmatekbd_DETECT}:x11/libmatekbd libmateweather_DETECT= ${LOCALBASE}/libdata/pkgconfig/mateweather.pc libmateweather_BUILD_DEPENDS= ${libmateweather_DETECT}:net/libmateweather libmateweather_LIB_DEPENDS= libmateweather.so:net/libmateweather libmateweather_RUN_DEPENDS= ${libmateweather_DETECT}:net/libmateweather marco_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmarco-private.pc marco_BUILD_DEPENDS= ${marco_DETECT}:x11-wm/marco marco_LIB_DEPENDS= libmarco-private.so:x11-wm/marco marco_RUN_DEPENDS= ${marco_DETECT}:x11-wm/marco menus_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmate-menu.pc menus_BUILD_DEPENDS= ${menus_DETECT}:x11/mate-menus menus_LIB_DEPENDS= libmate-menu.so:x11/mate-menus menus_RUN_DEPENDS= ${menus_DETECT}:x11/mate-menus mixer_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatemixer.pc mixer_BUILD_DEPENDS= ${mixer_DETECT}:audio/libmatemixer mixer_LIB_DEPENDS= libmatemixer.so:audio/libmatemixer mixer_RUN_DEPENDS= ${mixer_DETECT}:audio/libmatemixer notificationdaemon_DETECT= ${LOCALBASE}/libexec/mate-notification-daemon notificationdaemon_BUILD_DEPENDS= ${notificationdaemon_DETECT}:deskutils/mate-notification-daemon notificationdaemon_RUN_DEPENDS= ${notificationdaemon_DETECT}:deskutils/mate-notification-daemon panel_DETECT= ${LOCALBASE}/libdata/pkgconfig/libmatepanelapplet-4.0.pc panel_BUILD_DEPENDS= ${panel_DETECT}:x11/mate-panel panel_LIB_DEPENDS= libmate-panel-applet-4.so:x11/mate-panel panel_RUN_DEPENDS= ${panel_DETECT}:x11/mate-panel polkit_DETECT= ${LOCALBASE}/libexec/polkit-mate-authentication-agent-1 polkit_BUILD_DEPENDS= ${polkit_DETECT}:sysutils/mate-polkit polkit_RUN_DEPENDS= ${polkit_DETECT}:sysutils/mate-polkit pluma_DETECT= ${LOCALBASE}/libdata/pkgconfig/pluma.pc pluma_BUILD_DEPENDS= ${pluma_DETECT}:editors/pluma pluma_RUN_DEPENDS= ${pluma_DETECT}:editors/pluma session_DETECT= ${LOCALBASE}/bin/mate-session session_BUILD_DEPENDS= ${session_DETECT}:x11/mate-session-manager session_RUN_DEPENDS= ${session_DETECT}:x11/mate-session-manager settingsdaemon_DETECT= ${LOCALBASE}/libdata/pkgconfig/mate-settings-daemon.pc settingsdaemon_BUILD_DEPENDS= ${settingsdaemon_DETECT}:sysutils/mate-settings-daemon settingsdaemon_RUN_DEPENDS= ${settingsdaemon_DETECT}:sysutils/mate-settings-daemon # End component definition section -.if defined(USE_MATE) +. if defined(USE_MATE) # Comparing between USE_MATE and _USE_MATE_ALL to make sure the component # exists in _USE_MATE_ALL. If it does not exist then give an error about it. #. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} -. for component in ${USE_MATE:C/^([^:]+).*/\1/} +. for component in ${USE_MATE:C/^([^:]+).*/\1/} #. for component in ${USE_GNOME:C/^([^:]+).*/\1/} -. if ${_USE_MATE_ALL:M${component}}=="" +. if ${_USE_MATE_ALL:M${component}}=="" .error cannot install: Unknown component USE_MATE=${component} -. endif -. endfor +. endif +. endfor -. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} -. if defined(${component}_PATCH_DEPENDS) +. for component in ${USE_MATE:O:u:C/^([^:]+).*/\1/} +. if defined(${component}_PATCH_DEPENDS) PATCH_DEPENDS+= ${${component}_PATCH_DEPENDS} -. endif +. endif -. if defined(${component}_DETECT) -. if ${USE_MATE:M${component}\:build}!="" +. if defined(${component}_DETECT) +. if ${USE_MATE:M${component}\:build}!="" BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} -. elif ${USE_MATE:M${component}\:run}!="" +. elif ${USE_MATE:M${component}\:run}!="" RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. else -. if defined(${component}_LIB_DEPENDS) +. else +. if defined(${component}_LIB_DEPENDS) LIB_DEPENDS+= ${${component}_LIB_DEPENDS} -. else +. else BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS} RUN_DEPENDS+= ${${component}_RUN_DEPENDS} -. endif -. endif -. endif +. endif +. endif +. endif -. if defined(${component}_CONFIGURE_TARGET) +. if defined(${component}_CONFIGURE_TARGET) CONFIGURE_ARGS+=${${component}_CONFIGURE_ARGS} -. endif +. endif -. if defined(${component}_CONFIGURE_ENV) +. if defined(${component}_CONFIGURE_ENV) CONFIGURE_ENV+= ${${component}_CONFIGURE_ENV} -. endif +. endif -. if defined(${component}_MAKE_ENV) +. if defined(${component}_MAKE_ENV) MAKE_ENV+= ${${component}_MAKE_ENV} -. endif +. endif -. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) +. if !defined(CONFIGURE_TARGET) && defined(${component}_CONFIGURE_TARGET) CONFIGURE_TARGET= ${${component}_CONFIGURE_TARGET} -. endif +. endif -. if defined(${component}_PRE_PATCH) +. if defined(${component}_PRE_PATCH) MATE_PRE_PATCH+= ; ${${component}_PRE_PATCH} -. endif -. endfor -.endif # USE_MATE check +. endif +. endfor +. endif # USE_MATE check .endif # End of optional part. .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_MATE_POST_MK) _INCLUDE_USES_MATE_POST_MK= yes -.if ${USE_MATE:Mautogen}!="" +. if ${USE_MATE:Mautogen}!="" CONFIGURE_ENV+= NOCONFIGURE=yes _USES_configure+= 295:mate-pre-configure mate-pre-configure: @(cd ${CONFIGURE_WRKSRC} ; ${SETENV} ${CONFIGURE_ENV} ./autogen.sh) -.endif +. endif -.if defined(MATE_PRE_PATCH) +. if defined(MATE_PRE_PATCH) _USES_configure+= 445:mate-pre-configure-script mate-pre-configure-script: @${MATE_PRE_PATCH:C/^;//1} -.endif +. endif .endif # End of use part. diff --git a/Mk/Uses/meson.mk b/Mk/Uses/meson.mk index c87ccdeafa4d..4411bb5b9f7b 100644 --- a/Mk/Uses/meson.mk +++ b/Mk/Uses/meson.mk @@ -1,74 +1,74 @@ # Provide support for Meson based projects # # Feature: meson # Usage: USES=meson # # The following files are bundled in source tar files. # meson.build - Instructions for meson like autoconf configure, # there is no changeable parts in the file. # meson_options.txt - All the options meson understands # # Variables for ports: # MESON_ARGS - Arguments passed to meson # format: -Denable_foo=true # MESON_BUILD_DIR - Path to the build directory relative to ${WRKSRC} # Default: _build # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_MESON_MK) _INCLUDE_USES_MESON_MK= yes # Sanity check -.if !empty(meson_ARGS) +. if !empty(meson_ARGS) IGNORE= Incorrect 'USES+= meson:${meson_ARGS}'. meson takes no arguments -.endif +. endif BUILD_DEPENDS+= meson>=0.57.1_1:devel/meson # meson uses ninja .include "${USESDIR}/ninja.mk" # meson might have issues with non-unicode locales USE_LOCALE?= en_US.UTF-8 CONFIGURE_ARGS+= --prefix ${PREFIX} \ --mandir man \ --infodir ${INFO_PATH} # Disable color output. Meson forces it on by default, Ninja # strips it before it goes to the log, but Samurai does not, so we # might end up with ANSI escape sequences in the logs. CONFIGURE_ARGS+= -Db_colorout=never # meson has it own strip mechanic INSTALL_TARGET= install # should we have strip separate from WITH_DEBUG? -.if defined(WITH_DEBUG) +. if defined(WITH_DEBUG) CONFIGURE_ARGS+= --buildtype debug -.else +. else CONFIGURE_ARGS+= --buildtype release \ --strip -.endif +. endif HAS_CONFIGURE= yes CONFIGURE_CMD= meson # Pull in manual set settings and from options CONFIGURE_ARGS+= ${MESON_ARGS} BUILD_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR} INSTALL_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR} TEST_WRKSRC= ${WRKSRC}/${MESON_BUILD_DIR} TEST_TARGET= test MESON_BUILD_DIR?= _build CONFIGURE_LOG= ${MESON_BUILD_DIR}/meson-logs/meson-log.txt # Add meson build dir at the end. CONFIGURE_ARGS+= ${MESON_BUILD_DIR} .endif #!defined(_INCLUDE_USES_MESON_MK) diff --git a/Mk/Uses/mono.mk b/Mk/Uses/mono.mk index 923adc517c30..e2c659b01345 100644 --- a/Mk/Uses/mono.mk +++ b/Mk/Uses/mono.mk @@ -1,236 +1,236 @@ # mono (c#) support # # Feature: mono # Usage: USES=mono:ARGS # Valid ARGS: nuget # # MAINTAINER= mono@FreeBSD.org # # Arguments: # # build Specifies that mono is only a build-time dependency. # # nuget Specifies that the port uses nuget packages. # # EXTRACT_ONLY is conditionally overridden to exclude all # files with a '.nupkg' extension. # # Targets: # # makenuget This target will output the NUGET_DEPENDS based on the # port's packages.config file. # # makenupkg This target will create nupkg-${NAME} files based on the # port's downloaded packages in ${NUGET_PACKAGEDIR} # # Variables overrideable by the port: # # NUGET_PACKAGEDIR The directory in which the port expects the # nuget packages to be available # default: ${WRKSRC}/packages # # NUGET_LAYOUT The directory layout of ${NUGET_PACKAGEDIR}: # legacy: # ${NAME} # ${NAME}.${VERSION} # ${NAME.tl}/${VERSION} # flat: # ${NAME} # ${NAME:tl} # dotnet: # ${NAME:tl}/${VERSION} # default: legacy # # NUGET_FEEDS A list of nuget feed names # default: NUGET # # ${NAME}_URL: The base URL for the feed ${NAME} # defaults: # NUGET_URL=https://www.nuget.org/api/v2/ # ${NAME}_URL=https://dotnet.myget.org/F/${NAME:tl:S/_/-/g}/api/v2/ # # ${NAME}_FILE: The file containing a list of nuget packages from # feed ${NAME} in the format: # ${name}=${version} # default: ${PKGDIR}/nupkg-${NAME:tl} # # ${NAME}_DEPENDS: The list of nuget packages from feed ${NAME} in the # format: # ${name}=${version} # defaults: # NUGET_DEPENDS=${PAKET_DEPENDS} # # PAKET_PACKAGEDIR The directory in which the port expects the # nuget packages (managed by paket) to be available # # PAKET_DEPENDS The list of nuget packages from a nuget feed. The # version used needs to be resolved (unlike how paket # works). The format is: # ${name}=${version} .if !defined(_INCLUDE_USES_MONO_MK) _INCLUDE_USES_MONO_MK= yes -.if !empty(mono_ARGS:Nnuget:Nbuild) +. if !empty(mono_ARGS:Nnuget:Nbuild) IGNORE= USES=mono only supports optional arguments nuget and build -.endif +. endif # Set the location of the .wapi directory so we write to a location we # can always assume to be writable. MONO_SHARED_DIR= ${WRKDIR} CONFIGURE_ENV+= MONO_SHARED_DIR="${MONO_SHARED_DIR}" MAKE_ENV+= MONO_SHARED_DIR="${MONO_SHARED_DIR}" TZ=UTC BUILD_DEPENDS+= mono:lang/mono -.if empty(mono_ARGS:Mbuild) +. if empty(mono_ARGS:Mbuild) RUN_DEPENDS+= mono:lang/mono -.endif +. endif # Set the location that webaps served by XSP should use. XSP_DOCROOT= ${PREFIX}/www/xsp # gac utilities GACUTIL=${LOCALBASE}/bin/gacutil /root ${PREFIX}/lib/ /gacdir ${PREFIX}/lib GACUTIL_INSTALL=${GACUTIL} /i GACUTIL_INSTALL_PACKAGE=${GACUTIL} /i /package 1.0 /package 2.0 -.if ${mono_ARGS:Mnuget} +. if ${mono_ARGS:Mnuget} MAKE_ENV+= NUGET_PACKAGES=${NUGET_PACKAGEDIR} # TODO: add nuget as a Port, use it for makenupkg NUGET_EXE?= ${WRKDIR}/nuget.exe NUGET_LATEST_URL?= https://dist.nuget.org/win-x86-commandline/latest/nuget.exe _NUGET_PACKAGEDIR= ${WRKDIR}/.nuget/packages NUGET_PACKAGEDIR?= ${WRKSRC}/packages NUGET_LAYOUT?= legacy NUGET_FEEDS?= NUGET NUGET_URL?= https://api.nuget.org/v3-flatcontainer/ NUGET_VERSION?= v3 PAKET_PACKAGEDIR?= PAKET_DEPENDS?= NUGET_DEPENDS?= ${PAKET_DEPENDS} -. for feed in ${NUGET_FEEDS} +. for feed in ${NUGET_FEEDS} ${feed}_DEPENDS?= ${feed}_FILE?= ${PKGDIR}/nupkg-${feed:tl} ${feed}_URL?= https://dotnet.myget.org/F/${feed:tl:S/_/-/g}/api/v2/ ${feed}_VERSION?= v2 -. if exists(${${feed}_FILE}) +. if exists(${${feed}_FILE}) ${feed}_EXTRA!= ${CAT} ${${feed}_FILE} -. else +. else ${feed}_EXTRA= -. endif +. endif MAKENUPKG_ENV+= ${feed:tl}_URL="${${feed}_URL}" ${feed:tl}_VERSION="${${feed}_VERSION}" -. for depend in ${${feed}_DEPENDS} ${${feed}_EXTRA} -. if empty(_NUGET_DEPENDS:M${depend}) +. for depend in ${${feed}_DEPENDS} ${${feed}_EXTRA} +. if empty(_NUGET_DEPENDS:M${depend}) id= ${depend:C/=.*$//} version= ${depend:C/^.*=//} group= nuget_${depend:C/[.+=-]//g} nupkg= ${id:tl}.${version}.nupkg DISTFILES_${group}:= ${nupkg}:${group} -. if ${${feed}_VERSION} == v2 +. if ${${feed}_VERSION} == v2 MASTER_SITES_${group}:= ${${feed}_URL}package/${id}/${version}?dummy=/:${group} -. else +. else MASTER_SITES_${group}:= ${${feed}_URL}${id:tl}/${version}/:${group} -. endif +. endif NUGET_NUPKGS_${group}:= ${nupkg}:${depend} NUPKGS_${id}:= ${NUPKGS_${id}} ${version} DISTFILES+= ${DISTFILES_nuget_${depend:S/.//g:S/-//g:S/=//g}} MASTER_SITES+= ${MASTER_SITES_nuget_${depend:S/.//g:S/-//g:S/=//g}} NUGET_NUPKGS+= ${NUGET_NUPKGS_nuget_${depend:S/.//g:S/-//g:S/=//g}} _NUGET_DEPENDS+= ${depend} -. endif -. endfor -. endfor +. endif +. endfor +. endfor EXTRACT_ONLY?= ${_DISTFILES:N*.nupkg} _USES_extract+= 600:nuget-extract nuget-extract: @${MKDIR} ${_NUGET_PACKAGEDIR} ${PAKET_PACKAGEDIR} -. for nupkg in ${NUGET_NUPKGS} +. for nupkg in ${NUGET_NUPKGS} @${MKDIR} ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|} @tar -xf ${DISTDIR}/${nupkg:C/:.*$//} -C ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|} \ -s/%2B/\+/g -s/%2B/\+/g -s/%2B/\+/g \ --exclude '\[Content_Types\].xml' \ --exclude package/ \ --exclude _rels/ @${MV} ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/${nupkg:C/^.*://:C/=.*//}.nuspec \ ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/${nupkg:tl:C/^.*://:C/=.*//}.nuspec @${CP} ${DISTDIR}/${nupkg:C/:.*$//} ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/${nupkg:tl:C/^.*://:S/=/./}.nupkg @openssl dgst -sha512 -binary ${DISTDIR}/${nupkg:C/:.*$//} | openssl enc -base64 | ${TR} -d "\n" \ > ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/${nupkg:tl:C/^.*://:S/=/./}.nupkg.sha512 -. if ${NUGET_LAYOUT} == legacy +. if ${NUGET_LAYOUT} == legacy @${CP} -a ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/ ${_NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S|=|.|}/ @${CP} -a ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/ ${_NUGET_PACKAGEDIR}/${nupkg:C/^.*://:C|=.*||}/ -. if ${nupkg} != ${nupkg:tl} +. if ${nupkg} != ${nupkg:tl} @(cd ${_NUGET_PACKAGEDIR}/${nupkg:C/^.*://:C|=.*||}; \ ${MV} ${nupkg:tl:C/^.*://:C/=.*//}.nuspec ${nupkg:C/^.*://:C/=.*//}.nuspec; \ ${MV} ${nupkg:tl:C/^.*://:S/=/./}.nupkg ${nupkg:C/^.*://:S/=/./}.nupkg; \ ${MV} ${nupkg:tl:C/^.*://:S/=/./}.nupkg.sha512 ${nupkg:C/^.*://:S/=/./}.nupkg.sha512) @(cd ${_NUGET_PACKAGEDIR}/${nupkg:C/^.*://:S|=|.|}; \ ${MV} ${nupkg:tl:C/^.*://:C/=.*//}.nuspec ${nupkg:C/^.*://:C/=.*//}.nuspec; \ ${MV} ${nupkg:tl:C/^.*://:S/=/./}.nupkg ${nupkg:C/^.*://:S/=/./}.nupkg; \ ${MV} ${nupkg:tl:C/^.*://:S/=/./}.nupkg.sha512 ${nupkg:C/^.*://:S/=/./}.nupkg.sha512) -. endif -. elif ${NUGET_LAYOUT} == flat +. endif +. elif ${NUGET_LAYOUT} == flat @${CP} -a ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}/ ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:C|=.*||}/ @${RM} -r ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|} -. if ${nupkg} != ${nupkg:tl} +. if ${nupkg} != ${nupkg:tl} @${CP} -a ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:C|=.*||}/ ${_NUGET_PACKAGEDIR}/${nupkg:C/^.*://:C|=.*||}/ @(cd ${_NUGET_PACKAGEDIR}/${nupkg:C/^.*://:C|=.*||}; \ ${MV} ${nupkg:tl:C/^.*://:C/=.*//}.nuspec ${nupkg:C/^.*://:C/=.*//}.nuspec; \ ${MV} ${nupkg:tl:C/^.*://:S/=/./}.nupkg ${nupkg:C/^.*://:S/=/./}.nupkg; \ ${MV} ${nupkg:tl:C/^.*://:S/=/./}.nupkg.sha512 ${nupkg:C/^.*://:S/=/./}.nupkg.sha512) -. endif -. endif -. endfor +. endif +. endif +. endfor @${RLN} ${_NUGET_PACKAGEDIR} ${NUGET_PACKAGEDIR} @${TOUCH} ${WRKDIR}/.nuget-sentinal _USES_extract+= 601:paket-extract paket-extract: -. for nupkg in ${PAKET_DEPENDS} +. for nupkg in ${PAKET_DEPENDS} @${RLN} ${_NUGET_PACKAGEDIR}/${nupkg:tl:S|=|/|} ${PAKET_PACKAGEDIR}/${nupkg:C/=.*//} @(cd ${_NUGET_PACKAGEDIR}/${nupkg:tl:C/^.*://:S|=|/|}; \ ${CP} ${nupkg:tl:C/^.*://:C/=.*//}.nuspec ${nupkg:C/^.*://:C/=.*//}.nuspec; \ ${CP} ${nupkg:tl:C/^.*://:S/=/./}.nupkg ${nupkg:C/^.*://:S/=/./}.nupkg; \ ${CP} ${nupkg:tl:C/^.*://:S/=/./}.nupkg.sha512 ${nupkg:C/^.*://:S/=/./}.nupkg.sha512) -. endfor -.endif +. endfor +. endif makenuget: patch @${FIND} ${WRKSRC} -name packages.config | \ ${XARGS} ${SED} -nE 's|.*.*|\1=\2|gp' | \ ${SORT} -u | \ ${SED} \ -e '1s|^|NUGET_DEPENDS= |' \ -e '2,$$s|^| |g' \ -e '$$!s|$$| \\|g' makenupkg: @${RM} ${WRKDIR}/nupkg-* @for nuspec in `${FIND} ${_NUGET_PACKAGEDIR} -name '*.nuspec'`; do \ name="`${SED} -nE 's|.*(.*).*|\1|p' $$nuspec`"; \ version="`${SED} -nE 's|.*(.*).*|\1|p' $$nuspec`"; \ echo $$name=$$version ; \ done | ${SORT} -u | ${SETENV} ${MAKENUPKG_ENV} ${XARGS} -n1 sh -c ' \ for feed in ${NUGET_FEEDS:MNUGET:tl} ${NUGET_FEEDS:NNUGET:tl}; do \ if eval [ "\$${$${feed}_VERSION}" = v2 ]; then \ eval url="\$${$${feed}_URL}package/$${0%%=*}/$${0##*=}"; \ else \ eval url="\$${$${feed}_URL}$${0%%=*}/$${0##*=}/$${0%%=*}.$${0##*=}.nupkg"; \ fi; \ if curl --output /dev/null --silent --head --fail $$url; then\ ${ECHO_CMD} $$0 >> ${WRKDIR}/nupkg-$$feed; \ found=yes; \ break; \ fi; \ done; \ if [ -z "$$found" ]; then \ echo "$$0: no feed found"; \ exit 1; \ fi' .endif diff --git a/Mk/Uses/motif.mk b/Mk/Uses/motif.mk index bffddf9729d4..c65370e80a50 100644 --- a/Mk/Uses/motif.mk +++ b/Mk/Uses/motif.mk @@ -1,33 +1,33 @@ # handle dependency on motif # # Feature: motif # Usage: USES=motif # # If WANT_LESSTIF is defined in user make.conf then lesstif will be used # instead of open-motif # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_MOTIF_MK) _INCLUDE_USES_MOTIF_MK= yes -.if !empty(motif_ARGS) +. if !empty(motif_ARGS) IGNORE= USES=motif takes no arguments -.endif +. endif -.if defined(WANT_LESSTIF) +. if defined(WANT_LESSTIF) LIB_DEPENDS+= libXm.so:x11-toolkits/lesstif -.else +. else USE_XORG+= xpm LIB_DEPENDS+= libXm.so.4:x11-toolkits/open-motif -.endif +. endif MOTIFLIB?= -L${LOCALBASE}/lib -lXm MAKE_ENV+= MOTIFLIB="${MOTIFLIB}" # We only need to include xorg.mk if we want USE_XORG modules -.if defined(USE_XORG) && !empty(USE_XORG) +. if defined(USE_XORG) && !empty(USE_XORG) .include "${USESDIR}/xorg.mk" -.endif +. endif .endif diff --git a/Mk/Uses/mpi.mk b/Mk/Uses/mpi.mk index 62d86a289fd2..29c417ce62f8 100644 --- a/Mk/Uses/mpi.mk +++ b/Mk/Uses/mpi.mk @@ -1,65 +1,65 @@ # Handle dependencies on MPICH / OpenMPI # # Feature: mpi # Usage: USES=mpi or USES=mpi:ARGS # Valid ARGS: mpich (default) openmpi # Note: mpich2 and openmpi3 are not handled # # Provides: MPI_LIBS MPI_CFLAGS MPICC MPICXX MPIF90 MPIFC MPI_HOME \ # MPIEXEC MPIRUN # Sets: LIB_DEPENDS # + CMAKE_ARGS if cmake is enabled to drive FindMPI.cmake # # Maintainer: thierry@FreeBSD.org .if !defined(_INCLUDE_USES_MPI_MK) _INCLUDE_USES_MPI_MK= yes _valid_ARGS= mpich openmpi _DEFAULT_MPI= mpich -.if empty(mpi_ARGS) +. if empty(mpi_ARGS) mpi_ARGS= ${_DEFAULT_MPI} -.endif +. endif -.if ! ${USES:Mpkgconfig} +. if ! ${USES:Mpkgconfig} USES+= pkgconfig -.endif +. endif -.if ${mpi_ARGS} == mpich +. if ${mpi_ARGS} == mpich LIB_DEPENDS+= libmpich.so:net/mpich MPI_HOME= ${LOCALBASE} MPI_LIBS+= `pkgconf --libs mpich` -. if ${USES:Mfortran} +. if ${USES:Mfortran} MPI_LIBS+= -lmpifort MPIFC= ${MPI_HOME}/bin/mpif90 MPIF90= ${MPIFC} -. endif +. endif MPI_CFLAGS+= `pkgconf --cflags mpich` -.elif ${mpi_ARGS} == openmpi +. elif ${mpi_ARGS} == openmpi LIB_DEPENDS+= libmpi_cxx.so:net/openmpi MPI_HOME= ${LOCALBASE}/mpi/openmpi -. if ${USES:Mfortran} +. if ${USES:Mfortran} MPI_LIBS+= `pkgconf --libs ompi-fort` MPIFC= ${MPI_HOME}/bin/mpif90 MPIF90= ${MPIFC} -. else +. else MPI_LIBS+= `pkgconf --libs ompi` -. endif +. endif MPI_CFLAGS+= `pkgconf --cflags ompi` -.else +. else IGNORE= USES=mpi: invalid arguments: ${mpi_ARGS} -.endif +. endif MPICC= ${MPI_HOME}/bin/mpicc MPICXX= ${MPI_HOME}/bin/mpicxx MPIEXEC= ${MPI_HOME}/bin/mpiexec MPIRUN= ${MPI_HOME}/bin/mpirun -.if ${USES:Mcmake} || ${USES:Mcmake\:*} +. if ${USES:Mcmake} || ${USES:Mcmake\:*} CMAKE_ARGS+= -DMPIEXEC_EXECUTABLE:FILEPATH="${MPIEXEC}" \ -DMPI_HOME:PATH="${MPI_HOME}" -.endif +. endif .endif diff --git a/Mk/Uses/mysql.mk b/Mk/Uses/mysql.mk index e439940bc443..48aefe4c43b9 100644 --- a/Mk/Uses/mysql.mk +++ b/Mk/Uses/mysql.mk @@ -1,177 +1,177 @@ # Provide support for MySQL # Feature: mysql # Usage: USES=mysql or USES=mysql:args # Valid ARGS: , client, server, embedded # # version If no version is given (by the maintainer via the port), try to # find the currently installed version. Fall back to default if # necessary (MySQL-5.7 = 57, look at bsd.default-versions.mk for # possible values). # client Depends on the libmysqlclient library (default) # server/embedded # Depend on the server at run/build time. If none of these is # set, depends on the client. # # IGNORE_WITH_MYSQL # This variable can be defined if the ports does not support one # or more versions of MySQL. # WITH_MYSQL_VER # User defined variable to set MySQL version. # MYSQL_VER # Detected MySQL version. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_MYSQL_MK) _INCLUDE_USES_MYSQL_MK= yes -.if !empty(mysql_ARGS) +. if !empty(mysql_ARGS) .undef _WANT_MYSQL_VER .undef _WANT_MYSQL_SERVER .undef _WANT_MYSQL_EMBEDDED _MYSQL_ARGS= ${mysql_ARGS:S/,/ /g} -.if ${_MYSQL_ARGS:Mserver} +. if ${_MYSQL_ARGS:Mserver} _WANT_MYSQL_SERVER= yes _MYSQL_ARGS:= ${_MYSQL_ARGS:Nserver} -.endif -.if ${_MYSQL_ARGS:Membedded} +. endif +. if ${_MYSQL_ARGS:Membedded} _WANT_MYSQL_EMBEDDED= yes _MYSQL_ARGS:= ${_MYSQL_ARGS:Nembedded} -.endif -.if ${_MYSQL_ARGS:Mclient} +. endif +. if ${_MYSQL_ARGS:Mclient} _WANT_MYSQL_CLIENT= yes _MYSQL_ARGS:= ${_MYSQL_ARGS:Nclient} -.endif +. endif # Port requested a version -.if !empty(_MYSQL_ARGS) +. if !empty(_MYSQL_ARGS) _WANT_MYSQL_VER= ${_MYSQL_ARGS} -.if (${_WANT_MYSQL_VER:C/[0-9]*//} == "m") +. if (${_WANT_MYSQL_VER:C/[0-9]*//} == "m") _WANT_MYSQL_FLAVOUR= mariadb -.elif (${_WANT_MYSQL_VER:C/[0-9]*//} == "p") +. elif (${_WANT_MYSQL_VER:C/[0-9]*//} == "p") _WANT_MYSQL_FLAVOUR= percona -.else +. else _WANT_MYSQL_FLAVOUR= mysql -.endif -.endif -.endif # !empty(mysql_ARGS) +. endif +. endif +. endif # !empty(mysql_ARGS) -.if defined(DEFAULT_MYSQL_VER) +. if defined(DEFAULT_MYSQL_VER) WARNING+= "DEFAULT_MYSQL_VER is defined, consider using DEFAULT_VERSIONS=mysql=${DEFAULT_MYSQL_VER} instead" -.endif +. endif DEFAULT_MYSQL_VER?= ${MYSQL_DEFAULT:S/.//} # MySQL client version currently supported. # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -.for v in 55 55m 56 56p 56w 100m 101m +. for v in 55 55m 56 56p 56w 100m 101m MYSQL${v}_LIBVER= 18 -.endfor +. endfor MYSQL57_LIBVER= 20 MYSQL57p_LIBVER= 20 MYSQL80_LIBVER= 21 MYSQL102m_LIBVER= 3 MYSQL103m_LIBVER= 3 MYSQL104m_LIBVER= 3 MYSQL105m_LIBVER= 3 MYSQL106m_LIBVER= 3 # Setting/finding MySQL version we want. -.if exists(${LOCALBASE}/bin/mysql) +. if exists(${LOCALBASE}/bin/mysql) _MYSQL!= ${LOCALBASE}/bin/mysql_config --version | ${SED} -e 's/\([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/' _PERCONA!= ${LOCALBASE}/bin/mysql --version | ${GREP} Percona | wc -l _MARIADB!= ${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l -.if ${_PERCONA} == 1 +. if ${_PERCONA} == 1 _MYSQL_VER= ${_MYSQL}p _MYSQL_FLAVOUR= percona -.elif ${_MARIADB} == 1 +. elif ${_MARIADB} == 1 _MYSQL_VER= ${_MYSQL}m _MYSQL_FLAVOUR= mariadb -.else +. else _MYSQL_VER= ${_MYSQL} _MYSQL_FLAVOUR= mysql -.endif -.endif +. endif +. endif -.if defined(_WANT_MYSQL_VER) -.if defined(WITH_MYSQL_VER) && (${WITH_MYSQL_VER:C/[0-9]*//} == "m") +. if defined(_WANT_MYSQL_VER) +. if defined(WITH_MYSQL_VER) && (${WITH_MYSQL_VER:C/[0-9]*//} == "m") WITH_MYSQL_FLAVOUR= mariadb -.elif defined(WITH_MYSQL_VER) && (${WITH_MYSQL_VER:C/[0-9]*//} == "p") +. elif defined(WITH_MYSQL_VER) && (${WITH_MYSQL_VER:C/[0-9]*//} == "p") WITH_MYSQL_FLAVOUR= percona -.else +. else WITH_MYSQL_FLAVOUR= mysql -.endif -.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${_WANT_MYSQL_VER} +. endif +. if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${_WANT_MYSQL_VER} IGNORE= cannot install: the port wants ${_WANT_MYSQL_FLAVOUR}${_WANT_MYSQL_VER:C/[mpw]//}-client and you try to install ${WITH_MYSQL_FLAVOUR}${WITH_MYSQL_VER:C/[mpw]//}-client -.endif +. endif MYSQL_VER= ${_WANT_MYSQL_VER} -.elif defined(WITH_MYSQL_VER) +. elif defined(WITH_MYSQL_VER) MYSQL_VER= ${WITH_MYSQL_VER} -.else -.if defined(_MYSQL_VER) +. else +. if defined(_MYSQL_VER) MYSQL_VER= ${_MYSQL_VER} -.else +. else MYSQL_VER= ${DEFAULT_MYSQL_VER} -.endif -.endif # _WANT_MYSQL_VER +. endif +. endif # _WANT_MYSQL_VER -.if ${MYSQL_VER:C/[0-9]*//} == "m" +. if ${MYSQL_VER:C/[0-9]*//} == "m" MYSQL_FLAVOUR= mariadb -.elif ${MYSQL_VER:C/[0-9]*//} == "p" +. elif ${MYSQL_VER:C/[0-9]*//} == "p" MYSQL_FLAVOUR= percona -.else +. else MYSQL_FLAVOUR= mysql -.endif +. endif -.if defined(_MYSQL_VER) -.if ${_MYSQL_VER} != ${MYSQL_VER} +. if defined(_MYSQL_VER) +. if ${_MYSQL_VER} != ${MYSQL_VER} IGNORE= cannot install: MySQL versions mismatch: ${_MYSQL_FLAVOUR}${_MYSQL_VER:C/[mpw]//}-client is installed and wanted version is ${MYSQL_FLAVOUR}${MYSQL_VER:C/[mpw]//}-client -.endif -.endif +. endif +. endif _MYSQL_SHLIB= libmysqlclient -.if (${MYSQL_VER:C/[0-9]*//} == "m") +. if (${MYSQL_VER:C/[0-9]*//} == "m") _MYSQL_SERVER_FLAVOUR= mariadb _MYSQL_CLIENT_FLAVOUR= mariadb -. if ${MYSQL_VER:C/m//} >= 102 +. if ${MYSQL_VER:C/m//} >= 102 _MYSQL_SHLIB= libmariadb -. endif -.elif (${MYSQL_VER:C/[0-9]*//} == "p") +. endif +. elif (${MYSQL_VER:C/[0-9]*//} == "p") _MYSQL_SERVER_FLAVOUR= percona _MYSQL_CLIENT_FLAVOUR= percona -.elif (${MYSQL_VER:C/[0-9]*//} == "w") +. elif (${MYSQL_VER:C/[0-9]*//} == "w") _MYSQL_SERVER_FLAVOUR= mysqlwsrep _MYSQL_CLIENT_FLAVOUR= mysql -.else +. else _MYSQL_SERVER_FLAVOUR= mysql _MYSQL_CLIENT_FLAVOUR= mysql -.endif +. endif _MYSQL_CLIENT= databases/${_MYSQL_CLIENT_FLAVOUR}${MYSQL_VER:C/[mp]//}-client _MYSQL_SERVER= databases/${_MYSQL_SERVER_FLAVOUR}${MYSQL_VER:C/[mp]//}-server # And now we are checking if we can use it -.if defined(MYSQL${MYSQL_VER}_LIBVER) -.if defined(IGNORE_WITH_MYSQL) -. for VER in ${IGNORE_WITH_MYSQL} -. if (${MYSQL_VER} == "${VER}") +. if defined(MYSQL${MYSQL_VER}_LIBVER) +. if defined(IGNORE_WITH_MYSQL) +. for VER in ${IGNORE_WITH_MYSQL} +. if (${MYSQL_VER} == "${VER}") IGNORE= cannot install: does not work with MySQL version ${MYSQL_VER} (MySQL ${IGNORE_WITH_MYSQL} not supported) -. endif -. endfor -.endif # IGNORE_WITH_MYSQL -.if defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED) +. endif +. endfor +. endif # IGNORE_WITH_MYSQL +. if defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED) RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER} -.if defined(_WANT_MYSQL_EMBEDDED) +. if defined(_WANT_MYSQL_EMBEDDED) BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER} -.endif -.endif -.if defined(_WANT_MYSQL_CLIENT) || \ +. endif +. endif +. if defined(_WANT_MYSQL_CLIENT) || \ !(defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED)) LIB_DEPENDS+= ${_MYSQL_SHLIB}.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT} -.endif -.else +. endif +. else IGNORE= cannot install: unknown MySQL version: ${MYSQL_VER} -.endif # Check for correct libs +. endif # Check for correct libs .endif diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk index c89ad90ff3cb..23b5c0216fa3 100644 --- a/Mk/Uses/ncurses.mk +++ b/Mk/Uses/ncurses.mk @@ -1,93 +1,93 @@ # handle dependency on the ncurses port # # Feature: ncurses # Usage: USES=ncurses # Valid ARGS: base port # # use/port can now set this options to the makefiles # NCURSES_RPATH= yes - pass RFLAGS options to CFLAGS # # Overridable defaults: # NCURSES_PORT= devel/ncurses # # The makefile sets the following variables: # NCURSESBASE - "/usr" or ${LOCALBASE} # NCURSESLIB - path to the libs # NCURSESINC - path to the matching includes # NCURSESRPATH - rpath for dynamic linker # # BUILD_DEPENDS - are added if needed # RUN_DEPENDS - are added if needed # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_NCURSES_MK) _INCLUDE_USES_NCURSES_MK= yes -.if empty(ncurses_ARGS) -. if !exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) && exists(${DESTDIR}/usr/lib/libncursesw.so) +. if empty(ncurses_ARGS) +. if !exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) && exists(${DESTDIR}/usr/lib/libncursesw.so) ncurses_ARGS= base -. else +. else ncurses_ARGS= port +. endif . endif -.endif -.if ${ncurses_ARGS} == base +. if ${ncurses_ARGS} == base NCURSESBASE= /usr NCURSESINC= ${NCURSESBASE}/include -. if exists(${LOCALBASE}/lib/libncurses.so) +. if exists(${LOCALBASE}/lib/libncurses.so) _USES_sanity+= 400:check-depends-ncurses check-depends-ncurses: @${ECHO_CMD} "Dependency error: this port wants the ncurses library from the FreeBSD" @${ECHO_CMD} "base system. You can't build against it, while a newer" @${ECHO_CMD} "version is installed by a port." @${ECHO_CMD} "Please deinstall the port or undefine WITH_NCURSES_BASE." @${FALSE} -. endif +. endif -.elif ${ncurses_ARGS} == port +. elif ${ncurses_ARGS} == port NCURSESBASE= ${LOCALBASE} NCURSESINC= ${LOCALBASE}/include/ncurses -. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) +. if !defined(NCURSES_PORT) && exists(${DESTDIR}/${LOCALBASE}/lib/libncurses.so) PKG_DBDIR?= ${DESTDIR}/var/db/pkg -. if defined(DESTDIR) +. if defined(DESTDIR) PKGARGS= -c ${DESTDIR} -. endif +. endif PKGARGS?= NCURSES_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libncurses.so || : -. endif +. endif NCURSES_INSTALLED?= -.if ${NCURSES_INSTALLED} != "" +. if ${NCURSES_INSTALLED} != "" NCURSES_PORT= ${NCURSES_INSTALLED} NCURSES_SHLIBFILE!= ${PKG_INFO} -ql ${NCURSES_INSTALLED} | grep -m 1 "^`${PKG_QUERY} "%p" ${NCURSES_INSTALLED}`/lib/libncurses.so." NCURSES_SHLIBVER?= ${NCURSES_SHLIBFILE:E} -.endif +. endif NCURSES_PORT?= devel/ncurses NCURSES_SHLIBVER?= 6 BUILD_DEPENDS+= ${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PORT} RUN_DEPENDS+= ${LOCALBASE}/lib/libncurses.so.${NCURSES_SHLIBVER}:${NCURSES_PORT} NCURSESRPATH= ${NCURSESBASE}/lib TINFO_LIB= -ltinfo NCURSES_LIB= -lncurses -.if defined(NCURSES_RPATH) +. if defined(NCURSES_RPATH) CFLAGS+= -Wl,-rpath,${NCURSESRPATH} -.endif +. endif LDFLAGS+= -Wl,-rpath=${NCURSESRPATH} -.else +. else .error USES=ncurses only accept 'port' and 'base' as arguments, got ${ncurses_ARGS} -.endif +. endif NCURSESLIB= ${NCURSESBASE}/lib NCURSES_IMPL?= ncursesw TINFO_LIB?= -ltinfow NCURSES_LIB?= -lncursesw NCURSESLIBS= ${NCURSES_LIB} ${TINFO_LIB} .endif diff --git a/Mk/Uses/ninja.mk b/Mk/Uses/ninja.mk index ce9a92af666e..5c78cf152d07 100644 --- a/Mk/Uses/ninja.mk +++ b/Mk/Uses/ninja.mk @@ -1,78 +1,78 @@ # Provide support to use Ninja # # Feature: ninja # Usage: USES=ninja # Valid ARGS: build, make (default), run # # build add a build dependency on ninja # make use ninja for the build instead of make, implies "build" # run add a run dependency on ninja # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_NINJA_MK) _INCLUDE_USES_NINJA_MK= yes _valid_ARGS= build make run -.for _arg in ${ninja_ARGS} +. for _arg in ${ninja_ARGS} . if empty(_valid_ARGS:M${_arg}) IGNORE= 'USES+= ninja:${ninja_ARGS}' usage: argument [${_arg}] is not recognized . endif -.endfor +. endfor -.if empty(ninja_ARGS) +. if empty(ninja_ARGS) ninja_ARGS+= make -.endif +. endif -.if ${ninja_ARGS:Mmake} +. if ${ninja_ARGS:Mmake} ninja_ARGS+= build -.endif +. endif -.if ${NINJA_DEFAULT} == ninja +. if ${NINJA_DEFAULT} == ninja NINJA_CMD= ninja _NINJA_PORT= devel/ninja -.elif ${NINJA_DEFAULT} == samurai +. elif ${NINJA_DEFAULT} == samurai NINJA_CMD= samu _NINJA_PORT= devel/samurai MAKE_ENV+= SAMUFLAGS="-v -j${MAKE_JOBS_NUMBER}" -. if ${ninja_ARGS:Mbuild} && !${BINARY_ALIAS:U:Mninja=*} +. if ${ninja_ARGS:Mbuild} && !${BINARY_ALIAS:U:Mninja=*} # Cmake and Meson have native support for Samurai and detect and # use it when Ninja is not available in the build environment. The # alias is needed for other ports which call Ninja directly and do # not fall back to Samurai. There should be no harm in providing it # generally. BINARY_ALIAS+= ninja=samu -. endif -.else +. endif +. else IGNORE= invalid DEFAULT_VERSIONS+=ninja=${NINJA_DEFAULT} -.endif +. endif -.if ${ninja_ARGS:Mbuild} +. if ${ninja_ARGS:Mbuild} BUILD_DEPENDS+= ${NINJA_CMD}:${_NINJA_PORT} # Humanize build log and include percentage of completed jobs %p in it. # See samu(1) or the Ninja manual. MAKE_ENV+= NINJA_STATUS="[%p %s/%t] " -.endif +. endif -.if ${ninja_ARGS:Mmake} -. if ${NINJA_DEFAULT} == ninja +. if ${ninja_ARGS:Mmake} +. if ${NINJA_DEFAULT} == ninja # samu does not support GNU-style args, so we cannot just append # -v last. samu gets this via SAMUFLAGS above but ninja does not # support an equivalent environment variable. MAKE_ARGS+= -v -. endif +. endif CMAKE_ARGS+= -GNinja MAKEFILE= MAKE_CMD= ${NINJA_CMD} MAKE_FLAGS= # Set a minimal job of 1 _MAKE_JOBS= -j${MAKE_JOBS_NUMBER} _DESTDIR_VIA_ENV= yes -.endif +. endif -.if ${ninja_ARGS:Mrun} +. if ${ninja_ARGS:Mrun} RUN_DEPENDS+= ${NINJA_CMD}:${_NINJA_PORT} -.endif +. endif .endif diff --git a/Mk/Uses/nodejs.mk b/Mk/Uses/nodejs.mk index 23aad97fa580..a54751b1b4dd 100644 --- a/Mk/Uses/nodejs.mk +++ b/Mk/Uses/nodejs.mk @@ -1,58 +1,58 @@ # Provide support for NodeJS # # Feature: nodejs # Usage: USES=nodejs or USES=nodejs:args # Valid ARGS: build and/or run # version: lts, current, 14, 16, 17 # Default is: build,run # Note: if you define a version, you must provide run and/or build # # MAINTAINER: bhughes@FreeBSD.org .if !defined(_INCLUDE_USES_NODEJS_MK) _INCLUDE_USES_NODEJS_MK= yes _VALID_NODEJS_VERSION= 14 16 17 lts current _NODEJS_VERSION_SUFFIX= ${NODEJS_DEFAULT} -.if ! ${_VALID_NODEJS_VERSION:M${_NODEJS_VERSION_SUFFIX}} +. if ! ${_VALID_NODEJS_VERSION:M${_NODEJS_VERSION_SUFFIX}} IGNORE= Invalid nodejs default version ${_NODEJS_VERSION_SUFFIX}; valid versions are ${_VALID_NODEJS_VERSION} -.endif +. endif -.if empty(nodejs_ARGS) +. if empty(nodejs_ARGS) nodejs_ARGS= build,run -.endif +. endif -. if ${nodejs_ARGS:M14} +. if ${nodejs_ARGS:M14} _NODEJS_VERSION_SUFFIX= 14 -. elif ${nodejs_ARGS:M16} +. elif ${nodejs_ARGS:M16} _NODEJS_VERSION_SUFFIX= 16 -. elif ${nodejs_ARGS:Mlts} +. elif ${nodejs_ARGS:Mlts} _NODEJS_VERSION_SUFFIX= lts -. elif ${nodejs_ARGS:M17} +. elif ${nodejs_ARGS:M17} _NODEJS_VERSION_SUFFIX= 17 -. elif ${nodejs_ARGS:Mcurrent} +. elif ${nodejs_ARGS:Mcurrent} _NODEJS_VERSION_SUFFIX= current -. elif defined(NODEJS_DEFAULT) -. endif +. elif defined(NODEJS_DEFAULT) +. endif # The nodejs 17 version is named www/node -. if ${_NODEJS_VERSION_SUFFIX:Mcurrent} +. if ${_NODEJS_VERSION_SUFFIX:Mcurrent} _NODEJS_VERSION_SUFFIX= -. endif -. if ${_NODEJS_VERSION_SUFFIX:M17} +. endif +. if ${_NODEJS_VERSION_SUFFIX:M17} _NODEJS_VERSION_SUFFIX= -. endif +. endif # The nodejs LTS is version 16 -. if ${_NODEJS_VERSION_SUFFIX:Mlts} +. if ${_NODEJS_VERSION_SUFFIX:Mlts} _NODEJS_VERSION_SUFFIX= 16 -. endif +. endif -. if ${nodejs_ARGS:M*run*} +. if ${nodejs_ARGS:M*run*} RUN_DEPENDS+= node:www/node${_NODEJS_VERSION_SUFFIX} -. endif -. if ${nodejs_ARGS:M*build*} +. endif +. if ${nodejs_ARGS:M*build*} BUILD_DEPENDS+= node:www/node${_NODEJS_VERSION_SUFFIX} -. endif +. endif .endif diff --git a/Mk/Uses/objc.mk b/Mk/Uses/objc.mk index 5b055b629998..eed7585b8488 100644 --- a/Mk/Uses/objc.mk +++ b/Mk/Uses/objc.mk @@ -1,80 +1,80 @@ # Objective C support # # Feature: objc # Usage: USES=objc # # MAINTAINER: objc@FreeBSD.org .if !defined(_INCLUDE_USES_OBJC_MK) _INCLUDE_USES_OBJC_MK= yes OBJC_CLANG_VERSION=70 objc_ARGS?= -.if !empty(objc_ARGS) && ! ${objc_ARGS:Mcompiler} +. if !empty(objc_ARGS) && ! ${objc_ARGS:Mcompiler} IGNORE= USES=objc only accepts no arguments or 'compiler' -.endif +. endif _CC_hash:= ${CC:hash} -.if defined(_OBJC_CCVERSION_${_CC_hash}) +. if defined(_OBJC_CCVERSION_${_CC_hash}) _CCVERSION= ${_OBJC_CCVERSION_${_CC_hash}} -.else +. else _CCVERSION!= ${CC} --version _OBJC_CCVERSION_${_CC_hash}= ${_CCVERSION} PORTS_ENV_VARS+= _OBJC_CCVERSION_${_CC_hash} -.endif +. endif COMPILER_VERSION= ${_CCVERSION:M[0-9]*.[0-9]*:[1]:C/([0-9]+)\.([0-9]+)\..*/\1\2/} -.if ${_CCVERSION:Mclang} +. if ${_CCVERSION:Mclang} COMPILER_TYPE= clang -.else +. else COMPILER_TYPE= gcc -.endif +. endif ALT_COMPILER_VERSION= 0 ALT_COMPILER_TYPE= none _ALTCCVERSION= none -.if defined(_OBJC_ALTCCVERSION_${_CC_hash}) +. if defined(_OBJC_ALTCCVERSION_${_CC_hash}) _ALTCCVERSION= ${_OBJC_ALTCCVERSION_${_CC_hash}} -.else -.if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) +. else +. if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) _ALTCCVERSION!= /usr/bin/clang --version -.elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) +. elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) _ALTCCVERSION!= /usr/bin/gcc --version -.endif +. endif _OBJC_ALTCCVERSION_${_CC_hash}= ${_ALTCCVERSION} PORTS_ENV_VARS+= _OBJC_ALTCCVERSION_${_CC_hash} -.endif +. endif ALT_COMPILER_VERSION= ${_ALTCCVERSION:M[0-9]*.[0-9]*:[1]:C/([0-9]+)\.([0-9]+)\..*/\1\2/} -.if ${_ALTCCVERSION:Mclang} +. if ${_ALTCCVERSION:Mclang} ALT_COMPILER_TYPE= clang -.elif !empty(_ALTCCVERSION) +. elif !empty(_ALTCCVERSION) ALT_COMPILER_TYPE= gcc -.endif +. endif # We do always need clang and prefer a recent version -.if (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < ${OBJC_CLANG_VERSION}) || ${COMPILER_TYPE} != clang -.if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= ${OBJC_CLANG_VERSION} +. if (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < ${OBJC_CLANG_VERSION}) || ${COMPILER_TYPE} != clang +. if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= ${OBJC_CLANG_VERSION} CC= /usr/bin/clang CPP= /usr/bin/clang-cpp CXX= /usr/bin/clang++ OBJC_LLD= lld -.else +. else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${OBJC_CLANG_VERSION}:devel/llvm${OBJC_CLANG_VERSION} CPP= ${LOCALBASE}/bin/clang-cpp${OBJC_CLANG_VERSION} CC= ${LOCALBASE}/bin/clang${OBJC_CLANG_VERSION} CXX= ${LOCALBASE}/bin/clang++${OBJC_CLANG_VERSION} OBJC_LLD= lld${OBJC_CLANG_VERSION} -.endif -.endif +. endif +. endif -.if ! ${objc_ARGS:Mcompiler} +. if ! ${objc_ARGS:Mcompiler} LIB_DEPENDS+= libobjc.so.4.6:lang/libobjc2 OBJCFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -.endif +. endif CONFIGURE_ENV+= OBJC="${CC}" OBJCFLAGS="${OBJCFLAGS}" MAKE_ENV+= OBJC="${CC}" OBJCFLAGS="${OBJCFLAGS}" .endif diff --git a/Mk/Uses/openal.mk b/Mk/Uses/openal.mk index 38b2dd8043fd..ff91a4afda74 100644 --- a/Mk/Uses/openal.mk +++ b/Mk/Uses/openal.mk @@ -1,28 +1,28 @@ # Handle dependency on OpenAL # # Feature: openal # Usage: USES=openal or USES=openal:ARGS # Valid ARGS: al, soft (default), alut # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_OPENAL_MK) _INCLUDE_USES_OPENAL_MK= yes -.if empty(openal_ARGS) +. if empty(openal_ARGS) openal_ARGS= soft -.endif +. endif -.if !empty(openal_ARGS:Nal:Nsoft:Nalut) +. if !empty(openal_ARGS:Nal:Nsoft:Nalut) IGNORE= has unknown USES=openal arguments: ${openal_ARGS:Nal:Nsoft:Nalut} -.endif +. endif _OPENAL_al_DEPENDS= libopenal.so.1:audio/openal-soft _OPENAL_soft_DEPENDS= libopenal.so.1:audio/openal-soft _OPENAL_alut_DEPENDS= libalut.so.0:audio/freealut -.for _arg in ${openal_ARGS} +. for _arg in ${openal_ARGS} LIB_DEPENDS+= ${_OPENAL_${_arg}_DEPENDS} -.endfor +. endfor .endif diff --git a/Mk/Uses/pathfix.mk b/Mk/Uses/pathfix.mk index e18017933e18..59629f915d8c 100644 --- a/Mk/Uses/pathfix.mk +++ b/Mk/Uses/pathfix.mk @@ -1,61 +1,61 @@ # Lookup common paths in Makefile.in, configure and similar files, and replace # their values to respect FreeBSD hier(7) for file installation. # # Feature: pathfix # Usage: USES=pathfix # Valid ARGS: does not require args # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_PATHFIX_MK) _INCLUDE_USES_PATHFIX_MK= yes -.if !empty(pathfix_ARGS) +. if !empty(pathfix_ARGS) IGNORE= USES=pathfix does not require args -.endif +. endif PATHFIX_CMAKELISTSTXT?= CMakeLists.txt -.if ${USES:Mautoreconf*} +. if ${USES:Mautoreconf*} PATHFIX_MAKEFILEIN?= Makefile.am Makefile.in -.else +. else PATHFIX_MAKEFILEIN?= Makefile.in -.endif +. endif PATHFIX_WRKSRC?= ${WRKSRC} _USES_patch+= 190:pathfix pathfix: -.if ${USES:Mcmake*} -.for file in ${PATHFIX_CMAKELISTSTXT} +. if ${USES:Mcmake*} +. for file in ${PATHFIX_CMAKELISTSTXT} @${FIND} ${PATHFIX_WRKSRC} -name "${file}" -type f | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} -e \ 's|[{]CMAKE_INSTALL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]CMAKE_INSTALL_DATAROOTDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]INSTALL_LIB_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]INSTALL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]LIB_DESTINATION[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]LIB_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]LIB_INSTALL_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]KDE_INSTALL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]LIBRARY_INSTALL_DIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|[{]libdir[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ s|lib/pkgconfig|libdata/pkgconfig|g' -.endfor -.else -.for file in ${PATHFIX_MAKEFILEIN} +. endfor +. else +. for file in ${PATHFIX_MAKEFILEIN} @${FIND} ${PATHFIX_WRKSRC} -name "${file}" -type f | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} -e \ 's|[(]libdir[)]/locale|(prefix)/share/locale|g ; \ s|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[(]LIBDIR[)]/pkgconfig|(PREFIX)/libdata/pkgconfig|g ; \ s|@libdir@/locale|@prefix@/share/locale|g ; \ s|@libdir@/pkgconfig|@prefix@/libdata/pkgconfig|g ; \ s|[{]libdir[}]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[{]LIBDIR[}]/pkgconfig|(PREFIX)/libdata/pkgconfig|g ; \ s|[(]datadir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[{]datadir[}]/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[(]prefix[)]/lib/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[(]prefix[)]/share/pkgconfig|(prefix)/libdata/pkgconfig|g ; \ s|[[:<:]]lib/pkgconfig|libdata/pkgconfig|g; \ s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g' -.endfor -.endif +. endfor +. endif .endif diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk index 586c8aa95cab..d885e1d37654 100644 --- a/Mk/Uses/perl5.mk +++ b/Mk/Uses/perl5.mk @@ -1,340 +1,340 @@ # Provide support to use perl5 # # PERL5 - Set to full path of perl5, either in the system or # installed from a port. # PERL - Set to full path of perl5, either in the system or # installed from a port, but without the version number. # Use this if you need to replace "#!" lines in scripts. # PERL_VERSION - Full version of perl5 (see below for current value). # # PERL_VER - Short version of perl5 (major.minor without patchlevel) # # PERL_LEVEL - Perl version as an integer of the form MNNNPP, where # M is major version, N is minor version, and P is # the patch level. E.g., PERL_VERSION=5.14.4 would give # a PERL_LEVEL of 501404. This can be used in comparisons # to determine if the version of perl is high enough, # whether a particular dependency is needed, etc. # PERL_ARCH - Directory name of architecture dependent libraries # (value: mach). # PERL_PORT - Name of the perl port that is installed # (for example: perl5.24) # SITE_PERL - Directory name where site specific perl packages go. # This value is added to PLIST_SUB. # SITE_ARCH - Directory name where arch site specific perl packages go. # This value is added to PLIST_SUB. # USE_PERL5 - If set, this port uses perl5 in one or more of the extract, # patch, build, run or test phases. # It can also have configure, modbuild and modbuildtiny when # the port needs to run Makefile.PL, Build.PL and a # Module::Build::Tiny flavor of Build.PL. # # MAINTAINER: perl@FreeBSD.org .if !defined(_INCLUDE_USES_PERL5_MK) _INCLUDE_USES_PERL5_MK= yes . if !empty(perl5_ARGS) IGNORE= Incorrect 'USES+=perl5:${perl5_ARGS}' perl5 takes no arguments . endif USE_PERL5?= run build # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -. if ${PERL5_DEFAULT} == 5.30 +. if ${PERL5_DEFAULT} == 5.30 .include "${PORTSDIR}/lang/perl5.30/version.mk" -. elif ${PERL5_DEFAULT} == 5.32 +. elif ${PERL5_DEFAULT} == 5.32 .include "${PORTSDIR}/lang/perl5.32/version.mk" -. elif ${PERL5_DEFAULT} == 5.34 +. elif ${PERL5_DEFAULT} == 5.34 .include "${PORTSDIR}/lang/perl5.34/version.mk" -. elif ${PERL5_DEFAULT} == devel +. elif ${PERL5_DEFAULT} == devel .include "${PORTSDIR}/lang/perl5-devel/version.mk" # Force PERL_PORT here in case two identical PERL_VERSION. PERL_PORT?= perl5-devel -. else +. else IGNORE= Invalid perl5 version ${PERL5_DEFAULT} -. endif +. endif PERL_VER?= ${PERL_VERSION:C/\.[0-9]+$//} . if !defined(PERL_LEVEL) && defined(PERL_VERSION) perl_major= ${PERL_VERSION:C|^([1-9]+).*|\1|} _perl_minor= 00${PERL_VERSION:C|^([1-9]+)\.([0-9]+).*|\2|} perl_minor= ${_perl_minor:C|^.*(...)|\1|} . if ${perl_minor} >= 100 perl_minor= ${PERL_VERSION:C|^([1-9]+)\.([0-9][0-9][0-9]).*|\2|} perl_patch= ${PERL_VERSION:C|^.*(..)|\1|} . else # ${perl_minor} < 100 _perl_patch= 0${PERL_VERSION:C|^([1-9]+)\.([0-9]+)\.*|0|} perl_patch= ${_perl_patch:C|^.*(..)|\1|} . endif # ${perl_minor} < 100 PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch} . else PERL_LEVEL=0 . endif # !defined(PERL_LEVEL) && defined(PERL_VERSION) PERL_ARCH?= mach # there must always be a default to prevent dependency failures such # as "ports/lang: not found". Also, perl5-devel is taken care in the # perl5_default file, or up there in the default versions selection. # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . if ${PERL_LEVEL} >= 503400 PERL_PORT?= perl5.34 . elif ${PERL_LEVEL} >= 503200 PERL_PORT?= perl5.32 . else # ${PERL_LEVEL} < 503200 PERL_PORT?= perl5.30 . endif SITE_PERL_REL?= lib/perl5/site_perl SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL} SITE_ARCH_REL?= ${SITE_PERL_REL}/${PERL_ARCH}/${PERL_VER} SITE_ARCH?= ${LOCALBASE}/${SITE_ARCH_REL} SITE_MAN3_REL?= ${SITE_PERL_REL}/man/man3 SITE_MAN3?= ${PREFIX}/${SITE_MAN3_REL} SITE_MAN1_REL?= ${SITE_PERL_REL}/man/man1 SITE_MAN1?= ${PREFIX}/${SITE_MAN1_REL} PERL5?= ${LOCALBASE}/bin/perl${PERL_VERSION} PERL?= ${LOCALBASE}/bin/perl CONFIGURE_ENV+= ac_cv_path_PERL=${PERL} ac_cv_path_PERL_PATH=${PERL} \ PERL_USE_UNSAFE_INC=1 MAKE_ENV+= PERL_USE_UNSAFE_INC=1 QA_ENV+= SITE_ARCH_REL=${SITE_ARCH_REL} LIBPERL=libperl.so.${PERL_VER} # Define the want perl first if defined . if ${USE_PERL5:M5*} want_perl_sign= ${USE_PERL5:M5*:C|^[0-9.]+||} want_perl_ver= ${USE_PERL5:M5*:S|${want_perl_sign}$||} want_perl_major= ${want_perl_ver:C|\..*||} _want_perl_minor= ${want_perl_ver:S|^${want_perl_major}||:S|^.||:C|\..*||} _want_perl_patch= ${want_perl_ver:S|^${want_perl_major}||:S|^.${_want_perl_minor}||:S|^.||:C|\..*||} want_perl_minor= ${_want_perl_minor:S|^|000|:C|.*(...)|\1|} want_perl_patch= ${_want_perl_patch:S|^|00|:C|.*(..)|\1|} USE_PERL5_LEVEL= ${want_perl_major}${want_perl_minor}${want_perl_patch} . endif # All but version _USE_PERL5= ${USE_PERL5:N5*} # Mask unspecified components. E.g. this way "5" will match any "5.x.x". . if empty(_want_perl_minor) masked_PERL_LEVEL= ${PERL_LEVEL:C|(.....)$|00000|} . elif empty(_want_perl_patch) masked_PERL_LEVEL= ${PERL_LEVEL:C|(..)$|00|} . else masked_PERL_LEVEL= ${PERL_LEVEL} . endif . if defined(want_perl_sign) . if ${want_perl_sign} == "+" . if ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} USE_PERL5_REASON?= requires Perl ${want_perl_ver} or later, install lang/perl${want_perl_major}.${want_perl_minor:C|^0||} and try again IGNORE= ${USE_PERL5_REASON} . endif # ${USE_PERL5_LEVEL} > ${masked_PERL_LEVEL} . elif ${want_perl_sign} == "" . if ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} USE_PERL5_REASON?= requires Perl ${want_perl_ver} exactly IGNORE= ${USE_PERL5_REASON} . endif # ${USE_PERL5_LEVEL} != ${masked_PERL_LEVEL} . elif ${want_perl_sign} == "-" . if ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} USE_PERL5_REASON?= requires a Perl version earlier than ${want_perl_ver} IGNORE= ${USE_PERL5_REASON} . endif # ${USE_PERL5_LEVEL} <= ${masked_PERL_LEVEL} . else # wrong suffix IGNORE= improper use of USE_PERL5 . endif . endif _USE_PERL5_VALID= build configure extract modbuild modbuildtiny patch run \ test _USE_PERL5_UNKNOWN= . for component in ${_USE_PERL5} . if empty(_USE_PERL5_VALID:M${component}) _USE_PERL5_UNKNOWN+= ${component} . endif . endfor . if !empty(_USE_PERL5_UNKNOWN) IGNORE= has unknown USE_PERL5 components: ${_USE_PERL5_UNKNOWN} . endif _USES_POST+= perl5 . if ${PERL_LEVEL} >= 503100 P5_POD_PARSER= p5-Pod-Parser>=1.63:textproc/p5-Pod-Parser . else P5_POD_PARSER= . endif .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PERL5_POST_MK) _INCLUDE_USES_PERL5_POST_MK= yes PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \ PERL_VER=${PERL_VER} \ PERL5_MAN1=${SITE_MAN1_REL} \ PERL5_MAN3=${SITE_MAN3_REL} \ SITE_PERL=${SITE_PERL_REL} \ SITE_ARCH=${SITE_ARCH_REL} # handle perl5 specific manpages . for sect in 3 . if defined(P5MAN${sect}) _MANPAGES+= ${P5MAN${sect}:S%^%${PREFIX}/lib/perl5/${PERL_VER}/man/man${sect}/%} . endif . endfor MANDIRS+= ${PREFIX}/${SITE_PERL_REL}/man . if ${_USE_PERL5:Mmodbuild} || ${_USE_PERL5:Mmodbuildtiny} _USE_PERL5+= configure ALL_TARGET?= # empty CONFIGURE_ARGS+=--install_path lib="${PREFIX}/${SITE_PERL_REL}" \ --install_path arch="${PREFIX}/${SITE_ARCH_REL}" \ --install_path script="${PREFIX}/bin" \ --install_path bin="${PREFIX}/bin" \ --install_path libdoc="${MAN3PREFIX}/man/man3" \ --install_path bindoc="${MAN1PREFIX}/man/man1" CONFIGURE_SCRIPT?= Build.PL PL_BUILD?= Build CONFIGURE_ARGS+=--destdir ${STAGEDIR} DESTDIRNAME= --destdir . if ${_USE_PERL5:Mmodbuild} CONFIGURE_ARGS+=--perl="${PERL}" . if ${PORTNAME} != Module-Build BUILD_DEPENDS+= p5-Module-Build>=0.4206:devel/p5-Module-Build . endif CONFIGURE_ARGS+=--create_packlist 1 . endif . if ${_USE_PERL5:Mmodbuildtiny} . if ${PORTNAME} != Module-Build-Tiny BUILD_DEPENDS+= p5-Module-Build-Tiny>=0.039:devel/p5-Module-Build-Tiny . endif CONFIGURE_ARGS+=--create_packlist 1 . endif . elif ${_USE_PERL5:Mconfigure} CONFIGURE_ARGS+=INSTALLDIRS="site" . endif # modbuild . if ${_USE_PERL5:Mconfigure} _USE_PERL5+= build run # Disable AutoInstall from attempting to install from CPAN directly in # the case of missing dependencies. This causes the build to loop on # the build cluster asking for interactive input. CONFIGURE_ENV+= PERL_EXTUTILS_AUTOINSTALL="--skipdeps" . if defined(BATCH) && !defined(IS_INTERACTIVE) CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES" . endif # defined(BATCH) && !defined(IS_INTERACTIVE) . endif # configure . if ${_USE_PERL5:Mextract} EXTRACT_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mpatch} PATCH_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mbuild} BUILD_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mrun} RUN_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mtest} TEST_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} . endif . if ${_USE_PERL5:Mconfigure} CONFIGURE_ARGS+= CC="${CC}" CCFLAGS="${CFLAGS}" LD="${CC}" PREFIX="${PREFIX}" \ INSTALLPRIVLIB="${PREFIX}/lib" INSTALLARCHLIB="${PREFIX}/lib" CONFIGURE_SCRIPT?= Makefile.PL MAN3PREFIX?= ${PREFIX}/${SITE_PERL_REL} MAN1PREFIX?= ${PREFIX}/${SITE_PERL_REL} .undef HAS_CONFIGURE . if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \ fi @cd ${CONFIGURE_WRKSRC} && \ ${SETENV} ${CONFIGURE_ENV} \ ${PERL5} ${CONFIGURE_CMD} ${CONFIGURE_ARGS} . if !${_USE_PERL5:Mmodbuild*} @cd ${CONFIGURE_WRKSRC} && \ ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile . endif # ! modbuild . endif # !target(do-configure) . endif # configure . if ${_USE_PERL5:Mmodbuild*} . if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) . endif # !target(do-build) . if !${USES:Mgmake} . if !target(do-install) do-install: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) . endif # !target(do-install) . endif # ! USES=gmake . endif # modbuild PACKLIST_DIR?= ${PREFIX}/${SITE_ARCH_REL}/auto # In all those, don't use - before the command so that the user does # not wonder what has been ignored by this message "*** Error code 1 (ignored)" _USES_install+= 560:fix-perl-things fix-perl-things: # Remove STAGEDIR from .packlist and add the file to the plist. @(if [ -d ${STAGEDIR}${PACKLIST_DIR} ] ; then \ ${FIND} ${STAGEDIR}${PACKLIST_DIR} -name .packlist | while read f ; do \ ${SED} -i '' 's|^${STAGEDIR}||' "$$f"; \ ${ECHO_CMD} $$f | ${SED} -e 's|^${STAGEDIR}||' >> ${TMPPLIST}; \ done \ fi) || : # Starting with perl 5.20, the empty bootstrap files are not installed any more # by ExtUtils::MakeMaker. As we don't need them anyway, remove them. # Module::Build continues to install them, so remove the files unconditionally. @${FIND} ${STAGEDIR} -name '*.bs' -size 0 -delete || : # Some ports use their own way of building perl modules and generate # perllocal.pod, remove it here so that those ports don't include it # by mistake in their plists. It is sometime compressed, so use a # shell glob for the removal. Also, remove the directories that # contain it to not leave orphans directories around. @${RM} ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/perllocal.pod* || : @${RMDIR} -p ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH} 2>/dev/null || : # Starting at ExtUtils::MakeMaker 7.06 and Perl 5.25.1, the base README.pod is # no longer manified into a README.3, as the README.pod is installed and can be # read with perldoc, remove the README.3 files that may be generated. @[ -d "${STAGEDIR}${SITE_MAN3}" ] && \ ${FIND} ${STAGEDIR}${SITE_MAN3} -name '*::README.3' -delete || : # Starting at ExtUtils::MakeMaker 7.31_06 and Perl 5.27.1, the base README.pod is # no longer installed. So remove any that can be there. @[ -d "${STAGEDIR}${PREFIX}/${SITE_PERL_REL}" ] && \ ${FIND} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL} -name README.pod -delete || : . if !target(do-test) && (!empty(USE_PERL5:Mmodbuild*) || !empty(USE_PERL5:Mconfigure)) TEST_TARGET?= test TEST_WRKSRC?= ${BUILD_WRKSRC} do-test: . if ${USE_PERL5:Mmodbuild*} @cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${PERL5} ${PL_BUILD} ${TEST_TARGET} ${TEST_ARGS} . elif ${USE_PERL5:Mconfigure} @cd ${TEST_WRKSRC}/ && ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${TEST_ARGS} ${TEST_TARGET} . endif # USE_PERL5:Mmodbuild* . endif # do-test .endif # defined(_POSTMKINCLUDED) diff --git a/Mk/Uses/pgsql.mk b/Mk/Uses/pgsql.mk index 27132d825267..6cfd9a6c0cec 100644 --- a/Mk/Uses/pgsql.mk +++ b/Mk/Uses/pgsql.mk @@ -1,178 +1,178 @@ # Provide support for PostgreSQL (pgsql) # # Feature: pgsql # Usage: USES= pgsql[:version] # # version Maintainer can set versions required. You can set this to # [min]-[max] or min+ or -max or as an explicit version # (eg. 9.3-9.6 for [min]-[max], 9.5+ or 9.6- # for min+ and max-, 9.4 for an explicit version). Example: # # USES=pgsql:9.4 # Only use PostgreSQL 9.4 # USES=pgsql:9.3+ # Use PostgreSQL 9.3 or newer # USES=pgsql:9.3-9.6 # Use PostgreSQL between 9.3 & 9.6 # USES=pgsql:9.6- # Use any PostgreSQL up to 9.6 # USES=pgsql # Use the default PostgreSQL # # WANT_PGSQL= server[:fetch] plperl plpython pltcl # # Add PostgreSQL component dependency, using # WANT_PGSQL= component[:target]. # For the full list use make -V _USE_PGSQL_DEP # If no version is given (by the maintainer via the port or # by the user via defined variable), try to find the # currently installed version. Fall back to default if # necessary. # # MAINTAINER: pgsql@FreeBSD.org .if !defined(_INCLUDE_USES_PGSQL_MK) _INCLUDE_USES_PGSQL_MK= yes # Variables set by pgsql.mk: # # PGSQL_VER # Detected PostgreSQL version. Do *not* use this # to add dependencies; use WANT_PGSQL as explained above # # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. VALID_PGSQL_VER= 10 11 12 13 14 # Override non-default LIBVERS like this: #PGSQL99_LIBVER=6 PGSQL_LIBVER= 5 -.for v in ${VALID_PGSQL_VER:S,.,,} +. for v in ${VALID_PGSQL_VER:S,.,,} PGSQL$v_LIBVER?= ${PGSQL_LIBVER} -.endfor +. endfor -.for v in ${PGSQL_DEFAULT} -. if ! ${VALID_PGSQL_VER:M$v} +. for v in ${PGSQL_DEFAULT} +. if ! ${VALID_PGSQL_VER:M$v} IGNORE= Invalid PGSQL default version ${PGSQL_DEFAULT}; valid versions are ${VALID_PGSQL_VER} -. endif -.endfor +. endif +. endfor . for w in WITH DEFAULT . ifdef $w_PGSQL_VER WARNING+= "$w_PGSQL_VER is defined, consider using DEFAULT_VERSIONS=pgsql=${$w_PGSQL_VER:C,^.,&.,} instead" PGSQL_DEFAULT?= ${$w_PGSQL_VER:C,^.,&.,} . endif . endfor . ifdef DEFAULT_PGSQL_VER && WITH_PGSQL_VER IGNORE= will not allow setting both DEFAULT_PGSQL_VER and WITH_PGSQL_VER. Use DEFAULT_VERSIONS=pgsql=13 instead . endif # Setting/finding PostgreSQL version we want. PG_CONFIG?= ${LOCALBASE}/bin/pg_config . if exists(${PG_CONFIG}) _PGSQL_VER!= ${PG_CONFIG} --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9]\.*[0-9]\).*/\1/p' . endif # Handle the + and - version stuff . if !empty(pgsql_ARGS) . if ${pgsql_ARGS:M*+} . for version in ${VALID_PGSQL_VER} . if ${pgsql_ARGS:S/+//} <= ${version} _WANT_PGSQL_VER+=${version} . endif . endfor . elif ${pgsql_ARGS:M*-} . for version in ${VALID_PGSQL_VER} . if ${pgsql_ARGS:S/-//} >= ${version} _WANT_PGSQL_VER+=${version} . endif . endfor . elif ${pgsql_ARGS:M*-*} _MIN=${pgsql_ARGS:M?*-?*:C,-.*,,} _MAX=${pgsql_ARGS:M?*-?*:C,.*-,,} . if ${_MIN} > ${_MAX} IGNORE= The minimum version must be higher than the maximum version wanted . endif . for version in ${VALID_PGSQL_VER} . if ${_MIN} <= ${version} && ${_MAX} >= ${version} _WANT_PGSQL_VER+= ${version} . endif . endfor . endif _WANT_PGSQL_VER?= ${pgsql_ARGS} . endif # Try to match default version, otherwise just take the first version # that matches. Prefer the installed version if it matches . if !empty(_WANT_PGSQL_VER) . for version in ${_WANT_PGSQL_VER} . if ${PGSQL_DEFAULT} == ${version} PGSQL_VER= ${version} . endif PGSQL_VER?= ${version} . endfor . if defined(_PGSQL_VER) . for v in ${_PGSQL_VER} . if ${_WANT_PGSQL_VER:M$v} == ${_PGSQL_VER} PGSQL_VER= ${_PGSQL_VER} . endif . endfor . endif . if defined(_PGSQL_VER) && ${_PGSQL_VER} != ${PGSQL_VER} IGNORE?= cannot install: the port wants postgresql-client version ${_WANT_PGSQL_VER} and you have version ${_PGSQL_VER} installed . endif . endif # OK, so the port is ambivalent, we'll just take what's on the system. PGSQL_VER?= ${_PGSQL_VER} # After all that, we still have found nothing! . if empty(PGSQL_VER) PGSQL_VER= ${PGSQL_DEFAULT} . endif # We don't want to be :S,.,, the whole time when doing port version checks PGSQL_VER_NODOT= ${PGSQL_VER:S,.,,} # And now we are checking if we can use it -. if defined(PGSQL${PGSQL_VER_NODOT}_LIBVER) +. if defined(PGSQL${PGSQL_VER_NODOT}_LIBVER) # Compat. Please DO NOT use IGNORE_WITH_PGSQL! . if defined(IGNORE_WITH_PGSQL) DEV_WARNING+= "Do not set IGNORE_WITH_PGSQL, use the version argument to USES=pgsql" -. for ver in ${IGNORE_WITH_PGSQL} -. if (${PGSQL_VER} == ${ver}) +. for ver in ${IGNORE_WITH_PGSQL} +. if (${PGSQL_VER} == ${ver}) IGNORE?= cannot install: does not work with postgresql${PGSQL_VER_NODOT}-client (PostgreSQL ${IGNORE_WITH_PGSQL} not supported) -. endif -. endfor +. endif +. endfor . endif # IGNORE_WITH_PGSQL -.if !defined(WANT_PGSQL) || ${WANT_PGSQL:Mlib} +. if !defined(WANT_PGSQL) || ${WANT_PGSQL:Mlib} LIB_DEPENDS+= libpq.so.${PGSQL${PGSQL_VER_NODOT}_LIBVER}:databases/postgresql${PGSQL_VER_NODOT}-client -.endif +. endif _USE_PGSQL_DEP= client contrib docs pgtcl plperl plpython pltcl server _USE_PGSQL_DEP_client= psql _USE_PGSQL_DEP_contrib= vacuumlo _USE_PGSQL_DEP_docs= postgresql${PGSQL_VER_NODOT}-docs>0 _USE_PGSQL_DEP_pgtcl= ${LOCALBASE}/lib/pgtcl/pkgIndex.tcl _USE_PGSQL_DEP_plperl= postgresql${PGSQL_VER_NODOT}-plperl>0 _USE_PGSQL_DEP_plpython=postgresql${PGSQL_VER_NODOT}-plpython>0 _USE_PGSQL_DEP_pltcl= postgresql${PGSQL_VER_NODOT}-pltcl>0 _USE_PGSQL_DEP_server= postgres . if defined(WANT_PGSQL) . for depend in ${_USE_PGSQL_DEP} . if ${WANT_PGSQL:M${depend}} BUILD_DEPENDS+= ${_USE_PGSQL_DEP_${depend}}:databases/postgresql${PGSQL_VER_NODOT}-${depend} RUN_DEPENDS+= ${_USE_PGSQL_DEP_${depend}}:databases/postgresql${PGSQL_VER_NODOT}-${depend} . elif ${WANT_PGSQL:M${depend}\:*} BUILD_DEPENDS+= ${NONEXISTENT}:databases/postgresql${PGSQL_VER_NODOT}-${depend}:${WANT_PGSQL:M${depend}\:*:C,^[^:]*\:,,} . endif . endfor . endif . else IGNORE?= cannot install: unknown PostgreSQL version: ${PGSQL_VER} . endif # Check for correct version CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib .endif # !defined(_INCLUDE_USES_PGSQL_MK) diff --git a/Mk/Uses/php.mk b/Mk/Uses/php.mk index 9940d7fba047..5a3de6c0b62f 100644 --- a/Mk/Uses/php.mk +++ b/Mk/Uses/php.mk @@ -1,489 +1,489 @@ # Support for PHP-based ports. # # Feature: php # Usage: USES=php # Valid ARGS: (none), phpize, ext, zend, build, cli, cgi, mod, web, embed, # pecl, flavors, noflavors # # - phpize : Use to build a PHP extension. # - ext : Use to build, install and register a PHP extension. # - zend : Use to build, install and register a Zend extension. # - build : Set PHP also as a build dependency. # - cli : Want the CLI version of PHP. # - cgi : Want the CGI version of PHP. # - mod : Want the Apache Module for PHP. # - web : Want the Apache Module or the CGI version of PHP. # - embed : Want the embedded library version of PHP. # - pecl : Fetches from PECL. # - flavors : Generates flavors for supported versions. # (implied by phpize,ext,zend,pecl) # - noflavors: Prevents generation of flavor. # # If the port requires a predefined set of PHP extensions, they can be # listed in this way: # # USE_PHP= ext1 ext2 ext3 # # PHP and Zend extensions built with :ext and :zend are automatically enabled # when the port is installed. Each port creates a PHP_EXT_INI_FILE file and # registers the extension in it. # # The PHP_EXT_INI_FILE file has a priority number embeded into its name so that # extensions are loaded in the right order. The priority is defined by # PHP_MOD_PRIO and is a number between 00 and 99. # # For extensions that do not depend on any extension, the priority is # automatically set to 20, for extensions that depend on another extension, the # priority is automatically set to 30. Some extensions may need to be loaded # before everyone else (for example opcache), or after an extension with a # priotity of 30, in that case, add PHP_MOD_PRIO=XX in the port's Makefile. # For example: # # USES= php:ext # USE_PHP= xml # PHP_MOD_PRIO= 40 # # The port can set these options in its Makefile before bsd.port.pre.mk: # # IGNORE_WITH_PHP=N - The port doesn't work with PHP version N. # # BUILD_ONLY_DEFAULT_PHP_FLAVOR - explicitely marks non-default ignored (use in make.conf) # # You may combine multiple php:* arguments. # Don't specify any php:* argument if your port will work with every PHP SAPI. # # If you are building PHP-based ports in poudriere(8) with ZTS enabled, # add WITH_MPM=event to /etc/make.conf to prevent build failures. .if !defined(_INCLUDE_USES_PHP_MK) PHP_Include_MAINTAINER= ale@FreeBSD.org _INCLUDE_USES_PHP_MK= yes _PHP_VALID_ARGS= build cgi cli embed ext flavors mod noflavors pecl \ phpize web zend _PHP_UNKNOWN_ARGS= -.for arg in ${php_ARGS} -. if empty(_PHP_VALID_ARGS:M${arg}) +. for arg in ${php_ARGS} +. if empty(_PHP_VALID_ARGS:M${arg}) _PHP_UNKNOWN_ARGS+= ${arg} -. endif -.endfor -.if !empty(_PHP_UNKNOWN_ARGS) +. endif +. endfor +. if !empty(_PHP_UNKNOWN_ARGS) IGNORE= has unknown USES=php arguments: ${_PHP_UNKNOWN_ARGS} -.endif +. endif . if ${php_ARGS:Mbuild} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) DEV_WARNING+= "USES=php:build is included in USES=php:phpize, USES=php:ext, and USES=php:zend, so it is not needed" . endif . if ${php_ARGS:Mflavors} && ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) DEV_WARNING+= "USES=php:flavors is included in phpize, ext, zend and pecl, so it is not needed." . endif . if ${php_ARGS:Mphpize} && ( ${php_ARGS:Mext} || ${php_ARGS:Mzend} ) DEV_WARNING+= "USES=php:phpize is included in USES=php:ext and USES=php:zend, so it is not needed" . endif . if ${php_ARGS:Mext} && ${php_ARGS:Mzend} DEV_WARNING+= "USES=php:ext is included in USES=php:zend, so it is not needed" . endif . if ${php_ARGS:Mext} && ${php_ARGS:Mpecl} DEV_WARNING+= "USES=php:ext is included in USES=php:pecl, so it is not needed" . endif . if ( ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} || ${php_ARGS:Mpecl} ) && !${php_ARGS:Mnoflavors} php_ARGS+= flavors . endif . if ${php_ARGS:Mnoflavors} && ${php_ARGS:Mflavors} php_ARGS:= ${php_ARGS:Nflavors} . endif . if ${php_ARGS:Mpecl} php_ARGS+= ext . if !defined(USE_GITHUB) EXTRACT_SUFX= .tgz MASTER_SITES= https://pecl.php.net/get/ \ http://pecl.php.net/get/ . endif PKGNAMEPREFIX= ${PECL_PKGNAMEPREFIX} DIST_SUBDIR= PECL . endif PHPBASE?= ${LOCALBASE} _ALL_PHP_VERSIONS= 74 80 81 # Make the already installed PHP the default one. . if exists(${PHPBASE}/etc/php.conf) .include "${PHPBASE}/etc/php.conf" . if !defined(PHP_EXT_DIR) PHP_EXT_DIR!= ${PHPBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${PHPBASE}/lib/php/\(.*\),\1,p' . endif _INSTALLED_PHP_VER:= ${PHP_VER} # If we have an installed version of PHP, and this does not support it, set # IGNORE to fail early as you cannot install two different versions of PHP at # the same time anyway. . if defined(IGNORE_WITH_PHP) && ${IGNORE_WITH_PHP:M${_INSTALLED_PHP_VER}} IGNORE= does not work with PHP versions "${IGNORE_WITH_PHP}" and "${_INSTALLED_PHP_VER}" is installed. . endif . else PHP_VER?= ${PHP_DEFAULT:S/.//} . endif # .if exists(${PHPBASE}/etc/php.conf) -.if defined(BUILD_ONLY_DEFAULT_PHP_FLAVOR) +. if defined(BUILD_ONLY_DEFAULT_PHP_FLAVOR) # Only build php ports of the default flavor _ALL_FLAVOR_VERSIONS= ${PHP_VER} -.else +. else # Use the "default" php version as the first version for flavors, so that it # gets to be the default flavor. _ALL_FLAVOR_VERSIONS= ${PHP_VER} ${_ALL_PHP_VERSIONS:N${PHP_VER}} -.endif +. endif # If we want flavors, fill in FLAVORS with the allowed PHP versions, if some # cannot be used, or all of them if they all can. # Then if there is no flavor set, use the first one as the default. . if ${php_ARGS:Mflavors} . if empty(FLAVORS) . if defined(IGNORE_WITH_PHP) . for _v in ${_ALL_FLAVOR_VERSIONS} . if empty(IGNORE_WITH_PHP:M${_v}) # Avoid a leading space in FLAVORS. . if empty(FLAVORS) FLAVORS:= php${_v} . else FLAVORS:= ${FLAVORS} php${_v} . endif . endif . endfor . else # defined(IGNORE_WITH_PHP) FLAVORS:= ${_ALL_FLAVOR_VERSIONS:S/^/php/} . endif # defined(IGNORE_WITH_PHP) . endif . if empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} . endif . endif -.if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64) +. if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64) USE_GCC= yes -.endif +. endif # This variable is for dependencies lines, so you write: # ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR} PHP_FLAVOR= php${PHP_VER} # So, we have PHP flavors, set PHP_VER accordingly. . if ${FLAVOR:Mphp[0-9][0-9]} PHP_VER= ${FLAVOR:S/^php//} . endif # If lang/php is not installed, or if we have a php flavor but want a non # default one, we need to overwrite those. . if empty(PHP_EXT_DIR) || empty(PHP_EXT_INC) || \ (${FLAVOR:Mphp[0-9][0-9]} && ${FLAVOR} != ${FLAVORS:[1]}) # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. . if ${PHP_VER} == 81 PHP_EXT_DIR= 20210902 PHP_EXT_INC= hash json openssl pcre spl . elif ${PHP_VER} == 80 PHP_EXT_DIR= 20200930 PHP_EXT_INC= hash json openssl pcre spl . elif ${PHP_VER} == 74 PHP_EXT_DIR= 20190902 PHP_EXT_INC= hash pcre spl . else # (rene) default to DEFAULT_VERSIONS PHP_EXT_DIR= 20200930 PHP_EXT_INC= hash json openssl pcre spl . endif # Try to figure out what the PHP_EXT_DIR should be WRT the # installed Apache port. HTTPD?= ${LOCALBASE}/sbin/httpd . if exists(${HTTPD}) APACHE_THR!= ${HTTPD} -V | ${AWK} '/threaded/ {print $2}' . if ${APACHE_THR:Myes} PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . endif . elif defined(APACHE_PORT) && (${APACHE_PORT:M*worker*} != "" || ${APACHE_PORT:M*event*} != "") PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . elif defined(WITH_MPM) && (${WITH_MPM} == "worker" || ${WITH_MPM} == "event") PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts . endif . if defined(WITH_DEBUG) PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug . endif PHP_SAPI?= "" . endif # empty(PHP_EXT_DIR) || empty(PHP_EXT_INC) || (${FLAVOR:Mphp[0-9][0-9]} && ${FLAVOR} != ${FLAVORS:[1]}) # Set a few PKGNAME(PRE|SUF)FIX to be used in ports. PHP_PKGNAMEPREFIX= php${PHP_VER}- PHP_PKGNAMESUFFIX= -php${PHP_VER} PECL_PKGNAMEPREFIX= php${PHP_VER}-pecl- . if defined(IGNORE_WITH_PHP) . for VER in ${IGNORE_WITH_PHP} . if ${PHP_VER} == "${VER}" _IGNORE_PHP_SET= IGNORE= cannot be installed: doesn't work with lang/php${PHP_VER} port\ (doesn't support PHP ${IGNORE_WITH_PHP:C/^(7)/\1./}) . endif . endfor . endif . if ${php_ARGS:Mweb} . if ${php_ARGS:Mcgi} || ${php_ARGS:Mmod} check-makevars:: @${ECHO_CMD} "If you use :web you cannot also use :cgi" @${ECHO_CMD} "or :mod. Use only one of them." @${FALSE} . endif . endif . if ${php_ARGS:Mcgi} . if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "" check-makevars:: @${ECHO_CMD} "This port requires the CGI version of PHP, but you have already" @${ECHO_CMD} "installed a PHP port without CGI." @${FALSE} . endif . endif . if ${php_ARGS:Mcli} . if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == "" check-makevars:: @${ECHO_CMD} "This port requires the CLI version of PHP, but you have already" @${ECHO_CMD} "installed a PHP port without CLI." @${FALSE} . endif . endif . if ${php_ARGS:Membed} . if defined(PHP_VERSION) && ${PHP_SAPI:Membed} == "" check-makevars:: @${ECHO_CMD} "This port requires the embedded library version of PHP, but you have already" @${ECHO_CMD} "installed a PHP port without the embedded library." @${FALSE} . endif . endif PHP_PORT?= lang/php${PHP_VER} MOD_PHP_PORT?= www/mod_php${PHP_VER} . if ${php_ARGS:Mbuild} BUILD_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT} . endif RUN_DEPENDS+= ${PHPBASE}/include/php/main/php.h:${PHP_PORT} . if ${php_ARGS:Mmod} || (${php_ARGS:Mweb} && defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mfpm} == "") USE_APACHE_RUN= 22+ .include "${PORTSDIR}/Mk/Uses/apache.mk" . if ${PHP_VER} < 80 # libphpX.so only has the major version number in it, so remove the last digit of PHP_VER to get it. RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp${PHP_VER:C/.$//}.so:${MOD_PHP_PORT} . else RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp.so:${MOD_PHP_PORT} . endif . endif PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR} . if ${php_ARGS:Mphpize} || ${php_ARGS:Mext} || ${php_ARGS:Mzend} BUILD_DEPENDS+= ${PHPBASE}/bin/phpize:${PHP_PORT} \ autoconf>0:devel/autoconf GNU_CONFIGURE= yes CONFIGURE_ARGS+=--with-php-config=${PHPBASE}/bin/php-config _USES_configure+= 190:phpize-message 250:do-phpize phpize-message: @${ECHO_MSG} "===> PHPizing for ${PKGNAME}" do-phpize: @(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${PHPBASE}/bin/phpize) . endif _USES_POST+=php .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PHP_POST_MK) _INCLUDE_USES_PHP_POST_MK=yes . if ${php_ARGS:Mext} || ${php_ARGS:Mzend} PHP_MODNAME?= ${PORTNAME} PHP_EXT_PKGMESSAGE= ${WRKDIR}/php-ext-pkg-message _PKGMESSAGES+= ${PHP_EXT_PKGMESSAGE} PHP_HEADER_DIRS+= . # If there is no priority defined, we wing it. . if !defined(PHP_MOD_PRIO) . if defined(USE_PHP) # If an extension needs another, put it after the others. PHP_MOD_PRIO= 30 . else # Otherwise, put it where it with everybody. PHP_MOD_PRIO= 20 . endif . endif PHP_EXT_INI_FILE= etc/php/ext-${PHP_MOD_PRIO}-${PHP_MODNAME}.ini do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} @${INSTALL_LIB} ${WRKSRC}/modules/${PHP_MODNAME}.so \ ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} . for header in ${PHP_HEADER_DIRS} @${MKDIR} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header} @${INSTALL_DATA} ${WRKSRC}/${header}/*.h \ ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/${header} . endfor @${RM} ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h @${EGREP} "#define (COMPILE|HAVE|USE)_" ${WRKSRC}/config.h \ > ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h @${MKDIR} ${STAGEDIR}${PREFIX}/etc/php . if ${php_ARGS:Mzend} @${ECHO_CMD} "zend_extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${PHP_EXT_INI_FILE} . else @${ECHO_CMD} "extension=${PHP_MODNAME}.so" > ${STAGEDIR}${PREFIX}/${PHP_EXT_INI_FILE} . endif _USES_stage+= 899:add-plist-phpext add-plist-phpext: @${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \ >> ${TMPPLIST} @${FIND} -P ${STAGEDIR}${PREFIX}/include/php/ext/${PHP_MODNAME} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST} @${ECHO_CMD} "@postexec echo \#include \\\"ext/${PHP_MODNAME}/config.h\\\" >> %D/include/php/ext/php_config.h" \ >> ${TMPPLIST} @${ECHO_CMD} "@preunexec cp %D/include/php/ext/php_config.h %D/include/php/ext/php_config.h.orig" \ >> ${TMPPLIST} @${ECHO_CMD} "@preunexec grep -v ext/${PHP_MODNAME}/config.h %D/include/php/ext/php_config.h.orig > %D/include/php/ext/php_config.h || true" \ >> ${TMPPLIST} @${ECHO_CMD} "@preunexec ${RM} %D/include/php/ext/php_config.h.orig" \ >> ${TMPPLIST} @${ECHO_CMD} "${PHP_EXT_INI_FILE}" \ >> ${TMPPLIST} @${ECHO_CMD} "[" > ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "{" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} " message: <> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "This file has been added to automatically load the installed extension:" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "${PREFIX}/${PHP_EXT_INI_FILE}" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "EOD" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} " type: install" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "}" >> ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "]" >> ${PHP_EXT_PKGMESSAGE} . endif # Extensions . if defined(USE_PHP) && ${USE_PHP:tl} != "yes" # non-version specific components _USE_PHP_ALL= bcmath bitset bz2 calendar ctype curl dba dom \ enchant exif ffi fileinfo filter ftp gd gettext gmp \ hash iconv igbinary imap intl json ldap mbstring mcrypt \ memcache memcached mysqli odbc opcache \ openssl pcntl pcre pdo pdo_dblib pdo_firebird pdo_mysql \ pdo_odbc pdo_pgsql pdo_sqlite phar pgsql posix \ pspell radius readline redis session shmop simplexml snmp soap\ sockets sodium spl sqlite3 sysvmsg sysvsem sysvshm \ tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib # version specific components _USE_PHP_VER74= ${_USE_PHP_ALL} pdf _USE_PHP_VER80= ${_USE_PHP_ALL} _USE_PHP_VER81= ${_USE_PHP_ALL} bcmath_DEPENDS= math/php${PHP_VER}-bcmath bitset_DEPENDS= math/pecl-bitset@${PHP_FLAVOR} bz2_DEPENDS= archivers/php${PHP_VER}-bz2 calendar_DEPENDS= misc/php${PHP_VER}-calendar ctype_DEPENDS= textproc/php${PHP_VER}-ctype curl_DEPENDS= ftp/php${PHP_VER}-curl dba_DEPENDS= databases/php${PHP_VER}-dba dom_DEPENDS= textproc/php${PHP_VER}-dom enchant_DEPENDS= textproc/php${PHP_VER}-enchant exif_DEPENDS= graphics/php${PHP_VER}-exif ffi_DEPENDS= devel/php${PHP_VER}-ffi fileinfo_DEPENDS= sysutils/php${PHP_VER}-fileinfo filter_DEPENDS= security/php${PHP_VER}-filter ftp_DEPENDS= ftp/php${PHP_VER}-ftp gd_DEPENDS= graphics/php${PHP_VER}-gd gettext_DEPENDS=devel/php${PHP_VER}-gettext gmp_DEPENDS= math/php${PHP_VER}-gmp iconv_DEPENDS= converters/php${PHP_VER}-iconv igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR} imap_DEPENDS= mail/php${PHP_VER}-imap intl_DEPENDS= devel/php${PHP_VER}-intl -.if ${PHP_VER} < 80 +. if ${PHP_VER} < 80 json_DEPENDS= devel/php${PHP_VER}-json -.endif +. endif ldap_DEPENDS= net/php${PHP_VER}-ldap mbstring_DEPENDS= converters/php${PHP_VER}-mbstring mcrypt_DEPENDS= security/pecl-mcrypt@${PHP_FLAVOR} memcache_DEPENDS= databases/pecl-memcache@${PHP_FLAVOR} memcached_DEPENDS= databases/pecl-memcached@${PHP_FLAVOR} mysqli_DEPENDS= databases/php${PHP_VER}-mysqli odbc_DEPENDS= databases/php${PHP_VER}-odbc opcache_DEPENDS= www/php${PHP_VER}-opcache -.if ${PHP_VER} < 80 +. if ${PHP_VER} < 80 openssl_DEPENDS=security/php${PHP_VER}-openssl -.endif +. endif pcntl_DEPENDS= devel/php${PHP_VER}-pcntl pdf_DEPENDS= print/pecl-pdflib@${PHP_FLAVOR} pdo_DEPENDS= databases/php${PHP_VER}-pdo pdo_dblib_DEPENDS= databases/php${PHP_VER}-pdo_dblib pdo_firebird_DEPENDS= databases/php${PHP_VER}-pdo_firebird pdo_mysql_DEPENDS= databases/php${PHP_VER}-pdo_mysql pdo_odbc_DEPENDS= databases/php${PHP_VER}-pdo_odbc pdo_pgsql_DEPENDS= databases/php${PHP_VER}-pdo_pgsql pdo_sqlite_DEPENDS= databases/php${PHP_VER}-pdo_sqlite pgsql_DEPENDS= databases/php${PHP_VER}-pgsql phar_DEPENDS= archivers/php${PHP_VER}-phar posix_DEPENDS= sysutils/php${PHP_VER}-posix pspell_DEPENDS= textproc/php${PHP_VER}-pspell radius_DEPENDS= net/pecl-radius@${PHP_FLAVOR} readline_DEPENDS= devel/php${PHP_VER}-readline redis_DEPENDS= databases/pecl-redis@${PHP_FLAVOR} session_DEPENDS=www/php${PHP_VER}-session shmop_DEPENDS= devel/php${PHP_VER}-shmop simplexml_DEPENDS= textproc/php${PHP_VER}-simplexml snmp_DEPENDS= net-mgmt/php${PHP_VER}-snmp soap_DEPENDS= net/php${PHP_VER}-soap sockets_DEPENDS=net/php${PHP_VER}-sockets sodium_DEPENDS= security/php${PHP_VER}-sodium sqlite3_DEPENDS=databases/php${PHP_VER}-sqlite3 sysvmsg_DEPENDS=devel/php${PHP_VER}-sysvmsg sysvsem_DEPENDS=devel/php${PHP_VER}-sysvsem sysvshm_DEPENDS=devel/php${PHP_VER}-sysvshm tidy_DEPENDS= www/php${PHP_VER}-tidy tokenizer_DEPENDS= devel/php${PHP_VER}-tokenizer xml_DEPENDS= textproc/php${PHP_VER}-xml xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader -.if ${PHP_VER} >= 80 +. if ${PHP_VER} >= 80 xmlrpc_DEPENDS= net/pecl-xmlrpc@${PHP_FLAVOR} -.else +. else xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc -.endif +. endif xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter xsl_DEPENDS= textproc/php${PHP_VER}-xsl zip_DEPENDS= archivers/php${PHP_VER}-zip zlib_DEPENDS= archivers/php${PHP_VER}-zlib . for extension in ${USE_PHP} ext= ${extension} . if !empty(_USE_PHP_VER${PHP_VER}:M${extension:S/:build//}) . if empty(PHP_EXT_INC:M${extension:S/:build//}) . if !empty(php_ARGS:Mbuild) || !empty(ext:M*\:build) BUILD_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension:S/:build//}.so:${${extension:S/:build//}_DEPENDS} . endif RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/${extension:S/:build//}.so:${${extension:S/:build//}_DEPENDS} . endif . else . if ${ext:tl} != "yes" && !defined(_IGNORE_PHP_SET) check-makevars:: @${ECHO_CMD} "Unknown extension ${extension:S/:build//} for PHP ${PHP_VER}." @${FALSE} . endif . endif . endfor . endif .endif diff --git a/Mk/Uses/pkgconfig.mk b/Mk/Uses/pkgconfig.mk index d025856d2314..499be51f1336 100644 --- a/Mk/Uses/pkgconfig.mk +++ b/Mk/Uses/pkgconfig.mk @@ -1,31 +1,31 @@ # handle dependency on the pkgconf port # # Feature: pkgconfig # Usage: USES=pkgconfig or USES=pkgconfig:ARGS # Valid ARGS: build (default, implicit), run, both # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_PKGCONFIG_MK) _INCLUDE_USES_PKGCONFIG_MK= yes _PKGCONFIG_DEPENDS= pkgconf>=1.3.0_1:devel/pkgconf -.if empty(pkgconfig_ARGS) +. if empty(pkgconfig_ARGS) pkgconfig_ARGS= build -.endif +. endif -.if ${pkgconfig_ARGS} == "build" +. if ${pkgconfig_ARGS} == "build" BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} CONFIGURE_ENV+= PKG_CONFIG=pkgconf -.elif ${pkgconfig_ARGS} == "run" +. elif ${pkgconfig_ARGS} == "run" RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS} -.elif ${pkgconfig_ARGS} == "both" +. elif ${pkgconfig_ARGS} == "both" CONFIGURE_ENV+= PKG_CONFIG=pkgconf BUILD_DEPENDS+= ${_PKGCONFIG_DEPENDS} RUN_DEPENDS+= ${_PKGCONFIG_DEPENDS} -.else +. else IGNORE= USES=pkgconfig - invalid args: [${pkgconfig_ARGS}] specified -.endif +. endif .endif diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk index 14a0f4a33191..62013f08c376 100644 --- a/Mk/Uses/pyqt.mk +++ b/Mk/Uses/pyqt.mk @@ -1,214 +1,214 @@ # Handle PyQt related ports # # Feature: pyqt # Usage: USES=pyqt:ARGS # Valid ARGS: 5 # # MAINTAINER: kde@FreeBSD.org # # Internal Port variables for PyQt ports: # PYQT_DIST - This port is part of PyQt5 itself. Variables and # targets are then set assuming a certain tarball and # port layout. # USE_PYQT - List of PyQt components to depend on # * foo_build only build depend # * foo_run only run depend # * foo_test only test depend # * foo both (default) # PYQT_SIPDIR - where sip files will be installed to # PYQT_APIDIR - where api files will be installed to # PYQT_DOCDIR - where doc files will be installed to # PYQT_EXAMPLESDIR - where examples will be installed to .if !defined(_INCLUDE_USES_PYQT_MK) _INCLUDE_USES_PYQT_MK= yes # At the moment we support PyQt bindings versions 5, sip # option is for internal use by the py-sip ports. _PYQT_SUPPORTED= 5 sip . if empty(pyqt_ARGS) IGNORE= pyqt needs a qt-version (${_PYQT_SUPPORTED}) . endif # At the moment we support PyQt bindings versions 5 . for ver in ${_PYQT_SUPPORTED:O:u} . if ${pyqt_ARGS:M${ver}} . if empty(_PYQT_VERSION) _PYQT_VERSION= ${ver} . else IGNORE?= cannot be installed: different PYQT versions specified via pyqt:[${_PYQT_SUPPORTED:S/ //g}] . endif . endif . endfor . if empty(_PYQT_VERSION) IGNORE?= USES=pyqt needs a version number (valid values: ${_PYQT_SUPPORTED}) _PYQT_VERSION= 0 . endif PYQT_MAINTAINER= kde@FreeBSD.org MASTER_SITE_RIVERBANK= https://www.riverbankcomputing.com/static/Downloads/%SUBDIR%/ MASTER_SITES_SIP= https://pypi.python.org/packages/source/s/sip/ MASTER_SITES_PYQT5= https://pypi.python.org/packages/source/P/PyQt5/ MASTER_SITES_PYQTSIP= https://pypi.python.org/packages/source/P/PyQt5-sip/ MASTER_SITES_PYQTCHART= https://pypi.python.org/packages/source/P/PyQtChart/ MASTER_SITES_PYQTNETWORKAUTH= https://pypi.python.org/packages/source/P/PyQtNetworkAuth/ MASTER_SITES_PYQTBUILDER= https://pypi.io/packages/source/P/PyQt-builder/ MASTER_SITES_PYQTWEBENGINE= https://pypi.python.org/packages/source/P/PyQtWebEngine/ #https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.12.0/QScintilla_src-2.12.0.tar.gz MASTER_SITES_QSCI2= RIVERBANK/QScintilla/${PORTVERSION} \ SF/pyqt/QScintilla2/QScintilla-${PORTVERSION} \ GENTOO SIP_VERSION= 6.5.1 SIP4_VERSION= 4.19.25 QSCI2_VERSION= 2.13.2 PYQT5_VERSION= 5.15.6 PYQTCHART_VERSION= 5.15.5 PYQTNETWORKAUTH_VERSION=5.15.5 PYQTWEBENGINE_VERSION= 5.15.5 PYQTSIP_VERSION= 12.9.1 PYQTBUILDER_VERSION= 1.12.2 SIP_DISTNAME= sip-${SIP_VERSION} SIP4_DISTNAME= sip-${SIP4_VERSION} PYQT5_DISTNAME= PyQt5-${PYQT5_VERSION} PYQTSIP_DISTNAME= PyQt5_sip-${PYQTSIP_VERSION} PYQTCHART_DISTNAME= PyQtChart-${PYQTCHART_VERSION} PYQTNETWORKAUTH_DISTNAME= PyQtNetworkAuth-${PYQTNETWORKAUTH_VERSION} PYQTBUILDER_DISTNAME= PyQt-builder-${PYQTBUILDER_VERSION} PYQTWEBENGINE_DISTNAME= PyQtWebEngine-${PYQTWEBENGINE_VERSION} PYQT5_DISTINFO_FILE= ${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo QSCI2_DISTNAME= QScintilla_src-${QSCI2_VERSION} PYQT5_LICENSE= GPLv3 _USE_PYQT_ALL= pyqt5 chart networkauth webengine _USE_SIP_ALL= sip pysip _USE_QSCINTILLA= qscintilla2 _USE_PYQTBUILDER= qtbuilder # Unversioned variables for the rest of the file PYQT_VERSION= ${PYQT${_PYQT_VERSION}_VERSION} PYQT_RELNAME= py-qt${_PYQT_VERSION} PYQT_PY_RELNAME= ${PYTHON_PKGNAMEPREFIX}qt${_PYQT_VERSION} PYQT_MASTERSITES= ${MASTER_SITES_PYQT${_PYQT_VERSION}} PYQT_DISTNAME= ${PYQT${_PYQT_VERSION}_DISTNAME} PYQT_DISTINFO_FILE= ${PYQT${_PYQT_VERSION}_DISTINFO_FILE} PYQT_LICENSE= ${PYQT${_PYQT_VERSION}_LICENSE} # PATH py-sip_PATH= ${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION} py-pysip_PATH= ${PYQT_PY_RELNAME}-sip>=${PYQTSIP_VERSION} py-qscintilla2_PATH= ${PYQT_PY_RELNAME}-qscintilla2>=${QSCI2_VERSION} py-qtbuilder_PATH= ${PYTHON_PKGNAMEPREFIX}qtbuilder>=${PYQTBUILDER_VERSION} py-pyqt5_PATH= ${PYQT_PY_RELNAME}-pyqt>=${PYQT5_VERSION} py-chart_PATH= ${PYQT_PY_RELNAME}-chart>=${PYQTCHART_VERSION} py-networkauth_PATH= ${PYQT_PY_RELNAME}-networkauth>=${PYQTNETWORKAUTH_VERSION} py-webengine_PATH= ${PYQT_PY_RELNAME}-webengine>=${PYQTWEBENGINE_VERSION} # PORT py-sip_PORT= devel/py-sip py-qtbuilder_PORT= devel/py-qtbuilder py-pysip_PORT= devel/${PYQT_RELNAME}-sip py-qscintilla2_PORT= devel/${PYQT_RELNAME}-qscintilla2 py-positioning_PORT= devel/${PYQT_RELNAME}-positioning py-pyqt5_PORT= devel/${PYQT_RELNAME}-pyqt py-chart_PORT= x11-toolkits/${PYQT_RELNAME}-chart py-networkauth_PORT= net/${PYQT_RELNAME}-networkauth py-webengine_PORT= www/${PYQT_RELNAME}-webengine # The versionned executable of sip SIP= ${LOCALBASE}/bin/sip-build-${PYTHON_VER} # Relative directories _VERSION_SUBDIR_REL= PyQt${_PYQT_VERSION}/${PYTHON_VER} _APIDIR_REL= share/${_VERSION_SUBDIR_REL}/qsci _DOCDIR_REL= share/doc/${_VERSION_SUBDIR_REL} _EXAMPLEDIR_REL= share/examples/${_VERSION_SUBDIR_REL} _SIPDIR_REL= PyQt${_PYQT_VERSION}/bindings _DESIGNERDIR_REL= ${QT_PLUGINDIR_REL}/designer/${_VERSION_SUBDIR_REL} _QMLDIR_REL= ${QT_QMLDIR_REL}/${_VERSION_SUBDIR_REL} # Absolute directories PYQT_APIDIR= ${PREFIX}/${_APIDIR_REL} PYQT_DOCDIR= ${PREFIX}/${_DOCDIR_REL} PYQT_EXAMPLEDIR= ${PREFIX}/${_EXAMPLEDIR_REL} PYQT_SIPDIR?= ${PYTHON_SITELIBDIR}/${_SIPDIR_REL} PYQT_DESIGNERDIR= ${PREFIX}/${_DESIGNERDIR_REL} PYQT_QMLDIR= ${PREFIX}/${_QMLDIR_REL} PLIST_SUB+= PYQT_APIDIR=${_APIDIR_REL} \ PYQT_DOCDIR=${_DOCDIR_REL} \ PYQT_EXAMPLEDIR=${_EXAMPLEDIR_REL} \ PYQT_SIPDIR=${PYQT_SIPDIR} \ PYQT_DESIGNERDIR=${_DESIGNERDIR_REL} \ PYQT_QMLDIR=${_QMLDIR_REL} \ PYQT_SIPVERSION=${SIP_VERSION} \ PYQT_QSCIVERSION=${QSCI2_VERSION} \ PYQT_PYQTVERSION=${PYQT_VERSION} . if defined(PYQT_DIST) PLIST_SUB+= PYTHON_MAJOR_VER="${PYTHON_MAJOR_VER}" SIP_ARGS= --qmake ${QMAKE} \ --verbose \ --no-make \ --build-dir build \ --protected-is-public \ --api-dir ${PYQT_APIDIR} -. if ${PORTNAME} == "pyqt" +. if ${PORTNAME} == "pyqt" SIP_ARGS+= --confirm-license -. endif +. endif -. if ${PORTNAME} == "pyqt" -. if !target(post-patch) +. if ${PORTNAME} == "pyqt" +. if !target(post-patch) post-patch: ${REINPLACE_CMD} -e "s#%%PYQT_DESIGNERDIR%%#${PYQT_DESIGNERDIR}#" ${WRKSRC}/project.py ${REINPLACE_CMD} -e "s#%%PYQT_QMLDIR%%#${PYQT_QMLDIR}#" ${WRKSRC}/project.py -. endif # !target(post-patch) -. endif +. endif # !target(post-patch) +. endif . if !target(do-build) do-build: (cd ${WRKSRC}; ${SIP} ${SIP_ARGS}; ${MAKE} ${_MAKE_JOBS} -C ./build) . endif # !target(do-build) . if !target(do-install) do-install: (cd ${WRKSRC} ; ${MAKE} -C ./build install INSTALL_ROOT=${STAGEDIR} ) . endif # !target(do-install) . endif # defined(PYQT_DIST) # Set build, run and test depends -- we need to prefix them internally with "py-" # else we conflict with the ones defined in bsd.qt.mk with the same name _USE_PYQT_ALL+= ${_USE_SIP_ALL} \ ${_USE_QSCINTILLA} \ ${_USE_PYQTBUILDER} . for comp in ${_USE_PYQT_ALL:O:u} _USE_PYQT_ALL_SUFFIXED+= py-${comp} py-${comp}_build py-${comp}_run py-${comp}_test py-${comp}_BUILD_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR} py-${comp}_RUN_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR} py-${comp}_TEST_DEPENDS?= ${py-${comp}_PATH}:${py-${comp}_PORT}@${PY_FLAVOR} py-${comp}_build_BUILD_DEPENDS?= ${py-${comp}_BUILD_DEPENDS} py-${comp}_run_RUN_DEPENDS?= ${py-${comp}_RUN_DEPENDS} py-${comp}_test_TEST_DEPENDS?= ${py-${comp}_TEST_DEPENDS} . endfor _USE_PYQT= ${USE_PYQT:O:u} . for comp in ${_USE_PYQT} . if ${_USE_PYQT_ALL_SUFFIXED:Mpy-${comp}} BUILD_DEPENDS+= ${py-${comp}_BUILD_DEPENDS} RUN_DEPENDS+= ${py-${comp}_RUN_DEPENDS} TEST_DEPENDS+= ${py-${comp}_TEST_DEPENDS} . else IGNORE?= cannot be installed: unknown USE_PYQT component ${comp} #' . endif . endfor .endif # defined(_INCLUDE_USES_PYQT_MK) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 4226c3823f73..0b8f782c0314 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -1,725 +1,725 @@ # Provide support for Python related ports. This includes detecting Python # interpreters, ports providing package and modules for python as well as # consumer ports requiring Python at build or run time. # # Feature: python # Usage: USES=python[:version-spec][,arg,...] # Valid ARGS: , patch, build, run, test, env # # version-spec Declarative specification for the Python version(s) the # port supports. Subsets and ranges can be specified: # # * # * - # * + # * - # # Examples: # # USES=python:2.7 # Supports Python 2.7 Only # USES=python:3.7+ # Supports Python 3.7 or later # USES=python:3.7-3.9 # Supports Python 3.7 to 3.9 # USES=python:-3.8 # Supports Python up to 3.8 # USES=python # Supports 3.7+ # # NOTE: should be as specific as possible, matching the versions # upstream declares support for, without being incorrect. In particular, # USES=python *without* a means 3.7+, # including unreleased versions, which is probably incorrect. # # Not specifying a should only be used when a more specific # cannot be specified due to syntax limitations, for # example: 2.7,3.7-3.8, but even in this case, X.Y+ (2.7+), or -X.Y (-3.7) # is preferred and likely more correct. # # patch Python is needed at patch time. Adds dependency to PATCH_DEPENDS. # build Python is needed at build time. Adds dependency to BUILD_DEPENDS. # run Python is needed at run time. Adds dependency to RUN_DEPENDS. # test Python is needed at test time. Adds dependency to TEST_DEPENDS. # env Does not depend on Python but needs the environment set up. This # is mainly used when depending on flavored python ports, or when a # correct PYTHON_CMD is required. It has the same effect as setting # PYTHON_NO_DEPENDS. # # If build, run and test are omitted, Python will be added as BUILD_DEPENDS, # RUN_DEPENDS and TEST_DEPENDS. # patch is independant, it does not prevent the default build/run/test # dependency. # env or PYTHON_NO_DEPENDS can be set to not add any dependencies. # # Exported variables: # # PYTHON_VERSION - The chosen Python interpreter including the version, # e.g. python2.7, python3.5, etc. # # Variables, which can be set by the port: # # USE_PYTHON - A list of additional features and functionality to # enable. Supported features are: # # concurrent - Indicates that the port can be installed for # different python versions at the same time. The port # is supposed to use a unique prefix for certain # directories using USES=uniquefiles:dirs (see the # uniquefiles.mk Uses for details about the # directories), if set to yes. Binaries receive an # additional suffix, based on ${PYTHON_VER}. # # The values for the uniquefiles USES are set as # follows: # # UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} # UNIQUE_SUFFIX= -${PYTHON_VER} # # If the port is installed for the current default # python version, scripts and binaries in # # ${PREFIX}/bin # ${PREFIX}/sbin # ${PREFIX}/libexec # # are linked from the prefixed version to the # prefix-less original name, e.g. # bin/foo-2.7 --> bin/foo. # # cython - Depend on lang/cython at build-time. # # cython_run - Depend on lang/cython at run-time. # # flavors - Force creation of flavors for Python 2 and 3 default # versions, where applicable. # # noflavors - Disable automatic creation of flavors if they would # otherwise be created and they are not wanted. # # allflavors - Generate flavors for all possible versions and not # simply the default ones. Only to be used for py-* # ports that are part of the Python distribution, but # kept as separate ports. # # optsuffix - Set PKGNAMESUFFIX to PYTHON_PKGNAMESUFFIX if not the # default python version. # # distutils - Use distutils as do-configure, do-build and # do-install targets. implies flavors. # # autoplist - Automatically generates the packaging list for a # port that uses distutils when defined. # requires: distutils # # py3kplist - Automatically generates Python 3.x compatible # __pycache__ entries from a Python 2.x packaging list # when defined. Use this for ports that do *not* use # standard Python packaging mechanisms such as # distutils, and support *both* Python 2.x and 3.x. # Not needed, if USE_PYTHON=autoplist is set. # # pythonprefix - Says that the port installs in ${PYTHONBASE} instead # of ${PREFIX}. # # noegginfo - Skip an egg-info entry from plist, if defined. # # PYTHON_CMD - Python's command line file name, including the # version number (used for dependencies). # default: ${PYTHONBASE}/bin/${PYTHON_VERSION} # # PYSETUP - Name of the setup script used by the distutils # package. # default: setup.py # # PYDISTUTILS_PKGNAME # - Internal name in the distutils for egg-info. # default: ${PORTNAME} # # PYDISTUTILS_PKGVERSION # - Internal version in the distutils for egg-info. # default: ${PORTVERSION} # # PYDISTUTILS_CONFIGURE_TARGET # - Pass this command to distutils on configure stage. # default: config # # PYDISTUTILS_BUILD_TARGET # - Pass this command to distutils on build stage. # default: build # # PYDISTUTILS_INSTALL_TARGET # - Pass this command to distutils on install stage. # default: install # # PYDISTUTILS_CONFIGUREARGS # - Arguments to config with distutils. # default: # # PYDISTUTILS_BUILDARGS # - Arguments to build with distutils. # default: # # PYDISTUTILS_INSTALLARGS # - Arguments to install with distutils. # default: -c -O1 --prefix=${PREFIX} --single-version-externally-managed --root=${STAGEDIR} # # PYDISTUTILS_EGGINFO # - Canonical name for egg-info. # default: ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info # # The following variables can be read by ports and must not be modified: # # PYTHONBASE - The installation prefix of the chosen Python # interpreter, e.g. /usr/local # # PYTHON_DISTVERSION # - Version number suitable for ${DISTVERSION}. # # PYTHON_PORTSDIR - The port directory of the chosen Python interpreter # # PYTHON_REL - The release number of the chosen Python interpreter # without dots, e.g. 20706, 30401, ... # # PYTHON_SUFFIX - The major-minor release number of the chosen Python # interpreter without dots, e.g. 27, 36, ... # Used for prefixes and suffixes. # # PYTHON_MAJOR_VER - The major release version of the chosen Python # interpreter, e.g. 2, 3, ... # # PYTHON_VER - The major-minor release version of the chosen Python # interpreter, e.g. 2.7, 3.7, ... # # PYTHON_ABIVER - Additional ABI flags set by the chosen Python # interpreter, e.g. md # # PYTHON_INCLUDEDIR - Location of the Python include files. # default: ${PYTHONBASE}/include/${PYTHON_VERSION} # # PYTHON_LIBDIR - Base of the python library tree # default: ${PYTHONBASE}/lib/${PYTHON_VERSION} # # PYTHON_SITELIBDIR - Location of the site-packages tree. Don't change, # unless you know what you do. # default: ${PYTHON_LIBDIR}/site-packages # # There are PREFIX-clean variants of the PYTHON_*DIR variables above. # They are meant to be used by ports instead of the above variables, so the # ports respect ${PREFIX} (unless USE_PYTHON=pythonprefix is specified). # # PYTHONPREFIX_INCLUDEDIR default: ${PREFIX}/include/${PYTHON_VERSION} # PYTHONPREFIX_LIBDIR default: ${PREFIX}/lib/${PYTHON_VERSION} # PYTHONPREFIX_SITELIBDIR default: ${PYTHONPREFIX_LIBDIR}/site-packages # # PYTHON_PLATFORM - Python's idea of the OS release. # This is faked with ${OPSYS} and ${OSREL} until we # find out how to delay defining a variable until # after a certain target has been built. # # PYTHON_PKGNAMEPREFIX # - Use this as a ${PKGNAMEPREFIX} to distinguish # packages for different Python versions. # default: py${PYTHON_SUFFIX}- # # PYTHON_PKGNAMESUFFIX # - Use this as a ${PKGNAMESUFFIX} to distinguish # packages for different Python versions. # default: -py${PYTHON_SUFFIX} # # Using USES=python also will add some useful entries to PLIST_SUB: # # PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} # PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} # PYTHON_PLATFORM=${PYTHON_PLATFORM} # PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} # PYTHON_SUFFIX=${PYTHON_SUFFIX} # PYTHON_VER=${PYTHON_VER} # PYTHON_VERSION=${PYTHON_VERSION} # # and PYTHON2 and PYTHON3 will be set according to the Python version: # # PYTHON2="" PYTHON3="@comment " for Python 2.x # PYTHON2="@comment " PYTHON3="" for Python 3.x # # PYDISTUTILS_INSTALLNOSINGLE # - Deprecated without replacement # # MAINTAINER: python@FreeBSD.org .if !defined(_INCLUDE_USES_PYTHON_MK) _INCLUDE_USES_PYTHON_MK= yes # What Python version and what Python interpreters are currently supported? # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _PYTHON_VERSIONS= 3.8 3.9 3.7 3.10 3.11 2.7 # preferred first _PYTHON_PORTBRANCH= 3.8 # ${_PYTHON_VERSIONS:[1]} _PYTHON_BASECMD= ${LOCALBASE}/bin/python _PYTHON_RELPORTDIR= lang/python # List all valid USE_PYTHON features here _VALID_PYTHON_FEATURES= allflavors autoplist concurrent cython cython_run \ distutils flavors noegginfo noflavors optsuffix \ py3kplist pythonprefix _INVALID_PYTHON_FEATURES= -.for var in ${USE_PYTHON} -. if empty(_VALID_PYTHON_FEATURES:M${var}) +. for var in ${USE_PYTHON} +. if empty(_VALID_PYTHON_FEATURES:M${var}) _INVALID_PYTHON_FEATURES+= ${var} -. endif -.endfor -.if !empty(_INVALID_PYTHON_FEATURES) +. endif +. endfor +. if !empty(_INVALID_PYTHON_FEATURES) IGNORE= uses unknown USE_PYTHON features: ${_INVALID_PYTHON_FEATURES} -.endif +. endif # Make each individual feature available as _PYTHON_FEATURE_ -.for var in ${USE_PYTHON} +. for var in ${USE_PYTHON} _PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} -.endfor +. endfor # distutils automatically generates flavors depending on the supported # versions. -.if defined(_PYTHON_FEATURE_DISTUTILS) +. if defined(_PYTHON_FEATURE_DISTUTILS) _PYTHON_FEATURE_FLAVORS= yes -.endif +. endif -.if defined(_PYTHON_FEATURE_NOFLAVORS) +. if defined(_PYTHON_FEATURE_NOFLAVORS) .undef _PYTHON_FEATURE_FLAVORS -.endif +. endif # Make sure that no dependency or some other environment variable # pollutes the build/run dependency detection .undef _PYTHON_BUILD_DEP .undef _PYTHON_RUN_DEP .undef _PYTHON_TEST_DEP _PYTHON_ARGS= ${python_ARGS:S/,/ /g} -.if ${_PYTHON_ARGS:Mpatch} +. if ${_PYTHON_ARGS:Mpatch} _PYTHON_PATCH_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Npatch} -.endif -.if ${_PYTHON_ARGS:Mbuild} +. endif +. if ${_PYTHON_ARGS:Mbuild} _PYTHON_BUILD_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nbuild} -.endif -.if ${_PYTHON_ARGS:Mrun} +. endif +. if ${_PYTHON_ARGS:Mrun} _PYTHON_RUN_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nrun} -.endif -.if ${_PYTHON_ARGS:Mtest} +. endif +. if ${_PYTHON_ARGS:Mtest} _PYTHON_TEST_DEP= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Ntest} -.endif -.if ${_PYTHON_ARGS:Menv} +. endif +. if ${_PYTHON_ARGS:Menv} PYTHON_NO_DEPENDS= yes _PYTHON_ARGS:= ${_PYTHON_ARGS:Nenv} -.endif +. endif # The port does not specify a build, run or test dependency, assume all are # required. -.if !defined(_PYTHON_BUILD_DEP) && !defined(_PYTHON_RUN_DEP) && \ +. if !defined(_PYTHON_BUILD_DEP) && !defined(_PYTHON_RUN_DEP) && \ !defined(_PYTHON_TEST_DEP) && !defined(PYTHON_NO_DEPENDS) _PYTHON_BUILD_DEP= yes _PYTHON_RUN_DEP= yes _PYTHON_TEST_DEP= yes -.endif +. endif -.if ${PYTHON2_DEFAULT} != ${PYTHON_DEFAULT} && ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT} +. if ${PYTHON2_DEFAULT} != ${PYTHON_DEFAULT} && ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT} WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf" -.endif +. endif -.if ${_PYTHON_ARGS} == 2.7 +. if ${_PYTHON_ARGS} == 2.7 DEV_WARNING+= "lang/python27 reached End of Life and will be removed somewhere in the future, please convert to a modern version of python" -.elif ${_PYTHON_ARGS} == 2 +. elif ${_PYTHON_ARGS} == 2 DEV_ERROR+= "USES=python:2 is no longer supported, use USES=python:2.7" -.elif ${_PYTHON_ARGS} == 3 +. elif ${_PYTHON_ARGS} == 3 DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.7+ or an appropriate version range" -.endif # ${_PYTHON_ARGS} == 2.7 +. endif # ${_PYTHON_ARGS} == 2.7 _PYTHON_VERSION:= ${PYTHON_DEFAULT} -.if empty(_PYTHON_ARGS) +. if empty(_PYTHON_ARGS) _PYTHON_ARGS= 3.7+ -.endif +. endif # Validate Python version whether it meets the version restriction. _PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[1-9]?[0-9])$/\1-\1/} _PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/([1-9]\.[1-9]?[0-9])[-+].*/\1/} _PYTHON_VERSION_MINIMUM:= ${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[0-9]}${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[1-9][0-9]} _PYTHON_VERSION_MAXIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/.*-([1-9]\.[1-9]?[0-9])/\1/} _PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]}${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[1-9][0-9]} # At this point we should have no argument left in ${_PYTHON_ARGS} # except a version spec _V1= [1-9].[0-9] _V2= [1-9].[1-9][0-9] _PYTHON_ARGS:= ${_PYTHON_ARGS:N${_V1}-${_V1}:N${_V1}-${_V2}:N${_V2}-${_V2}:N${_V1}:N${_V2}:N${_V1}+:N${_V2}+:N-${_V1}:N-${_V2}} -.if !empty(_PYTHON_ARGS) +. if !empty(_PYTHON_ARGS) IGNORE= uses unknown USES=python arguments: ${_PYTHON_ARGS} -.endif +. endif # Pattern to convert python versions (X.Y or X.YY) to comparable format X.YY _VC= C/^([1-9]\.)([0-9])$$/\10\2/ .undef _PYTHON_VERSION_NONSUPPORTED -.if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}}) +. if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}}) _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least -.elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}}) +. elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}}) _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most -.endif +. endif # If we have an unsupported version of Python, try another. -.if defined(_PYTHON_VERSION_NONSUPPORTED) +. if defined(_PYTHON_VERSION_NONSUPPORTED) .undef _PYTHON_VERSION -.for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} -.if !defined(_PYTHON_VERSION) && \ +. if !defined(_PYTHON_VERSION) && \ !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ ${__VER:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}})) _PYTHON_VERSION= ${ver} -.endif -.endfor -.if !defined(_PYTHON_VERSION) +. endif +. endfor +. if !defined(_PYTHON_VERSION) IGNORE= needs an unsupported version of Python -.endif -.endif # defined(_PYTHON_VERSION_NONSUPPORTED) +. endif +. endif # defined(_PYTHON_VERSION_NONSUPPORTED) # Automatically generates FLAVORS if empty -.if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) +. if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) . undef _VALID_PYTHON_VERSIONS -. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} -. if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ +. if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ ${__VER:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}})) -. if empty(_VALID_PYTHON_VERSIONS:M${ver}) +. if empty(_VALID_PYTHON_VERSIONS:M${ver}) _VALID_PYTHON_VERSIONS+= ${ver} +. endif . endif -. endif -. endfor +. endfor # Get all possible flavors depending on version requirements -. if defined(_VALID_PYTHON_VERSIONS) +. if defined(_VALID_PYTHON_VERSIONS) _ALL_PYTHON_FLAVORS= ${_VALID_PYTHON_VERSIONS:S/.//:S/^/py/} -. else +. else _ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/} -. endif +. endif # Decide how many flavors we want. By default, only generate the default # versions. -. if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) +. if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) FLAVORS= ${_ALL_PYTHON_FLAVORS} -. else -. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} +. else +. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} _f= py${_v:S/.//} -. if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} -.if !empty(FLAVORS) +. if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} +. if !empty(FLAVORS) FLAVORS:= ${FLAVORS} ${_f} -.else +. else FLAVORS:= ${_f} -.endif -. endif -. endfor -. endif -. if !empty(FLAVORS) && empty(FLAVOR) +. endif +. endif +. endfor +. endif +. if !empty(FLAVORS) && empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} +. endif . endif -.endif -.if ${FLAVOR:Mpy[23][0-9]}${FLAVOR:Mpy[23][1-9][0-9]} +. if ${FLAVOR:Mpy[23][0-9]}${FLAVOR:Mpy[23][1-9][0-9]} _PYTHON_VERSION= ${FLAVOR:S/py//:C/(.)/\1./} -.endif +. endif -.if !empty(FLAVOR) && ${_PYTHON_VERSION} != ${PYTHON_DEFAULT} -.if defined(_PYTHON_FEATURE_OPTSUFFIX) +. if !empty(FLAVOR) && ${_PYTHON_VERSION} != ${PYTHON_DEFAULT} +. if defined(_PYTHON_FEATURE_OPTSUFFIX) DEV_WARNING+= "USE_PYTHON=optsuffix is deprecated, consider migrating to using unconditional PKGNAMESUFFIX or PKGNAMEPREFIX" PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} -.endif -.endif +. endif +. endif # To avoid having dependencies with @ and empty flavor: # _PYTHON_VERSION is either set by (first that matches): # - If using Python flavors, from the current Python flavor # - If using a version restriction (USES=python:3.7+), from the first # acceptable default Python version. # - From PYTHON_DEFAULT PY_FLAVOR= py${_PYTHON_VERSION:S/.//} PYTHON_VERSION= python${_PYTHON_VERSION} # Got the correct python version, set some publicly accessible variables PYTHON_VER= ${_PYTHON_VERSION} PYTHON_SUFFIX= ${_PYTHON_VERSION:S/.//g} PYTHON_MAJOR_VER= ${PYTHON_VER:R} PYTHON_REL= # empty PYTHON_ABIVER= # empty PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX} # Protect partial checkouts from Mk/Scripts/functions.sh:export_ports_env(). -.if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR}) +. if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR}) .include "${PORTSDIR}/${PYTHON_PORTSDIR}/Makefile.version" -.endif +. endif # Create a 5 integer version string, prefixing 0 to the minor and patch # tokens if it's a single character. Only use the the first 3 tokens of # PORTVERSION to support pre-release versions (rc3, alpha4, etc) of # any Python port (lang/pythonXY) PYTHON_REL= ${PYTHON_DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9])$/.0\1/:C/\.([0-9]\.[0-9]+)/.0\1/:S/.//g} # Might be overridden by calling ports PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION} -.if ${PYTHON_VER} != 2.7 -.if exists(${PYTHON_CMD}-config) +. if ${PYTHON_VER} != 2.7 +. if exists(${PYTHON_CMD}-config) PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags -.elif ${PYTHON_REL} < 30800 +. elif ${PYTHON_REL} < 30800 # Default ABI flags for lang/python37 port PYTHON_ABIVER= m -.endif -.endif +. endif +. endif -.if ${PYTHON_REL} >= 30807 +. if ${PYTHON_REL} >= 30807 PYTHON_EXT_SUFFIX= .cpython-${PYTHON_SUFFIX} -.else +. else PYTHON_EXT_SUFFIX= # empty -.endif +. endif -.if ${PYTHON_MAJOR_VER} == 2 +. if ${PYTHON_MAJOR_VER} == 2 DEPRECATED?= Uses Python 2.7 which is EOLed upstream -.endif +. endif -.if !defined(PYTHONBASE) +. if !defined(PYTHONBASE) PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ 2> /dev/null || ${ECHO_CMD} ${LOCALBASE}) | ${TAIL} -1 -.endif +. endif _EXPORTED_VARS+= PYTHONBASE PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER} PYTHON_LIBDIR= ${PYTHONBASE}/lib/python${_PYTHON_VERSION} PYTHON_PLATFORM= ${OPSYS:tl}${OSREL:C/\.[0-9.]*//} PYTHON_SITELIBDIR= ${PYTHON_LIBDIR}/site-packages PYTHON_PKGNAMEPREFIX= py${PYTHON_SUFFIX}- PYTHON_PKGNAMESUFFIX= -py${PYTHON_SUFFIX} PYTHONPREFIX_INCLUDEDIR= ${PYTHON_INCLUDEDIR:S;${PYTHONBASE};${PREFIX};} PYTHONPREFIX_LIBDIR= ${PYTHON_LIBDIR:S;${PYTHONBASE};${PREFIX};} PYTHONPREFIX_SITELIBDIR= ${PYTHON_SITELIBDIR:S;${PYTHONBASE};${PREFIX};} # Used for recording the installed files. _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp # Ports bound to a certain python version SHOULD # - use the PYTHON_PKGNAMEPREFIX # - use directories using the PYTHON_PKGNAMEPREFIX # - install binaries using the required PYTHON_VER, with # the default python version creating a symlink to the original binary # name (for staging-aware ports). # # What makes a port 'bound' to a certain python version? # - it installs data into PYTHON_SITELIBDIR, PYTHON_INCLUDEDIR, ... # - it links against libpython*.so # - it uses USE_PYTHON=distutils # -.if defined(_PYTHON_FEATURE_CYTHON) +. if defined(_PYTHON_FEATURE_CYTHON) BUILD_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} -.endif +. endif -.if defined(_PYTHON_FEATURE_CYTHON_RUN) +. if defined(_PYTHON_FEATURE_CYTHON_RUN) RUN_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} -.endif +. endif -.if defined(_PYTHON_FEATURE_CONCURRENT) -.if !defined(_PYTHON_FEATURE_FLAVORS) && (${_PYTHON_VERSION_MINIMUM:M3*} || ${_PYTHON_VERSION_MAXIMUM:M2*}) +. if defined(_PYTHON_FEATURE_CONCURRENT) +. if !defined(_PYTHON_FEATURE_FLAVORS) && (${_PYTHON_VERSION_MINIMUM:M3*} || ${_PYTHON_VERSION_MAXIMUM:M2*}) DEV_WARNING+= "USE_PYTHON=concurrent when only one of Python 2 or 3 is supported AND not using flavors does not make any sense" -.endif +. endif _USES_POST+= uniquefiles:dirs -.if defined(_PYTHON_FEATURE_FLAVORS) && ${FLAVOR} == ${FLAVORS:[1]} +. if defined(_PYTHON_FEATURE_FLAVORS) && ${FLAVOR} == ${FLAVORS:[1]} UNIQUE_DEFAULT_LINKS= yes -.elif !defined(_PYTHON_FEATURE_FLAVORS) && ${_PYTHON_VERSION} == ${PYTHON_DEFAULT} +. elif !defined(_PYTHON_FEATURE_FLAVORS) && ${_PYTHON_VERSION} == ${PYTHON_DEFAULT} UNIQUE_DEFAULT_LINKS= yes -.else +. else UNIQUE_DEFAULT_LINKS= no -.endif +. endif UNIQUE_PREFIX= ${PYTHON_PKGNAMEPREFIX} UNIQUE_SUFFIX= -${PYTHON_VER} UNIQUE_SUFFIX_TYPES+= SUFFIX_MAN UNIQUE_SUFFIX_MAN_WITH_EXT= .[1-9ln] UNIQUE_SUFFIX_MAN_EXTRA_EXT= .gz -.if defined(_PYTHON_FEATURE_AUTOPLIST) +. if defined(_PYTHON_FEATURE_AUTOPLIST) _UNIQUE_FIND_SUFFIX_FILES= ${SED} -e 's|^${PREFIX}/||' ${_PYTHONPKGLIST} ${TMPPLIST} -.else +. else _UNIQUE_FIND_SUFFIX_FILES= ${SED} -e 's|^${PREFIX}/||' ${TMPPLIST} 2>/dev/null -.endif +. endif UNIQUE_FIND_SUFFIX_FILES+= ${_UNIQUE_FIND_SUFFIX_FILES} | \ ${EGREP} -he '^bin/.*$$|^sbin/.*$$|^libexec/.*$$' UNIQUE_FIND_SUFFIX_MAN_FILES+= ${_UNIQUE_FIND_SUFFIX_FILES} | \ ${EGREP} -he '^man/man[1-9ln]/.*$$|^share/man/man[1-9ln]/.*$$' -.endif # defined(_PYTHON_FEATURE_CONCURRENT) +. endif # defined(_PYTHON_FEATURE_CONCURRENT) _CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} -.if defined(_PYTHON_FEATURE_DISTUTILS) && \ +. if defined(_PYTHON_FEATURE_DISTUTILS) && \ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools &&\ ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools44 -.if ${PYTHON_VER} == 2.7 +. if ${PYTHON_VER} == 2.7 BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR} -.else +. else BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} -.endif -.endif +. endif +. endif # distutils support PYSETUP?= setup.py PYDISTUTILS_SETUP?= -c \ "import sys; import setuptools; \ __file__='${PYSETUP}'; sys.argv[0]='${PYSETUP}'; \ exec(compile(open(__file__, 'rb').read().replace(b'\\r\\n', b'\\n'), __file__, 'exec'))" PYDISTUTILS_CONFIGUREARGS?= # empty PYDISTUTILS_BUILDARGS?= # empty PYDISTUTILS_INSTALLARGS?= -c -O1 --prefix=${PREFIX} -.if defined(_PYTHON_FEATURE_DISTUTILS) -. if !defined(PYDISTUTILS_INSTALLNOSINGLE) +. if defined(_PYTHON_FEATURE_DISTUTILS) +. if !defined(PYDISTUTILS_INSTALLNOSINGLE) PYDISTUTILS_INSTALLARGS+= --single-version-externally-managed -. endif +. endif PYDISTUTILS_INSTALLARGS+= --root=${STAGEDIR} -.endif +. endif PYDISTUTILS_INSTALLARGS:= --record ${_PYTHONPKGLIST} \ ${PYDISTUTILS_INSTALLARGS} PYDISTUTILS_PKGNAME?= ${PORTNAME} PYDISTUTILS_PKGVERSION?=${PORTVERSION} PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -.if !defined(_PYTHON_FEATURE_NOEGGINFO) && \ +. if !defined(_PYTHON_FEATURE_NOEGGINFO) && \ !defined(_PYTHON_FEATURE_AUTOPLIST) && \ defined(_PYTHON_FEATURE_DISTUTILS) && \ defined(PYTHON_REL) _USES_stage+= 933:add-plist-egginfo add-plist-egginfo: -. for egginfo in ${PYDISTUTILS_EGGINFO} +. for egginfo in ${PYDISTUTILS_EGGINFO} if [ -d "${PYDISTUTILS_EGGINFODIR}/${egginfo}" ]; then \ ${LS} ${PYDISTUTILS_EGGINFODIR}/${egginfo} | while read f; do \ ${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PREFIX}/;;}/${egginfo}/$${f} >> ${TMPPLIST}; \ done; \ fi; -. endfor -.endif +. endfor +. endif -.if defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) +. if defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) _RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} _RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} _USES_stage+= 934:add-plist-pymod add-plist-pymod: @${SED} -e 's|^"\(.*\)"$$|\1|' \ -e 's|^${STAGEDIR}${PREFIX}/||' \ -e 's|^${PREFIX}/||' \ -e 's|^\(man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ -e 's|^\(share/man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ -e 's|[[:alnum:]|[:space:]]*/\.\./*||g; s|/\./|/|g' \ ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} -.else -.if ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) +. else +. if ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) # When Python version is 3.2+ we rewrite all the filenames # of TMPPLIST that end with .py[co], so that they conform # to PEP 3147 (see https://www.python.org/dev/peps/pep-3147/) PYMAGICTAG= ${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)' _USES_stage+= 935:add-plist-python add-plist-python: @${AWK} '\ /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ /^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ {print} \ ' \ pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \ ${TMPPLIST} > ${TMPPLIST}.pyc_tmp @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} -.endif # ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) -.endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) +. endif # ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) +. endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) # Fix for programs that build python from a GNU auto* environment CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" # By default CMake picks up the highest available version of Python package. # Enforce the version required by the port or the default. CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER} # Python 3rd-party modules PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR} PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.21,1:math/py-numpy@${PY_FLAVOR} # Common Python modules that can be needed but only for some versions of Python. -.if ${PYTHON_REL} < 30500 -.else +. if ${PYTHON_REL} < 30500 +. else PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR} -.endif +. endif -.if ${PYTHON_VER} != ${PYTHON_DEFAULT} +. if ${PYTHON_VER} != ${PYTHON_DEFAULT} PY_MERCURIAL= ${PYTHON_PKGNAMEPREFIX}mercurial>=5.9:devel/mercurial@${PY_FLAVOR} -.else +. else PY_MERCURIAL= mercurial>=5.9:devel/mercurial@${PY_FLAVOR} -.endif +. endif CMAKE_ARGS+= -DBOOST_PYTHON_SUFFIX:STRING=${PYTHON_SUFFIX} PY_BOOST_LIB= boost_python${PYTHON_SUFFIX} PY_BOOST= lib${PY_BOOST_LIB}.so:devel/boost-python-libs@${PY_FLAVOR} # dependencies -.for _stage in PATCH BUILD RUN TEST -. if defined(_PYTHON_${_stage}_DEP) +. for _stage in PATCH BUILD RUN TEST +. if defined(_PYTHON_${_stage}_DEP) ${_stage}_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} -. endif -.endfor +. endif +. endfor # set $PREFIX as Python's one -.if defined(_PYTHON_FEATURE_PYTHONPREFIX) +. if defined(_PYTHON_FEATURE_PYTHONPREFIX) PREFIX= ${PYTHONBASE} -.endif +. endif # Substitutions for pkg-plist # Use a short form of the PYTHONPREFIX_*DIR variables; we don't need the # base directory in the plist file. PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \ PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \ PYTHON_PLATFORM=${PYTHON_PLATFORM} \ PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \ PYTHON_SUFFIX=${PYTHON_SUFFIX} \ PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ PYTHON_VER=${PYTHON_VER} \ PYTHON_VERSION=${PYTHON_VERSION} -.if ${PYTHON_REL} < 30000 +. if ${PYTHON_REL} < 30000 PLIST_SUB+= PYTHON2="" PYTHON3="@comment " -.else +. else PLIST_SUB+= PYTHON2="@comment " PYTHON3="" -.endif +. endif _USES_POST+= python .endif # _INCLUDE_USES_PYTHON_MK .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) _INCLUDE_USES_PYTHON_POST_MK= yes # py-distutils support PYDISTUTILS_CONFIGURE_TARGET?= config PYDISTUTILS_BUILD_TARGET?= build PYDISTUTILS_INSTALL_TARGET?= install -.if defined(_PYTHON_FEATURE_DISTUTILS) +. if defined(_PYTHON_FEATURE_DISTUTILS) LDSHARED?= ${CC} -shared MAKE_ENV+= LDSHARED="${LDSHARED}" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= -.if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE) +. if !target(do-configure) && !defined(HAS_CONFIGURE) && !defined(GNU_CONFIGURE) do-configure: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}) -.endif +. endif -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) -.endif +. endif -.if !target(do-install) +. if !target(do-install) do-install: @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) -.endif -.endif # defined(_PYTHON_FEATURE_DISTUTILS) +. endif +. endif # defined(_PYTHON_FEATURE_DISTUTILS) .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) diff --git a/Mk/Uses/qmail.mk b/Mk/Uses/qmail.mk index 1923cb329429..4bf431c53346 100644 --- a/Mk/Uses/qmail.mk +++ b/Mk/Uses/qmail.mk @@ -1,61 +1,61 @@ # Feature: qmail # Usage: USES=qmail or USES=qmail:ARGS # Valid ARGS: both (default, implicit), run, build, vars # # Ports can use the following vars: # # QMAIL_PREFIX - Define it if qmail is installed in a different PREFIX. # Default: /var/qmail # # QMAIL_SLAVEPORT - Define it if you install a slaveport of qmail, to # prevent stale dependencies. Valid slaveports are: # ldap, mysql, spamcontrol and tls. # # MAINTAINER= bdrewery@FreeBSD.org .if !defined(_INCLUDE_QMAIL_MK) _INCLUDE_QMAIL_MK= yes QMAIL_PREFIX?= /var/qmail -.if empty(qmail_ARGS) +. if empty(qmail_ARGS) qmail_ARGS= both -.endif +. endif -.if ${qmail_ARGS} == "build" +. if ${qmail_ARGS} == "build" BUILD_DEPENDS+= ${_QMAIL_DEPENDS} -.elif ${qmail_ARGS} == "run" +. elif ${qmail_ARGS} == "run" RUN_DEPENDS+= ${_QMAIL_DEPENDS} -.elif ${qmail_ARGS} == "both" +. elif ${qmail_ARGS} == "both" BUILD_DEPENDS+= ${_QMAIL_DEPENDS} RUN_DEPENDS+= ${_QMAIL_DEPENDS} -.elif ${qmail_ARGS} == "vars" -.else +. elif ${qmail_ARGS} == "vars" +. else IGNORE= USES=qmail - invalid args: [${qmail_ARGS}] specified -.endif +. endif -.if ${qmail_ARGS} != "vars" +. if ${qmail_ARGS} != "vars" _QMAIL_VALID_SLAVEPORTS= ldap mysql spamcontrol tls -. if defined(QMAIL_SLAVEPORT) -. for slave in ${_QMAIL_VALID_SLAVEPORTS} -. if ${QMAIL_SLAVEPORT:tl} == ${slave} +. if defined(QMAIL_SLAVEPORT) +. for slave in ${_QMAIL_VALID_SLAVEPORTS} +. if ${QMAIL_SLAVEPORT:tl} == ${slave} _QMAIL_SLAVEPORT_OKAY= true -. endif -. endfor +. endif +. endfor -. if !defined(_QMAIL_SLAVEPORT_OKAY) +. if !defined(_QMAIL_SLAVEPORT_OKAY) IGNORE= Invalid QMAIL_SLAVEPORT value. Only one can be set, valid values are: ${_QMAIL_VALID_SLAVEPORTS} +. endif . endif -. endif -. if defined(QMAIL_SLAVEPORT) +. if defined(QMAIL_SLAVEPORT) _QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:mail/qmail-${QMAIL_SLAVEPORT:tl} -. else +. else _QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:mail/qmail -. endif +. endif -.endif +. endif .endif diff --git a/Mk/Uses/qt.mk b/Mk/Uses/qt.mk index a91f4d407e46..7cecb91cb169 100644 --- a/Mk/Uses/qt.mk +++ b/Mk/Uses/qt.mk @@ -1,409 +1,409 @@ # There are three Qt related USES files with different access to Qt. # - qmake: The port requires Qt's qmake to build -- creates the configure target # - auto includes qt.mk # - qt-dist: The port is a port for a part of Qt5 # - auto includes qt.mk and qmake.mk # - qt.mk - Dependency handling. USE_QT=foo bar # # Usage: # USES=qt:[,no_env] # # Versions: 5 # # Port variables: # USE_QT - List of Qt modules to depend on, with optional '_build' # and '_run' suffixes. Define it empty to include this file # without depending on Qt ports. # # MAINTAINER: kde@FreeBSD.org .if !defined(_QT_MK_INCLUDED) _QT_MK_INCLUDED= qt.mk # Qt versions currently supported by the framework. _QT_SUPPORTED?= 5 QT5_VERSION?= 5.15.2 # We accept the Qt version to be passed by either or all of the three mk files. . if empty(qt_ARGS) && empty(qmake_ARGS) && empty(qt-dist_ARGS) IGNORE= qt needs a version (${_QT_SUPPORTED}) passed via qt, qmake or qt-dist. . endif # Gather all the args together _QT_GLOBAL_ARGS= ${qt_ARGS} ${qmake_ARGS} ${qt-dist_ARGS} # Check fo the Qt version to be used _QT_VER= # empty . for ver in ${_QT_SUPPORTED:O:u} . if ${_QT_GLOBAL_ARGS:M${ver}} . if !defined(_QT_VERSION) _QT_VER= ${ver} . else . if ${_QT_VERSION} != ${ver} IGNORE?= cannot be installed: different Qt versions specified via qt:[${_QT_SUPPORTED:S/ //g}], qmake:[${_QT_SUPPORTED:S/ //g}] a qt-dist:[${_QT_SUPPORTED:S/ //g}] . endif . endif . endif . endfor . if empty(_QT_VER) IGNORE?= cannot decide what Qt version to use: specify one via qt:[${_QT_SUPPORTED:S/ //g}], qmake:[${_QT_SUPPORTED:S/ //g}] or qt-dist:[${_QT_SUPPORTED:S/ //g}] . endif # Set the shortcuts used from now on _QT_RELNAME= qt${_QT_VER} _QT_VERSION= ${QT${_QT_VER}_VERSION} # A wrapper (qtchooser) is used to invoke binaries. QT_BINDIR_REL?= ${QT_ARCHDIR_REL}/bin QT_INCDIR_REL?= include/${_QT_RELNAME} QT_LIBDIR_REL?= lib/${_QT_RELNAME} QT_ARCHDIR_REL?= ${QT_LIBDIR_REL} QT_PLUGINDIR_REL?= ${QT_ARCHDIR_REL}/plugins QT_LIBEXECDIR_REL?= libexec/${_QT_RELNAME} QT_IMPORTDIR_REL?= ${QT_ARCHDIR_REL}/imports QT_QMLDIR_REL?= ${QT_ARCHDIR_REL}/qml QT_DATADIR_REL?= share/${_QT_RELNAME} QT_DOCDIR_REL?= share/doc/${_QT_RELNAME} QT_L10NDIR_REL?= ${QT_DATADIR_REL}/translations QT_ETCDIR_REL?= etc/xdg QT_EXAMPLEDIR_REL?= share/examples/${_QT_RELNAME} QT_TESTDIR_REL?= ${QT_DATADIR_REL}/tests QT_CMAKEDIR_REL?= lib/cmake # Not customizable. QT_MKSPECDIR_REL= ${QT_ARCHDIR_REL}/mkspecs _QT_LIBVER= ${_QT_VERSION:R:R} LCONVERT?= ${QT_BINDIR}/lconvert LRELEASE?= ${QT_BINDIR}/lrelease LUPDATE?= ${QT_BINDIR}/lupdate MOC?= ${QT_BINDIR}/moc RCC?= ${QT_BINDIR}/rcc UIC?= ${QT_BINDIR}/uic QMAKE?= ${QT_BINDIR}/qmake QCOLLECTIONGENERATOR?= ${QT_BINDIR}/qcollectiongenerator QHELPGENERATOR?= ${QT_BINDIR}/qhelpgenerator # Needed to redefine the qmake target for internal Qt configuration. _QMAKE?= ${QMAKE} QMAKESPECNAME?= freebsd-${QMAKE_COMPILER} QMAKESPEC?= ${QT_MKSPECDIR}/${QMAKESPECNAME} # The whole Qt distribution should be built with the same compiler, but it's # better to support custom settings. Dereferencing the detection allows to # avoid forking a shell on each inclusion of this file, and to catch any CXX # customization (via USE_GCC, etc.). QMAKE_COMPILER= $$(ccver="$$(${CXX} --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac) . for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \ QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC \ CMAKE QT_${dir}DIR= ${PREFIX}/${QT_${dir}DIR_REL} # Export all directories to the plist substituion for QT_DIST ports. # For the others, exclude QT_CMAKEDIR and QT_ETCDIR. . if ${dir:NCMAKE} && ${dir:NETC} PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}" . endif . endfor # Pass the chosen Qt version to the environment for qtchooser. CONFIGURE_ENV+= QT_SELECT=${_QT_RELNAME} MAKE_ENV+= QT_SELECT=${_QT_RELNAME} # Make sure both the installed mkspecs as well as the ones being built are # found, with the ones from the port being built having preference. CONFIGURE_ENV+= QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules" MAKE_ENV+= QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules" _USES_POST+= qt .endif # _QT_MK_INCLUDED # ============================================================================= # # ============================================================================= .if defined(_POSTMKINCLUDED) && !defined(_QT_MK_POST_INCLUDED) _QT_MK_POST_INCLUDED= qt.mk # The Qt components supported by qt.mk: list of shared, and version specific ones _USE_QT_ALL= assistant dbus declarative declarative-test designer doc gui help \ imageformats l10n linguist linguisttools multimedia \ network opengl pixeltool qdbusviewer qmake script \ scripttools sql sql-mysql sql-odbc sql-pgsql \ sql-sqlite2 sql-sqlite3 svg testlib webkit \ xml xmlpatterns -.if ${ARCH} == amd64 || ${ARCH} == i386 +. if ${ARCH} == amd64 || ${ARCH} == i386 _USE_QT_ALL+= sql-ibase -.endif +. endif _USE_QT5_ONLY= 3d buildtools charts concurrent connectivity \ core datavis3d diag examples gamepad \ graphicaleffects location networkauth paths phonon4 plugininfo printsupport \ qdbus qdoc qdoc-data qev quick3d quickcontrols quickcontrols2 \ quicktimeline remoteobjects scxml sensors serialbus serialport speech \ sql-tds uiplugin uitools virtualkeyboard wayland webchannel webglplugin \ webengine websockets websockets-qml webview widgets x11extras # Dependency tuples: _LIB should be preferred if possible. qt-3d_PORT= graphics/${_QT_RELNAME}-3d qt-3d_LIB= libQt${_QT_LIBVER}3DCore.so qt-assistant_PORT= devel/${_QT_RELNAME}-assistant qt-assistant_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/assistant # Always build with *this* version's buildtools qt-buildtools_PORT= devel/${_QT_RELNAME}-buildtools qt-buildtools_PATH= ${_QT_RELNAME}-buildtools>=${_QT_VERSION} qt-charts_PORT= x11-toolkits/${_QT_RELNAME}-charts qt-charts_LIB= libQt${_QT_LIBVER}Charts.so qt-concurrent_PORT= devel/${_QT_RELNAME}-concurrent qt-concurrent_LIB= libQt${_QT_LIBVER}Concurrent.so qt-connectivity_PORT= comms/${_QT_RELNAME}-connectivity qt-connectivity_LIB= libQt${_QT_LIBVER}Bluetooth.so qt-core_PORT= devel/${_QT_RELNAME}-core qt-core_LIB= libQt${_QT_LIBVER}Core.so qt-datavis3d_PORT= x11-toolkits/${_QT_RELNAME}-datavis3d qt-datavis3d_LIB= libQt${_QT_LIBVER}DataVisualization.so qt-dbus_PORT= devel/${_QT_RELNAME}-dbus qt-dbus_LIB= libQt${_QT_LIBVER}DBus.so qt-declarative_PORT= x11-toolkits/${_QT_RELNAME}-declarative qt-declarative_LIB= libQt${_QT_LIBVER}Qml.so qt-declarative-test_PORT= x11-toolkits/${_QT_RELNAME}-declarative-test qt-declarative-test_LIB= libQt${_QT_LIBVER}QuickTest.so qt-designer_PORT= devel/${_QT_RELNAME}-designer qt-designer_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/designer qt-diag_PORT= sysutils/${_QT_RELNAME}-qtdiag qt-diag_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qtdiag qt-doc_PORT= misc/${_QT_RELNAME}-doc qt-doc_PATH= ${_QT_RELNAME}-doc>=${_QT_VERSION:R:R} qt-examples_PORT= misc/${_QT_RELNAME}-examples qt-examples_PATH= ${_QT_RELNAME}-examples>=${_QT_VERSION:R:R} qt-gamepad_PORT= x11-toolkits/${_QT_RELNAME}-gamepad qt-gamepad_LIB= libQt${_QT_LIBVER}Gamepad.so qt-graphicaleffects_PORT= graphics/${_QT_RELNAME}-graphicaleffects qt-graphicaleffects_PATH= ${LOCALBASE}/${QT_QMLDIR_REL}/QtGraphicalEffects/qmldir qt-gui_PORT= x11-toolkits/${_QT_RELNAME}-gui qt-gui_LIB= libQt${_QT_LIBVER}Gui.so qt-help_PORT= devel/${_QT_RELNAME}-help qt-help_LIB= libQt${_QT_LIBVER}Help.so qt-imageformats_PORT= graphics/${_QT_RELNAME}-imageformats qt-imageformats_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/imageformats/libqtiff.so qt-linguist_PORT= devel/${_QT_RELNAME}-linguist qt-linguist_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/linguist qt-linguisttools_PORT= devel/${_QT_RELNAME}-linguisttools qt-linguisttools_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/lrelease qt-location_PORT= devel/${_QT_RELNAME}-location qt-location_LIB= libQt${_QT_LIBVER}Location.so qt-l10n_PORT= misc/${_QT_RELNAME}-l10n qt-l10n_PATH= ${_QT_RELNAME}-l10n>=${_QT_VERSION:R:R} qt-multimedia_PORT= multimedia/${_QT_RELNAME}-multimedia qt-multimedia_LIB= libQt${_QT_LIBVER}Multimedia.so qt-network_PORT= net/${_QT_RELNAME}-network qt-network_LIB= libQt${_QT_LIBVER}Network.so qt-networkauth_PORT= net/${_QT_RELNAME}-networkauth qt-networkauth_LIB= libQt${_QT_LIBVER}NetworkAuth.so qt-opengl_PORT= graphics/${_QT_RELNAME}-opengl qt-opengl_LIB= libQt${_QT_LIBVER}OpenGL.so qt-paths_PORT= sysutils/${_QT_RELNAME}-qtpaths qt-paths_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qtpaths qt-pixeltool_PORT= graphics/${_QT_RELNAME}-pixeltool qt-pixeltool_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/pixeltool qt-phonon4_PORT= multimedia/phonon qt-phonon4_LIB= libphonon4${_QT_RELNAME}.so qt-plugininfo_PORT= sysutils/${_QT_RELNAME}-qtplugininfo qt-plugininfo_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qtplugininfo qt-printsupport_PORT= print/${_QT_RELNAME}-printsupport qt-printsupport_LIB= libQt${_QT_LIBVER}PrintSupport.so qt-qdbus_PORT= devel/${_QT_RELNAME}-qdbus qt-qdbus_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qdbus qt-qdbusviewer_PORT= devel/${_QT_RELNAME}-qdbusviewer qt-qdbusviewer_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qdbusviewer qt-qdoc_PORT= devel/${_QT_RELNAME}-qdoc qt-qdoc_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qdoc qt-qdoc-data_PORT= devel/${_QT_RELNAME}-qdoc-data qt-qdoc-data_PATH= ${LOCALBASE}/${QT_DOCDIR_REL}/global/config.qdocconf qt-qev_PORT= x11/${_QT_RELNAME}-qev qt-qev_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qev # Always build with *this* version's qmake qt-qmake_PORT= devel/${_QT_RELNAME}-qmake qt-qmake_PATH= ${_QT_RELNAME}-qmake>=${_QT_VERSION} qt-quick3d_PORT= x11-toolkits/${_QT_RELNAME}-quick3d qt-quick3d_LIB= libQt${_QT_LIBVER}Quick3D.so qt-quickcontrols_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols qt-quickcontrols_PATH= ${LOCALBASE}/${QT_QMLDIR_REL}/QtQuick/Controls/qmldir qt-quickcontrols2_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols2 qt-quickcontrols2_LIB= libQt${_QT_LIBVER}QuickControls2.so qt-quicktimeline_PORT= x11-toolkits/${_QT_RELNAME}-quicktimeline qt-quicktimeline_PATH= ${LOCALBASE}/${QT_QMLDIR_REL}/QtQuick/Timeline/libqtquicktimelineplugin.so qt-remoteobjects_PORT= devel/${_QT_RELNAME}-remoteobjects qt-remoteobjects_LIB= libQt${_QT_LIBVER}RemoteObjects.so qt-sensors_PORT= comms/${_QT_RELNAME}-sensors qt-sensors_LIB= libQt${_QT_LIBVER}Sensors.so qt-script_PORT= devel/${_QT_RELNAME}-script qt-script_LIB= libQt${_QT_LIBVER}Script.so qt-scripttools_PORT= devel/${_QT_RELNAME}-scripttools qt-scripttools_LIB= libQt${_QT_LIBVER}ScriptTools.so qt-scxml_PORT= devel/${_QT_RELNAME}-scxml qt-scxml_LIB= libQt${_QT_LIBVER}Scxml.so qt-serialbus_PORT= comms/${_QT_RELNAME}-serialbus qt-serialbus_LIB= libQt${_QT_LIBVER}SerialBus.so qt-serialport_PORT= comms/${_QT_RELNAME}-serialport qt-serialport_LIB= libQt${_QT_LIBVER}SerialPort.so qt-speech_PORT= accessibility/${_QT_RELNAME}-speech qt-speech_LIB= libQt${_QT_LIBVER}TextToSpeech.so qt-sql_PORT= databases/${_QT_RELNAME}-sql qt-sql_LIB= libQt${_QT_LIBVER}Sql.so qt-sql-pgsql_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsqlpsql.so qt-sql-sqlite3_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsqlite.so . for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds qt-sql-${db}_PORT= databases/${_QT_RELNAME}-sqldrivers-${db} qt-sql-${db}_PATH?= ${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsql${db:C/^sql//}.so . endfor qt-svg_PORT= graphics/${_QT_RELNAME}-svg qt-svg_LIB= libQt${_QT_LIBVER}Svg.so qt-testlib_PORT= devel/${_QT_RELNAME}-testlib qt-testlib_LIB= libQt${_QT_LIBVER}Test.so qt-uiplugin_PORT= x11-toolkits/${_QT_RELNAME}-uiplugin qt-uiplugin_PATH= ${LOCALBASE}/${QT_INCDIR_REL}/QtUiPlugin/QtUiPlugin qt-uitools_PORT= devel/${_QT_RELNAME}-uitools qt-uitools_PATH= ${LOCALBASE}/${QT_LIBDIR_REL}/libQt${_QT_LIBVER}UiTools.a qt-virtualkeyboard_PORT= x11-toolkits/${_QT_RELNAME}-virtualkeyboard qt-virtualkeyboard_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/platforminputcontexts/libqtvirtualkeyboardplugin.so qt-wayland_PORT= graphics/${_QT_RELNAME}-wayland qt-wayland_LIB= libQt${_QT_LIBVER}WaylandClient.so qt-webchannel_PORT= www/${_QT_RELNAME}-webchannel qt-webchannel_LIB= libQt${_QT_LIBVER}WebChannel.so qt-webengine_PORT= www/${_QT_RELNAME}-webengine qt-webengine_LIB= libQt${_QT_LIBVER}WebEngine.so qt-webglplugin_PORT= www/${_QT_RELNAME}-webglplugin qt-webglplugin_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/platforms/libqwebgl.so qt-websockets_PORT= www/${_QT_RELNAME}-websockets qt-websockets_LIB= libQt${_QT_LIBVER}WebSockets.so qt-websockets-qml_PORT= www/${_QT_RELNAME}-websockets-qml qt-websockets-qml_PATH= ${LOCALBASE}/${QT_QMLDIR_REL}/QtWebSockets/qmldir qt-webkit_PORT= www/${_QT_RELNAME}-webkit qt-webkit_LIB= libQt${_QT_LIBVER}WebKit.so qt-webview_PORT= www/${_QT_RELNAME}-webview qt-webview_LIB= libQt${_QT_LIBVER}WebView.so qt-widgets_PORT= x11-toolkits/${_QT_RELNAME}-widgets qt-widgets_LIB= libQt${_QT_LIBVER}Widgets.so qt-x11extras_PORT= x11/${_QT_RELNAME}-x11extras qt-x11extras_LIB= libQt${_QT_LIBVER}X11Extras.so qt-xml_PORT= textproc/${_QT_RELNAME}-xml qt-xml_LIB= libQt${_QT_LIBVER}Xml.so qt-xmlpatterns_PORT= textproc/${_QT_RELNAME}-xmlpatterns qt-xmlpatterns_LIB= libQt${_QT_LIBVER}XmlPatterns.so # Actually add the dependencies to the proper lists. _USE_QT_ALL+= ${_USE_QT${_QT_VER}_ONLY} _USE_QT= ${USE_QT} # Iterate through components deprived of suffix. . for component in ${_USE_QT:O:u:C/_(build|run)$//} # Check that the component is valid. . if ${_USE_QT_ALL:M${component}} != "" # Skip meta-components (currently none). . if defined(qt-${component}_PORT) && (defined(qt-${component}_PATH) || defined(qt-${component}_LIB)) # Check if a dependency type is explicitly requested. . if ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == "" qt-${component}_TYPE= # empty . if ${_USE_QT:M${component}_build} != "" qt-${component}_TYPE+= build . endif . if ${_USE_QT:M${component}_run} != "" qt-${component}_TYPE+= run . endif . endif # ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == "" # If no dependency type is set, default to full dependency. . if !defined(qt-${component}_TYPE) qt-${component}_TYPE= build run . endif # Set real dependencies. . if defined(qt-${component}_LIB) && ${qt-${component}_TYPE:Mbuild} && ${qt-${component}_TYPE:Mrun} LIB_DEPENDS+= ${qt-${component}_LIB}:${qt-${component}_PORT} . else qt-${component}_PATH?= ${QT_LIBDIR}/${qt-${component}_LIB} qt-${component}_DEPENDS= ${qt-${component}_PATH}:${qt-${component}_PORT} . if ${qt-${component}_TYPE:Mbuild} != "" BUILD_DEPENDS+= ${qt-${component}_DEPENDS} . endif . if ${qt-${component}_TYPE:Mrun} != "" RUN_DEPENDS+= ${qt-${component}_DEPENDS} . endif . endif # ${qt-${component}_LIB} && ${qt-${component}_TYPE:Mbuild} && ${qt-${component}_TYPE:Mrun} . endif # defined(qt-${component}_PORT) && defined(qt-${component}_PATH) . else # ! ${_USE_QT_ALL:M${component}} != "" IGNORE= cannot be installed: unknown USE_QT component '${component}' . endif # ${_USE_QT_ALL:M${component}} != "" . endfor .endif # defined(_QT_MK_POST_INCLUDED) diff --git a/Mk/Uses/readline.mk b/Mk/Uses/readline.mk index 129c5c910c6b..01b5ed09093b 100644 --- a/Mk/Uses/readline.mk +++ b/Mk/Uses/readline.mk @@ -1,19 +1,19 @@ # handle dependency on the readline port # # Feature: readline # Usage: USES=readline # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_READLINE_MK) _INCLUDE_USES_READLINE_MK= yes -.if !empty(readline_ARGS) +. if !empty(readline_ARGS) IGNORE= Incorrect 'USES+= readline:${readline_ARGS}' readline takes no arguments -.endif +. endif LIB_DEPENDS+= libreadline.so.8:devel/readline CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib .endif diff --git a/Mk/Uses/samba.mk b/Mk/Uses/samba.mk index 101aa6439d68..c040d99fb374 100644 --- a/Mk/Uses/samba.mk +++ b/Mk/Uses/samba.mk @@ -1,40 +1,40 @@ # Handle dependency on samba # # Feature: samba # Usage: USES=samba or USES=samba:ARGS # Valid ARGS: build, env, lib, run # default is build,run (implicit) # # When subpackages are available this can be more granular # .if !defined(_INCLUDE_USES_SAMBA_MK) _INCLUDE_USES_SAMBA_MK= yes -.if !${samba_ARGS} +. if !${samba_ARGS} samba_ARGS= build run -.endif +. endif -.if ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} +. if ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} IGNORE= USES=samba has invalid arguments: ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} -.endif +. endif SAMBAPORT= net/samba${SAMBA_DEFAULT:S/.//} SAMBAINCLUDES= ${LOCALBASE}/include/samba4 -.if ${SAMBA_DEFAULT} == 4.12 || ${SAMBA_DEFAULT} == 4.13 +. if ${SAMBA_DEFAULT} == 4.12 || ${SAMBA_DEFAULT} == 4.13 SAMBALIBS= ${LOCALBASE}/lib/samba4 -.else +. else IGNORE= Invalid version of samba: ${SAMBA_DEFAULT} -.endif +. endif -.if ${samba_ARGS:Mbuild} +. if ${samba_ARGS:Mbuild} BUILD_DEPENDS+= smbd:${SAMBAPORT} -.endif -.if ${samba_ARGS:Mlib} +. endif +. if ${samba_ARGS:Mlib} LIB_DEPENDS+= libsmbclient.so:${SAMBAPORT} -.endif -.if ${samba_ARGS:Mrun} +. endif +. if ${samba_ARGS:Mrun} RUN_DEPENDS+= smbd:${SAMBAPORT} -.endif +. endif .endif diff --git a/Mk/Uses/sdl.mk b/Mk/Uses/sdl.mk index 76839cd5cc28..5289c3c02f25 100644 --- a/Mk/Uses/sdl.mk +++ b/Mk/Uses/sdl.mk @@ -1,113 +1,113 @@ # Support for SDL-based ports # # Feature: sdl # Usage: USES=sdl # USE_SDL=sdl console gfx image mixer mm net pango sound ttf # sdl2 gfx2 image2 mixer2 net2 sound2 ttf2 # # USE_SDL specifies which SDL components to add as dependencies. # Not specifying USE_SDL with USES=sdl is an error. # USE_SDL=yes implies USE_SDL=sdl. This is deprecated # # MAINTAINER: amdmi3@FreeBSD.org .if !defined(_INCLUDE_USES_SDL_MK) _INCLUDE_USES_SDL_MK= yes # These are the current supported SDL1.2 modules _SDL_USE_ALL= sdl console gfx image mixer mm net pango sound ttf _SDL_sdl_LIB_DEPENDS= libSDL.so:devel/sdl12 _SDL_console_LIB_DEPENDS= libSDL_console.so:devel/sdl_console _SDL_console_REQUIRES= sdl _SDL_gfx_LIB_DEPENDS= libSDL_gfx.so:graphics/sdl_gfx _SDL_gfx_REQUIRES= sdl _SDL_image_LIB_DEPENDS= libSDL_image.so:graphics/sdl_image _SDL_image_REQUIRES= sdl _SDL_mixer_LIB_DEPENDS= libSDL_mixer.so:audio/sdl_mixer _SDL_mixer_REQUIRES= sdl _SDL_mm_LIB_DEPENDS= libSDLmm.so:devel/sdlmm _SDL_mm_REQUIRES= sdl _SDL_net_LIB_DEPENDS= libSDL_net.so:net/sdl_net _SDL_net_REQUIRES= sdl _SDL_pango_LIB_DEPENDS= libSDL_Pango.so:x11-toolkits/sdl_pango _SDL_pango_REQUIRES= sdl _SDL_sound_LIB_DEPENDS= libSDL_sound.so:audio/sdl_sound _SDL_sound_REQUIRES= sdl _SDL_ttf_LIB_DEPENDS= libSDL_ttf.so:graphics/sdl_ttf _SDL_ttf_REQUIRES= sdl # These are the current supported SDL2 modules _SDL_USE_ALL+= sdl2 gfx2 image2 mixer2 net2 sound2 ttf2 _SDL_sdl2_LIB_DEPENDS= libSDL2.so:devel/sdl20 _SDL_gfx2_LIB_DEPENDS= libSDL2_gfx.so:graphics/sdl2_gfx _SDL_gfx2_REQUIRES= sdl2 _SDL_image2_LIB_DEPENDS= libSDL2_image.so:graphics/sdl2_image _SDL_image2_REQUIRES= sdl2 _SDL_mixer2_LIB_DEPENDS= libSDL2_mixer.so:audio/sdl2_mixer _SDL_mixer2_REQUIRES= sdl2 _SDL_net2_LIB_DEPENDS= libSDL2_net.so:net/sdl2_net _SDL_net2_REQUIRES= sdl2 _SDL_sound2_LIB_DEPENDS= libSDL2_sound.so:audio/sdl2_sound _SDL_sound2_REQUIRES= sdl2 _SDL_ttf2_LIB_DEPENDS= libSDL2_ttf.so:graphics/sdl2_ttf _SDL_ttf2_REQUIRES= sdl2 # Basic checks -.if !empty(sdl_ARGS) +. if !empty(sdl_ARGS) IGNORE= USES=sdl takes no arguments -.endif +. endif -.if !defined(USE_SDL) +. if !defined(USE_SDL) IGNORE= need to specify sdl component(s) with USE_SDL -.endif +. endif # Expand implied dependencies on main SDL/SDL2 ports _USE_SDL= -.for _component in ${USE_SDL} -. if !${_SDL_USE_ALL:M${_component}} +. for _component in ${USE_SDL} +. if !${_SDL_USE_ALL:M${_component}} IGNORE= uses unknown SDL component ${_component} -. else +. else _USE_SDL+= ${_component} ${_SDL_${_component}_REQUIRES} -. endif -.endfor +. endif +. endfor # Provide LIB_DEPENDS -.for _component in ${_USE_SDL:O:u} +. for _component in ${_USE_SDL:O:u} LIB_DEPENDS+= ${_SDL_${_component}_LIB_DEPENDS} -.endfor +. endfor # Provide dependency on main SDL ports -.if ${_USE_SDL:Msdl} +. if ${_USE_SDL:Msdl} SDL_CONFIG?= ${LOCALBASE}/bin/sdl-config BUILD_DEPENDS+= ${SDL_CONFIG}:devel/sdl12 CONFIGURE_ENV+= SDL_CONFIG=${SDL_CONFIG} MAKE_ENV+= SDL_CONFIG=${SDL_CONFIG} -.endif +. endif -.if ${_USE_SDL:Msdl2} +. if ${_USE_SDL:Msdl2} SDL2_CONFIG?= ${LOCALBASE}/bin/sdl2-config BUILD_DEPENDS+= ${SDL2_CONFIG}:devel/sdl20 CONFIGURE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} MAKE_ENV+= SDL2_CONFIG=${SDL2_CONFIG} -.endif +. endif # _INCLUDE_USES_SDL_MK .endif diff --git a/Mk/Uses/shared-mime-info.mk b/Mk/Uses/shared-mime-info.mk index 8f6bbca996c1..aa294cf5a208 100644 --- a/Mk/Uses/shared-mime-info.mk +++ b/Mk/Uses/shared-mime-info.mk @@ -1,19 +1,19 @@ # handle dependency depends on shared-mime-info and package regen # # Feature: shared-mime-info # Usage: USES=shared-mime-info # Valid ARGS: does not require args # # MAINTAINER: gnome@FreeBSD.org .if !defined(_INCLUDE_USES_SHARED_MIME_INFO_MK) _INCLUDE_USES_SHARED_MIME_INFO_MK= yes -.if !empty(shared-mime-info_ARGS) +. if !empty(shared-mime-info_ARGS) IGNORE= USES=shared-mime-info does not require args -.endif +. endif BUILD_DEPENDS+= update-mime-database:misc/shared-mime-info RUN_DEPENDS+= update-mime-database:misc/shared-mime-info .endif diff --git a/Mk/Uses/shebangfix.mk b/Mk/Uses/shebangfix.mk index 95d0b0a87346..20dba5279964 100644 --- a/Mk/Uses/shebangfix.mk +++ b/Mk/Uses/shebangfix.mk @@ -1,106 +1,106 @@ # Replace #! interpreters in scripts by what we actually have. # # Standard templates for bash, perl, python,... are included out of # the box, others can easily be added per port. # # Feature: shebangfix # Usage: USES=shebangfix # # SHEBANG_REGEX a regular expression to match files that needs to be converted # SHEBANG_FILES list of files or glob pattern relative to ${WRKSRC} # SHEBANG_GLOB list of glob pattern find(1) will match with # # To specify that ${WRKSRC}/path1/file and all .pl files in ${WRKSRC}/path2 # should be processed: # # SHEBANG_FILES= path1/file path2/*.pl # # To define custom shebangs to replace, use the following (note that # shebangs with spaces should be quoted): # # perl_OLD_CMD= /usr/bin/perl5.005 "/usr/bin/setenv perl5.005" # # To define a new shebang scheme add the following to the port Makefile: # # SHEBANG_LANG= lua # lua_OLD_CMD= /usr/bin/lua # lua_CMD= ${LOCALBASE}/bin/lua # # To override a definition, for example replacing /usr/bin/perl by # /usr/bin/env perl, add the following: # # perl_CMD= ${SETENV} perl # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_SHEBANGFIX_MK) _INCLUDE_USES_SHEBANGFIX_MK= yes SHEBANG_LANG+= bash java ksh perl php python ruby tcl tk -.if ${USES:Mlua*} +. if ${USES:Mlua*} SHEBANG_LANG+= lua lua_CMD?= ${LOCALBASE}/bin/${LUA_CMD} -.endif +. endif tcl_OLD_CMD+= /usr/bin/tclsh tcl_CMD?= ${TCLSH} tk_OLD_CMD+= /usr/bin/wish tk_CMD?= ${WISH} -.if ${USES:Mpython*} +. if ${USES:Mpython*} python_CMD?= ${PYTHON_CMD} -.endif +. endif # Replace the same patterns for all langs and setup a default, that may have # been set already above with ?=. -.for lang in ${SHEBANG_LANG} +. for lang in ${SHEBANG_LANG} ${lang}_CMD?= ${LOCALBASE}/bin/${lang} ${lang}_OLD_CMD+= "/usr/bin/env ${lang}" ${lang}_OLD_CMD+= /bin/${lang} ${lang}_OLD_CMD+= /usr/bin/${lang} ${lang}_OLD_CMD+= /usr/local/bin/${lang} -.endfor +. endfor -.for pyver in 2 3 +. for pyver in 2 3 python_OLD_CMD+= "/usr/bin/env python${pyver}" python_OLD_CMD+= /bin/python${pyver} python_OLD_CMD+= /usr/bin/python${pyver} python_OLD_CMD+= /usr/local/bin/python${pyver} -.endfor +. endfor -.for lang in ${SHEBANG_LANG} -. if !defined(${lang}_CMD) +. for lang in ${SHEBANG_LANG} +. if !defined(${lang}_CMD) IGNORE+= missing definition for ${lang}_CMD -. endif -. if !defined(${lang}_OLD_CMD) +. endif +. if !defined(${lang}_OLD_CMD) IGNORE+= missing definition for ${lang}_OLD_CMD -. endif -. for old_cmd in ${${lang}_OLD_CMD} +. endif +. for old_cmd in ${${lang}_OLD_CMD} _SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${old_cmd:C/\"//g}\([[:space:]]\)|\#!${${lang}_CMD}\1|" _SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${old_cmd:C/\"//g}$$|\#!${${lang}_CMD}|" +. endfor . endfor -.endfor _USES_patch+= 210:fix-shebang fix-shebang: -.if defined(SHEBANG_REGEX) +. if defined(SHEBANG_REGEX) @cd ${WRKSRC}; \ ${FIND} -E . -type f -iregex '${SHEBANG_REGEX}' \ -exec ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} {} + -.endif -.if defined(SHEBANG_GLOB) -. for f in ${SHEBANG_GLOB} +. endif +. if defined(SHEBANG_GLOB) +. for f in ${SHEBANG_GLOB} @cd ${WRKSRC}; \ ${FIND} . -type f -name '${f}' \ -exec ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} {} + -. endfor -.endif -.if defined(SHEBANG_FILES) +. endfor +. endif +. if defined(SHEBANG_FILES) @cd ${WRKSRC}; \ ${FIND} ${SHEBANG_FILES} -type f \ -exec ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} {} + -.endif +. endif .endif diff --git a/Mk/Uses/sqlite.mk b/Mk/Uses/sqlite.mk index aaf2cf49f14c..40ce90c27b9c 100644 --- a/Mk/Uses/sqlite.mk +++ b/Mk/Uses/sqlite.mk @@ -1,22 +1,22 @@ # Provide support for SQLite # Feature: sqlite # Usage: USES= sqlite[:version] # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_SQLITE_MK) _INCLUDE_USES_SQLITE_MK= yes -.if !empty(sqlite_ARGS) +. if !empty(sqlite_ARGS) SQLITE_VER= ${sqlite_ARGS} -.endif +. endif SQLITE_VER?= 3 -.if ${SQLITE_VER} == 3 +. if ${SQLITE_VER} == 3 LIB_DEPENDS+= libsqlite3.so:databases/sqlite${SQLITE_VER} -.elif ${SQLITE_VER} == 2 +. elif ${SQLITE_VER} == 2 LIB_DEPENDS+= libsqlite.so:databases/sqlite${SQLITE_VER} -.else +. else IGNORE= cannot install: unknown SQLite version: ${SQLITE_VER} -.endif +. endif .endif diff --git a/Mk/Uses/ssl.mk b/Mk/Uses/ssl.mk index 1b658ce18101..bec40d7bc99a 100644 --- a/Mk/Uses/ssl.mk +++ b/Mk/Uses/ssl.mk @@ -1,127 +1,127 @@ # Handle dependency on *ssl ports. # # Feature: SSL_DEFAULT # Usage: USES=ssl # Valid ARGS: none (build and run), build, run # # The user can choose which ssl library he wants with: # # DEFAULT_VERSIONS+= ssl= # # Variants being base, openssl, libressl, and libressl-devel. # # The Makefile sets these variables: # OPENSSLBASE - "/usr" or ${LOCALBASE} # OPENSSLDIR - path to openssl # OPENSSLLIB - path to the libs # OPENSSLINC - path to the matching includes # OPENSSLRPATH - rpath for dynamic linker # # MAKE_ENV - extended with the variables above # BUILD_DEPENDS - are added if needed # RUN_DEPENDS - are added if needed # # MAINTAINER: ports@FreeBSD.org # .if !defined(_INCLUDE_USES_SSL_MK) _INCLUDE_USES_SSL_MK= yes -.if !empty(ssl_ARGS:Nbuild:Nrun) +. if !empty(ssl_ARGS:Nbuild:Nrun) IGNORE= "USES=ssl invalid arguments ${ssl_ARGS}." -.endif +. endif -.if empty(ssl_ARGS) || (!empty(ssl_ARGS:Mbuild) && !empty(ssl_ARGS:Mrun)) +. if empty(ssl_ARGS) || (!empty(ssl_ARGS:Mbuild) && !empty(ssl_ARGS:Mrun)) _SSL_BUILD_DEP= 1 _SSL_RUN_DEP= 1 -.elif !empty(ssl_ARGS:Mbuild) +. elif !empty(ssl_ARGS:Mbuild) _SSL_BUILD_DEP= 1 -.elif !empty(ssl_ARGS:Mrun) +. elif !empty(ssl_ARGS:Mrun) _SSL_RUN_DEP= 1 -.endif +. endif -.if defined(BROKEN_SSL) && ${BROKEN_SSL:M${SSL_DEFAULT}} -. if defined(BROKEN_SSL_REASON_${SSL_DEFAULT}) +. if defined(BROKEN_SSL) && ${BROKEN_SSL:M${SSL_DEFAULT}} +. if defined(BROKEN_SSL_REASON_${SSL_DEFAULT}) BROKEN= does not build with DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT}: ${BROKEN_SSL_REASON_${SSL_DEFAULT}} -. elif defined(BROKEN_SSL_REASON) +. elif defined(BROKEN_SSL_REASON) BROKEN= does not build with DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT}: ${BROKEN_SSL_REASON} -. else +. else BROKEN= does not build with DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} +. endif . endif -.endif -.if defined(IGNORE_SSL) && ${IGNORE_SSL:M${SSL_DEFAULT}} -. if defined(IGNORE_SSL_REASON_${SSL_DEFAULT}) +. if defined(IGNORE_SSL) && ${IGNORE_SSL:M${SSL_DEFAULT}} +. if defined(IGNORE_SSL_REASON_${SSL_DEFAULT}) IGNORE= not compatible DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT}: ${IGNORE_SSL_REASON_${SSL_DEFAULT}} -. elif defined(IGNORE_SSL_REASON) +. elif defined(IGNORE_SSL_REASON) IGNORE= not compatible DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT}: ${IGNORE_SSL_REASON} -. else +. else IGNORE= not compatible DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} +. endif . endif -.endif -.if ${SSL_DEFAULT} == base +. if ${SSL_DEFAULT} == base OPENSSLBASE= /usr OPENSSLDIR?= /etc/ssl -. if !exists(${DESTDIR}/usr/lib/libcrypto.so) +. if !exists(${DESTDIR}/usr/lib/libcrypto.so) check-depends:: @${ECHO_CMD} "Dependency error: This port requires the OpenSSL library, which is part of" @${ECHO_CMD} "the FreeBSD crypto distribution, but not installed on your" @${ECHO_CMD} "machine. Please see the \"OpenSSL\" section in the handbook" @${ECHO_CMD} "(at \"https://docs.FreeBSD.org/en/books/handbook/security/#openssl\", for instance)" @${ECHO_CMD} "for instructions on how to obtain and install the FreeBSD" @${ECHO_CMD} "OpenSSL distribution." @${FALSE} -. endif -. if exists(${LOCALBASE}/lib/libcrypto.so) +. endif +. if exists(${LOCALBASE}/lib/libcrypto.so) check-depends:: @${ECHO_CMD} "Dependency error: This port wants the OpenSSL library from the FreeBSD" @${ECHO_CMD} "base system. You can't build against it, while a newer" @${ECHO_CMD} "version is installed by a port." @${ECHO_CMD} "Please deinstall the port, remove DEFAULT_VERSIONS=ssl=base or undefine WITH_OPENSSL_BASE." @${FALSE} -. endif +. endif -.else # ${SSL_DEFAULT} != base +. else # ${SSL_DEFAULT} != base OPENSSLBASE= ${LOCALBASE} OPENSSL_PORT= security/${SSL_DEFAULT} # Get OPENSSL_SHLIBVER from the port .sinclude <${PORTSDIR}/${OPENSSL_PORT}/version.mk> -. if !defined(OPENSSL_SHLIBVER) +. if !defined(OPENSSL_SHLIBVER) .error You are using an unsupported SSL provider ${SSL_DEFAULT} -. endif +. endif OPENSSLDIR?= ${OPENSSLBASE}/openssl -. if defined(_SSL_BUILD_DEP) +. if defined(_SSL_BUILD_DEP) BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT} -. endif -. if defined(_SSL_RUN_DEP) +. endif +. if defined(_SSL_RUN_DEP) RUN_DEPENDS+= ${LOCALBASE}/lib/libcrypto.so.${OPENSSL_SHLIBVER}:${OPENSSL_PORT} -. endif +. endif OPENSSLRPATH= ${LOCALBASE}/lib -.endif +. endif OPENSSLLIB= ${OPENSSLBASE}/lib OPENSSLINC= ${OPENSSLBASE}/include MAKE_ENV+= OPENSSLBASE=${OPENSSLBASE} MAKE_ENV+= OPENSSLDIR=${OPENSSLDIR} MAKE_ENV+= OPENSSLINC=${OPENSSLINC} MAKE_ENV+= OPENSSLLIB=${OPENSSLLIB} -.if defined(OPENSSLRPATH) -. if defined(USE_OPENSSL_RPATH) +. if defined(OPENSSLRPATH) +. if defined(USE_OPENSSL_RPATH) CFLAGS+= -Wl,-rpath,${OPENSSLRPATH} -. endif +. endif MAKE_ENV+= OPENSSLRPATH=${OPENSSLRPATH} OPENSSL_LDFLAGS+= -Wl,-rpath,${OPENSSLRPATH} -.endif +. endif LDFLAGS+= ${OPENSSL_LDFLAGS} .endif diff --git a/Mk/Uses/tar.mk b/Mk/Uses/tar.mk index 5146c66b8e09..a847cb540616 100644 --- a/Mk/Uses/tar.mk +++ b/Mk/Uses/tar.mk @@ -1,34 +1,34 @@ # handle tar archives # # Feature: tar # Usage: USES=tar[:[xz|lz|lzma|txz|bz[ip]2|tgz|tbz|tbz2|Z]] # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_TAR_MK) _INCLUDE_USES_TAR_MK= yes -.if ${tar_ARGS} == xz +. if ${tar_ARGS} == xz EXTRACT_SUFX?= .tar.xz -.elif ${tar_ARGS} == lz +. elif ${tar_ARGS} == lz EXTRACT_SUFX?= .tar.lz -.elif ${tar_ARGS} == lzma +. elif ${tar_ARGS} == lzma EXTRACT_SUFX?= .tar.lzma -.elif ${tar_ARGS} == txz +. elif ${tar_ARGS} == txz EXTRACT_SUFX?= .txz -.elif ${tar_ARGS} == bzip2 || ${tar_ARGS} == bz2 +. elif ${tar_ARGS} == bzip2 || ${tar_ARGS} == bz2 EXTRACT_SUFX?= .tar.bz2 -.elif ${tar_ARGS} == tgz +. elif ${tar_ARGS} == tgz EXTRACT_SUFX?= .tgz -.elif ${tar_ARGS} == tbz +. elif ${tar_ARGS} == tbz EXTRACT_SUFX?= .tbz -.elif ${tar_ARGS} == tbz2 +. elif ${tar_ARGS} == tbz2 EXTRACT_SUFX?= .tbz2 -.elif ${tar_ARGS} == Z +. elif ${tar_ARGS} == Z EXTRACT_SUFX?= .tar.Z -.elif empty(tar_ARGS) +. elif empty(tar_ARGS) EXTRACT_SUFX?= .tar -.else +. else IGNORE= Incorrect 'USES+=tar:${tar_ARGS}' -.endif +. endif .endif diff --git a/Mk/Uses/tcl.mk b/Mk/Uses/tcl.mk index 4ff56439b635..e9dc233fd889 100644 --- a/Mk/Uses/tcl.mk +++ b/Mk/Uses/tcl.mk @@ -1,232 +1,232 @@ # vim: ts=8 noexpandtab # # Provide support to use Tcl/Tk # # Variables set by this file: # # TCL_VER - Major.Minor version of Tcl # # TCLSH - Set to full path of the Tcl interpreter # # TCL_LIBDIR - Path where the Tcl libraries can be found # # TCL_INCLUDEDIR - Path where the Tcl C headers can be found # # # TK_VER - Major.Minor version of Tk # # WISH - Set to full path of the Tk interpreter # # TK_LIBDIR - Path where the Tk libraries can be found # # TK_INCLUDEDIR - Path where the Tk C headers can be found # # # # Usage: # # USES+= PORT[:(VERSION|wrapper),build,run,tea] # # where PORT is one of: # # - tcl - Depend on Tcl # - tk - Depend on both Tk and Tcl (Tk itself depends on Tcl) # # and VERSION is in one of the following formats: # # - (empty) - Depend on any installed version of PORT. If none # is installed, bring in the default version. See # ${_TCLTK_DEFAULT_VERSION} below. # # - 85, 86, 87 - Depend on a specific version series of PORT. Multiple # values are OK. The highest version available is # picked. # # - 85+, 86+, 87+ - Depend on any installed version greater or equal to # the specified version. # # If wrapper is specified, an additional dependency on tcl-wrapper or # tk-wrapper is added. It is NOT possible to select a specific version of # Tcl/Tk when using the wrapper. # # Build-time / Run-time only dependencies can be specified with build or run. # # Tea can be used for Tcl/Tk extensions that use the Tcl Extension Architecture # [http://www.tcl.tk/doc/tea] and allows to set common autoconf parameters. # # MAINTAINER: tcltk@FreeBSD.org .if ${USES:Mtk} || ${USES:Mtk\:*} -.if !defined(_TCLTK_PORT) +. if !defined(_TCLTK_PORT) _TCLTK_IGNORE= yes -.endif +. endif .endif .if !defined(_INCLUDE_USES_TCL_MK) && !defined(_TCLTK_IGNORE) _INCLUDE_USES_TCL_MK= yes # # List the currently available versions. # # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. _TCLTK_VALID_VERSIONS= 85 86 87 # # Bring in the default and check that the specified version is in the list of # valid versions. # _TCLTK_DEFAULT_VERSION= ${TCLTK_DEFAULT:S/.//} -.if ! ${_TCLTK_VALID_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} +. if ! ${_TCLTK_VALID_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} IGNORE= Invalid tcltk version ${TCLTK_DEFAULT} -.endif +. endif # # _TCLTK_PORT tells us whether we're depending on Tcl or Tk. When using # USES+=tk, the included file tk.mk sets this before including this file. # _TCLTK_PORT?= tcl # # Parse a ver+ argument. # -.if ${tcl_ARGS:M*+} +. if ${tcl_ARGS:M*+} _TCLTK_MIN_VERSION:= ${tcl_ARGS:M*+:S/+//} _TCLTK_WANTED_VERSIONS:=${_TCLTK_DEFAULT_VERSION} -.if ${_TCLTK_MIN_VERSION} == "85" +. if ${_TCLTK_MIN_VERSION} == "85" IGNORE= Minimum tcltk version 85+ is meaningless -.endif -.endif +. endif +. endif # # Parse one or more ver arguments. # -.if ${tcl_ARGS:M8[5-7]} +. if ${tcl_ARGS:M8[5-7]} _TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[5-7]} -.endif +. endif # # It makes little sense to specify both the wrapper and a specific version. # -.if ${tcl_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) +. if ${tcl_ARGS:Mwrapper} && defined(_TCLTK_WANTED_VERSIONS) IGNORE= USES=${_TCLTK_PORT}: it is not possible to specify both a version and the wrapper: ${tcl_ARGS} -.endif +. endif # # If no version was specified with any of the ver or ver+ arguments, set the # default version. # -.if !defined(_TCLTK_WANTED_VERSIONS) +. if !defined(_TCLTK_WANTED_VERSIONS) _TCLTK_WANTED_VERSIONS= ${_TCLTK_DEFAULT_VERSION} -.endif +. endif # # Resolve minimum versions (ver+). Append anything greater or equal than the # specified minimum version to the list of wanted versions. # -.if defined(_TCLTK_MIN_VERSION) -. for _v in ${_TCLTK_VALID_VERSIONS} -. if ${_TCLTK_MIN_VERSION} <= ${_v} +. if defined(_TCLTK_MIN_VERSION) +. for _v in ${_TCLTK_VALID_VERSIONS} +. if ${_TCLTK_MIN_VERSION} <= ${_v} _TCLTK_WANTED_VERSIONS+=${_v} -. endif -. endfor -.endif +. endif +. endfor +. endif # # Right now we have built a list of potential versions that we may depend on. # Let's sort them and remove any duplicates. We then locate the highest one # already installed, if any. # -.for _v in ${_TCLTK_WANTED_VERSIONS:O:u} +. for _v in ${_TCLTK_WANTED_VERSIONS:O:u} _TCLTK_HIGHEST_VERSION:=${_v} -. if exists(${LOCALBASE}/lib/lib${_TCLTK_PORT}${_v}.so) +. if exists(${LOCALBASE}/lib/lib${_TCLTK_PORT}${_v}.so) _TCLTK_WANTED_VERSION:= ${_v} -. endif -.endfor +. endif +. endfor # # If we couldn't find any wanted version installed, depend on the default or the highest one. -.if !defined(_TCLTK_WANTED_VERSION) -. if ${_TCLTK_WANTED_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} +. if !defined(_TCLTK_WANTED_VERSION) +. if ${_TCLTK_WANTED_VERSIONS:M${_TCLTK_DEFAULT_VERSION}} _TCLTK_WANTED_VERSION:= ${_TCLTK_DEFAULT_VERSION} -. else +. else _TCLTK_WANTED_VERSION:= ${_TCLTK_HIGHEST_VERSION} +. endif . endif -.endif # # Deprecate by default all ports depending on 8.5 -.if ${_TCLTK_WANTED_VERSION} == "85" +. if ${_TCLTK_WANTED_VERSION} == "85" DEPRECATED= Tcl/Tk 8.5 is nearing EOL, please consider porting to Tcl/Tk 8.6 -.endif +. endif # # Exported variables # TCL_VER:= ${_TCLTK_WANTED_VERSION:S/8/8./} TCL_SHLIB_VER:= ${_TCLTK_WANTED_VERSION} TCLSH:= ${LOCALBASE}/bin/tclsh${TCL_VER} TCL_LIBDIR:= ${LOCALBASE}/lib/tcl${TCL_VER} TCL_INCLUDEDIR:=${LOCALBASE}/include/tcl${TCL_VER} -.if ${_TCLTK_PORT} == "tk" +. if ${_TCLTK_PORT} == "tk" TK_VER:= ${_TCLTK_WANTED_VERSION:S/8/8./} TK_SHLIB_VER:= ${_TCLTK_WANTED_VERSION} WISH:= ${LOCALBASE}/bin/wish${TCL_VER} TK_LIBDIR:= ${LOCALBASE}/lib/tk${TK_VER} TK_INCLUDEDIR:= ${LOCALBASE}/include/tk${TK_VER} -.endif +. endif # # Dependencies # _TCLTK_BUILD_DEPENDS= _TCLTK_RUN_DEPENDS= _TCLTK_LIB_DEPENDS= # Construct the correct dependency lines (wrapper) -.if ${tcl_ARGS:Mwrapper} -. if ${_TCLTK_PORT} == "tcl" +. if ${tcl_ARGS:Mwrapper} +. if ${_TCLTK_PORT} == "tcl" _TCLTK_WRAPPER_PORT= tclsh:lang/tcl-wrapper -. elif ${_TCLTK_PORT} == "tk" +. elif ${_TCLTK_PORT} == "tk" _TCLTK_WRAPPER_PORT= wish:x11-toolkits/tk-wrapper +. endif . endif -.endif # Construct the correct dependency lines (Tcl/Tk) -.if ${_TCLTK_PORT} == "tcl" +. if ${_TCLTK_PORT} == "tcl" _TCLTK_EXE_LINE= tclsh${TCL_VER}:lang/tcl${_TCLTK_WANTED_VERSION} _TCLTK_LIB_LINE= libtcl${TCL_SHLIB_VER}.so:lang/tcl${_TCLTK_WANTED_VERSION} -.elif ${_TCLTK_PORT} == "tk" +. elif ${_TCLTK_PORT} == "tk" _TCLTK_EXE_LINE= wish${TK_VER}:x11-toolkits/tk${_TCLTK_WANTED_VERSION} _TCLTK_LIB_LINE= libtk${TK_SHLIB_VER}.so:x11-toolkits/tk${_TCLTK_WANTED_VERSION} \ libtcl${TCL_SHLIB_VER}.so:lang/tcl${_TCLTK_WANTED_VERSION} -.endif +. endif -.if ${tcl_ARGS:Mbuild} +. if ${tcl_ARGS:Mbuild} BUILD_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} -.elif ${tcl_ARGS:Mrun} +. elif ${tcl_ARGS:Mrun} RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ ${_TCLTK_EXE_LINE} -.else +. else RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT} LIB_DEPENDS+= ${_TCLTK_LIB_LINE} -.endif +. endif # Setup TEA stuff -.if ${tcl_ARGS:Mtea} +. if ${tcl_ARGS:Mtea} GNU_CONFIGURE= yes TCL_PKG?= ${PORTNAME:C/^tcl(-?)//:C/(-?)tcl\$//}${PORTVERSION} PLIST_SUB+= TCL_PKG=${TCL_PKG} CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \ --with-tcl=${TCL_LIBDIR} \ --with-tclinclude=${TCL_INCLUDEDIR} -. if ${_TCLTK_PORT} == "tk" +. if ${_TCLTK_PORT} == "tk" CONFIGURE_ARGS+=--with-tk=${TK_LIBDIR} --with-tkinclude=${TK_INCLUDEDIR} +. endif . endif -.endif .endif # defined(_INCLUDE_USES_TCL_MK) .undef _TCLTK_IGNORE diff --git a/Mk/Uses/terminfo.mk b/Mk/Uses/terminfo.mk index 02d496a8f0ae..67efd0e295f8 100644 --- a/Mk/Uses/terminfo.mk +++ b/Mk/Uses/terminfo.mk @@ -1,16 +1,16 @@ # handle terminfo.db and *.terminfo files used by ncurses # # Feature: terminfo # Usage: USES=terminfo # Valid ARGS: does not require args .if !defined(_INCLUDE_USES_TERMINFO_MK) _INCLUDE_USES_TERMINFO_MK= yes -.if !empty(terminfo_ARGS) +. if !empty(terminfo_ARGS) IGNORE= USES=terminfo does not require args -.endif +. endif PLIST_FILES+= @terminfo .endif diff --git a/Mk/Uses/trigger.mk b/Mk/Uses/trigger.mk index bd83691418b6..c43fba595a1b 100644 --- a/Mk/Uses/trigger.mk +++ b/Mk/Uses/trigger.mk @@ -1,29 +1,29 @@ # Feature: trigger # Usage: USES=trigger # Valid ARGS: none # # Variables: # TRIGGERS: list of triggers to package # # MAINTAINER= ports@FreeBSD.org .if !defined(_INCLUDE_USES_TRIGGER_MK) _INCLUDE_USES_TRIGGER_MK= yes -.if !empty(trigger_ARGS) +. if !empty(trigger_ARGS) IGNORE= Incorrect 'USES+= trigger:${trigger_ARGS}' trigger takes no arguments -.endif +. endif TRIGGERS?= ${PORTNAME} -.for t in ${TRIGGERS} +. for t in ${TRIGGERS} SUB_FILES+= ${t}.ucl PLIST_FILES+= ${LOCALBASE}/share/pkg/triggers/$t.ucl -.endfor +. endfor _USES_install+= 601:trigger-post-install trigger-post-install: ${MKDIR} ${STAGEDIR}${LOCALBASE}/share/pkg/triggers -.for t in ${TRIGGERS} +. for t in ${TRIGGERS} ${INSTALL_DATA} ${WRKDIR}/$t.ucl ${STAGEDIR}${LOCALBASE}/share/pkg/triggers/ -.endfor +. endfor .endif diff --git a/Mk/Uses/uidfix.mk b/Mk/Uses/uidfix.mk index 2c35530c94f8..b8828d4a8a29 100644 --- a/Mk/Uses/uidfix.mk +++ b/Mk/Uses/uidfix.mk @@ -1,29 +1,29 @@ # Changes some default behaviour of build systems to allow installing as user. # # Feature: uidfix # Usage: USES=uidfix # Valid ARGS: none # # MAINTAINER: bapt@FreeBSD.org .if !defined(_INCLUDE_USES_UIDFIX_MK) _INCLUDE_USES_UIDFIX_MK= yes -.if !defined(GID) +. if !defined(GID) GID!= id -g -.endif -.if ${UID} != 0 +. endif +. if ${UID} != 0 MAKE_ENV+= BINOWN=${UID} SHAREOWN=${UID} CONFOWN=${UID} LIBOWN=${UID} MAKE_ENV+= BINGRP=${GID} SHAREGRP=${GID} CONFGRP=${GID} LIBGRP=${GID} MAKE_ENV+= INCSOWN=${UID} INCSGRP=${GID} BINOWN= ${UID} LIBOWN= ${UID} SHAREOWN= ${UID} WWWOWN= ${UID} BINGRP= ${GID} LIBGRP= ${GID} SHAREGRP= ${GID} WWWGRP= ${GID} INCSOWN= ${UID} INCSGRP= ${GID} -.endif +. endif .endif diff --git a/Mk/Uses/uniquefiles.mk b/Mk/Uses/uniquefiles.mk index d99c4ebbca41..18b7f35adfb9 100644 --- a/Mk/Uses/uniquefiles.mk +++ b/Mk/Uses/uniquefiles.mk @@ -1,219 +1,219 @@ # Make files or directories 'unique', by adding a prefix or suffix. # # Feature: uniquefiles # Usage: USES=uniquefiles or USES=uniquefiles:ARGS # Valid ARGS: dirs # # dirs: The port needs a prefix (and only a prefix) based on # UNIQUE_PREFIX for the standard directories # DOCSDIR, EXAMPLESDIR, DATADIR, WWWDIR, ETCDIR # # Variables for ports: # # UNIQUE_PREFIX - The prefix to be used for directories and files. # Default: ${PKGNAMEPREFIX}. # UNIQUE_PREFIX_FILES - A list of files that need to be prefixed. # Default: empty # UNIQUE_SUFFIX - The suffix to be used for files. # Default: ${PKGNAMESUFFIX}. # UNIQUE_SUFFIX_FILES - A list of files that need to be suffixed. # Default: empty # # Variables for the ports framework, but NOT individual ports: # # UNIQUE_DEFAULT_LINKS - When set to "yes", symlinks of the original # filenames are also created pointing to their # UNIQUE_* counterparts. # This is useful for supporting multiple logical # instances from a single physical port, but where # you want to mark only *one* of those instances to # provide original filenames. # # category/py-foo, installed as: # # py27-foo for Python 2.7 (DEFAULT_VERSION) # py33-foo for Python 3.3 # # Results in: # # py27-foo # bin/foo-2.7 (UNIQUE_SUFFIX) # bin/foo -> bin/foo-2.7 (symlinked original filename) # py33-foo creates: # bin/foo-3.3 (UNIQUE_SUFFIX) # # Default: no # # UNIQUE_FIND_PREFIX_FILES - A shell command to be executed to find files for # the specific port. This has to return a # list of files to be iterated over. # Default: empty # # UNIQUE_FIND_SUFFIX_FILES - A shell command to be executed to find files for # the specific port. This has to return a # list of files to be iterated over. # Default: empty # # UNIQUE_SUFFIX_TYPES - A list of TAGS to defined more complex unique # suffix handling. It can, for example, handle # man pages by doing: # # UNIQUE_SUFFIX_TYPES+= SUFFIX_MAN # UNIQUE_SUFFIX_MAN_WITH_EXT= .[1-9ln] # UNIQUE_SUFFIX_MAN_EXTRA_EXT= .gz # UNIQUE_FIND_SUFFIX_MAN_FILES= ${EGREP} -he '^man/man[1-9ln]/.*$$' ${TMPPLIST} 2>/dev/null # # The make(1) target that renames the files # runs before the man pages are compressed, # this is what the EXTRA_EXT bit is for. # # NOTE: multiple logical instances are not supported by pkg and the original # pkg_tools at the moment. # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_UNIQUEFILES_MK) _INCLUDE_USES_UNIQUEFILES_MK= yes UNIQUE_PREFIX?= ${PKGNAMEPREFIX} UNIQUE_SUFFIX?= ${PKGNAMESUFFIX} UNIQUE_PREFIX_FILES?= # empty UNIQUE_SUFFIX_FILES?= # empty UNIQUE_SUFFIX_TYPES+= SUFFIX -.if ${uniquefiles_ARGS:Mdirs} +. if ${uniquefiles_ARGS:Mdirs} DOCSDIR= ${PREFIX}/share/doc/${UNIQUE_PREFIX}${PORTNAME} EXAMPLESDIR= ${PREFIX}/share/examples/${UNIQUE_PREFIX}${PORTNAME} DATADIR= ${PREFIX}/share/${UNIQUE_PREFIX}${PORTNAME} WWWDIR= ${PREFIX}/www/${UNIQUE_PREFIX}${PORTNAME} ETCDIR= ${PREFIX}/etc/${UNIQUE_PREFIX}${PORTNAME} -.endif +. endif UNIQUE_DEFAULT_LINKS?= no UNIQUE_FIND_PREFIX_FILES?= # empty UNIQUE_FIND_SUFFIX_FILES?= # empty _USES_POST+= uniquefiles .endif # _INCLUDE_USES_UNIQUEFILES_MK .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_UNIQUEFILES_POST_MK) _INCLUDE_USES_UNIQUEFILES_POST_MK= yes _UNIQUEPKGLIST= ${WRKDIR}/.PLIST.uniquefiles -.if ${UNIQUE_DEFAULT_LINKS} == yes +. if ${UNIQUE_DEFAULT_LINKS} == yes _DO_CONDITIONAL_SYMLINK= \ if [ ! -e ${STAGEDIR}${PREFIX}/$${fname} -a ! -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ ${ECHO_MSG} "Link: @$${fname} --> $${newf}"; \ ${RLN} ${STAGEDIR}${PREFIX}/$${newf} ${STAGEDIR}${PREFIX}/$${fname}; \ ${ECHO_CMD} LINKED:$${newf}%%EXTRA_EXT%%:$${fname}%%EXTRA_EXT%% >> ${_UNIQUEPKGLIST}; \ fi -.else +. else # We are not symlinking the renamed binary. _DO_CONDITIONAL_SYMLINK= ${DO_NADA} -.endif +. endif _USES_stage+= 775:move-uniquefiles move-uniquefiles: -.if ${UNIQUE_PREFIX_FILES} || ${UNIQUE_FIND_PREFIX_FILES} +. if ${UNIQUE_PREFIX_FILES} || ${UNIQUE_FIND_PREFIX_FILES} @${ECHO_MSG} "===> Creating unique files: Move files needing PREFIX"; -.endif -.for entry in ${UNIQUE_PREFIX_FILES} +. endif +. for entry in ${UNIQUE_PREFIX_FILES} @fname=${entry}; \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ newf=$${fname%/*}/${UNIQUE_PREFIX}$${fname##*/} ; \ ${ECHO_MSG} "Move: $${fname} --> $${newf}" ; \ ${MV} ${STAGEDIR}${PREFIX}/$${fname} ${STAGEDIR}${PREFIX}/$${newf}; \ ${ECHO_CMD} MOVED:$${fname}:$${newf} >> ${_UNIQUEPKGLIST}; \ ${_DO_CONDITIONAL_SYMLINK:S/%%EXTRA_EXT%%//g}; \ else \ ${ECHO_MSG} "Makefile error: UNIQUE (prefix): $${fname} not found"; \ ${FALSE}; \ fi; -.endfor -.if ${UNIQUE_FIND_PREFIX_FILES} +. endfor +. if ${UNIQUE_FIND_PREFIX_FILES} @for fname in `${UNIQUE_FIND_PREFIX_FILES}`; do \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ newf=$${fname%/*}/${UNIQUE_PREFIX}$${fname##*/} ; \ ${ECHO_MSG} "Move: $${fname} --> $${newf}" ; \ ${MV} ${STAGEDIR}${PREFIX}/$${fname} ${STAGEDIR}${PREFIX}/$${newf}; \ ${ECHO_CMD} MOVED:$${fname}:$${newf} >> ${_UNIQUEPKGLIST}; \ ${_DO_CONDITIONAL_SYMLINK:S/%%EXTRA_EXT%%//g}; \ else \ ${ECHO_MSG} "Makefile error: UNIQUE (prefix): $${fname} not found"; \ ${FALSE}; \ fi; \ done; -.endif +. endif -.for sufxtype in ${UNIQUE_SUFFIX_TYPES} -. if (defined(UNIQUE_${sufxtype}_FILES) && ${UNIQUE_${sufxtype}_FILES}) || \ +. for sufxtype in ${UNIQUE_SUFFIX_TYPES} +. if (defined(UNIQUE_${sufxtype}_FILES) && ${UNIQUE_${sufxtype}_FILES}) || \ (defined(UNIQUE_FIND_${sufxtype}_FILES) && ${UNIQUE_FIND_${sufxtype}_FILES}) -. if defined(UNIQUE_${sufxtype}_WITH_EXT) && ${UNIQUE_${sufxtype}_WITH_EXT} +. if defined(UNIQUE_${sufxtype}_WITH_EXT) && ${UNIQUE_${sufxtype}_WITH_EXT} @${ECHO_MSG} "===> Creating unique files: Move ${sufxtype:S|SUFFIX_||} files needing SUFFIX"; -. else +. else @${ECHO_MSG} "===> Creating unique files: Move files needing SUFFIX"; +. endif . endif -. endif -. for entry in ${UNIQUE_${sufxtype}_FILES} +. for entry in ${UNIQUE_${sufxtype}_FILES} @fname=${entry}; \ if [ -n "${UNIQUE_${sufxtype}_EXTRA_EXT}" ]; then \ fname=$${fname%${UNIQUE_${sufxtype}_EXTRA_EXT}}; \ fi; \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ ofname=$${fname##*/}; \ newf=$${fname%/*}/$${ofname%${UNIQUE_${sufxtype}_WITH_EXT}}${UNIQUE_SUFFIX}$${ofname#$${ofname%${UNIQUE_${sufxtype}_WITH_EXT}}}; \ ${ECHO_MSG} "Move: $${fname} --> $${newf}"; \ ${MV} ${STAGEDIR}${PREFIX}/$${fname} ${STAGEDIR}${PREFIX}/$${newf}; \ ${ECHO_CMD} MOVED:$${fname}${UNIQUE_${sufxtype}_EXTRA_EXT}:$${newf}${UNIQUE_${sufxtype}_EXTRA_EXT} >> ${_UNIQUEPKGLIST}; \ ${_DO_CONDITIONAL_SYMLINK:S/%%EXTRA_EXT%%/${UNIQUE_${sufxtype}_EXTRA_EXT}/g}; \ else \ ${ECHO_MSG} "Makefile error: UNIQUE (suffix): $${fname} not found"; \ ${FALSE}; \ fi; -. endfor -. if defined(UNIQUE_FIND_${sufxtype}_FILES) && ${UNIQUE_FIND_${sufxtype}_FILES} +. endfor +. if defined(UNIQUE_FIND_${sufxtype}_FILES) && ${UNIQUE_FIND_${sufxtype}_FILES} @for fname in `${UNIQUE_FIND_${sufxtype}_FILES}`; do \ if [ -n "${UNIQUE_${sufxtype}_EXTRA_EXT}" ]; then \ fname=$${fname%${UNIQUE_${sufxtype}_EXTRA_EXT}}; \ fi; \ if [ -e ${STAGEDIR}${PREFIX}/$${fname} -o -L ${STAGEDIR}${PREFIX}/$${fname} ]; then \ ofname=$${fname##*/}; \ newf=$${fname%/*}/$${ofname%${UNIQUE_${sufxtype}_WITH_EXT}}${UNIQUE_SUFFIX}$${ofname#$${ofname%${UNIQUE_${sufxtype}_WITH_EXT}}}; \ ${ECHO_MSG} "Move: $${fname} --> $${newf}"; \ ${MV} ${STAGEDIR}${PREFIX}/$${fname} ${STAGEDIR}${PREFIX}/$${newf}; \ ${ECHO_CMD} MOVED:$${fname}${UNIQUE_${sufxtype}_EXTRA_EXT}:$${newf}${UNIQUE_${sufxtype}_EXTRA_EXT} >> ${_UNIQUEPKGLIST}; \ ${_DO_CONDITIONAL_SYMLINK:S/%%EXTRA_EXT%%/${UNIQUE_${sufxtype}_EXTRA_EXT}/g}; \ else \ ${ECHO_MSG} "Makefile error: UNIQUE (suffix): $${fname} not found"; \ ${FALSE}; \ fi; \ done; -. endif -.endfor +. endif +. endfor # Using .if exists(${_UNIQUEPKGPLIST} below instead of the sh test # does not work in poudriere. It works fine on the CLI, though... _USES_stage+= 950:move-uniquefiles-plist move-uniquefiles-plist: @if [ -e ${_UNIQUEPKGLIST} ]; then \ orgIFS=$$IFS; IFS=":"; while read command entry newentry; do \ IFS=$$orgIFS; \ case $${command} in \ MOVED) \ ${REINPLACE_CMD} -e "s|^$${entry}$$|$${newentry}|" ${TMPPLIST}; \ ;; \ LINKED) \ ${AWK} '$$0 ~ pe { print; print ne ;next }1' \ pe="$${entry}" ne="$${newentry}" \ ${TMPPLIST} > ${TMPPLIST}.uniquefilestmp; \ ${MV} ${TMPPLIST}.uniquefilestmp ${TMPPLIST}; \ ;; \ *) ;; \ esac; \ IFS=":"; \ done < ${_UNIQUEPKGLIST}; \ fi .endif # defined(_POSTMKINCLUDED) diff --git a/Mk/Uses/varnish.mk b/Mk/Uses/varnish.mk index a19b0d0666e2..495aa1161446 100644 --- a/Mk/Uses/varnish.mk +++ b/Mk/Uses/varnish.mk @@ -1,30 +1,30 @@ # Provide support for Varnish # # Feature: varnish # Usage: USES=varnish # Valid ARGS: 4, 6, 7, run # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_VARNISH_MK) _INCLUDE_USES_VARNISH_MK= yes VARNISH_VERSION= ${VARNISH_DEFAULT} -. if ${varnish_ARGS:M4} +. if ${varnish_ARGS:M4} VARNISH_VERSION= 4 -. elif ${varnish_ARGS:M6} +. elif ${varnish_ARGS:M6} VARNISH_VERSION= 6 -. elif ${varnish_ARGS:M7} +. elif ${varnish_ARGS:M7} VARNISH_VERSION= 7 -. elif defined(VARNISH_DEFAULT) -. endif +. elif defined(VARNISH_DEFAULT) +. endif RUN_DEPENDS+= varnish${VARNISH_VERSION}>=${VARNISH_VERSION}:www/varnish${VARNISH_VERSION} BUILD_DEPENDS+= varnish${VARNISH_VERSION}>=${VARNISH_VERSION}:www/varnish${VARNISH_VERSION} CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/varnish CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/varnish LIBS+= -L${LOCALBASE}/lib .endif diff --git a/Mk/Uses/waf.mk b/Mk/Uses/waf.mk index 8c18b2585772..06b41c02304e 100644 --- a/Mk/Uses/waf.mk +++ b/Mk/Uses/waf.mk @@ -1,49 +1,49 @@ # Provide support to use the waf building system # # Feature: waf # Usage: USES=waf # # It implies USES=python:build automatically is no USES=python has been # specified yet # # WAF_CMD can be specified in the ports if the waf script is not # in WRKSRC/waf # CONFIGURE_TARGET default to 'configure' # ALL_TARGET default to 'build' # INSTALL_TARGET= default to 'install' .if !defined(_INCLUDE_USES_WAF_MK) _INCLUDE_USES_WAF_MK= yes -.if !empty(waf_ARGS) +. if !empty(waf_ARGS) IGNORE= Incorrect 'USES+= waf:${waf_ARGS}' waf takes no arguments -.endif +. endif -.if !${USES:Mpython*} +. if !${USES:Mpython*} python_ARGS= build .include "${USESDIR}/python.mk" -.endif +. endif MAKEFILE= # MAKE_FLAGS= # ALL_TARGET= # HAS_CONFIGURE= yes MAKE_ARGS+= --verbose WAF_CMD?= ./waf CONFIGURE_TARGET?= configure ALL_TARGET?= build INSTALL_TARGET?= install TEST_TARGET?= test CONFIGURE_CMD= ${PYTHON_CMD} ${WAF_CMD} ${CONFIGURE_TARGET} MAKE_CMD= ${PYTHON_CMD} ${WAF_CMD} CONFIGURE_ARGS+= --prefix=${PREFIX} \ ${_MAKE_JOBS} DESTDIRNAME= --destdir # Set a minimal job of 1 _MAKE_JOBS= -j${MAKE_JOBS_NUMBER} .endif diff --git a/Mk/Uses/webplugin.mk b/Mk/Uses/webplugin.mk index c34371ca947d..ff276cb27f0b 100644 --- a/Mk/Uses/webplugin.mk +++ b/Mk/Uses/webplugin.mk @@ -1,176 +1,176 @@ # Documentation and examples: # # Feature: webplugin # Usage: USES=webplugin or USES=webplugin:ARGS # Valid ARGS: gecko: Support geko based plugings # native: Support gecko, opera, webkit-gtk* # linux: Support linux plugins # [list of indivudual engines]: specify browsers to use # all: All browser (implicit, default) # # USES=webplugin will create symlinks automatically for each supported # application that supports the webplugin framework. Also, it will remove # these symlinks when the plug-in port is uninstalled. # # WEBPLUGIN_NAME - If your port installs files in ${WEBPLUGIN_DIR}, # then you can tweak WEBPLUGIN_NAME to change the # name of the directory # (lib/browser_plugins/symlinks/WEBPLUGIN_NAME). # Default: WEBPLUGIN_NAME=${PKGBASE} # # WEBPLUGIN_FILES - The plug-in files that are going to be linked # in lib/browser_plugins/symlinks/*/. It cannot # be empty or the port will set IGNORE. # # WEBPLUGIN_DIR - The directory where the plug-in file(s) can be # found. Each plug-in file in WEBPLUGIN_FILES # must be found in WEBPLUGIN_DIR. If your port # does not install in WEBPLUGIN_DIR, but in its own # path, you will need to specify that here or # symlinks will be created to non-existent files. # Default: WEBPLUGIN_DIR=${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME} # # Makefile: # ------------------------------------------------------ # USES= webplugin:gecko # [...] # WEBPLUGIN_FILES=fooplugin.so fooplugin.xpi # # post-install: # ${MKDIR} ${STAGEDIR}${WEBPLUGIN_DIR} # ${INSTALL_DATA} ${WEBPLUGIN_FILES:S,^,${WRKSRC}/plugins/,} \ # ${STAGEDIR}${WEBPLUGIN_DIR} # # .include # ------------------------------------------------------ # # You do not need to add lib/browser_plugins and lib/browser_plugins/symlinks # in pkg-plist, because they will be removed automatically. # # pkg-plist: # ------------------------------------------------------ # [...] # %%WEBPLUGIN_DIR%%/fooplugin.so # %%WEBPLUGIN_DIR%%/fooplugin.xpi # ------------------------------------------------------ # # Here is what it will look like when it creates the symlinks: # # ------------------------------------------------------ # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.so -> /usr/local/lib/browser_plugins/application/fooplugin.so # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.xpi -> /usr/local/lib/browser_plugins/application/fooplugin.xpi # ------------------------------------------------------ # # If your port uses libtool, and installs any *.a and *.la files, do not add # these files to WEBPLUGIN_FILES. WEBPLUGIN_FILES should be *.so or/and # *.xpi ONLY. # # Example to add in Makefile and pkg-plist if your port installs plug-ins in # its own directory, and you need to set WEBPLUGIN_DIR. # # Makefile: # ------------------------------------------------------ # [...] # USES= webplugin:gecko # WEBPLUGIN_DIR=${PREFIX}/lib/application # WEBPLUGIN_FILES=fooplugin.so fooplugin.xpi # # [...] # # .include # ------------------------------------------------------ # # As for the pkg-plist, it should only include the actual files your # port installs: # # pkg-plist: # ------------------------------------------------------ # [...] # lib/application/fooplugin.a # lib/application/fooplugin.la # lib/application/fooplugin.so # lib/application/fooplugin.xpi # ------------------------------------------------------ # # Here is what it will look like when it creates symlinks: # # ------------------------------------------------------ # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.so -> /usr/local/lib/application/fooplugin.so # /usr/local/lib/browser_plugins/symlinks/gecko/fooplugin.xpi -> /usr/local/lib/application/fooplugin.xpi # ------------------------------------------------------ # # MAINTAINER= gecko@FreeBSD.org .if !defined(_INCLUDE_USES_WEBPLUGIN_MK) _INCLUDE_USES_WEBPLUGIN_MK= yes WEBPLUGIN_NAME?= ${PKGBASE} _WEBPLUGIN_APPS_ALL_LINUX= linux-firefox linux-opera linux-opera-devel \ linux-seamonkey _WEBPLUGIN_APPS_ALL_NATIVE= gecko opera opera-devel webkit-gtk2 _WEBPLUGIN_APPS_ALL= ${_WEBPLUGIN_APPS_ALL_LINUX} \ ${_WEBPLUGIN_APPS_ALL_NATIVE} _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL} -.if ${webplugin_ARGS} == all || empty(webplugin_ARGS) +. if ${webplugin_ARGS} == all || empty(webplugin_ARGS) _WEBPLUGIN_PATTERN= * -.elif ${webplugin_ARGS} == native +. elif ${webplugin_ARGS} == native _WEBPLUGIN_PATTERN= * _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL_NATIVE} -.elif ${webplugin_ARGS} == linux +. elif ${webplugin_ARGS} == linux _WEBPLUGIN_PATTERN= * _WEBPLUGIN_TEST= ${_WEBPLUGIN_APPS_ALL_LINUX} -.else +. else _WEBPLUGIN_PATTERN= ${webplugin_ARGS} -.endif +. endif -.if !defined(WEBPLUGIN_FILES) +. if !defined(WEBPLUGIN_FILES) IGNORE= Cannot be installed: WEBPLUGIN_FILES is empty. Please, add plug-in files to it -.endif +. endif -.for _TEMP_APP__ in ${_WEBPLUGIN_APPS_ALL} +. for _TEMP_APP__ in ${_WEBPLUGIN_APPS_ALL} _TEMP_APP_=${_TEMP_APP__} _TEMP_FLAG_=0 -. for _TEMP_USE__ in ${USE_webplugin} +. for _TEMP_USE__ in ${USE_webplugin} _TEMP_USE_=${_TEMP_USE__} -. if !${_TEMP_APP_:C!${_TEMP_USE_:S/*/.*/:S/?/./}!!} || \ +. if !${_TEMP_APP_:C!${_TEMP_USE_:S/*/.*/:S/?/./}!!} || \ ( ${_TEMP_APP_:Mlinux-*} && ${_TEMP_USE_:Mlinux} ) || \ ( ${_TEMP_APP_:Nlinux-*} && ${_TEMP_USE_:Mnative} ) _TEMP_FLAG_=1 -. endif -. endfor -. if ${_TEMP_FLAG_} +. endif +. endfor +. if ${_TEMP_FLAG_} USE_WEBPLUGIN_EXP+= ${_TEMP_APP__} -. endif -.endfor +. endif +. endfor -.for p in ${_WEBPLUGIN_PATTERN} +. for p in ${_WEBPLUGIN_PATTERN} _WEBPLUGIN_MATCHED+= ${_WEBPLUGIN_TEST:M${p}} -.endfor +. endfor _WEBPLUGIN_LIBDIR= ${LOCALBASE}/lib/browser_plugins _WEBPLUGIN_SLDIR= ${_WEBPLUGIN_LIBDIR}/symlinks _WEBPLUGIN_SLDIRS= ${_WEBPLUGIN_MATCHED:S.^.${_WEBPLUGIN_SLDIR}/.} _WEBPLUGIN_APPS= ${USE_WEBPLUGIN_EXP:S.^.${LOCALBASE}/lib/.:S.$./plugins.:N*opera*:N*gecko*:N*webkit*} _WEBPLUGIN_LINKFARMS= ${_WEBPLUGIN_APPS} ${_WEBPLUGIN_SLDIRS} WEBPLUGIN_DIR?= ${_WEBPLUGIN_LIBDIR:S,^${LOCALBASE}/,${PREFIX}/,}/${WEBPLUGIN_NAME} PLIST_SUB+= WEBPLUGIN_DIR="${WEBPLUGIN_DIR:S,^${PREFIX}/,,}" -.for d in ${_WEBPLUGIN_LINKFARMS} -.for l in ${WEBPLUGIN_FILES} +. for d in ${_WEBPLUGIN_LINKFARMS} +. for l in ${WEBPLUGIN_FILES} PLIST_FILES+= ${d}/${l} -.endfor -.endfor +. endfor +. endfor _USES_install+= 600:webplugin-post-install webplugin-post-install: -.for d in ${_WEBPLUGIN_LINKFARMS} +. for d in ${_WEBPLUGIN_LINKFARMS} ${MKDIR} ${STAGEDIR}${d} -.for l in ${WEBPLUGIN_FILES} +. for l in ${WEBPLUGIN_FILES} ${LN} -sf ${l:S,^,${WEBPLUGIN_DIR}/,} ${STAGEDIR}${d}/ -.endfor -.endfor +. endfor +. endfor .endif diff --git a/Mk/Uses/xfce.mk b/Mk/Uses/xfce.mk index 15243f343de6..b23ab076ef76 100644 --- a/Mk/Uses/xfce.mk +++ b/Mk/Uses/xfce.mk @@ -1,85 +1,85 @@ # Provide support for Xfce related ports. # # Feature: xfce # Usage: USES=xfce or USES=xfce # # Variables, which can be set by the port: # # USE_XFCE List of components # # MAINTAINER: xfce@FreeBSD.org .if !defined(_INCLUDE_USES_XFCE_Mk) _INCLUDE_USES_XFCE_Mk= yes _USES_POST+= xfce _USE_XFCE_ALL= garcon libexo libmenu libutil panel thunar xfconf xfce_ARGS?= # empty CPPFLAGS+= -I${LOCALBASE}/include LIBS+= -L${LOCALBASE}/lib libmenu_LIB_DEPENDS= libxfce4ui-2.so:x11/libxfce4menu libmenu_USE_XFCE_REQ= libutil garcon_LIB_DEPENDS= libgarcon-gtk3-1.so:sysutils/garcon garcon_USE_XFCE_REQ= libmenu libexo_LIB_DEPENDS= libexo-2.so:x11/libexo libexo_USE_XFCE_REQ= libmenu panel_LIB_DEPENDS= libxfce4panel-2.0.so:x11-wm/xfce4-panel panel_RUN_DEPENDS= xfce4-panel:x11-wm/xfce4-panel panel_USE_XFCE_REQ= garcon libexo xfconf libutil_LIB_DEPENDS= libxfce4util.so:x11/libxfce4util thunar_LIB_DEPENDS= libthunarx-3.so:x11-fm/thunar thunar_RUN_DEPENDS= Thunar:x11-fm/thunar thunar_USE_XFCE_REQ= xfconf libmenu xfconf_LIB_DEPENDS= libxfconf-0.so:x11/xfce4-conf xfconf_USE_XFCE_REQ= libutil -.if defined(USE_XFCE) +. if defined(USE_XFCE) # First, expand all USE_XFCE_REQ recursively. -.for comp in ${_USE_XFCE_ALL} -. for subcomp in ${${comp}_USE_XFCE_REQ} +. for comp in ${_USE_XFCE_ALL} +. for subcomp in ${${comp}_USE_XFCE_REQ} ${comp}_USE_XFCE_REQ+=${${subcomp}_USE_XFCE_REQ} -. endfor -.endfor +. endfor +. endfor # Then, use already expanded USE_XFCE_REQ to expand USE_XFCE. -.for comp in ${USE_XFCE} -. if ${_USE_XFCE_ALL:M${comp}} == "" +. for comp in ${USE_XFCE} +. if ${_USE_XFCE_ALL:M${comp}} == "" IGNORE= cannot install: Unknown component ${comp} -. endif +. endif _USE_XFCE+= ${${comp}_USE_XFCE_REQ} ${comp} -.endfor +. endfor # Remove duplicate components USE_XFCE= ${_USE_XFCE:O:u} -.for comp in ${USE_XFCE} -. if defined(${comp}_BUILD_DEPENDS) +. for comp in ${USE_XFCE} +. if defined(${comp}_BUILD_DEPENDS) BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS} -. endif +. endif -. if defined(${comp}_LIB_DEPENDS) +. if defined(${comp}_LIB_DEPENDS) LIB_DEPENDS+= ${${comp}_LIB_DEPENDS} -. endif +. endif -. if defined(${comp}_RUN_DEPENDS) +. if defined(${comp}_RUN_DEPENDS) RUN_DEPENDS+= ${${comp}_RUN_DEPENDS} -. endif -.endfor +. endif +. endfor -.endif # end of defined(USE_XFCE) +. endif # end of defined(USE_XFCE) .endif .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_XFCE_POST_MK) _INCLUDE_USES_XFCE_POST_MK= yes .endif diff --git a/Mk/Uses/zip.mk b/Mk/Uses/zip.mk index 4f5bbdb78eef..b137fa0b2688 100644 --- a/Mk/Uses/zip.mk +++ b/Mk/Uses/zip.mk @@ -1,25 +1,25 @@ # handle zip archives # # Feature: zip # Usage: USES=zip[:infozip] # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ZIP_MK) _INCLUDE_USES_ZIP_MK= yes EXTRACT_SUFX?= .zip EXTRACT_BEFORE_ARGS?= -qo EXTRACT_AFTER_ARGS?= -d ${EXTRACT_WRKDIR} -.if empty(zip_ARGS) +. if empty(zip_ARGS) EXTRACT_CMD?= ${UNZIP_NATIVE_CMD} -.elif ${zip_ARGS} == "infozip" +. elif ${zip_ARGS} == "infozip" EXTRACT_DEPENDS+= ${UNZIP_CMD}:archivers/unzip EXTRACT_CMD?= ${UNZIP_CMD} -.else +. else IGNORE= Incorrect 'USES+=zip:${zip_ARGS}' expecting 'USES+=zip[:infozip]' -.endif +. endif .endif diff --git a/Mk/bsd.ccache.mk b/Mk/bsd.ccache.mk index fa1b32ca8cfd..036d83720f5b 100644 --- a/Mk/bsd.ccache.mk +++ b/Mk/bsd.ccache.mk @@ -1,100 +1,100 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # User settable: # - WITH_CCACHE_BUILD - enables depending on ccache and using it in the build. # - CCACHE_PKG_PREFIX - where ccache is already installed. Default: LOCALBASE # This should not be set unless it differs from the # default. # - CCACHE_DIR (optional) - where ccache stores its cache. See ccache(1). # This should not be set unless it differs from the # default. # # Port use (users should not modify these): # - CCACHE_BIN - path to the ccache binary. Intended to be prefixed before CC. # - CCACHE_WRAPPER_PATH - path to directory containing compiler symlinks back # to ccache. For example, gcc5 -> ccache. Intended # to be added to $PATH # This is expected to end in /libexec/ccache. # # In general CCACHE_WRAPPER_PATH should be placed into the env PATH for a # port build rather than directly invoking CCACHE_BIN. Then when the port # runs 'cc' or 'gcc5' it will find the symlinks. If a port is directly # using a full path to a specific compiler then CCACHE_BIN can possibly be # prefixed in front of it, if the CC path cannot be fixed to be relative. # # Port use (special case): # - NO_CCACHE - disable using ccache entirely. This is for when a port build # fails with ccache being used. Typically this should be # temporary only. # - NO_CCACHE_DEPEND - avoid automatically depending on ccache but still # attempt to use it in PATH. This is typically only # needed in devel/ccache itself. # COMMANDS_Include_MAINTAINER= portmgr@FreeBSD.org .if !defined(_CCACHEMKINCLUDED) _CCACHEMKINCLUDED= yes -.if defined(NOCCACHE) +. if defined(NOCCACHE) NO_CCACHE= t -.endif +. endif # HOME is always set to ${WRKDIR} now. Try to use /root/.ccache as default. -.if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) -. if defined(USER) && ${USER} == root +. if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) +. if defined(USER) && ${USER} == root CCACHE_DIR= /root/.ccache -. else +. else NO_CCACHE= yes WARNING+= WITH_CCACHE_BUILD support disabled, please set CCACHE_DIR. +. endif . endif -.endif # Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and # don't use if ccache already set in CC -.if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ +. if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \ !defined(NO_BUILD) # Poudriere will only define CCACHE_WRAPPER_PATH for using a host-static ccache # binary. -.if defined(CCACHE_WRAPPER_PATH) +. if defined(CCACHE_WRAPPER_PATH) CCACHE_PKG_PREFIX= ${CCACHE_WRAPPER_PATH:C,/libexec/ccache$,,} -.endif +. endif CCACHE_PKG_PREFIX?= ${LOCALBASE} CCACHE_WRAPPER_PATH?= ${CCACHE_PKG_PREFIX}/libexec/ccache CCACHE_BIN?= ${CCACHE_PKG_PREFIX}/bin/ccache # Avoid depends loops between ccache and pkg -. if !defined(NO_CCACHE_DEPEND) && \ +. if !defined(NO_CCACHE_DEPEND) && \ ${PKGORIGIN} != ${PKG_ORIGIN} BUILD_DEPENDS+= ${CCACHE_BIN}:devel/ccache -. endif +. endif -.if exists(${CCACHE_WRAPPER_PATH}) +. if exists(${CCACHE_WRAPPER_PATH}) # Prepend the ccache dir into the PATH and setup ccache env PATH:= ${CCACHE_WRAPPER_PATH}:${PATH} #.MAKEFLAGS: PATH=${PATH} -.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} +. if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} MAKE_ENV+= PATH=${PATH} CONFIGURE_ENV+= PATH=${PATH} -.endif +. endif # Ensure this is always in subchild environments -. if defined(CCACHE_DIR) +. if defined(CCACHE_DIR) #.MAKEFLAGS: CCACHE_DIR=${CCACHE_DIR} MAKE_ENV+= CCACHE_DIR="${CCACHE_DIR}" CONFIGURE_ENV+= CCACHE_DIR="${CCACHE_DIR}" -. endif -.endif +. endif +. endif # Some ports will truncate CCACHE_DIR from the env and due to HOME=${WRKDIR} # will incorrectly use ${WRKDIR}/.ccache. Symlink to the proper place. ${WRKDIR}/.ccache: ${WRKDIR} @${LN} -sf ${CCACHE_DIR} ${WRKDIR}/.ccache ccache-wrkdir-link: ${WRKDIR}/.ccache .PHONY post-extract: ccache-wrkdir-link -.endif +. endif .endif diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index 4365b31ef1c4..362af08693e0 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -1,169 +1,169 @@ # MAINTAINER: ports@FreeBSD.org # # Note: before committing to this file, contact portmgr to arrange for an # experimental ports run. Untested commits may be backed out at portmgr's # discretion. # # Provide default versions for ports with multiple versions selectable # by the user. # # Users who want to override these defaults can easily do so by defining # DEFAULT_VERSIONS in their make.conf as follows: # # DEFAULT_VERSIONS= perl5=5.20 ruby=2.7 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK) _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local -.for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT GL \ +. for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC GHOSTSCRIPT GL \ IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA NODEJS PERL5 \ PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH -.if defined(${lang}_DEFAULT) +. if defined(${lang}_DEFAULT) ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf" -.endif +. endif #.undef ${lang}_DEFAULT -.endfor +. endfor -.for lang in ${DEFAULT_VERSIONS} +. for lang in ${DEFAULT_VERSIONS} _l= ${lang:C/=.*//g} ${_l:tu}_DEFAULT= ${lang:C/.*=//g} -.endfor +. endfor # Possible values: 2.4 APACHE_DEFAULT?= 2.4 # Possible values: 5, 18 BDB_DEFAULT?= 5 # Possible values: 2, 3 COROSYNC_DEFAULT?= 2 # Possible_values: full canna nox devel_full devel_nox #EMACS_DEFAULT?= let the flavor be the default if not explicitly set # Possible values: 2.5, 3.0, 4.0 FIREBIRD_DEFAULT?= 2.5 # Possible values: flang (experimental), gfortran FORTRAN_DEFAULT?= gfortran # Possible values: 3.2.2 FPC_DEFAULT?= 3.2.2 # Possible values: 8 (last to support powerpcspe), 9, 10, 11 # (Any other version is completely unsupported and not meant for general use.) -.if ${ARCH} == "powerpcspe" +. if ${ARCH} == "powerpcspe" GCC_DEFAULT?= 8 -.else +. else GCC_DEFAULT?= 10 -.endif +. endif # Possible values: mesa-libs, mesa-devel GL_DEFAULT?= mesa-libs # Possible values: 7, 8, 9, agpl GHOSTSCRIPT_DEFAULT?= agpl # Possible values: 6, 6-nox11, 7, 7-nox11 IMAGEMAGICK_DEFAULT?= 7 # Possible values: 7, 8, 11, 12, 13, 14, 15, 16 JAVA_DEFAULT?= 8 # Possible values: 2.2.0, 2.3.0 -.if !defined(WANT_LAZARUS_DEVEL) +. if !defined(WANT_LAZARUS_DEVEL) LAZARUS_DEFAULT?= 2.2.0 -.else +. else LAZARUS_DEFAULT?= 2.3.0 -.endif +. endif # Possible values: rust, legacy -.if empty(ARCH:Naarch64:Narmv6:Narmv7:Namd64:Ni386:Npowerpc64:Npowerpc64le:Npowerpc) +. if empty(ARCH:Naarch64:Narmv6:Narmv7:Namd64:Ni386:Npowerpc64:Npowerpc64le:Npowerpc) LIBRSVG2_DEFAULT?= rust -.else +. else LIBRSVG2_DEFAULT?= legacy -.endif +. endif # Possible values: c7 LINUX_DEFAULT?= c7 # Possible values: 70, 80, 90, 10, 11, 12, 13, -devel (to be used when non-base compiler is required) # Please give notice to the Graphics Team (x11@FreeBSD.org) in advance before # bumping the LLVM version. -.if ${ARCH} == powerpc +. if ${ARCH} == powerpc LLVM_DEFAULT?= 10 -.else +. else LLVM_DEFAULT?= 90 -.endif +. endif # Possible values: 5.1, 5.2, 5.3, 5.4 LUA_DEFAULT?= 5.2 # Possible values: 5.10, 5.20, 6.8 MONO_DEFAULT= 5.10 # Possible values: 5.5, 5.6, 5.7, 8.0, 10.3m, 10.4m, 10.5m, 5.5p, 5.6p, 5.7p, 5.6w, 5.7w MYSQL_DEFAULT?= 5.7 # Possible values: ninja, samurai NINJA_DEFAULT?= ninja # Possible values: 5.30, 5.32, 5.34, devel -.if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ +. if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) PERL5_DEFAULT?= 5.32 -.elif !defined(PERL5_DEFAULT) +. elif !defined(PERL5_DEFAULT) # There's no need to replace development versions, like "5.23" with "devel" # because 1) nobody is supposed to use it outside of poudriere, and 2) it must # be set manually in /etc/make.conf in the first place, and we're never getting # in here. -.if !defined(_PERL5_FROM_BIN) +. if !defined(_PERL5_FROM_BIN) _PERL5_FROM_BIN!= ${LOCALBASE}/bin/perl -e 'printf "%vd\n", $$^V;' -.endif +. endif _EXPORTED_VARS+= _PERL5_FROM_BIN PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R} -.endif +. endif # Possible values: 10, 11, 12, 13, 14 PGSQL_DEFAULT?= 13 # Possible values: 7.4, 8.0, 8.1 PHP_DEFAULT?= 8.0 # Possible values: 2.7, 3.7, 3.8, 3.9, 3.10, 3.11 PYTHON_DEFAULT?= 3.8 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 # Possible values: 3.7, 3.8, 3.9, 3.10, 3.11 PYTHON3_DEFAULT?= 3.8 # Possible values: 2.7, 3.0, 3.1, 3.2 RUBY_DEFAULT?= 3.0 # Possible values: rust, rust-nightly RUST_DEFAULT?= rust # Possible values: 4.12, 4.13 SAMBA_DEFAULT?= 4.12 # Possible values: base, openssl, libressl, libressl-devel -.if !defined(SSL_DEFAULT) +. if !defined(SSL_DEFAULT) # If no preference was set, check for an installed base version # but give an installed port preference over it. -. if !defined(SSL_DEFAULT) && \ +. if !defined(SSL_DEFAULT) && \ !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \ exists(${DESTDIR}/usr/include/openssl/opensslv.h) SSL_DEFAULT= base -. else -. if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) -. if defined(PKG_BIN) +. else +. if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) +. if defined(PKG_BIN) # find installed port and use it for dependency -. if !defined(OPENSSL_INSTALLED) -. if defined(DESTDIR) +. if !defined(OPENSSL_INSTALLED) +. if defined(DESTDIR) PKGARGS= -c ${DESTDIR} -. else +. else PKGARGS= -. endif +. endif OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || : -. endif -. if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) +. endif +. if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED) SSL_DEFAULT:= ${OPENSSL_INSTALLED:T} WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf" -. endif -. else +. endif +. else check-makevars:: @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable" @${ECHO_MSG} "to determine what port it comes from." @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl= to your /etc/make.conf and try again." @${FALSE} +. endif . endif . endif -. endif # Make sure we have a default in the end SSL_DEFAULT?= base -.endif +. endif # Possible values: 8.5, 8.6, 8.7 TCLTK_DEFAULT?= 8.6 # Possible values: 4, 6 VARNISH_DEFAULT?= 4 # Possible value: 14, 16, 17, lts, current NODEJS_DEFAULT?= lts .endif diff --git a/Mk/bsd.destdir.mk b/Mk/bsd.destdir.mk index d7782d4544fe..df69f7e68a88 100644 --- a/Mk/bsd.destdir.mk +++ b/Mk/bsd.destdir.mk @@ -1,220 +1,220 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.destdir.mk - Support for chrooted installation # # Created by: Gabor Kovesdan # # Please make sure all changes to this file are passed through the maintainer. DESTDIR_Include_MAINTAINER= portmgr@FreeBSD.org # # The target order is always: pre-chroot do-chroot post-chroot # # pre-chroot # - You can use this for special preparation work, that # want to do before chrooting into the destination # environment and doing the real build. At default # this target is empty. # # do-chroot # - This is the main target for doing the chrooted # operations. It mounts the ports tree and devfs into # the destination environment and starts make(1) # by calling chroot(1). # # post-chroot # - This target runs chrooted just after chroot(1) was # called. You can use this for special preparation # work for the chrooted build if necessary. At # default, this target is empty. # # DESTDIR_ENV_LIST # - Contains names of the variables in host environ(7), # which should be imported into the chrooted environ # along with their values. # Default: empty. # # DESTDIR_MOUNT_LIST # - Contains the directories to mount into the # destination. This is to make PORTSDIR, DISTDIR, etc. # available in the destination environment. Three # forms of entries are allowed: # VAR # - Mounts the path contained by VAR into # a temporary directory and sets VAR to that # directory in the destination environ(7). # VAR:HOST_PATH # - Mounts HOST_PATH to a a temporary directory # and sets VAR to that directory in the # destination environ(7). # VAR:HOST_PATH:DEST_PATH # - Mounts HOST_PATH to DEST_PATH and sets VAR # to DEST_PATH in the destination environ(7). # Default: PORTSDIR DISTDIR # # You can use something like this in host /etc/make.conf to # customize per-chroot environment: # .if ${DESTDIR}=/foo/bar # PREFIX=/opt # CFLAGS=-O3 -pipe # DESTDIR_ENV_LIST=PREFIX CFLAGS # .endif # .if !defined(_DESTDIRMKINCLUDED) _DESTDIRMKINCLUDED= yes -.if defined(WITH_DESTDIR_DEBUG) +. if defined(WITH_DESTDIR_DEBUG) DEBUG_MSG= ${ECHO_MSG} "DEBUG:" -.else +. else DEBUG_MSG= ${TRUE} -.endif +. endif DESTDIR_ENV_LIST?= DESTDIR_ENV= CHROOTED=yes PATH=${PATH} TERM=${TERM} -.for _var in ${DESTDIR_ENV_LIST:NDESTDIR:NCHROOTED:NPORTSDIR} +. for _var in ${DESTDIR_ENV_LIST:NDESTDIR:NCHROOTED:NPORTSDIR} DESTDIR_ENV+= ${_var}="${${_var}}" -.endfor +. endfor # Processing DESTDIR_MOUNT_LIST into something more machine-readable # VAR:HOST_PATH:DEST_PATH # VAR -> VAR:${VAR}:TMP # VAR:HOST_PATH -> VAR:HOST_PATH:TMP DESTDIR_MOUNT_LIST?= PORTSDIR DISTDIR _DESTDIR_MOUNT_LIST= -.for _entry in ${DESTDIR_MOUNT_LIST} +. for _entry in ${DESTDIR_MOUNT_LIST} __entry=${_entry} -.if ${__entry:M*\:*\:*} +. if ${__entry:M*\:*\:*} _DESTDIR_MOUNT_LIST+= ${_entry} -.elif ${__entry:M*\:*} +. elif ${__entry:M*\:*} _DESTDIR_MOUNT_LIST+= ${_entry}:___temp___ -.else -.if defined(${_entry}) && !empty(${_entry}) +. else +. if defined(${_entry}) && !empty(${_entry}) _DESTDIR_MOUNT_LIST+= ${_entry}:${${_entry}}:___temp___ -.endif -.endif -.endfor +. endif +. endif +. endfor .MAIN: all -.for _target in ${.TARGETS} +. for _target in ${.TARGETS} ${_target}: pre-chroot do-chroot @${TRUE} -.endfor +. endfor -.if !target(pre-chroot) +. if !target(pre-chroot) pre-chroot: @${TRUE} -.endif +. endif -.if !target(do-chroot) +. if !target(do-chroot) do-chroot: @if [ ! -d ${DESTDIR} ]; then \ ${ECHO_MSG} "===> Directory ${DESTDIR} does not exist"; \ ${ECHO_MSG} "===> Please set DESTDIR to a valid jail environment."; \ exit 1; \ fi; \ _destdir=`${REALPATH} ${DESTDIR}`; \ _mounted_entries_list=""; \ _created_mountpoints_list=""; \ _var_path_list=""; \ ${ECHO_MSG} "===> Creating some important subdirectories"; \ for _dir in tmp dev; do \ [ -d $${_destdir}/$${_dir} ] || \ if ${MKDIR} $${_destdir}/$${_dir}; then \ ${ECHO_MSG} "===> /$${_dir} subdirectory has been successfully created"; \ _created_mountpoints_list="$${_destdir}/$${_dir} $${_created_mountpoints_list}"; \ else \ ${ECHO_MSG} "===> /$${_dir} subdirectory could not be created"; \ exit 2; \ fi; \ done; \ ${DEBUG_MSG} "_DESTDIR_MOUNT_LIST=${_DESTDIR_MOUNT_LIST}"; \ for _entry in ${_DESTDIR_MOUNT_LIST}; do \ ${DEBUG_MSG} "Processing $${_entry}"; \ _mount_var=$${_entry%%:*}; \ _tp=$${_entry#*:}; \ _host_path=`${REALPATH} $${_tp%:*}`; \ _dest_path=$${_entry##*:}; \ _full_dest_path=`${REALPATH} -q $${_destdir}/$${_dest_path} || :`; \ _entry_was_created=0; \ _entry_should_mount=0; \ ${DEBUG_MSG} "$${_mount_var}:$${_host_path}:$${_full_dest_path}"; \ if [ "$${_dest_path}" = "___temp___" ]; then \ ${DEBUG_MSG} "Creating temporary mount point"; \ if _full_dest_path=`${MKTEMP} -d $${_destdir}/tmp/mountpoint.XXXXXX`; then \ ${DEBUG_MSG} "Temporary mount point $${_full_dest_path} created successfully"; \ _entry_was_created=1; \ _entry_should_mount=1; \ _dest_path=$${_full_dest_path#$${_destdir}}; \ _created_mountpoints_list="$${_full_dest_path} $${_created_mountpoints_list}"; \ else \ ${ECHO_MSG} "===> Failed to create temporary mount point"; \ exit 9; \ fi; \ else \ ${DEBUG_MSG} "Checking if already mounted"; \ if ${MOUNT}|${GREP} -qs "^$${_host_path} on $${_full_dest_path} ("; then \ ${DEBUG_MSG} "$${_host_path} is already mounted on $${_full_dest_path}"; \ _var_path_list="$${_var_path_list} $${_mount_var}=$${_dest_path}"; \ else \ ${DEBUG_MSG} "$${_host_path} is not mounted on $${_full_dest_path}"; \ _entry_should_mount=1; \ fi; \ fi; \ [ -d $${_full_dest_path} ] || \ if ${MKDIR} $${_full_dest_path}; then \ ${DEBUG_MSG} "Mount point $${_full_dest_path} created"; \ _entry_was_created=1; \ _created_mountpoints_list="$${_created_mountpoints_list} ${_full_dest_path}"; \ else \ ${ECHO_MSG} "===> Mount point $${_full_dest_path} could not be created"; \ exit 7; \ fi; \ [ "$${_entry_should_mount}" = "0" ] || \ if ${MOUNT_NULLFS} $${_host_path} $${_full_dest_path}; then \ ${DEBUG_MSG} "Directory $${_host_path} mounted"; \ _mounted_entries_list="$${_full_dest_path} $${_mounted_entries_list}"; \ _var_path_list="$${_var_path_list} $${_mount_var}=$${_dest_path}"; \ else \ ${ECHO_MSG} "===> Dir $${_host_path} could not be mounted"; \ [ "$${_entry_was_created}" = "0" ] || \ ${RMDIR} $${_full_dest_path} || ${TRUE}; \ exit 8; \ fi; \ done; \ ${DEBUG_MSG} "Handling devfs separately"; \ _full_dest_path=$${_destdir}/dev; \ ${MOUNT}|${GREP} -qs "^devfs on $${_full_dest_path} (" || \ if ${MOUNT_DEVFS} $${_full_dest_path}; then \ ${DEBUG_MSG} "devfs mounted"; \ _mounted_entries_list="$${_full_dest_path} $${_mounted_entries_list}"; \ else \ ${ECHO_MSG} "===> devfs could not be mounted"; \ [ -n "$${_created_mountpoints_list%%* $${_destdir}/dev *}" ] || \ ${RMDIR} $${_destdir}/dev || ${TRUE}; \ exit 9; \ fi; \ _var_path_list="$${_var_path_list} DEVFS=/dev"; \ ${DEBUG_MSG} "Things we mounted: $${_mounted_entries_list}"; \ ${DEBUG_MSG} "Things we created: $${_created_mountpoints_list}"; \ ${DEBUG_MSG} "_var_path_list: $${_var_path_list}"; \ ${ECHO_MSG} "===> Starting chrooted make in ${DESTDIR}..."; \ export $${_var_path_list}; \ ${CHROOT} $${_destdir} ${SH} -c "\ cd $${PORTSDIR}${.CURDIR:S|^${PORTSDIR}||}; \ ${SETENV} -i ${DESTDIR_ENV} $${_var_path_list} ${MAKE} ${.TARGETS}" && \ { status=$$?; ${ECHO_MSG} "===> Chrooted make in ${DESTDIR} succeeded"; } || \ { status=$$?; ${ECHO_MSG} "===> Chrooted make in ${DESTDIR} failed"; }; \ ${ECHO_MSG} "===> Cleaning up..."; \ for _entry in $${_mounted_entries_list}; do \ ${UMOUNT} -f $${_entry} || ${TRUE}; \ done; \ for _entry in $${_created_mountpoints_list}; do \ ${RMDIR} $${_entry} || ${TRUE}; \ done; \ exit $$status -.endif # !target(do-chroot) +. endif # !target(do-chroot) .endif # !defined(_DESTDIRMKINCLUDED) diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk index b0d01006f68b..6d8edfc5cacb 100644 --- a/Mk/bsd.gcc.mk +++ b/Mk/bsd.gcc.mk @@ -1,163 +1,163 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.gcc.mk - Support for smarter USE_GCC usage. # # Created by: Edwin Groothuis # # To request the use of a current version of GCC, specify USE_GCC=yes in # your port/system configuration. This is the preferred use of USE_GCC. # It uses the canonical version of GCC defined in bsd.default-versions.mk. # # If your port needs a specific (minimum) version of GCC, you can easily # specify that with a USE_GCC= statement. Unless absolutely necessary # do so by specifying USE_GCC=X+ which requests at least GCC version X. # To request a specific version omit the trailing + sign. # # Optionally comma-separated arguments follow the version specifier. # Currently we support: # build ... which adds GCC as a build dependency (BUILD_DEPENDS) only. # # If no arguments are specified, GCC is added as both a build dependency # and a run time dependency. # # # Examples: # USE_GCC= yes # port requires a current version of GCC # # as defined in bsd.default-versions.mk. # USE_GCC= 11+ # port requires GCC 11 or later. # USE_GCC= 9 # port requires GCC 9. # USE_GCC= yes:build # port requires a current version of GCC at # # build time only. # USE_GCC= 10:build # port requires GCC 10 at build time only. # USE_GCC= 11+:build # port requires GCC 11 or later at build # # time only. # # If you are wondering what your port exactly does, use "make test-gcc" # to see some debugging. GCC_Include_MAINTAINER= gerald@FreeBSD.org # All GCC versions supported by this framework. # # When updating this, keep Mk/bsd.default-versions.mk in sync. GCCVERSIONS= 4.8 8 9 10 11 12 # No configurable parts below this. #################################### # # Split arguments .if defined(USE_GCC) __USE_GCC:= ${USE_GCC:C/\:.*//} _USE_GCC_ARGS:= ${USE_GCC:C/^[^\:]*(\:|\$)//:S/,/ /g} USE_GCC= ${__USE_GCC} .endif .if ${_USE_GCC_ARGS:Mbuild} _USE_GCC_ARGS:= ${_USE_GCC_ARGS:Nbuild} .else _USE_GCC_RUN_DEPENDS= yes .endif .if !empty(_USE_GCC_ARGS) IGNORE= bad target specification in USE_GCC; only "build" is supported .endif .if defined(USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) # Handle USE_GCC=yes. -.if ${USE_GCC} == yes +. if ${USE_GCC} == yes USE_GCC= ${GCC_DEFAULT}+ -.endif +. endif # See if we can use a later version or exclusively the one specified. _USE_GCC:= ${USE_GCC:S/+//} -.if ${USE_GCC} != ${_USE_GCC} +. if ${USE_GCC} != ${_USE_GCC} _GCC_ORLATER:= true -.endif +. endif # See whether we have the specific version requested installed already # and save that into _GCC_FOUND. In parallel, check if USE_GCC refers # to a valid version to begin with. -.for v in ${GCCVERSIONS} -. if ${_USE_GCC} == ${v} +. for v in ${GCCVERSIONS} +. if ${_USE_GCC} == ${v} _GCCVERSION_OKAY= true -. if exists(${LOCALBASE}/bin/gcc${v:S/.//}) +. if exists(${LOCALBASE}/bin/gcc${v:S/.//}) _GCC_FOUND:= ${_USE_GCC} -. endif -. endif -.endfor +. endif +. endif +. endfor -.if !defined(_GCCVERSION_OKAY) +. if !defined(_GCCVERSION_OKAY) IGNORE= Unknown version of GCC specified (USE_GCC=${USE_GCC}) -.endif +. endif # If the GCC package defined in USE_GCC does not exist, but a later # version is allowed (for example 8+), go and use the default. -.if defined(_GCC_ORLATER) -. if !defined(_GCC_FOUND) && ${_USE_GCC} < ${GCC_DEFAULT} +. if defined(_GCC_ORLATER) +. if !defined(_GCC_FOUND) && ${_USE_GCC} < ${GCC_DEFAULT} _USE_GCC:= ${GCC_DEFAULT} -. endif -.endif # defined(_GCC_ORLATER) +. endif +. endif # defined(_GCC_ORLATER) # A concrete version has been selected. Set proper ports dependencies, # CC, CXX, CPP, and flags. V:= ${_USE_GCC:S/.//} -. if ${V} == 12 +. if ${V} == 12 _GCC_PORT:= gcc${V}-devel -. else +. else _GCC_PORT:= gcc${V} -. endif +. endif CC:= gcc${V} CXX:= g++${V} CPP:= cpp${V} _GCC_RUNTIME:= ${LOCALBASE}/lib/gcc${V} -. if ${PORTNAME} == gcc +. if ${PORTNAME} == gcc # We don't want the rpath stuff while building GCC itself # so we do not set the FLAGS as done in the else part. # When building a GCC, we want the target libraries to be used and not the # host GCC libraries. -. else +. else CFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} CXXFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} LDFLAGS+= -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME} -. endif +. endif .undef V # Now filter unsupported flags for CC and CXX. CFLAGS:= ${CFLAGS:N-mretpoline} CXXFLAGS:= ${CXXFLAGS:N-mretpoline} -.if defined(_GCC_PORT) +. if defined(_GCC_PORT) BUILD_DEPENDS+= ${CC}:lang/${_GCC_PORT} -. if defined(_USE_GCC_RUN_DEPENDS) +. if defined(_USE_GCC_RUN_DEPENDS) RUN_DEPENDS+= ${CC}:lang/${_GCC_PORT} -. endif +. endif # GCC ports already depend on binutils; make sure whatever we build # leverages this as well. USE_BINUTILS= yes -.endif +. endif .endif # defined(_USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) test-gcc: @echo USE_GCC=${USE_GCC} .if defined(IGNORE) @echo "IGNORE: ${IGNORE}" .else -.if defined(USE_GCC) -.if defined(_GCC_ORLATER) +. if defined(USE_GCC) +. if defined(_GCC_ORLATER) @echo Port can use later versions. -.else +. else @echo Port cannot use later versions. -.endif +. endif @echo Using GCC version ${_USE_GCC} -.endif +. endif @echo CC=${CC} - CXX=${CXX} - CPP=${CPP} @echo CFLAGS=\"${CFLAGS}\" @echo CXXFLAGS=\"${CXXFLAGS}\" @echo LDFLAGS=\"${LDFLAGS}\" @echo "BUILD_DEPENDS=${BUILD_DEPENDS}" @echo "RUN_DEPENDS=${RUN_DEPENDS}" .endif diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk index acd930def68c..eef9db747685 100644 --- a/Mk/bsd.gecko.mk +++ b/Mk/bsd.gecko.mk @@ -1,403 +1,403 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Date created: 12 Nov 2005 # Whom: Michael Johnson # # 4 column tabs prevent hair loss and tooth decay! # bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users # and porters to support any available gecko backend without needing to build # many conditional tests. ${USE_GECKO} is the list of backends that your port # can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend. # Users set ${WITH_GECKO} to the list of gecko backends they want on their # system. .if defined(USE_GECKO) -.if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) +. if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) Gecko_Pre_Include= bsd.gecko.mk # This file contains some reusable components for mozilla ports. It's of # use primarily to apps from the mozilla project itself (such as Firefox, # Thunderbird, etc.), and probably won't be of use for gecko-based ports # like epiphany, galeon, etc. # # You need to make sure to add USE_GECKO=gecko to for your port can uses # one of these options below. # # Ports can use the following: # # USE_MOZILLA By default, it enables every system dependency # listed in '_ALL_DEPENDS'. If your port doesn't # need one of those then you can use '-' like # 'USE_MOZILLA= -png -vpx' to subtract the # dependencies. Experimental deps use '+' like # 'USE_MOZILLA= +speex +theora'. # # MOZILLA_PLIST_DIRS List of directories to descend into when installing # and creating the plist # # MOZ_OPTIONS configure arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # CONFIGURE_ARGS+=${MOZ_OPTIONS} # # MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # MAKE_ARGS+=${MOZ_MK_OPTIONS} # # MOZ_EXPORT Environment variables for the build process (added # to .mozconfig). If NOMOZCONFIG is defined, you # probably want to set MAKE_ENV+=${MOZ_EXPORT} # # NOMOZCONFIG Don't drop a customized .mozconfig into the build # directory. Options will have to be specified in # CONFIGURE_ARGS instead # MAINTAINER?= gecko@FreeBSD.org MOZILLA?= ${PORTNAME} MOZILLA_VER?= ${PORTVERSION} MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_EXEC_NAME?=${MOZILLA} USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ python:3.6+,build desktop-file-utils CPE_VENDOR?=mozilla USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk30 USE_PERL5= build USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt -.if ${MOZILLA_VER:R:R} >= 96 +. if ${MOZILLA_VER:R:R} >= 96 USE_XORG+= xrandr xtst -.endif +. endif HAS_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes LDFLAGS+= -Wl,--as-needed BINARY_ALIAS+= python3=${PYTHON_CMD} BUNDLE_LIBS= yes BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ rust-cbindgen>=0.19.0:devel/rust-cbindgen \ ${RUST_DEFAULT}>=1.59.0:lang/${RUST_DEFAULT} \ node:www/node LIB_DEPENDS+= libdrm.so:graphics/libdrm RUN_DEPENDS+= ${LOCALBASE}/lib/libpci.so:devel/libpci LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim MOZ_EXPORT+= ${CONFIGURE_ENV} \ PERL="${PERL}" \ PYTHON3="${PYTHON_CMD}" \ RUSTFLAGS="${RUSTFLAGS}" MOZ_OPTIONS+= --prefix="${PREFIX}" MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}" MOZ_OPTIONS+= --with-libclang-path="${LOCALBASE}/llvm${LLVM_DEFAULT}/lib" -.if !exists(/usr/bin/llvm-objdump) +. if !exists(/usr/bin/llvm-objdump) MOZ_EXPORT+= LLVM_OBJDUMP="${LOCALBASE}/bin/llvm-objdump${LLVM_DEFAULT}" -.endif +. endif # Ignore Mk/bsd.default-versions.mk but respect make.conf(5) unless LTO is enabled -.if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mllvm*} || ${PORT_OPTIONS:MLTO} +. if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mllvm*} || ${PORT_OPTIONS:MLTO} LLVM_DEFAULT= 13 # chase bundled LLVM in lang/rust for LTO LLVM_VERSION= 13.0.1 # keep in sync with devel/wasi-compiler-rt${LLVM_DEFAULT} -.endif +. endif # Require newer Clang than what's in base system unless user opted out -. if ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so) +. if ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so) BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT} USES:= ${USES:Ncompiler\:*} # XXX avoid warnings -. endif +. endif MOZSRC?= ${WRKSRC} PLISTF?= ${WRKDIR}/plist_files MOZCONFIG?= ${WRKSRC}/.mozconfig MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk -.if ${ARCH} == amd64 || ${ARCH} == i386 +. if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} -.elif ${ARCH:Mpowerpc64*} +. elif ${ARCH:Mpowerpc64*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} -.else +. else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} -.endif +. endif # Standard depends _ALL_DEPENDS= av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp -.if exists(${FILESDIR}/patch-bug1559213) +. if exists(${FILESDIR}/patch-bug1559213) av1_LIB_DEPENDS= libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d av1_MOZ_OPTIONS= --with-system-av1 -.endif +. endif event_LIB_DEPENDS= libevent.so:devel/libevent event_MOZ_OPTIONS= --with-system-libevent ffi_LIB_DEPENDS= libffi.so:devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi -.if exists(${FILESDIR}/patch-bug847568) +. if exists(${FILESDIR}/patch-bug847568) graphite_LIB_DEPENDS= libgraphite2.so:graphics/graphite2 graphite_MOZ_OPTIONS= --with-system-graphite2 harfbuzz_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz -.endif +. endif icu_LIB_DEPENDS= libicui18n.so:devel/icu icu_MOZ_OPTIONS= --with-system-icu --with-intl-api -jpeg_BUILD_DEPENDS=yasm:devel/yasm jpeg_USES= jpeg jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE} nspr_LIB_DEPENDS= libnspr4.so:devel/nspr nspr_MOZ_OPTIONS= --with-system-nspr nss_LIB_DEPENDS= libnss3.so:security/nss nss_MOZ_OPTIONS= --with-system-nss pixman_LIB_DEPENDS= libpixman-1.so:x11/pixman pixman_MOZ_OPTIONS= --enable-system-pixman png_LIB_DEPENDS= libpng.so:graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} -.if ${MOZILLA_VER:R:R} >= 97 +. if ${MOZILLA_VER:R:R} >= 97 png_MOZ_OPTIONS= --with-system-png -.endif +. endif sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite -vpx_BUILD_DEPENDS= yasm:devel/yasm vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx webp_LIB_DEPENDS= libwebp.so:graphics/webp webp_MOZ_OPTIONS= --with-system-webp -.for use in ${USE_MOZILLA} +. for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} -.endfor +. endfor LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 -.for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} -.if !defined(_WITHOUT_${dep}) +. for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} +. if !defined(_WITHOUT_${dep}) BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS} LIB_DEPENDS+= ${${dep}_LIB_DEPENDS} RUN_DEPENDS+= ${${dep}_RUN_DEPENDS} USES+= ${${dep}_USES} MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS} -.else +. else BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS} -.endif -.endfor +. endif +. endfor # Standard options MOZ_OPTIONS+= \ --enable-update-channel=${PKGNAMESUFFIX:Urelease:S/^-//} \ --disable-updater \ --with-system-zlib # API keys from www/chromium # http://www.chromium.org/developers/how-tos/api-keys # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. MOZ_EXPORT+= MOZ_GOOGLE_LOCATION_SERVICE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 MOZ_EXPORT+= MOZ_GOOGLE_SAFEBROWSING_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 -.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} +. if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize -.else +. else MOZ_OPTIONS+= --disable-optimize -. if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld +. if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # ld 2.17 barfs on Stylo built with -C opt-level=0 USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin -. endif -.endif +. endif +. endif -.if ${PORT_OPTIONS:MCANBERRA} +. if ${PORT_OPTIONS:MCANBERRA} RUN_DEPENDS+= libcanberra>0:audio/libcanberra -.endif +. endif -.if ${PORT_OPTIONS:MDBUS} +. if ${PORT_OPTIONS:MDBUS} BUILD_DEPENDS+= libnotify>0:devel/libnotify LIB_DEPENDS+= libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib -.else +. else MOZ_OPTIONS+= --disable-dbus -.endif +. endif -.if ${PORT_OPTIONS:MFFMPEG} +. if ${PORT_OPTIONS:MFFMPEG} # dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp RUN_DEPENDS+= ffmpeg>=0.8,1:multimedia/ffmpeg -.endif +. endif -.if ${PORT_OPTIONS:MLIBPROXY} +. if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= libproxy.so:net/libproxy MOZ_OPTIONS+= --enable-libproxy -.else +. else MOZ_OPTIONS+= --disable-libproxy -.endif +. endif -.if ${PORT_OPTIONS:MLTO} +. if ${PORT_OPTIONS:MLTO} MOZ_OPTIONS+= --enable-lto=cross -.endif +. endif -.if ${PORT_OPTIONS:MALSA} +. if ${PORT_OPTIONS:MALSA} BUILD_DEPENDS+= ${LOCALBASE}/include/alsa/asoundlib.h:audio/alsa-lib MOZ_OPTIONS+= --enable-alsa -.endif +. endif -.if ${PORT_OPTIONS:MJACK} +. if ${PORT_OPTIONS:MJACK} BUILD_DEPENDS+= ${LOCALBASE}/include/jack/jack.h:audio/jack MOZ_OPTIONS+= --enable-jack -.endif +. endif -.if ${PORT_OPTIONS:MPULSEAUDIO} +. if ${PORT_OPTIONS:MPULSEAUDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio MOZ_OPTIONS+= --enable-pulseaudio -.else +. else MOZ_OPTIONS+= --disable-pulseaudio -.endif +. endif -.if ${PORT_OPTIONS:MSNDIO} +. if ${PORT_OPTIONS:MSNDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/sndio.h:audio/sndio post-patch-SNDIO-on: @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \ -e '/DISABLE_LIBSNDIO_DLOPEN/d' \ ${MOZSRC}/media/libcubeb/src/moz.build -.endif +. endif -.if ${PORT_OPTIONS:MDEBUG} +. if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug --disable-release STRIP= # ports/184285 -.else +. else MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release -. if ${ARCH:Maarch64} || (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2}) +. if ${ARCH:Maarch64} || (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2}) MOZ_OPTIONS+= --enable-rust-simd -. endif -.endif +. endif +. endif -.if ${PORT_OPTIONS:MPROFILE} +. if ${PORT_OPTIONS:MPROFILE} MOZ_OPTIONS+= --enable-profiling STRIP= -.else +. else MOZ_OPTIONS+= --disable-profiling -.endif +. endif -.if ${PORT_OPTIONS:MTEST} +. if ${PORT_OPTIONS:MTEST} USE_XORG+= xscrnsaver MOZ_OPTIONS+= --enable-tests -.else +. else MOZ_OPTIONS+= --disable-tests -.endif +. endif -.if !defined(STRIP) || ${STRIP} == "" +. if !defined(STRIP) || ${STRIP} == "" MOZ_OPTIONS+= --disable-strip --disable-install-strip -.else +. else MOZ_OPTIONS+= --enable-strip --enable-install-strip -.endif +. endif # _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be # used in .mozconfig. And client.mk automatically uses -jN where N # is what multiprocessing.cpu_count() returns. -.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) +. if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) MAKE_JOBS_NUMBER= 1 -.endif -.if defined(MAKE_JOBS_NUMBER) +. endif +. if defined(MAKE_JOBS_NUMBER) MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER} -.endif +. endif -.if defined(MOZ_MAKE_FLAGS) +. if defined(MOZ_MAKE_FLAGS) MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}" -.endif +. endif -.if ${ARCH} == amd64 -. if ${USE_MOZILLA:M-nss} +. if ${ARCH} == amd64 +. if ${USE_MOZILLA:M-nss} USE_BINUTILS= # intel-gcm.s CFLAGS+= -B${LOCALBASE}/bin LDFLAGS+= -B${LOCALBASE}/bin -. endif -.elif ${ARCH:Mpowerpc*} +. endif +. elif ${ARCH:Mpowerpc*} BUILD_DEPENDS+= as:devel/binutils -. if ${ARCH} == "powerpc64" +. if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" -. endif -.endif +. endif +. endif -.else # bsd.port.post.mk +. else # bsd.port.post.mk post-patch: gecko-post-patch gecko-post-patch: @${RM} ${MOZCONFIG} -.if !defined(NOMOZCONFIG) -.for arg in ${MOZ_OPTIONS} +. if !defined(NOMOZCONFIG) +. for arg in ${MOZ_OPTIONS} @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG} -.endfor -.for arg in ${MOZ_MK_OPTIONS} +. endfor +. for arg in ${MOZ_MK_OPTIONS} @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG} -.endfor -.for var in ${MOZ_EXPORT} +. endfor +. for var in ${MOZ_EXPORT} @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG} -.endfor -.endif # .if !defined(NOMOZCONFIG) -.if ${USE_MOZILLA:M-nspr} +. endfor +. endif # .if !defined(NOMOZCONFIG) +. if ${USE_MOZILLA:M-nspr} @${ECHO_MSG} "===> Applying NSPR patches" @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$i; \ done -.endif -.if ${USE_MOZILLA:M-nss} +. endif +. if ${USE_MOZILLA:M-nss} @${ECHO_MSG} "===> Applying NSS patches" @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \ done -.endif +. endif @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${WRKSRC}/config/baseconfig.mk; \ fi @${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${MOZSRC}/config/baseconfig.mk @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \ s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \ ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \ ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ -e 's|mozilla/plugins|browser_plugins|g' \ -e 's|share/mozilla/extensions|lib/xpi|g' \ ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \ ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp # Disable vendor checksums like lang/rust @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${MOZSRC}/third_party/rust/*/.cargo-checksum.json pre-configure-script: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh post-install-script: gecko-create-plist gecko-create-plist: # Create the plist ${RM} ${PLISTF} -.for dir in ${MOZILLA_PLIST_DIRS} +. for dir in ${MOZILLA_PLIST_DIRS} @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} -.endfor +. endfor ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST} -.endif +. endif .endif # HERE THERE BE TACOS -- adamw diff --git a/Mk/bsd.gstreamer.mk b/Mk/bsd.gstreamer.mk index c6009f416a50..7e7b7d85d9e5 100644 --- a/Mk/bsd.gstreamer.mk +++ b/Mk/bsd.gstreamer.mk @@ -1,562 +1,562 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.gstreamer.mk - Support for gstreamer-plugins-based ports. # # Created by: Michael Johnson .if !defined(_POSTMKINCLUDED) && !defined(Gstreamer_Pre_Include) Gstreamer_Include_MAINTAINER= multimedia@FreeBSD.org Gstreamer_Pre_Include= bsd.gstreamer.mk .endif # Ports can use the following: # # For Gstreamer 1.x the same rules apply but instead of # USE_GSTREAMER=, USE_GSTREAMER1= is used. # # If you want to use USE_GSTREAMER after # you must follow one of the examples listed below # # .include # .if defined(WITH_VORBIS) # USE_GSTREAMER= vorbis # .endif # # or # USE_GSTREAMER= yes # .include # .if defined(WITH_FAAD) # USE_GSTREAMER+= faad # .endif # .include # # USE_GSTREAMER=yes will always add a dependency to # gstreamer-plugins # # "Normal" dependencies and variables # GSTREAMER1_PORT= ${PORTSDIR}/multimedia/gstreamer1-plugins _GST1_LIB_BASE= ${LOCALBASE}/lib/gstreamer-${GST1_VERSION} GST1_VERSION= 1.4 GST1_MINOR_VERSION= .0 GST1_SHLIB_VERSION= 0 GST1_MINIMAL_VERSION= .0 # These are the current supported gstreamer-plugins modules: # Supported plugins by both 0.10 and 1.0. _GSTREAMER_PLUGINS= \ a52dec \ aalib \ amrnb \ amrwbdec \ cairo \ cdio \ cdparanoia \ dts \ dv \ faac \ faad \ flac \ flite \ gdkpixbuf \ gl \ gme \ gnonlin \ gsm \ jack \ jpeg \ ladspa \ lame \ libcaca \ libmms \ libvisual \ mpeg2dec \ mpeg2enc \ musepack \ neon \ ogg \ opus \ pango \ pulse \ resindvd \ shout2 \ sndfile \ sndio \ sidplay \ soundtouch \ soup \ speex \ taglib \ theora \ twolame \ v4l2 \ vorbis \ wavpack \ x264 # plugins only in 1.0 .if defined(USE_GSTREAMER1) _GSTREAMER_PLUGINS+= \ aom \ assrender \ bs2b \ chromaprint \ curl \ dash \ dtls \ dvdread \ editing-services \ gtk \ gtk4 \ hls \ kate \ kms \ libav \ libde265 \ lv2 \ mm \ modplug \ mpg123 \ mplex \ opencv \ openexr \ openh264 \ openjpeg \ openmpt \ png \ qt \ rsvg \ rtmp \ smoothstreaming \ spandsp \ srtp \ ttml \ vpx \ vulkan \ webp \ webrtcdsp \ x \ x265 \ ximagesrc \ zbar # vaapi .endif # USE_GSTREAMER1 # other plugins _USE_GSTREAMER_ALL= bad core good ugly yes ${_GSTREAMER_PLUGINS} #--------------------------------------------------------------------------# core_DEPENDS= multimedia/gstreamer-plugins-core core_IMPL= # yes_DEPENDS= multimedia/gstreamer-plugins yes_NAME= gstreamer-plugins yes_NAME10= gstreamer1-plugins yes_GST_PREFIX= # empty yes_IMPL= # empty # XXX check if IMPL is correct for both 0.10 and 1.0 #-- audio plugins section -------------------------------------------------# # Audio Plugins Section a52dec_DEPENDS= audio/gstreamer-plugins-a52dec a52dec_IMPL= ugly amrnb_DEPENDS= audio/gstreamer-plugins-amrnb amrnb_IMPL= ugly amrwbdec_DEPENDS= audio/gstreamer-plugins-amrwbdec amrwbdec_IMPL= ugly bs2b_DEPENDS= audio/gstreamer-plugins-bs2b bs2b_IMPL= bad cdparanoia_DEPENDS= audio/gstreamer-plugins-cdparanoia cdparanoia_IMPL= # chromaprint_DEPENDS= audio/gstreamer-plugins-chromaprint chromeprint_IMPL= bad faac_DEPENDS= audio/gstreamer-plugins-faac faac_IMPL= bad faad_DEPENDS= audio/gstreamer-plugins-faad faad_IMPL= bad flac_DEPENDS= audio/gstreamer-plugins-flac flac_IMPL= good flite_DEPENDS= audio/gstreamer-plugins-flite flite_IMPL= bad gme_DEPENDS= audio/gstreamer-plugins-gme gme_IMPL= bad gsm_DEPENDS= audio/gstreamer-plugins-gsm gsm_IMPL= bad hal_DEPENDS= sysutils/gstreamer-plugins-hal hal_IMPL= good jack_DEPENDS= audio/gstreamer-plugins-jack jack_IMPL= good ladspa_DEPENDS= audio/gstreamer-plugins-ladspa ladspa_IMPL= bad lame_DEPENDS= audio/gstreamer-plugins-lame lame_IMPL= ugly lv2_DEPENDS= audio/gstreamer-plugins-lv2 lv2_IMPL= bad modplug_DEPENDS= audio/gstreamer-plugins-modplug modplug_IMPL= bad mpg123_DEPENDS= audio/gstreamer-plugins-mpg123 mpg123_IMPL= ugly musepack_DEPENDS= audio/gstreamer-plugins-musepack musepack_IMPL= bad neon_DEPENDS= www/gstreamer-plugins-neon neon_IMPL= bad ogg_DEPENDS= audio/gstreamer-plugins-ogg ogg_IMPL= # opus_DEPENDS= audio/gstreamer-plugins-opus opus_IMPL= # pulse_DEPENDS= audio/gstreamer-plugins-pulse pulse_IMPL= good shout2_DEPENDS= audio/gstreamer-plugins-shout2 shout2_IMPL= good sidplay_DEPENDS= audio/gstreamer-plugins-sidplay sidplay_IMPL= ugly sndio_DEPENDS= audio/gstreamer-plugins-sndio sndio_IMPL= # sndfile_DEPENDS= audio/gstreamer-plugins-sndfile sndfile_IMPL= bad soundtouch_DEPENDS= audio/gstreamer-plugins-soundtouch soundtouch_IMPL= bad speex_DEPENDS= audio/gstreamer-plugins-speex speex_IMPL= good taglib_DEPENDS= audio/gstreamer-plugins-taglib taglib_IMPL= good twolame_DEPENDS= audio/gstreamer-plugins-twolame twolame_IMPL= ugly vorbis_DEPENDS= audio/gstreamer-plugins-vorbis vorbis_IMPL= # wavpack_DEPENDS= audio/gstreamer-plugins-wavpack wavpack_IMPL= good webrtcdsp_DEPENDS= audio/gstreamer-plugins-webrtcdsp webrtcdsp_IMPL= bad #-- comms plugin section --------------------------------------------------# spandsp_DEPENDS= comms/gstreamer-plugins-spandsp spandsp_IMPL= bad #-- devel plugin section --------------------------------------------------# soup_DEPENDS= devel/gstreamer-plugins-soup soup_IMPL= good #-- ftp plugin section ----------------------------------------------------# curl_DEPENDS= ftp/gstreamer-plugins-curl curl_IMPL= bad #-- graphics plugin section -----------------------------------------------# aalib_DEPENDS= graphics/gstreamer-plugins-aalib aalib_IMPL= good aom_DEPENDS= multimedia/gstreamer-plugins-aom aom_IMPL= bad assrender_DEPENDS= multimedia/gstreamer-plugins-assrender assrender_IMPL= bad cairo_DEPENDS= graphics/gstreamer-plugins-cairo cairo_IMPL= good gdkpixbuf_DEPENDS= graphics/gstreamer-plugins-gdkpixbuf gdkpixbuf_IMPL= good gl_DEPENDS= graphics/gstreamer-plugins-gl gl_IMPL= bad jpeg_DEPENDS= graphics/gstreamer-plugins-jpeg jpeg_IMPL= good kms_DEPENDS= graphics/gstreamer-plugins-kms kms_IMPL= bad libcaca_DEPENDS= graphics/gstreamer-plugins-libcaca libcaca_IMPL= good libvisual_DEPENDS= graphics/gstreamer-plugins-libvisual libvisual_IMPL= # opencv_DEPENDS= graphics/gstreamer-plugins-opencv opencv_IMPL= bad openexr_DEPENDS= graphics/gstreamer-plugins-openexr openexr_IMPL= bad openjpeg_DEPENDS= graphics/gstreamer-plugins-openjpeg openjpeg_IMPL= bad openmpt_DEPENDS= audio/gstreamer-plugins-openmpt openmpt_IMPL= bad png_DEPENDS= graphics/gstreamer-plugins-png png_IMPL= good qt_DEPENDS= graphics/gstreamer-plugins-qt qt_IMPL= good rsvg_DEPENDS= graphics/gstreamer-plugins-rsvg rsvg_IMPL= bad webp_DEPENDS= graphics/gstreamer-plugins-webp webp_IMPL= bad zbar_DEPENDS= graphics/gstreamer-plugins-zbar zbar_IMPL= bad #-- multimedia plugins section --------------------------------------------# bad_DEPENDS= multimedia/gstreamer-plugins-bad bad_IMPL= # dash_DEPENDS= multimedia/gstreamer-plugins-dash dash_IMPL= bad dvdread_DEPENDS= multimedia/gstreamer-plugins-dvdread dvdread_IMPL= ugly editing-services_DEPENDS= multimedia/gstreamer-editing-services editing-services_GST_PREFIX= gstreamer1- editing-services_GST_SUFX= # empty editing-services_GST_VERSION= 1.0.0 editing-services_IMPL= # dts_DEPENDS= multimedia/gstreamer-plugins-dts dts_IMPL= bad dv_DEPENDS= multimedia/gstreamer-plugins-dv dv_IMPL= good dvd_DEPENDS= multimedia/gstreamer-plugins-dvd dvd_IMPL= ugly good_DEPENDS= multimedia/gstreamer-plugins-good good_IMPL= # gnonlin_DEPENDS= multimedia/gstreamer-plugins-gnonlin gnonlin_IMPL= good hls_DEPENDS= multimedia/gstreamer-plugins-hls hls_IMPL= bad kate_DEPENDS= multimedia/gstreamer-plugins-kate kate_IMPL= bad libav_DEPENDS= multimedia/gstreamer-libav libav_GST_PREFIX= gstreamer1- libav_GST_SUFX= # empty libav_GST_VERSION= 1.0.0 libav_IMPL= # libde265_DEPENDS= multimedia/gstreamer-plugins-libde265 libde265_IMPL= bad mm_DEPENDS= multimedia/gstreamermm mm_GST_PREFIX= gstreamer mm_GST_SUFX= # empty mm_GST_VERSION= 1.10.0 mm_IMPL= # mpeg2dec_DEPENDS= multimedia/gstreamer-plugins-mpeg2dec mpeg2dec_IMPL= ugly mpeg2enc_DEPENDS= multimedia/gstreamer-plugins-mpeg2enc mpeg2enc_IMPL= bad mplex_DEPENDS= multimedia/gstreamer-plugins-mplex mplex_IMPL= bad openh264_DEPENDS= multimedia/gstreamer-plugins-openh264 openh264_IMPL= bad rtmp_DEPENDS= multimedia/gstreamer-plugins-rtmp rtmp_IMPL= bad smoothstreaming_DEPENDS= multimedia/gstreamer-plugins-smoothstreaming smoothstreaming_IMPL= bad ttml_DEPENDS= multimedia/gstreamer-plugins-ttml ttml_IMPL= bad v4l2_DEPENDS= multimedia/gstreamer-plugins-v4l2 v4l2_IMPL= good # hmmm vaapi_DEPENDS= multimedia/gstreamer-vaapi vaapi_IMPL= bad vpx_DEPENDS= multimedia/gstreamer-plugins-vpx vpx_IMPL= good vulkan_DEPENDS= graphics/gstreamer-plugins-vulkan vulkan_IMPL= bad resindvd_DEPENDS= multimedia/gstreamer-plugins-resindvd resindvd_IMPL= bad theora_DEPENDS= multimedia/gstreamer-plugins-theora theora_IMPL= # ugly_DEPENDS= multimedia/gstreamer-plugins-ugly ugly_IMPL= # x264_DEPENDS= multimedia/gstreamer-plugins-x264 x264_IMPL= ugly x265_DEPENDS= multimedia/gstreamer-plugins-x265 x265_IMPL= bad #-- Net Plugins Section ---------------------------------------------------# libmms_DEPENDS= net/gstreamer-plugins-libmms libmms_IMPL= bad srtp_DEPENDS= net/gstreamer-plugins-srtp srtp_IMPL= bad #-- security plugins section ----------------------------------------------# dtls_DEPENDS= security/gstreamer-plugins-dtls dtls_IMPL= bad #-- sysutils plugins section ----------------------------------------------# cdio_DEPENDS= sysutils/gstreamer-plugins-cdio cdio_IMPL= ugly #-- x11 plugins section ---------------------------------------------------# x_DEPENDS= x11/gstreamer-plugins-x x_IMPL= # ximagesrc_DEPENDS= x11/gstreamer-plugins-ximagesrc ximagesrc_IMPL= good #-- x11-toolkits plugins section ------------------------------------------# gtk_DEPENDS= x11-toolkits/gstreamer-plugins-gtk gtk_IMPL= bad gtk4_DEPENDS= x11-toolkits/gstreamer-plugins-gtk4 gtk4_IMPL= good pango_DEPENDS= x11-toolkits/gstreamer-plugins-pango pango_IMPL= # #--------------------------------------------------------------------------# .if defined(_POSTMKINCLUDED) && !defined(Gstreamer_Post_Include) Gstreamer_Post_Include= bsd.gstreamer.mk -.if (defined (USE_GSTREAMER) && defined(USE_GSTREAMER1)) +. if (defined (USE_GSTREAMER) && defined(USE_GSTREAMER1)) IGNORE= USE_GSTREAMER and USE_GSTREAMER1 can't be used together -.endif +. endif _GST_IMPL_LIST:= # -.if defined(USE_GSTREAMER) +. if defined(USE_GSTREAMER) # update this with the gst 1.0 version below -. for ext in ${USE_GSTREAMER} +. for ext in ${USE_GSTREAMER} ${ext}_GST_PREFIX?= gstreamer-plugins- ${ext}_GST_VERSION?= ${GST_VERSION}${GST_MINOR_VERSION} ${ext}_NAME?= ${ext} -. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_DEPENDS}) +. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_DEPENDS}) _GST_BUILD_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME}>=${${ext}_GST_VERSION}:${${ext}_DEPENDS} _GST_RUN_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME}>=${${ext}_GST_VERSION}:${${ext}_DEPENDS} _GST_GST_IMPL_LIST+= ${${ext}_IMPL} -. else +. else IGNORE= cannot install: unknown gstreamer ${GST_VERSION} plugin -- ${ext} -. endif -. endfor +. endif +. endfor # everything wants this _GST_BUILD_DEPENDS+= gstreamer-plugins>=0:multimedia/gstreamer-plugins _GST_LIB_DEPENDS+= libgstreamer-0.10.so:multimedia/gstreamer _GST_RUN_DEPENDS+= gstreamer-plugins>=0:multimedia/gstreamer-plugins -. for plugin in ${_GST_IMPL_LIST:O:u} +. for plugin in ${_GST_IMPL_LIST:O:u} _GST_BUILD_DEPENDS+= gstreamer-plugins-${plugin}>=0:multimedia/gstreamer-plugins-${plugin} _GST_RUN_DEPENDS+= gstreamer-plugins-${plugin}>=0:multimedia/gstreamer-plugins-${plugin} -. endfor +. endfor BUILD_DEPENDS+= ${_GST_BUILD_DEPENDS:O:u} LIB_DEPENDS+= ${_GST_LIB_DEPENDS:O:u} RUN_DEPENDS+= ${_GST_RUN_DEPENDS:O:u} -.endif +. endif -.if defined(USE_GSTREAMER1) -. for ext in ${USE_GSTREAMER1} +. if defined(USE_GSTREAMER1) +. for ext in ${USE_GSTREAMER1} ${ext}_GST_PREFIX?= gstreamer1-plugins- ${ext}_GST_VERSION?= ${GST1_VERSION} ${ext}_NAME10?= ${ext} ${ext}_GST_DEPENDS?= ${${ext}_DEPENDS:S,gstreamer-,gstreamer1-,} -. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_GST_DEPENDS}) +. if ${_USE_GSTREAMER_ALL:M${ext}}!= "" && exists(${PORTSDIR}/${${ext}_GST_DEPENDS}) _GST_BUILD_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME10}>=${${ext}_GST_VERSION}:${${ext}_GST_DEPENDS} _GST_RUN_DEPENDS+= ${${ext}_GST_PREFIX}${${ext}_NAME10}>=${${ext}_GST_VERSION}:${${ext}_GST_DEPENDS} -. if defined(${ext}1_IMPL) +. if defined(${ext}1_IMPL) _GST_IMPL_LIST+= ${${ext}1_IMPL} -. else +. else _GST_IMPL_LIST+= ${${ext}_IMPL} -. endif -. else +. endif +. else IGNORE= cannot install: unknown gstreamer ${GST1_VERSION} plugin -- ${ext} -. endif -. endfor +. endif +. endfor # everything wants this _GST_BUILD_DEPENDS+= gstreamer1-plugins>=${GST1_VERSION}:multimedia/gstreamer1-plugins _GST_LIB_DEPENDS+= libgstreamer-1.0.so:multimedia/gstreamer1 _GST_RUN_DEPENDS+= gstreamer1-plugins>=${GST1_VERSION}:multimedia/gstreamer1-plugins -. for plugin in ${_GST_IMPL_LIST:O:u} +. for plugin in ${_GST_IMPL_LIST:O:u} _GST_BUILD_DEPENDS+= gstreamer1-plugins-${plugin}>=${GST1_VERSION}:multimedia/gstreamer1-plugins-${plugin} _GST_RUN_DEPENDS+= gstreamer1-plugins-${plugin}>=${GST1_VERSION}:multimedia/gstreamer1-plugins-${plugin} -. endfor +. endfor BUILD_DEPENDS+= ${_GST_BUILD_DEPENDS:O:u} LIB_DEPENDS+= ${_GST_LIB_DEPENDS:O:u} RUN_DEPENDS+= ${_GST_RUN_DEPENDS:O:u} -.endif +. endif # The End .endif diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk index f7eb3fe6192b..4833fab43c8a 100644 --- a/Mk/bsd.java.mk +++ b/Mk/bsd.java.mk @@ -1,491 +1,491 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.java.mk - Support for Java-based ports. # # Created by: Ernst de Haan # # For FreeBSD committers: # Please send all suggested changes to the maintainer instead of committing # them yourself. # .if !defined(Java_Include) Java_Include= bsd.java.mk Java_Include_MAINTAINER= java@FreeBSD.org #------------------------------------------------------------------------------- # Variables that each port can define: # # USE_JAVA Should be defined to the remaining variables to have any # effect # # JAVA_VERSION List of space-separated suitable java versions for the # port. An optional "+" allows you to specify a range of # versions. (allowed values: 7[+] 8[+] 11[+] 12[+] 13[+] # 14[+] 15[+] 16[+] 17[+] 18[+]) # # JAVA_OS List of space-separated suitable JDK port operating systems # for the port. (allowed values: native linux) # # JAVA_VENDOR List of space-separated suitable JDK port vendors for the # port. (allowed values: openjdk oracle) # # JAVA_BUILD When set, it means that the selected JDK port should be # added to build dependencies for the port. # # JAVA_EXTRACT This variable works exactly the same as JAVA_BUILD but # regarding extract dependencies. # # JAVA_RUN This variable works exactly the same as JAVA_BUILD but # regarding run dependencies. # # USE_ANT Should be defined when the port uses Apache Ant. Ant is thus # considered to be the sub-make command. When no 'do-build' # target is defined by the port, a default one will be set # that simply runs Ant according to MAKE_ENV, MAKE_ARGS and # ALL_TARGET. Read the documentation in bsd.port.mk for more # information. # #------------------------------------------------------------------------------- # Variables defined for the port: # # JAVA_PORT The name of the JDK port. (e.g. 'java/openjdk8') # # JAVA_PORT_VERSION The version of the JDK port. (e.g. '8') # # JAVA_PORT_OS The operating system used by the JDK port. (e.g. 'linux') # # JAVA_PORT_VENDOR The vendor of the JDK port. (e.g. 'openjdk') # # JAVA_PORT_OS_DESCRIPTION Description of the operating system used by the # JDK port. (e.g. 'Linux') # # JAVA_PORT_VENDOR_DESCRIPTION Description of the vendor of the JDK port. # (e.g. 'OpenJDK BSD Porting Team') # # JAVA_HOME Path to the installation directory of the JDK. (e.g. # '/usr/local/openjdk8') # # JAVAC Path to the Java compiler to use. (e.g. # '/usr/local/openjdk8/bin/javac' or '/usr/local/bin/javac') # # JAR Path to the JAR tool to use. (e.g. # '/usr/local/openjdk8/bin/jar' or '/usr/local/bin/fastjar') # # APPLETVIEWER Path to the appletviewer utility. (e.g. # '/usr/local/linux-jdk1.8.0/bin/appletviewer') # # JAVA Path to the java executable. Use this for executing Java # programs. (e.g. '/usr/local/openjdk8/bin/java') # # JAVADOC Path to the javadoc utility program. # # JAVAH Path to the javah program. # # JAVAP Path to the javap program. # # JAVA_KEYTOOL Path to the keytool utility program. # # JAVA_N2A Path to the native2ascii tool. # # JAVA_POLICYTOOL Path to the policytool program. # # JAVA_SERIALVER Path to the serialver utility program. # # RMIC Path to the RMI stub/skeleton generator, rmic. # # RMIREGISTRY Path to the RMI registry program, rmiregistry. # # RMID Path to the RMI daemon program. # # JAVA_CLASSES Path to the archive that contains the JDK class files. On # most JDKs, this is ${JAVA_HOME}/jre/lib/rt.jar. # # JAVASHAREDIR The base directory for all shared Java resources. # # JAVAJARDIR The directory where a port should install JAR files. # # JAVALIBDIR The directory where JAR files installed by other ports # are located. # #------------------------------------------------------------------------------- # Porter's hints # # To retrieve the Major version number from JAVA_PORT_VERSION (e.g. "1.8"): # -> ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/} # #------------------------------------------------------------------------------- # There are the following stages: # # Stage 1: Define constants # Stage 2: Determine which JDK ports are installed and which JDK ports are # suitable # Stage 3: Decide the exact JDK to use (or install) # Stage 4: Add any dependencies if necessary # Stage 5: Define all settings for the port to use # -. if defined(USE_JAVA) +. if defined(USE_JAVA) -. if !defined(JAVA_VERSION) && empty(USE_JAVA:C/[0-9]*[\.]*[0-9]*[+]*//) +. if !defined(JAVA_VERSION) && empty(USE_JAVA:C/[0-9]*[\.]*[0-9]*[+]*//) JAVA_VERSION=${USE_JAVA} -. endif +. endif #------------------------------------------------------------------------------- # Stage 1: Define constants # # System-global directories # NB: If the value of JAVALIBDIR is altered here it must also be altered # in java/javavmwrapper/Makefile. JAVASHAREDIR?= ${PREFIX}/share/java JAVAJARDIR?= ${JAVASHAREDIR}/classes JAVALIBDIR?= ${LOCALBASE}/share/java/classes # Add appropriate substitutions to PLIST_SUB and LIST_SUB PLIST_SUB+= JAVASHAREDIR="${JAVASHAREDIR:S,^${PREFIX}/,,}" \ JAVAJARDIR="${JAVAJARDIR:S,^${PREFIX}/,,}" SUB_LIST+= JAVASHAREDIR="${JAVASHAREDIR}" \ JAVAJARDIR="${JAVAJARDIR}" \ JAVALIBDIR="${JAVALIBDIR}" -. if defined(JAVA_VERSION) +. if defined(JAVA_VERSION) SUB_LIST+= JAVA_VERSION="${JAVA_VERSION}" -. endif -. if defined(JAVA_VENDOR) +. endif +. if defined(JAVA_VENDOR) SUB_LIST+= JAVA_VENDOR="${JAVA_VENDOR}" -. endif -. if defined(JAVA_OS) +. endif +. if defined(JAVA_OS) SUB_LIST+= JAVA_OS="${JAVA_OS}" -. endif +. endif # The complete list of Java versions, os and vendors supported. __JAVA_VERSION_LIST= 7 8 11 12 13 14 15 16 17 18 _JAVA_VERSION_LIST= ${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/} _JAVA_OS_LIST= native linux _JAVA_VENDOR_LIST= openjdk oracle # Set all meta-information about JDK ports: # port location, corresponding JAVA_HOME, JDK version, OS, vendor _JAVA_PORT_NATIVE_OPENJDK_JDK_7_INFO= PORT=java/openjdk7 HOME=${LOCALBASE}/openjdk7 \ VERSION=7 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_8_INFO= PORT=java/openjdk8 HOME=${LOCALBASE}/openjdk8 \ VERSION=8 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_11_INFO= PORT=java/openjdk11 HOME=${LOCALBASE}/openjdk11 \ VERSION=11 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_12_INFO= PORT=java/openjdk12 HOME=${LOCALBASE}/openjdk12 \ VERSION=12 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_13_INFO= PORT=java/openjdk13 HOME=${LOCALBASE}/openjdk13 \ VERSION=13 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_14_INFO= PORT=java/openjdk14 HOME=${LOCALBASE}/openjdk14 \ VERSION=14 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_15_INFO= PORT=java/openjdk15 HOME=${LOCALBASE}/openjdk15 \ VERSION=15 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_16_INFO= PORT=java/openjdk16 HOME=${LOCALBASE}/openjdk16 \ VERSION=16 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_17_INFO= PORT=java/openjdk17 HOME=${LOCALBASE}/openjdk17 \ VERSION=17 OS=native VENDOR=openjdk _JAVA_PORT_NATIVE_OPENJDK_JDK_18_INFO= PORT=java/openjdk18 HOME=${LOCALBASE}/openjdk18 \ VERSION=18 OS=native VENDOR=openjdk _JAVA_PORT_LINUX_ORACLE_JDK_8_INFO= PORT=java/linux-oracle-jdk18 HOME=${LOCALBASE}/linux-oracle-jdk1.8.0 \ VERSION=8 OS=linux VENDOR=oracle # Verbose description for each VENDOR _JAVA_VENDOR_openjdk= "OpenJDK BSD Porting Team" _JAVA_VENDOR_oracle= Oracle # Verbose description for each OS _JAVA_OS_native= Native _JAVA_OS_linux= Linux # List all JDK ports in order of preference __JAVA_PORTS_ALL= \ JAVA_PORT_NATIVE_OPENJDK_JDK_8 \ JAVA_PORT_NATIVE_OPENJDK_JDK_11 \ JAVA_PORT_NATIVE_OPENJDK_JDK_17 \ JAVA_PORT_NATIVE_OPENJDK_JDK_12 \ JAVA_PORT_NATIVE_OPENJDK_JDK_13 \ JAVA_PORT_NATIVE_OPENJDK_JDK_14 \ JAVA_PORT_NATIVE_OPENJDK_JDK_15 \ JAVA_PORT_NATIVE_OPENJDK_JDK_16 \ JAVA_PORT_NATIVE_OPENJDK_JDK_18 \ JAVA_PORT_NATIVE_OPENJDK_JDK_7 \ JAVA_PORT_LINUX_ORACLE_JDK_8 _JAVA_PORTS_ALL= ${JAVA_PREFERRED_PORTS} \ JAVA_PORT_NATIVE_OPENJDK_JDK_${JAVA_DEFAULT} \ ${__JAVA_PORTS_ALL} # Set the name of the file that indicates that a JDK is indeed installed, as a # relative path within the JAVA_HOME directory. _JDK_FILE=bin/javac #------------------------------------------------------------------------------- # Stage 2: Determine which JDK ports are suitable and which JDK ports are # suitable # # From here, the port is using bsd.java.mk v2.0 # Error checking: defined JAVA_{HOME,PORT,PORT_VERSION,PORT_VENDOR,PORT_OS} -. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS -. if defined(${variable}) +. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS +. if defined(${variable}) check-makevars:: @${ECHO_CMD} "${PKGNAME}: Environment error: \"${variable}\" should not be defined -- clearing." .undef ${variable} -. endif -. endfor +. endif +. endfor # Error checking: JAVA_VERSION -.if defined(JAVA_VERSION) -.if !defined(_JAVA_VERSION_LIST_REGEXP) +. if defined(JAVA_VERSION) +. if !defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP= ${_JAVA_VERSION_LIST:C/\+/\\+/:ts|} -.endif +. endif check-makevars:: @( test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}")) || \ (${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)"; ${FALSE}) -.endif +. endif # Error checking: JAVA_VENDOR -.if defined(JAVA_VENDOR) -.if !defined(_JAVA_VENDOR_LIST_REGEXP) +. if defined(JAVA_VENDOR) +. if !defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP= ${_JAVA_VENDOR_LIST:ts|} -.endif +. endif check-makevars:: @( test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VENDOR_LIST_REGEXP}" )) || \ (${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VENDOR}\" is not a valid value for JAVA_VENDOR. It should be one or more of: ${_JAVA_VENDOR_LIST}"; \ ${FALSE}) -.endif +. endif # Error checking: JAVA_OS -.if defined(JAVA_OS) -.if !defined(_JAVA_OS_LIST_REGEXP) +. if defined(JAVA_OS) +. if !defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP= ${_JAVA_OS_LIST:ts|} -.endif +. endif check-makevars:: @( test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_OS_LIST_REGEXP}")) || \ (${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_OS}\" is not a valid value for JAVA_OS. It should be one or more of: ${_JAVA_OS_LIST}"; \ ${FALSE}) -.endif +. endif # Set default values for JAVA_BUILD and JAVA_RUN # When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre # (unless NO_BUILD is set) -. if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN) -. if !defined(NO_BUILD) +. if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN) +. if !defined(NO_BUILD) JAVA_BUILD= jdk -. endif +. endif JAVA_RUN= jre -. endif +. endif # JDK dependency setting . undef _JAVA_PORTS_INSTALLED . undef _JAVA_PORTS_POSSIBLE -. if defined(JAVA_VERSION) +. if defined(JAVA_VERSION) _JAVA_VERSION= ${JAVA_VERSION:S/1.7+/1.7 1.8+/:S/1.8+/1.8 11+/:S/1.7/7/:S/1.8/8/:S/7+/7 8+/:S/8+/8 11+/:S/11+/11 12+/:S/12+/12 13+/:S/13+/13 14+/:S/14+/14 15+/:S/15+/15 16+/:S/16+/16 17+/:S/17+/17 18+/:S/18+/18/} -. else +. else _JAVA_VERSION= ${__JAVA_VERSION_LIST} -. endif -. if defined(JAVA_OS) +. endif +. if defined(JAVA_OS) _JAVA_OS= ${JAVA_OS} -. else +. else _JAVA_OS= ${_JAVA_OS_LIST} -. endif -. if defined(JAVA_VENDOR) +. endif +. if defined(JAVA_VENDOR) _JAVA_VENDOR= ${JAVA_VENDOR} -. else +. else _JAVA_VENDOR= ${_JAVA_VENDOR_LIST} -. endif +. endif -. for A_JAVA_PORT in ${_JAVA_PORTS_ALL} +. for A_JAVA_PORT in ${_JAVA_PORTS_ALL} A_JAVA_PORT_INFO:= ${A_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} A_JAVA_PORT_HOME= ${A_JAVA_PORT_INFO:MHOME=*:S,HOME=,,} A_JAVA_PORT_VERSION= ${A_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,} A_JAVA_PORT_OS= ${A_JAVA_PORT_INFO:MOS=*:S,OS=,,} A_JAVA_PORT_VENDOR= ${A_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,} -.if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE}) +. if !defined(_JAVA_PORTS_INSTALLED) && exists(${A_JAVA_PORT_HOME}/${_JDK_FILE}) __JAVA_PORTS_INSTALLED+= ${A_JAVA_PORT} -.endif +. endif # Because variables inside for loops are special (directly replaced as strings), # we are allowed to use them inside modifiers, where normally ${FOO:M${BAR}} is # not allowed. # -.for ver in ${A_JAVA_PORT_VERSION} -.for os in ${A_JAVA_PORT_OS} -.for vendor in ${A_JAVA_PORT_VENDOR} -.if ${_JAVA_VERSION:M${ver}} && ${_JAVA_OS:M${os}} && ${_JAVA_VENDOR:M${vendor}} +. for ver in ${A_JAVA_PORT_VERSION} +. for os in ${A_JAVA_PORT_OS} +. for vendor in ${A_JAVA_PORT_VENDOR} +. if ${_JAVA_VERSION:M${ver}} && ${_JAVA_OS:M${os}} && ${_JAVA_VENDOR:M${vendor}} __JAVA_PORTS_POSSIBLE+= ${A_JAVA_PORT} -.endif -.endfor -.endfor -.endfor +. endif +. endfor +. endfor +. endfor -. endfor -.if !defined(_JAVA_PORTS_INSTALLED) +. endfor +. if !defined(_JAVA_PORTS_INSTALLED) _JAVA_PORTS_INSTALLED= ${__JAVA_PORTS_INSTALLED:C/ [ ]+/ /g} -.endif +. endif _JAVA_PORTS_POSSIBLE= ${__JAVA_PORTS_POSSIBLE:C/ [ ]+/ /g} #------------------------------------------------------------------------------- # Stage 3: Decide the exact JDK to use (or install) # # Find an installed JDK port that matches the requirements of the port . undef _JAVA_PORTS_INSTALLED_POSSIBLE -. for A_JAVA_PORT in ${_JAVA_PORTS_POSSIBLE} +. for A_JAVA_PORT in ${_JAVA_PORTS_POSSIBLE} __JAVA_PORTS_INSTALLED_POSSIBLE+= ${_JAVA_PORTS_INSTALLED:M${A_JAVA_PORT}} -. endfor +. endfor _JAVA_PORTS_INSTALLED_POSSIBLE= ${__JAVA_PORTS_INSTALLED_POSSIBLE:C/[ ]+//g} -. if ${_JAVA_PORTS_INSTALLED_POSSIBLE} != "" -. for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE} -. if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit) +. if ${_JAVA_PORTS_INSTALLED_POSSIBLE} != "" +. for i in ${_JAVA_PORTS_INSTALLED_POSSIBLE} +. if !defined(_JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit) _JAVA_PORT= $i _JAVA_PORTS_INSTALLED_POSSIBLE_shortcircuit= 1 -. endif -. endfor +. endif +. endfor # If no installed JDK port fits, then pick one from the list of possible ones -. else -. for i in ${_JAVA_PORTS_POSSIBLE} -. if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit) +. else +. for i in ${_JAVA_PORTS_POSSIBLE} +. if !defined(_JAVA_PORTS_POSSIBLE_shortcircuit) _JAVA_PORT= $i _JAVA_PORTS_POSSIBLE_shortcircuit= 1 -. endif -. endfor -. endif +. endif +. endfor +. endif _JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/} JAVA_PORT= ${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,} JAVA_HOME= ${_JAVA_PORT_INFO:MHOME=*:S,HOME=,,} JAVA_PORT_VERSION= ${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,} JAVA_PORT_OS= ${_JAVA_PORT_INFO:MOS=*:S,OS=,,} JAVA_PORT_VENDOR= ${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,} JAVA_PORT_VENDOR_DESCRIPTION:= ${JAVA_PORT_VENDOR:S/^/\${_JAVA_VENDOR_/:S/$/}/} JAVA_PORT_OS_DESCRIPTION:= ${JAVA_PORT_OS:S/^/\${_JAVA_OS_/:S/$/}/} #------------------------------------------------------------------------------- # Stage 4: Add any dependencies if necessary # # Ant Support: USE_ANT --> JAVA_BUILD=jdk -. if defined(USE_ANT) +. if defined(USE_ANT) JAVA_BUILD= jdk -. endif +. endif # Add the JDK port to the dependencies DEPEND_JAVA= ${JAVA}:${JAVA_PORT} -. if defined(JAVA_EXTRACT) +. if defined(JAVA_EXTRACT) EXTRACT_DEPENDS+= ${DEPEND_JAVA} -. endif -. if defined(JAVA_BUILD) -. if defined(NO_BUILD) +. endif +. if defined(JAVA_BUILD) +. if defined(NO_BUILD) check-makevars:: @${ECHO_CMD} "${PKGNAME}: Makefile error: JAVA_BUILD and NO_BUILD cannot be set at the same time."; @${FALSE} -. endif +. endif BUILD_DEPENDS+= ${DEPEND_JAVA} -. endif -. if defined(JAVA_RUN) +. endif +. if defined(JAVA_RUN) RUN_DEPENDS+= ${DEPEND_JAVA} -. endif +. endif # Ant support: default do-build target -. if defined(USE_ANT) +. if defined(USE_ANT) DESTDIRNAME?= -Dfreebsd.ports.destdir ANT?= ${LOCALBASE}/bin/ant MAKE_ENV+= JAVA_HOME=${JAVA_HOME} BUILD_DEPENDS+= ${ANT}:devel/apache-ant ALL_TARGET?= -. if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET}) -. endif -. if !target(do-test) && defined(TEST_TARGET) +. endif +. if !target(do-test) && defined(TEST_TARGET) TEST_DEPENDS+= ${DEPEND_JAVA} TEST_DEPENDS+= ${ANT}:devel/apache-ant do-test: @(cd ${TEST_WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${TEST_TARGET}) -. endif -. endif +. endif +. endif #----------------------------------------------------------------------------- # Stage 5: Define all settings for the port to use # # At this stage both JAVA_HOME and JAVA_PORT are definitely given a value. # # Define the location of the Java compiler. # Only define JAVAC if a JDK is needed . undef JAVAC # Then test if a JAVAC has to be set (JAVA_BUILD==jdk) -. if defined(JAVA_BUILD) -. if (${JAVA_BUILD:tu} == "JDK") && !defined(JAVAC) +. if defined(JAVA_BUILD) +. if (${JAVA_BUILD:tu} == "JDK") && !defined(JAVAC) JAVAC?= ${JAVA_HOME}/bin/javac -. endif -. endif +. endif +. endif # Define the location of some more executables. APPLETVIEWER?= ${JAVA_HOME}/bin/appletviewer JAR?= ${JAVA_HOME}/bin/jar JAVA?= ${JAVA_HOME}/bin/java JAVADOC?= ${JAVA_HOME}/bin/javadoc JAVAH?= ${JAVA_HOME}/bin/javah JAVAP?= ${JAVA_HOME}/bin/javap JAVA_N2A?= ${JAVA_HOME}/bin/native2ascii JAVA_SERIALVER?=${JAVA_HOME}/bin/serialver RMIC?= ${JAVA_HOME}/bin/rmic RMIREGISTRY?= ${JAVA_HOME}/bin/rmiregistry JAVA_KEYTOOL?= ${JAVA_HOME}/bin/keytool JAVA_POLICYTOOL?= ${JAVA_HOME}/bin/policytool RMID?= ${JAVA_HOME}/bin/rmid # Set the location of the ZIP or JAR file with all standard Java classes. JAVA_CLASSES= ${JAVA_HOME}/jre/lib/rt.jar #------------------------------------------------------------------------------- # Additional Java support # Debug target # Use it to check Java dependency while porting java-debug: @${ECHO_CMD} "# User specified parameters:" @${ECHO_CMD} "JAVA_VERSION= ${JAVA_VERSION} (${_JAVA_VERSION})" @${ECHO_CMD} "JAVA_OS= ${JAVA_OS} (${_JAVA_OS})" @${ECHO_CMD} "JAVA_VENDOR= ${JAVA_VENDOR} (${_JAVA_VENDOR})" @${ECHO_CMD} "JAVA_BUILD= ${JAVA_BUILD}" @${ECHO_CMD} "JAVA_RUN= ${JAVA_RUN}" @${ECHO_CMD} "JAVA_EXTRACT= ${JAVA_EXTRACT}" @${ECHO_CMD} "JAVA_DEFAULT= ${JAVA_DEFAULT}" @${ECHO_CMD} @${ECHO_CMD} "# JDK port dependency selection process:" @${ECHO_CMD} "_JAVA_PORTS_POSSIBLE= ${_JAVA_PORTS_POSSIBLE}" @${ECHO_CMD} "_JAVA_PORTS_INSTALLED= ${_JAVA_PORTS_INSTALLED}" @${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}" @${ECHO_CMD} "_JAVA_PORT= ${_JAVA_PORT}" @${ECHO_CMD} "_JAVA_PORT_INFO= ${_JAVA_PORT_INFO:S/\t/ /}" @${ECHO_CMD} @${ECHO_CMD} "# Selected JDK port:" @${ECHO_CMD} "JAVA_PORT= ${JAVA_PORT}" @${ECHO_CMD} "JAVA_HOME= ${JAVA_HOME}" @${ECHO_CMD} "JAVA_PORT_VERSION= ${JAVA_PORT_VERSION}" @${ECHO_CMD} "JAVA_PORT_OS= ${JAVA_PORT_OS} (${JAVA_PORT_OS_DESCRIPTION})" @${ECHO_CMD} "JAVA_PORT_VENDOR= ${JAVA_PORT_VENDOR} (${JAVA_PORT_VENDOR_DESCRIPTION})" @${ECHO_CMD} @${ECHO_CMD} "# Additional variables:" @${ECHO_CMD} "JAVAC= ${JAVAC}" @${ECHO_CMD} "JAVA_CLASSES= ${JAVA_CLASSES}" -. endif +. endif .endif diff --git a/Mk/bsd.ldap.mk b/Mk/bsd.ldap.mk index 755506c16864..fecddc0b8c77 100644 --- a/Mk/bsd.ldap.mk +++ b/Mk/bsd.ldap.mk @@ -1,87 +1,87 @@ # -*- tab-width: 4; -*- # ex: ts=4 .if defined(_POSTMKINCLUDED) && !defined(Ldap_Post_Include) Ldap_Post_Include= bsd.ldap.mk Database_Include_MAINTAINER= ports@FreeBSD.org # For including this file define macro USE_OPENLDAP. Defining macro like # USE_OPENLDAP_VER or WANT_OPENLDAP_VER will include this file too. # ## # USE_OPENLDAP - Add OpenLDAP client dependency. # If no version is given (by the maintainer via the port or # by the user via defined variable), try to find the # currently installed version. Fall back to default if # necessary (OpenLDAP 2.4 = 24). # DEFAULT_OPENLDAP_VER # - OpenLDAP default version. Can be overriden within a port. # Default: 24. # WANT_OPENLDAP_VER # - Maintainer can set an arbitrary version of OpenLDAP by using it. # IGNORE_OPENLDAP_OPENLDAP # - This variable can be defined if the ports doesn't support # one or more version of OpenLDAP. # WITH_OPENLDAP_VER # - User defined variable to set OpenLDAP version. # OPENLDAP_VER # - Detected OpenLDAP version. -.if defined(USE_OPENLDAP) +. if defined(USE_OPENLDAP) DEFAULT_OPENLDAP_VER?= 24 # OpenLDAP client versions currently supported OPENLDAP24_LIB= libldap-2.4.so.2 OPENLDAP25_LIB= libldap-2.5.so.0 OPENLDAP26_LIB= libldap.so.2 -.if exists(${LOCALBASE}/bin/ldapwhoami) +. if exists(${LOCALBASE}/bin/ldapwhoami) _OPENLDAP_VER!= ${LOCALBASE}/bin/ldapwhoami -VV 2>&1 | ${GREP} ldapwhoami | ${SED} -E 's/.*OpenLDAP: ldapwhoami (2)\.([0-9]).*/\1\2/' -.endif +. endif -.if defined(WANT_OPENLDAP_VER) -.if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER} != ${WANT_OPENLDAP_VER} +. if defined(WANT_OPENLDAP_VER) +. if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER} != ${WANT_OPENLDAP_VER} IGNORE= cannot install: the port wants openldap${WANT_OPENLDAP_VER}-client and you try to install openldap${WITH_OPENLDAP_VER}-client -.endif +. endif OPENLDAP_VER= ${WANT_OPENLDAP_VER} -.elif defined(WITH_OPENLDAP_VER) +. elif defined(WITH_OPENLDAP_VER) OPENLDAP_VER= ${WITH_OPENLDAP_VER} -.else -.if defined(_OPENLDAP_VER) +. else +. if defined(_OPENLDAP_VER) OPENLDAP_VER= ${_OPENLDAP_VER} -.else +. else OPENLDAP_VER= ${DEFAULT_OPENLDAP_VER} -.endif -.endif # WANT_OPENLDAP_VER +. endif +. endif # WANT_OPENLDAP_VER -.if defined(_OPENLDAP_VER) -.if ${_OPENLDAP_VER} != ${OPENLDAP_VER} +. if defined(_OPENLDAP_VER) +. if ${_OPENLDAP_VER} != ${OPENLDAP_VER} IGNORE= cannot install: OpenLDAP versions mismatch: openldap${_OPENLDAP_VER}-client is installed and wanted version is openldap${OPENLDAP_VER}-client -.endif -.endif +. endif +. endif CFLAGS+= -DLDAP_DEPRECATED _OPENLDAP_CLIENT_PKG!= ${PKG_INFO} -Ex openldap.\*-client 2>/dev/null; ${ECHO_CMD} # And now we are checking if we can use it -.if defined(OPENLDAP${OPENLDAP_VER}_LIB) +. if defined(OPENLDAP${OPENLDAP_VER}_LIB) # compatability shim -.if defined(BROKEN_WITH_OPENLDAP) +. if defined(BROKEN_WITH_OPENLDAP) IGNORE_WITH_OPENLDAP=${BROKEN_WITH_OPENLDAP} -.endif -.if defined(IGNORE_WITH_OPENLDAP) -. for VER in ${IGNORE_WITH_OPENLDAP} -. if (${OPENLDAP_VER} == "${VER}") +. endif +. if defined(IGNORE_WITH_OPENLDAP) +. for VER in ${IGNORE_WITH_OPENLDAP} +. if (${OPENLDAP_VER} == "${VER}") IGNORE= cannot install: doesn't work with OpenLDAP version: ${OPENLDAP_VER} (Doesn't support OpenLDAP ${IGNORE_WITH_OPENLDAP}) -. endif -. endfor -.endif # IGNORE_WITH_OPENLDAP +. endif +. endfor +. endif # IGNORE_WITH_OPENLDAP LIB_DEPENDS+= ${OPENLDAP${OPENLDAP_VER}_LIB}:net/openldap${OPENLDAP_VER}-client -.else +. else IGNORE= cannot install: unknown OpenLDAP version: ${OPENLDAP_VER} -.endif # Check for correct libs +. endif # Check for correct libs -.endif # defined(USE_OPENLDAP) +. endif # defined(USE_OPENLDAP) .endif # defined(_POSTMKINCLUDED) && !defined(Ldap_Post_Include) diff --git a/Mk/bsd.licenses.db.mk b/Mk/bsd.licenses.db.mk index 52906b71cad5..82aed96f3e9c 100644 --- a/Mk/bsd.licenses.db.mk +++ b/Mk/bsd.licenses.db.mk @@ -1,427 +1,427 @@ #-*- tab-width: 4; -*- # ex:ts=4 # ** Please run changes to this file by eadler@ first ** Licenses_db_Include_MAINTAINER= portmgr@FreeBSD.org # # bsd.licenses.db.mk - License database for bsd.licenses.mk # # Created by: Alejandro Pulver # # Please view me with 4 column tabs! # # The canonical source of license names and short-name identifiers: # - SPDX License List # https://spdx.org/licenses/ # # See also: # - Copyfree Licenses # http://copyfree.org/standard/licenses # - Wikipedia (article "Comparison of Free Software Licenses") # http://en.wikipedia.org/wiki/Comparison_of_free_software_licences # # Probably will be automatically incorporated from FOSSology's software. # # IMPORTANT: as this file is going to be included by most ports, we may # consider having licenses here only as "tags" as most of them will be free, # to remove some loops and additional variables here. This will not affect the # rest of bsd.licenses.mk, and anyways restricted licenses that aren't used by # many ports should be defined in each one's Makefile. # XXX Start of editable section # License definitions # # _LICENSE_LIST - List of defined licenses # _LICENSE_LIST_GROUPS - List of defined license groups # _LICENSE_LIST= BSL CDDL CPAL-1.0 ClArtistic EPL GFDL GMGPL \ ISCL MIT NCSA ODbL OFL10 OFL11 OWL OpenSSL PD PSFL PostgreSQL \ RUBY UNLICENSE WTFPL1 WTFPL ZLIB ZPL21 # GNU family _LICENSE_LIST+= AGPLv3 GPLv1 GPLv2 GPLv3 GPLv3RLE LGPL20 LGPL21 LGPL3 _LICENSE_LIST+= AGPLv3+ GPLv1+ GPLv2+ GPLv3+ GPLv3RLE+ LGPL20+ LGPL21+ \ LGPL3+ # BSD family _LICENSE_LIST+= BSD BSD0CLAUSE BSD2CLAUSE BSD3CLAUSE BSD4CLAUSE # LaTeX family _LICENSE_LIST+= LPPL10 LPPL11 LPPL12 LPPL13 LPPL13a LPPL13b LPPL13c # Apache family _LICENSE_LIST+= APACHE10 APACHE11 APACHE20 # Artistic family _LICENSE_LIST+= ART10 ARTPERL10 ART20 # PHP family _LICENSE_LIST+= PHP202 PHP30 PHP301 # Creative Commons family _LICENSE_LIST+= CC0-1.0 \ CC-BY-1.0 CC-BY-2.0 CC-BY-2.5 CC-BY-3.0 CC-BY-4.0 \ CC-BY-ND-1.0 CC-BY-ND-2.0 CC-BY-ND-2.5 CC-BY-ND-3.0 CC-BY-ND-4.0 \ CC-BY-NC-1.0 CC-BY-NC-2.0 CC-BY-NC-2.5 CC-BY-NC-3.0 CC-BY-NC-4.0 \ CC-BY-NC-ND-1.0 CC-BY-NC-ND-2.0 CC-BY-NC-ND-2.5 CC-BY-NC-ND-3.0 CC-BY-NC-ND-4.0 \ CC-BY-NC-SA-1.0 CC-BY-NC-SA-2.0 CC-BY-NC-SA-2.5 CC-BY-NC-SA-3.0 CC-BY-NC-SA-4.0 \ CC-BY-SA-1.0 CC-BY-SA-2.0 CC-BY-SA-2.5 CC-BY-SA-3.0 CC-BY-SA-4.0 # MPL family _LICENSE_LIST+= MPL10 MPL11 MPL20 # Others _LICENSE_LIST+= NONE # List of groups (only names must be present) _LICENSE_NAME_FSF= Free Software Foundation Approved _LICENSE_NAME_GPL= GPL Compatible _LICENSE_NAME_OSI= OSI Approved _LICENSE_NAME_COPYFREE= Complies with Copyfree Standard Definition _LICENSE_NAME_FONTS= Font licenses # Default permissions for licenses here, if not defined _LICENSE_PERMS_DEFAULT= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept # Properties of license "xxx" (similar to port variables, but single) # # _LICENSE_NAME_xxx - Full name/description of license/group # _LICENSE_PERMS_xxx - Permissions (if not defined defaults to # ${_LICENSE_PERMS_DEFAULT}. # _LICENSE_GROUPS_xxx - Groups (optional) # # Notes: # - General permissions from groups are added to each license, if not defined. # _LICENSE_NAME_AGPLv3= GNU Affero General Public License version 3 _LICENSE_GROUPS_AGPLv3= FSF GPL OSI # Note that though plus is allowed in a variable (and this license) name it # needs an extra space before following equals sign for them not to be parsed # as a single += operator _LICENSE_NAME_AGPLv3+ = ${_LICENSE_NAME_AGPLv3} (or later) _LICENSE_GROUPS_AGPLv3+ = ${_LICENSE_GROUPS_AGPLv3} _LICENSE_NAME_APACHE10= Apache License 1.0 _LICENSE_GROUPS_APACHE10= FSF _LICENSE_NAME_APACHE11= Apache License 1.1 _LICENSE_GROUPS_APACHE11= FSF OSI _LICENSE_NAME_APACHE20= Apache License 2.0 _LICENSE_GROUPS_APACHE20= FSF OSI _LICENSE_NAME_ART10= Artistic License version 1.0 _LICENSE_GROUPS_ART10= OSI _LICENSE_NAME_ARTPERL10=Artistic License (perl) version 1.0 _LICENSE_GROUPS_ARTPERL10= OSI _LICENSE_NAME_ART20= Artistic License version 2.0 _LICENSE_GROUPS_ART20= FSF GPL OSI _LICENSE_NAME_BSD= BSD license Generic Version (deprecated) _LICENSE_GROUPS_BSD= FSF OSI COPYFREE _LICENSE_NAME_BSD0CLAUSE= BSD Zero Clause License _LICENSE_GROUPS_BSD0CLAUSE= OSI _LICENSE_NAME_BSD2CLAUSE= BSD 2-clause "Simplified" License _LICENSE_GROUPS_BSD2CLAUSE= FSF OSI COPYFREE _LICENSE_NAME_BSD3CLAUSE= BSD 3-clause "New" or "Revised" License _LICENSE_GROUPS_BSD3CLAUSE= FSF OSI COPYFREE _LICENSE_NAME_BSD4CLAUSE= BSD 4-clause "Original" or "Old" License _LICENSE_GROUPS_BSD4CLAUSE= FSF _LICENSE_NAME_BSL= Boost Software License _LICENSE_GROUPS_BSL= FSF OSI COPYFREE _LICENSE_NAME_CC0-1.0= Creative Commons Zero v1.0 Universal _LICENSE_GROUPS_CC0-1.0= FSF GPL COPYFREE _LICENSE_NAME_CC-BY-1.0= Creative Commons Attribution 1.0 _LICENSE_GROUPS_CC-BY-1.0= # empty _LICENSE_NAME_CC-BY-2.0= Creative Commons Attribution 2.0 _LICENSE_GROUPS_CC-BY-2.0= # empty _LICENSE_NAME_CC-BY-2.5= Creative Commons Attribution 2.5 _LICENSE_GROUPS_CC-BY-2.5= # empty _LICENSE_NAME_CC-BY-3.0= Creative Commons Attribution 3.0 _LICENSE_GROUPS_CC-BY-3.0= # empty _LICENSE_NAME_CC-BY-4.0= Creative Commons Attribution 4.0 _LICENSE_GROUPS_CC-BY-4.0= # empty _LICENSE_NAME_CC-BY-ND-1.0= Creative Commons Attribution No Derivatives 1.0 _LICENSE_GROUPS_CC-BY-ND-1.0= # empty _LICENSE_NAME_CC-BY-ND-2.0= Creative Commons Attribution No Derivatives 2.0 _LICENSE_GROUPS_CC-BY-ND-2.0= # empty _LICENSE_NAME_CC-BY-ND-2.5= Creative Commons Attribution No Derivatives 2.5 _LICENSE_GROUPS_CC-BY-ND-2.5= # empty _LICENSE_NAME_CC-BY-ND-3.0= Creative Commons Attribution No Derivatives 3.0 _LICENSE_GROUPS_CC-BY-ND-3.0= # empty _LICENSE_NAME_CC-BY-ND-4.0= Creative Commons Attribution No Derivatives 4.0 _LICENSE_GROUPS_CC-BY-ND-4.0= # empty _LICENSE_NAME_CC-BY-NC-1.0= Creative Commons Attribution Non Commercial 1.0 _LICENSE_GROUPS_CC-BY-NC-1.0= # empty _LICENSE_PERMS_CC-BY-NC-1.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-2.0= Creative Commons Attribution Non Commercial 2.0 _LICENSE_GROUPS_CC-BY-NC-2.0= # empty _LICENSE_PERMS_CC-BY-NC-2.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-2.5= Creative Commons Attribution Non Commercial 2.5 _LICENSE_GROUPS_CC-BY-NC-2.5= # empty _LICENSE_PERMS_CC-BY-NC-2.5= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-3.0= Creative Commons Attribution Non Commercial 3.0 _LICENSE_GROUPS_CC-BY-NC-3.0= # empty _LICENSE_PERMS_CC-BY-NC-3.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-4.0= Creative Commons Attribution Non Commercial 4.0 _LICENSE_GROUPS_CC-BY-NC-4.0= # empty _LICENSE_PERMS_CC-BY-NC-4.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-ND-1.0= Creative Commons Attribution Non Commercial No Derivatives 1.0 _LICENSE_GROUPS_CC-BY-NC-ND-1.0= # empty _LICENSE_PERMS_CC-BY-NC-ND-1.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-ND-2.0= Creative Commons Attribution Non Commercial No Derivatives 2.0 _LICENSE_GROUPS_CC-BY-NC-ND-2.0= # empty _LICENSE_PERMS_CC-BY-NC-ND-2.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-ND-2.5= Creative Commons Attribution Non Commercial No Derivatives 2.5 _LICENSE_GROUPS_CC-BY-NC-ND-2.5= # empty _LICENSE_PERMS_CC-BY-NC-ND-2.5= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-ND-3.0= Creative Commons Attribution Non Commercial No Derivatives 3.0 _LICENSE_GROUPS_CC-BY-NC-ND-3.0= # empty _LICENSE_PERMS_CC-BY-NC-ND-3.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-ND-4.0= Creative Commons Attribution Non Commercial No Derivatives 4.0 _LICENSE_GROUPS_CC-BY-NC-ND-4.0= # empty _LICENSE_PERMS_CC-BY-NC-ND-4.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-SA-1.0= Creative Commons Attribution Non Commercial Share Alike 1.0 _LICENSE_GROUPS_CC-BY-NC-SA-1.0= # empty _LICENSE_PERMS_CC-BY-NC-SA-1.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-SA-2.0= Creative Commons Attribution Non Commercial Share Alike 2.0 _LICENSE_GROUPS_CC-BY-NC-SA-2.0= # empty _LICENSE_PERMS_CC-BY-NC-SA-2.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-SA-2.5= Creative Commons Attribution Non Commercial Share Alike 2.5 _LICENSE_GROUPS_CC-BY-NC-SA-2.5= # empty _LICENSE_PERMS_CC-BY-NC-SA-2.5= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-SA-3.0= Creative Commons Attribution Non Commercial Share Alike 3.0 _LICENSE_GROUPS_CC-BY-NC-SA-3.0= # empty _LICENSE_PERMS_CC-BY-NC-SA-3.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-NC-SA-4.0= Creative Commons Attribution Non Commercial Share Alike 4.0 _LICENSE_GROUPS_CC-BY-NC-SA-4.0= # empty _LICENSE_PERMS_CC-BY-NC-SA-4.0= dist-mirror pkg-mirror auto-accept _LICENSE_NAME_CC-BY-SA-1.0= Creative Commons Attribution Share Alike 1.0 _LICENSE_GROUPS_CC-BY-SA-1.0= # empty _LICENSE_NAME_CC-BY-SA-2.0= Creative Commons Attribution Share Alike 2.0 _LICENSE_GROUPS_CC-BY-SA-2.0= # empty _LICENSE_NAME_CC-BY-SA-2.5= Creative Commons Attribution Share Alike 2.5 _LICENSE_GROUPS_CC-BY-SA-2.5= # empty _LICENSE_NAME_CC-BY-SA-3.0= Creative Commons Attribution Share Alike 3.0 _LICENSE_GROUPS_CC-BY-SA-3.0= # empty _LICENSE_NAME_CC-BY-SA-4.0= Creative Commons Attribution Share Alike 4.0 _LICENSE_GROUPS_CC-BY-SA-4.0= # empty _LICENSE_NAME_CDDL= Common Development and Distribution License _LICENSE_GROUPS_CDDL= FSF OSI _LICENSE_NAME_ClArtistic= Clarified Artistic License _LICENSE_GROUPS_ClArtistic= FSF GPL OSI _LICENSE_NAME_CPAL-1.0= Common Public Attribution License _LICENSE_GROUPS_CPAL-1.0= FSF OSI _LICENSE_NAME_EPL= Eclipse Public License _LICENSE_GROUPS_EPL= FSF OSI _LICENSE_NAME_GFDL= GNU Free Documentation License _LICENSE_GROUPS_GFDL= FSF _LICENSE_NAME_GMGPL= GNAT Modified General Public License _LICENSE_GROUPS_GMGPL= FSF GPL OSI _LICENSE_NAME_GPLv1= GNU General Public License version 1 _LICENSE_GROUPS_GPLv1= FSF GPL OSI _LICENSE_NAME_GPLv1+ = ${_LICENSE_NAME_GPLv1} (or later) _LICENSE_GROUPS_GPLv1+ = ${_LICENSE_GROUPS_GPLv1} _LICENSE_NAME_GPLv2= GNU General Public License version 2 _LICENSE_GROUPS_GPLv2= FSF GPL OSI _LICENSE_NAME_GPLv2+ = ${_LICENSE_NAME_GPLv2} (or later) _LICENSE_GROUPS_GPLv2+ = ${_LICENSE_GROUPS_GPLv2} _LICENSE_NAME_GPLv3= GNU General Public License version 3 _LICENSE_GROUPS_GPLv3= FSF GPL OSI _LICENSE_NAME_GPLv3+ = ${_LICENSE_NAME_GPLv3} (or later) _LICENSE_GROUPS_GPLv3+ = ${_LICENSE_GROUPS_GPLv3} _LICENSE_NAME_GPLv3RLE= GNU GPL version 3 Runtime Library Exception _LICENSE_GROUPS_GPLv3RLE= FSF GPL OSI _LICENSE_NAME_GPLv3RLE+ = ${_LICENSE_NAME_GPLv3RLE} (or later) _LICENSE_GROUPS_GPLv3RLE+ = ${_LICENSE_GROUPS_GPLv3RLE} _LICENSE_NAME_ISCL= Internet Systems Consortium License _LICENSE_GROUPS_ISCL= FSF GPL OSI COPYFREE _LICENSE_NAME_LGPL20= GNU Library General Public License version 2.0 _LICENSE_GROUPS_LGPL20= FSF GPL OSI _LICENSE_NAME_LGPL20+ = ${_LICENSE_NAME_LGPL20} (or later) _LICENSE_GROUPS_LGPL20+ = ${_LICENSE_GROUPS_LGPL20} _LICENSE_NAME_LGPL21= GNU Lesser General Public License version 2.1 _LICENSE_GROUPS_LGPL21= FSF GPL OSI _LICENSE_NAME_LGPL21+ = ${_LICENSE_NAME_LGPL21} (or later) _LICENSE_GROUPS_LGPL21+ = ${_LICENSE_GROUPS_LGPL21} _LICENSE_NAME_LGPL3= GNU Lesser General Public License version 3 _LICENSE_GROUPS_LGPL3= FSF GPL OSI _LICENSE_NAME_LGPL3+ = ${_LICENSE_NAME_LGPL3} (or later) _LICENSE_GROUPS_LGPL3+ = ${_LICENSE_GROUPS_LGPL3} _LICENSE_NAME_LPPL10= LaTeX Project Public License version 1.0 _LICENSE_GROUPS_LPPL10= FSF OSI _LICENSE_PERMS_LPPL10= dist-mirror dist-sell _LICENSE_NAME_LPPL11= LaTeX Project Public License version 1.1 _LICENSE_GROUPS_LPPL11= FSF OSI _LICENSE_PERMS_LPPL11= dist-mirror dist-sell _LICENSE_NAME_LPPL12= LaTeX Project Public License version 1.2 _LICENSE_GROUPS_LPPL12= FSF OSI _LICENSE_PERMS_LPPL12= dist-mirror dist-sell _LICENSE_NAME_LPPL13= LaTeX Project Public License version 1.3 _LICENSE_GROUPS_LPPL13= FSF OSI _LICENSE_PERMS_LPPL13= dist-mirror dist-sell _LICENSE_NAME_LPPL13a= LaTeX Project Public License version 1.3a _LICENSE_GROUPS_LPPL13a= FSF OSI _LICENSE_PERMS_LPPL13a= dist-mirror dist-sell _LICENSE_NAME_LPPL13b= LaTeX Project Public License version 1.3b _LICENSE_GROUPS_LPPL13b= FSF OSI _LICENSE_PERMS_LPPL13b= dist-mirror dist-sell _LICENSE_NAME_LPPL13c= LaTeX Project Public License version 1.3c _LICENSE_GROUPS_LPPL13c= FSF OSI _LICENSE_PERMS_LPPL13c= dist-mirror dist-sell _LICENSE_NAME_MIT= MIT license / X11 license _LICENSE_GROUPS_MIT= COPYFREE FSF GPL OSI _LICENSE_NAME_MPL10= Mozilla Public License version 1.0 _LICENSE_GROUPS_MPL10= FSF OSI _LICENSE_NAME_MPL11= Mozilla Public License version 1.1 _LICENSE_GROUPS_MPL11= FSF OSI _LICENSE_NAME_MPL20= Mozilla Public License version 2.0 _LICENSE_GROUPS_MPL20= FSF OSI _LICENSE_NAME_NCSA= University of Illinois/NCSA Open Source License _LICENSE_GROUPS_NCSA= COPYFREE FSF GPL OSI _LICENSE_NAME_ODbL= Open Database License _LICENSE_NAME_OFL10= SIL Open Font License version 1.0 (http://scripts.sil.org/OFL) _LICENSE_GROUPS_OFL10= FONTS _LICENSE_NAME_OFL11= SIL Open Font License version 1.1 (http://scripts.sil.org/OFL) _LICENSE_GROUPS_OFL11= FONTS _LICENSE_NAME_OpenSSL= OpenSSL License _LICENSE_GROUPS_OpenSSL= FSF _LICENSE_NAME_OWL= Open Works License (owl.apotheon.org) _LICENSE_GROUPS_OWL= COPYFREE _LICENSE_NAME_PostgreSQL= PostgreSQL Licence _LICENSE_GROUPS_PostgreSQL= FSF GPL OSI COPYFREE _LICENSE_NAME_PD= Public Domain _LICENSE_GROUPS_PD= GPL COPYFREE _LICENSE_NAME_PHP202= PHP License version 2.02 _LICENSE_GROUPS_PHP202= FSF OSI _LICENSE_NAME_PHP30= PHP License version 3.0 _LICENSE_GROUPS_PHP30= FSF OSI _LICENSE_NAME_PHP301= PHP License version 3.01 _LICENSE_GROUPS_PHP301= FSF OSI _LICENSE_NAME_PSFL= Python Software Foundation License _LICENSE_GROUPS_PSFL= FSF GPL OSI _LICENSE_NAME_RUBY= Ruby License _LICENSE_GROUPS_RUBY= FSF _LICENSE_NAME_NONE= No license specified _LICENSE_GROUPS_NONE= # empty _LICENSE_PERMS_NONE= none _LICENSE_NAME_UNLICENSE= The Unlicense _LICENSE_GROUPS_UNLICENSE= COPYFREE FSF GPL _LICENSE_NAME_WTFPL1= Do What the Fuck You Want To Public License version 1 _LICENSE_GROUPS_WTFPL1= GPL FSF COPYFREE _LICENSE_NAME_WTFPL= Do What the Fuck You Want To Public License version 2 _LICENSE_GROUPS_WTFPL= GPL FSF COPYFREE _LICENSE_NAME_ZLIB= zlib License _LICENSE_GROUPS_ZLIB= GPL FSF OSI _LICENSE_NAME_ZPL21= Zope Public License version 2.1 _LICENSE_GROUPS_ZPL21= GPL OSI # Set default permissions if not defined .for lic in ${_LICENSE_LIST} -. if !defined(_LICENSE_PERMS_${lic}) +. if !defined(_LICENSE_PERMS_${lic}) _LICENSE_PERMS_${lic}= ${_LICENSE_PERMS_DEFAULT} -. endif +. endif .endfor diff --git a/Mk/bsd.licenses.mk b/Mk/bsd.licenses.mk index 343be5c2cd07..94137816cd86 100644 --- a/Mk/bsd.licenses.mk +++ b/Mk/bsd.licenses.mk @@ -1,815 +1,815 @@ #-*- tab-width: 4; -*- # ex:ts=4 # ** Please run changes to this file by eadler@ first ** Licenses_Include_MAINTAINER= portmgr@FreeBSD.org # # bsd.licenses.mk - License auditing framework. # # Created by: Alejandro Pulver # # Please view me with 4 column tabs! # # TODO: # - Bring back save and checksum with new dialog interface (only offers to do # so if ran by root, otherwise silently remove the options). Also only allow # saving per-port options (known or unknown), and only when accepted. # - Add custom restriction targets for better integration (now some files are # removed from FTP if restricted for CDROM for example, as the old # behavior). # The following cases are not considered: # # - Redistribution of modified distfiles, because is never done. # - Creating binaries from modified sources, because packages almost always # contain modifications to the source, cannot be autodetected (i.e. # patch-* in ${FILESDIR}, post-* targets, etc), and these licenses tend to # have more restrictions anyways. # # Integration with target sequences # # _SANITY_SEQ+= check-license (after check-vulnerable) # _PATCH_SEQ+= ask-license (before any other targets) # _INSTALL_SUSEQ+= install-license (after install-desktop-entries) # # The 'check-license' target will determine if the license was accepted, # rejected or has to be asked later to the user in 'ask-license' (by then # licenses should be extracted). The 'install-license' target installs the # applications' licenses, a general package license mentioning them, and a # restriction report (to be used by ports, scripts and similar tools). # Variables provided to the ports system and users in general, to modify the # behavior of the framework # # DISABLE_LICENSES - Disable license auditing framework completely. # NO_LICENSES_INSTALL - Do not install catalog, report and licenses. # NO_LICENSES_DIALOGS - Disable interactive menus for asking licenses. #NO_LICENSES_INSTALL= yes #NO_LICENSES_DIALOGS= yes # Variables provided to users (can be passed to make or set in /etc/make.conf) # # LICENSES_ACCEPTED - Accepted licenses. # LICENSES_REJECTED - Rejected licenses. # LICENSES_GROUPS_ACCEPTED - Accepted license groups. # LICENSES_GROUPS_REJECTED - Rejected license groups. # LICENSES_ASK - Require explicit user approval for all licenses not # present in previous variables (for example, stock # accepted licenses will ask confirmation). # # Variables provided to ports # # LICENSE - Code of license (short name). # LICENSE_PERMS - Permissions; use "none" if empty. # LICENSE_GROUPS - Groups the license belongs. # LICENSE_NAME - Full license name (for the reports). # LICENSE_FILE - Full path to license (or use LICENSE_TEXT). # LICENSE_TEXT - Text to use as a license, useful when referencing to # another place if it's not in the distfile. # LICENSE_DISTFILES - Name of licensed files (defaults to ${_DISTFILES}). # LICENSE_COMB - Set to "dual" or "multi", for OR/AND behavior # (defaults to "single" if undefined, the common case) # # The following cases are supported after defining LICENSE: # # Case 1: license defined in the framework (aka "known"). # # In this case the only allowed variables to set are LICENSE_FILE and # LICENSE_DISTFILES. The rest are managed by the framework and are not allowed # to change. # # Case 2: license only known by the port (aka "unknown"). # # In this case LICENSE_{PERMS,NAME} are mandatory, in addition to # either LICENSE_FILE or LICENSE_TEXT. Optional variable is # LICENSE_GROUPS. # # Available components for LICENSE_PERMS: # dist-mirror - Redistribution of distfile is permitted # (like FTP mirroring; port is not RESTRICTED). # dist-sell - Selling of distfile, e.g. on CD-ROM is permitted # (port does not need to set NO_CDROM). # pkg-mirror - Free redistribution of package is permitted # (like FTP upload; port does not set NO_PACKAGE). # pkg-sell - Selling of package is permitted, e.g. on CD-ROM. # auto-accept - License is accepted by default, without presented # agreement, unless the user defines LICENSES_ASK. # # Notes about permissions: # - Permissions use a default-deny policy (e.g. not setting "dist-mirror" # means it is automatically excluded). # - Components can be negated by prefixing them with "no-" (like # "no-pkg-sell"). # - In case a component is present and also excluded (i.e. no-dist-sell and # dist-sell together in LICENSE_PERMS), it will be excluded. # - XXX Currently there is no point in "no-" prefixes, as permissions are not # inherited from groups. Maybe it looks more clear that way than leaving the # variable empty? # # Dual/multiple licenses: # # If LICENSE_COMB is set to "dual", then LICENSE can (must, actually) have # more than one component. After that each license "lic" in LICENSE falls in # previous cases (known or unknown), but their variables are prefixed by # _LICENSE_ and suffixed by _lic. The main license name, perms and groups will # be set automatically (following appropiate logic). The idea is that any # license from LICENSE can be chosen to use the package. # # The case when LICENSE_COMB is set to "multi" is similar. But the idea is # that all of the licenses in LICENSE must be agreed to use the package. # .if defined(_POSTMKINCLUDED) && !defined(BEFOREPORTMK) -.if defined(LICENSE) +. if defined(LICENSE) # Include known licenses from database .include "${PORTSDIR}/Mk/bsd.licenses.db.mk" # Lists of variables and valid components # # _LICENSE_LIST_PERMS - Valid permission components # _LICENSE_LIST_PORT_VARS - License variables defined by the port _LICENSE_LIST_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept none _LICENSE_LIST_PORT_VARS= PERMS NAME GROUPS # Path variables # # _LICENSE_DIR - Directory to install licenses # _LICENSE_STORE - Store for known license files # _LICENSE_CATALOG - License catalog (make include file) to be created (dst) # _LICENSE_CATALOG_TMP - Same as above, but in WRKDIR (src) # _LICENSE_REPORT - License summary, shows licenses and how they are combined (dst) # _LICENSE_REPORT_TMP - Same as above, but in WRKDIR (src) # _LICENSE_COOKIE - Set when license is accepted, it is not present in # bsd.port.mk to avoid creating LICENSE_{REQ,SEQ} for a # few more targets only. _LICENSE_DIR?= ${PREFIX}/share/licenses/${PKGNAME} _LICENSE_STORE?= ${PORTSDIR}/Templates/Licenses _LICENSE_CATALOG?= ${_LICENSE_DIR}/catalog.mk _LICENSE_CATALOG_TMP?= ${WRKDIR}/.license-catalog.mk _LICENSE_REPORT?= ${_LICENSE_DIR}/LICENSE _LICENSE_REPORT_TMP?= ${WRKDIR}/.license-report _LICENSE_COOKIE?= ${WRKDIR}/.license_done.${PORTNAME}.${PREFIX:S/\//_/g} # Defaults (never overriden for now) # # _LICENSE - Copy of LICENSE (for now) # _LICENSE_COMB - Copy of LICENSE_COMB (but "single" instead of empty) _LICENSE?= ${LICENSE} -.if !defined(LICENSE_COMB) +. if !defined(LICENSE_COMB) _LICENSE_COMB= single -.else +. else _LICENSE_COMB= ${LICENSE_COMB} -.endif +. endif # Check if single or dual/multiple license # # Make sure LICENSE_COMB is only used with more than one license. -.if ${_LICENSE_COMB} != "single" && ${_LICENSE_COMB} != "dual" && ${_LICENSE_COMB} != "multi" +. if ${_LICENSE_COMB} != "single" && ${_LICENSE_COMB} != "dual" && ${_LICENSE_COMB} != "multi" _LICENSE_ERROR?= invalid value for LICENSE_COMB: "${_LICENSE_COMB}" (should be "single", "dual" or "multi") -.endif +. endif -.for lic in ${_LICENSE} -. if defined(_LICENSE_DEFINED) -. if ${_LICENSE_COMB} == "single" +. for lic in ${_LICENSE} +. if defined(_LICENSE_DEFINED) +. if ${_LICENSE_COMB} == "single" _LICENSE_ERROR?= multiple licenses in LICENSE, but LICENSE_COMB is set to "single" (or undefined) -. else +. else _LICENSE_MULTI= yes -. endif -. else +. endif +. else _LICENSE_DEFINED= yes -. endif -.endfor -.if ${_LICENSE_COMB} != "single" && !defined(_LICENSE_MULTI) +. endif +. endfor +. if ${_LICENSE_COMB} != "single" && !defined(_LICENSE_MULTI) _LICENSE_ERROR?= single license in LICENSE, but LICENSE_COMB is set to "${_LICENSE_COMB}" (requires more than one) -.endif -.if !defined(_LICENSE_DEFINED) +. endif +. if !defined(_LICENSE_DEFINED) _LICENSE_ERROR?= no licenses present in LICENSE (empty string) -.endif +. endif .undef _LICENSE_DEFINED .undef _LICENSE_MULTI # Evaluate port license groups and permissions # # Available values for _LICENSE_TYPE: # # Case 1: "known" (license info taken from internal database) # Case 2: "unknown" (LICENSE is not known, and info taken from port) # # Make sure required variables are defined, and remove conflicting (positive # and negative) duplicated components. -.if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" # Defaults to empty _LICENSE_GROUPS?= # # Start -. for lic in ${_LICENSE} -. if ${_LICENSE_LIST:M${lic}} != "" +. for lic in ${_LICENSE} +. if ${_LICENSE_LIST:M${lic}} != "" # Case 1: license defined in the framework. _LICENSE_TYPE= known -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}) _LICENSE_ERROR?= redefining LICENSE_${var} is not allowed for known licenses, to define a custom license try another LICENSE name like ${_LICENSE}-variant -. endif -. if !defined(_LICENSE_${var}_${lic}) +. endif +. if !defined(_LICENSE_${var}_${lic}) _LICENSE_ERROR?= ERROR: missing _LICENSE_${var}_${lic} in bsd.licenses.db.mk -. else +. else _LICENSE_${var}= ${_LICENSE_${var}_${lic}} -. endif -. endfor +. endif +. endfor # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE) -. if !defined(LICENSE_TEXT) -. if exists(${_LICENSE_STORE}/${lic}) +. if !defined(LICENSE_FILE) +. if !defined(LICENSE_TEXT) +. if exists(${_LICENSE_STORE}/${lic}) _LICENSE_FILE= ${_LICENSE_STORE}/${lic} -. else +. else # No license file in /usr/ports/Templates/Licenses _LICENSE_TEXT= The license: ${_LICENSE} (${_LICENSE_NAME}) is standard, please read from the web. _LICENSE_FILE= ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_ERROR?= defining LICENSE_TEXT is not allowed for known licenses -. endif -. else +. endif +. else _LICENSE_FILE= ${LICENSE_FILE} -. endif +. endif -. else +. else # Case 2: license only known by the port. _LICENSE_TYPE= unknown -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}) _LICENSE_${var}= ${LICENSE_${var}} -. elif !defined(_LICENSE_${var}) +. elif !defined(_LICENSE_${var}) _LICENSE_ERROR?= for unknown licenses, defining LICENSE_${var} is mandatory (otherwise use a known LICENSE) -. endif -. endfor +. endif +. endfor # Check LICENSE_PERMS for invalid, ambiguous and duplicate components __LICENSE_PERMS:= # -. for comp in ${_LICENSE_PERMS} -. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" +. for comp in ${_LICENSE_PERMS} +. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" _LICENSE_ERROR?= invalid LICENSE_PERMS component "${comp}" -. elif ${__LICENSE_PERMS:M${comp}} == "" && \ +. elif ${__LICENSE_PERMS:M${comp}} == "" && \ ${_LICENSE_PERMS:Mno-${comp:C/^no-//}} == "" __LICENSE_PERMS+= ${comp} -. endif -. endfor +. endif +. endfor _LICENSE_PERMS:= ${__LICENSE_PERMS} . undef __LICENSE_PERMS # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE) -. if !defined(LICENSE_TEXT) +. if !defined(LICENSE_FILE) +. if !defined(LICENSE_TEXT) _LICENSE_ERROR?= either LICENSE_FILE or LICENSE_TEXT must be defined -. else +. else _LICENSE_TEXT= ${LICENSE_TEXT} _LICENSE_FILE= ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_FILE= ${LICENSE_FILE} -. endif -. endif +. endif +. endif # Only one is allowed -. if defined(LICENSE_FILE) && defined(LICENSE_TEXT) +. if defined(LICENSE_FILE) && defined(LICENSE_TEXT) _LICENSE_ERROR?= defining both LICENSE_FILE and LICENSE_TEXT is not allowed -. endif +. endif # Distfiles -. if !defined(LICENSE_DISTFILES) +. if !defined(LICENSE_DISTFILES) _LICENSE_DISTFILES= ${_DISTFILES} -. else +. else _LICENSE_DISTFILES= ${LICENSE_DISTFILES} -. endif -. endfor +. endif +. endfor -.else +. else -. if defined(LICENSE_FILE) -. for lic in ${_LICENSE} +. if defined(LICENSE_FILE) +. for lic in ${_LICENSE} LICENSE_FILE_${lic}?= ${LICENSE_FILE} -. endfor -. endif +. endfor +. endif -. for lic in ${_LICENSE} +. for lic in ${_LICENSE} # Defaults to empty _LICENSE_GROUPS_${lic}?=# -. if ${_LICENSE_LIST:M${lic}} != "" +. if ${_LICENSE_LIST:M${lic}} != "" # Case 1: license defined in the framework. _LICENSE_TYPE_${lic}= known -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}_${lic}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}_${lic}) _LICENSE_ERROR?= redefining LICENSE_${var}_${lic} is not allowed for known licenses, to define a custom license try another LICENSE name for ${lic} like ${lic}-variant -. endif -. if !defined(_LICENSE_${var}_${lic}) +. endif +. if !defined(_LICENSE_${var}_${lic}) _LICENSE_ERROR?= ERROR: missing _LICENSE_${var}_${lic} in bsd.licenses.db.mk -. endif -. endfor +. endif +. endfor # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE_${lic}) -. if !defined(LICENSE_TEXT_${lic}) -. if exists(${_LICENSE_STORE}/${lic}) +. if !defined(LICENSE_FILE_${lic}) +. if !defined(LICENSE_TEXT_${lic}) +. if exists(${_LICENSE_STORE}/${lic}) _LICENSE_FILE_${lic}= ${_LICENSE_STORE}/${lic} -. else +. else # No license file in /usr/ports/Templates/Licenses _LICENSE_TEXT_${lic}= The license: ${lic} (${_LICENSE_NAME_${lic}}) is standard, please read from the web. _LICENSE_FILE_${lic}= ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_ERROR?= defining LICENSE_TEXT_${lic} is not allowed for known licenses -. endif -. else +. endif +. else _LICENSE_FILE_${lic}= ${LICENSE_FILE_${lic}} -. endif +. endif -. else +. else # Case 2: license only known by the port. _LICENSE_TYPE_${lic}= unknown -. for var in ${_LICENSE_LIST_PORT_VARS} -. if defined(LICENSE_${var}_${lic}) +. for var in ${_LICENSE_LIST_PORT_VARS} +. if defined(LICENSE_${var}_${lic}) _LICENSE_${var}_${lic}= ${LICENSE_${var}_${lic}} -. elif !defined(_LICENSE_${var}_${lic}) +. elif !defined(_LICENSE_${var}_${lic}) _LICENSE_ERROR?= for unknown licenses, defining LICENSE_${var}_${lic} is mandatory (otherwise use a known LICENSE) -. endif -. endfor +. endif +. endfor # Check LICENSE_PERMS for invalid, ambiguous and duplicate components __LICENSE_PERMS:= # -. for comp in ${_LICENSE_PERMS_${lic}} -. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" +. for comp in ${_LICENSE_PERMS_${lic}} +. if ${_LICENSE_LIST_PERMS:M${comp:C/^no-//}} == "" _LICENSE_ERROR?= invalid LICENSE_PERMS_${var} component "${comp}" -. elif ${__LICENSE_PERMS:M${comp}} == "" && \ +. elif ${__LICENSE_PERMS:M${comp}} == "" && \ ${_LICENSE_PERMS_${lic}:Mno-${comp:C/^no-//}} == "" __LICENSE_PERMS+= ${comp} -. endif -. endfor +. endif +. endfor _LICENSE_PERMS_${lic}:= ${__LICENSE_PERMS} . undef __LICENSE_PERMS # Check for LICENSE_FILE or at least LICENSE_TEXT (which simulates it) -. if !defined(LICENSE_FILE_${lic}) -. if !defined(LICENSE_TEXT_${lic}) +. if !defined(LICENSE_FILE_${lic}) +. if !defined(LICENSE_TEXT_${lic}) _LICENSE_ERROR?= either LICENSE_FILE_${lic} or LICENSE_TEXT_${lic} must be defined -. else +. else _LICENSE_TEXT_${lic}= ${LICENSE_TEXT_${lic}} _LICENSE_FILE_${lic}= ${WRKDIR}/${lic} -. endif -. else +. endif +. else _LICENSE_FILE_${lic}= ${LICENSE_FILE_${lic}} -. endif -. endif +. endif +. endif # Only one is allowed -. if defined(LICENSE_FILE_${lic}) && defined(LICENSE_TEXT_${lic}) +. if defined(LICENSE_FILE_${lic}) && defined(LICENSE_TEXT_${lic}) _LICENSE_ERROR?= defining both LICENSE_FILE_${lic} and LICENSE_TEXT_${lic}is not allowed -. endif +. endif # Distfiles -. if !defined(LICENSE_DISTFILES_${lic}) +. if !defined(LICENSE_DISTFILES_${lic}) _LICENSE_DISTFILES_${lic}= ${_DISTFILES} -. else +. else _LICENSE_DISTFILES_${lic}= ${LICENSE_DISTFILES_${lic}} -. endif -. endfor -.endif +. endif +. endfor +. endif # Check if the user agrees with the license # Make sure these are defined LICENSES_ACCEPTED?= # LICENSES_REJECTED?= # LICENSES_GROUPS_ACCEPTED?= # LICENSES_GROUPS_REJECTED?= # # Evaluate per-license status -.if ${_LICENSE_COMB} == "single" -. for lic in ${_LICENSE} -. if ${LICENSES_REJECTED:M${lic}} != "" +. if ${_LICENSE_COMB} == "single" +. for lic in ${_LICENSE} +. if ${LICENSES_REJECTED:M${lic}} != "" _LICENSE_STATUS?= rejected -. endif -. for group in ${_LICENSE_GROUPS} -. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" +. endif +. for group in ${_LICENSE_GROUPS} +. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" _LICENSE_STATUS?= rejected -. endif -. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" +. endif +. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" _LICENSE_STATUS?= accepted -. endif -. endfor -. if ${LICENSES_ACCEPTED:M${lic}} != "" +. endif +. endfor +. if ${LICENSES_ACCEPTED:M${lic}} != "" _LICENSE_STATUS?= accepted -. endif -. if ${_LICENSE_PERMS:Mauto-accept} != "" && !defined(LICENSES_ASK) +. endif +. if ${_LICENSE_PERMS:Mauto-accept} != "" && !defined(LICENSES_ASK) _LICENSE_STATUS?= accepted -. endif +. endif _LICENSE_STATUS?= ask -. endfor +. endfor -.else -. for lic in ${_LICENSE} -. if ${LICENSES_REJECTED:M${lic}} != "" +. else +. for lic in ${_LICENSE} +. if ${LICENSES_REJECTED:M${lic}} != "" _LICENSE_STATUS_${lic}?= rejected -. endif -. for group in ${_LICENSE_GROUPS_${lic}} -. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" +. endif +. for group in ${_LICENSE_GROUPS_${lic}} +. if ${LICENSES_GROUPS_REJECTED:M${group}} != "" _LICENSE_STATUS_${lic}?= rejected -. endif -. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" +. endif +. if ${LICENSES_GROUPS_ACCEPTED:M${group}} != "" _LICENSE_STATUS_${lic}?= accepted -. endif -. endfor -. if ${LICENSES_ACCEPTED:M${lic}} != "" +. endif +. endfor +. if ${LICENSES_ACCEPTED:M${lic}} != "" _LICENSE_STATUS_${lic}?= accepted -. endif -. if ${_LICENSE_PERMS_${lic}:Mauto-accept} != "" && !defined(LICENSES_ASK) +. endif +. if ${_LICENSE_PERMS_${lic}:Mauto-accept} != "" && !defined(LICENSES_ASK) _LICENSE_STATUS_${lic}?= accepted -. endif +. endif _LICENSE_STATUS_${lic}?= ask -. endfor -.endif +. endfor +. endif # Evaluate general status -.if ${_LICENSE_COMB} == "dual" -. for lic in ${_LICENSE} -. if ${_LICENSE_STATUS_${lic}} == "accepted" +. if ${_LICENSE_COMB} == "dual" +. for lic in ${_LICENSE} +. if ${_LICENSE_STATUS_${lic}} == "accepted" _LICENSE_STATUS= accepted -. elif ${_LICENSE_STATUS_${lic}} == "ask" +. elif ${_LICENSE_STATUS_${lic}} == "ask" _LICENSE_STATUS?= ask _LICENSE_TO_ASK+= ${lic} -. endif +. endif _LICENSE_STATUS?= rejected -. endfor +. endfor -.elif ${_LICENSE_COMB} == "multi" -. for lic in ${_LICENSE} -. if ${_LICENSE_STATUS_${lic}} == "rejected" +. elif ${_LICENSE_COMB} == "multi" +. for lic in ${_LICENSE} +. if ${_LICENSE_STATUS_${lic}} == "rejected" _LICENSE_STATUS= rejected -. elif ${_LICENSE_STATUS_${lic}} == "ask" +. elif ${_LICENSE_STATUS_${lic}} == "ask" _LICENSE_STATUS?= ask _LICENSE_TO_ASK+= ${lic} -. endif -. endfor +. endif +. endfor _LICENSE_STATUS?= accepted -.endif +. endif # For dual/multi licenses, after processing all sub-licenses, the following # must be determined: _LICENSE_NAME, _LICENSE_PERMS and _LICENSE_GROUPS. -.if ${_LICENSE_COMB} == "dual" +. if ${_LICENSE_COMB} == "dual" _LICENSE_NAME= Dual (any of): ${_LICENSE} # Calculate least restrictive permissions (union) _LICENSE_PERMS:= # -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_PERMS} -. if ${_LICENSE_PERMS_${lic}:M${comp}} != "" && \ +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_PERMS} +. if ${_LICENSE_PERMS_${lic}:M${comp}} != "" && \ ${_LICENSE_PERMS:M${comp}} == "" _LICENSE_PERMS+= ${comp} -. endif -. endfor -. endfor +. endif +. endfor +. endfor # Calculate least restrictive groups (union) _LICENSE_GROUPS:= # -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_GROUPS} -. if ${_LICENSE_GROUPS_${lic}:M${comp}} != "" && \ +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_GROUPS} +. if ${_LICENSE_GROUPS_${lic}:M${comp}} != "" && \ ${_LICENSE_GROUPS:M${comp}} == "" _LICENSE_GROUPS+= ${comp} -. endif -. endfor -. endfor +. endif +. endfor +. endfor -.elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" _LICENSE_NAME= Multiple (all of): ${_LICENSE} # Calculate most restrictive permissions (intersection) _LICENSE_PERMS:= ${_LICENSE_LIST_PERMS} -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_PERMS} -. if ${_LICENSE_PERMS_${lic}:M${comp}} == "" +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_PERMS} +. if ${_LICENSE_PERMS_${lic}:M${comp}} == "" _LICENSE_PERMS:= ${_LICENSE_PERMS:N${comp}} -. endif -. endfor -. endfor +. endif +. endfor +. endfor # Calculate most restrictive groups (intersection) _LICENSE_GROUPS:= ${_LICENSE_LIST_GROUPS} -. for lic in ${_LICENSE} -. for comp in ${_LICENSE_LIST_GROUPS} -. if ${_LICENSE_GROUPS_${lic}:M${comp}} == "" +. for lic in ${_LICENSE} +. for comp in ${_LICENSE_LIST_GROUPS} +. if ${_LICENSE_GROUPS_${lic}:M${comp}} == "" _LICENSE_GROUPS:= ${_LICENSE_GROUPS:N${comp}} -. endif -. endfor -. endfor -.endif +. endif +. endfor +. endfor +. endif # Prepare information for asking license to the user -.if ${_LICENSE_STATUS} == "ask" && ${_LICENSE_COMB} != "single" +. if ${_LICENSE_STATUS} == "ask" && ${_LICENSE_COMB} != "single" _LICENSE_ASK_DATA!= mktemp -ut portslicense -.endif +. endif # Calculate restrictions and set RESTRICTED_FILES when # appropiate, together with cleaning targets. # # XXX For multiple licenses restricted distfiles are always removed from both # CDROM and FTP, but the current framework supports separating them (would # require better/new delete-package and delete-distfiles targets) -.if ${_LICENSE_PERMS:Mpkg-mirror} == "" +. if ${_LICENSE_PERMS:Mpkg-mirror} == "" _LICENSE_RESTRICTED+= delete-package -.elif ${_LICENSE_PERMS:Mpkg-sell} == "" +. elif ${_LICENSE_PERMS:Mpkg-sell} == "" _LICENSE_CDROM+= delete-package -.endif +. endif -.if ${_LICENSE_COMB} == "multi" -. for lic in ${_LICENSE} -. if ${_LICENSE_PERMS_${lic}:Mdist-mirror} == "" || ${_LICENSE_PERMS_${lic}:Mdist-sell} == "" +. if ${_LICENSE_COMB} == "multi" +. for lic in ${_LICENSE} +. if ${_LICENSE_PERMS_${lic}:Mdist-mirror} == "" || ${_LICENSE_PERMS_${lic}:Mdist-sell} == "" RESTRICTED_FILES+= ${_LICENSE_DISTFILES_${lic}} -. endif -. endfor -. if defined(RESTRICTED_FILES) +. endif +. endfor +. if defined(RESTRICTED_FILES) RESTRICTED_FILES+= ${_PATCHFILES} _LICENSE_RESTRICTED+= delete-distfiles _LICENSE_CDROM+= delete-distfiles -. endif -.else -. if ${_LICENSE_PERMS:Mdist-mirror} == "" +. endif +. else +. if ${_LICENSE_PERMS:Mdist-mirror} == "" _LICENSE_RESTRICTED+= delete-distfiles RESTRICTED_FILES= ${_PATCHFILES} ${_DISTFILES} -. elif ${_LICENSE_PERMS:Mdist-sell} == "" +. elif ${_LICENSE_PERMS:Mdist-sell} == "" _LICENSE_CDROM+= delete-distfiles RESTRICTED_FILES= ${_PATCHFILES} ${_DISTFILES} -. endif -.endif +. endif +. endif -.if defined(_LICENSE_RESTRICTED) +. if defined(_LICENSE_RESTRICTED) # _LICENSE_RESTRICTED contains 'delete-distfiles' and 'delete-package' if # needed with RESTRICTED_FILES filled from above. clean-restricted: ${_LICENSE_RESTRICTED} clean-restricted-list: ${_LICENSE_RESTRICTED:C/$/-list/} -.else +. else clean-restricted: clean-restricted-list: -.endif +. endif -.if defined(_LICENSE_CDROM) +. if defined(_LICENSE_CDROM) clean-for-cdrom: ${_LICENSE_CDROM} clean-for-cdrom-list: ${_LICENSE_CDROM:C/$/-list/} -.else +. else clean-for-cdrom: clean-for-cdrom-list: -.endif +. endif # Check variables are correctly defined and print status up to here -.if ${_LICENSE_STATUS} == "ask" && defined(BATCH) +. if ${_LICENSE_STATUS} == "ask" && defined(BATCH) IGNORE= License ${_LICENSE} needs confirmation, but BATCH is defined -.endif +. endif # This should probably be incrementally done while parsing all the license # possibilities. debug-license: check-license -.if ${_LICENSE_PERMS:Mdist-mirror} +. if ${_LICENSE_PERMS:Mdist-mirror} @${ECHO_MSG} "===> License allows mirroring distribution files" -.else +. else @${ECHO_MSG} "===> License does not allow mirroring distribution files" -.endif -.if ${_LICENSE_PERMS:Mdist-sell} +. endif +. if ${_LICENSE_PERMS:Mdist-sell} @${ECHO_MSG} "===> License allows selling distribution files" -.else +. else @${ECHO_MSG} "===> License does not allow selling distribution files" -.endif -.if ${_LICENSE_PERMS:Mpkg-mirror} +. endif +. if ${_LICENSE_PERMS:Mpkg-mirror} @${ECHO_MSG} "===> License allows mirroring pre-built packages" -.else +. else @${ECHO_MSG} "===> License does not allow mirroring pre-build packages" -.endif -.if ${_LICENSE_PERMS:Mpkg-sell} +. endif +. if ${_LICENSE_PERMS:Mpkg-sell} @${ECHO_MSG} "===> License allows selling pre-build packages" -.else +. else @${ECHO_MSG} "===> License does not allow selling pre-build packages" -.endif -.if ${_LICENSE_PERMS:Mauto-accept} +. endif +. if ${_LICENSE_PERMS:Mauto-accept} @${ECHO_MSG} "===> License allows being auto-accepted" -.else +. else @${ECHO_MSG} "===> License requires manual intervention by the user to accept its terms" -.endif +. endif check-license: -.if defined(_LICENSE_ERROR) +. if defined(_LICENSE_ERROR) @${ECHO_MSG} "===> License not correctly defined: ${_LICENSE_ERROR}" @exit 1 -.endif -.if ${_LICENSE_STATUS} == "rejected" +. endif +. if ${_LICENSE_STATUS} == "rejected" @${ECHO_MSG} "===> License ${_LICENSE} rejected by the user" @${ECHO_MSG} @${ECHO_MSG} "If you want to install this port make sure the following license(s) are not present in LICENSES_REJECTED, either in make arguments or /etc/make.conf: ${_LICENSE}. Also check LICENSES_GROUPS_REJECTED in case they contain a group this license(s) belong to." | ${FMT} @${ECHO_MSG} @exit 1 -.elif ${_LICENSE_STATUS} == "accepted" +. elif ${_LICENSE_STATUS} == "accepted" @${ECHO_MSG} "===> License ${_LICENSE} accepted by the user" -.elif ${_LICENSE_STATUS} == "ask" +. elif ${_LICENSE_STATUS} == "ask" @${ECHO_MSG} "===> License ${_LICENSE} needs confirmation, will ask later" -.endif +. endif # Display, ask and save preference if requested ask-license: ${_LICENSE_COOKIE} ${_LICENSE_COOKIE}: # Make sure all required license files exist -.if ${_LICENSE_COMB} == "single" -. if !defined(LICENSE_FILE) && defined(_LICENSE_TEXT) +. if ${_LICENSE_COMB} == "single" +. if !defined(LICENSE_FILE) && defined(_LICENSE_TEXT) @test -f ${_LICENSE_FILE} || ${ECHO_CMD} "${_LICENSE_TEXT}" | ${FMT} > ${_LICENSE_FILE} -. endif +. endif @test -f ${_LICENSE_FILE} || \ (${ECHO_MSG} "===> Missing license file for ${_LICENSE} in ${_LICENSE_FILE}"; exit 1) -.else -. for lic in ${_LICENSE} -. if !defined(LICENSE_FILE_${lic}) && defined(_LICENSE_TEXT_${lic}) +. else +. for lic in ${_LICENSE} +. if !defined(LICENSE_FILE_${lic}) && defined(_LICENSE_TEXT_${lic}) @test -f ${_LICENSE_FILE_${lic}} || ${ECHO_CMD} "${_LICENSE_TEXT_${lic}}" | ${FMT} > ${_LICENSE_FILE_${lic}} -. endif +. endif @test -f ${_LICENSE_FILE_${lic}} || \ (${ECHO_MSG} "===> Missing license file for ${lic} in ${_LICENSE_FILE_${lic}}"; exit 1) -. endfor -.endif +. endfor +. endif -.if ${_LICENSE_STATUS} == "ask" -. if !defined(NO_LICENSES_DIALOGS) +. if ${_LICENSE_STATUS} == "ask" +. if !defined(NO_LICENSES_DIALOGS) # Dialog interface -. if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" @${DIALOG} --title "License for ${PKGNAME} (${_LICENSE})" \ --yes-label Accept --no-label Reject --yesno \ "$$(${CAT} ${_LICENSE_FILE})" 21 76 -. elif ${_LICENSE_COMB} == "dual" +. elif ${_LICENSE_COMB} == "dual" @${RM} ${_LICENSE_ASK_DATA} -. for lic in ${_LICENSE_TO_ASK} +. for lic in ${_LICENSE_TO_ASK} @${ECHO_CMD} "${lic}:${_LICENSE_FILE_${lic}}" >> ${_LICENSE_ASK_DATA} -. endfor +. endfor @menu_cmd="${DIALOG} --hline \"This port requires you to accept at least one license\" --menu \"License for ${PKGNAME} (dual)\" 21 70 15"; \ trap '${RM} $$tmpfile' EXIT INT TERM; \ tmpfile=$$(mktemp -t portlicenses); \ for lic in ${_LICENSE_TO_ASK}; do \ menu_cmd="$${menu_cmd} VIEW_$${lic} \"View the license $${lic}\" USE_$${lic} \"Accept the license $${lic}\""; \ done; \ menu_cmd="$${menu_cmd} REJECT \"Reject the licenses (all)\""; \ while true; do \ ${SH} -c "$${menu_cmd} 2>\"$${tmpfile}\""; \ result=$$(${CAT} "$${tmpfile}"); \ case $${result} in \ REJECT) exit 1;; \ VIEW_*) name=$$(${ECHO_CMD} $${result} | ${SED} -e 's/^VIEW_//'); \ file=$$(${GREP} "^$${name}:" ${_LICENSE_ASK_DATA} | ${CUT} -d : -f 2); \ ${DIALOG} --textbox "$${file}" 21 75 ;; \ USE_*) name=$$(${ECHO_CMD} $${result} | ${SED} -e 's/^USE_//'); \ ${ECHO_CMD} $${name} > ${_LICENSE_COOKIE}; \ break ;; \ esac; \ done -. elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" @${RM} ${_LICENSE_ASK_DATA} -. for lic in ${_LICENSE_TO_ASK} +. for lic in ${_LICENSE_TO_ASK} @${ECHO_CMD} "${lic}:${_LICENSE_FILE_${lic}}" >> ${_LICENSE_ASK_DATA} -. endfor +. endfor @menu_cmd="${DIALOG} --hline \"This port requires you to accept all mentioned licenses\" --menu \"License for ${PKGNAME} (multi)\" 21 70 15"; \ trap '${RM} $$tmpfile' EXIT INT TERM; \ tmpfile=$$(mktemp -t portlicenses); \ for lic in ${_LICENSE_TO_ASK}; do \ menu_cmd="$${menu_cmd} VIEW_$${lic} \"View the license $${lic}\""; \ done; \ menu_cmd="$${menu_cmd} ACCEPT \"Accept the licenses (all)\" REJECT \"Reject the licenses (all)\""; \ while true; do \ ${SH} -c "$${menu_cmd} 2>\"$${tmpfile}\""; \ result=$$(${CAT} "$${tmpfile}"); \ case $${result} in \ ACCEPT) break ;; \ REJECT) exit 1 ;; \ VIEW_*) name=$$(${ECHO_CMD} $${result} | ${SED} -e 's/^VIEW_//'); \ file=$$(${GREP} "^$${name}:" ${_LICENSE_ASK_DATA} | ${CUT} -d : -f 2); \ ${DIALOG} --textbox "$${file}" 21 75 ;; \ esac; \ done -. endif +. endif -. else +. else # Text interface @${ECHO_MSG} -. if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" @${ECHO_MSG} "To install the port you must agree to the license: ${_LICENSE} (${_LICENSE_NAME})." | ${FMT} @${ECHO_MSG} @${ECHO_MSG} "You can view the license at ${_LICENSE_FILE:S/${WRKDIR}\//${WRKDIR:T}\//}." -. elif ${_LICENSE_COMB} == "dual" +. elif ${_LICENSE_COMB} == "dual" @${ECHO_MSG} "To install the port you must agree to any of the following licenses:" -. elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" @${ECHO_MSG} "To install the port you must agree to all of the following licenses:" -. endif +. endif @${ECHO_MSG} -. if ${_LICENSE_COMB} != "single" -. for lic in ${_LICENSE_TO_ASK} -. if defined(WRKDIRPREFIX) +. if ${_LICENSE_COMB} != "single" +. for lic in ${_LICENSE_TO_ASK} +. if defined(WRKDIRPREFIX) @${ECHO_MSG} "- ${lic} (${_LICENSE_NAME_${lic}}), available at ${_LICENSE_FILE_${lic}}" -. else +. else @${ECHO_MSG} "- ${lic} (${_LICENSE_NAME_${lic}}), available at ${_LICENSE_FILE_${lic}:S/${WRKDIR}\//${WRKDIR:T}\//}" -. endif -. endfor +. endif +. endfor @${ECHO_MSG} -. endif +. endif @${ECHO_MSG} "If you agree with the corresponding license(s), add them to LICENSES_ACCEPTED either in make arguments or /etc/make.conf." | ${FMT} @${ECHO_MSG} @exit 1 -. endif +. endif @${RM} ${_LICENSE_ASK_DATA} -.endif +. endif # Create report and catalog -.if !defined(NO_LICENSES_INSTALL) +. if !defined(NO_LICENSES_INSTALL) @${RM} ${_LICENSE_CATALOG_TMP} ${_LICENSE_REPORT_TMP} -. if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" # Catalog -. for var in _LICENSE _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS _LICENSE_DISTFILES +. for var in _LICENSE _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS _LICENSE_DISTFILES @${ECHO_CMD} "${var}=${${var}:C/^[[:blank:]]*//}" >> ${_LICENSE_CATALOG_TMP} -. endfor +. endfor # Report @${ECHO_CMD} "This package has a single license: ${_LICENSE} (${_LICENSE_NAME})." > ${_LICENSE_REPORT_TMP} -. else +. else # Catalog -. for var in _LICENSE _LICENSE_COMB _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS +. for var in _LICENSE _LICENSE_COMB _LICENSE_NAME _LICENSE_PERMS _LICENSE_GROUPS @${ECHO_CMD} "${var}=${${var}:C/^[[:blank:]]*//}" >> ${_LICENSE_CATALOG_TMP} -. endfor -. if ${_LICENSE_COMB} == "dual" && ${_LICENSE_STATUS} == "ask" +. endfor +. if ${_LICENSE_COMB} == "dual" && ${_LICENSE_STATUS} == "ask" @${SED} -e 's/^/_LICENSE_SELECTED=/' ${_LICENSE_COOKIE} >> ${_LICENSE_CATALOG_TMP} -. endif -. for lic in ${_LICENSE} -. for var in NAME PERMS GROUPS DISTFILES +. endif +. for lic in ${_LICENSE} +. for var in NAME PERMS GROUPS DISTFILES @${ECHO_CMD} "_LICENSE_${var}_${lic} =${_LICENSE_${var}_${lic}:C/^[[:blank:]]*//}" >> ${_LICENSE_CATALOG_TMP} -. endfor -. endfor +. endfor +. endfor # Report -. if ${_LICENSE_COMB} == "dual" +. if ${_LICENSE_COMB} == "dual" @${ECHO_CMD} "This package has dual licenses (any of):" >> ${_LICENSE_REPORT_TMP} -. elif ${_LICENSE_COMB} == "multi" +. elif ${_LICENSE_COMB} == "multi" @${ECHO_CMD} "This package has multiple licenses (all of):" >> ${_LICENSE_REPORT_TMP} -. endif -. for lic in ${_LICENSE} +. endif +. for lic in ${_LICENSE} @${ECHO_CMD} "- ${lic} (${_LICENSE_NAME_${lic}})" >> ${_LICENSE_REPORT_TMP} -. endfor -. endif -.endif +. endfor +. endif +. endif # Cookie (done here) @${TOUCH} ${_LICENSE_COOKIE} # Package list entries, and installation -.if !defined(NO_LICENSES_INSTALL) +. if !defined(NO_LICENSES_INSTALL) PLIST_FILES+= ${_LICENSE_CATALOG} \ ${_LICENSE_REPORT} -.if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" PLIST_FILES+= ${_LICENSE_DIR}/${_LICENSE} -.else -. for lic in ${_LICENSE} -. if defined(_LICENSE_FILE_${lic}) +. else +. for lic in ${_LICENSE} +. if defined(_LICENSE_FILE_${lic}) PLIST_FILES+= ${_LICENSE_DIR}/${lic} -. endif -. endfor -.endif +. endif +. endfor +. endif install-license: @${MKDIR} ${STAGEDIR}${_LICENSE_DIR} @${INSTALL_DATA} ${_LICENSE_CATALOG_TMP} ${STAGEDIR}${_LICENSE_CATALOG} @${INSTALL_DATA} ${_LICENSE_REPORT_TMP} ${STAGEDIR}${_LICENSE_REPORT} -.if ${_LICENSE_COMB} == "single" +. if ${_LICENSE_COMB} == "single" @${INSTALL_DATA} ${_LICENSE_FILE} ${STAGEDIR}${_LICENSE_DIR}/${_LICENSE} -.else -. for lic in ${_LICENSE} +. else +. for lic in ${_LICENSE} @${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${STAGEDIR}${_LICENSE_DIR}/${lic} -. endfor -.endif -.endif +. endfor +. endif +. endif -.else # !LICENSE +. else # !LICENSE debug-license: -. if defined(LICENSE_VERBOSE) +. if defined(LICENSE_VERBOSE) @${ECHO_MSG} "===> License debug empty, port has not defined LICENSE" -. endif +. endif check-license: -. if defined(LICENSE_VERBOSE) +. if defined(LICENSE_VERBOSE) @${ECHO_MSG} "===> License check disabled, port has not defined LICENSE" -. endif +. endif -.endif # LICENSE +. endif # LICENSE .endif diff --git a/Mk/bsd.ocaml.mk b/Mk/bsd.ocaml.mk index cb88998b89e6..1dc29209e785 100644 --- a/Mk/bsd.ocaml.mk +++ b/Mk/bsd.ocaml.mk @@ -1,198 +1,198 @@ # ex:ts=4 # # $MBSDlabs: portmk/bsd.ocaml.mk,v 1.18 2006/08/06 18:47:23 stas Exp $ # # bsd.ocaml.mk - Support for the Objective Caml language packages # # Author: Stanislav Sedov # # Feel free to send any comments and suggestions to maintainer. # # Currently recognised variables are: # # USE_OCAML - Set if your port uses OCaml to build/install. # NO_OCAML_BUILDDEPENDS - Don't add ocamlc to BUILD|EXTRACT|PATCH_DEPENDS. # NO_OCAML_RUNDEPENDS - Don't add ocamlc to RUN_DEPENDS. # USE_OCAML_FINDLIB - Set if your port uses ocamlfind to install # packages. Package direcories will be # automatically deleted. # USE_OCAML_CAMLP4 - Set if your port uses camlp4 to build. # USE_OCAML_TK - Set if you port needs ocaml-labltk. # NO_OCAMLTK_BUILDDEPENDS - Don't add labltk to BUILD|EXTRACT|PATCH_DEPENDS. # NO_OCAMLTK_RUNDEPENDS - Don't add labltk to RUN_DEPENDS. # USE_OCAML_LDCONFIG - Set if your port installs shared libraries # into ocaml site-lib dir. OCaml ld.conf file # will be automatically processed. # USE_OCAMLFIND_PLIST - Add contents of findlib target directories # automatically. # USE_OCAML_WASH - Set if your port wants to automatically # purge shared Ocaml dirs on uninstall. It's # useful when installing to non-standard PREFIX # OCAML_PKGDIRS - Directories under site-lib to be processed # if USE_OCAML_FINDLIB specified. # Default: ${PORTNAME} # OCAML_LDLIBS - Directories under PREFIX to be automatically # added/removed from ld.conf # Default: ${OCAML_SITELIBDIR}/${PORTNAME} .if !defined(OCAML_include) OCAML_MAINTAINER= ports@FreeBSD.org OCAML_include= bsd.ocaml.mk # # OCaml programs location # OCAMLC?= ${LOCALBASE}/bin/ocamlc OCAMLC_OPT?= ${LOCALBASE}/bin/ocamlc.opt OCAMLCP?= ${LOCALBASE}/bin/ocamlcp OCAMLFIND?= ${LOCALBASE}/bin/ocamlfind CAMLP4?= ${LOCALBASE}/bin/camlp4 OCAMLTK?= ${LOCALBASE}/bin/labltk # # OCaml library directory # OCAML_LIBDIR?= lib/ocaml # # Where to install site libraries # OCAML_SITELIBDIR?= ${OCAML_LIBDIR}/site-lib # # OCaml compiler port dependency # OCAMLC_PORT?= lang/ocaml OCAMLC_DEPEND?= ${OCAMLC}:${OCAMLC_PORT} # # OCaml package manager port dependency # OCAMLFIND_PORT?= devel/ocaml-findlib OCAMLFIND_DEPEND?= ${OCAMLFIND}:${OCAMLFIND_PORT} # # OCaml camlp4 port dependency # CAMLP4_PORT?= devel/ocaml-camlp4 CAMLP4_DEPEND?= ${CAMLP4}:${CAMLP4_PORT} # # OCaml TK bindings dependency # OCAMLTK_PORT?= x11-toolkits/ocaml-labltk OCAMLTK_DEPENDS?= ${OCAMLTK}:${OCAMLTK_PORT} # # Common OCaml examples and documents location # OCAML_DOCSDIR= ${PREFIX}/share/doc/ocaml OCAML_EXAMPLESDIR= ${PREFIX}/share/examples/ocaml # # Location of OCaml ld.conf file # OCAML_LDCONF?= ${OCAML_LIBDIR}/ld.conf # ocaml-findlib-1.4.1_1 wants to edit our ld.conf file, which does not # work well with staging. -.if defined(USE_OCAML_LDCONFIG) -. if !target(ocaml-ldconfig) +. if defined(USE_OCAML_LDCONFIG) +. if !target(ocaml-ldconfig) OCAMLFIND_LDCONF?= /dev/null -. endif -.endif +. endif +. endif OCAMLFIND_DESTDIR?= ${PREFIX}/${OCAML_SITELIBDIR} OCAMLFIND_LDCONF?= ${PREFIX}/${OCAML_LDCONF} -.if defined(USE_OCAML) -. if !defined(NO_OCAML_BUILDDEPENDS) +. if defined(USE_OCAML) +. if !defined(NO_OCAML_BUILDDEPENDS) EXTRACT_DEPENDS+= ${OCAMLC_DEPEND} PATCH_DEPENDS+= ${OCAMLC_DEPEND} BUILD_DEPENDS+= ${OCAMLC_DEPEND} -. endif -. if !defined(NO_OCAML_RUNDEPENDS) +. endif +. if !defined(NO_OCAML_RUNDEPENDS) RUN_DEPENDS+= ${OCAMLC_DEPEND} -. endif +. endif PLIST_SUB+= OCAML_SITELIBDIR="${OCAML_SITELIBDIR}" -.endif +. endif -.if defined(USE_OCAML_FINDLIB) +. if defined(USE_OCAML_FINDLIB) # # We'll additionally add ocamlfind to RUN_DEPENDS, since # if the port requires ocamlfind to install - it requires # some ocaml libraries and these libraries RUN_DEPENDS on # ocamlfind # BUILD_DEPENDS+= ${OCAMLFIND_DEPEND} RUN_DEPENDS+= ${OCAMLFIND_DEPEND} MAKE_ENV+= OCAMLFIND_DESTDIR="${STAGEDIR}${OCAMLFIND_DESTDIR}" \ OCAMLFIND_LDCONF="${OCAMLFIND_LDCONF}" # # Directories under site-lib to process automatically # OCAML_PKGDIRS?= ${PORTNAME} _USES_install+= 735:ocaml-findlib -. if !target(ocaml-findlib) +. if !target(ocaml-findlib) ocaml-findlib: -. for DIR in ${OCAML_PKGDIRS} -. if defined(USE_OCAMLFIND_PLIST) +. for DIR in ${OCAML_PKGDIRS} +. if defined(USE_OCAMLFIND_PLIST) @${FIND} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${DIR}/ -type f -print | ${SED} -e \ 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} -. endif +. endif @${ECHO_CMD} "@postunexec ${OCAMLFIND} remove ${DIR} 2>/dev/null" \ >> ${TMPPLIST} -. endfor -. endif -.endif +. endfor +. endif +. endif -.if defined(USE_OCAML_CAMLP4) +. if defined(USE_OCAML_CAMLP4) BUILD_DEPENDS+= ${CAMLP4_DEPEND} -.endif +. endif -.if defined(USE_OCAML_TK) -. if !defined(NO_OCAMLTK_BUILDDEPENDS) +. if defined(USE_OCAML_TK) +. if !defined(NO_OCAMLTK_BUILDDEPENDS) EXTRACT_DEPENDS+= ${OCAMLTK_DEPENDS} PATCH_DEPENDS+= ${OCAMLTK_DEPENDS} BUILD_DEPENDS+= ${OCAMLTK_DEPENDS} -. endif -. if !defined(NO_OCAMLTK_RUNDEPENDS) +. endif +. if !defined(NO_OCAMLTK_RUNDEPENDS) RUN_DEPENDS+= ${OCAMLTK_DEPENDS} -. endif -.endif +. endif +. endif -.if defined(USE_OCAML_LDCONFIG) +. if defined(USE_OCAML_LDCONFIG) # # Directories under PREFIX for appending to ld.conf # OCAML_LDLIBS?= ${OCAML_SITELIBDIR}/${PORTNAME} _USES_install+= 740:ocaml-ldconfig -. if !target(ocaml-ldconfig) +. if !target(ocaml-ldconfig) ocaml-ldconfig: -. for LIB in ${OCAML_LDLIBS} +. for LIB in ${OCAML_LDLIBS} @${ECHO_CMD} "@postexec ${ECHO_CMD} "%D/${LIB}" >> %D/${OCAML_LDCONF}" \ >> ${TMPPLIST} @${ECHO_CMD} "@postunexec ${SED} -i \"\" -e '/${LIB:S#/#\/#g}/d' %D/${OCAML_LDCONF}" >> ${TMPPLIST} -. endfor -. endif -.endif +. endfor +. endif +. endif -.if defined(USE_OCAML_WASH) +. if defined(USE_OCAML_WASH) PLIST_FILES+= "@rmempty ${OCAML_LDCONF}" -.endif +. endif .endif #!defined(OCAML_include) .if defined(_POSTMKINCLUDED) -.if defined(USE_OCAML_FINDLIB) +. if defined(USE_OCAML_FINDLIB) pre-install: ${STAGEDIR}${OCAMLFIND_DESTDIR} ${STAGEDIR}${OCAMLFIND_DESTDIR}: @${MKDIR} ${.TARGET} -.endif +. endif .endif # _POSTMKINCLUDED diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 99a3275b05eb..a1934d5f19f3 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -1,652 +1,652 @@ # These variables are used in port makefiles to define the options for a port. # # OPTIONS_DEFINE - List of options this port accepts # OPTIONS_DEFINE_${ARCH} - List of options this port accepts 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_EXCLUDE_${OPSYS} - List of options unsupported on a given ${OPSYS} # OPTIONS_EXCLUDE_${OPSYS}_${OSREL:R} - List of options unsupported on a given # ${OPSYS} and major version (11/12/13...) # 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 # # # These variables are strictly informational (read-only). They indicate the # current state of the selected options; they are space-delimited lists. # # SELECTED_OPTIONS - list of options set "on" # DESELECTED_OPTIONS - list of options set "off" # # # 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}_CMAKE_BOOL Will add to CMAKE_ARGS: # Option enabled -D${content}:BOOL=true # Option disabled -D${content}:BOOL=false # ${opt}_CMAKE_BOOL_OFF Will add to CMAKE_ARGS: # Option enabled -D${content}:BOOL=false # Option disabled -D${content}:BOOL=true # # ${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}_MESON_ON When option is enabled, it will add its # content to MESON_ARGS. # ${opt}_MESON_OFF When option is disabled, it will add its # content to MESON_ARGS. # # ${opt}_MESON_TRUE Will add to MESON_ARGS: # Option enabled -D${content}=true # Option disabled -D${content}=false # ${opt}_MESON_FALSE Will add to MESON_ARGS: # Option enabled -D${content}=false # Option disabled -D${content}=true # # ${opt}_MESON_YES Will add to MESON_ARGS: # Option enabled -D${content}=yes # Option disabled -D${content}=no # ${opt}_MESON_NO Will add to MESON_ARGS: # Option enabled -D${content}=no # Option disabled -D${content}=yes # # ${opt}_MESON_ENABLED Will add to MESON_ARGS: # Option enabled -D${content}=enabled # Option disabled -D${content}=disabled # ${opt}_MESON_DISABLED Will add to MESON_ARGS: # Option enabled -D${content}=disabled # Option disabled -D${content}=enabled # # ${opt}_IMPLIES When opt is enabled, options named in IMPLIES will # get enabled too. # ${opt}_PREVENTS When opt is enabled, if any options in PREVENTS are # also enabled, it will produce an error. # ${opt}_PREVENTS_MSG Provides a message explaining why the options # cannot be selected together. # # ${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 # ${opt}_USE_OFF= FOO=bar When option is disabled, it will enable # USE_FOO+= bar # # ${opt}_VARS= FOO=bar When option is enabled, it will set # FOO= bar # ${opt}_VARS= FOO+=bar When option is enabled, it will append # FOO+= bar # ${opt}_VARS_OFF= FOO=bar When option is disabled, it will set # FOO= bar # ${opt}_VARS_OFF= FOO+=bar When option is disabled, it will append # FOO+= bar # # 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 disabled. # # For each of the variables in _OPTIONS_FLAGS below, 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. ## # 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/\//_/} OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options _OPTIONS_FLAGS= ALL_TARGET BROKEN CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \ CONFLICTS_BUILD CONFLICTS_INSTALL CPPFLAGS CXXFLAGS \ DESKTOP_ENTRIES DISTFILES EXECUTABLES EXTRA_PATCHES EXTRACT_ONLY \ GH_ACCOUNT GH_PROJECT GH_SUBDIR GH_TAGNAME GH_TUPLE \ GL_ACCOUNT GL_COMMIT GL_PROJECT GL_SITE GL_SUBDIR GL_TUPLE \ IGNORE INFO INSTALL_TARGET LDFLAGS LIBS MAKE_ARGS MAKE_ENV \ MASTER_SITES PATCHFILES PATCH_SITES PLIST_DIRS PLIST_FILES \ PLIST_SUB PORTDOCS PORTEXAMPLES SUB_FILES SUB_LIST \ TEST_TARGET USE_CABAL USES BINARY_ALIAS _OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN TEST _ALL_OPTIONS_HELPERS= ${_OPTIONS_DEPENDS:S/$/_DEPENDS/} \ ${_OPTIONS_DEPENDS:S/$/_DEPENDS_OFF/} \ ${_OPTIONS_FLAGS:S/$/_OFF/} ${_OPTIONS_FLAGS} \ CABAL_FLAGS CMAKE_BOOL CMAKE_BOOL_OFF CMAKE_OFF CMAKE_ON \ CONFIGURE_ENABLE CONFIGURE_OFF CONFIGURE_ON \ CONFIGURE_WITH IMPLIES MESON_ARGS MESON_DISABLED \ MESON_ENABLED MESON_FALSE MESON_OFF MESON_ON MESON_TRUE \ PREVENTS PREVENTS_MSG QMAKE_OFF QMAKE_ON USE USE_OFF \ VARS VARS_OFF # The format here is target_family:priority:target-type _OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch:700:post \ extract:300:pre extract:500:do extract:700:post \ patch:300:pre patch:500:do patch:700:post \ configure:300:pre configure:500:do configure:700:post \ build:300:pre build:500:do build:700:post \ install:300:pre install:500:do install:700:post \ test:300:pre test:500:do test:700:post \ package:300:pre package:500:do package:700:post \ stage:800:post # Add per arch options -.for opt in ${OPTIONS_DEFINE_${ARCH}} -.if empty(OPTIONS_DEFINE:M${opt}) +. for opt in ${OPTIONS_DEFINE_${ARCH}} +. if empty(OPTIONS_DEFINE:M${opt}) OPTIONS_DEFINE+= ${opt} -.endif -.endfor +. endif +. endfor # Add per arch defaults OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${ARCH}} _ALL_EXCLUDE= ${OPTIONS_EXCLUDE_${ARCH}} ${OPTIONS_EXCLUDE} \ ${OPTIONS_SLAVE} ${OPTIONS_EXCLUDE_${OPSYS}} \ ${OPTIONS_EXCLUDE_${OPSYS}_${OSREL:R}} -.for opt in ${OPTIONS_DEFINE:O:u} -. if !${_ALL_EXCLUDE:M${opt}} -. for opt_implied in ${${opt}_IMPLIES} -. if ${_ALL_EXCLUDE:M${opt_implied}} +. 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 +. endif +. endfor +. endif +. endfor # Remove options the port maintainer doesn't want, part 1 -.for opt in ${_ALL_EXCLUDE:O:u} +. for opt in ${_ALL_EXCLUDE:O:u} OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}} OPTIONS_DEFINE:= ${OPTIONS_DEFINE:N${opt}} -. for otype in SINGLE RADIO MULTI GROUP -. for m in ${OPTIONS_${otype}} +. for otype in SINGLE RADIO MULTI GROUP +. for m in ${OPTIONS_${otype}} OPTIONS_${otype}_${m}:= ${OPTIONS_${otype}_${m}:N${opt}} +. endfor . 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}) +. for otype in SINGLE RADIO MULTI GROUP +. for m in ${OPTIONS_${otype}} +. if empty(OPTIONS_${otype}_${m}) OPTIONS_${otype}:= ${OPTIONS_${otype}:N${m}} -. endif +. endif +. endfor . 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}} +. for otype in SINGLE RADIO MULTI GROUP +. for m in ${OPTIONS_${otype}} COMPLETE_OPTIONS_LIST+= ${OPTIONS_${otype}_${m}} +. endfor . endfor -.endfor # Some options are always enabled by default. -.for _opt in DOCS NLS EXAMPLES IPV6 -.if ${COMPLETE_OPTIONS_LIST:M${_opt}} +. for _opt in DOCS NLS EXAMPLES IPV6 +. if ${COMPLETE_OPTIONS_LIST:M${_opt}} PORT_OPTIONS+= ${_opt} -.endif -.endfor +. endif +. endfor # Remove options the port maintainer doesn't want, part 2 -.for opt in ${_ALL_EXCLUDE:O:u} +. for opt in ${_ALL_EXCLUDE:O:u} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} -.endfor +. endfor ## Now create the list of activated options -.if defined(OPTIONS_OVERRIDE) +. if defined(OPTIONS_OVERRIDE) # Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done # before NEW_OPTIONS= PORT_OPTIONS:= ${OPTIONS_OVERRIDE} -.else +. 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}) +. for opt in ${OPTIONS_SET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -. endfor +. endif +. endfor ## Remove the options excluded system-wide (set by user in make.conf) -. for opt in ${OPTIONS_UNSET} +. for opt in ${OPTIONS_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endfor +. endfor ## 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}) +. for opt in ${${OPTIONS_NAME}_SET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -. endfor +. endif +. endfor ## Unset the options excluded per-port (set by user in make.conf) -. for opt in ${${OPTIONS_NAME}_UNSET} +. for opt in ${${OPTIONS_NAME}_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endfor +. endfor ## options files (from dialog) -. if exists(${OPTIONS_FILE}) && !make(rmconfig) +. if exists(${OPTIONS_FILE}) && !make(rmconfig) . include "${OPTIONS_FILE}" -. endif +. endif . sinclude "${OPTIONS_FILE}.local" _OPTIONS_UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME} -.for _k in SET UNSET SET_FORCE UNSET_FORCE -.if defined(${_OPTIONS_UNIQUENAME}_${_k}) +. for _k in SET UNSET SET_FORCE UNSET_FORCE +. if defined(${_OPTIONS_UNIQUENAME}_${_k}) WARNING+= "You are using ${_OPTIONS_UNIQUENAME}_${_k} which is not supported any more, use:" WARNING+= "${OPTIONS_NAME}_${_k}= ${${_OPTIONS_UNIQUENAME}_${_k}}" -.endif -.endfor +. endif +. endfor ## 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}) +. for opt in ${OPTIONS_FILE_SET} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -. endfor +. endif +. endfor -.for opt in ${OPTIONS_FILE_UNSET} +. for opt in ${OPTIONS_FILE_UNSET} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -.endfor +. endfor -.endif +. 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 ## 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}) +. for opt in ${WITH} +. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) PORT_OPTIONS+= ${opt} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -. endif -.endfor +. endif +. endfor -.for opt in ${WITHOUT} +. for opt in ${WITHOUT} PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} -.endfor +. endfor ## Enable options implied by other options # _PREVENTS is handled in bsd.port.mk:pre-check-config ## 1) Build dependency chain in A.B format: _DEPCHAIN= -.for opt in ${COMPLETE_OPTIONS_LIST} -. for o in ${${opt}_IMPLIES} +. for opt in ${COMPLETE_OPTIONS_LIST} +. for o in ${${opt}_IMPLIES} _DEPCHAIN+= ${opt}.$o +. endfor . endfor -.endfor ## 2) Check each dependency pair and if LHS is in PORT_OPTIONS then add RHS. ## All of RHS of "RHS.*" (i.e. indirect dependency) are also added for ## fast convergence. _PORT_OPTIONS:= ${PORT_OPTIONS} -.for _count in _0 ${COMPLETE_OPTIONS_LIST} +. for _count in _0 ${COMPLETE_OPTIONS_LIST} count= ${_count} ### Check if all of the nested dependency are resolved already. -. if ${count} == _0 || ${_PORT_OPTIONS} != ${PORT_OPTIONS} +. if ${count} == _0 || ${_PORT_OPTIONS} != ${PORT_OPTIONS} PORT_OPTIONS:= ${_PORT_OPTIONS} -. for dc in ${_DEPCHAIN} -. for opt in ${_PORT_OPTIONS} +. for dc in ${_DEPCHAIN} +. for opt in ${_PORT_OPTIONS} _opt=${opt} ### Add all of direct and indirect dependency only if ### they are not in ${PORT_OPTIONS}. -. if !empty(_opt:M${dc:R}) -. for d in ${dc:E} ${_DEPCHAIN:M${dc:E}.*:E} -. if empty(_PORT_OPTIONS:M$d) +. if !empty(_opt:M${dc:R}) +. for d in ${dc:E} ${_DEPCHAIN:M${dc:E}.*:E} +. if empty(_PORT_OPTIONS:M$d) _PORT_OPTIONS+= $d -. endif -. endfor -. endif +. endif +. endfor +. endif +. endfor . endfor -. endfor -. endif -.endfor +. endif +. endfor # Finally, add options required by slave ports PORT_OPTIONS+= ${OPTIONS_SLAVE} # Sort options and eliminate duplicates PORT_OPTIONS:= ${PORT_OPTIONS:O:u} _REALLY_ALL_POSSIBLE_OPTIONS:= ${COMPLETE_OPTIONS_LIST} ${_ALL_EXCLUDE} _REALLY_ALL_POSSIBLE_OPTIONS:= ${_REALLY_ALL_POSSIBLE_OPTIONS:O:u} # Handle PORTDOCS and PORTEXAMPLES -.for _type in DOCS EXAMPLES -. if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) -. if empty(PORT_OPTIONS:M${_type}) +. for _type in DOCS EXAMPLES +. if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) +. if empty(PORT_OPTIONS:M${_type}) PLIST_SUB+= PORT${_type}="@comment " -. else +. else PLIST_SUB+= PORT${_type}="" -. endif -. endif -.endfor +. endif +. endif +. endfor -.if defined(NO_OPTIONS_SORT) +. if defined(NO_OPTIONS_SORT) ALL_OPTIONS= ${OPTIONS_DEFINE} -.endif +. endif -.for target in ${_OPTIONS_TARGETS:C/:.*//:u} +. for target in ${_OPTIONS_TARGETS:C/:.*//:u} _OPTIONS_${target}?= -.endfor +. endfor -.for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} +. for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} # PLIST_SUB PLIST_SUB?= SUB_LIST?= -. if defined(OPTIONS_SUB) -. if ! ${PLIST_SUB:M${opt}=*} -. if ${PORT_OPTIONS:M${opt}} +. if defined(OPTIONS_SUB) +. if ! ${PLIST_SUB:M${opt}=*} +. if ${PORT_OPTIONS:M${opt}} PLIST_SUB:= ${PLIST_SUB} ${opt}="" NO_${opt}="@comment " -. else +. else PLIST_SUB:= ${PLIST_SUB} ${opt}="@comment " NO_${opt}="" +. endif . endif -. endif -. if ! ${SUB_LIST:M${opt}=*} -. if ${PORT_OPTIONS:M${opt}} +. if ! ${SUB_LIST:M${opt}=*} +. if ${PORT_OPTIONS:M${opt}} SUB_LIST:= ${SUB_LIST} ${opt}="" NO_${opt}="@comment " -. else +. else SUB_LIST:= ${SUB_LIST} ${opt}="@comment " NO_${opt}="" +. endif . endif . endif -. endif -. if ${PORT_OPTIONS:M${opt}} -. if defined(${opt}_USE) -. for option in ${${opt}_USE:C/=.*//:O:u} +. if ${PORT_OPTIONS:M${opt}} +. if defined(${opt}_USE) +. for option in ${${opt}_USE:C/=.*//:O:u} _u= ${option} USE_${_u:tu}+= ${${opt}_USE:M${option}=*:C/.*=//g:C/,/ /g} -. endfor -. endif -. if defined(${opt}_VARS) -. for var in ${${opt}_VARS:C/=.*//:O:u} +. endfor +. endif +. if defined(${opt}_VARS) +. for var in ${${opt}_VARS:C/=.*//:O:u} _u= ${var} -. if ${_u:M*+} +. if ${_u:M*+} ${_u:C/.$//:tu}+= ${${opt}_VARS:M${var}=*:C/[^+]*\+=//:C/^"(.*)"$$/\1/} -. else +. else ${_u:tu}= ${${opt}_VARS:M${var}=*:C/[^=]*=//:C/^"(.*)"$$/\1/} -. endif -. endfor -. endif -. if defined(${opt}_CONFIGURE_ENABLE) +. endif +. endfor +. endif +. if defined(${opt}_CONFIGURE_ENABLE) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:S/^/--enable-/} -. endif -. if defined(${opt}_CONFIGURE_WITH) +. endif +. if defined(${opt}_CONFIGURE_WITH) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--with-/} -. endif -. if defined(${opt}_CMAKE_BOOL) +. endif +. if defined(${opt}_CMAKE_BOOL) CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=true/} -. endif -. if defined(${opt}_CMAKE_BOOL_OFF) +. endif +. if defined(${opt}_CMAKE_BOOL_OFF) CMAKE_ARGS+= ${${opt}_CMAKE_BOOL_OFF:C/.*/-D&:BOOL=false/} -. endif -. if defined(${opt}_MESON_TRUE) +. endif +. if defined(${opt}_MESON_TRUE) MESON_ARGS+= ${${opt}_MESON_TRUE:C/.*/-D&=true/} -. endif -. if defined(${opt}_MESON_FALSE) +. endif +. if defined(${opt}_MESON_FALSE) MESON_ARGS+= ${${opt}_MESON_FALSE:C/.*/-D&=false/} -. endif -. if defined(${opt}_MESON_YES) +. endif +. if defined(${opt}_MESON_YES) MESON_ARGS+= ${${opt}_MESON_YES:C/.*/-D&=yes/} -. endif -. if defined(${opt}_MESON_NO) +. endif +. if defined(${opt}_MESON_NO) MESON_ARGS+= ${${opt}_MESON_NO:C/.*/-D&=no/} -. endif -. if defined(${opt}_MESON_ENABLED) +. endif +. if defined(${opt}_MESON_ENABLED) MESON_ARGS+= ${${opt}_MESON_ENABLED:C/.*/-D&=enabled/} -. endif -. if defined(${opt}_MESON_DISABLED) +. endif +. if defined(${opt}_MESON_DISABLED) MESON_ARGS+= ${${opt}_MESON_DISABLED:C/.*/-D&=disabled/} -. endif -. if defined(${opt}_CABAL_FLAGS) +. endif +. if defined(${opt}_CABAL_FLAGS) CABAL_FLAGS+= ${${opt}_CABAL_FLAGS} -. endif -. for configure in CONFIGURE CMAKE MESON QMAKE -. if defined(${opt}_${configure}_ON) -${configure}_ARGS+= ${${opt}_${configure}_ON} . endif -. endfor -. for flags in ${_OPTIONS_FLAGS} -. if defined(${opt}_${flags}) +. for configure in CONFIGURE CMAKE MESON 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) +. endif +. endfor +. for deptype in ${_OPTIONS_DEPENDS} +. if defined(${opt}_${deptype}_DEPENDS) ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS} -. endif -. endfor -. for target in ${_OPTIONS_TARGETS} +. endif +. endfor +. for target in ${_OPTIONS_TARGETS} _target= ${target:C/:.*//} _prio= ${target:C/.*:(.*):.*/\1/} _type= ${target:C/.*://} _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-on -. endfor -. else -. if defined(${opt}_USE_OFF) -. for option in ${${opt}_USE_OFF:C/=.*//:O:u} +. endfor +. else +. if defined(${opt}_USE_OFF) +. for option in ${${opt}_USE_OFF:C/=.*//:O:u} _u= ${option} USE_${_u:tu}+= ${${opt}_USE_OFF:M${option}=*:C/.*=//g:C/,/ /g} -. endfor -. endif -. if defined(${opt}_VARS_OFF) -. for var in ${${opt}_VARS_OFF:C/=.*//:O:u} +. endfor +. endif +. if defined(${opt}_VARS_OFF) +. for var in ${${opt}_VARS_OFF:C/=.*//:O:u} _u= ${var} -. if ${_u:M*+} +. if ${_u:M*+} ${_u:C/.$//:tu}+= ${${opt}_VARS_OFF:M${var}=*:C/[^+]*\+=//:C/^"(.*)"$$/\1/} -. else +. else ${_u:tu}= ${${opt}_VARS_OFF:M${var}=*:C/[^=]*=//:C/^"(.*)"$$/\1/} -. endif -. endfor -. endif -. if defined(${opt}_CONFIGURE_ENABLE) +. endif +. endfor +. endif +. if defined(${opt}_CONFIGURE_ENABLE) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:S/^/--disable-/:C/=.*//} -. endif -. if defined(${opt}_CONFIGURE_WITH) +. endif +. if defined(${opt}_CONFIGURE_WITH) CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:S/^/--without-/:C/=.*//} -. endif -. if defined(${opt}_CMAKE_BOOL) +. endif +. if defined(${opt}_CMAKE_BOOL) CMAKE_ARGS+= ${${opt}_CMAKE_BOOL:C/.*/-D&:BOOL=false/} -. endif -. if defined(${opt}_CMAKE_BOOL_OFF) +. endif +. if defined(${opt}_CMAKE_BOOL_OFF) CMAKE_ARGS+= ${${opt}_CMAKE_BOOL_OFF:C/.*/-D&:BOOL=true/} -. endif -. if defined(${opt}_MESON_TRUE) +. endif +. if defined(${opt}_MESON_TRUE) MESON_ARGS+= ${${opt}_MESON_TRUE:C/.*/-D&=false/} -. endif -. if defined(${opt}_MESON_FALSE) +. endif +. if defined(${opt}_MESON_FALSE) MESON_ARGS+= ${${opt}_MESON_FALSE:C/.*/-D&=true/} -. endif -. if defined(${opt}_MESON_YES) +. endif +. if defined(${opt}_MESON_YES) MESON_ARGS+= ${${opt}_MESON_YES:C/.*/-D&=no/} -. endif -. if defined(${opt}_MESON_NO) +. endif +. if defined(${opt}_MESON_NO) MESON_ARGS+= ${${opt}_MESON_NO:C/.*/-D&=yes/} -. endif -. if defined(${opt}_MESON_ENABLED) +. endif +. if defined(${opt}_MESON_ENABLED) MESON_ARGS+= ${${opt}_MESON_ENABLED:C/.*/-D&=disabled/} -. endif -. if defined(${opt}_MESON_DISABLED) +. endif +. if defined(${opt}_MESON_DISABLED) MESON_ARGS+= ${${opt}_MESON_DISABLED:C/.*/-D&=enabled/} -. endif -. if defined(${opt}_CABAL_FLAGS) +. endif +. if defined(${opt}_CABAL_FLAGS) CABAL_FLAGS+= -${${opt}_CABAL_FLAGS} -. endif -. for configure in CONFIGURE CMAKE MESON QMAKE -. if defined(${opt}_${configure}_OFF) -${configure}_ARGS+= ${${opt}_${configure}_OFF} . endif -. endfor -. for flags in ${_OPTIONS_FLAGS} -. if defined(${opt}_${flags}_OFF) +. for configure in CONFIGURE CMAKE MESON 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) +. endif +. endfor +. for deptype in ${_OPTIONS_DEPENDS} +. if defined(${opt}_${deptype}_DEPENDS_OFF) ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS_OFF} -. endif -. endfor -. for target in ${_OPTIONS_TARGETS} +. endif +. endfor +. for target in ${_OPTIONS_TARGETS} _target= ${target:C/:.*//} _prio= ${target:C/.*:(.*):.*/\1/} _type= ${target:C/.*://} _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-off -. endfor -. endif -.endfor +. endfor +. endif +. endfor # Collect which options helpers are defined at this point for # bsd.sanity.mk later to make sure no other options helper is # defined after bsd.port.options.mk. _OPTIONS_HELPERS_SEEN= -.for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} -. for helper in ${_ALL_OPTIONS_HELPERS} -. if defined(${opt}_${helper}) +. for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} +. for helper in ${_ALL_OPTIONS_HELPERS} +. if defined(${opt}_${helper}) _OPTIONS_HELPERS_SEEN+= ${opt}_${helper} -. endif +. endif +. endfor . endfor -.endfor .undef (SELECTED_OPTIONS) .undef (DESELECTED_OPTIONS) # Wait to expand PORT_OPTIONS until the last moment in case something modifies # the selected OPTIONS after bsd.port.options.mk is included. This uses # bmake's :@ for loop. _SELECTED_OPTIONS= ${ALL_OPTIONS:@opt@${PORT_OPTIONS:M${opt}}@} _DESELECTED_OPTIONS= ${ALL_OPTIONS:@opt@${"${PORT_OPTIONS:M${opt}}":?:${opt}}@} -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} _SELECTED_OPTIONS+= ${OPTIONS_${otype}_${m}:@opt@${PORT_OPTIONS:M${opt}}@} _DESELECTED_OPTIONS+= ${OPTIONS_${otype}_${m}:@opt@${"${PORT_OPTIONS:M${opt}}":?:${opt}}@} +. endfor . endfor -.endfor SELECTED_OPTIONS= ${_SELECTED_OPTIONS:O:u} DESELECTED_OPTIONS= ${_DESELECTED_OPTIONS:O:u} .endif diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 30f0677660ae..a7f4e7edf099 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,5460 +1,5460 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # # Please view me with 4 column tabs! # This is the master file for the most common elements to all port # Makefile in the ports system. For a more general overview of its # use and importance, see the Porter's Handbook. # There are two different types of "maintainers" in the ports framework. # The maintainer alias of the bsd.port.mk file is listed below in the # FreeBSD_MAINTAINER entry. You should consult them if you have any # questions/suggestions regarding this file. # # DO NOT COMMIT CHANGES TO THIS FILE BY YOURSELF, EVEN IF YOU DID NOT GET # A RESPONSE FROM THE MAINTAINER(S) WITHIN A REASONABLE TIMEFRAME! ALL # UNAUTHORISED CHANGES WILL BE UNCONDITIONALLY REVERTED! FreeBSD_MAINTAINER= portmgr@FreeBSD.org # For each port, the MAINTAINER variable is what you should consult for # contact information on the person(s) to contact if you have questions/ # suggestions about that specific port. By default (if no MAINTAINER # is listed), a port is maintained by the subscribers of the ports@FreeBSD.org # mailing list, and any correspondence should be directed there. # # MAINTAINER - The e-mail address of the contact person for this port. # Default: ports@FreeBSD.org # # These are meta-variables that are automatically set to the system # you are running on. These are provided in case you need to take # different actions for different values. # # ARCH - The architecture of the target machine, such as would be # returned by "uname -p". # OPSYS - Portability clause. This is the operating system the # makefile is being used on. Automatically set to # "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. # OSREL - The release version of the operating system as a text # string (e.g., "12.3"). # OSVERSION - The operating system version as a comparable integer; # the value of __FreeBSD_version (e.g., 1203000). # # This is the beginning of the list of all variables that need to be # defined in a port, listed in order that they should be included # to fit in with existing conventions. (Exception: MAINTAINER actually # should appear after EXTRACT_ONLY and before MASTER_SITE_BACKUP). # # These variables are used to identify your port. # # PORTNAME - Name of software. Mandatory. # PORTVERSION - Version of software. Mandatory when no DISTVERSION is given. # PORTREVISION - Version of port. Optional. Commonly used to indicate # that an update has happened that affects the port # framework itself, but not the distributed software # (e.g., local patches or Makefile changes). # PORTEPOCH - Optional. In certain odd cases, the PORTREVISION logic # can be fooled by ports that appear to go backwards # numerically (e.g. if port-0.3 is newer than port-1998). # In this case, incrementing PORTEPOCH forces the revision. # Default: 0 (no effect). # PKGNAME - Always defined as # ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}. # Do not define this in your Makefile. # PKGNAMEPREFIX - Prefix to specify that port is language-specific, etc. # Optional. # PKGNAMESUFFIX - Suffix to specify compilation options or a version # designator (in case there are different versions of # one port as is the case for Tcl). # Optional. # PKGVERSION - Version of package. # Do not define this in your Makefile. # DISTVERSION - Vendor version of the distribution. # Default: ${PORTVERSION} # DISTNAME - Name of port or distribution used in generating # WRKSRC and DISTFILES below. # Default: # ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} # CATEGORIES - A list of descriptive categories into which this port falls. # Mandatory. # # These variable describe how to fetch files required for building the port. # # DISTFILES - Name(s) of archive file(s) containing distribution. # Set this to an empty string if the port doesn't require it. # Default: ${DISTNAME}${EXTRACT_SUFX} # EXTRACT_SUFX - Suffix for archive names # You never have to set both DISTFILES and EXTRACT_SUFX. # Default: .tar.bz2 if USES=tar:bzip2 is set, .tar.xz if # USES=tar:xz USE_XZ is set, .tar.gz otherwise). # MASTER_SITES - Primary location(s) for distribution files if not found # locally. See bsd.sites.mk for common choices for # MASTER_SITES. # MASTER_SITE_SUBDIR # - Subdirectory of MASTER_SITES. Will sometimes need to be # set to ${PORTNAME} for (e.g.) MASTER_SITE_SOURCEFORGE. # Only guaranteed to work for choices of ${MASTER_SITES} # defined in bsd.sites.mk. # Default: not set. # PATCHFILES - Name(s) of additional files that contain distribution # patches. Make will look for them at PATCH_SITES (see below). # They will automatically be uncompressed before patching if # the names end with ".gz", ".bz2" or ".Z". # For each file you can optionally specify a strip # flag of patch(1) after a colon if it has a different # base directory, e.g. "file1 file2:-p1 file3". # You can also use a :group at the end for matching up to # dist file groups. See Porters Handbook for more information. # Syntax: PATCHFILES= patch[:-pX][:group] # Default: not set. # PATCH_SITES - Primary location(s) for distribution patch files # if not found locally. # DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} and # ${PATCHFILES} will be put in this subdirectory of # ${DISTDIR} (see below). Also they will be fetched in this # subdirectory from FreeBSD mirror sites. # ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. # EXTRACT_ONLY - If set, a subset of ${DISTFILES} you want to # actually extract. # # (NOTE: by convention, the MAINTAINER entry (see above) should go here.) # # These variables are typically set in /etc/make.conf to indicate # the user's preferred location to fetch files from. You should # rarely need to set these. # # MASTER_SITE_BACKUP # - Backup location(s) for distribution files and patch # files if not found locally and ${MASTER_SITES}/${PATCH_SITES}. # This should *not* be changed. # Default: # http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ # MASTER_SITE_OVERRIDE # - If set, prepend the MASTER_SITES setting with this value. # MASTER_SITE_FREEBSD # - If set, prepend ${MASTER_SITE_BACKUP} in MASTER_SITES. # # Set these if your port should not be built under certain circumstances. # These are string variables; you should set them to the reason why # they are necessary. # # RESTRICTED - Prevent the distribution of distfiles and packages to # the FTP sites or on CDROM (e.g. forbidden by license # considerations). # NO_CDROM - Packages and distfiles may not go on CDROM (e.g. must # not be re-sold) but can go on FTP sites. # NO_PACKAGE - Port should not be packaged for ftp sites or CDROMs, # but distfiles can be put on ftp sites and CDROMs. # FORBIDDEN - Package build should not be attempted because of # security vulnerabilities. # LEGAL_TEXT - Port has legal issues (e.g., special permission to distribute, lacks a license). # LEGAL_PACKAGE - Port has no legal issues but defines NO_PACKAGE # IGNORE - Package build should be skipped entirely (e.g. # because of serious unfixable problems in the build, # because it cannot be manually fetched, etc). Error # logs will not appear on pointyhat, so this should be # used sparingly. # IGNORE_${ARCH} - Port should be ignored on ${ARCH}. # IGNORE_${OPSYS} - Port should be ignored on ${OPSYS}. # IGNORE_${OPSYS}_${OSREL:R} - Port should be ignored on a single # release of ${OPSYS}, e.g IGNORE_FreeBSD_13 # would affect all point releases of FreeBSD 13. # IGNORE_${OPSYS}_${OSREL:R}_${ARCH} - Port should be ignored on a # single release of ${OPSYS} and specific architecture, # e.g IGNORE_FreeBSD_13_i386 would affect all point # releases of FreeBSD 13 in i386. # BROKEN - Port is believed to be broken. Package builds can # still be attempted using TRYBROKEN to test this # assumption. # BROKEN_${ARCH} - Port is believed to be broken on ${ARCH}. Package builds # can still be attempted using TRYBROKEN to # test this assumption. # BROKEN_${OPSYS} - Port is believed to be broken on ${OPSYS}. Package builds # can still be attempted using TRYBROKEN to # test this assumption. # BROKEN_${OPSYS}_${OSREL:R} - Port is believed to be broken on a single # release of ${OPSYS}, e.g BROKEN_FreeBSD_13 # would affect all point releases of FreeBSD 13 # unless TRYBROKEN is also set. # BROKEN_${OPSYS}_${OSREL:R}_${ARCH} - Port is believed to be broken on a # single release of ${OPSYS} and specific architecture, # e.g BROKEN_FreeBSD_13 would affect all point # releases of FreeBSD 13 in i386 # unless TRYBROKEN is also set. # DEPRECATED - Port is deprecated to install. Advisory only. # EXPIRATION_DATE # - If DEPRECATED is set, determines a date when # the port is planed to remove. The date format is # ISO 8601 (YYYY-MM-DD). # # DISABLE_VULNERABILITIES # - If set, do not check if the port is listed in the # vulnerabilities database. # # In addition to RESTRICTED or NO_CDROM, if only a subset of distfiles # or patchfiles have redistribution restrictions, set the following # to the list of such files. # # RESTRICTED_FILES # - List of files that cannot be redistributed. # Default: "${DISTFILES} ${PATCHFILES}" if RESTRICTED # or NO_CDROM is set, empty otherwise. # # These variables are booleans, so you don't need to set them to the reason. # # IS_INTERACTIVE # - Set this if your port needs to interact with the user # during any step in a package build. User can then decide # to skip this port by setting ${BATCH}, or compiling only # the interactive ports by setting ${INTERACTIVE}. # Default: not set. # USE_SUBMAKE - Set this if you want that each of the port's main 7 targets # (extract, patch, configure, build, stage, install and # package) to be executed in a separate make(1) process. # Useful when one of the stages needs to influence make(1) # variables of the later stages using ${WRKDIR}/Makefile.inc # generated on the fly. # Default: not set. # # NO_ARCH - Set this if port is architecture neutral. # # NO_ARCH_IGNORE - Set this to a list files to ignore when NO_ARCH is checked # in stage-qa (i.e. architecture specific files that are # 'bundled' with the port). # # Set these if your port only makes sense to certain architectures. # They are lists containing names for them (e.g., "amd64 i386"). # (Defaults: not set.) # # ONLY_FOR_ARCHS # - Only build ports if ${ARCH} matches one of these. # NOT_FOR_ARCHS - Only build ports if ${ARCH} doesn't match one of these. # ONLY_FOR_ARCHS_REASON # ONLY_FOR_ARCHS_REASON_${ARCH} # - Reason why it's only for ${ONLY_FOR_ARCHS}s # NOT_FOR_ARCHS_REASON # NOT_FOR_ARCHS_REASON_${ARCH} # - Reason why it's not for ${NOT_FOR_ARCHS}s # IA32_BINARY_PORT # - Set this instead of ONLY_FOR_ARCHS if the given port # fetches and installs compiled i386 binaries. # # Dependency checking. Use these if your port requires another port # not in the list below. (Default: empty.) # # EXTRACT_DEPENDS # - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "extract" stage. "path" is # the name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # PATCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "patch" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # FETCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends in the "fetch" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the # existence (if it is a full pathname) or search for # it in your $PATH (if it is an executable) and go # into "dir" to do a "make all install" if it's not # found. If the third field ("target") exists, it will # be used instead of ${DEPENDS_TARGET}. The first field # also supports a package name with a version range, in # the form package>=1.2 if a particular version is desired. # BUILD_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends to build (between the "extract" and # "build" stages, inclusive). The test done to # determine the existence of the dependency is the # same as FETCH_DEPENDS. If the third field ("target") # exists, it will be used instead of ${DEPENDS_TARGET}. # RUN_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends to run. The test done to determine # the existence of the dependency is the same as # FETCH_DEPENDS. This will be checked during the # "install" stage and the name of the dependency will # be put into the package as well. If the third field # ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this # package depends on. "lib" is the name of a shared library. # TEST_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends on in the "test" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the existence # (if it is a full pathname) or search for it in your # $PATH (if it is an executable) and go into "dir" to do # a "make all install" if it's not found. If the third # field ("target") exists, it will be used instead of # ${DEPENDS_TARGET}. The first field also supports a # package name with a version range, in the form package>=1.2 # if a particular version is desired. # DEPENDS_TARGET # - The default target to execute when a port is calling a # dependency. # Default: install # # These variables control options about how a port gets built and/or # are shorthand notations for common sets of dependencies. # Use these if your port uses some of the common software packages. By # convention these should be set to 'yes', although they only need to be # defined. Defaults: not set, unless explicitly indicated below. # # Note: the distinction between the USE_* and WANT_* variables, and the # WITH_* and WITHOUT_* variables, are that the former are restricted to # usage inside the ports framework, and the latter are reserved for user- # settable options. (Setting USE_* in /etc/make.conf is always wrong). # # WITH_DEBUG - If set, debugging flags are added to CFLAGS and the # binaries don't get stripped by INSTALL_PROGRAM or # INSTALL_LIB. Besides, individual ports might # add their specific to produce binaries for debugging # purposes. You can override the debug flags that are # passed to the compiler by setting DEBUG_FLAGS. It is # set to "-g" at default. # # NOTE: to override a globally defined WITH_DEBUG at a # later time ".undef WITH_DEBUG" can be used # # WITH_DEBUG_PORTS - A list of origins for which WITH_DEBUG will be set # # WITHOUT_SSP - Disable SSP. # # SSP_CFLAGS - Defaults to -fstack-protector. This value # is added to CFLAGS and the necessary flags # are added to LDFLAGS. Note that SSP_UNSAFE # can be used in Makefiles by port maintainers # if a port breaks with it (it should be # extremely rare). ## # USE_LOCALE - LANG and LC_ALL are set to the value of this variable in # CONFIGURE_ENV and MAKE_ENV. Example: USE_LOCALE=en_US.UTF-8 ## # USE_GCC - If set, this port requires this version of gcc, either in # the system or installed from a port. # USE_CSTD - Override the default C language standard (gnu89, gnu99) # USE_CXXSTD Override the default C++ language standard # USE_BINUTILS - Use binutils suite from port instead of the version in base. # CFLAGS_${ARCH} Append the cflags to CFLAGS only on the specified architecture # CXXFLAGS_${ARCH} # Append the cxxflags to CXXFLAGS only on the specified architecture ## # LDFLAGS_${ARCH} Append the ldflags to LDFLAGS only on the specified architecture ## # USE_OPENLDAP - If set, this port uses the OpenLDAP libraries. # Implies: WANT_OPENLDAP_VER?=24 # WANT_OPENLDAP_VER # - Legal values are: 24 # If set to an unknown value, the port is marked BROKEN. ## # USE_JAVA - If set, this port relies on the Java language. # Implies inclusion of bsd.java.mk. (Also see # that file for more information on USE_JAVA_*). # USE_OCAML - If set, this port relies on the OCaml language. # Implies inclusion of bsd.ocaml.mk. (Also see # that file for more information on USE_OCAML*). # USE_RUBY - If set, this port relies on the Ruby language. # Implies inclusion of bsd.ruby.mk. (Also see # that file for more information on USE_RUBY_*). ## # USE_GECKO - If set, this port uses the Gecko/Mozilla product. # See bsd.gecko.mk for more details. ## # USE_WX - If set, this port uses the WxWidgets library and related # components. See bsd.wx.mk for more details. ## # USE_LINUX_PREFIX # - Controls the action of PREFIX (see above). Only use this # if the port is a Linux infrastructure port (e.g. contains libs # or a sound server which supports the FreeBSD native one), # use the default prefix if it's a leaf port (e.g. a game or # program). # Implies NO_LICENSES_INSTALL=yes, NO_MTREE=yes, and causes # Linux ldconfig to be used when USE_LDCONFIG is defined. ## # USE_TEX - A list of the TeX dependencies the port has. # ## # USE_RC_SUBR - If set, the ports startup/shutdown script uses the common # routines found in /etc/rc.subr. # If this is set to a list of files, these files will be # automatically added to ${SUB_FILES}, some %%VAR%%'s will # automatically be expanded, they will be installed in # ${PREFIX}/etc/rc.d if ${PREFIX} is not /usr, otherwise they # will be installed in /etc/rc.d/ and added to the packing list. ## # Conflict checking. Use if your port cannot be installed at the same time as # another package. # # CONFLICTS - A list of package name patterns that the port conflicts # with, separated by blanks. The names may include shell # pattern meta-characters "*", "?", "[", "]", and "!". # Example: apache*-1.2* apache*-1.3.[012345] apache-*+ssl_* # # CONFLICTS_BUILD # - Check conflict prior to the build. # # CONFLICTS_INSTALL # - Check conflict prior to the installation stage. # # Various directory definitions and variables to control them. # You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. # # LOCALBASE - Where ports install things. # Default: /usr/local # LINUXBASE - Where Linux ports install things. # Default: /compat/linux # PREFIX - Where *this* port installs its files. # Default: ${LINUXBASE} if USE_LINUX_PREFIX is set, # otherwise ${LOCALBASE} # # IGNORE_PATH_CHECKS # - There are some sanity checks against PREFIX. # You can disable these checks with defining # this variable, but this is not recommended! # Only do this if you really know what you are # doing. These sanity checks are the following: # - PREFIX has to be an absolute path. # - PREFIX can't have a trailing slash. # # BUNDLE_LIBS Teach pkg(8) to not automatically add all shared libraries # installed by a port as shared libraries "provided" for # other packages (i.e., do not expose them in the solver). # This has to be used for ports that bundle third party # libraries for internal usage. # MASTERDIR - Where the port finds patches, package files, etc. Define # this is you have two or more ports that share most of the # files. # Default: ${.CURDIR} # PORTSDIR - The root of the ports tree. # Default: /usr/ports # DISTDIR - Where to search for and store copies of original sources # Default: ${PORTSDIR}/distfiles # PACKAGES - A top level directory where all packages go (rather than # going locally to each port). # Default: ${PORTSDIR}/packages # WRKDIRPREFIX - The place to root the temporary working directory # hierarchy. This path must *not* end in '/'. # Default: none # WRKDIR - A temporary working directory that gets *clobbered* on clean # Default: ${WRKDIRPREFIX}${.CURDIR}/work # WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually # unpacks to. # Default: ${WRKDIR}/${DISTNAME} # WRKSRC_SUBDIR - A subdirectory of ${WRKSRC} where the distribution actually # builds in. # Default: not set # NO_WRKSUBDIR - Assume port unpacks without a subdirectory, and extract it in # ${WRKSRC} instead of ${WRKDIR}. # PATCHDIR - A directory containing any additional patches you made # to port this software to FreeBSD. # Default: ${MASTERDIR}/files # SCRIPTDIR - A directory containing any auxiliary scripts # Default: ${MASTERDIR}/scripts # FILESDIR - A directory containing any miscellaneous additional files. # Default: ${MASTERDIR}/files # PKGDIR - A directory containing any package creation files. # Default: ${MASTERDIR} # SRC_BASE - The root of the src tree. (Some ports require this to get # kernel sources). Default: /usr/src # UID_FILES - A list of files containing information about registered UIDs. # Note that files have decreasing priority. # GID_FILES - A list of files containing information about registered GIDs. # Note that files have decreasing priority. # # Variables that serve as convenient "aliases" for your *-install targets. # Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". # # INSTALL_PROGRAM # - A command to install binary executables. (By # default, also strips them, unless ${STRIP} is # overridden to be the empty string). # INSTALL_KLD - As INSTALL_PROGRAM, but without the STRIP. # INSTALL_LIB - As INSTALL_DATA, but also strips the file. # INSTALL_SCRIPT # - A command to install executable scripts. # INSTALL_DATA - A command to install sharable data and static libs. # INSTALL_MAN - A command to install manpages and documentation. # COPYTREE_BIN # COPYTREE_SHARE # - Similiar to INSTALL_PROGRAM and INSTALL_DATA commands but # working on whole trees of directories, takes 3 arguments, # last one is find(1) arguments and optional. # Example use: # cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR} "! -name *\.bak" # # Installs all directories and files from ${WRKSRC}/doc # to ${DOCSDIR} except sed(1) backup files. # # MANPREFIX - The directory prefix for manual pages. # Default: ${PREFIX} # MANPREFIX # - If manual pages of some sections install in different # locations than others, use these. # Default: ${MANPREFIX} # # Set the following to specify all .info files your port installs. # # INFO - A list of .info files (omitting the trailing ".info"); # only one entry per document! These files are listed in # the path relative to ${INFO_PATH}. # INFO_PATH - Path, where all .info files will be installed by your # port, relative to ${PREFIX} # # Set the following to specify all documentation your port installs into # ${DOCSDIR} # # PORTDOCS - A list of files and directories relative to DOCSDIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. # Should not be set when no documentation files are # installed. # Useful for dynamically generated documentation. # # Set the following to specify all documentation your port installs into # ${EXAMPLESDIR} # # PORTEXAMPLES - A list of files and directories relative to EXAMPLESDIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. # Should not be set when no examples files are # installed. # Useful for dynamically generated examples. # # Set the following to specify all files and directories your port installs into # ${DATADIR} # # PORTDATA - A list of files and directories relative to DATADIR. # Shell glob patterns can be used, directories include # the entire subtree of contained files and directories. # Should not be set when no data files are # installed. # Useful for dynamically generated data files. # # Default targets and their behaviors: # # fetch - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this # port. # fetch-list - Show list of commands to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port. # fetch-recursive # - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this # port and dependencies. # fetch-recursive-list # - Show list of commands to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port and dependencies. # fetch-required # - Retrieves missing ${DISTFILES} and ${PATCHFILES} for this # port and dependencies. # fetch-required-list # - Show list of commands to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port and dependencies. # fetch-url-list # - Show list of URLS to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port. # fetch-urlall-list # - Show list of URLS to retrieve ${DISTFILES} and # ${PATCHFILES} for this port. # # all-depends-list # - Show all directories which are dependencies # for this port. # build-depends-list # - Show all directories which are build-dependencies # for this port. # package-depends-list # - Show all directories which are package-dependencies # for this port. This is based upon the dependency # tree as recorded in the Makefiles of the ports # collection, not as recorded in the currently # installed ports. # actual-package-depends # - Like package-depends-list but with the difference # that the dependencies of the currently installed # ports are used instead of the dependencies as # recorded in the ports collection. # run-depends-list # - Show all directories which are run-dependencies # for this port. # test-depends-list # - Show all directories which are test-dependencies # for this port. # install-missing-packages # - Install missing dependencies from package and mark # them as automatically installed. # extract - Unpacks ${DISTFILES} into ${WRKDIR}. # patch - Apply any provided patches to the source. # configure - Runs either GNU configure, one or more local configure # scripts or nothing, depending on what's available. # build - Actually compile the sources. # install - Install the results of a build. # reinstall - Install the results of a build, deinstalling any previous # installation if needed. # deinstall - Remove the installation. # deinstall-all - Remove all installations with the same PKGORIGIN. # test - Run tests for the port. # package - Create a package from an _installed_ port. # package-recursive # - Create a package for a port and _all_ of its dependencies. # describe - Try to generate a one-line description for each port for # use in INDEX files and the like. # check-plist - Checks for files missing from the plist, and files in the plist # that are not installed by the port. # check-sanity - Perform some basic checks of the port layout. # checkpatch - Do a "patch -C" instead of a "patch". Note that it may # give incorrect results if multiple patches deal with # the same file. # checksum - Use distinfo to ensure that your distfiles are valid. # checksum-recursive # - Run checksum in this port and all dependencies. # makesum - Generate distinfo (only do this for your own ports!). # clean - Remove ${WRKDIR} and other temporary files used for building. # clean-depends - Do a "make clean" for all dependencies. # config - Configure options for this port (using ${DIALOG}). # Automatically run prior to extract, patch, configure, build, # install, and package. # config-recursive # - Configure options for this port for a port and all its # dependencies. # showconfig - Display options config for this port. # showconfig-recursive # - Display options config for this port and all its # dependencies. # rmconfig - Remove the options config for this port. # rmconfig-recursive # - Remove the options config for this port and all its # dependencies. # # Default sequence for "all" is: # # check-sanity fetch checksum extract patch configure build # # Please read the comments in the targets section below; you # should be able to use the pre-* or post-* targets/scripts # (which are available for every stage except checksum) or # override the do-* targets to do pretty much anything you want. # # The TARGET_ORDER_OVERRIDE variable can be set to multiple : # to change the ordering of targets, have a look at the _SEQ variables at the # end of this file for the default order and priorities. # # NEVER override the "regular" targets unless you want to open # a major can of worms. # # Set these variables if your port doesn't need some of the steps. # Note that there are no NO_PATCH or NO_CONFIGURE variables because # those steps are empty by default. NO_EXTRACT is not allowed anymore # since we need to at least create ${WRKDIR}. Also, NO_CHECKSUM is a user # variable and is not to be set in a port's Makefile. See above for NO_PACKAGE. # # NO_BUILD - Use a dummy (do-nothing) build target. # NO_INSTALL - Use a dummy (do-nothing) install target. # NO_TEST - Use a dummy (do-nothing) test target. # # Here are some variables used in various stages. # # For options see bsd.options.mk # # For fetch: # # FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. # Default: "/usr/bin/fetch" # FETCH_ARGS - Arguments to ftp/http fetch command. # Default: "-Fpr" # FETCH_CMD - ftp/http fetch command. # Default: ${FETCH_BINARY} ${FETCH_ARGS} # FETCH_BEFORE_ARGS # - Arguments to ${FETCH_CMD} before filename. # Default: none # FETCH_AFTER_ARGS # - Arguments to ${FETCH_CMD} following filename. # Default: none # FETCH_ENV - Environment to pass to ${FETCH_CMD}. # Default: none # FETCH_REGET - Times to retry fetching of files on checksum errors. # Default: 1 # CLEAN_FETCH_ENV # - Disable package dependency in fetch target for mass # fetching. User settable. # # For extract: # # EXTRACT_CMD - Command for extracting archive # Default: ${TAR} # EXTRACT_BEFORE_ARGS # - Arguments to ${EXTRACT_CMD} before filename. # Default: "-xf" # EXTRACT_AFTER_ARGS # - Arguments to ${EXTRACT_CMD} following filename. # Default: "--no-same-owner --no-same-permissions" # For patch: # # EXTRA_PATCHES - Define this variable if you have patches not in # ${PATCHDIR}. This usually happens when you need to # do some pre-processing before some distribution # patches can be applied. In that case, fetch them as # extra distfiles, put the processed results in # ${WRKDIR}, then point EXTRA_PATCHES to them. # The patches specified by this variable will be # applied after the normal distribution patches but # before those in ${PATCHDIR}. This can also contain # directories, all the files named patch-* in those directories # will be applied. # EXTRA_PATCH_TREE - where to find extra 'out-of-tree' patches # Points to a directory hierarchy with the same layout # as the ports tree, where local patches can be found. # This allows a third party to keep their patches in # some other source control system if needed. # PATCH_WRKSRC - Directory to apply patches in. # Default: ${WRKSRC} # # For configure: # # HAS_CONFIGURE - If set, this port has its own configure script. The # configure stage will not do anything if this is not set. # GNU_CONFIGURE - If set, you are using GNU configure (optional). Implies # HAS_CONFIGURE. # CONFIGURE_OUTSOURCE - If set, this port builds in an empty ${CONFIGURE_WRKSRC} # not being under ${WRKSRC}. # CONFIGURE_WRKSRC # - Directory to run configure in. # Default: ${WRKSRC} # CONFIGURE_SCRIPT # - Name of configure script, relative to ${CONFIGURE_WRKSRC}. # Default: "Makefile.PL" if USES=perl5 and USE_PERL5=configure # are set, "configure" otherwise. # CONFIGURE_TARGET # - The name of target to call when GNU_CONFIGURE is # defined. # Default: ${ARCH}-portbld-${OPSYS:tl}${OSREL} # GNU_CONFIGURE_PREFIX # - The directory passed as prefix to the configure script if # GNU_CONFIGURE is set. # Default: ${PREFIX} # CONFIGURE_ARGS # - Pass these args to configure if ${HAS_CONFIGURE} is set. # Default: "--prefix=${GNU_CONFIGURE_PREFIX} # --infodir=${PREFIX}/${INFO_PATH} --localstatedir=/var # --mandir=${MANPREFIX}/man --build=${CONFIGURE_TARGET}" if # GNU_CONFIGURE is set, "CC=${CC} CFLAGS=${CFLAGS} # PREFIX=${PREFIX} INSTALLPRIVLIB=${PREFIX}/lib # INSTALLARCHLIB=${PREFIX}/lib" if USES=perl5 and # USE_PERL5=configure are set, empty otherwise. # CONFIGURE_ENV - Pass these env (shell-like) to configure if # ${HAS_CONFIGURE} is set. # CONFIGURE_LOG - The name of configure log file. It will be printed to # the screen if configure fails. # Default: config.log # CONFIGURE_FAIL_MESSAGE # - A message displayed to users when configure # fails (note: this assumes the do-configure # target has not been overwritten). This message # will be passed through /usr/bin/fmt before # being shown to the user. # # WITHOUT_FBSD10_FIX Disable FreeBSD 10.0 autotools workaround. # # For build and install: # # MAKEFILE - Name of the makefile. # Default: Makefile # ALL_TARGET - Default target for sub-make in build stage. # Default: all # BUILD_WRKSRC - Directory to do build in (default: ${WRKSRC}). # MAKE_ENV - Additional environment vars passed to sub-make in build # and install stages. # Default: see below # MAKE_ARGS - Any extra arguments to sub-make in build and install stages. # Default: none ## # MAKE_JOBS_UNSAFE # - Disallow multiple jobs even when user set a global override. # To be used with known bad ports. # DISABLE_MAKE_JOBS # - Set to disable the multiple jobs feature. User settable. # MAKE_JOBS_NUMBER # - Override the number of make jobs to be used. User settable. # MAKE_JOBS_NUMBER_LIMIT # - Set a limit for maximum number of make jobs allowed to be # used. ## ccache # # WITH_CCACHE_BUILD # - Enable CCACHE support (devel/ccache). User settable. # CCACHE_DIR # - Which directory to use for ccache (default: $HOME/.ccache) # NO_CCACHE # - Disable CCACHE support for example for certain ports if # CCACHE is enabled. User settable. # # For test: # # TEST_TARGET - Target for sub-make in test stage. If not defined, # no default test target is provided. # Default: (none) # TEST_WRKSRC - Directory to do test in (default: ${WRKSRC}). # TEST_ENV - Additional environment vars passed to sub-make in test # stage # Default: ${MAKE_ENV} # TEST_ARGS - Any extra arguments to sub-make in test stage # Default: ${MAKE_ARGS} # # For install: # # INSTALL_TARGET # - Default target for sub-make in install stage. # Default: install # INSTALL_WRKSRC # - Directory to install from # Default: ${WRKSRC} # NO_MTREE - If set, will not invoke mtree from bsd.port.mk from # the "install" target. # MTREE_FILE - The name of the mtree file. # Default: ${PORTSDIR}/Templates/BSD.local.dist or # /etc/mtree/BSD.usr.dist if ${PREFIX} == "/usr". # PLIST_DIRS - Directories to be added to packing list # PLIST_FILES - Files and symbolic links to be added to packing list # # PLIST - Name of the `packing list' file. # Change this to ${WRKDIR}/PLIST or something if you # need to write to it. (It is not a good idea for a port # to write to any file outside ${WRKDIR} during a normal # build.) # Default: ${PKGDIR}/pkg-plist # TMPPLIST - Name of the `packing list' file after processing # Default: ${WRKDIR}/.PLIST.mktmp # PLIST_SUB - List of "variable=value" pair for substitution in ${PLIST} # Default: see below # # SUB_FILES - Files that should be passed through sed(1) and redirected to # ${WRKDIR}. # - For each file specified in SUB_FILES, there must be a # corresponding file in ${FILESDIR} whose suffix is ".in". For # instance, if the Makefile specifies "SUB_FILES= pkg-message" # then there must be a file called pkg-message.in in # ${FILESDIR}. # - The substitution process is the same as PLIST_FILES, as # described below except that any line beginning with @comment # is deleted. # SUB_LIST - List of "variable=value" pair for substitution in ${SUB_FILES} # Some pairs are added by default: eg. PREFIX=${PREFIX} # # USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of # directories to be searched for shared libraries. # Otherwise, this is a list of directories to be added to that # list. The directory names are written to # ${LOCALBASE}/libdata/ldconfig/${PKGBASE} which is then # used by the ldconfig startup script. # This mechanism replaces ldconfig scripts installed by some # ports, often under such names as 000.${UNQUENAME}.sh. # If USE_LINUX_PREFIX is defined, the Linux version of # ldconfig will be used instead of the native FreeBSD # version, and the directory list given will be ignored. # USE_LDCONFIG32 # - Same as USE_LDCONFIG but the target file is # ${LOCALBASE}/libdata/ldconfig32/${PKGBASE} instead. # Note: that should only be used on 64-bit architectures. # # DOCSDIR - Name of the directory to install the packages docs in. # Default: ${PREFIX}/share/doc/${PORTNAME} # DOCSDIR_REL - The DOCSDIR relative to ${PREFIX} # EXAMPLESDIR - Name of the directory to install the packages examples in. # Default: ${PREFIX}/share/examples/${PORTNAME} # EXAMPLESDIR_REL # - The EXAMPLESDIR relative to ${PREFIX} # DATADIR - Name of the directory to install the packages shared data in. # Default: ${PREFIX}/share/${PORTNAME} # DATADIR_REL - The DATADIR relative to ${PREFIX} # # WWWDIR - Name of the directory to install the packages www data in. # Default: ${PREFIX}/www/${PORTNAME} # WWWDIR_REL - The WWWDIR relative to ${PREFIX} # # USERS - List of users to create at install time. Each login must # have a corresponding entry in ${UID_FILES}. # GROUPS - List of groups to create at install time. Each group must # have a corresponding entry in ${GID_FILES}. # # DESKTOPDIR - Name of the directory to install ${DESKTOP_ENTRIES} in. # Default: ${PREFIX}/share/applications # DESKTOP_ENTRIES # - List of desktop entry files to generate and install in # ${DESKTOPDIR}. The format is # "Name" "Comment" "Icon" "Exec" "Categories" StartupNotify # Rules: # * Only add desktop entries for applications which do not # require a terminal (ie. X applications). # * If the upstream distribution already installs .desktop # files, you do not need to use this. # * If you require a more elaborate .desktop file than this # variable permits, write it yourself and install it # in ${DESKTOPDIR}. # Notes: # * Comment, Icon and StartupNotify may be empty # strings (""). Categories may be an empty string in some # cases (see below). The other fields are mandatory. # * If Comment is an empty string, port ${COMMENT} will be # used. # * If set, Icon must be either absolute path (usually # ${PREFIX}/share/pixmaps/${PORTNAME}.png) or icon name # without extension if installed icons follow Icon Theme # Specification. # * If Categories is an empty string, bsd.port.mk will try # to deduce a default value using the CATEGORIES variable. # If the deduction fails, you will have to set Categories # manually. You should check the generated value using # "make desktop-categories", and override it if necessary. # * Exec will also be used to name the .desktop file. # * StartupNotify may be true, false or empty (see Desktop # Entry Specification for details). # * The files will be automatically added to ${PLIST}. # Example: # "X Window Information" \ # "Get information about X windows" \ # "${PREFIX}/share/pixmaps/wininfo.png" \ # "${PREFIX}/bin/wininfo" \ # "System;" \ # "" # See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html # for an explanation of the fields. If you need to create more # than one file, just chain them into a single variable. # # Note that the install target will automatically add manpages (see # above) and also substitute special sequences of characters (delimited # by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For # instance, "OSREL=${OSREL}" in PLIST_SUB causes all occurrences of # "%%OSREL%%" in ${PLIST} to be substituted by the value of OSREL. # ${TMPPLIST} is generated before the do-install stage. If you are # generating the packing list on-the-fly, make sure it's generated before # do-install is called! # # This is used in all stages: # # SCRIPTS_ENV - Additional environment vars passed to scripts in # ${SCRIPTDIR} executed by bsd.port.mk. # Default: see below # # Finally, variables to change if you want a special behavior. These # are for debugging purposes. Don't set them in your Makefile. # # ECHO_MSG - Used to print all the '===>' style prompts - override this # to turn them off. # Default: ${ECHO_CMD} # PATCH_DEBUG - If set, print out more information about the patches as # it attempts to apply them. # PKG_DBDIR - Where package installation is recorded; this directory # must not contain anything else. # Default: /var/db/pkg # PORT_DBDIR - Where port configuration options are recorded. # Default: /var/db/ports # NO_PKG_REGISTER # - Don't register a port installation as a package. # FORCE_PKG_REGISTER # - If set, it will overwrite any existing package # registration information in ${PKG_DBDIR}/${PKGNAME}. # NO_DEPENDS - Don't verify build of dependencies. # STRICT_DEPENDS # - Verify dependencies but consider missing dependencies as # fatal. # CHECKSUM_ALGORITHMS # - Different checksum algorithms to check for verifying the # integrity of the distfiles. The absence of the algorithm # in distinfo doesn't make it fail. # Default: sha256 # NO_CHECKSUM - Don't verify the checksum. Typically used when # when you noticed the distfile you just fetched has # a different checksum and you intend to verify if # the port still works with it. # USE_PACKAGE_DEPENDS # - Try to install dependencies from existing packages instead # of building the port from scratch. Fallback on source # if an existing package is not present. # USE_PACKAGE_DEPENDS_ONLY # - Like USE_PACKAGE_DEPENDS, but do not fallback on source. # INSTALL_AS_USER # - Define this to install as the current user, intended # for systems where you have no root access. # DISABLE_SIZE - Do not check the size of a distfile even if the SIZE field # has been specified in distinfo. This is useful # when using an alternate FETCH_CMD. # PKG_CREATE_VERBOSE # - If set, pass the -v option to pkg create which # ensures periodic output during packaging and # will help prevent timeouts by build monitors # PKG_COMPRESSION_FORMAT # - the compression format used when creating a package, see # pkg-create(8) for valid formats # PKG_COMPRESSION_LEVEL # - the compression level to use when creating a package, see # pkg-create(8) for valid values # # End of the list of all variables that need to be defined in a port. # Most port authors should not need to understand anything after this point. # LANG= C LC_ALL= C .export LANG LC_ALL # These need to be absolute since we don't know how deep in the ports # tree we are and thus can't go relative. They can, of course, be overridden # by individual Makefiles or local system make configuration. PORTSDIR?= /usr/ports LOCALBASE?= /usr/local LINUXBASE?= /compat/linux DISTDIR?= ${PORTSDIR}/distfiles _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} INDEXDIR?= ${PORTSDIR} SRC_BASE?= /usr/src USESDIR?= ${PORTSDIR}/Mk/Uses SCRIPTSDIR?= ${PORTSDIR}/Mk/Scripts LIB_DIRS?= /lib /usr/lib ${LOCALBASE}/lib STAGEDIR?= ${WRKDIR}/stage NOTPHONY?= FLAVORS?= FLAVOR?= OVERLAYS?= REWARNFILE= ${WRKDIR}/reinplace_warnings.txt # Disallow forced FLAVOR as make argument since we cannot change it to the # proper default. .if empty(FLAVOR) && !empty(.MAKEOVERRIDES:MFLAVOR) .error FLAVOR may not be passed empty as a make argument. .endif # Store env FLAVOR for later .if !defined(_FLAVOR) _FLAVOR:= ${FLAVOR} .endif .if !defined(PORTS_FEATURES) && empty(${PORTS_FEATURES:MFLAVORS}) PORTS_FEATURES+= FLAVORS .endif MINIMAL_PKG_VERSION= 1.15.9 _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} # Ensure .CURDIR contains an absolute path without a trailing slash. Failed # builds can occur when PORTSDIR is a symbolic link, or with something like # make -C /usr/ports/category/port/. .CURDIR:= ${.CURDIR:tA} # make sure bmake treats -V as expected .MAKE.EXPAND_VARIABLES= yes .include "${PORTSDIR}/Mk/bsd.commands.mk" # Do not leak flavors to childs make .MAKEOVERRIDES:= ${.MAKEOVERRIDES:NFLAVOR} .if defined(CROSS_TOOLCHAIN) -.if !defined(CROSS_SYSROOT) +. if !defined(CROSS_SYSROOT) IGNORE= CROSS_SYSROOT should be defined -.endif +. endif .include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" # Do not define CPP on purpose -.if !defined(HOSTCC) +. if !defined(HOSTCC) HOSTCC:= ${CC} HOSTCXX:= ${CXX} -.endif -.if !defined(CC_FOR_BUILD) +. endif +. if !defined(CC_FOR_BUILD) CC_FOR_BUILD:= ${HOSTCC} CXX_FOR_BUILD:= ${HOSTCXX} -.endif +. endif CONFIGURE_ENV+= HOSTCC="${HOSTCC}" HOSTCXX="${HOSTCXX}" CC_FOR_BUILD="${CC_FOR_BUILD}" CXX_FOR_BUILD="${CXX_FOR_BUILD}" CC= ${XCC} --sysroot=${CROSS_SYSROOT} CXX= ${XCXX} --sysroot=${CROSS_SYSROOT} CPP= ${XCPP} --sysroot=${CROSS_SYSROOT} -.for _tool in AS AR LD NM OBJCOPY RANLIB SIZE STRINGS +. for _tool in AS AR LD NM OBJCOPY RANLIB SIZE STRINGS ${_tool}= ${CROSS_BINUTILS_PREFIX}${_tool:tl} -.endfor +. endfor LD+= --sysroot=${CROSS_SYSROOT} STRIP_CMD= ${CROSS_BINUTILS_PREFIX}strip # only bmake support the below STRIPBIN= ${STRIP_CMD} .export.env STRIPBIN .endif # # DESTDIR section to start a chrooted process if invoked with DESTDIR set # .if defined(DESTDIR) && !empty(DESTDIR) && !defined(CHROOTED) && \ !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) .include "${PORTSDIR}/Mk/bsd.destdir.mk" .else -.if !target(makepatch) +. if !target(makepatch) makepatch: @${SETENV} WRKDIR=${WRKDIR} PATCHDIR=${PATCHDIR} \ PATCH_WRKSRC=${PATCH_WRKSRC} \ STRIP_COMPONENTS="${PATCH_STRIP:S/-p//}" \ ${SH} ${SCRIPTSDIR}/smart_makepatch.sh -.endif +. endif # Start of options section -.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) +. if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) ) # Get the default maintainer MAINTAINER?= ports@FreeBSD.org # Get the architecture -.if !defined(ARCH) +. if !defined(ARCH) ARCH!= ${UNAME} -p -.endif +. endif HOSTARCH:= ${ARCH} -.if defined(CROSS_TOOLCHAIN) +. if defined(CROSS_TOOLCHAIN) ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} -.endif +. endif _EXPORTED_VARS+= ARCH -.if ${ARCH} == powerpc64 -. if !defined(PPC_ABI) +. if ${ARCH} == powerpc64 +. if !defined(PPC_ABI) PPC_ABI!= ${CC} -dM -E - < /dev/null | ${AWK} '/_CALL_ELF/{print "ELFv"$$3}' -. if ${PPC_ABI} != ELFv2 +. if ${PPC_ABI} != ELFv2 PPC_ABI= ELFv1 -. endif -. endif +. endif +. endif _EXPORTED_VARS+= PPC_ABI -.endif +. endif # Get operating system versions for a cross build -.if defined(CROSS_SYSROOT) -.if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) +. if defined(CROSS_SYSROOT) +. if !exists(${CROSS_SYSROOT}/usr/include/sys/param.h) .error CROSS_SYSROOT does not include /usr/include/sys/param.h. -.endif +. endif OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${CROSS_SYSROOT}/usr/include/sys/param.h _OSRELEASE!= ${AWK} -v version=${OSVERSION} 'END { printf("%d.%d-CROSS", version / 100000, version / 1000 % 100) }' < /dev/null -.endif +. endif # Get the operating system type -.if !defined(OPSYS) +. if !defined(OPSYS) OPSYS!= ${UNAME} -s -.endif +. endif _EXPORTED_VARS+= OPSYS -.if !defined(_OSRELEASE) +. if !defined(_OSRELEASE) _OSRELEASE!= ${UNAME} -r -.endif +. endif _EXPORTED_VARS+= _OSRELEASE # Get the operating system revision OSREL?= ${_OSRELEASE:C/-.*//} _EXPORTED_VARS+= OSREL # Get __FreeBSD_version -.if !defined(OSVERSION) -.if exists(/usr/include/sys/param.h) +. if !defined(OSVERSION) +. if exists(/usr/include/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h -.elif exists(${SRC_BASE}/sys/sys/param.h) +. elif exists(${SRC_BASE}/sys/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h -.else +. else .error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. -.endif -.endif +. endif +. endif _EXPORTED_VARS+= OSVERSION -.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1203000 +. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1203000 _UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\ are guaranteed to build on this system. Please upgrade to a supported release. -. if defined(ALLOW_UNSUPPORTED_SYSTEM) +. if defined(ALLOW_UNSUPPORTED_SYSTEM) WARNING+= "${_UNSUPPORTED_SYSTEM_MESSAGE}" -. else +. else show-unsupported-system-error: @${ECHO_MSG} "/!\\ ERROR: /!\\" @${ECHO_MSG} @${ECHO_MSG} "${_UNSUPPORTED_SYSTEM_MESSAGE}" | ${FMT_80} @${ECHO_MSG} @${ECHO_MSG} "No support will be provided if you silence this message by defining ALLOW_UNSUPPORTED_SYSTEM." | ${FMT_80} @${ECHO_MSG} @${FALSE} -. endif -.endif +. endif +. endif # Convert OSVERSION to major release number _OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} # Sanity checks for chroot/jail building. # Skip if OSVERSION specified on cmdline for testing. Only works for bmake. -.if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION} -.if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R} -.if !defined(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE) +. if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION} +. if ${_OSVERSION_MAJOR} != ${_OSRELEASE:R} +. if !defined(I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE) .error UNAME_r (${_OSRELEASE}) and OSVERSION (${OSVERSION}) do not agree on major version number. -.endif -.elif ${_OSVERSION_MAJOR} != ${OSREL:R} +. endif +. elif ${_OSVERSION_MAJOR} != ${OSREL:R} .error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number. -.endif -.endif +. endif +. endif # Only define tools here (for transition period with between pkg tools) .include "${PORTSDIR}/Mk/bsd.commands.mk" -.if !defined(_PKG_CHECKED) && !defined(PACKAGE_BUILDING) && exists(${PKG_BIN}) -.if !defined(_PKG_VERSION) +. if !defined(_PKG_CHECKED) && !defined(PACKAGE_BUILDING) && exists(${PKG_BIN}) +. if !defined(_PKG_VERSION) _PKG_VERSION!= ${PKG_BIN} -v -.endif +. endif # XXX hack for smooth transition towards pkg 1.17 _PKG_BEFORE_PKGEXT!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} 1.17.0 -.if ${_PKG_BEFORE_PKGEXT} == "<" +. if ${_PKG_BEFORE_PKGEXT} == "<" _PKG_TRANSITIONING_TO_NEW_EXT= yes _EXPORTED_VARS+= _PKG_TRANSITIONING_TO_NEW_EXT WARNING+= "It is strongly recommended to upgrade to a newer version of pkg first" -.endif +. endif # XXX End of hack _PKG_STATUS!= ${PKG_BIN} version -t ${_PKG_VERSION:C/-.*//g} ${MINIMAL_PKG_VERSION} -.if ${_PKG_STATUS} == "<" +. if ${_PKG_STATUS} == "<" IGNORE= pkg(8) must be version ${MINIMAL_PKG_VERSION} or greater, but you have ${_PKG_VERSION}. You must upgrade the ${PKG_ORIGIN} port first -.endif +. endif _PKG_CHECKED= 1 -.endif +. endif _EXPORTED_VARS+= _PKG_CHECKED MASTERDIR?= ${.CURDIR} -.if ${MASTERDIR} != ${.CURDIR} +. if ${MASTERDIR} != ${.CURDIR} SLAVE_PORT?= yes MASTER_PORT?=${MASTERDIR:C/[^\/]+\/\.\.\///:C/[^\/]+\/\.\.\///:C/^.*\/([^\/]+\/[^\/]+)$/\\1/} -.else +. else SLAVE_PORT?= no MASTER_PORT?= -.endif +. endif # If they exist, include Makefile.inc, then architecture/operating # system specific Makefiles, then local Makefile.local. -.if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) +. if ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" USE_SUBMAKE= yes -.endif +. endif -.if exists(${MASTERDIR}/../Makefile.inc) +. if exists(${MASTERDIR}/../Makefile.inc) .include "${MASTERDIR}/../Makefile.inc" USE_SUBMAKE= yes -.endif +. endif -.if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) +. if exists(${MASTERDIR}/Makefile.${ARCH}-${OPSYS}) .include "${MASTERDIR}/Makefile.${ARCH}-${OPSYS}" USE_SUBMAKE= yes -.elif exists(${MASTERDIR}/Makefile.${OPSYS}) +. elif exists(${MASTERDIR}/Makefile.${OPSYS}) .include "${MASTERDIR}/Makefile.${OPSYS}" USE_SUBMAKE= yes -.elif exists(${MASTERDIR}/Makefile.${ARCH}) +. elif exists(${MASTERDIR}/Makefile.${ARCH}) .include "${MASTERDIR}/Makefile.${ARCH}" USE_SUBMAKE= yes -.endif +. endif -.if exists(${MASTERDIR}/Makefile.local) +. if exists(${MASTERDIR}/Makefile.local) .include "${MASTERDIR}/Makefile.local" USE_SUBMAKE= yes -.elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) +. elif ${MASTERDIR} != ${.CURDIR} && exists(${.CURDIR}/Makefile.local) .include "${.CURDIR}/Makefile.local" USE_SUBMAKE= yes -.endif +. endif -.for _CATEGORY in ${CATEGORIES} +. for _CATEGORY in ${CATEGORIES} PKGCATEGORY?= ${_CATEGORY} -.endfor +. endfor _PORTDIRNAME= ${.CURDIR:T} PORTDIRNAME?= ${_PORTDIRNAME} PKGORIGIN?= ${PKGCATEGORY}/${PORTDIRNAME} # where 'make config' records user configuration options PORT_DBDIR?= /var/db/ports UID_FILES?= ${PORTSDIR}/UIDs GID_FILES?= ${PORTSDIR}/GIDs UID_OFFSET?= 0 GID_OFFSET?= 0 # predefined accounts from src/etc/master.passwd # alpha numeric sort order USERS_BLACKLIST= _dhcp _pflogd _ypldap auditdistd bin bind daemon games hast kmem mailnull man news nobody operator pop proxy root smmsp sshd toor tty unbound uucp www # predefined accounts from src/etc/group # alpha numeric sort order GROUPS_BLACKLIST= _dhcp _pflogd _ypldap audit authpf bin bind daemon dialer ftp games guest hast kmem mail mailnull man network news nobody nogroup operator proxy smmsp sshd staff sys tty unbound uucp wheel www LDCONFIG_DIR= libdata/ldconfig LDCONFIG32_DIR= libdata/ldconfig32 # At least KDE needs TMPDIR for the package building, # so we're setting it to the known default value. -.if defined(PACKAGE_BUILDING) +. if defined(PACKAGE_BUILDING) TMPDIR?= /tmp -.endif # defined(PACKAGE_BUILDING) +. endif # defined(PACKAGE_BUILDING) -.if defined(WITH_DEBUG_PORTS) -.if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} +. if defined(WITH_DEBUG_PORTS) +. if ${WITH_DEBUG_PORTS:M${PKGORIGIN}} WITH_DEBUG= yes -.endif -.endif +. endif +. endif .include "${PORTSDIR}/Mk/bsd.default-versions.mk" .include "${PORTSDIR}/Mk/bsd.options.mk" -.endif +. endif # End of options section. # Start of pre-makefile section. -.if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) +. if !defined(AFTERPORTMK) && !defined(INOPTIONSMK) -.if defined(_PREMKINCLUDED) +. if defined(_PREMKINCLUDED) DEV_ERROR+= "you cannot include bsd.port[.pre].mk twice" -.endif +. endif _PREMKINCLUDED= yes -.if defined(PORTVERSION) -.if ${PORTVERSION:M*[-_,]*}x != x +. if defined(PORTVERSION) +. if ${PORTVERSION:M*[-_,]*}x != x IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ',' -.endif -.if defined(DISTVERSION) +. endif +. if defined(DISTVERSION) DEV_ERROR+= "Defining both PORTVERSION and DISTVERSION is wrong, only set one, if necessary, set DISTNAME" -.endif +. endif DISTVERSION?= ${PORTVERSION:S/:/::/g} -.elif defined(DISTVERSION) +. elif defined(DISTVERSION) PORTVERSION= ${DISTVERSION:tl:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g} -.endif +. endif PORTREVISION?= 0 -.if ${PORTREVISION} != 0 +. if ${PORTREVISION} != 0 _SUF1= _${PORTREVISION} -.endif +. endif PORTEPOCH?= 0 -.if ${PORTEPOCH} != 0 +. if ${PORTEPOCH} != 0 _SUF2= ,${PORTEPOCH} -.endif +. endif PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2} PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION} DISTVERSIONFULL= ${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX} DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL} INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} PACKAGES?= ${PORTSDIR}/packages TEMPLATES?= ${PORTSDIR}/Templates KEYWORDS?= ${PORTSDIR}/Keywords WRAPPERSDIR?= ${PORTSDIR}/Mk/Wrappers/ PATCHDIR?= ${MASTERDIR}/files FILESDIR?= ${MASTERDIR}/files SCRIPTDIR?= ${MASTERDIR}/scripts PKGDIR?= ${MASTERDIR} PREFIX?= ${LOCALBASE} PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg -.if defined(USE_LOCAL_MK) +. if defined(USE_LOCAL_MK) .include "${PORTSDIR}/Mk/bsd.local.mk" -.endif -.for odir in ${OVERLAYS} +. endif +. for odir in ${OVERLAYS} .sinclude "${odir}/Mk/bsd.overlay.mk" -.endfor +. endfor -.if defined(USE_JAVA) +. if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" -.endif +. endif -.if defined(USE_RUBY) +. if defined(USE_RUBY) .include "${PORTSDIR}/Mk/bsd.ruby.mk" -.endif +. endif -.if defined(USE_OCAML) +. if defined(USE_OCAML) .include "${PORTSDIR}/Mk/bsd.ocaml.mk" -.endif +. endif -.if defined(USE_APACHE_BUILD) +. if defined(USE_APACHE_BUILD) USES+= apache:build,${USE_APACHE_BUILD:C/2([0-9])/2.\1/g} -.elif defined(USE_APACHE_RUN) +. elif defined(USE_APACHE_RUN) USES+= apache:run,${USE_APACHE_RUN:C/2([0-9])/2.\1/g} -.elif defined(USE_APACHE) +. elif defined(USE_APACHE) USE_APACHE:= ${USE_APACHE:S/common/server,/} USES+= apache:${USE_APACHE:C/2([0-9])/2.\1/g} -.endif +. endif -.if defined(USE_TEX) +. if defined(USE_TEX) .include "${PORTSDIR}/Mk/bsd.tex.mk" -.endif +. endif -.if defined(USE_GECKO) +. if defined(USE_GECKO) .include "${PORTSDIR}/Mk/bsd.gecko.mk" -.endif +. endif -.if defined(USE_MYSQL) +. if defined(USE_MYSQL) USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient} -.if defined(WANT_MYSQL_VER) -.if empty(USE_MYSQL) +. if defined(WANT_MYSQL_VER) +. if empty(USE_MYSQL) USE_MYSQL:=${WANT_MYSQL_VER} -.else +. else USE_MYSQL:=${USE_MYSQL},${WANT_MYSQL_VER} -.endif -.endif +. endif +. endif USES+=mysql:${USE_MYSQL} -.endif +. endif -.if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) +. if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT) .include "${PORTSDIR}/Mk/bsd.wx.mk" -.endif +. endif -.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) +. if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) .include "${PORTSDIR}/Mk/bsd.gstreamer.mk" -.endif +. endif -.if !defined(UID) +. if !defined(UID) UID!= ${ID} -u -.endif +. endif DESTDIRNAME?= DESTDIR # setup empty variables for USES targets -.for target in sanity fetch extract patch configure build install test package stage +. for target in sanity fetch extract patch configure build install test package stage _USES_${target}?= -.endfor +. endfor # Loading features -.for f in ${USES} +. for f in ${USES} _f:= ${f:C/\:.*//} -.if !defined(${_f}_ARGS) +. if !defined(${_f}_ARGS) ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} -.endif -.endfor -.for f in ${USES} +. endif +. endfor +. for f in ${USES} .undef _usefound -.for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR} +. for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR} _usefile= ${udir}/${f:C/\:.*//}.mk -.if exists(${_usefile}) && !defined(_usefound) +. if exists(${_usefile}) && !defined(_usefound) _usefound= .include "${_usefile}" -.endif -.endfor -.if !defined(_usefound) +. endif +. endfor +. if !defined(_usefound) ERROR+= "Unknown USES=${f:C/\:.*//}" -.endif -.endfor +. endif +. endfor -.if !empty(FLAVORS) -. if ${FLAVORS:Mall} +. if !empty(FLAVORS) +. if ${FLAVORS:Mall} DEV_ERROR+= "FLAVORS cannot contain 'all', it is a reserved value" -. endif -. for f in ${FLAVORS} -. if ${f:C/[[:lower:][:digit:]_]//g} +. endif +. for f in ${FLAVORS} +. if ${f:C/[[:lower:][:digit:]_]//g} _BAD_FLAVOR_NAMES+= ${f} -. endif -. endfor -. if !empty(_BAD_FLAVOR_NAMES) +. endif +. endfor +. if !empty(_BAD_FLAVOR_NAMES) DEV_ERROR+= "FLAVORS contains flavors that are not all [a-z0-9_]: ${_BAD_FLAVOR_NAMES}" -. endif -.endif +. endif +. endif -.if !empty(FLAVOR) -. if empty(FLAVORS) +. if !empty(FLAVOR) +. if empty(FLAVORS) IGNORE= FLAVOR is defined (to ${FLAVOR}) while this port does not have FLAVORS -. elif ! ${FLAVORS:M${FLAVOR}} +. elif ! ${FLAVORS:M${FLAVOR}} IGNORE= Unknown flavor '${FLAVOR}', possible flavors: ${FLAVORS} -. endif -.endif +. endif +. endif -.if !empty(FLAVORS) && empty(FLAVOR) +. if !empty(FLAVORS) && empty(FLAVOR) FLAVOR= ${FLAVORS:[1]} -.endif +. endif # Reorder FLAVORS so the default is first if set by the port. -.if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR) +. if empty(_FLAVOR) && !empty(FLAVORS) && !empty(FLAVOR) FLAVORS:= ${FLAVOR} ${FLAVORS:N${FLAVOR}} -.endif +. endif -.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS) +. if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS) _DID_FLAVORS_HELPERS= yes _FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX _FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \ PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS \ FETCH_DEPENDS BUILD_DEPENDS LIB_DEPENDS \ RUN_DEPENDS TEST_DEPENDS # These overwrite the current value -.for v in ${_FLAVOR_HELPERS_OVERRIDE} -.if defined(${FLAVOR}_${v}) +. for v in ${_FLAVOR_HELPERS_OVERRIDE} +. if defined(${FLAVOR}_${v}) ${v}= ${${FLAVOR}_${v}} -.endif -.endfor +. endif +. endfor # These append to the current value -.for v in ${_FLAVOR_HELPERS_APPEND} -.if defined(${FLAVOR}_${v}) +. for v in ${_FLAVOR_HELPERS_APPEND} +. if defined(${FLAVOR}_${v}) ${v}+= ${${FLAVOR}_${v}} -.endif -.endfor +. endif +. endfor -.for v in BROKEN IGNORE -.if defined(${FLAVOR}_${v}) +. for v in BROKEN IGNORE +. if defined(${FLAVOR}_${v}) ${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}} -.endif -.endfor -.if defined(FLAVORS_SUB) +. endif +. endfor +. if defined(FLAVORS_SUB) PLIST_SUB+= ${FLAVORS:N${FLAVOR}:@v@${v:tu}="\@comment " NO_${v:tu}=""@} PLIST_SUB+= ${FLAVOR:tu}="" NO_${FLAVOR:tu}="@comment " SUB_LIST+= ${FLAVORS:N${FLAVOR}:@v@${v:tu}="\@comment " NO_${v:tu}=""@} SUB_LIST+= ${FLAVOR:tu}="" NO_${FLAVOR:tu}="@comment " -.endif -.endif # defined(${FLAVOR}) +. endif +. endif # defined(${FLAVOR}) EXTRACT_SUFX?= .tar.gz -.if defined(USE_LINUX_PREFIX) +. if defined(USE_LINUX_PREFIX) PREFIX= ${LINUXBASE} DATADIR?= ${PREFIX}/usr/share/${PORTNAME} DOCSDIR?= ${PREFIX}/usr/share/doc/${PORTNAME}-${PORTVERSION} NO_LICENSES_INSTALL= yes NO_MTREE= yes -.endif +. endif # You can force skipping these test by defining IGNORE_PATH_CHECKS -.if !defined(IGNORE_PATH_CHECKS) -.if ! ${PREFIX:M/*} +. if !defined(IGNORE_PATH_CHECKS) +. if ! ${PREFIX:M/*} .BEGIN: @${ECHO_MSG} "PREFIX must be defined as an absolute path so that when 'make'" @${ECHO_MSG} "is invoked in the work area PREFIX points to the right place." @${FALSE} -.endif -.endif +. endif +. endif DATADIR?= ${PREFIX}/share/${PORTNAME} DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME} ETCDIR?= ${PREFIX}/etc/${PORTNAME} EXAMPLESDIR?= ${PREFIX}/share/examples/${PORTNAME} WWWDIR?= ${PREFIX}/www/${PORTNAME} # Owner and group of the WWW user WWWOWN?= www WWWGRP?= www # Keep PKGNG_ORIGIN/WITH_PKGNG for compat with scripts which are looking for it PKG_ORIGIN?= ports-mgmt/pkg PKGNG_ORIGIN= ${PKG_ORIGIN} WITH_PKGNG?= yes WITH_PKG?= ${WITH_PKGNG} -.endif +. endif # End of pre-makefile section. # Start of post-makefile section. -.if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) +. if !defined(BEFOREPORTMK) && !defined(INOPTIONSMK) -.if defined(_POSTMKINCLUDED) +. if defined(_POSTMKINCLUDED) DEV_ERROR+= "${PKGNAME}: Makefile error: you cannot include bsd.port[.post].mk twice" @${FALSE} -.endif +. endif _POSTMKINCLUDED= yes -.if defined(BUNDLE_LIBS) +. if defined(BUNDLE_LIBS) PKG_NOTES+= no_provide_shlib PKG_NOTE_no_provide_shlib= yes -.endif +. endif -.if defined(DEPRECATED) +. if defined(DEPRECATED) PKG_NOTES+= deprecated PKG_NOTE_deprecated=${DEPRECATED} -.endif +. endif -.if defined(EXPIRATION_DATE) +. if defined(EXPIRATION_DATE) PKG_NOTES+= expiration_date PKG_NOTE_expiration_date= ${EXPIRATION_DATE} -.endif +. endif -.if !empty(FLAVOR) +. if !empty(FLAVOR) PKG_NOTES+= flavor PKG_NOTE_flavor= ${FLAVOR} -.endif +. endif TEST_ARGS?= ${MAKE_ARGS} TEST_ENV?= ${MAKE_ENV} PKG_ENV+= PORTSDIR=${PORTSDIR} CONFIGURE_ENV+= XDG_DATA_HOME=${WRKDIR} \ XDG_CONFIG_HOME=${WRKDIR} \ XDG_CACHE_HOME=${WRKDIR}/.cache \ HOME=${WRKDIR} MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ XDG_CONFIG_HOME=${WRKDIR} \ XDG_CACHE_HOME=${WRKDIR}/.cache \ HOME=${WRKDIR} # Respect TMPDIR passed via make.conf or similar and pass it down # to configure and make. -.if defined(TMPDIR) +. if defined(TMPDIR) MAKE_ENV+= TMPDIR="${TMPDIR}" CONFIGURE_ENV+= TMPDIR="${TMPDIR}" -.endif # defined(TMPDIR) +. endif # defined(TMPDIR) QA_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \ LINUXBASE=${LINUXBASE} \ LOCALBASE=${LOCALBASE} \ REWARNFILE=${REWARNFILE} \ "STRIP=${STRIP}" \ TMPPLIST=${TMPPLIST} \ CURDIR='${.CURDIR}' \ PKGMESSAGES='${_PKGMESSAGES}' \ FLAVOR=${FLAVOR} \ FLAVORS='${FLAVORS}' \ BUNDLE_LIBS=${BUNDLE_LIBS} \ LDCONFIG_DIR="${LDCONFIG_DIR}" \ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ PKGBASE=${PKGBASE} \ LICENSE="${LICENSE}" \ LICENSE_PERMS="${_LICENSE_PERMS}" \ DISABLE_LICENSES="${DISABLE_LICENSES:Dyes}" \ PORTNAME=${PORTNAME} \ NO_ARCH=${NO_ARCH} \ "NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" \ USE_RUBY=${USE_RUBY} -.if !empty(USES:Mssl) +. if !empty(USES:Mssl) QA_ENV+= USESSSL=yes -.endif -.if !empty(USES:Mdesktop-file-utils) +. endif +. if !empty(USES:Mdesktop-file-utils) QA_ENV+= USESDESKTOPFILEUTILS=yes -.endif -.if !empty(USES:Mlibtool*) +. endif +. if !empty(USES:Mlibtool*) QA_ENV+= USESLIBTOOL=yes -.endif -.if !empty(USES:Mshared-mime-info) +. endif +. if !empty(USES:Mshared-mime-info) QA_ENV+= USESSHAREDMIMEINFO=yes -.endif -.if !empty(USES:Mterminfo) +. endif +. if !empty(USES:Mterminfo) QA_ENV+= USESTERMINFO=yes -.endif +. endif CO_ENV+= STAGEDIR=${STAGEDIR} \ PREFIX=${PREFIX} \ LOCALBASE=${LOCALBASE} \ WRKDIR=${WRKDIR} \ WRKSRC=${WRKSRC} \ MTREE_FILE=${MTREE_FILE} \ TMPPLIST=${TMPPLIST} \ SCRIPTSDIR=${SCRIPTSDIR} \ PLIST_SUB_SED="${PLIST_SUB_SED}" \ PORT_OPTIONS="${PORT_OPTIONS}" \ PORTSDIR="${PORTSDIR}" -.if defined(CROSS_SYSROOT) +. if defined(CROSS_SYSROOT) PKG_ENV+= ABI_FILE=${CROSS_SYSROOT}/bin/sh MAKE_ENV+= NM=${NM} \ STRIPBIN=${STRIPBIN} \ PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" CONFIGURE_ENV+= PKG_CONFIG_SYSROOT_DIR="${CROSS_SYSROOT}" -.endif +. endif -.if empty(FLAVOR) +. if empty(FLAVOR) _WRKDIR= work -.else +. else _WRKDIR= work-${FLAVOR} -.endif +. endif WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/${_WRKDIR} BINARY_LINKDIR= ${WRKDIR}/.bin PATH:= ${BINARY_LINKDIR}:${PATH} -.if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} +. if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} MAKE_ENV+= PATH=${PATH} CONFIGURE_ENV+= PATH=${PATH} -.endif +. endif -.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) -.if defined(WRKSRC) +. if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB) && empty(USE_GITHUB:Mnodefault) +. if defined(WRKSRC) DEV_WARNING+= "You are using USE_GITHUB and WRKSRC is set which is wrong. Set GH_PROJECT correctly or set WRKSRC_SUBDIR and remove WRKSRC entirely." -.endif +. endif WRKSRC?= ${WRKDIR}/${GH_PROJECT_DEFAULT}-${GH_TAGNAME_EXTRACT} -.endif +. endif -.if !default(IGNORE_MASTER_SITE_GITLAB) && defined(USE_GITLAB) && empty(USE_GITLAB:Mnodefault) -.if defined(WRKSRC) +. if !default(IGNORE_MASTER_SITE_GITLAB) && defined(USE_GITLAB) && empty(USE_GITLAB:Mnodefault) +. if defined(WRKSRC) DEV_WARNING+= "You are using USE_GITLAB and WRKSRC is set which is wrong. Set GL_PROJECT, GL_ACCOUNT correctly, and/or set WRKSRC_SUBDIR and remove WRKSRC entirely." -.endif +. endif WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_COMMIT} -.endif +. endif # If the distname is not extracting into a specific subdirectory, have the # ports framework force extract into a subdirectory so that metadata files # do not get in the way of the build, and vice-versa. -.if defined(NO_WRKSUBDIR) +. if defined(NO_WRKSUBDIR) # Some ports have DISTNAME=PORTNAME, and USE_RC_SUBR=PORTNAME, in those case, # the rc file will conflict with WRKSRC, as WRKSRC is artificial, make it the # most unlikely to conflict as we can. WRKSRC?= ${WRKDIR}/${PKGNAME} EXTRACT_WRKDIR:= ${WRKSRC} -.else +. else WRKSRC?= ${WRKDIR}/${DISTNAME} EXTRACT_WRKDIR:= ${WRKDIR} -.endif -.if defined(WRKSRC_SUBDIR) +. endif +. if defined(WRKSRC_SUBDIR) WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR} -.endif +. endif -.if defined(CONFIGURE_OUTSOURCE) +. if defined(CONFIGURE_OUTSOURCE) CONFIGURE_CMD?= ${WRKSRC}/${CONFIGURE_SCRIPT} CONFIGURE_WRKSRC?= ${WRKDIR}/.build BUILD_WRKSRC?= ${CONFIGURE_WRKSRC} INSTALL_WRKSRC?= ${CONFIGURE_WRKSRC} TEST_WRKSRC?= ${CONFIGURE_WRKSRC} -.endif +. endif PATCH_WRKSRC?= ${WRKSRC} CONFIGURE_WRKSRC?= ${WRKSRC} BUILD_WRKSRC?= ${WRKSRC} INSTALL_WRKSRC?=${WRKSRC} TEST_WRKSRC?= ${WRKSRC} PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOCALBASE=${LOCALBASE} \ RESETPREFIX=${PREFIX} SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \ DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \ WWWDIR=${WWWDIR} ETCDIR=${ETCDIR} # This is used for check-stagedir.sh and check_leftover.sh to replace # directories/files with PLIST_SUB %%KEYS%%. # Remove VARS which values are PLIST_SUB_SED_MIN long or shorter PLIST_SUB_SED_MIN?= 2 PLIST_SUB_SED_tmp1= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g} # Remove VARS that are too generic # Remove empty values # Remove @comment values PLIST_SUB_SED_tmp2= ${PLIST_SUB_SED_tmp1:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:NRESETPREFIX=*:N*="":N*="@comment*} # Handle VARS for which there is a _regex entry PLIST_SUB_SED_tmp3?= ${PLIST_SUB_SED_tmp2:C/(${PLIST_SUB:M*_regex=*:C/_regex=.*/=.*/:Q:S/\\ /|/g:S/\\//g})//:C/(.*)_regex=(.*)/\1=\2/} # Remove quotes # Replace . with \. for later sed(1) usage PLIST_SUB_SED?= ${PLIST_SUB_SED_tmp3:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./[.]/g} # kludge to strip trailing whitespace from CFLAGS; # sub-configure will not # survive double space CFLAGS:= ${CFLAGS:C/ $//} -.if defined(WITHOUT_CPU_CFLAGS) -.if defined(_CPUCFLAGS) -.if !empty(_CPUCFLAGS) +. if defined(WITHOUT_CPU_CFLAGS) +. if defined(_CPUCFLAGS) +. if !empty(_CPUCFLAGS) CFLAGS:= ${CFLAGS:C/${_CPUCFLAGS}//} -.endif -.endif -.endif +. endif +. endif +. endif # Reset value from bsd.own.mk. -.if defined(WITH_DEBUG) -.if !defined(INSTALL_STRIPPED) +. if defined(WITH_DEBUG) +. if !defined(INSTALL_STRIPPED) STRIP= #none MAKE_ENV+= DONTSTRIP=yes STRIP_CMD= ${TRUE} -.endif +. endif DEBUG_FLAGS?= -g CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} -.if defined(INSTALL_TARGET) +. if defined(INSTALL_TARGET) INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} -.endif -.endif +. endif +. endif -.if defined(USE_LTO) +. if defined(USE_LTO) .include "${PORTSDIR}/Mk/bsd.lto.mk" -.endif +. endif -.if !defined(WITHOUT_SSP) +. if !defined(WITHOUT_SSP) .include "${PORTSDIR}/Mk/bsd.ssp.mk" -.endif +. endif # XXX PIE support to be added here MAKE_ENV+= NO_PIE=yes # We will control debug files. Don't let builds that use /usr/share/mk # split out debug symbols since the plist won't know to expect it. MAKE_ENV+= MK_DEBUG_FILES=no MAKE_ENV+= MK_KERNEL_SYMBOLS=no CONFIGURE_SHELL?= ${SH} MAKE_SHELL?= ${SH} CONFIGURE_ENV+= SHELL=${CONFIGURE_SHELL} CONFIG_SHELL=${CONFIGURE_SHELL} MAKE_ENV+= SHELL=${MAKE_SHELL} NO_LINT=YES -.if defined(PATCHFILES) && ${PATCHFILES:M*.zip} +. if defined(PATCHFILES) && ${PATCHFILES:M*.zip} PATCH_DEPENDS+= ${LOCALBASE}/bin/unzip:archivers/unzip -.endif +. endif # Check the compatibility layer for amd64 -.if ${ARCH} == "amd64" -.if exists(/usr/lib32) +. if ${ARCH} == "amd64" +. if exists(/usr/lib32) HAVE_COMPAT_IA32_LIBS?= YES -.endif -.if !defined(HAVE_COMPAT_IA32_KERN) +. endif +. if !defined(HAVE_COMPAT_IA32_KERN) HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi; echo -.if empty(HAVE_COMPAT_IA32_KERN) +. if empty(HAVE_COMPAT_IA32_KERN) .undef HAVE_COMPAT_IA32_KERN -.endif -.endif -.endif +. endif +. endif +. endif _EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN -.if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" -.if ${ARCH} == "amd64" -.if !defined(HAVE_COMPAT_IA32_KERN) +. if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" +. if ${ARCH} == "amd64" +. if !defined(HAVE_COMPAT_IA32_KERN) IGNORE= requires a kernel with compiled-in IA32 compatibility -.elif !defined(HAVE_COMPAT_IA32_LIBS) +. elif !defined(HAVE_COMPAT_IA32_LIBS) IGNORE= requires 32-bit libraries installed under /usr/lib32 -.endif +. endif _LDCONFIG_FLAGS=-32 LIB32DIR= lib32 -.else +. else IGNORE= requires i386 (or compatible) platform to run -.endif -.else +. endif +. else LIB32DIR= lib -.endif +. endif PLIST_SUB+= LIB32DIR=${LIB32DIR} -.if ${WITH_PKG} == devel +. if ${WITH_PKG} == devel PKG_ORIGIN= ports-mgmt/pkg-devel -.endif +. endif -.if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) +. if !defined(PKG_DEPENDS) && !defined(CLEAN_FETCH_ENV) PKG_DEPENDS+= ${LOCALBASE}/sbin/pkg:${PKG_ORIGIN} -.endif +. endif -.if defined(USE_GCC) +. if defined(USE_GCC) .include "${PORTSDIR}/Mk/bsd.gcc.mk" -.endif +. endif -.if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld +. if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld LDFLAGS+= -fuse-ld=bfd BINARY_ALIAS+= ld=${LD} -. if !defined(USE_BINUTILS) -. if exists(/usr/bin/ld.bfd) +. if !defined(USE_BINUTILS) +. if exists(/usr/bin/ld.bfd) LD= /usr/bin/ld.bfd CONFIGURE_ENV+= LD=${LD} MAKE_ENV+= LD=${LD} -. else +. else USE_BINUTILS= yes +. endif +. endif . endif -. endif -.endif -.if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) +. if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS) BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \ READELF SIZE STRINGS BINUTILS_NO_MAKE_ENV?= -. for b in ${BINUTILS} +. for b in ${BINUTILS} ${b}= ${LOCALBASE}/bin/${b:C/PP/++/:tl} -. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) +. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE) CONFIGURE_ENV+= ${b}="${${b}}" -. endif -. if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" +. endif +. if ${BINUTILS_NO_MAKE_ENV:M${b}} == "" MAKE_ENV+= ${b}="${${b}}" -. endif -. endfor -.endif +. endif +. endfor +. endif -.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) +. if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) .include "${PORTSDIR}/Mk/bsd.ldap.mk" -.endif +. endif -.if defined(USE_RC_SUBR) +. if defined(USE_RC_SUBR) SUB_FILES+= ${USE_RC_SUBR} -.endif +. endif -.if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" +. if defined(USE_LDCONFIG) && ${USE_LDCONFIG:tl} == "yes" USE_LDCONFIG= ${PREFIX}/lib -.endif -.if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" +. endif +. if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:tl} == "yes" IGNORE= has USE_LDCONFIG32 set to yes, which is not correct -.endif +. endif -.if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) -.if defined(USE_LINUX_PREFIX) +. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) +. if defined(USE_LINUX_PREFIX) PLIST_FILES+= "@ldconfig-linux ${LINUXBASE}" -.else +. else PLIST_FILES+= "@ldconfig" -.endif -.endif +. endif +. endif PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' -.if defined(_DESTDIR_VIA_ENV) +. if defined(_DESTDIR_VIA_ENV) MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} -.else +. else MAKE_ARGS+= ${DESTDIRNAME}=${STAGEDIR} -.endif +. endif -.if defined(NO_PREFIX_RMDIR) +. if defined(NO_PREFIX_RMDIR) CO_ENV+= NO_PREFIX_RMDIR=1 -.else +. else CO_ENV+= NO_PREFIX_RMDIR=0 -.endif +. endif METADIR= ${WRKDIR}/.metadir PKGPREINSTALL?= ${PKGDIR}/pkg-pre-install PKGPOSTINSTALL?= ${PKGDIR}/pkg-post-install PKGPREDEINSTALL?= ${PKGDIR}/pkg-pre-deinstall PKGPOSTDEINSTALL?= ${PKGDIR}/pkg-post-deinstall _FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \ fonts.dir fonts.scale gtk-update-icon-cache \ gtk-query-immodules \ ldconfig \ load-octave-pkg \ ocamlfind \ update-desktop-database update-mime-database \ catalog.ports \ ccache-update-links -.if defined(USE_LOCAL_MK) +. if defined(USE_LOCAL_MK) .include "${PORTSDIR}/Mk/bsd.local.mk" -.endif -.for odir in ${OVERLAYS} +. endif +. for odir in ${OVERLAYS} .sinclude "${odir}/Mk/bsd.overlay.mk" -.endfor +. endfor -.if defined(USE_GSTREAMER1) +. if defined(USE_GSTREAMER1) .include "${PORTSDIR}/Mk/bsd.gstreamer.mk" -.endif +. endif -.if defined(USE_JAVA) +. if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" -.endif +. endif -.if defined(USE_OCAML) +. if defined(USE_OCAML) .include "${PORTSDIR}/Mk/bsd.ocaml.mk" -.endif +. endif -.if defined(USE_WX) || defined(USE_WX_NOT) +. if defined(USE_WX) || defined(USE_WX_NOT) .include "${PORTSDIR}/Mk/bsd.wx.mk" -.endif +. endif -.if defined(USE_GECKO) +. if defined(USE_GECKO) .include "${PORTSDIR}/Mk/bsd.gecko.mk" -.endif +. endif -.if exists(${PORTSDIR}/Makefile.inc) +. if exists(${PORTSDIR}/Makefile.inc) .include "${PORTSDIR}/Makefile.inc" USE_SUBMAKE= yes -.endif +. endif # Loading features -.for f in ${_USES_POST} +. for f in ${_USES_POST} _f:= ${f:C/\:.*//} -.if !defined(${_f}_ARGS) +. if !defined(${_f}_ARGS) ${_f}_ARGS:= ${f:C/^[^\:]*(\:|\$)//:S/,/ /g} -.endif -.endfor -.for f in ${_USES_POST} +. endif +. endfor +. for f in ${_USES_POST} .undef _usefound -.for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR} +. for udir in ${OVERLAYS:C,$,/Mk/Uses,} ${USESDIR} _usefile= ${udir}/${f:C/\:.*//}.mk -.if exists(${_usefile}) && !defined(_usefound) +. if exists(${_usefile}) && !defined(_usefound) _usefound= .include "${_usefile}" -.endif -.endfor -.if !defined(_usefound) +. endif +. endfor +. if !defined(_usefound) ERROR+= "Unknown USES=${f:C/\:.*//}" -.endif -.endfor +. endif +. endfor -.if defined(PORTNAME) +. if defined(PORTNAME) .include "${PORTSDIR}/Mk/bsd.sanity.mk" -.endif +. endif -.if defined(USE_LOCALE) +. if defined(USE_LOCALE) CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} -.endif +. endif # Macro for doing in-place file editing using regexps. REINPLACE_ARGS may only # be used to set or override the -i argument. Any other use is considered # invalid. REINPLACE_ARGS?= -i.bak -.if defined(DEVELOPER) +. if defined(DEVELOPER) REINPLACE_CMD?= ${SETENV} WRKSRC=${WRKSRC} REWARNFILE=${REWARNFILE} ${SH} ${SCRIPTSDIR}/sed_checked.sh -.else +. else REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} -.endif +. endif FRAMEWORK_REINPLACE_CMD?= ${SED} -i.bak # Names of cookies used to skip already completed stages EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} INSTALL_COOKIE?= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g} BUILD_COOKIE?= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g} PATCH_COOKIE?= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g} PACKAGE_COOKIE?= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g} STAGE_COOKIE?= ${WRKDIR}/.stage_done.${PORTNAME}.${PREFIX:S/\//_/g} # How to do nothing. Override if you, for some strange reason, would rather # do something. # In general, however, DO_NADA is a relic of the past in the ports # infrastructure, and most of its usage has been removed. If you need to define # a target with DO_NADA, then there is a high chance that the ports # infrastructure should be fixed instead. DO_NADA?= ${TRUE} # Use this as the first operand to always build dependency. NONEXISTENT?= /nonexistent CHECKSUM_ALGORITHMS?= sha256 DISTINFO_FILE?= ${MASTERDIR}/distinfo MAKE_FLAGS?= -f MAKEFILE?= Makefile MAKE_CMD?= ${BSDMAKE} MAKE_ENV+= PREFIX=${PREFIX} \ LOCALBASE=${LOCALBASE} \ CC="${CC}" CFLAGS="${CFLAGS}" \ CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ MANPREFIX="${MANPREFIX}" # Add -fno-strict-aliasing to CFLAGS with optimization level -O2 or higher. # gcc 4.x enable strict aliasing optimization with -O2 which is known to break # a lot of ports. -.if !defined(WITHOUT_NO_STRICT_ALIASING) -.if ${CC} != "icc" -.if empty(CFLAGS:M-fno-strict-aliasing) +. if !defined(WITHOUT_NO_STRICT_ALIASING) +. if ${CC} != "icc" +. if empty(CFLAGS:M-fno-strict-aliasing) CFLAGS+= -fno-strict-aliasing -.endif -.endif -.endif +. endif +. endif +. endif -.for lang in C CXX -.if defined(USE_${lang}STD) +. for lang in C CXX +. if defined(USE_${lang}STD) ${lang}FLAGS:= ${${lang}FLAGS:N-std=*} -std=${USE_${lang}STD} -.endif +. endif ${lang}FLAGS+= ${${lang}FLAGS_${ARCH}} -.endfor +. endfor LDFLAGS+= ${LDFLAGS_${ARCH}} # Multiple make jobs support -.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) +. if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) _MAKE_JOBS?= # MAKE_JOBS_NUMBER= 1 -.else -.if defined(MAKE_JOBS_NUMBER) +. else +. if defined(MAKE_JOBS_NUMBER) _MAKE_JOBS_NUMBER:= ${MAKE_JOBS_NUMBER} -.else -.if !defined(_SMP_CPUS) +. else +. if !defined(_SMP_CPUS) _SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus -.endif +. endif _EXPORTED_VARS+= _SMP_CPUS _MAKE_JOBS_NUMBER= ${_SMP_CPUS} -.endif -.if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) +. endif +. if defined(MAKE_JOBS_NUMBER_LIMIT) && ( ${MAKE_JOBS_NUMBER_LIMIT} < ${_MAKE_JOBS_NUMBER} ) MAKE_JOBS_NUMBER= ${MAKE_JOBS_NUMBER_LIMIT} -.else +. else MAKE_JOBS_NUMBER= ${_MAKE_JOBS_NUMBER} -.endif +. endif _MAKE_JOBS?= -j${MAKE_JOBS_NUMBER} BUILD_FAIL_MESSAGE+= Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. -.endif +. endif .include "${PORTSDIR}/Mk/bsd.ccache.mk" -.if !make(makesum) +. if !make(makesum) FETCH_ENV?= SSL_NO_VERIFY_PEER=1 SSL_NO_VERIFY_HOSTNAME=1 -.endif +. endif FETCH_BINARY?= /usr/bin/fetch FETCH_ARGS?= -Fpr FETCH_REGET?= 1 FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} -.if defined(RANDOMIZE_MASTER_SITES) -.if exists(/usr/games/random) +. if defined(RANDOMIZE_MASTER_SITES) +. if exists(/usr/games/random) RANDOM_CMD?= /usr/games/random -.elif exists(/usr/bin/random) +. elif exists(/usr/bin/random) RANDOM_CMD?= /usr/bin/random -.endif -.if defined(RANDOM_CMD) && !empty(RANDOM_CMD) +. endif +. if defined(RANDOM_CMD) && !empty(RANDOM_CMD) RANDOM_ARGS?= -w -f - _RANDOMIZE_SITES= ${RANDOM_CMD} ${RANDOM_ARGS} -.endif -.endif +. endif +. endif TOUCH?= /usr/bin/touch TOUCH_FLAGS?= -f DISTORIG?= .bak.orig PATCH?= /usr/bin/patch PATCH_STRIP?= -p0 PATCH_DIST_STRIP?= -p0 -.if defined(PATCH_DEBUG) +. if defined(PATCH_DEBUG) PATCH_DEBUG_TMP= yes PATCH_ARGS?= --forward -E ${PATCH_STRIP} PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward -E ${PATCH_DIST_STRIP} -.else +. else PATCH_ARGS?= --forward --quiet -E ${PATCH_STRIP} PATCH_DIST_ARGS?= --suffix ${DISTORIG} --forward --quiet -E ${PATCH_DIST_STRIP} -.endif -.if !defined(QUIET) +. endif +. if !defined(QUIET) PATCH_SILENT= PATCH_SILENT=yes -.endif -.if defined(BATCH) +. endif +. if defined(BATCH) PATCH_ARGS+= --batch PATCH_DIST_ARGS+= --batch -.endif +. endif # Prevent breakage with VERSION_CONTROL=numbered PATCH_ARGS+= -V simple PATCH_DIST_ARGS+= -V simple -.if defined(PATCH_CHECK_ONLY) +. if defined(PATCH_CHECK_ONLY) PATCH_ARGS+= -C PATCH_DIST_ARGS+= -C -.endif +. endif -.if ${PATCH} == "/usr/bin/patch" +. if ${PATCH} == "/usr/bin/patch" PATCH_ARGS+= --suffix .orig PATCH_DIST_ARGS+= --suffix .orig -.endif +. endif TAR?= /usr/bin/tar # EXTRACT_SUFX is defined in .pre.mk section EXTRACT_CMD?= ${TAR} EXTRACT_BEFORE_ARGS?= -xf EXTRACT_AFTER_ARGS?= --no-same-owner --no-same-permissions # Figure out where the local mtree file is -.if !defined(MTREE_FILE) && !defined(NO_MTREE) -.if ${PREFIX} == /usr +. if !defined(MTREE_FILE) && !defined(NO_MTREE) +. if ${PREFIX} == /usr MTREE_FILE= /etc/mtree/BSD.usr.dist -.else +. else MTREE_FILE= ${PORTSDIR}/Templates/BSD.local.dist -.endif -.endif +. endif +. endif MTREE_CMD?= /usr/sbin/mtree MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p _SHAREMODE?= 0644 # A few aliases for *-install targets INSTALL_PROGRAM= ${INSTALL} ${COPY} ${STRIP} -m ${BINMODE} INSTALL_KLD= ${INSTALL} ${COPY} -m ${BINMODE} INSTALL_LIB= ${INSTALL} ${COPY} ${STRIP} -m ${_SHAREMODE} INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE} INSTALL_DATA= ${INSTALL} ${COPY} -m ${_SHAREMODE} INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE} INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ BSD_INSTALL_LIB="${INSTALL_LIB}" \ BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ BSD_INSTALL_DATA="${INSTALL_DATA}" \ BSD_INSTALL_MAN="${INSTALL_MAN}" MAKE_ENV+= ${INSTALL_MACROS} SCRIPTS_ENV+= ${INSTALL_MACROS} # Macro for copying entire directory tree with correct permissions # In the -exec shell commands, we add add a . as the first argument, it would # end up being $0 aka the script name, which is not part of $@, so we force it # to be able to use $@ directly. COPYTREE_BIN= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ ${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ -o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${BINMODE} "$$@"'\'' . {} + \)' COPYTREE_BIN COPYTREE_SHARE= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2>&1) && \ ${FIND} -Ed $$1 $$3 \( -type d -exec ${SH} -c '\''cd '\''$$2'\'' && chmod 755 "$$@"'\'' . {} + \ -o -type f -exec ${SH} -c '\''cd '\''$$2'\'' && chmod ${_SHAREMODE} "$$@"'\'' . {} + \)' COPYTREE_SHARE # The user can override the NO_PACKAGE by specifying this from # the make command line -.if defined(FORCE_PACKAGE) +. if defined(FORCE_PACKAGE) .undef NO_PACKAGE -.endif +. endif DESCR?= ${PKGDIR}/pkg-descr PLIST?= ${PKGDIR}/pkg-plist PKGHELP?= ${PKGDIR}/pkg-help PKGINSTALL?= ${PKGDIR}/pkg-install PKGDEINSTALL?= ${PKGDIR}/pkg-deinstall PKGMESSAGE?= ${PKGDIR}/pkg-message _PKGMESSAGES+= ${PKGMESSAGE} TMPPLIST?= ${WRKDIR}/.PLIST.mktmp # backward compatibility for users -.if defined(_PKG_TRANSITIONING_TO_NEW_EXT) -.if defined(PKG_NOCOMPRESS) +. if defined(_PKG_TRANSITIONING_TO_NEW_EXT) +. if defined(PKG_NOCOMPRESS) PKG_SUFX?= .tar -.else +. else PKG_SUFX?= .txz -.endif +. endif PKG_COMPRESSION_FORMAT?= ${PKG_SUFX:S/.//} -.else -.if defined(PKG_SUFX) +. else +. if defined(PKG_SUFX) PKG_COMPRESSION_FORMAT?= ${PKG_SUFX:S/.//} WARNING+= "PKG_SUFX is defined, it should be replaced with PKG_COMPRESSION_FORMAT" -.endif +. endif PKG_SUFX= .pkg -.endif -.if defined(PKG_NOCOMPRESS) +. endif +. if defined(PKG_NOCOMPRESS) PKG_COMPRESSION_FORMAT?= tar -.else +. else #.if ${OSVERSION} > 1400000 #PKG_COMPRESSION_FORMAT?= tzst #.else PKG_COMPRESSION_FORMAT?= txz #.endif -.endif +. endif # where pkg(8) stores its data PKG_DBDIR?= /var/db/pkg ALL_TARGET?= all INSTALL_TARGET?= install INSTALL_TARGET+= ${LATE_INSTALL_ARGS} # Integrate with the license auditing framework -.if !defined (DISABLE_LICENSES) +. if !defined (DISABLE_LICENSES) .include "${PORTSDIR}/Mk/bsd.licenses.mk" -.endif +. endif # Popular master sites .include "${PORTSDIR}/Mk/bsd.sites.mk" # Empty declaration to avoid "variable MASTER_SITES recursive" error MASTER_SITES?= PATCH_SITES?= _MASTER_SITES_DEFAULT?= _PATCH_SITES_DEFAULT?= # Feed internal _{MASTER,PATCH}_SITES_n where n is a group designation # as per grouping rules (:something) # Organize _{MASTER,PATCH}_SITES_{DEFAULT,[^/:]+} according to grouping # rules (:something) -.for _S in ${MASTER_SITES} +. for _S in ${MASTER_SITES} _S_TEMP= ${_S:S/^${_S:C@/?:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} +. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} check-makevars:: @${ECHO_MSG} "The ${_S} MASTER_SITES line has" @${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" @${FALSE} -. endif -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. endif +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITES" @${FALSE} -. endif +. endif _MASTER_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endfor -. else +. endfor +. else _MASTER_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endif -.endfor -.for _S in ${PATCH_SITES} +. endif +. endfor +. for _S in ${PATCH_SITES} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} +. if ${_G_TEMP:C/[a-zA-Z0-9_]//g} check-makevars:: @${ECHO_MSG} "The ${_S} PATCH_SITES line has" @${ECHO_MSG} "a group with invalid characters, only use [a-zA-Z0-9_]" @${FALSE} -. endif -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. endif +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "The words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITES" @${FALSE} -. endif +. endif _PATCH_SITES_${_group}+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endfor -. else +. endfor +. else _PATCH_SITES_DEFAULT+= ${_S:C@^(.*/):[^/:]+$@\1@} -. endif -.endfor +. endif +. endfor # Feed internal _{MASTER,PATCH}_SITE_SUBDIR_n where n is a group designation # as per grouping rules (:something) # Organize _{MASTER,PATCH}_SITE_SUBDIR_{DEFAULT,[^/:]+} according to grouping # rules (:something) -.for _S in ${MASTER_SITE_SUBDIR} +. for _S in ${MASTER_SITE_SUBDIR} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your MASTER_SITE_SUBDIR" @${FALSE} -. endif -. if defined(_MASTER_SITES_${_group}) +. endif +. if defined(_MASTER_SITES_${_group}) _MASTER_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endfor -. else -. if defined(_MASTER_SITES_DEFAULT) +. endif +. endfor +. else +. if defined(_MASTER_SITES_DEFAULT) _MASTER_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endif -.endfor -.for _S in ${PATCH_SITE_SUBDIR} +. endif +. endif +. endfor +. for _S in ${PATCH_SITE_SUBDIR} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} _G_TEMP= ${_group} -. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default +. if ${_G_TEMP} == all || ${_G_TEMP} == ALL || ${_G_TEMP} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your PATCH_SITE_SUBDIR" @${FALSE} -. endif -. if defined(_PATCH_SITES_${_group}) +. endif +. if defined(_PATCH_SITES_${_group}) _PATCH_SITE_SUBDIR_${_group}+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endfor -. else -. if defined(_PATCH_SITES_DEFAULT) +. endif +. endfor +. else +. if defined(_PATCH_SITES_DEFAULT) _PATCH_SITE_SUBDIR_DEFAULT+= ${_S:C@^(.*)/:[^/:]+$@\1@} -. endif -. endif -.endfor +. endif +. endif +. endfor # Substitute subdirectory names # XXX simpler/faster solution but not the best space wise, suggestions please -.for _S in ${MASTER_SITES} +. for _S in ${MASTER_SITES} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -. if !defined(_MASTER_SITE_SUBDIR_${_group}) +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} +. if !defined(_MASTER_SITE_SUBDIR_${_group}) MASTER_SITES_TMP= ${_MASTER_SITES_${_group}:S^%SUBDIR%/^^} -. else +. else _S_TEMP_TEMP= ${_MASTER_SITES_${_group}:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) MASTER_SITES_TMP= ${_MASTER_SITES_${_group}} -. else +. else MASTER_SITES_TMP= -. for site in ${_MASTER_SITES_${_group}} +. for site in ${_MASTER_SITES_${_group}} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) MASTER_SITES_TMP+= ${site} -. else -. for dir in ${_MASTER_SITE_SUBDIR_${_group}} +. else +. for dir in ${_MASTER_SITE_SUBDIR_${_group}} MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -. endif +. endfor +. endif +. endfor +. endif +. endif _MASTER_SITES_${_group}:= ${MASTER_SITES_TMP} -. endfor -. endif -.endfor -.if defined(_MASTER_SITE_SUBDIR_DEFAULT) +. endfor +. endif +. endfor +. if defined(_MASTER_SITE_SUBDIR_DEFAULT) _S_TEMP= ${_MASTER_SITES_DEFAULT:M*%SUBDIR%/*} -. if empty(_S_TEMP) +. if empty(_S_TEMP) MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT} -. else +. else MASTER_SITES_TMP= -. for site in ${_MASTER_SITES_DEFAULT} +. for site in ${_MASTER_SITES_DEFAULT} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) MASTER_SITES_TMP+= ${site} -. else -. for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} +. else +. for dir in ${_MASTER_SITE_SUBDIR_DEFAULT} MASTER_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -.else +. endfor +. endif +. endfor +. endif +. else MASTER_SITES_TMP= ${_MASTER_SITES_DEFAULT:S^%SUBDIR%/^^} -.endif +. endif _MASTER_SITES_DEFAULT:= ${MASTER_SITES_TMP} MASTER_SITES_TMP= -.for _S in ${PATCH_SITES} +. for _S in ${PATCH_SITES} _S_TEMP= ${_S:S/^${_S:C@/:[^/:]+$@/@}//:S/^://} -. if !empty(_S_TEMP) -. for _group in ${_S_TEMP:S/,/ /g} -. if !defined(_PATCH_SITE_SUBDIR_${_group}) +. if !empty(_S_TEMP) +. for _group in ${_S_TEMP:S/,/ /g} +. if !defined(_PATCH_SITE_SUBDIR_${_group}) PATCH_SITES_TMP= ${_PATCH_SITES_${_group}:S^%SUBDIR%/^^} -. else +. else _S_TEMP_TEMP= ${_PATCH_SITES_${_group}:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) PATCH_SITES_TMP= ${_PATCH_SITES_${_group}} -. else +. else PATCH_SITES_TMP= -. for site in ${_PATCH_SITES_${_group}} +. for site in ${_PATCH_SITES_${_group}} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) PATCH_SITES_TMP+= ${site} -. else -. for dir in ${_PATCH_SITE_SUBDIR_${_group}} +. else +. for dir in ${_PATCH_SITE_SUBDIR_${_group}} PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -. endif +. endfor +. endif +. endfor +. endif +. endif _PATCH_SITES_${_group}:= ${PATCH_SITES_TMP} -. endfor -. endif -.endfor -.if defined(_PATCH_SITE_SUBDIR_DEFAULT) +. endfor +. endif +. endfor +. if defined(_PATCH_SITE_SUBDIR_DEFAULT) _S_TEMP= ${_PATCH_SITES_DEFAULT:M*%SUBDIR%/*} -. if empty(_S_TEMP) +. if empty(_S_TEMP) PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT} -. else +. else PATCH_SITES_TMP= -. for site in ${_PATCH_SITES_DEFAULT} +. for site in ${_PATCH_SITES_DEFAULT} _S_TEMP_TEMP= ${site:M*%SUBDIR%/*} -. if empty(_S_TEMP_TEMP) +. if empty(_S_TEMP_TEMP) PATCH_SITES_TMP+= ${site} -. else -. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} +. else +. for dir in ${_PATCH_SITE_SUBDIR_DEFAULT} PATCH_SITES_TMP+= ${site:S^%SUBDIR%^\${dir}^} -. endfor -. endif -. endfor -. endif -.else +. endfor +. endif +. endfor +. endif +. else PATCH_SITES_TMP= ${_PATCH_SITES_DEFAULT:S^%SUBDIR%/^^} -.endif +. endif _PATCH_SITES_DEFAULT:= ${PATCH_SITES_TMP} PATCH_SITES_TMP= # The primary backup site. MASTER_SITE_BACKUP?= \ http://distcache.FreeBSD.org/ports-distfiles/${DIST_SUBDIR}/ MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^} # If the user has MASTER_SITE_FREEBSD set, go to the FreeBSD repository # for everything, but don't search it twice by appending it to the end. -.if defined(MASTER_SITE_FREEBSD) +. if defined(MASTER_SITE_FREEBSD) _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_BACKUP} _MASTER_SITE_BACKUP:= # empty -.else +. else _MASTER_SITE_OVERRIDE= ${MASTER_SITE_OVERRIDE} _MASTER_SITE_BACKUP= ${MASTER_SITE_BACKUP} -.endif +. endif # Organize DISTFILES, PATCHFILES, _MASTER_SITES_ALL, _PATCH_SITES_ALL # according to grouping rules (:something) DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} _MASTER_SITES_ALL= ${_MASTER_SITES_DEFAULT} _PATCH_SITES_ALL= ${_PATCH_SITES_DEFAULT} _G_TEMP= DEFAULT -.for _D in ${DISTFILES} +. for _D in ${DISTFILES} _D_TEMP= ${_D:S/^${_D:C/:[^:]+$//}//} -. if !empty(_D_TEMP) -. for _group in ${_D_TEMP:S/^://:S/,/ /g} -. if !defined(_MASTER_SITES_${_group}) +. if !empty(_D_TEMP) +. for _group in ${_D_TEMP:S/^://:S/,/ /g} +. if !defined(_MASTER_SITES_${_group}) _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} -. if empty(_G_TEMP_TEMP) +. if empty(_G_TEMP_TEMP) _G_TEMP+= ${_group} _MASTER_SITES_ALL+= ${_MASTER_SITES_${_group}} -. endif -. endif -. endfor +. endif +. endif +. endfor _DISTFILES+= ${_D:C/:[^:]+$//} -. else +. else _DISTFILES+= ${_D} -. endif -.endfor +. endif +. endfor _G_TEMP= DEFAULT -.for _P in ${PATCHFILES} +. for _P in ${PATCHFILES} _P_TEMP= ${_P:C/:[^-:][^:]*$//} _P_groups= ${_P:S/^${_P:C/:[^:]+$//}//:S/^://} _P_file= ${_P_TEMP:C/:-[^:]+$//} _P_strip= ${_P_TEMP:S/^${_P_TEMP:C/:-[^:]*$//}//:S/^://} -. if !empty(_P_groups) -. for _group in ${_P_groups:S/,/ /g} -. if !defined(_PATCH_SITES_${_group}) +. if !empty(_P_groups) +. for _group in ${_P_groups:S/,/ /g} +. if !defined(_PATCH_SITES_${_group}) _G_TEMP_TEMP= ${_G_TEMP:M/${_group}/} -. if empty(_G_TEMP_TEMP) +. if empty(_G_TEMP_TEMP) _G_TEMP+= ${_group} _PATCH_SITES_ALL+= ${_PATCH_SITES_${_group}} -. endif -. endif -. endfor -. endif +. endif +. endif +. endfor +. endif _PATCHFILES:= ${_PATCHFILES} ${_P_file} -. if empty(_P_strip) +. if empty(_P_strip) _PATCHFILES2:= ${_PATCHFILES2} ${_P_file} -. else +. else _PATCHFILES2:= ${_PATCHFILES2} ${_P_file}:${_P_strip} -. endif -.endfor +. endif +. endfor _P_groups= _P_file= _P_strip= _G_TEMP= _G_TEMP_TEMP= ALLFILES?= ${_DISTFILES} ${_PATCHFILES} # # Sort the master site list according to the patterns in MASTER_SORT # MASTER_SORT?= MASTER_SORT_REGEX?= MASTER_SORT_REGEX+= ${MASTER_SORT:S|.|\\.|g:S|^|://[^/]*|:S|$|/|} MASTER_SORT_AWK= BEGIN { RS = " "; ORS = " "; IGNORECASE = 1 ; gl = "${MASTER_SORT_REGEX:S|\\|\\\\|g}"; } -.for srt in ${MASTER_SORT_REGEX} +. for srt in ${MASTER_SORT_REGEX} MASTER_SORT_AWK+= /${srt:S|/|\\/|g}/ { good["${srt:S|\\|\\\\|g}"] = good["${srt:S|\\|\\\\|g}"] " " $$0 ; next; } -.endfor +. endfor MASTER_SORT_AWK+= { rest = rest " " $$0; } END { n=split(gl, gla); for(i=1;i<=n;i++) { print good[gla[i]]; } print rest; } # # Hackery to enable simple fetch targets with several dynamic MASTER_SITES # _MASTER_SITES_ENV= _MASTER_SITES_DEFAULT=${_MASTER_SITES_DEFAULT:Q} -.for _F in ${DISTFILES} +. for _F in ${DISTFILES} _F_TEMP= ${_F:S/^${_F:C/:[^:]+$//}//:S/^://} -. if !empty(_F_TEMP) -. for _group in ${_F_TEMP:S/,/ /g} -. if defined(_MASTER_SITES_${_group}) +. if !empty(_F_TEMP) +. for _group in ${_F_TEMP:S/,/ /g} +. if defined(_MASTER_SITES_${_group}) _MASTER_SITES_ENV+= _MASTER_SITES_${_group}=${_MASTER_SITES_${_group}:Q} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor _PATCH_SITES_ENV= _PATCH_SITES_DEFAULT=${_PATCH_SITES_DEFAULT:Q} -.for _F in ${PATCHFILES} +. for _F in ${PATCHFILES} _F_TEMP= ${_F:S/^${_F:C/:[^-:][^:]*$//}//:S/^://} -. if !empty(_F_TEMP) -. for _group in ${_F_TEMP:S/,/ /g} -. if defined(_PATCH_SITES_${_group}) +. if !empty(_F_TEMP) +. for _group in ${_F_TEMP:S/,/ /g} +. if defined(_PATCH_SITES_${_group}) _PATCH_SITES_ENV+= _PATCH_SITES_${_group}=${_PATCH_SITES_${_group}:Q} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor CKSUMFILES= ${ALLFILES} # List of all files, with ${DIST_SUBDIR} in front. Used for checksum. -.if defined(DIST_SUBDIR) -.if defined(CKSUMFILES) && ${CKSUMFILES}!="" +. if defined(DIST_SUBDIR) +. if defined(CKSUMFILES) && ${CKSUMFILES}!="" _CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//} -.endif -.else +. endif +. else _CKSUMFILES?= ${CKSUMFILES} -.endif +. endif # This is what is actually going to be extracted, and is overridable # by user. EXTRACT_ONLY?= ${_DISTFILES} -.if !target(maintainer) +. if !target(maintainer) maintainer: @${ECHO_CMD} "${MAINTAINER}" -.endif +. endif -.if !defined(CATEGORIES) +. if !defined(CATEGORIES) check-categories: @${ECHO_MSG} "${PKGNAME}: Makefile error: CATEGORIES is mandatory." @${FALSE} -.else +. else VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ benchmarks biology cad chinese comms converters \ databases deskutils devel dns docs \ editors education elisp emulators enlightenment finance french ftp \ games geography german gnome gnustep graphics \ hamradio haskell hebrew hungarian irc japanese java \ kde ${_KDE_CATEGORIES_SUPPORTED} kld korean \ lang linux lisp \ mail mate math mbone misc multimedia \ net net-im net-mgmt net-p2p net-vpn news \ parallel pear perl5 plan9 polish ports-mgmt portuguese \ print python ruby rubygems russian \ scheme science security shells spanish sysutils \ tcl textproc tk \ ukrainian vietnamese wayland windowmaker www \ x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes \ x11-toolkits x11-wm xfce zope base check-categories: -.for cat in ${CATEGORIES} -. if empty(VALID_CATEGORIES:M${cat}) +. for cat in ${CATEGORIES} +. if empty(VALID_CATEGORIES:M${cat}) @${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ ${FALSE}; -. endif -.endfor -.endif +. endif +. endfor +. endif PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} -.if exists(${PACKAGES}) +. if exists(${PACKAGES}) PACKAGES:= ${PACKAGES:S/:/\:/g} _HAVE_PACKAGES= yes PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} PKGOLDFILE?= ${PKGREPOSITORY}/${PKGNAME}.${PKG_COMPRESSION_FORMAT} -.else +. else PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} -.endif +. endif WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} # The "latest version" link -- ${PKGNAME} minus everthing after the last '-' PKGLATESTREPOSITORY?= ${PACKAGES}/Latest PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX} PKGLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} PKGOLDLATESTFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}.${PKG_COMPRESSION_FORMAT} # Temporary workaround to be deleted once every supported version of FreeBSD # have a bootstrap which handles the pkg extension. PKGOLDSIGFILE= ${PKGLATESTREPOSITORY}/${PKGBASE}.${PKG_COMPRESSION_FORMAT}.sig CONFIGURE_SCRIPT?= configure CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} CONFIGURE_TARGET?= ${HOSTARCH}-portbld-${OPSYS:tl}${OSREL} CONFIGURE_TARGET:= ${CONFIGURE_TARGET:S/--build=//} CONFIGURE_LOG?= config.log # A default message to print if do-configure fails. CONFIGURE_FAIL_MESSAGE?= "Please report the problem to ${MAINTAINER} [maintainer] and attach the \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a ${PKG_INFO} -Ea)." CONFIG_SITE?= ${PORTSDIR}/Templates/config.site -.if defined(GNU_CONFIGURE) +. if defined(GNU_CONFIGURE) # Maximum command line length -.if !defined(CONFIGURE_MAX_CMD_LEN) +. if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax -.endif +. endif _EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN GNU_CONFIGURE_PREFIX?= ${PREFIX} GNU_CONFIGURE_MANPREFIX?= ${MANPREFIX} CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} -.if defined(CROSS_TOOLCHAIN) +. if defined(CROSS_TOOLCHAIN) CROSS_HOST= ${ARCH:S/amd64/x86_64/}-unknown-${OPSYS:tl}${OSREL} CONFIGURE_ARGS+= --host=${CROSS_HOST} -.endif +. endif CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} HAS_CONFIGURE= yes SET_LATE_CONFIGURE_ARGS= \ _LATE_CONFIGURE_ARGS="" ; \ if [ -z "${CONFIGURE_ARGS:M--localstatedir=*:Q}" ] && \ ${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- --localstatedir > /dev/null; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --localstatedir=/var" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--mandir'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --mandir=${GNU_CONFIGURE_MANPREFIX}/man" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--disable-silent-rules'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --disable-silent-rules" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--enable-jobserver\[.*\#\]'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --enable-jobserver=${MAKE_JOBS_NUMBER}" ; \ fi ; \ if [ ! -z "`${CONFIGURE_CMD} --help 2>&1 | ${GREP} -- '--infodir'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --infodir=${GNU_CONFIGURE_PREFIX}/${INFO_PATH}/${INFO_SUBDIR}" ; \ fi ; \ if [ -z "`${CONFIGURE_CMD} --version 2>&1 | ${EGREP} -i '(autoconf.*2\.13|Unrecognized option)'`" ]; then \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --build=${CONFIGURE_TARGET}" ; \ else \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} ${CONFIGURE_TARGET}" ; \ fi ; -.endif +. endif # Passed to most of script invocations SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} -.if defined(BATCH) +. if defined(BATCH) SCRIPTS_ENV+= BATCH=yes -.endif +. endif -.if ${PREFIX} == /usr +. if ${PREFIX} == /usr MANPREFIX?= /usr/share -.else +. else MANPREFIX?= ${PREFIX} MANDIRS+= ${PREFIX}/share/man -.endif +. endif MANDIRS+= ${MANPREFIX}/man -.for sect in 1 2 3 4 5 6 7 8 9 +. for sect in 1 2 3 4 5 6 7 8 9 MAN${sect}PREFIX?= ${MANPREFIX} -.endfor +. endfor MANLPREFIX?= ${MANPREFIX} MANNPREFIX?= ${MANPREFIX} INFO_PATH?= share/info -.if defined(INFO) +. if defined(INFO) RUN_DEPENDS+= indexinfo:print/indexinfo -. for D in ${INFO:H} +. for D in ${INFO:H} RD:= ${D} -. if ${RD} != "." -. if !defined(INFO_SUBDIR) +. if ${RD} != "." +. if !defined(INFO_SUBDIR) INFO_SUBDIR:= ${RD} -. elif ${INFO_SUBDIR} != ${RD} +. elif ${INFO_SUBDIR} != ${RD} BROKEN= only one subdirectory in INFO is allowed -. endif -. endif +. endif +. endif .undef RD -. endfor -.endif +. endfor +. endif DOCSDIR_REL?= ${DOCSDIR:S,^${PREFIX}/,,} EXAMPLESDIR_REL?= ${EXAMPLESDIR:S,^${PREFIX}/,,} DATADIR_REL?= ${DATADIR:S,^${PREFIX}/,,} WWWDIR_REL?= ${WWWDIR:S,^${PREFIX}/,,} ETCDIR_REL?= ${ETCDIR:S,^${PREFIX}/,,} PLIST_SUB+= DOCSDIR="${DOCSDIR_REL}" \ EXAMPLESDIR="${EXAMPLESDIR_REL}" \ DATADIR="${DATADIR_REL}" \ WWWDIR="${WWWDIR_REL}" \ ETCDIR="${ETCDIR_REL}" DESKTOPDIR?= ${PREFIX}/share/applications .MAIN: all ################################################################ # Many ways to disable a port. # # If we're in BATCH mode and the port is interactive, or we're # in interactive mode and the port is non-interactive, skip all # the important targets. The reason we have two modes is that # one might want to leave a build in BATCH mode running # overnight, then come back in the morning and do _only_ the # interactive ones that required your intervention. # # Ignore ports that can't be resold if building for a CDROM. # # Don't build a port if it's restricted and we don't want to get # into that. # # Don't build a port if it's broken, unless we're running a parallel # build (in case it's fixed). # # Don't build a port if it's forbidden for whatever reason. # # Don't build a port if the system is too old. ################################################################ # Check the machine architectures -.if defined(ONLY_FOR_ARCHS) -.for __ARCH in ${ONLY_FOR_ARCHS} -.if ${ARCH:M${__ARCH}} != "" +. if defined(ONLY_FOR_ARCHS) +. for __ARCH in ${ONLY_FOR_ARCHS} +. if ${ARCH:M${__ARCH}} != "" __ARCH_OK?= 1 -.endif -.endfor -.else +. endif +. endfor +. else __ARCH_OK?= 1 -.endif +. endif -.if defined(NOT_FOR_ARCHS) -.for __NARCH in ${NOT_FOR_ARCHS} -.if ${ARCH:M${__NARCH}} != "" +. if defined(NOT_FOR_ARCHS) +. for __NARCH in ${NOT_FOR_ARCHS} +. if ${ARCH:M${__NARCH}} != "" .undef __ARCH_OK -.endif -.endfor -.endif +. endif +. endfor +. endif -.if !defined(__ARCH_OK) -.if defined(ONLY_FOR_ARCHS) +. if !defined(__ARCH_OK) +. if defined(ONLY_FOR_ARCHS) IGNORE= is only for ${ONLY_FOR_ARCHS:O}, -.else # defined(NOT_FOR_ARCHS) +. else # defined(NOT_FOR_ARCHS) IGNORE= does not run on ${NOT_FOR_ARCHS:O}, -.endif +. endif IGNORE+= while you are running ${ARCH} -.if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) +. if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}}) -.elif defined(ONLY_FOR_ARCHS_REASON) +. elif defined(ONLY_FOR_ARCHS_REASON) IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON}) -.endif +. endif -.if defined(NOT_FOR_ARCHS_REASON_${ARCH}) +. if defined(NOT_FOR_ARCHS_REASON_${ARCH}) IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON_${ARCH}}) -.elif defined(NOT_FOR_ARCHS_REASON) +. elif defined(NOT_FOR_ARCHS_REASON) IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON}) -.endif +. endif -.endif +. endif # Check the user interaction and legal issues -.if !defined(NO_IGNORE) -.if (defined(IS_INTERACTIVE) && defined(BATCH)) +. if !defined(NO_IGNORE) +. if (defined(IS_INTERACTIVE) && defined(BATCH)) IGNORE= is an interactive port -.elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) +. elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) IGNORE= is not an interactive port -.elif (defined(NO_CDROM) && defined(FOR_CDROM)) +. elif (defined(NO_CDROM) && defined(FOR_CDROM)) IGNORE= may not be placed on a CDROM: ${NO_CDROM} -.elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) +. elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) IGNORE= is restricted: ${RESTRICTED} -.elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) +. elif (defined(NO_PACKAGE) && defined(PACKAGE_BUILDING)) IGNORE= may not be packaged: ${NO_PACKAGE} -.elif defined(IGNORE_${ARCH}) +. elif defined(IGNORE_${ARCH}) IGNORE= ${IGNORE_${ARCH}} -.elif defined(IGNORE_${OPSYS}_${OSREL:R}_${ARCH}) +. elif defined(IGNORE_${OPSYS}_${OSREL:R}_${ARCH}) IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}_${ARCH}} -.elif defined(IGNORE_${OPSYS}_${OSREL:R}) +. elif defined(IGNORE_${OPSYS}_${OSREL:R}) IGNORE= ${IGNORE_${OPSYS}_${OSREL:R}} -.elif defined(IGNORE_${OPSYS}) +. elif defined(IGNORE_${OPSYS}) IGNORE= ${IGNORE_${OPSYS}} -.elif defined(BROKEN) -.if !defined(TRYBROKEN) +. elif defined(BROKEN) +. if !defined(TRYBROKEN) IGNORE= is marked as broken: ${BROKEN} -.endif -.elif defined(BROKEN_${ARCH}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${ARCH}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${ARCH}: ${BROKEN_${ARCH}} -.endif -.elif defined(BROKEN_${OPSYS}_${OSREL:R}_${ARCH}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${OPSYS}_${OSREL:R}_${ARCH}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS} ${OSREL} ${ARCH}: ${BROKEN_${OPSYS}_${OSREL:R}_${ARCH}} -.endif -.elif defined(BROKEN_${OPSYS}_${OSREL:R}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${OPSYS}_${OSREL:R}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS} ${OSREL}: ${BROKEN_${OPSYS}_${OSREL:R}} -.endif -.elif defined(BROKEN_${OPSYS}) -.if !defined(TRYBROKEN) +. endif +. elif defined(BROKEN_${OPSYS}) +. if !defined(TRYBROKEN) IGNORE= is marked as broken on ${OPSYS}: ${BROKEN_${OPSYS}} -.endif -.elif defined(FORBIDDEN) +. endif +. elif defined(FORBIDDEN) IGNORE= is forbidden: ${FORBIDDEN} -.endif +. endif # Define the text to be output to LEGAL -.if defined(LEGAL_TEXT) +. if defined(LEGAL_TEXT) LEGAL= ${LEGAL_TEXT} -.elif defined(RESTRICTED) +. elif defined(RESTRICTED) LEGAL= ${RESTRICTED} -.elif defined(NO_CDROM) +. elif defined(NO_CDROM) LEGAL= ${NO_CDROM} -.elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) +. elif defined(NO_PACKAGE) && ! defined(LEGAL_PACKAGE) LEGAL= ${NO_PACKAGE} -.endif +. endif -.if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) +. if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} clean: @${IGNORECMD} -.endif +. endif -.if defined(IGNORE) -.if defined(IGNORE_SILENT) +. if defined(IGNORE) +. if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} -.else +. else IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} "${IGNORE:Q}. | ${FMT_80} ; exit 1 -.endif +. endif _TARGETS= check-sanity fetch checksum extract patch configure all build \ install reinstall test package stage restage -.for target in ${_TARGETS} -.if !target(${target}) +. for target in ${_TARGETS} +. if !target(${target}) ${target}: @${IGNORECMD} -.if defined(INSTALLS_DEPENDS) +. if defined(INSTALLS_DEPENDS) @${FALSE} -.endif -.endif -.endfor +. endif +. endif +. endfor -.endif +. endif -.endif # !defined(NO_IGNORE) +. endif # !defined(NO_IGNORE) ignorelist: -.if defined(IGNORE) || defined(NO_PACKAGE) +. if defined(IGNORE) || defined(NO_PACKAGE) ignorelist: package-name -.endif +. endif ignorelist-verbose: -.if defined(IGNORE) +. if defined(IGNORE) @${ECHO_CMD} "${PKGNAME}|IGNORE: "${IGNORE:Q} -.elif defined(NO_PACKAGE) +. elif defined(NO_PACKAGE) @${ECHO_CMD} "${PKGNAME}|NO_PACKAGE: "${NO_PACKAGE:Q} -.endif +. endif ################################################################ # Clean directories for ftp or CDROM. ################################################################ -.if !defined(LICENSE) +. if !defined(LICENSE) -.if defined(RESTRICTED) +. if defined(RESTRICTED) clean-restricted: delete-distfiles delete-package clean-restricted-list: delete-distfiles-list delete-package-list RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} -.else +. else clean-restricted: clean-restricted-list: -.endif +. endif -.if defined(NO_CDROM) +. if defined(NO_CDROM) clean-for-cdrom: delete-distfiles delete-package clean-for-cdrom-list: delete-distfiles-list delete-package-list RESTRICTED_FILES?= ${_DISTFILES} ${_PATCHFILES} -.else +. else clean-for-cdrom: clean-for-cdrom-list: -.endif +. endif -.endif # !defined(LICENSE) +. endif # !defined(LICENSE) -.if defined(ALL_HOOK) +. if defined(ALL_HOOK) all: @cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ BUILD_DEPENDS="${BUILD_DEPENDS}" RUN_DEPENDS="${RUN_DEPENDS}" \ CONFLICTS="${CONFLICTS}" \ ${ALL_HOOK} -.endif +. endif -.if !target(all) +. if !target(all) all: stage -.endif +. endif -.if !defined(DEPENDS_TARGET) -.if defined(DEPENDS_PRECLEAN) +. if !defined(DEPENDS_TARGET) +. if defined(DEPENDS_PRECLEAN) DEPENDS_TARGET= clean DEPENDS_ARGS= NOCLEANDEPENDS=yes -.endif -.if make(reinstall) +. endif +. if make(reinstall) DEPENDS_TARGET+= reinstall -.else +. else DEPENDS_TARGET+= install -.endif -.if defined(DEPENDS_CLEAN) +. endif +. if defined(DEPENDS_CLEAN) DEPENDS_TARGET+= clean DEPENDS_ARGS+= NOCLEANDEPENDS=yes -.endif -.endif +. endif +. endif -.if defined(USE_GITLAB) && !${USE_GITLAB:Mnodefault} && empty(GL_COMMIT_DEFAULT) +. if defined(USE_GITLAB) && !${USE_GITLAB:Mnodefault} && empty(GL_COMMIT_DEFAULT) check-makevars:: @${ECHO_MSG} "GL_COMMIT is a required 40 character hash for use USE_GITLAB" @${FALSE} -.endif +. endif ################################################################ # # Do preliminary work to detect if we need to run the config # target or not. # ################################################################ -.if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ +. if ((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) \ && !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) \ || defined(CONFIG_DONE_${PKGBASE:tu}) || \ defined(PACKAGE_BUILDING) || defined(BATCH)) _OPTIONS_OK=yes -.endif +. endif ################################################################ # The following are used to create easy dummy targets for # disabling some bit of default target behavior you don't want. # They still check to see if the target exists, and if so don't # do anything, since you might want to set this globally for a # group of ports in a Makefile.inc, but still be able to # override from an individual Makefile. ################################################################ # Disable build -.if defined(NO_BUILD) && !target(build) +. if defined(NO_BUILD) && !target(build) build: configure @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} -.endif +. endif # Disable package -.if defined(NO_PACKAGE) && !target(package) +. if defined(NO_PACKAGE) && !target(package) package: -.if !defined(IGNORE_SILENT) +. if !defined(IGNORE_SILENT) @${ECHO_MSG} "===> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}. -.endif -.endif +. endif +. endif ################################################################ # More standard targets start here. # # These are the body of the build/install framework. If you are # not happy with the default actions, and you can't solve it by # adding pre-* or post-* targets/scripts, override these. ################################################################ -.if defined(TRYBROKEN) && defined(BROKEN) +. if defined(TRYBROKEN) && defined(BROKEN) buildanyway-message: @${ECHO_MSG} "Trying build of ${PKGNAME} even though it is marked BROKEN." -.endif +. endif # Warn user about deprecated packages. Advisory only. -.if !target(check-deprecated) +. if !target(check-deprecated) # Try and keep these messages in sync with the ones in Mk/Scripts/create-manifest.sh check-deprecated: -.if ${MAINTAINER} == "ports@FreeBSD.org" +. if ${MAINTAINER} == "ports@FreeBSD.org" @${ECHO_MSG} "===> NOTICE:" @${ECHO_MSG} @${ECHO_MSG} "The ${PORTNAME} port currently does not have a maintainer. As a result, it is" @${ECHO_MSG} "more likely to have unresolved issues, not be up-to-date, or even be removed in" @${ECHO_MSG} "the future. To volunteer to maintain this port, please create an issue at:" @${ECHO_MSG} @${ECHO_MSG} "https://bugs.freebsd.org/bugzilla" @${ECHO_MSG} @${ECHO_MSG} "More information about port maintainership is available at:" @${ECHO_MSG} @${ECHO_MSG} "https://docs.freebsd.org/en/articles/contributing/#ports-contributing" @${ECHO_MSG} -.endif -.if defined(DEPRECATED) +. endif +. if defined(DEPRECATED) @${ECHO_MSG} "===> NOTICE:" @${ECHO_MSG} @${ECHO_MSG} "This port is deprecated; you may wish to reconsider installing it:" @${ECHO_MSG} @${ECHO_MSG} ${DEPRECATED:Q}. @${ECHO_MSG} -.if defined(EXPIRATION_DATE) +. if defined(EXPIRATION_DATE) @${ECHO_MSG} "It is scheduled to be removed on or after ${EXPIRATION_DATE}." @${ECHO_MSG} -.endif -.endif -.endif +. endif +. endif +. endif # Check if the port is listed in the vulnerability database AUDITFILE?= ${PKG_DBDIR}/vuln.xml check-vulnerable: -.if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) \ +. if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING) \ && exists(${AUDITFILE}) @${SETENV} \ dp_ECHO_MSG="${ECHO_MSG}" \ dp_PKG_BIN="${PKG_BIN}" \ dp_PORTNAME="${PORTNAME}" \ dp_PKGNAME="${PKGNAME}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ ${SH} ${SCRIPTSDIR}/check-vulnerable.sh -.endif +. endif # Quote simply quote all variables, except FETCH_ENV, some ports are creative # with it, and it needs to be quoted twice to pass through the echo/eval in # do-fetch. _DO_FETCH_ENV= \ dp_DISABLE_SIZE='${DISABLE_SIZE}' \ dp_DISTDIR='${_DISTDIR}' \ dp_DISTINFO_FILE='${DISTINFO_FILE}' \ dp_DIST_SUBDIR='${DIST_SUBDIR}' \ dp_ECHO_MSG='${ECHO_MSG}' \ dp_FETCH_AFTER_ARGS='${FETCH_AFTER_ARGS}' \ dp_FETCH_BEFORE_ARGS='${FETCH_BEFORE_ARGS}' \ dp_FETCH_CMD='${FETCH_CMD}' \ dp_FETCH_ENV=${FETCH_ENV:Q} \ dp_FORCE_FETCH_ALL='${FORCE_FETCH_ALL}' \ dp_FORCE_FETCH_LIST='${FORCE_FETCH_LIST}' \ dp_MASTER_SITE_BACKUP='${_MASTER_SITE_BACKUP}' \ dp_MASTER_SITE_OVERRIDE='${_MASTER_SITE_OVERRIDE}' \ dp_MASTER_SORT_AWK='${MASTER_SORT_AWK}' \ dp_NO_CHECKSUM='${NO_CHECKSUM}' \ dp_RANDOMIZE_SITES='${_RANDOMIZE_SITES}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_TARGET='${.TARGET}' -.if defined(DEVELOPER) +. if defined(DEVELOPER) _DO_FETCH_ENV+= dp_DEVELOPER=yes -.else +. else _DO_FETCH_ENV+= dp_DEVELOPER= -.endif +. endif # Fetch -.if !target(do-fetch) +. if !target(do-fetch) do-fetch: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif -.endif +. endif +. endif # # Prints out a list of files to fetch (useful to do a batch fetch) -.if !target(fetch-list) +. if !target(fetch-list) fetch-list: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif -.endif +. endif +. endif # Used by fetch-urlall-list and fetch-url-list -.if !target(fetch-url-list-int) +. if !target(fetch-url-list-int) fetch-url-list-int: -.if !empty(DISTFILES) +. if !empty(DISTFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} \ dp_SITE_FLAVOR=MASTER \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${DISTFILES:C/.*/'&'/} -.endif -.if defined(PATCHFILES) && !empty(PATCHFILES) +. endif +. if defined(PATCHFILES) && !empty(PATCHFILES) @${SETENV} \ ${_DO_FETCH_ENV} ${_PATCH_SITES_ENV} \ dp_SITE_FLAVOR=PATCH \ ${SH} ${SCRIPTSDIR}/do-fetch.sh ${PATCHFILES:C/:-p[0-9]//:C/.*/'&'/} -.endif -.endif +. endif +. endif # Prints out all the URL for all the DISTFILES and PATCHFILES. -.if !target(fetch-urlall-list) +. if !target(fetch-urlall-list) fetch-urlall-list: @cd ${.CURDIR} && ${SETENV} FORCE_FETCH_ALL=yes ${MAKE} fetch-url-list-int -.endif +. endif # Prints the URL for all the DISTFILES and PATCHFILES that are not here -.if !target(fetch-url-list) +. if !target(fetch-url-list) fetch-url-list: fetch-url-list-int -.endif +. endif # Extract clean-wrkdir: @${RM} -r ${WRKDIR} -.if !target(do-extract) +. if !target(do-extract) do-extract: ${EXTRACT_WRKDIR} @for file in ${EXTRACT_ONLY}; do \ if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ then \ ${ECHO_MSG} "===> Failed to extract \"${_DISTDIR}/$$file\"."; \ exit 1; \ fi; \ done @if [ ${UID} = 0 ]; then \ ${CHMOD} -R ug-s ${WRKDIR}; \ ${CHOWN} -R 0:0 ${WRKDIR}; \ fi -.endif +. endif # Patch -.if !target(do-patch) +. if !target(do-patch) do-patch: @${SETENV} \ dp_BZCAT="${BZCAT}" \ dp_CAT="${CAT}" \ dp_DISTDIR="${_DISTDIR}" \ dp_ECHO_MSG="${ECHO_MSG}" \ dp_EXTRA_PATCHES="${EXTRA_PATCHES}" \ dp_EXTRA_PATCH_TREE="${EXTRA_PATCH_TREE}" \ dp_GZCAT="${GZCAT}" \ dp_OPSYS="${OPSYS}" \ dp_PATCH="${PATCH}" \ dp_PATCHDIR="${PATCHDIR}" \ dp_PATCHFILES="${_PATCHFILES2}" \ dp_PATCH_ARGS=${PATCH_ARGS:Q} \ dp_PATCH_DEBUG_TMP="${PATCH_DEBUG_TMP}" \ dp_PATCH_DIST_ARGS="${PATCH_DIST_ARGS}" \ dp_PATCH_CONTINUE_ON_FAIL=${PATCH_CONTINUE_ON_FAIL:Dyes} \ dp_PATCH_SILENT="${PATCH_SILENT}" \ dp_PATCH_WRKSRC=${PATCH_WRKSRC} \ dp_PKGNAME="${PKGNAME}" \ dp_PKGORIGIN="${PKGORIGIN}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_UNZIP_NATIVE_CMD="${UNZIP_NATIVE_CMD}" \ dp_XZCAT="${XZCAT}" \ ${SH} ${SCRIPTSDIR}/do-patch.sh -.endif +. endif -.if !target(run-autotools-fixup) +. if !target(run-autotools-fixup) run-autotools-fixup: # Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x. -.if !defined(WITHOUT_FBSD10_FIX) +. if !defined(WITHOUT_FBSD10_FIX) -@for f in `${FIND} ${WRKDIR} -type f \( -name config.libpath -o \ -name config.rpath -o -name configure -o -name libtool.m4 -o \ -name ltconfig -o -name libtool -o -name aclocal.m4 -o \ -name acinclude.m4 \)` ; do \ ${SED} -i.fbsd10bak \ -e 's|freebsd1\*)|freebsd1.\*)|g' \ -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \ -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \ -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \ -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \ $${f} ; \ cmp -s $${f}.fbsd10bak $${f} || \ ${ECHO_MSG} "===> FreeBSD 10 autotools fix applied to $${f}"; \ ${TOUCH} ${TOUCH_FLAGS} -mr $${f}.fbsd10bak $${f} ; \ ${RM} $${f}.fbsd10bak ; \ done -.endif -.endif +. endif +. endif # Configure -.if !target(do-configure) +. if !target(do-configure) do-configure: @if [ -f ${SCRIPTDIR}/configure ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/configure; \ fi -.if defined(GNU_CONFIGURE) +. if defined(GNU_CONFIGURE) @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess -o -name config.sub \ | ${XARGS} -n 1 ${DIRNAME}); \ for _D in $${CONFIG_GUESS_DIRS}; do \ ${RM} $${_D}/config.guess; \ ${CP} ${TEMPLATES}/config.guess $${_D}/config.guess; \ ${CHMOD} a+rx $${_D}/config.guess; \ ${RM} $${_D}/config.sub; \ ${CP} ${TEMPLATES}/config.sub $${_D}/config.sub; \ ${CHMOD} a+rx $${_D}/config.sub; \ done -.endif -.if defined(HAS_CONFIGURE) +. endif +. if defined(HAS_CONFIGURE) @${MKDIR} ${CONFIGURE_WRKSRC} @(cd ${CONFIGURE_WRKSRC} && \ ${SET_LATE_CONFIGURE_ARGS} \ if ! ${SETENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ INSTALL="/usr/bin/install -c" \ INSTALL_DATA="${INSTALL_DATA}" \ INSTALL_LIB="${INSTALL_LIB}" \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ ${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; then \ ${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT_80} ; \ ${FALSE}; \ fi) -.endif -.endif +. endif +. endif # Build DO_MAKE_BUILD?= ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} -.if !target(do-build) +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \ (${ECHO_CMD} "${BUILD_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) -.endif +. endif # Check conflicts -.if !target(check-conflicts) +. if !target(check-conflicts) check-conflicts: check-build-conflicts check-install-conflicts -.endif +. endif -.if !target(check-build-conflicts) +. if !target(check-build-conflicts) check-build-conflicts: -.if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) +. if ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ ${ECHO_CMD} -n " $${pkgname}"; \ fi; \ done); \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " They will not build together."; \ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1;\ fi -.endif -.endif +. endif +. endif -.if !target(identify-install-conflicts) +. if !target(identify-install-conflicts) CONFLICT_WARNING_WAIT?= 10 identify-install-conflicts: -.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) +. if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ ${ECHO_CMD} -n " $${pkgname}"; \ fi; \ done); \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " They install files into the same place."; \ ${ECHO_MSG} " You may want to stop build with Ctrl + C."; \ sleep ${CONFLICT_WARNING_WAIT}; \ fi -.endif -.endif +. endif +. endif -.if !target(check-install-conflicts) +. if !target(check-install-conflicts) check-install-conflicts: -.if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) -.if defined(DEFER_CONFLICTS_CHECK) +. if ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) +. if defined(DEFER_CONFLICTS_CHECK) @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ ${ECHO_CMD} -n " $${pkgname}"; \ fi; \ done); \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi -.else +. else @conflicts_with=$$( \ { ${PKG_QUERY} -g "%n-%v %p %o" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; } \ | while read pkgname prfx orgn; do \ if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \ ${ECHO_CMD} -n " $${pkgname}"; \ fi; \ done); \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ for entry in $${conflicts_with}; do \ ${ECHO_MSG} " $${entry}"; \ done; \ ${ECHO_MSG}; \ ${ECHO_MSG} " They install files into the same place."; \ ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi -.endif # defined(DEFER_CONFLICTS_CHECK) -.endif -.endif +. endif # defined(DEFER_CONFLICTS_CHECK) +. endif +. endif # Install -.if !target(do-install) && !defined(NO_INSTALL) +. if !target(do-install) && !defined(NO_INSTALL) do-install: @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endif +. endif # Test -.if !target(do-test) && defined(TEST_TARGET) +. if !target(do-test) && defined(TEST_TARGET) DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*} do-test: @(cd ${TEST_WRKSRC}; if ! ${DO_MAKE_TEST} ${TEST_TARGET}; then \ if [ -n "${TEST_FAIL_MESSAGE}" ] ; then \ ${ECHO_MSG} "===> Tests failed unexpectedly."; \ (${ECHO_CMD} "${TEST_FAIL_MESSAGE}") | ${FMT_80} ; \ fi; \ ${FALSE}; \ fi) -.endif +. endif # Package -.if defined(_HAVE_PACKAGES) +. if defined(_HAVE_PACKAGES) _EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE} _PORTS_DIRECTORIES+= ${PKGREPOSITORY} ${PKGFILE}: ${WRKDIR_PKGFILE} ${PKGREPOSITORY} @${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \ || ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE} -.if !defined(_PKG_TRANSITIONING_TO_NEW_EXT) +. if !defined(_PKG_TRANSITIONING_TO_NEW_EXT) _EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDFILE} ${PKGOLDFILE}: ${PKGFILE} ${INSTALL} -l rs ${PKGFILE} ${PKGOLDFILE} -.endif +. endif -. if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" +. if ${PKGORIGIN} == "ports-mgmt/pkg" || ${PKGORIGIN} == "ports-mgmt/pkg-devel" _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTREPOSITORY} _PORTS_DIRECTORIES+= ${PKGLATESTREPOSITORY} _EXTRA_PACKAGE_TARGET_DEP+= ${PKGLATESTFILE} ${PKGLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} ${INSTALL} -l rs ${PKGFILE} ${PKGLATESTFILE} -.if !defined(_PKG_TRANSITIONING_TO_NEW_EXT) +. if !defined(_PKG_TRANSITIONING_TO_NEW_EXT) _EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDLATESTFILE} ${PKGOLDSIGFILE} ${PKGOLDLATESTFILE}: ${PKGOLDFILE} ${PKGLATESTREPOSITORY} ${INSTALL} -l rs ${PKGOLDFILE} ${PKGOLDLATESTFILE} # Temporary workaround to be deleted once every supported version of FreeBSD # have a bootstrap which handles the pkg extension. ${PKGOLDSIGFILE}: ${PKGLATESTREPOSITORY} ${INSTALL} -l rs pkg.pkg.sig ${PKGOLDSIGFILE} -.endif -. endif +. endif +. endif -.endif +. endif # from here this will become a loop for subpackages ${WRKDIR_PKGFILE}: ${TMPPLIST} create-manifest ${WRKDIR}/pkg @if ! ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR} -p ${TMPPLIST} -o ${WRKDIR}/pkg ${PKGNAME}; then \ cd ${.CURDIR} && eval ${MAKE} delete-package >/dev/null; \ exit 1; \ fi # # Temporary will be later dynamically added per subpackages _EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE} # This will be the end of the loop -.if !target(do-package) +. if !target(do-package) PKG_CREATE_ARGS+= -f ${PKG_COMPRESSION_FORMAT} -.if defined(PKG_COMPRESSION_LEVEL) +. if defined(PKG_COMPRESSION_LEVEL) PKG_CREATE_ARGS+= -l ${PKG_COMPRESSION_LEVEL} -.endif +. endif PKG_CREATE_ARGS+= -r ${STAGEDIR} -. if defined(PKG_CREATE_VERBOSE) +. if defined(PKG_CREATE_VERBOSE) PKG_CREATE_ARGS+= -v -. endif +. endif do-package: ${_EXTRA_PACKAGE_TARGET_DEP} ${WRKDIR}/pkg -.endif +. endif -.if !target(delete-package) +. if !target(delete-package) delete-package: @${ECHO_MSG} "===> Deleting package for ${PKGNAME}" # When staging, the package may only be in the workdir if not root @${RM} ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : -.endif +. endif -.if !target(delete-package-list) +. if !target(delete-package-list) delete-package-list: @${ECHO_CMD} "[ -f ${PKGFILE} ] && (${ECHO_CMD} deleting ${PKGFILE}; ${RM} ${PKGFILE})" -.endif +. endif # Used by scripts and users to install a package from local repository. # Poudriere -i uses this, please keep. -.if !target(install-package) -.if defined(FORCE_PKG_REGISTER) +. if !target(install-package) +. if defined(FORCE_PKG_REGISTER) _INSTALL_PKG_ARGS= -f -.endif -.if defined(INSTALLS_DEPENDS) +. endif +. if defined(INSTALLS_DEPENDS) _INSTALL_PKG_ARGS+= -A -.endif +. endif install-package: @if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ _pkgfile="${WRKDIR_PKGFILE}"; \ else \ _pkgfile="${PKGFILE}"; \ fi; \ ${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} -.endif +. endif # Utility targets follow -.if !target(check-already-installed) -.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) +. if !target(check-already-installed) +. if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER) check-already-installed: @${ECHO_MSG} "===> Checking if ${PKGBASE} is already installed"; \ pkgname=`${PKG_INFO} -q -O ${PKGBASE}`; \ if [ -n "$${pkgname}" ]; then \ v=`${PKG_VERSION} -t $${pkgname} ${PKGNAME}`; \ if [ "$${v}" = "<" ]; then \ ${ECHO_CMD} "===> An older version of ${PKGBASE} is already installed ($${pkgname})"; \ else \ ${ECHO_CMD} "===> ${PKGNAME} is already installed"; \ fi; \ ${ECHO_MSG} " You may wish to \`\`make deinstall'' and install this port again"; \ ${ECHO_MSG} " by \`\`make reinstall'' to upgrade it properly."; \ ${ECHO_MSG} " If you really wish to overwrite the old port of ${PKGBASE}"; \ ${ECHO_MSG} " without deleting it first, set the variable \"FORCE_PKG_REGISTER\""; \ ${ECHO_MSG} " in your environment or the \"make install\" command line."; \ exit 1; \ fi -.endif -.endif +. endif +. endif -.if !target(check-umask) +. if !target(check-umask) check-umask: @if [ `${SH} -c umask` != 0022 ]; then \ ${ECHO_MSG} "===> Warning: your umask is \"`${SH} -c umask`"\".; \ ${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ ${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ fi -.endif +. endif # Needed for poudriere wait for at least a year before removing # XXX 2017-04-09 -.if !target(install-mtree) +. if !target(install-mtree) install-mtree: -.endif +. endif -.if !target(install-ldconfig-file) +. if !target(install-ldconfig-file) install-ldconfig-file: -. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) -. if defined(USE_LDCONFIG) -. if !defined(USE_LINUX_PREFIX) -. if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) +. if defined(USE_LDCONFIG) || defined(USE_LDCONFIG32) +. if defined(USE_LDCONFIG) +. if !defined(USE_LINUX_PREFIX) +. if ${USE_LDCONFIG} != "${LOCALBASE}/lib" && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing ldconfig configuration file" -. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} +. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR} -. endif +. endif @${ECHO_CMD} ${USE_LDCONFIG} | ${TR} ' ' '\n' \ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG_DIR}/${PKGBASE} >> ${TMPPLIST} -. if ${PREFIX} != ${LOCALBASE} +. if ${PREFIX} != ${LOCALBASE} @${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG_DIR}" >> ${TMPPLIST} +. endif +. endif . endif . endif -. endif -. endif -. if defined(USE_LDCONFIG32) -. if !defined(INSTALL_AS_USER) +. if defined(USE_LDCONFIG32) +. if !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Installing 32-bit ldconfig configuration file" -. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} +. if defined(NO_MTREE) || ${PREFIX} != ${LOCALBASE} @${MKDIR} ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR} -. endif +. endif @${ECHO_CMD} ${USE_LDCONFIG32} | ${TR} ' ' '\n' \ > ${STAGEDIR}${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} @${ECHO_CMD} ${LOCALBASE}/${LDCONFIG32_DIR}/${PKGBASE} >> ${TMPPLIST} -. if ${PREFIX} != ${LOCALBASE} +. if ${PREFIX} != ${LOCALBASE} @${ECHO_CMD} "@dir ${LOCALBASE}/${LDCONFIG32_DIR}" >> ${TMPPLIST} +. endif +. endif . endif . endif . endif -. endif -.endif -.if !defined(USE_LINUX_PREFIX) -. if !target(fixup-lib-pkgconfig) +. if !defined(USE_LINUX_PREFIX) +. if !target(fixup-lib-pkgconfig) fixup-lib-pkgconfig: @if [ -d ${STAGEDIR}${PREFIX}/lib/pkgconfig ]; then \ if [ -z "$$(${FIND} ${STAGEDIR}${PREFIX}/lib/pkgconfig -maxdepth 0 -empty)" ]; then \ ${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ ${MV} ${STAGEDIR}${PREFIX}/lib/pkgconfig/* ${STAGEDIR}${PREFIX}/libdata/pkgconfig; \ fi; \ ${RMDIR} ${STAGEDIR}${PREFIX}/lib/pkgconfig; \ fi -. endif -.endif +. endif +. endif -.if !target(create-users-groups) -.if defined(GROUPS) || defined(USERS) +. if !target(create-users-groups) +. if defined(GROUPS) || defined(USERS) _UG_INSTALL= ${WRKDIR}/users-groups-install.sh _UG_DEINSTALL= ${WRKDIR}/users-groups-deinstall.sh PKGPREINSTALL+= ${_UG_INSTALL} PKGPOSTDEINSTALL+= ${_UG_DEINSTALL} create-users-groups: @${SETENV} \ dp_ECHO_MSG="${ECHO_MSG}" \ dp_GID_FILES="${GID_FILES}" \ dp_GID_OFFSET="${GID_OFFSET}" \ dp_GROUPS_BLACKLIST="${GROUPS_BLACKLIST}" \ dp_INSTALL="${INSTALL}" \ dp_OPSYS="${OPSYS}" \ dp_OSVERSION="${OSVERSION}" \ dp_PREFIX="${PREFIX}" \ dp_PW="${PW}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_UG_DEINSTALL="${_UG_DEINSTALL}" \ dp_UG_INSTALL="${_UG_INSTALL}" \ dp_UID_FILES="${UID_FILES}" \ dp_UID_OFFSET="${UID_OFFSET}" \ dp_USERS_BLACKLIST="${USERS_BLACKLIST}" \ ${SH} ${SCRIPTSDIR}/do-users-groups.sh "${USERS}" "${GROUPS}" -.endif -.endif +. endif +. endif -.if !defined(DISABLE_SECURITY_CHECK) -.if !target(security-check) +. if !defined(DISABLE_SECURITY_CHECK) +. if !target(security-check) security-check: ${TMPPLIST} # Scan PLIST for: # 1. setugid files # 2. accept()/recvfrom() which indicates network listening capability # 3. insecure functions (gets/mktemp/tempnam/[XXX]) # 4. startup scripts, in conjunction with 2. # 5. world-writable files/dirs # # The ${NONEXISTENT} argument of ${READELF} is there so that there are always # at least two file arguments, and forces it to always output the "File: foo" # header lines. # -@${RM} ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable ${WRKDIR}/.PLIST.readelf; \ ${AWK} -v prefix='${PREFIX}' ' \ match($$0, /^@cwd /) { prefix = substr($$0, RSTART + RLENGTH); if (prefix == "/") prefix=""; next; } \ /^@/ { next; } \ /^\// { print; next; } \ { print prefix "/" $$0; } \ ' ${TMPPLIST} > ${WRKDIR}/.PLIST.flattened; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f \( -perm -4000 -o -perm -2000 \) \( -perm -0010 -o -perm -0001 \) 2> /dev/null > ${WRKDIR}/.PLIST.setuid; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune -perm -0002 \! -type l 2> /dev/null > ${WRKDIR}/.PLIST.writable; \ ${TR} '\n' '\0' < ${WRKDIR}/.PLIST.flattened \ | ${XARGS} -0 -J % ${FIND} % -prune ! -type l -type f -print0 2> /dev/null \ | ${XARGS} -0 ${READELF} -r ${NONEXISTENT} 2> /dev/null > ${WRKDIR}/.PLIST.readelf; \ if \ ! ${AWK} -v audit="$${PORTS_AUDIT}" -f ${SCRIPTSDIR}/security-check.awk \ ${WRKDIR}/.PLIST.flattened ${WRKDIR}/.PLIST.readelf ${WRKDIR}/.PLIST.setuid ${WRKDIR}/.PLIST.writable; \ then \ www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ if [ ! -z "$${www_site}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} " For more information, and contact details about the security"; \ ${ECHO_MSG} " status of this software, see the following webpage: "; \ ${ECHO_MSG} "$${www_site}"; \ fi; \ fi -.endif -.else # i.e. defined(DISABLE_SECURITY_CHECK) +. endif +. else # i.e. defined(DISABLE_SECURITY_CHECK) security-check: @${ECHO_MSG} " WARNING: Security check has been disabled." -.endif # !defined(DISABLE_SECURITY_CHECK) +. endif # !defined(DISABLE_SECURITY_CHECK) ################################################################ # Skeleton targets start here # # You shouldn't have to change these. Either add the pre-* or # post-* targets/scripts or redefine the do-* targets. These # targets don't do anything other than checking for cookies and # call the necessary targets/scripts. ################################################################ extract-message: @${ECHO_MSG} "===> Extracting for ${PKGNAME}" patch-message: @${ECHO_MSG} "===> Patching for ${PKGNAME}" configure-message: @${ECHO_MSG} "===> Configuring for ${PKGNAME}" build-message: @${ECHO_MSG} "===> Building for ${PKGNAME}" stage-message: @${ECHO_MSG} "===> Staging for ${PKGNAME}" install-message: @${ECHO_MSG} "===> Installing for ${PKGNAME}" test-message: @${ECHO_MSG} "===> Testing for ${PKGNAME}" package-message: @${ECHO_MSG} "===> Building package for ${PKGNAME}" # Empty pre-* and post-* targets -.if exists(${SCRIPTDIR}) -.for stage in pre post -.for name in pkg check-sanity fetch extract patch configure build stage install package +. if exists(${SCRIPTDIR}) +. for stage in pre post +. for name in pkg check-sanity fetch extract patch configure build stage install package -.if !target(${stage}-${name}-script) -.if exists(${SCRIPTDIR}/${stage}-${name}) +. if !target(${stage}-${name}-script) +. if exists(${SCRIPTDIR}/${stage}-${name}) ${stage}-${name}-script: @ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/${.TARGET:S/-script$//} -.endif -.endif +. endif +. endif -.endfor -.endfor -.endif +. endfor +. endfor +. endif -.if !target(pretty-print-www-site) +. if !target(pretty-print-www-site) pretty-print-www-site: @www_site=$$(cd ${.CURDIR} && ${MAKE} www-site); \ if [ -n "$${www_site}" ]; then \ ${ECHO_MSG} -n " and/or visit the "; \ ${ECHO_MSG} -n "web site"; \ ${ECHO_MSG} " for further information"; \ fi -.endif +. endif ################################################################ # Some more targets supplied for users' convenience ################################################################ # Checkpatch # # Special target to verify patches -.if !target(checkpatch) +. if !target(checkpatch) checkpatch: @cd ${.CURDIR} && ${MAKE} ${PATCH_SILENT} PATCH_CHECK_ONLY=yes ${_PATCH_DEP} ${_PATCH_REAL_SEQ} -.endif +. endif # Reinstall # # Special target to re-run install -.if !target(reinstall) +. if !target(reinstall) reinstall: @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} @cd ${.CURDIR} && DEPENDS_TARGET="${DEPENDS_TARGET}" ${MAKE} deinstall install -.endif +. endif -.if !target(restage) +. if !target(restage) restage: @${RM} -r ${STAGEDIR} ${STAGE_COOKIE} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} @cd ${.CURDIR} && ${MAKE} stage -.endif +. endif # Deinstall # # Special target to remove installation -.if !target(deinstall) +. if !target(deinstall) deinstall: -.if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) +. if defined(UID) && ${UID} != 0 && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${.TARGET}" @${ECHO_MSG} "===> Returning to user credentials" -.else +. else @${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" @if ${PKG_INFO} -e ${PKGBASE}; then \ p=`${PKG_INFO} -q -O ${PKGBASE}`; \ ${ECHO_MSG} "===> Deinstalling $${p}"; \ ${PKG_DELETE} -f ${PKGBASE} ; \ else \ ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ fi @${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} -.endif -.endif +. endif +. endif # Deinstall-all # # Special target to remove installation of all ports of the same origin -.if !target(deinstall-all) +. if !target(deinstall-all) deinstall-all: -.if ${UID} != 0 && !defined(INSTALL_AS_USER) +. if ${UID} != 0 && !defined(INSTALL_AS_USER) @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${.TARGET}" @${ECHO_MSG} "===> Returning to user credentials" -.else +. else @${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}" @deinstall_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \ for oldpkgorigin in $$(${GREP} "|${PKGORIGIN}|" ${PORTSDIR}/MOVED | ${CUT} -f 1 -d '|' | ${SORT} -u); do \ deinstall_names="$${deinstall_names} $$(${PKG_INFO} -q -O $${oldpkgorigin})"; \ done; \ if [ -n "$${deinstall_names}" ]; then \ for d in $${deinstall_names}; do \ ${ECHO_MSG} "===> Deinstalling $${d}"; \ ${PKG_DELETE} -f $${d}; \ done; \ else \ ${ECHO_MSG} "===> ${PKGORIGIN} not installed, skipping"; \ fi; \ ${RM} ${INSTALL_COOKIE} ${PACKAGE_COOKIE} -.endif -.endif +. endif +. endif # Cleaning up -.if !target(do-clean) +. if !target(do-clean) do-clean: @if [ -d ${WRKDIR} ]; then \ if [ -w ${WRKDIR} ]; then \ ${RM} -r ${WRKDIR}; \ else \ ${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ fi; \ fi -.endif +. endif -.if !target(clean) +. if !target(clean) pre-clean: clean-msg clean-msg: @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" -.if empty(FLAVORS) +. if empty(FLAVORS) CLEAN_DEPENDENCIES= -.if !defined(NOCLEANDEPENDS) +. if !defined(NOCLEANDEPENDS) CLEAN_DEPENDENCIES+= limited-clean-depends-noflavor limited-clean-depends-noflavor: @cd ${.CURDIR} && ${MAKE} limited-clean-depends -.endif -.if target(pre-clean) +. endif +. if target(pre-clean) CLEAN_DEPENDENCIES+= pre-clean-noflavor pre-clean-noflavor: @cd ${.CURDIR} && ${SETENV} ${MAKE} pre-clean -.endif +. endif CLEAN_DEPENDENCIES+= do-clean-noflavor do-clean-noflavor: @cd ${.CURDIR} && ${SETENV} ${MAKE} do-clean -.if target(post-clean) +. if target(post-clean) CLEAN_DEPENDENCIES+= post-clean-noflavor post-clean-noflavor: @cd ${.CURDIR} && ${SETENV} ${MAKE} post-clean -.endif +. endif .ORDER: ${CLEAN_DEPENDENCIES} clean: ${CLEAN_DEPENDENCIES} -.endif +. endif -.if !empty(_FLAVOR) +. if !empty(_FLAVOR) _CLEANFLAVORS= ${_FLAVOR} -.else +. else _CLEANFLAVORS= ${FLAVORS} -.endif -.for _f in ${_CLEANFLAVORS} +. endif +. for _f in ${_CLEANFLAVORS} CLEAN_DEPENDENCIES= -.if !defined(NOCLEANDEPENDS) +. if !defined(NOCLEANDEPENDS) CLEAN_DEPENDENCIES+= limited-clean-depends-${_f} limited-clean-depends-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} limited-clean-depends -.endif -.if target(pre-clean) +. endif +. if target(pre-clean) CLEAN_DEPENDENCIES+= pre-clean-${_f} pre-clean-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} pre-clean -.endif +. endif CLEAN_DEPENDENCIES+= do-clean-${_f} do-clean-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} do-clean -.if target(post-clean) +. if target(post-clean) CLEAN_DEPENDENCIES+= post-clean-${_f} post-clean-${_f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${_f} ${MAKE} post-clean -.endif +. endif .ORDER: ${CLEAN_DEPENDENCIES} clean: ${CLEAN_DEPENDENCIES} -.endfor -.endif +. endfor +. endif -.if !target(distclean) +. if !target(distclean) distclean: clean @cd ${.CURDIR} && ${MAKE} delete-distfiles RESTRICTED_FILES="${_DISTFILES:Q} ${_PATCHFILES:Q}" -.endif +. endif -.if !target(delete-distfiles) +. if !target(delete-distfiles) delete-distfiles: @${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}" @(if [ "X${RESTRICTED_FILES}" != "X" -a -d ${_DISTDIR} ]; then \ cd ${_DISTDIR}; \ for file in ${RESTRICTED_FILES}; do \ ${RM} $${file}; \ dir=$${file%/*}; \ if [ "$${dir}" != "$${file}" ]; then \ ${RMDIR} -p $${dir} >/dev/null 2>&1 || :; \ fi; \ done; \ fi) -.if defined(DIST_SUBDIR) +. if defined(DIST_SUBDIR) -@${RMDIR} ${_DISTDIR} >/dev/null 2>&1 || ${TRUE} -.endif -.endif +. endif +. endif -.if !target(delete-distfiles-list) +. if !target(delete-distfiles-list) delete-distfiles-list: @${ECHO_CMD} "# ${PKGNAME}" @if [ "X${RESTRICTED_FILES}" != "X" ]; then \ for file in ${RESTRICTED_FILES}; do \ ${ECHO_CMD} "[ -f ${_DISTDIR}/$$file ] && (${ECHO_CMD} deleting ${_DISTDIR}/$$file; ${RM} ${_DISTDIR}/$$file)"; \ dir=$${file%/*}; \ if [ "$${dir}" != "$${file}" ]; then \ ${ECHO_CMD} "(cd ${_DISTDIR} && ${RMDIR} -p $${dir} 2>/dev/null)"; \ fi; \ done; \ fi -.if defined(DIST_SUBDIR) +. if defined(DIST_SUBDIR) @${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" -.endif -.endif +. endif +. endif # Generates patches. update-patches: @toedit=`PATCH_WRKSRC=${PATCH_WRKSRC} \ PATCHDIR=${PATCHDIR} \ PATCH_LIST=${PATCHDIR}/patch-* \ DIFF_ARGS=${DIFF_ARGS} \ DISTORIG=${DISTORIG} \ ${SH} ${PORTSDIR}/Tools/scripts/update-patches`; \ case $$toedit in "");; \ *) ${ECHO_CMD} -n 'edit patches: '; read i; \ cd ${PATCHDIR} && $${VISUAL:-$${EDIT:-/usr/bin/vi}} $$toedit;; esac # Checksumming utilities # List all algorithms here, all the variables name must begin with dp_ _CHECKSUM_INIT_ENV= \ dp_SHA256=${SHA256} -.if !target(makesum) +. if !target(makesum) # Some port change the options with OPTIONS_*_FORCE when make(makesum) to be # able to add all distfiles in one go. # For this to work, we need to call the do-fetch script directly here so that # the options consistent when fetching and when makesum'ing. # As we're fetching new distfiles, that are not in the distinfo file, disable # checksum and sizes checks. makesum: check-sanity @cd ${.CURDIR} && ${MAKE} fetch NO_CHECKSUM=yes \ DISABLE_SIZE=yes DISTFILES="${DISTFILES}" \ MASTER_SITES="${MASTER_SITES}" \ PATCH_SITES="${PATCH_SITES}" @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ dp_CKSUMFILES='${_CKSUMFILES}' \ dp_DISTDIR='${DISTDIR}' \ dp_DISTINFO_FILE='${DISTINFO_FILE}' \ dp_ECHO_MSG='${ECHO_MSG}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ ${SH} ${SCRIPTSDIR}/makesum.sh ${DISTFILES:C/.*/'&'/} -.endif +. endif -.if !target(checksum) +. if !target(checksum) checksum: fetch -.if !empty(_CKSUMFILES) && !defined(NO_CHECKSUM) +. if !empty(_CKSUMFILES) && !defined(NO_CHECKSUM) @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ dp_CURDIR='${.CURDIR}' \ dp_DISTDIR='${DISTDIR}' \ dp_DISTINFO_FILE='${DISTINFO_FILE}' \ dp_DIST_SUBDIR='${DIST_SUBDIR}' \ dp_ECHO_MSG='${ECHO_MSG}' \ dp_FETCH_REGET='${FETCH_REGET}' \ dp_MAKE='${MAKE}' \ dp_MAKEFLAGS='${.MAKEFLAGS}' \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_DISABLE_SIZE='${DISABLE_SIZE}' \ dp_NO_CHECKSUM='${NO_CHECKSUM}' \ ${SH} ${SCRIPTSDIR}/checksum.sh ${_CKSUMFILES:C/.*/'&'/} -.endif -.endif +. endif +. endif # Some port's archives contains files modes that are a bit too restrictive for # some usage. For example: # BUILD_DEPENDS= ${NONEXISTENT}:foo/bar:configure # When building as a regular user, dependencies are installed/built as root, so # if the archive contains files that have a mode of, say, 600, they will not be # readable by the port requesting the dependency. # This will also fix broken distribution files where directories don't have the # executable bit on. extract-fixup-modes: @${CHMOD} -R u+w,a+rX ${WRKDIR} ################################################################ # The special package-building targets # You probably won't need to touch these ################################################################ # Nobody should want to override this unless PKGNAME is simply bogus. -.if !target(package-name) +. if !target(package-name) package-name: @${ECHO_CMD} ${PKGNAME} -.endif +. endif # Build a package but don't check the package cookie -.if !target(repackage) +. if !target(repackage) repackage: pre-repackage package pre-repackage: @${RM} ${PACKAGE_COOKIE} -.endif +. endif # Build a package but don't check the cookie for installation, also don't # install package cookie -.if !target(package-noinstall) +. if !target(package-noinstall) package-noinstall: package -.endif +. endif ################################################################ # Dependency checking ################################################################ -.if !target(depends) +. if !target(depends) depends: pkg-depends extract-depends patch-depends lib-depends fetch-depends build-depends run-depends -.for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST +. for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN TEST ${deptype:tl}-depends: -.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) +. if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) @${SETENV} \ dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ dp_DEPTYPE="${deptype}_DEPENDS" \ dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ dp_DEPENDS_CLEAN="${DEPENDS_CLEAN}" \ dp_DEPENDS_ARGS="${DEPENDS_ARGS}" \ dp_USE_PACKAGE_DEPENDS="${USE_PACKAGE_DEPENDS}" \ dp_USE_PACKAGE_DEPENDS_ONLY="${USE_PACKAGE_DEPENDS_ONLY}" \ dp_PKG_ADD="${PKG_ADD}" \ dp_PKG_INFO="${PKG_INFO}" \ dp_WRKDIR="${WRKDIR}" \ dp_PKGNAME="${PKGNAME}" \ dp_STRICT_DEPENDS="${STRICT_DEPENDS}" \ dp_LOCALBASE="${LOCALBASE}" \ dp_LIB_DIRS="${LIB_DIRS}" \ dp_SH="${SH}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ PORTSDIR="${PORTSDIR}" \ dp_OVERLAYS="${OVERLAYS}" \ dp_MAKE="${MAKE}" \ dp_MAKEFLAGS='${.MAKEFLAGS}' \ ${SH} ${SCRIPTSDIR}/do-depends.sh -.endif -.endfor +. endif +. endfor -.endif +. endif # Dependency lists: both build and runtime, recursive. Print out directory names. _UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS} _DEPEND_SPECIALS= ${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,} -.for d in ${_UNIFIED_DEPENDS:M*\:/*} +. for d in ${_UNIFIED_DEPENDS:M*\:/*} _PORTSDIR_STR= $${PORTSDIR}/ DEV_WARNING+= "It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it." -.endfor +. endfor all-depends-list: @${ALL-DEPENDS-LIST} _FLAVOR_RECURSIVE_SH= \ if [ -z "$${recursive_cmd}" ]; then \ ${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_cmd to be set to the recursive make target to run." >&2; \ ${FALSE}; \ fi; \ if [ "$${recursive_dirs-null}" = "null" ]; then \ ${ECHO_MSG} "_FLAVOR_RECURSIVE_SH requires recursive_dirs to be set to the directories to recurse." >&2; \ ${FALSE}; \ fi; \ for dir in $${recursive_dirs}; do \ unset flavor FLAVOR; \ case $${dir} in \ *@*/*) ;; \ *@*) \ flavor=$${dir\#*@}; \ dir=$${dir%@*}; \ ;; \ esac; \ case $$dir in \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac; \ (cd $$dir; ${SETENV} $${flavor:+FLAVOR=$${flavor}} ${MAKE} $${recursive_cmd}); \ done # This script is shared among several dependency list variables. See file for # usage. DEPENDS-LIST= \ ${SETENV} \ PORTSDIR="${PORTSDIR}" \ dp_MAKE="${MAKE}" \ dp_PKGNAME="${PKGNAME}" \ dp_PKG_INFO="${PKG_INFO}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_OVERLAYS="${OVERLAYS}" \ ${SH} ${SCRIPTSDIR}/depends-list.sh \ ${DEPENDS_SHOW_FLAVOR:D-f} ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} ALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:Q} DEINSTALL-DEPENDS-FLAVORS-LIST= ${DEPENDS-LIST} -f -r ${_UNIFIED_DEPENDS:N${PKG_DEPENDS}:Q} MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS} ${RUN_DEPENDS}" TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS:Q} CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} -.if !target(clean-depends) +. if !target(clean-depends) clean-depends: @for dir in $$(${CLEAN-DEPENDS-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done -.endif +. endif -.if !target(limited-clean-depends) +. if !target(limited-clean-depends) limited-clean-depends: @for dir in $$(${CLEAN-DEPENDS-LIMITED-LIST}); do \ (cd $$dir; ${MAKE} NOCLEANDEPENDS=yes clean); \ done -.endif +. endif -.if !target(deinstall-depends) +. if !target(deinstall-depends) deinstall-depends: @recursive_cmd="deinstall"; \ recursive_dirs="$$(${DEINSTALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif +. endif -.if !target(fetch-specials) +. if !target(fetch-specials) fetch-specials: @${ECHO_MSG} "===> Fetching all distfiles required by ${PKGNAME} for building" @recursive_cmd="fetch"; \ recursive_dirs="${_DEPEND_SPECIALS}"; \ ${_FLAVOR_RECURSIVE_SH} -.endif +. endif -.if !target(fetch-recursive) +. if !target(fetch-recursive) fetch-recursive: @${ECHO_MSG} "===> Fetching all distfiles for ${PKGNAME} and dependencies" @recursive_cmd="fetch"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif +. endif -.if !target(fetch-recursive-list) +. if !target(fetch-recursive-list) fetch-recursive-list: @recursive_cmd="fetch-list"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif +. endif # Used by fetch-required and fetch-required list, this script looks # at each of the dependencies. If 3 items are specified in the tuple, # such as foo:graphics/foo:extract, the first item (foo) # is examined. Only if it begins with a / and does not exist on the # file-system will ``make targ'' proceed. # For more usual (dual-item) dependency tuples, the ``make targ'' # proceeds, if the exact package, which the directory WOULD'VE installed, # is not yet installed. # This is the exact behaviour of the old code, and it may need # revisiting. For example, the entire first case seems dubious, and in # the second case we, probably, should be satisfied with _any_ (earlier) # package, with the same origin as that of the dir. # # -mi FETCH_LIST?= for i in $$deps; do \ prog=$${i%%:*}; dir=$${i\#*:}; \ case $$dir in \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac; \ case $$dir in \ *:*) if [ $$prog != $${prog\#/} -o ! -e $$prog ]; then \ dir=$${dir%%:*}; \ else \ continue; \ fi;; \ *) if [ -d ${PKG_DBDIR}/$$(cd $$dir; ${MAKE} -V PKGNAME) ]; then \ continue; \ fi;; \ esac; \ echo cd $$dir; cd $$dir; ${MAKE} $$targ; \ done -.if !target(fetch-required) +. if !target(fetch-required) fetch-required: fetch -.if defined(NO_DEPENDS) +. if defined(NO_DEPENDS) @${ECHO_MSG} "===> NO_DEPENDS is set, not fetching any other distfiles for ${PKGNAME}" -.else +. else @${ECHO_MSG} "===> Fetching all required distfiles for ${PKGNAME} and dependencies" -.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN -.if defined(${deptype}_DEPENDS) +. for deptype in PKG EXTRACT PATCH FETCH BUILD RUN +. if defined(${deptype}_DEPENDS) @targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} -.endif -.endfor -.endif +. endif +. endfor +. endif -.endif +. endif -.if !target(fetch-required-list) +. if !target(fetch-required-list) fetch-required-list: fetch-list -.if !defined(NO_DEPENDS) -.for deptype in PKG EXTRACT PATCH FETCH BUILD RUN -.if defined(${deptype}_DEPENDS) +. if !defined(NO_DEPENDS) +. for deptype in PKG EXTRACT PATCH FETCH BUILD RUN +. if defined(${deptype}_DEPENDS) @targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} -.endif -.endfor -.endif -.endif +. endif +. endfor +. endif +. endif -.if !target(checksum-recursive) +. if !target(checksum-recursive) checksum-recursive: @${ECHO_MSG} "===> Fetching and checking checksums for ${PKGNAME} and dependencies" @recursive_cmd="checksum"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif +. endif # Dependency lists: build and runtime. Print out directory names. build-depends-list: -.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) +. if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) @${BUILD-DEPENDS-LIST} -.endif +. endif run-depends-list: -.if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) +. if defined(LIB_DEPENDS) || defined(RUN_DEPENDS) @${RUN-DEPENDS-LIST} -.endif +. endif test-depends-list: -.if defined(TEST_DEPENDS) +. if defined(TEST_DEPENDS) @${TEST-DEPENDS-LIST} -.endif +. endif # Package (recursive runtime) dependency list. Print out both directory names # and package names. package-depends-list: -.if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) +. if defined(CHILD_DEPENDS) || defined(LIB_DEPENDS) || defined(RUN_DEPENDS) @${PACKAGE-DEPENDS-LIST} -.endif +. endif _LIB_RUN_DEPENDS= ${LIB_DEPENDS} ${RUN_DEPENDS} PACKAGE-DEPENDS-LIST?= \ if [ "${CHILD_DEPENDS}" ]; then \ installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ ${TRUE}); \ if [ "$$installed" ]; then \ break; \ fi; \ if [ -z "$$installed" ]; then \ installed="${PKGNAME}"; \ fi; \ for pkgname in $$installed; do \ ${ECHO_CMD} "$$pkgname ${.CURDIR} ${PKGORIGIN}"; \ done; \ fi; \ checked="${PARENT_CHECKED}"; \ for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ unset flavor; \ case $${dir} in \ *@*) \ flavor=$${dir\#*@}; \ dir=$${dir%@*}; \ ;; \ esac; \ case "$$dir" in \ /*) ;; \ *) dir=${PORTSDIR}/$$dir ;; \ esac ; \ dir=$$(${REALPATH} $$dir); \ if [ -d $$dir ]; then \ case $$checked in \ $$dir|$$dir\ *|*\ $$dir|*\ $$dir\ *) continue;; \ esac; \ childout=$$(cd $$dir; ${SETENV} FLAVOR=$${flavor} ${MAKE} CHILD_DEPENDS=yes PARENT_CHECKED="$$checked" package-depends-list); \ set -- $$childout; \ childdir=""; \ while [ $$\# != 0 ]; do \ childdir="$$childdir $$2"; \ ${ECHO_CMD} "$$1 $$2 $$3"; \ shift 3; \ done; \ checked="$$dir $$childdir $$checked"; \ else \ ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ fi; \ done ACTUAL-PACKAGE-DEPENDS?= \ depfiles="" ; \ for lib in ${LIB_DEPENDS:C/\:.*//}; do \ depfiles="$$depfiles `${SETENV} LIB_DIRS="${LIB_DIRS}" LOCALBASE="${LOCALBASE}" ${SH} ${SCRIPTSDIR}/find-lib.sh $${lib}`" ; \ done ; \ ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS:C/(.*)\:.*/"\1"/} PKG_NOTES_ENV?= -.for note in ${PKG_NOTES} +. for note in ${PKG_NOTES} PKG_NOTES_ENV+= dp_PKG_NOTE_${note}=${PKG_NOTE_${note}:Q} -.endfor +. endfor create-manifest: @${SETENV} \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ dp_COMMENT=${COMMENT:Q} \ dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ dp_DEPRECATED=${DEPRECATED:Q} \ dp_DESCR='${DESCR}' \ dp_EXPIRATION_DATE='${EXPIRATION_DATE}' \ dp_GROUPS='${GROUPS:u:S/$/,/}' \ dp_LICENSE='${LICENSE:u:S/$/,/}' \ dp_LICENSE_COMB='${LICENSE_COMB}' \ dp_MAINTAINER='${MAINTAINER}' \ dp_METADIR='${METADIR}' \ dp_NO_ARCH='${NO_ARCH}' \ dp_PKGBASE='${PKGBASE}' \ dp_PKGDEINSTALL='${PKGDEINSTALL}' \ dp_PKGINSTALL='${PKGINSTALL}' \ dp_PKGMESSAGES='${_PKGMESSAGES}' \ dp_PKGORIGIN='${PKGORIGIN}' \ dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ dp_PKGPREINSTALL='${PKGPREINSTALL}' \ dp_PKGVERSION='${PKGVERSION}' \ dp_PKG_BIN='${PKG_BIN}' \ dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ dp_PKG_NOTES='${PKG_NOTES}' \ dp_PORT_OPTIONS='${PORT_OPTIONS}' \ dp_PREFIX='${PREFIX}' \ dp_USERS='${USERS:u:S/$/,/}' \ dp_WWW='${WWW}' \ ${PKG_NOTES_ENV} \ ${SH} ${SCRIPTSDIR}/create-manifest.sh # Print out package names. package-depends: @${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' actual-package-depends: @${ACTUAL-PACKAGE-DEPENDS} # Build packages for port and dependencies package-recursive: package @recursive_cmd="package-noinstall"; \ recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} # Show missing dependencies missing: @for dir in $$(${MISSING-DEPENDS-LIST}); do \ echo $${dir#${PORTSDIR}/}; \ done # Show missing dependencies by name missing-packages: @_packages=$$(${PKG_INFO} -aq); \ for dir in $$(${ALL-DEPENDS-LIST}); do \ _p=$$(cd $$dir; ${MAKE} -VPKGNAME); \ if ! $$(${ECHO_CMD} $${_packages} | ${GREP} -q $${_p}); then \ ${ECHO_CMD} $${_p}; \ fi; \ done # Install missing dependencies from package install-missing-packages: @_dirs=$$(${MISSING-DEPENDS-LIST}); \ ${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g" | \ ${SU_CMD} "${XARGS} -o ${PKG_BIN} install -A" ################################################################ # Everything after here are internal targets and really # shouldn't be touched by anybody but the release engineers. ################################################################ # This target generates an index entry suitable for aggregation into # a large index. Format is: # # distribution-name|port-path|installation-prefix|comment| \ # description-file|maintainer|categories|extract-depends| \ # patch-depends|fetch-depends|build-depends|run-depends|www site # # If this ever changes, portmgr should contact the portsnap maintainer # first to avoid gratuitous breakage. -. if !target(describe) +. if !target(describe) _EXTRACT_DEPENDS=${EXTRACT_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _PATCH_DEPENDS=${PATCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _FETCH_DEPENDS=${FETCH_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _LIB_DEPENDS=${LIB_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} _BUILD_DEPENDS=${BUILD_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} _RUN_DEPENDS=${RUN_DEPENDS:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} -. if exists(${DESCR}) +. if exists(${DESCR}) _DESCR=${DESCR} -. else +. else _DESCR=/dev/null -. endif +. endif -. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) +. if defined(BUILDING_INDEX) && defined(INDEX_PORTS) INDEX_OUT=${INDEX_TMPDIR}/${INDEXFILE}.desc.aggr -. else +. else INDEX_OUT=/dev/stdout -. endif +. endif -. if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) +. if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) describe: @(${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \ ${ECHO_CMD} -n ${COMMENT:Q}; \ ${ECHO_CMD} -n "|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|"; \ while read one two discard; do \ case "$$one" in \ WWW:) case "$$two" in \ https://*|http://*|ftp://*) ${ECHO_CMD} -n "$$two" ;; \ *) ${ECHO_CMD} -n "http://$$two" ;; \ esac; \ break; \ ;; \ esac; \ done < ${DESCR}; ${ECHO_CMD}) >>${INDEX_OUT} -. else # empty(FLAVORS) +. else # empty(FLAVORS) describe: ${FLAVORS:S/^/describe-/} -. for f in ${FLAVORS} +. for f in ${FLAVORS} describe-${f}: @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -D_DESCRIBE_WITH_FLAVOR describe -. endfor -. endif # empty(FLAVORS) -. endif +. endfor +. endif # empty(FLAVORS) +. endif www-site: -.if exists(${DESCR}) +. if exists(${DESCR}) @${AWK} '$$1 ~ /^WWW:/ {print $$2}' ${DESCR} | ${HEAD} -1 -.else +. else @${ECHO_CMD} -.endif +. endif -.if !target(readmes) +. if !target(readmes) readmes: readme -.endif +. endif -.if !target(readme) +. if !target(readme) readme: @${RM} ${.CURDIR}/README.html @cd ${.CURDIR} && ${MAKE} ${.CURDIR}/README.html -.endif +. endif ${.CURDIR}/README.html: @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" @${SED} -e 's|%%PORT%%|'$$(${ECHO_CMD} ${.CURDIR} | \ ${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \ -e 's|%%PKG%%|${PKGNAME}|g' \ -e 's|%%COMMENT%%|'"$$(${ECHO_CMD} ${COMMENT:Q})"'|' \ -e '/%%COMMENT%%/d' \ -e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \ ${SED} -e 's|${.CURDIR}/||')"'|' \ -e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \ ${SED} -e 's/([^)]*)//;s/.*.*//')"'|g' \ -e 's|%%MAINTAINER%%|${MAINTAINER}|g' \ -e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-www-site)"'|' \ -e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-build-depends-list)"'|' \ -e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-run-depends-list)"'|' \ -e 's|%%TOP%%|'"$$(${ECHO_CMD} ${CATEGORIES} | \ ${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \ ${TEMPLATES}/README.port >> ${.TARGET} # The following two targets require an up-to-date INDEX in ${PORTSDIR} _PRETTY_PRINT_DEPENDS_LIST=\ if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then \ ${ECHO_MSG} "${.TARGET} requires an INDEX file (${INDEXFILE}). Please run make index or make fetchindex."; \ else \ target=${.TARGET:C/pretty-print-(.*)-depends-list/\1/} ; \ if [ "$$target" = "build" ] ; then fldnum=8 ; else fldnum=9 ; fi; \ ${ECHO_MSG} -n 'This port requires package(s) "' ; \ ${ECHO_MSG} -n `${AWK} -F\| "\\$$1 ~ /^${PKGNAME}/ {print \\$$$${fldnum};}" ${INDEXDIR}/${INDEXFILE}` ; \ ${ECHO_MSG} "\" to $$target."; \ fi; -.if !target(pretty-print-build-depends-list) +. if !target(pretty-print-build-depends-list) pretty-print-build-depends-list: -.if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \ +. if defined(PKG_DEPENDS) || defined(EXTRACT_DEPENDS) || defined(PATCH_DEPENDS) || \ defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) @${_PRETTY_PRINT_DEPENDS_LIST} -.endif -.endif +. endif +. endif -.if !target(pretty-print-run-depends-list) +. if !target(pretty-print-run-depends-list) pretty-print-run-depends-list: -.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) +. if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) @${_PRETTY_PRINT_DEPENDS_LIST} -.endif -.endif +. endif +. endif _SUB_LIST_TEMP= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -.if !target(apply-slist) && defined(SUB_FILES) +. if !target(apply-slist) && defined(SUB_FILES) apply-slist: -.for file in ${SUB_FILES} -.if !exists(${FILESDIR}/${file}.in) +. for file in ${SUB_FILES} +. if !exists(${FILESDIR}/${file}.in) @${ECHO_MSG} "** Missing ${FILESDIR}/${file}.in for ${PKGNAME}."; exit 1 -.else +. else @${SED} ${_SUB_LIST_TEMP} -e '/^@comment /d' ${FILESDIR}/${file}.in > ${WRKDIR}/${file} -.endif -.endfor -.for i in pkg-message pkg-install pkg-deinstall pkg-req -.if ${SUB_FILES:M${i}*}!="" +. endif +. endfor +. for i in pkg-message pkg-install pkg-deinstall pkg-req +. if ${SUB_FILES:M${i}*}!="" ${i:S/-//:tu}= ${WRKDIR}/${SUB_FILES:M${i}*} -.endif -.endfor -.endif +. endif +. endfor +. endif # Generate packing list. Also tests to make sure all required package # files exist. PLIST_SUB_SANITIZED= ${PLIST_SUB:N*_regex=*} -.if !target(generate-plist) +. if !target(generate-plist) generate-plist: ${WRKDIR} @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} ${TMPPLIST:H} @if [ ! -f ${DESCR} ]; then ${ECHO_MSG} "** Missing pkg-descr for ${PKGNAME}."; exit 1; fi @>${TMPPLIST} @for file in ${PLIST_FILES}; do \ ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} >> ${TMPPLIST}; \ done -.if !empty(PLIST) -.for f in ${PLIST} +. if !empty(PLIST) +. for f in ${PLIST} @if [ -f "${f}" ]; then \ ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${f} >> ${TMPPLIST}; \ for i in owner group mode; do ${ECHO_CMD} "@$$i"; done >> ${TMPPLIST}; \ fi -.endfor -.endif +. endfor +. endif -.for dir in ${PLIST_DIRS} +. for dir in ${PLIST_DIRS} @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@dir ,' >> ${TMPPLIST} -.endfor +. endfor -.endif +. endif ${TMPPLIST}: @cd ${.CURDIR} && ${MAKE} generate-plist -.for _type in EXAMPLES DOCS -.if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) -.if !target(add-plist-${_type:tl}) -.if defined(PORT${_type}) && !empty(PORT_OPTIONS:M${_type}) +. for _type in EXAMPLES DOCS +. if !empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) +. if !target(add-plist-${_type:tl}) +. if defined(PORT${_type}) && !empty(PORT_OPTIONS:M${_type}) add-plist-${_type:tl}: -.for x in ${PORT${_type}} +. for x in ${PORT${_type}} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${${_type}DIR}/${x} ]; then \ ${ECHO_CMD} ${${_type}DIR}/${x} >> ${TMPPLIST}; \ fi;fi -.endfor +. endfor @${FIND} -P ${PORT${_type}:S/^/${STAGEDIR}${${_type}DIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} -.endif -.endif -.endif -.endfor +. endif +. endif +. endif +. endfor -.if !target(add-plist-data) -.if defined(PORTDATA) +. if !target(add-plist-data) +. if defined(PORTDATA) add-plist-data: -.for x in ${PORTDATA} +. for x in ${PORTDATA} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${DATADIR}/${x} ]; then \ ${ECHO_CMD} ${DATADIR}/${x} >> ${TMPPLIST}; \ fi;fi -.endfor +. endfor @${FIND} -P ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} ! -type d 2>/dev/null | \ ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} -.endif -.endif +. endif +. endif -.if !target(add-plist-info) -.if defined(INFO) +. if !target(add-plist-info) +. if defined(INFO) add-plist-info: -.for i in ${INFO} +. for i in ${INFO} @${LS} ${STAGEDIR}${PREFIX}/${INFO_PATH}/$i.info* | ${SED} -e s:${STAGEDIR}:@info\ :g >> ${TMPPLIST} -.endfor -.endif -.endif +. endfor +. endif +. endif # If we're installing into a non-standard PREFIX, we need to remove that directory at # deinstall-time -.if !target(add-plist-post) -.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \ +. if !target(add-plist-post) +. if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \ ${PREFIX} != "/usr" && ${PREFIX} != "/" && !defined(NO_PREFIX_RMDIR)) add-plist-post: @${ECHO_CMD} "@dir ${PREFIX}" >> ${TMPPLIST} -.endif -.endif +. endif +. endif -.if !target(install-rc-script) -.if defined(USE_RC_SUBR) +. if !target(install-rc-script) +. if defined(USE_RC_SUBR) install-rc-script: @${ECHO_MSG} "===> Staging rc.d startup script(s)" @for i in ${USE_RC_SUBR}; do \ _prefix=${PREFIX}; \ [ "${PREFIX}" = "/usr" ] && _prefix="" ; \ ${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${STAGEDIR}$${_prefix}/etc/rc.d/$${i%.sh}; \ ${ECHO_CMD} "@(root,wheel,0755) $${_prefix}/etc/rc.d/$${i%.sh}" >> ${TMPPLIST}; \ done -.endif -.endif +. endif +. endif -.if !target(check-man) +. if !target(check-man) check-man: stage @${ECHO_MSG} "====> Checking man pages (check-man)" @mdirs= ; \ for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ done ; \ err=0 ; \ for dir in $$mdirs; do \ for f in $$(find $$dir -name "*.gz"); do \ ${ECHO_CMD} "===> Checking $${f##*/}" ; \ gunzip -c $$f | mandoc -Tlint -Werror && continue ; \ err=1 ; \ done ; \ done ; \ exit $$err -.endif +. endif # Compress all manpage not already compressed which are not hardlinks # Find all manpages which are not compressed and are hardlinks, and only get the list of inodes concerned, for each of them compress the first one found and recreate the hardlinks for the others # Fixes all dead symlinks left by the previous round -.if !target(compress-man) +. if !target(compress-man) compress-man: @${ECHO_MSG} "====> Compressing man pages (compress-man)" @mdirs= ; \ for dir in ${MANDIRS:S/^/${STAGEDIR}/} ; do \ [ -d $$dir ] && mdirs="$$mdirs $$dir" ;\ done ; \ for dir in $$mdirs; do \ ${FIND} $$dir -type f \! -name "*.gz" -links 1 -exec ${GZIP_CMD} {} \; ; \ ${FIND} $$dir -type f \! -name "*.gz" \! -links 1 -exec ${STAT} -f '%i' {} \; | \ ${SORT} -u | while read inode ; do \ unset ref ; \ for f in $$(${FIND} $$dir -type f -inum $${inode} -print); do \ if [ -z $$ref ]; then \ ref=$${f}.gz ; \ ${GZIP_CMD} $${f} ; \ continue ; \ fi ; \ ${RM} $${f} ; \ (cd $${f%/*}; ${LN} -f $${ref##*/} $${f##*/}.gz) ; \ done ; \ done ; \ ${FIND} $$dir -type l \! -name "*.gz" | while read link ; do \ ${LN} -sf $$(readlink $$link).gz $$link.gz ;\ ${RM} $$link ; \ done; \ done -.endif +. endif -.if !target(stage-dir) +. if !target(stage-dir) stage-dir: ${STAGEDIR}${PREFIX} -.if !defined(NO_MTREE) +. if !defined(NO_MTREE) @${MTREE_CMD} ${MTREE_ARGS} ${STAGEDIR}${PREFIX} > /dev/null -.endif -.endif +. endif +. endif -.if !target(makeplist) +. if !target(makeplist) makeplist: stage @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh makeplist -.endif +. endif -.if !target(check-plist) +. if !target(check-plist) check-plist: stage @${ECHO_MSG} "====> Checking for pkg-plist issues (check-plist)" @${SETENV} ${CO_ENV} ${SH} ${SCRIPTSDIR}/check-stagedir.sh checkplist @${ECHO_MSG} "===> No pkg-plist issues found (check-plist)" -.endif +. endif -.if !target(check-orphans) +. if !target(check-orphans) check-orphans: check-plist -.endif +. endif -.if !target(stage-qa) +. if !target(stage-qa) stage-qa: @${ECHO_MSG} "====> Running Q/A tests (stage-qa)" @${SETENV} ${QA_ENV} ${SH} ${SCRIPTSDIR}/qa.sh -.if !defined(DEVELOPER) +. if !defined(DEVELOPER) @${ECHO_MSG} "/!\\ To run stage-qa automatically add DEVELOPER=yes to your environment /!\\" -.endif -.endif +. endif +. endif pretty-flavors-package-names: .PHONY -.if empty(FLAVORS) +. if empty(FLAVORS) @${ECHO_CMD} "no flavor: ${PKGNAME}" -.else -.for f in ${FLAVORS} +. else +. for f in ${FLAVORS} @${ECHO_CMD} -n "${f}: " @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME -.endfor -.endif +. endfor +. endif flavors-package-names: .PHONY -.if empty(FLAVORS) +. if empty(FLAVORS) @${ECHO_CMD} "${PKGNAME}" -.else -.for f in ${FLAVORS} +. else +. for f in ${FLAVORS} @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME -.endfor -.endif +. endfor +. endif # Fake installation of package so that user can pkg delete it later. -.if !target(fake-pkg) +. if !target(fake-pkg) STAGE_ARGS= -i ${STAGEDIR} -.if defined(NO_PKG_REGISTER) +. if defined(NO_PKG_REGISTER) STAGE_ARGS= -N -.endif +. endif fake-pkg: -.if defined(INSTALLS_DEPENDS) -.if !defined(NO_PKG_REGISTER) +. if defined(INSTALLS_DEPENDS) +. if !defined(NO_PKG_REGISTER) @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" -.endif +. endif @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.else -.if !defined(NO_PKG_REGISTER) +. else +. if !defined(NO_PKG_REGISTER) @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" -.endif +. endif @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.endif +. endif @${RM} -r ${METADIR} -.endif +. endif # Depend is generally meaningless for arbitrary ports, but if someone wants # one they can override this. This is just to catch people who've gotten into # the habit of typing `make depend all install' as a matter of course. # Same goes for tags -.for _t in depend tags -.if !target(${_t}) +. for _t in depend tags +. if !target(${_t}) ${_t}: -.endif -.endfor +. endif +. endfor -.if !defined(NOPRECIOUSMAKEVARS) +. if !defined(NOPRECIOUSMAKEVARS) # These won't change, so we can pass them through the environment -.for var in ${_EXPORTED_VARS} -.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) +. for var in ${_EXPORTED_VARS} +. if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) .MAKEFLAGS: ${var}=${${var}:Q} -.endif -.endfor -.endif +. endif +. endfor +. endif PORTS_ENV_VARS+= ${_EXPORTED_VARS} -.if !target(pre-check-config) +. if !target(pre-check-config) pre-check-config: _CHECK_OPTIONS_NAMES= OPTIONS_DEFINE OPTIONS_GROUP OPTIONS_MULTI \ OPTIONS_RADIO OPTIONS_SINGLE _CHECK_OPTIONS_NAMES+= ${OPTIONS_GROUP:S/^/OPTIONS_GROUP_/} _CHECK_OPTIONS_NAMES+= ${OPTIONS_MULTI:S/^/OPTIONS_MULTI_/} _CHECK_OPTIONS_NAMES+= ${OPTIONS_RADIO:S/^/OPTIONS_RADIO_/} _CHECK_OPTIONS_NAMES+= ${OPTIONS_SINGLE:S/^/OPTIONS_SINGLE_/} -.for var in ${_CHECK_OPTIONS_NAMES} -. if defined(${var}) -. for o in ${${var}} -. if ${o:C/[-_[:upper:][:digit:]]//g} +. for var in ${_CHECK_OPTIONS_NAMES} +. if defined(${var}) +. for o in ${${var}} +. if ${o:C/[-_[:upper:][:digit:]]//g} OPTIONS_BAD_NAMES+= ${o} -. endif -. endfor -. endif -.endfor -.if defined(OPTIONS_BAD_NAMES) && !empty(OPTIONS_BAD_NAMES) +. endif +. endfor +. endif +. endfor +. if defined(OPTIONS_BAD_NAMES) && !empty(OPTIONS_BAD_NAMES) DEV_WARNING+= "These options name have characters outside of [-_A-Z0-9]:" DEV_WARNING+= "${OPTIONS_BAD_NAMES:O:u}" -.endif -.for single in ${OPTIONS_SINGLE} -. for opt in ${OPTIONS_SINGLE_${single}} -. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single}) -. if !empty(PORT_OPTIONS:M${opt}) +. endif +. for single in ${OPTIONS_SINGLE} +. for opt in ${OPTIONS_SINGLE_${single}} +. if empty(ALL_OPTIONS:M${single}) || !empty(PORT_OPTIONS:M${single}) +. if !empty(PORT_OPTIONS:M${opt}) OPTIONS_WRONG_SINGLE_${single}+= ${opt} -. if defined(OPTFOUND) +. if defined(OPTFOUND) OPTIONS_WRONG_SINGLE+= ${single} -. else +. else OPTFOUND= true -. endif -. endif -. else +. endif +. endif +. else # if conditional and if the condition is unchecked, remove opt from the list of # set options PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} OPTNOCHECK= true -. endif -. endfor -. if !defined(OPTFOUND) && !defined(OPTNOCHECK) +. endif +. endfor +. if !defined(OPTFOUND) && !defined(OPTNOCHECK) OPTIONS_WRONG_SINGLE+= ${single} -. endif +. endif . undef OPTFOUND . undef OPTNOCHECK -.endfor +. endfor .undef single -.for radio in ${OPTIONS_RADIO} -. for opt in ${OPTIONS_RADIO_${radio}} -. if !empty(PORT_OPTIONS:M${opt}) +. for radio in ${OPTIONS_RADIO} +. for opt in ${OPTIONS_RADIO_${radio}} +. if !empty(PORT_OPTIONS:M${opt}) OPTIONS_WRONG_RADIO_${radio}+= ${opt} -. if defined(OPTFOUND) +. if defined(OPTFOUND) OPTIONS_WRONG_RADIO+= ${radio} -. else +. else OPTFOUND= true -. endif -. endif -. endfor +. endif +. endif +. endfor . undef OPTFOUND -.endfor +. endfor -.for multi in ${OPTIONS_MULTI} -. for opt in ${OPTIONS_MULTI_${multi}} -. if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) -. if !empty(PORT_OPTIONS:M${opt}) +. for multi in ${OPTIONS_MULTI} +. for opt in ${OPTIONS_MULTI_${multi}} +. if empty(ALL_OPTIONS:M${multi}) || !empty(PORT_OPTIONS:M${multi}) +. if !empty(PORT_OPTIONS:M${opt}) OPTFOUND= true -. endif -. else +. endif +. else # if conditional and if the condition is unchecked, remove opt from the list of # set options PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} OPTNOCHECK= true -. endif -. endfor -. if !defined(OPTFOUND) && !defined(OPTNOCHECK) +. endif +. endfor +. if !defined(OPTFOUND) && !defined(OPTNOCHECK) OPTIONS_WRONG_MULTI+= ${multi} -. endif +. endif . undef OPTFOUND . undef OPTNOCHECK -.endfor +. endfor .undef multi -.for opt in ${PORT_OPTIONS} -. for conflict in ${${opt}_PREVENTS} -. if ${PORT_OPTIONS:M${conflict}} -. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) +. for opt in ${PORT_OPTIONS} +. for conflict in ${${opt}_PREVENTS} +. if ${PORT_OPTIONS:M${conflict}} +. if empty(OPTIONS_WRONG_PREVENTS:M${opt}) OPTIONS_WRONG_PREVENTS+= ${opt} -. endif +. endif OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict} -. endif -. endfor -.endfor +. endif +. endfor +. endfor .undef conflict .undef opt -.endif #pre-check-config +. endif #pre-check-config -.if !target(_check-config) +. if !target(_check-config) _check-config: pre-check-config -.for multi in ${OPTIONS_WRONG_MULTI} +. for multi in ${OPTIONS_WRONG_MULTI} @${ECHO_MSG} "====> You must check at least one option in the ${multi} multi" -.endfor -.for single in ${OPTIONS_WRONG_SINGLE} +. endfor +. for single in ${OPTIONS_WRONG_SINGLE} @${ECHO_MSG} "====> You must select one and only one option from the ${single} single" -.if defined(OPTIONS_WRONG_SINGLE_${single}) +. if defined(OPTIONS_WRONG_SINGLE_${single}) @${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_SINGLE_${single}}" -.else +. else @${ECHO_MSG} "=====> No option was selected (and one must be)" -.endif -.endfor -.for radio in ${OPTIONS_WRONG_RADIO} +. endif +. endfor +. for radio in ${OPTIONS_WRONG_RADIO} @${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio" @${ECHO_MSG} "=====> Only one of these must be defined: ${OPTIONS_WRONG_RADIO_${radio}}" -.endfor -.if defined(OPTIONS_WRONG_PREVENTS) +. endfor +. if defined(OPTIONS_WRONG_PREVENTS) @${ECHO_MSG} "====> Two or more enabled options conflict with each other" -. for prevents in ${OPTIONS_WRONG_PREVENTS} +. for prevents in ${OPTIONS_WRONG_PREVENTS} @${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)" -. if defined(${prevents}_PREVENTS_MSG) +. if defined(${prevents}_PREVENTS_MSG) @${ECHO_MSG} "======> ${${prevents}_PREVENTS_MSG}" -. endif -. endfor -.endif -.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) +. endif +. endfor +. endif +. if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS) _CHECK_CONFIG_ERROR= true -.endif -.endif # _check-config +. endif +. endif # _check-config -.if !target(check-config) +. if !target(check-config) check-config: _check-config -.if !empty(_CHECK_CONFIG_ERROR) +. if !empty(_CHECK_CONFIG_ERROR) @${FALSE} -.endif -.endif # check-config +. endif +. endif # check-config -.if !target(sanity-config) +. if !target(sanity-config) sanity-config: _check-config -.if !empty(_CHECK_CONFIG_ERROR) +. if !empty(_CHECK_CONFIG_ERROR) @echo -n "Config is invalid. Re-edit? [Y/n] "; \ read answer; \ case $$answer in \ [Nn]|[Nn][Oo]) \ exit 0; \ esac; \ cd ${.CURDIR} && ${MAKE} config -.endif -.endif # sanity-config +. endif +. endif # sanity-config -.if !target(pre-config) +. if !target(pre-config) pre-config: D4P_ENV= PKGNAME="${PKGNAME}" \ PORT_OPTIONS="${PORT_OPTIONS}" \ ALL_OPTIONS="${ALL_OPTIONS}" \ OPTIONS_MULTI="${OPTIONS_MULTI}" \ OPTIONS_SINGLE="${OPTIONS_SINGLE}" \ OPTIONS_RADIO="${OPTIONS_RADIO}" \ OPTIONS_GROUP="${OPTIONS_GROUP}" \ NEW_OPTIONS="${NEW_OPTIONS}" \ DIALOG4PORTS="${DIALOG4PORTS}" \ PREFIX="${PREFIX}" \ LOCALBASE="${LOCALBASE}" \ PORTSDIR="${PORTSDIR}" \ MAKE="${MAKE}" \ D4PHEIGHT="${D4PHEIGHT}" \ D4PMINHEIGHT="${D4PMINHEIGHT}" \ D4PWIDTH="${D4PWIDTH}" \ D4PFULLSCREEN="${D4PFULLSCREEN}" \ D4PALIGNCENTER="${D4PALIGNCENTER}" \ D4PASCIILINES="${D4PASCIILINES}" -.if exists(${PKGHELP}) +. if exists(${PKGHELP}) D4P_ENV+= PKGHELP="${PKGHELP}" -.endif -.for opt in ${ALL_OPTIONS} +. endif +. for opt in ${ALL_OPTIONS} D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" -.endfor -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} +. endfor +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} D4P_ENV+= OPTIONS_${otype}_${m}="${OPTIONS_${otype}_${m}}" \ ${m}_DESC=""${${m}_DESC:Q}"" -. for opt in ${OPTIONS_${otype}_${m}} +. for opt in ${OPTIONS_${otype}_${m}} D4P_ENV+= ${opt}_DESC=""${${opt}_DESC:Q}"" -. endfor -. endfor -.endfor +. endfor +. endfor +. endfor .undef m .undef otype .undef opt -.endif # pre-config +. endif # pre-config -.if !target(do-config) +. if !target(do-config) do-config: -.if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) +. if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) && empty(OPTIONS_RADIO) && empty(OPTIONS_GROUP) @${ECHO_MSG} "===> No options to configure" -.else +. else @optionsdir=${OPTIONS_FILE:H}; \ if [ ! -w "${PORT_DBDIR}" -a "`stat -f %u ${PORT_DBDIR:H}`" = 0 ]; \ then \ ${ECHO_MSG} "===> Switching to root credentials to create $${optionsdir}"; \ (${SU_CMD} "${SH} -c \"${MKDIR} $${optionsdir} 2> /dev/null\"") || \ (${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1); \ ${ECHO_MSG} "===> Returning to user credentials" ; \ else \ ${MKDIR} $${optionsdir} 2> /dev/null || \ (${ECHO_MSG} "===> Cannot create $${optionsdir}, check permissions"; exit 1) ; \ fi @TMPOPTIONSFILE=$$(mktemp -t portoptions); \ trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ ${SETENV} ${D4P_ENV} ${SH} ${SCRIPTSDIR}/dialog4ports.sh $${TMPOPTIONSFILE} || { \ ${RM} $${TMPOPTIONSFILE}; \ ${ECHO_MSG} "===> Options unchanged"; \ exit 0; \ }; \ ${ECHO_CMD}; \ if [ ! -e $${TMPOPTIONSFILE} ]; then \ ${ECHO_MSG} "===> No user-specified options to save for ${PKGNAME}"; \ exit 0; \ fi; \ SELOPTIONS=$$(${CAT} $${TMPOPTIONSFILE}); \ ${RM} $${TMPOPTIONSFILE}; \ TMPOPTIONSFILE=$$(mktemp -t portoptions); \ trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ ${ECHO_CMD} "# This file is auto-generated by 'make config'." > $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "# Options for ${PKGNAME}" >> $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "_OPTIONS_READ=${PKGNAME}" >> $${TMPOPTIONSFILE}; \ ${ECHO_CMD} "_FILE_COMPLETE_OPTIONS_LIST=${COMPLETE_OPTIONS_LIST}" >> $${TMPOPTIONSFILE}; \ for i in ${COMPLETE_OPTIONS_LIST}; do \ if ${ECHO_CMD} $${SELOPTIONS} | ${GREP} -qw $${i}; then \ ${ECHO_CMD} "OPTIONS_FILE_SET+=$${i}" >> $${TMPOPTIONSFILE}; \ else \ ${ECHO_CMD} "OPTIONS_FILE_UNSET+=$${i}" >> $${TMPOPTIONSFILE}; \ fi; \ done; \ if [ ! -w "${OPTIONS_FILE:H}" -a "`stat -f %u ${OPTIONS_FILE:H}`" != ${UID} ]; \ then \ ${ECHO_MSG} "===> Switching to root credentials to write ${OPTIONS_FILE}"; \ ${SU_CMD} "${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}"; \ ${ECHO_MSG} "===> Returning to user credentials"; \ else \ ${CAT} $${TMPOPTIONSFILE} > ${OPTIONS_FILE}; \ fi; \ ${RM} $${TMPOPTIONSFILE} @cd ${.CURDIR} && ${MAKE} sanity-config -.endif -.endif # do-config +. endif +. endif # do-config -.if !target(config) -.if !defined(NO_DIALOG) +. if !target(config) +. if !defined(NO_DIALOG) config: pre-config do-config -.else +. else config: @${ECHO_MSG} "===> Skipping 'config' as NO_DIALOG is defined" -.endif -.endif # config +. endif +. endif # config -.if !target(config-recursive) +. if !target(config-recursive) config-recursive: @${ECHO_MSG} "===> Setting user-specified options for ${PKGNAME} and dependencies"; @recursive_cmd="config-conditional"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif # config-recursive +. endif # config-recursive -.if !target(config-conditional) +. if !target(config-conditional) config-conditional: -.if !empty(NEW_OPTIONS) +. if !empty(NEW_OPTIONS) @cd ${.CURDIR} && ${MAKE} config; -.endif -.endif # config-conditional +. endif +. endif # config-conditional -.if !target(showconfig) && (make(*config*) || (!empty(.MAKEFLAGS:M-V) && !empty(.MAKEFLAGS:M*_DESC))) +. if !target(showconfig) && (make(*config*) || (!empty(.MAKEFLAGS:M-V) && !empty(.MAKEFLAGS:M*_DESC))) .include "${PORTSDIR}/Mk/bsd.options.desc.mk" MULTI_EOL= : you have to choose at least one of them SINGLE_EOL= : you have to select exactly one of them RADIO_EOL= : you can only select none or one of them showconfig: check-config -.if !empty(COMPLETE_OPTIONS_LIST) +. if !empty(COMPLETE_OPTIONS_LIST) @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME}": -.for opt in ${ALL_OPTIONS} +. for opt in ${ALL_OPTIONS} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" -. if !empty(${opt}_DESC) +. if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} -. endif +. endif @${ECHO_MSG} "" -.endfor +. endfor #multi and conditional multis -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} -. if empty(${m}_DESC) +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} +. if empty(${m}_DESC) @${ECHO_MSG} "====> Options available for the ${otype:tl} ${m}${${otype}_EOL}" -. else +. else @${ECHO_MSG} "====> ${${m}_DESC}${${otype}_EOL}" -. endif -. for opt in ${OPTIONS_${otype}_${m}} +. endif +. for opt in ${OPTIONS_${otype}_${m}} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="on" ; ${ECHO_MSG} -n " ${opt}=$${match:-off}" -. if !empty(${opt}_DESC) +. if !empty(${opt}_DESC) @${ECHO_MSG} -n ": "${${opt}_DESC:Q} -. endif +. endif @${ECHO_MSG} "" -. endfor -. endfor -.endfor +. endfor +. endfor +. endfor .undef otype .undef m .undef opt @${ECHO_MSG} "===> Use 'make config' to modify these settings" -.endif -.endif # showconfig +. endif +. endif # showconfig -.if !target(showconfig-recursive) +. if !target(showconfig-recursive) showconfig-recursive: @${ECHO_MSG} "===> The following configuration options are available for ${PKGNAME} and its dependencies"; @recursive_cmd="showconfig"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif # showconfig-recursive +. endif # showconfig-recursive -.if !target(rmconfig) +. if !target(rmconfig) rmconfig: -.if exists(${OPTIONS_FILE}) +. if exists(${OPTIONS_FILE}) -@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \ optionsdir=${OPTIONS_FILE:H}; \ if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" -a ! -w "${OPTIONS_FILE}" ]; then \ ${ECHO_MSG} "===> Switching to root credentials to remove ${OPTIONS_FILE} and $${optionsdir}"; \ ${SU_CMD} "${RM} ${OPTIONS_FILE} ; \ ${RMDIR} $${optionsdir}"; \ ${ECHO_MSG} "===> Returning to user credentials"; \ else \ ${RM} ${OPTIONS_FILE}; \ ${RMDIR} $${optionsdir} 2>/dev/null || return 0; \ fi -.else +. else @${ECHO_MSG} "===> No user-specified options configured for ${PKGNAME}" -.endif -.endif # rmconfig +. endif +. endif # rmconfig -.if !target(rmconfig-recursive) +. if !target(rmconfig-recursive) rmconfig-recursive: @${ECHO_MSG} "===> Removing user-specified options for ${PKGNAME} and its dependencies"; @recursive_cmd="rmconfig"; \ recursive_dirs="${.CURDIR}${FLAVOR:D@${FLAVOR}} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ ${_FLAVOR_RECURSIVE_SH} -.endif # rmconfig-recursive +. endif # rmconfig-recursive -.if !target(pretty-print-config) +. if !target(pretty-print-config) MULTI_START= [ MULTI_END= ] GROUP_START= [ GROUP_END= ] SINGLE_START= ( SINGLE_END= ) RADIO_START= ( RADIO_END= ) pretty-print-config: -.for opt in ${ALL_OPTIONS} +. for opt in ${ALL_OPTIONS} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " -.endfor -.for otype in MULTI GROUP SINGLE RADIO -. for m in ${OPTIONS_${otype}} +. endfor +. for otype in MULTI GROUP SINGLE RADIO +. for m in ${OPTIONS_${otype}} @${ECHO_MSG} -n "${m}${${otype}_START} " -. for opt in ${OPTIONS_${otype}_${m}} +. for opt in ${OPTIONS_${otype}_${m}} @[ -z "${PORT_OPTIONS:M${opt}}" ] || match="+" ; ${ECHO_MSG} -n "$${match:--}${opt} " -. endfor +. endfor @${ECHO_MSG} -n "${${otype}_END} " -. endfor -.endfor +. endfor +. endfor .undef otype .undef m .undef opt @${ECHO_MSG} "" -.endif # pretty-print-config +. endif # pretty-print-config desktop-categories: @${SETENV} \ dp_CATEGORIES="${CATEGORIES}" \ dp_ECHO_CMD=${ECHO_CMD} \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_SORT="${SORT}" \ dp_TR="${TR}" \ ${SH} ${SCRIPTSDIR}/desktop-categories.sh -.if defined(DESKTOP_ENTRIES) +. if defined(DESKTOP_ENTRIES) check-desktop-entries: @${SETENV} \ dp_CURDIR="${.CURDIR}" \ dp_ECHO_CMD=${ECHO_CMD} \ dp_ECHO_MSG=${ECHO_MSG} \ dp_EXPR="${EXPR}" \ dp_GREP="${GREP}" \ dp_MAKE="${MAKE}" \ dp_PKGNAME="${PKGNAME}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_SED="${SED}" \ dp_VALID_DESKTOP_CATEGORIES="${VALID_DESKTOP_CATEGORIES}" \ dp_TR="${TR}" \ ${SH} ${SCRIPTSDIR}/check-desktop-entries.sh ${DESKTOP_ENTRIES} -.endif +. endif -.if !target(install-desktop-entries) -.if defined(DESKTOP_ENTRIES) +. if !target(install-desktop-entries) +. if defined(DESKTOP_ENTRIES) install-desktop-entries: @${SETENV} \ dp_CURDIR="${.CURDIR}" \ dp_ECHO_CMD=${ECHO_CMD} \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ dp_STAGEDIR="${STAGEDIR}" \ dp_DESKTOPDIR="${DESKTOPDIR}" \ dp_TMPPLIST="${TMPPLIST}" \ dp_MAKE="${MAKE}" \ dp_SED="${SED}" \ ${SH} ${SCRIPTSDIR}/install-desktop-entries.sh ${DESKTOP_ENTRIES} -.endif -.endif +. endif +. endif -.if !empty(BINARY_ALIAS) -.if !target(create-binary-alias) +. if !empty(BINARY_ALIAS) +. if !target(create-binary-alias) create-binary-alias: ${BINARY_LINKDIR} -.for target src in ${BINARY_ALIAS:C/=/ /} +. for target src in ${BINARY_ALIAS:C/=/ /} @if srcpath=`which -- ${src}`; then \ ${RLN} $${srcpath} ${BINARY_LINKDIR}/${target}; \ else \ ${ECHO_MSG} "===> Missing \"${src}\" to create a binary alias at \"${BINARY_LINKDIR}/${target}\""; \ ${FALSE}; \ fi -.endfor -.endif -.endif +. endfor +. endif +. endif -.if !empty(BINARY_WRAPPERS) -.if !target(create-binary-wrappers) +. if !empty(BINARY_WRAPPERS) +. if !target(create-binary-wrappers) create-binary-wrappers: ${BINARY_LINKDIR} -.for bin in ${BINARY_WRAPPERS} +. for bin in ${BINARY_WRAPPERS} @${INSTALL_SCRIPT} ${WRAPPERSDIR}/${bin} ${BINARY_LINKDIR} -.endfor -.endif -.endif +. endfor +. endif +. endif -.if defined(WARNING) +. if defined(WARNING) WARNING_WAIT?= 10 show-warnings: @${ECHO_MSG} "/!\\ WARNING /!\\" @${ECHO_MSG} -.for m in ${WARNING} +. for m in ${WARNING} @${ECHO_MSG} "${m}" | ${FMT_80} @${ECHO_MSG} -.endfor +. endfor @sleep ${WARNING_WAIT} -.endif +. endif -.if defined(ERROR) +. if defined(ERROR) show-errors: @${ECHO_MSG} "/!\\ ERRORS /!\\" @${ECHO_MSG} -.for m in ${ERROR} +. for m in ${ERROR} @${ECHO_MSG} "${m}" | ${FMT_80} @${ECHO_MSG} -.endfor +. endfor @${FALSE} -.endif +. endif -.if defined(DEVELOPER) -.if defined(DEV_WARNING) +. if defined(DEVELOPER) +. if defined(DEV_WARNING) DEV_WARNING_WAIT?= 10 show-dev-warnings: @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile warnings, please consider fixing /!\\" @${ECHO_MSG} -.for m in ${DEV_WARNING} +. for m in ${DEV_WARNING} @${ECHO_MSG} ${m} | ${FMT_80} @${ECHO_MSG} -.endfor -.if defined(DEV_WARNING_FATAL) +. endfor +. if defined(DEV_WARNING_FATAL) @${FALSE} -.else +. else @sleep ${DEV_WARNING_WAIT} -.endif -.endif +. endif +. endif -.if defined(DEV_ERROR) +. if defined(DEV_ERROR) show-dev-errors: @${ECHO_MSG} "/!\\ ${PKGNAME}: Makefile errors /!\\" @${ECHO_MSG} -.for m in ${DEV_ERROR} +. for m in ${DEV_ERROR} @${ECHO_MSG} "${m}" | ${FMT_80} @${ECHO_MSG} -.endfor +. endfor @${FALSE} -.endif -.endif #DEVELOPER +. endif +. endif #DEVELOPER ${_PORTS_DIRECTORIES}: @${MKDIR} ${.TARGET} # Please note that the order of the following targets is important, and # should not be modified. _TARGETS_STAGES= SANITY PKG FETCH EXTRACT PATCH CONFIGURE BUILD INSTALL TEST PACKAGE STAGE # Define the SEQ of actions to take when each target is ran, and which targets # it depends on before running its SEQ. # # Main target has a priority of 500, pre-target 300, post-target 700, # target-depends 150. Other targets are spaced in between those # # If you change the pre-foo and post-foo values here, go and keep them in sync # in _OPTIONS_TARGETS in bsd.options.mk _SANITY_SEQ= 050:post-chroot 100:pre-everything \ 125:show-unsupported-system-error 150:check-makefile \ 190:show-errors 200:show-warnings \ 210:show-dev-errors 220:show-dev-warnings \ 250:check-categories 300:check-makevars \ 350:check-desktop-entries 400:check-depends \ 450:identify-install-conflicts 500:check-deprecated \ 550:check-vulnerable 600:check-license 650:check-config \ 700:buildanyway-message 750:options-message ${_USES_sanity} _PKG_DEP= check-sanity _PKG_SEQ= 500:pkg-depends _FETCH_DEP= pkg _FETCH_SEQ= 150:fetch-depends 300:pre-fetch 450:pre-fetch-script \ 500:do-fetch 550:fetch-specials 700:post-fetch \ 850:post-fetch-script \ ${_OPTIONS_fetch} ${_USES_fetch} _EXTRACT_DEP= fetch _EXTRACT_SEQ= 010:check-build-conflicts 050:extract-message 100:checksum \ 150:extract-depends 190:clean-wrkdir 200:${EXTRACT_WRKDIR} \ 300:pre-extract 450:pre-extract-script 500:do-extract \ 700:post-extract 850:post-extract-script \ 999:extract-fixup-modes \ ${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} _PATCH_DEP= extract _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ 300:pre-patch 450:pre-patch-script 500:do-patch \ 700:post-patch 850:post-patch-script \ ${_OPTIONS_patch} ${_USES_patch} _CONFIGURE_DEP= patch _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ 161:create-binary-wrappers \ 200:configure-message 210:apply-slist \ 300:pre-configure 450:pre-configure-script \ 490:run-autotools-fixup 500:do-configure 700:post-configure \ 850:post-configure-script \ ${_OPTIONS_configure} ${_USES_configure} _BUILD_DEP= configure _BUILD_SEQ= 100:build-message 300:pre-build 450:pre-build-script \ 500:do-build 700:post-build 850:post-build-script \ ${_OPTIONS_build} ${_USES_build} _STAGE_DEP= build # STAGE is special in its numbering as it has install and stage, so install is # the main, and stage goes after. _STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ 300:pre-install \ 400:generate-plist 450:pre-su-install 475:create-users-groups \ 500:do-install 550:kmod-post-install 600:fixup-lib-pkgconfig 700:post-install \ 750:post-install-script 800:post-stage 850:compress-man \ 860:install-rc-script 870:install-ldconfig-file \ 880:install-license 890:install-desktop-entries \ 900:add-plist-info 910:add-plist-docs 920:add-plist-examples \ 930:add-plist-data 940:add-plist-post ${POST_PLIST:C/^/990:/} \ ${_OPTIONS_install} ${_USES_install} \ ${_OPTIONS_stage} ${_USES_stage} -.if defined(DEVELOPER) +. if defined(DEVELOPER) _STAGE_SEQ+= 995:stage-qa -.else +. else stage-qa: stage -.endif +. endif _TEST_DEP= stage _TEST_SEQ= 100:test-message 150:test-depends 300:pre-test 500:do-test \ 800:post-test \ ${_OPTIONS_test} ${_USES_test} _INSTALL_DEP= stage _INSTALL_SEQ= 100:install-message \ 200:check-already-installed \ 300:create-manifest _INSTALL_SUSEQ= 400:fake-pkg 500:security-check _PACKAGE_DEP= stage _PACKAGE_SEQ= 100:package-message 300:pre-package 450:pre-package-script \ 500:do-package 850:post-package-script \ ${_OPTIONS_package} ${_USES_package} # Enforce order for -jN builds -.for _t in ${_TARGETS_STAGES} +. for _t in ${_TARGETS_STAGES} # Check if the port need to change the default order of some targets... -. if defined(TARGET_ORDER_OVERRIDE) +. if defined(TARGET_ORDER_OVERRIDE) _tmp_seq:= -. for _entry in ${_${_t}_SEQ} +. for _entry in ${_${_t}_SEQ} # for _target because :M${_target} does not work with fmake -. for _target in ${_entry:C/^[0-9]+://} -. if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} +. for _target in ${_entry:C/^[0-9]+://} +. if ${TARGET_ORDER_OVERRIDE:M*\:${_target}} _tmp_seq:= ${_tmp_seq} ${TARGET_ORDER_OVERRIDE:M*\:${_target}} -. else +. else _tmp_seq:= ${_tmp_seq} ${_entry} -. endif -. endfor -. endfor +. endif +. endfor +. endfor _${_t}_SEQ:= ${_tmp_seq} -. endif -. for s in ${_${_t}_SEQ:O:C/^[0-9]+://} -. if target(${s}) -. if ! ${NOTPHONY:M${s}} -_PHONY_TARGETS+= ${s} . endif +. for s in ${_${_t}_SEQ:O:C/^[0-9]+://} +. if target(${s}) +. if ! ${NOTPHONY:M${s}} +_PHONY_TARGETS+= ${s} +. endif _${_t}_REAL_SEQ+= ${s} -. endif -. endfor -. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} -. if target(${s}) -. if ! ${NOTPHONY:M${s}} +. endif +. endfor +. for s in ${_${_t}_SUSEQ:O:C/^[0-9]+://} +. if target(${s}) +. if ! ${NOTPHONY:M${s}} _PHONY_TARGETS+= ${s} -. endif +. endif _${_t}_REAL_SUSEQ+= ${s} -. endif -. endfor +. endif +. endfor .ORDER: ${_${_t}_DEP} ${_${_t}_REAL_SEQ} -.endfor +. endfor # Define all of the main targets which depend on a sequence of other targets. # See above *_SEQ and *_DEP. The _DEP will run before this defined target is # ran. The _SEQ will run as this target once _DEP is satisfied. -.for target in extract patch configure build stage install package +. for target in extract patch configure build stage install package # Check if config dialog needs to show and execute it if needed. If is it not # needed (_OPTIONS_OK), then just depend on the cookie which is defined later # to depend on the *_DEP and execute the *_SEQ. # If options are required, execute config-conditional and then re-execute the # target noting that config is no longer needed. -.if !target(${target}) && defined(_OPTIONS_OK) +. if !target(${target}) && defined(_OPTIONS_OK) _PHONY_TARGETS+= ${target} ${target}: ${${target:tu}_COOKIE} -.elif !target(${target}) +. elif !target(${target}) ${target}: config-conditional @cd ${.CURDIR} && ${MAKE} CONFIG_DONE_${PKGBASE:tu}=1 ${${target:tu}_COOKIE} -.elif target(${target}) && defined(IGNORE) -.endif +. elif target(${target}) && defined(IGNORE) +. endif -.if !exists(${${target:tu}_COOKIE}) +. if !exists(${${target:tu}_COOKIE}) # Define the real target behavior. Depend on the target's *_DEP. Execute # the target's *_SEQ. Also handle su and USE_SUBMAKE needs. -.if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) -. if defined(USE_SUBMAKE) +. if ${UID} != 0 && defined(_${target:tu}_REAL_SUSEQ) && !defined(INSTALL_AS_USER) +. if defined(USE_SUBMAKE) ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} @cd ${.CURDIR} && ${MAKE} ${_${target:tu}_REAL_SEQ} -. else # !USE_SUBMAKE +. else # !USE_SUBMAKE ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} -. endif # USE_SUBMAKE +. endif # USE_SUBMAKE @${ECHO_MSG} "===> Switching to root credentials for '${target}' target" @cd ${.CURDIR} && \ ${SU_CMD} "${MAKE} ${_${target:tu}_REAL_SUSEQ}" @${ECHO_MSG} "===> Returning to user credentials" @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -.else # No SU needed -. if defined(USE_SUBMAKE) +. else # No SU needed +. if defined(USE_SUBMAKE) ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} @cd ${.CURDIR} && \ ${MAKE} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -. else # !USE_SUBMAKE +. else # !USE_SUBMAKE ${${target:tu}_COOKIE}: ${_${target:tu}_DEP} ${_${target:tu}_REAL_SEQ} ${_${target:tu}_REAL_SUSEQ} @${TOUCH} ${TOUCH_FLAGS} ${.TARGET} -. endif # USE_SUBMAKE -.endif # SU needed +. endif # USE_SUBMAKE +. endif # SU needed -.else # exists(cookie) +. else # exists(cookie) ${${target:tu}_COOKIE}:: @if [ ! -e ${.TARGET} ]; then \ cd ${.CURDIR} && ${MAKE} ${.TARGET}; \ fi -.endif # !exists(cookie) +. endif # !exists(cookie) -.endfor # foreach(targets) +. endfor # foreach(targets) .PHONY: ${_PHONY_TARGETS} check-sanity fetch pkg -.if !target(check-sanity) +. if !target(check-sanity) check-sanity: ${_SANITY_REAL_SEQ} -.endif +. endif -.if !target(fetch) +. if !target(fetch) fetch: ${_FETCH_DEP} ${_FETCH_REAL_SEQ} -.endif +. endif -.if !target(pkg) +. if !target(pkg) pkg: ${_PKG_DEP} ${_PKG_REAL_SEQ} -.endif +. endif -.if !target(test) +. if !target(test) test: ${_TEST_DEP} -.if !defined(NO_TEST) +. if !defined(NO_TEST) test: ${_TEST_REAL_SEQ} -.endif -.endif +. endif +. endif -.endif +. endif # End of post-makefile section. .endif # End of the DESTDIR if statement diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk index dbeea2d27cdb..426c64520f1d 100644 --- a/Mk/bsd.port.subdir.mk +++ b/Mk/bsd.port.subdir.mk @@ -1,515 +1,515 @@ # from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 # The include file contains the default targets # for building ports subdirectories. # # # +++ variables +++ # # STRIP - The flag passed to the install program to cause the binary # to be stripped. This is to be used when building your # own install script so that the entire system can be made # stripped/not-stripped using a single knob. [-s] # # OPSYS - Get the operating system type [`uname -s`] # # SUBDIR - A list of subdirectories that should be built as well. # Each of the targets will execute the same target in the # subdirectories. # # # +++ targets +++ # # README.html: # Creating README.html for package. # # afterinstall, all, beforeinstall, build, checksum, clean, # clean-for-cdrom, clean-restricted, # clean-for-cdrom-list, clean-restricted-list, # configure, deinstall, # depend, depends, describe, extract, fetch, fetch-list, # ignorelist, ignorelist-verbose, # install, maintainer, makesum, package, readmes, realinstall, reinstall, # tags # # search: # Search for ports using either 'make search key=' # or 'make search name='. PORTSDIR?= /usr/ports TEMPLATES?= ${PORTSDIR}/Templates .if defined(PORTSTOP) README= ${TEMPLATES}/README.top .else README= ${TEMPLATES}/README.category .endif MOVEDDIR?= ${PORTSDIR} MOVEDFILE?= MOVED # Ensure .CURDIR contains an absolute path without a trailing slash. Failed # builds can occur when PORTSDIR is a symbolic link, or with something like # make -C /usr/ports/category/port/. .CURDIR:= ${.CURDIR:tA} .include "${PORTSDIR}/Mk/bsd.commands.mk" .MAIN: all .if !defined(DEBUG_FLAGS) STRIP?= -s .endif # These are variables that are invariant for the lifetime of a recursive port traversal # (index build, etc), so it is more efficient to precompute them here and pass them in # to child makes explicitly, instead of recomputing them tens of thousands of times. .if !defined(NOPRECIOUSMAKEVARS) -.if !defined(ARCH) +. if !defined(ARCH) ARCH!= ${UNAME} -p -.endif +. endif _EXPORTED_VARS+= ARCH -.if !defined(OSVERSION) -.if exists(/usr/include/sys/param.h) +. if !defined(OSVERSION) +. if exists(/usr/include/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h -.elif exists(${SRC_BASE}/sys/sys/param.h) +. elif exists(${SRC_BASE}/sys/sys/param.h) OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC_BASE}/sys/sys/param.h -.else +. else OSVERSION!= ${SYSCTL} -n kern.osreldate -.endif -.endif +. endif +. endif _EXPORTED_VARS+= OSVERSION WITH_PKG= yes WITH_PKGNG= yes -.if !defined(_OSRELEASE) +. if !defined(_OSRELEASE) _OSRELEASE!= ${UNAME} -r -.endif +. endif _EXPORTED_VARS+= _OSRELEASE -.if !defined(OSREL) +. if !defined(OSREL) OSREL= ${_OSRELEASE:C/[-(].*//} -.endif +. endif _EXPORTED_VARS+= OSREL -.if !defined(OPSYS) +. if !defined(OPSYS) OPSYS!= ${UNAME} -s -.endif +. endif _EXPORTED_VARS+= OPSYS -.if ${ARCH} == "amd64" -.if !defined(HAVE_COMPAT_IA32_KERN) +. if ${ARCH} == "amd64" +. if !defined(HAVE_COMPAT_IA32_KERN) HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi; echo -.if empty(HAVE_COMPAT_IA32_KERN) +. if empty(HAVE_COMPAT_IA32_KERN) .undef HAVE_COMPAT_IA32_KERN -.endif -.endif -.endif +. endif +. endif +. endif _EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN -.if !defined(CONFIGURE_MAX_CMD_LEN) +. if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax -.endif +. endif _EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN -.if !defined(_JAVA_VERSION_LIST_REGEXP) +. if !defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP!= ${MAKE} -V _JAVA_VERSION_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_VERSION_LIST_REGEXP -.if !defined(_JAVA_VENDOR_LIST_REGEXP) +. if !defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP!= ${MAKE} -V _JAVA_VENDOR_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_VENDOR_LIST_REGEXP -.if !defined(_JAVA_OS_LIST_REGEXP) +. if !defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP!= ${MAKE} -V _JAVA_OS_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_OS_LIST_REGEXP -.if !defined(_JAVA_PORTS_INSTALLED) +. if !defined(_JAVA_PORTS_INSTALLED) _JAVA_PORTS_INSTALLED!= ${MAKE} -V _JAVA_PORTS_INSTALLED USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk -.endif +. endif _EXPORTED_VARS+= _JAVA_PORTS_INSTALLED -.if !defined(UID) +. if !defined(UID) UID!= ${ID} -u -.endif +. endif _EXPORTED_VARS+= UID .endif INDEXDIR?= ${PORTSDIR} INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # local customization of the ports tree .sinclude "${.CURDIR}/Makefile.local" TARGETS+= all TARGETS+= build TARGETS+= checksum TARGETS+= clean TARGETS+= clean-for-cdrom TARGETS+= clean-for-cdrom-list TARGETS+= clean-restricted TARGETS+= clean-restricted-list TARGETS+= configure TARGETS+= deinstall TARGETS+= depend TARGETS+= depends TARGETS+= distclean TARGETS+= extract TARGETS+= fetch TARGETS+= fetch-list TARGETS+= ignorelist TARGETS+= ignorelist-verbose TARGETS+= makesum TARGETS+= maintainer TARGETS+= package TARGETS+= package-recursive TARGETS+= realinstall TARGETS+= reinstall TARGETS+= tags .for __target in ${TARGETS} -.if !target(${__target}) -.if defined(SUBDIR) && !empty(SUBDIR) +. if !target(${__target}) +. if defined(SUBDIR) && !empty(SUBDIR) ${__target}: ${SUBDIR:S/^/_/:S/$/.${__target}/} -.else +. else ${__target}: -.endif -.endif +. endif +. endif .endfor .if defined(SUBDIR) && !empty(SUBDIR) -.for __target in ${TARGETS} checksubdirs describe readmes +. for __target in ${TARGETS} checksubdirs describe readmes ${SUBDIR:S/^/_/:S/$/.${__target}/}: _SUBDIRUSE -.endfor +. endfor _SUBDIRUSE: .USE @OK=""; sub=${.TARGET:S/^_//:R}; \ for dud in $$DUDS; do \ if [ $${dud} = $$sub ]; then \ OK="false"; \ ${ECHO_MSG} "===> ${DIRPRFX}$$sub skipped"; \ fi; \ done; \ if test -d ${.CURDIR}/$${sub}.${MACHINE_ARCH}; then \ edir=$${sub}.${MACHINE_ARCH}; \ elif test -d ${.CURDIR}/$${sub}; then \ edir=$${sub}; \ else \ OK="false"; \ ${ECHO_MSG} "===> ${DIRPRFX}$${sub} non-existent"; \ fi; \ if [ "$$OK" = "" ]; then \ ${ECHO_MSG} "===> ${DIRPRFX}$${edir}"; \ cd ${.CURDIR}/$${edir}; \ ${MAKE} -B ${.TARGET:E:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/; \ fi -.for _subdir in ${SUBDIR:S/^/_/} +. for _subdir in ${SUBDIR:S/^/_/} ${_subdir}:: ${_subdir:S/$/.all/} -.endfor +. endfor .endif .if !target(install) -.if !target(beforeinstall) +. if !target(beforeinstall) beforeinstall: -.endif -.if !target(afterinstall) +. endif +. if !target(afterinstall) afterinstall: -.endif +. endif install: afterinstall afterinstall: realinstall realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/} .endif IGNOREDIR= Mk Templates Tools distfiles packages pkg Keywords .if !target(checksubdirs) -.if defined(PORTSTOP) +. if defined(PORTSTOP) checksubdirs: checksubdir ${SUBDIR:S/^/_/:S/$/.checksubdirs/} -.else +. else checksubdirs: checksubdir -.endif +. endif .endif .if !target(checksubdir) checksubdir: @for d in *; do \ if [ -d "$$d" ]; then \ found=0; \ for s in ${SUBDIR} ${IGNOREDIR}; do \ if [ "x$$s" = "x$$d" ]; then \ found=1; \ break; \ fi; \ done; \ if [ $$found = 0 ]; then \ ${ECHO_MSG} "Warning: directory $$d not in SUBDIR"; \ fi; \ fi; \ done @for s in ${SUBDIR}; do \ if ! [ -d ${.CURDIR}/$$s ]; then \ ${ECHO_MSG} "Warning: directory $$s in SUBDIR does not exist"; \ fi \ done .endif .if !target(describe) -.if defined(PORTSTOP) +. if defined(PORTSTOP) # This is a bit convoluted to deal with the fact that make will overlap I/O from child make processes # if they write more than 2k: this will corrupt the INDEX file. make -P does not do this, but it adds # extraneous output and redirects stderr, so we lose error reporting from child makes. Instead we have # to roll our own implementation of make -P and make sure that each child make writes to their own file, # which we will combine at the end. This gives substantial performance benefits over doing a make -j1 -.if defined(BUILDING_INDEX) +. if defined(BUILDING_INDEX) describe: ${SUBDIR:S/^/describe./} -.for i in ${SUBDIR} +. for i in ${SUBDIR} describe.$i: @cd ${.CURDIR}; ${MAKE} -B ${i:S/^/_/:S/$/.describe/} > ${INDEX_TMPDIR}/${INDEXFILE}.desc.${i} -.endfor -.else +. endfor +. else describe: ${SUBDIR:S/^/_/:S/$/.describe/} -.endif -.else +. endif +. else describe: @for sub in ${SUBDIR}; do \ if ${TEST} -d ${.CURDIR}/$${sub}; then \ ${ECHO_MSG} "===> ${DIRPRFX}$${sub}"; \ cd ${.CURDIR}/$${sub}; \ ${MAKE} -B describe || \ (${ECHO_CMD} "===> ${DIRPRFX}$${sub} failed" >&2; \ exit 1) ;\ else \ ${ECHO_MSG} "===> ${DIRPRFX}$${sub} non-existent"; \ fi; \ done -.endif +. endif .endif .if !target(readmes) -.if defined(PORTSTOP) +. if defined(PORTSTOP) readmes: readme ${SUBDIR:S/^/_/:S/$/.readmes/} @${ECHO_MSG} "===> Creating README.html for all ports" @perl ${PORTSDIR}/Tools/make_readmes < ${INDEXDIR}/${INDEXFILE} -.else +. else readmes: readme -.endif +. endif .endif .if !target(readme) readme: @${RM} README.html @${MAKE} README.html .endif HTMLIFY= ${SED} -e 's/&/\&/g' -e 's/>/\>/g' -e 's/ Creating README.html" @> $@.tmp .for entry in ${SUBDIR} -.if exists(${entry}) -.if defined(PORTSTOP) +. if exists(${entry}) +. if defined(PORTSTOP) @${ECHO_CMD} -n ''"`${ECHO_CMD} ${entry} | ${HTMLIFY}`"': ' >> $@.tmp -.else +. else @${ECHO_CMD} -n ''"`cd ${entry}; ${MAKE} package-name | ${HTMLIFY}`: " >> $@.tmp -.endif +. endif @${ECHO_CMD} `cd ${entry}; ${MAKE} -V COMMENT` | ${HTMLIFY} >> $@.tmp -.endif +. endif .endfor @${SORT} -t '>' +1 -2 $@.tmp > $@.tmp2 .if exists(${DESCR}) @${HTMLIFY} ${DESCR} > $@.tmp3 .else @> $@.tmp3 .endif .if defined(COMMENT) @${ECHO_CMD} "${COMMENT}" | ${HTMLIFY} > $@.tmp4 .else @> $@.tmp4 .endif @${CAT} ${README} | \ ${SED} -e 's/%%CATEGORY%%/'"`basename ${.CURDIR}`"'/g' \ -e '/%%COMMENT%%/r$@.tmp4' \ -e '/%%COMMENT%%/d' \ -e '/%%DESCR%%/r$@.tmp3' \ -e '/%%DESCR%%/d' \ -e '/%%SUBDIR%%/r$@.tmp2' \ -e '/%%SUBDIR%%/d' \ > $@ @${RM} $@.tmp $@.tmp2 $@.tmp3 $@.tmp4 # Pass in the cached invariant variables to child makes. .if !defined(NOPRECIOUSMAKEVARS) -.for var in ${_EXPORTED_VARS} -.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) +. for var in ${_EXPORTED_VARS} +. if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) .MAKEFLAGS: ${var}=${${var}:Q} -.endif -.endfor +. endif +. endfor .endif PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps,www PORTSEARCH_KEYLIM?=0 PORTSEARCH_XKEYLIM?=0 PORTSEARCH_IGNORECASE?=1 PORTSEARCH_MOVED?=1 _PORTSEARCH= \ here=${.CURDIR}; \ if [ ! -r ${INDEXDIR}/${INDEXFILE} ] ; then \ ${ECHO_MSG} "The ${.TARGET} target requires ${INDEXFILE}. Please run make index or make fetchindex."; \ else \ cd ${PORTSDIR}; \ if [ -z "$$key" -a -z "$$xkey" -a \ -z "$$name" -a -z "$$xname" -a \ -z "$$path" -a -z "$$xpath" -a \ -z "$$info" -a -z "$$xinfo" -a \ -z "$$maint" -a -z "$$xmaint" -a \ -z "$$cat" -a -z "$$xcat" -a \ -z "$$bdeps" -a -z "$$xbdeps" -a \ -z "$$rdeps" -a -z "$$xrdeps" -a \ -z "$$www" -a -z "$$xwww" ]; \ then \ ${ECHO_MSG} "The ${.TARGET} target requires a keyword parameter or name parameter,"; \ ${ECHO_MSG} "e.g.: \"make ${.TARGET} key=somekeyword\""; \ ${ECHO_MSG} "or \"make ${.TARGET} name=somekeyword\""; \ exit; \ fi; \ ${AWK} -F\| -v there="$$here/" -v top="$$(pwd -P)" \ -v key="$$key" -v xkey="$$xkey" \ -v name="$$name" -v xname="$$xname" \ -v path="$$path" -v xpath="$$xpath" \ -v info="$$info" -v xinfo="$$xinfo" \ -v maint="$$maint" -v xmaint="$$xmaint" \ -v cat="$$cat" -v xcat="$$xcat" \ -v bdeps="$$bdeps" -v xbdeps="$$xbdeps" \ -v rdeps="$$rdeps" -v xrdeps="$$xrdeps" \ -v www="$$www" -v xwww="$$xwww" \ -v icase="$${icase:-${PORTSEARCH_IGNORECASE}}" \ -v keylim="$${keylim:-${PORTSEARCH_KEYLIM}}" \ -v xkeylim="$${xkeylim:-${PORTSEARCH_XKEYLIM}}" \ -v display="$${display:-${PORTSEARCH_DISPLAY_FIELDS}}" \ -v xdisplay="$$xdisplay" \ 'BEGIN { \ gsub(/\+/,"\\+",name); \ if (substr(there, 1, length(top)) == top) \ there = "${PORTSDIR}" substr(there, 1 + length(top)); \ therelen = length(there); \ keylen = length(key); keylim = keylim && keylen; \ if (!keylim && keylen) \ parms[0] = (icase ? tolower(key) : key); \ xkeylen = length(xkey); xkeylim = xkeylim && xkeylen; \ if (!xkeylim && xkeylen) \ xparms[0] = (icase ? tolower(xkey) : xkey); \ if (icase) { \ if (length(name)) parms[1] = tolower(name); if (length(xname)) xparms[1] = tolower(xname); \ if (length(path)) parms[2] = tolower(path); if (length(xpath)) xparms[2] = tolower(xpath); \ if (length(info)) parms[4] = tolower(info); if (length(xinfo)) xparms[4] = tolower(xinfo); \ if (length(maint)) parms[6] = tolower(maint); if (length(xmaint)) xparms[6] = tolower(xmaint); \ if (length(cat)) parms[7] = tolower(cat); if (length(xcat)) xparms[7] = tolower(xcat); \ if (length(bdeps)) parms[8] = tolower(bdeps); if (length(xbdeps)) xparms[8] = tolower(xbdeps); \ if (length(rdeps)) parms[9] = tolower(rdeps); if (length(xrdeps)) xparms[9] = tolower(xrdeps); \ if (length(www)) parms[10] = tolower(www); if (length(xwww)) xparms[10] = tolower(xwww); \ } else { \ if (length(name)) parms[1] = name; if (length(xname)) xparms[1] = xname; \ if (length(path)) parms[2] = path; if (length(xpath)) xparms[2] = xpath; \ if (length(info)) parms[4] = info; if (length(xinfo)) xparms[4] = xinfo; \ if (length(maint)) parms[6] = maint; if (length(xmaint)) xparms[6] = xmaint; \ if (length(cat)) parms[7] = cat; if (length(xcat)) xparms[7] = xcat; \ if (length(bdeps)) parms[8] = bdeps; if (length(xbdeps)) xparms[8] = xbdeps; \ if (length(rdeps)) parms[9] = rdeps; if (length(xrdeps)) xparms[9] = xrdeps; \ if (length(www)) parms[10] = www; if (length(xwww)) xparms[10] = xwww; \ } \ fields["name"] = 1; names[1] = "Port"; \ fields["path"] = 2; names[2] = "Path"; \ fields["info"] = 4; names[4] = "Info"; \ fields["maint"] = 6; names[6] = "Maint"; \ fields["cat"] = 7; names[7] = "Index"; \ fields["bdeps"] = 8; names[8] = "B-deps"; \ fields["rdeps"] = 9; names[9] = "R-deps"; \ fields["www"] = 10; names[10] = "WWW"; \ split(display, d, /,[ \t]*/); \ split(xdisplay, xd, /,[ \t]*/); \ for (i in d) { \ toprint = 1; \ for (j in xd) { \ if (d[i] == xd[j] ) { \ toprint=0; \ break; \ }\ } \ if (toprint == 1 ) disp[fields[d[i]]] = 1; \ } \ } \ { \ if (match($$2, "^/usr/ports/[^/]*/[^/]*$$") > 0) \ sub("^/usr/ports", "${PORTSDIR}", $$2); \ if (substr($$2, 1, therelen) != there) \ next; \ for (i in parms) \ if ((icase ? tolower($$i) : $$i) !~ parms[i]) \ next; \ for (i in xparms) \ if ((icase ? tolower($$i) : $$i) ~ xparms[i]) \ next; \ found = 0; \ for (i = 1; i < 11; i++) \ if (i in disp) { \ if (xkeylim && (icase ? tolower($$i) : $$i) ~ xkey) \ next; \ if (!found && keylim && (icase ? tolower($$i) : $$i) ~ key) \ found = 1; \ } \ if (keylim && !found) \ next; \ for (i = 1; i < 11; i++) \ if (i in disp) \ printf("%s:\t%s\n", names[i], $$i); \ print(""); \ }' ${INDEXDIR}/${INDEXFILE}; \ if [ "$$name" -o "$$xname" ] && [ ${PORTSEARCH_MOVED} -gt 0 ]; \ then \ ${AWK} -F\| -v name="$$name" -v xname="$$xname" \ -v icase="$${icase:-${PORTSEARCH_IGNORECASE}}" \ 'BEGIN { \ if (icase) { \ if (length(name)) name = tolower(name); if (length(xname)) xname = tolower(xname); \ } \ fields["name"] = 1; names[1] = "Port"; \ fields["destination"] = 2; names[2] = "Moved"; \ fields["date"] = 3; names[3] = "Date"; \ fileds["reason"] = 4; names[4] = "Reason"; \ } \ { \ oldname = $$1; newname = $$2; \ if (oldname ~ /^\#/) next; \ sub(".*\/", "", oldname); newname = sub(".*\/", "", newname); \ if (((icase ? tolower(oldname) : oldname) ~ name) || \ ((icase ? tolower(newname) : newname) ~ name)) { \ for (i = 1; i <= 4; i++) { \ printf("%s:\t%s\n", names[i], $$i); \ } \ print(""); \ } \ }' ${MOVEDDIR}/${MOVEDFILE}; \ fi \ fi search: @${_PORTSEARCH} quicksearch: @export display="name,path,info" ; \ ${_PORTSEARCH} diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk index 38c118fbdd8e..406f127ed967 100644 --- a/Mk/bsd.ruby.mk +++ b/Mk/bsd.ruby.mk @@ -1,365 +1,365 @@ # bsd.ruby.mk - Utility definitions for Ruby related ports. # # Created by: Akinori MUSHA .if !defined(Ruby_Include) Ruby_Include= bsd.ruby.mk Ruby_Include_MAINTAINER= ruby@FreeBSD.org # # [variables that a user may define] # # RUBY_VER - (See below) # RUBY_DEFAULT_VER - Set to (e.g.) "2.7" if you want to refer to "ruby27" # just as "ruby". # RUBY_ARCH - (See below) # # [variables that each port can define] # # RUBY - Set to full path of ruby. If you set this, the values # of the following variables are automatically obtained # from the ruby executable: RUBY_VER, RUBY_VERSION, # RUBY_ARCH, RUBY_LIBDIR, RUBY_ARCHLIBDIR, # RUBY_SITELIBDIR, and RUBY_SITEARCHLIBDIR. # RUBY_VER - Set to the alternative short version of ruby in the # form of `x.y' (see below for current value). # USE_RUBY - Says that the port uses ruby for building and running. # RUBY_NO_BUILD_DEPENDS - Says that the port should not build-depend on ruby. # RUBY_NO_RUN_DEPENDS - Says that the port should not run-depend on ruby. # USE_RUBY_EXTCONF - Says that the port uses extconf.rb to configure. # Implies USE_RUBY. # RUBY_EXTCONF - Set to the alternative name of extconf.rb # (default: extconf.rb). # RUBY_EXTCONF_SUBDIRS - Set to list of subdirectories, if multiple modules # are included. # USE_RUBY_SETUP - Says that the port uses setup.rb to configure and # build. # RUBY_SETUP - Set to the alternative name of setup.rb # (default: setup.rb). # USE_RUBYGEMS - Do not use this -- instead USES=gem # # [variables that each port should not (re)define] # # RUBY_PKGNAMEPREFIX - Common PKGNAMEPREFIX for ruby ports # (default: ruby${RUBY_SUFFIX}-) # RUBY_VERSION - Full version of ruby without preview/beta suffix in # the form of `x.y.z' (see below for current value). # RUBY_VERSION_CODE - Integer version of RUBY_VERSION in the form of # `xyz'. # RUBY_DISTVERSION - DISTVERSION for the standard ruby ports (ruby, # ruby-gdbm, etc.). # RUBY_PORTVERSION - PORTVERSION for the standard ruby ports (ruby, # ruby-gdbm, etc.). # RUBY_PORTREVISION - PORTREVISION for the standard ruby ports. # RUBY_PORTEPOCH - PORTEPOCH for the standard ruby ports. # RUBY_DISTNAME - DISTNAME for the standard ruby ports, i.e. the # basename of the ruby distribution tarball. # RUBY_PATCHFILES - PATCHFILES for the standard ruby ports, i.e. the # basename of the ruby distribution tarball. # RUBY_WRKSRC - WRKSRC for the ruby port. # MASTER_SITE_SUBDIR_RUBY - MASTER_SITE_SUBDIR for the ruby distfiles. # # RUBY_SHLIBVER - Major version of libruby (see below for current # value). # RUBY_ARCH - Set to target architecture name. # (e.g. i386-freebsd7) # RUBY_SUFFIX - Suffix for ruby binaries and directories # (${RUBY_VER:S/.//}). # RUBY_WITHOUT_SUFFIX - Always ${LOCALBASE}/bin/ruby. # RUBY_WITH_SUFFIX - Always ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX}. # # RUBY_MODNAME - Set to the module name (default: ${PORTNAME}). # # RUBY_RDOC - Full path of rdoc executable. # # RUBY_BASE_PORT - Port path of base ruby without PORTSDIR, without # suffix except version. # RUBY_PORT - Port path of ruby without PORTSDIR. # # DEPEND_RUBY - BUILD_DEPENDS/RUN_DEPENDS entry for ruby. # # RUBY_LIBDIR - Installation path for architecture independent # libraries. # RUBY_ARCHLIBDIR - Installation path for architecture dependent # libraries. # RUBY_SITELIBDIR - Installation path for site architecture independent # libraries. # RUBY_SITEARCHLIBDIR - Installation path for site architecture dependent # libraries. # RUBY_DOCDIR - Installation path for documents. # RUBY_EXAMPLESDIR - Installation path for examples. # RUBY_RIDIR - Installation path for site architecture independent ri # documents. # RUBY_SITERIDIR - Installation path for site architecture dependent ri # documents. # RUBY_MODDOCDIR - Installation path for the module's documents. # RUBY_MODEXAMPLESDIR - Installation path for the module's examples. # -.if defined(RUBY_DEFAULT_VER) +. if defined(RUBY_DEFAULT_VER) WARNING+= "RUBY_DEFAULT_VER is defined, consider using DEFAULT_VERSIONS=ruby=${RUBY_DEFAULT_VER} instead" -.endif +. endif RUBY_DEFAULT_VER?= ${RUBY_DEFAULT} RUBY_VER?= ${RUBY_DEFAULT_VER} -.if defined(RUBY) -.if !exists(${RUBY}) +. if defined(RUBY) +. if !exists(${RUBY}) IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable -.endif +. endif _RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end' -.if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" +. if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it failed to include rbconfig. Please specify a properly installed ruby executable -.endif +. endif _RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = RbConfig::CONFIG' -e RUBY_VERSION!= ${_RUBY_CONFIG} 'puts C["ruby_version"]' RUBY_SUFFIX?= # empty RUBY_ARCH!= ${_RUBY_CONFIG} 'puts C["target"]' _RUBY_SYSLIBDIR!= ${_RUBY_CONFIG} 'puts C["libdir"]' _RUBY_SITEDIR!= ${_RUBY_CONFIG} 'puts C["sitedir"]' _RUBY_VENDORDIR!= ${_RUBY_CONFIG} 'puts C["vendordir"]' -.else +. else RUBY?= ${LOCALBASE}/bin/ruby${RUBY_SUFFIX} -.if defined(RUBY_VER) +. if defined(RUBY_VER) # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -. if ${RUBY_VER} == 2.7 +. if ${RUBY_VER} == 2.7 # # Ruby 2.7 # RUBY_DISTVERSION= 2.7.6 RUBY_PORTREVISION= 1 RUBY_PORTEPOCH= 1 RUBY27= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 3.0 +. elif ${RUBY_VER} == 3.0 # # Ruby 3.0 # RUBY_DISTVERSION= 3.0.4 RUBY_PORTREVISION= 1 RUBY_PORTEPOCH= 1 RUBY30= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 3.1 +. elif ${RUBY_VER} == 3.1 # # Ruby 3.1 # RUBY_DISTVERSION= 3.1.2 RUBY_PORTREVISION= 0 RUBY_PORTEPOCH= 1 RUBY31= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 3.2 +. elif ${RUBY_VER} == 3.2 # # Ruby 3.2 # RUBY_DISTVERSION= 3.2.0-preview1 RUBY_PORTREVISION= 1 RUBY_PORTEPOCH= 1 RUBY32= "" # PLIST_SUB helpers # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -. else +. else # # Other versions # IGNORE= Only ruby 2.7, 3.0, 3.1 and 3.2 are supported _INVALID_RUBY_VER= 1 -. endif +. endif RUBY_VERSION= ${RUBY_DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/} -.endif # defined(RUBY_VER) +. endif # defined(RUBY_VER) -.if !defined(_INVALID_RUBY_VER) +. if !defined(_INVALID_RUBY_VER) RUBY27?= "@comment " RUBY30?= "@comment " RUBY31?= "@comment " RUBY32?= "@comment " -.if defined(BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}) -.if ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} == "yes" +. if defined(BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}) +. if ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} == "yes" BROKEN= does not build with Ruby ${RUBY_VER} -.else +. else BROKEN= ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} -.endif -.endif +. endif +. endif RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION} RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-${RUBY_VER}/" \ --with-rubylibprefix="${PREFIX}/lib/ruby" \ --docdir="${RUBY_DOCDIR}" \ --with-soname=ruby${RUBY_SUFFIX} CONFIGURE_TARGET?= ${ARCH}-portbld-${OPSYS:tl}${OSREL:C/\..*//} RUBY_ARCH?= ${ARCH}-${OPSYS:tl}${OSREL:C/\..*//} _RUBY_SYSLIBDIR?= ${PREFIX}/lib _RUBY_SITEDIR?= ${_RUBY_SYSLIBDIR}/ruby/site_ruby _RUBY_VENDORDIR?= ${_RUBY_SYSLIBDIR}/ruby/vendor_ruby -.endif -.endif +. endif +. endif # defined(RUBY) -.if !defined(_INVALID_RUBY_VER) +. if !defined(_INVALID_RUBY_VER) RUBY_DEFAULT_SUFFIX?= ${RUBY_DEFAULT_VER:S/.//} RUBY_PORTVERSION?= ${RUBY_DISTVERSION:tl:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g} MASTER_SITE_SUBDIR_RUBY?= ${RUBY_VER} RUBY_DISTNAME?= ruby-${RUBY_DISTVERSION} RUBY_WRKSRC?= ${WRKDIR}/${RUBY_DISTNAME} RUBY_RELVERSION_CODE?= ${RUBY_RELVERSION:S/.//g} RUBY_VERSION_CODE?= ${RUBY_VERSION:S/.//g} RUBY_VER= ${RUBY_VERSION:C/([[:digit:]]+\.[[:digit:]]+).*/\1/} RUBY_SUFFIX= ${RUBY_VER:S/.//} RUBY_WITHOUT_SUFFIX?= ${LOCALBASE}/bin/ruby RUBY_WITH_SUFFIX?= ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX} RUBY_PKGNAMEPREFIX?= ruby${RUBY_SUFFIX}- RUBY_SHLIBVER?= ${RUBY_VER:S/.//} RUBY_CONFIGURE_ARGS+= --program-prefix="" -.if ${RUBY_VER} != ${RUBY_DEFAULT_VER} +. if ${RUBY_VER} != ${RUBY_DEFAULT_VER} DEPENDS_ARGS+= RUBY_VER=${RUBY_VER} -.endif +. endif RUBY_CONFIGURE_ARGS+= --program-suffix="${RUBY_SUFFIX}" RUBY_MODNAME?= ${PORTNAME} # Commands RUBY_RDOC?= ${LOCALBASE}/bin/rdoc # Ports RUBY_BASE_PORT?= lang/ruby${RUBY_VER:S/.//} RUBY_PORT?= ${RUBY_BASE_PORT} # Depends DEPEND_RUBY?= ${RUBY}:${RUBY_PORT} # Directories RUBY_LIBDIR?= ${_RUBY_SYSLIBDIR}/ruby/${RUBY_VER} RUBY_ARCHLIBDIR?= ${RUBY_LIBDIR}/${RUBY_ARCH} RUBY_SITELIBDIR?= ${_RUBY_SITEDIR}/${RUBY_VER} RUBY_SITEARCHLIBDIR?= ${RUBY_SITELIBDIR}/${RUBY_ARCH} RUBY_VENDORLIBDIR?= ${_RUBY_VENDORDIR}/${RUBY_VER} RUBY_VENDORARCHLIBDIR?= ${RUBY_VENDORLIBDIR}/${RUBY_ARCH} RUBY_DOCDIR?= ${PREFIX}/share/doc/ruby${RUBY_SUFFIX} RUBY_EXAMPLESDIR?= ${PREFIX}/share/examples/ruby${RUBY_SUFFIX} RUBY_RIDIR?= ${PREFIX}/share/ri/${RUBY_VER}/system RUBY_SITERIDIR?= ${PREFIX}/share/ri/${RUBY_VER}/site RUBY_MODDOCDIR?= ${RUBY_DOCDIR}/${RUBY_MODNAME} RUBY_MODEXAMPLESDIR?= ${RUBY_EXAMPLESDIR}/${RUBY_MODNAME} # PLIST PLIST_RUBY_DIRS= RUBY_LIBDIR="${RUBY_LIBDIR}" \ RUBY_ARCHLIBDIR="${RUBY_ARCHLIBDIR}" \ RUBY_SITELIBDIR="${RUBY_SITELIBDIR}" \ RUBY_SITEARCHLIBDIR="${RUBY_SITEARCHLIBDIR}" \ RUBY_VENDORLIBDIR="${RUBY_VENDORLIBDIR}" \ RUBY_VENDORARCHLIBDIR="${RUBY_VENDORARCHLIBDIR}" \ RUBY_MODDOCDIR="${RUBY_MODDOCDIR}" \ RUBY_MODEXAMPLESDIR="${RUBY_MODEXAMPLESDIR}" \ RUBY_DOCDIR="${RUBY_DOCDIR}" \ RUBY_EXAMPLESDIR="${RUBY_EXAMPLESDIR}" \ RUBY_RIDIR="${RUBY_RIDIR}" \ RUBY_SITERIDIR="${RUBY_SITERIDIR}" PLIST_SUB+= ${PLIST_RUBY_DIRS:C,DIR="(${LOCALBASE}|${PREFIX})/,DIR=",} \ RUBY_VERSION="${RUBY_VERSION}" \ RUBY_VER="${RUBY_VER}" \ RUBY_SHLIBVER="${RUBY_SHLIBVER}" \ RUBY_ARCH="${RUBY_ARCH}" \ RUBY_SUFFIX="${RUBY_SUFFIX}" \ RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" \ RUBY27=${RUBY27} \ RUBY30=${RUBY30} \ RUBY31=${RUBY31} \ RUBY32=${RUBY32} -.if ${PORT_OPTIONS:MDEBUG} +. if ${PORT_OPTIONS:MDEBUG} RUBY_FLAGS+= -d -.endif +. endif # # extconf.rb support # -.if defined(USE_RUBY_EXTCONF) +. if defined(USE_RUBY_EXTCONF) USE_RUBY= yes RUBY_EXTCONF?= extconf.rb CONFIGURE_ARGS+= --with-opt-dir="${LOCALBASE}" CONFIGURE_ENV+= RB_USER_INSTALL=yes do-configure: ruby-extconf-configure ruby-extconf-configure: -.if defined(RUBY_EXTCONF_SUBDIRS) -.for d in ${RUBY_EXTCONF_SUBDIRS} +. if defined(RUBY_EXTCONF_SUBDIRS) +. for d in ${RUBY_EXTCONF_SUBDIRS} @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure" @cd ${CONFIGURE_WRKSRC}/${d}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} -.endfor -.else +. endfor +. else @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure" @cd ${CONFIGURE_WRKSRC}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} -.endif -.endif +. endif +. endif # # setup.rb support # -.if defined(USE_RUBY_SETUP) +. if defined(USE_RUBY_SETUP) RUBY_SETUP?= setup.rb do-configure: ruby-setup-configure ruby-setup-configure: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to configure" @cd ${BUILD_WRKSRC}; \ ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} config ${CONFIGURE_ARGS} do-build: ruby-setup-build ruby-setup-build: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to build" @cd ${BUILD_WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} setup do-install: ruby-setup-install ruby-setup-install: @${ECHO_MSG} "===> Running ${RUBY_SETUP} to install" @cd ${INSTALL_WRKSRC}; \ ${SETENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} -.endif +. endif -.if defined(USE_RUBY) -.if !defined(RUBY_NO_BUILD_DEPENDS) +. if defined(USE_RUBY) +. if !defined(RUBY_NO_BUILD_DEPENDS) EXTRACT_DEPENDS+= ${DEPEND_RUBY} PATCH_DEPENDS+= ${DEPEND_RUBY} BUILD_DEPENDS+= ${DEPEND_RUBY} -.endif -.if !defined(RUBY_NO_RUN_DEPENDS) +. endif +. if !defined(RUBY_NO_RUN_DEPENDS) RUN_DEPENDS+= ${DEPEND_RUBY} -.endif -.endif +. endif +. endif -.endif # _INVALID_RUBY_VER +. endif # _INVALID_RUBY_VER .endif diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk index 1e7578ed2c3c..ac76013ef80b 100644 --- a/Mk/bsd.sanity.mk +++ b/Mk/bsd.sanity.mk @@ -1,313 +1,313 @@ # MAINTAINER: portmgr@FreeBSD.org # # Warnings for everyone .for opt in ${ALL_OPTIONS:NDEBUG} -.if defined(WITH_${opt}) +. if defined(WITH_${opt}) WARNING+= "WITH_${opt} is unsupported, use WITH=${opt} on the command line, or one of these in /etc/make.conf, OPTIONS_SET+=${opt} to set it globally, or ${OPTIONS_NAME}_SET+=${opt} for only this port." -.endif -.if defined(WITHOUT_${opt}) +. endif +. if defined(WITHOUT_${opt}) WARNING+= "WITHOUT_${opt} is unsupported, use WITHOUT=${opt} on the command line, or one of these in /etc/make.conf, OPTIONS_UNSET+=${opt} to set it globally, or ${OPTIONS_NAME}_UNSET+=${opt} for only this port." -.endif +. endif .endfor ALL_UNSUPPORTED= WITHOUT_NLS NOPORTDOCS NOPORTEXAMPLES WITH_BDB_VER \ OVERRIDE_LINUX_BASE_PORT WITH_OPENSSL_PORT \ WITH_OPENSSL_BASE PYTHON_DEFAULT_VERSION \ PYTHON2_DEFAULT_VERSION PYTHON3_DEFAULT_VERSION ALL_DEPRECATED= ALL_NOTNEEDED= WITH_NEW_XORG WITHOUT_NEW_XORG WITH_KMS WITHOUT_KMS WITHOUT_NLS_ALT= "OPTIONS_UNSET=NLS, or ${OPTIONS_NAME}_UNSET+=NLS instead" NOPORTDOCS_ALT= "OPTIONS_UNSET=DOCS, or ${OPTIONS_NAME}_UNSET+=DOCS instead" NOPORTEXAMPLES_ALT= "OPTIONS_UNSET=EXAMPLES, or ${OPTIONS_NAME}_UNSET+=EXAMPLES instead" WITH_BDB_VER_ALT= "DEFAULT_VERSIONS+=bdb=${WITH_BDB_VER}" OVERRIDE_LINUX_BASE_PORT_ALT= "DEFAULT_VERSIONS+=linux=${OVERRIDE_LINUX_BASE_PORT}" WITH_OPENSSL_PORT_ALT= "DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT:Uopenssl} in your make.conf" WITH_OPENSSL_BASE_ALT= "DEFAULT_VERSIONS+=ssl=base in your make.conf" WITH_NEW_XORG_ALT= "removed and has no effect" WITHOUT_NEW_XORG_ALT= ${WITH_NEW_XORG_ALT} WITH_MKS_ALT= "removed and has no effect" WITHOUT_MKS_ALT= ${WITH_MKS_ALT} PYTHON_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python=${PYTHON_DEFAULT_VERSION:S/^python//}" PYTHON2_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION:S/^python//}" PYTHON3_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//}" .for a in ${ALL_DEPRECATED} -.if defined(${a}) +. if defined(${a}) WARNING+= "${a} is deprecated, please use ${${a}_ALT}" -.endif +. endif .endfor .for a in ${ALL_NOTNEEDED} -.if defined(${a}) +. if defined(${a}) WARNING+= "${a} is not needed: ${${a}_REASON}" -.endif +. endif .endfor .for a in ${ALL_UNSUPPORTED} -.if defined(${a}) +. if defined(${a}) ERROR+= "${a} is unsupported, please use ${${a}_ALT}" -.endif +. endif .endfor # Warnings only when DEVELOPER=yes .if exists(${.CURDIR}/../../Mk/bsd.port.mk) || ${OVERLAYS:tA:M${.CURDIR:H:H}} == ${.CURDIR:H:H} -.if ${.CURDIR:H:T} != ${PKGCATEGORY} +. if ${.CURDIR:H:T} != ${PKGCATEGORY} DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives" -.endif +. endif .else DEV_WARNING+= "Not validating first entry in CATEGORIES due to being outside of PORTSDIR. Please ensure this is proper when committing." .endif .if defined(USE_PERL5) && ${USE_PERL5} == yes DEV_ERROR+= "USE_PERL5=yes is unsupported, please use USES=perl5 instead" .endif .if !empty(LIB_DEPENDS:M*/../*) DEV_ERROR+= "LIB_DEPENDS contains unsupported relative path to dependency" .endif .if !empty(RUN_DEPENDS:M*/../*) DEV_ERROR+= "RUN_DEPENDS contains unsupported relative path to dependency" .endif .if defined(USE_GNOME) && ${USE_GNOME:Mpkgconfig} DEV_ERROR+= "USE_GNOME=pkgconfig is unsupported, please use USES=pkgconfig" .endif .if defined(USE_ZOPE) && ${USE_ZOPE} == yes DEV_ERROR+= "USE_ZOPE=yes is unsupported, please use USES=zope instead" .endif .if defined(USE_SDL) && ${USE_SDL} == yes DEV_ERROR+= "USE_SDL=yes is unsupported, please use USE_SDL=sdl instead" .endif .if defined(USE_GITHUB) && defined(GH_COMMIT) DEV_ERROR+= "GH_COMMIT is unsupported, please convert GHL-\>GH in MASTER_SITES and set GH_TAGNAME to tag or commit hash and remove GH_COMMIT" .endif .if defined(USE_GNOME) && ${USE_GNOME:Mgnomehack} DEV_WARNING+= "USE_GNOME=gnomehack is deprecated, please use USES=pathfix" .endif .if defined(USE_GNOME) && ${USE_GNOME:Mdesktopfileutils} DEV_WARNING+= "USE_GNOME=desktopfileutils is deprecated, please use USES=desktop-file-utils" .endif .if defined(LIB_DEPENDS) && ${LIB_DEPENDS:Nlib*} DEV_ERROR+= "All LIB_DEPENDS should use the new format and start out with lib. \(libfoo.so vs foo.so\)" .endif .if defined(LICENSE) -.if ${LICENSE:MBSD} +. if ${LICENSE:MBSD} DEV_WARNING+= "LICENSE must not contain BSD, instead use BSD[234]CLAUSE" -.endif +. endif .elif !defined(DISABLE_LICENSES) . if empty(USES:Mmetaport) DEV_WARNING+= "Please set LICENSE for this port" . endif .endif .for _a in ${ONLY_FOR_ARCHS} -.if defined(ONLY_FOR_ARCHS_REASON_${_a}) +. if defined(ONLY_FOR_ARCHS_REASON_${_a}) DEV_WARNING+= "ONLY_FOR_ARCHS_${_a} is defined and ${_a} is in ONLY_FOR_ARCHS, the message will never be used." -.endif +. endif .endfor .if defined(USE_PYDISTUTILS) && ${USE_PYDISTUTILS} == "easy_install" DEV_ERROR+= "USE_PYDISTUTILS=easy_install is no longer supported, please use USE_PYDISTUTILS=yes" .endif .if defined(USE_PYTHON) && (${USE_PYTHON} == "yes" || ${USE_PYTHON:C/[-0-9.+]*//} == "") _PYTHON_VAL := ${USE_PYTHON} -.if ${_PYTHON_VAL} != "yes" +. if ${_PYTHON_VAL} != "yes" DEV_ERROR+= "USE_PYTHON=${_PYTHON_VAL} is no longer supported, please use USES=python:${_PYTHON_VAL}" -.else +. else DEV_ERROR+= "USE_PYTHON=yes is no longer supported, please use USES=python" -.endif +. endif .endif .if defined(USE_PYTHON_RUN) -.if ${USE_PYTHON_RUN} != "yes" +. if ${USE_PYTHON_RUN} != "yes" DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:${USE_PYTHON_RUN},run" -.else +. else DEV_ERROR+= "USE_PYTHON_RUN is no longer supported, please use USES=python:run" -.endif +. endif .endif .if defined(USE_PYTHON_BUILD) -.if ${USE_PYTHON_BUILD} != "yes" +. if ${USE_PYTHON_BUILD} != "yes" DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:${USE_PYTHON_BUILD},build" -.else +. else DEV_ERROR+= "USE_PYTHON_BUILD is no longer supported, please use USES=python:build" -.endif +. endif .endif .if defined(USE_RC_SUBR) && ${USE_RC_SUBR:tu} == YES DEV_ERROR+= "USE_RC_SUBR=yes has not been supported for a long time, remove it." .endif .if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TCL_RUN) || defined(USE_TCL_WRAPPER) || \ defined(USE_TK) || defined(USE_TK_BUILD) || defined(USE_TK_RUN) || defined(USE_TK_WRAPPER) DEV_ERROR+= "USE_TCL and USE_TK are no longer supported, please use USES=tcl or USES=tk" .endif .if defined(USE_FPC) && ${USE_FPC:tl} == "yes" DEV_ERROR+= "USE_FPC=yes is no longer supported, please use USES=fpc" .endif .for _type in EXAMPLES DOCS . if defined(PORT${_type}) && empty(_REALLY_ALL_POSSIBLE_OPTIONS:M${_type}) DEV_ERROR+= "PORT${_type} does not do anything unless the ${_type} option is present." . endif .endfor .if empty(PORTEPOCH) || !empty(PORTEPOCH:C/[0-9]+//) DEV_ERROR+= "PORTEPOCH needs to be an integer \>= 0" .endif .if empty(PORTREVISION) || !empty(PORTREVISION:C/[0-9]+//) DEV_ERROR+= "PORTREVISION needs to be an integer \>= 0" .endif # Whitelist of options helper lookalikes that should not be reported on: _OPTIONS_HELPERS_SEEN+= OPENSSL_LDFLAGS _BROKEN_OPTIONS_HELPERS= .for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} . for helper in ${_ALL_OPTIONS_HELPERS} . if defined(${opt}_${helper}) && empty(_OPTIONS_HELPERS_SEEN:M${opt}_${helper}) _BROKEN_OPTIONS_HELPERS+= ${opt}_${helper} . endif . endfor .endfor .if !empty(_BROKEN_OPTIONS_HELPERS) DEV_ERROR+= "The following options helpers are incorrectly set after bsd.port.options.mk and are ineffective: ${_BROKEN_OPTIONS_HELPERS}" .endif SANITY_UNSUPPORTED= USE_OPENAL USE_FAM USE_MAKESELF USE_ZIP USE_LHA USE_CMAKE \ USE_READLINE USE_ICONV PERL_CONFIGURE PERL_MODBUILD \ USE_PERL5_BUILD USE_PERL5_RUN USE_DISPLAY USE_FUSE \ USE_GETTEXT USE_GMAKE USE_SCONS USE_DRUPAL NO_INSTALL_MANPAGES \ INSTALLS_SHLIB USE_PYDISTUTILS PYTHON_CONCURRENT_INSTALL \ PYDISTUTILS_AUTOPLIST PYTHON_PY3K_PLIST_HACK PYDISTUTILS_NOEGGINFO \ USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \ UNIQUENAME LATEST_LINK USE_SQLITE USE_FIREBIRD USE_PHPEXT \ USE_ZENDEXT USE_PHP_BUILD USE_PHPIZE WANT_PHP_CLI WANT_PHP_CGI \ WANT_PHP_MOD WANT_PHP_WEB WANT_PHP_EMB USE_BDB PLIST_DIRSTRY \ USE_RCORDER USE_OPENSSL WANT_GNOME RUBYGEM_AUTOPLIST WANT_SDL \ INSTALLS_EGGINFO USE_DOS2UNIX NO_STAGE USE_RUBYGEMS USE_GHOSTSCRIPT \ USE_GHOSTSCRIPT_BUILD USE_GHOSTSCRIPT_RUN USE_AUTOTOOLS APACHE_PORT \ USE_FPC_RUN WANT_FPC_BASE WANT_FPC_ALL USE_QT4 USE_QT5 QT_NONSTANDARD \ XORG_CAT CARGO_USE_GITHUB CARGO_USE_GITLAB CARGO_GIT_SUBDIR SANITY_DEPRECATED= MLINKS \ USE_MYSQL WANT_MYSQL_VER \ PYDISTUTILS_INSTALLNOSINGLE \ USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN SANITY_NOTNEEDED= CMAKE_NINJA WX_UNICODE USE_KDEBASE_VER \ USE_KDELIBS_VER USE_QT_VER .for a in 1 2 3 4 5 6 7 8 9 L N SANITY_DEPRECATED+= MAN${a} MAN${a}_ALT= pkg-plist to list manpages .endfor USE_AUTOTOOLS_ALT= USES=autoreconf and GNU_CONFIGURE=yes USE_OPENAL_ALT= USES=openal USE_FAM_ALT= USES=fam USE_MAKESELF_ALT= USES=makeself USE_ZIP_ALT= USES=zip USE_LHA_ALT= USES=lha USE_BZIP2_ALT= USES=tar:bzip2 USE_XZ_ALT= USES=tar:xz USE_CMAKE_ALT= USES=cmake USE_READLINE_ALT= USES=readline USE_ICONV_ALT= USES=iconv USE_GMAKE_ALT= USES=gmake PERL_CONFIGURE_ALT= USES=perl5 along with USE_PERL5=configure PERL_MODBUILD_ALT= USES=perl5 along with USE_PERL5=modbuild USE_PERL5_BUILD_ALT= USES=perl5 along with USE_PERL5=build USE_PERL5_RUN_ALT= USES=perl5 along with USE_PERL5=run USE_DISPLAY_ALT= USES=display USE_FUSE_ALT= USES=fuse USE_GETTEXT_ALT= USES=gettext USE_SCONS_ALT= USES=scons USE_DRUPAL_ALT= USES=drupal USE_PYDISTUTILS_ALT= USE_PYTHON=distutils USE_PGSQL_ALT= USES=pgsql INSTALLS_SHLIB_ALT= USE_LDCONFIG NEED_ROOT_ALT= USES=fakeroot or USES=uidfix PYTHON_CONCURRENT_INSTALL_ALT= USE_PYTHON=concurrent PYDISTUTILS_AUTOPLIST_ALT= USE_PYTHON=autoplist PYTHON_PY3K_PLIST_HACK_ALT= USE_PYTHON=py3kplist PYDISTUTILS_NOEGGINFO_ALT= USE_PYTHON=noegginfo USE_PYTHON_PREFIX_ALT= USE_PYTHON=pythonprefix NO_INSTALL_MANPAGES_ALT= USES=imake:noman UNIQUENAME_ALT= PKGBASE LATEST_LINK_ALT= PKGBASE CMAKE_NINJA_REASON= Now the ninja generator is the default WX_UNICODE_REASON= Now no-op as only unicode is supported now PLIST_DIRSTRY_ALT= PLIST_DIRS USE_SQLITE_ALT= USES=sqlite USE_FIREBIRD_ALT= USES=firebird USE_BDB_ALT= USES=bdb:${USE_BDB} USE_MYSQL_ALT= USES=mysql:${USE_MYSQL} WANT_MYSQL_VER_ALT= USES=mysql:${WANT_MYSQL_VER} USE_OPENSSL_ALT= USES=ssl USE_PHPIZE_ALT= USES=php:phpize USE_PHPEXT_ALT= USES=php:ext USE_ZENDEXT_ALT= USES=php:zend USE_PHP_BUILD_ALT= USES=php:build WANT_PHP_CLI_ALT= USES=php:cli WANT_PHP_CGI_ALT= USES=php:cgi WANT_PHP_MOD_ALT= USES=php:mod WANT_PHP_WEB_ALT= USES=php:web WANT_PHP_EMB_ALT= USES=php:embed USE_RCORDER_ALT= USE_RC_SUBR=${USE_RCORDER} WANT_GNOME_ALT= USES=gnome MLINKS_ALT= it no more USE_DOS2UNIX_ALT= USES=dos2unix PYDISTUTILS_INSTALLNOSINGLE_ALT= it no more INSTALLS_EGGINFO_ALT= an entry in the plist WANT_SDL_ALT= USE_SDL for SDL directly, if you need optional dependency, use options RUBYGEM_AUTOPLIST_ALT= USES=gem USE_RUBYGEMS_ALT= USES=gem USE_GHOSTSCRIPT_ALT= USES=ghostscript USE_GHOSTSCRIPT_BUILD_ALT= USES=ghostscript USE_GHOSTSCRIPT_RUN_ALT= USES=ghostscript NO_STAGE_ALT= https://wiki.freebsd.org/ports/StageDir to convert your port to staging USE_APACHE_ALT= USES=apache:${USE_APACHE:C/2(0-9)/2.\1/g} USE_APACHE_BUILD_ALT= USES=apache:build,${USE_APACHE_BUILD:C/2(0-9)/2.\1/g} USE_APACHE_RUN_ALT= USES=apache:run,${USE_APACHE_RUN:C/2(0-9)/2.\1/g} APACHE_PORT_ALT= DEFAULT_VERSIONS+=apache=${APACHE_PORT:S/www\/apache//:C/2(0-9)/2.\1/} USE_FPC_RUN_ALT= USES=fpc:run WANT_FPC_BASE_ALT= USES=fpc:base WANT_FPC_ALL_ALT= USES=fpc:all USE_QT4_ALT= USES=qt:5 and USE_QT=${USE_QT4} \(beware\) as Qt4 has been removed USE_QT5_ALT= USES=qt:5 and USE_QT=${USE_QT5} QT_NONSTANDARD_ALT= USES=qmake:no_env XORG_CAT_ALT= USES=xorg-cat:${XORG_CAT} CARGO_USE_GITHUB_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) CARGO_USE_GITLAB_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) CARGO_GIT_SUBDIR_ALT= CARGO_CRATES \(regenerate it with make cargo-crates\) .for a in ${SANITY_DEPRECATED} -.if defined(${a}) +. if defined(${a}) DEV_WARNING+= "${a} is deprecated, please use ${${a}_ALT}" -.endif +. endif .endfor .for a in ${SANITY_NOTNEEDED} -.if defined(${a}) +. if defined(${a}) DEV_WARNING+= "${a} is not needed: ${${a}_REASON}" -.endif +. endif .endfor .for a in ${SANITY_UNSUPPORTED} -.if defined(${a}) +. if defined(${a}) DEV_ERROR+= "${a} is unsupported, please use ${${a}_ALT}" -.endif +. endif .endfor diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk index 1ec0300fd5c0..b9fd5b555882 100644 --- a/Mk/bsd.sites.mk +++ b/Mk/bsd.sites.mk @@ -1,1356 +1,1356 @@ # bsd.sites.mk - Popular master sites. # # Sites_MAINTAINER= ports@FreeBSD.org # # This file does not have any designated maintainer, so feel free to # commit to it yourself. However, it is generally a good idea to # notify the principal maintainer in case you have a change to one of # the software environments (KDE, GNOME, etc.). # # Also, this file is included from bsd.port.mk for all invocations, so # committing a syntax error to this file is a cardinal sin, and will # be punished accordingly. DO NOT COMMIT SOMETHING YOU HAVEN'T TESTED. # You have been warned. :) # # Note: because it is included for all invocations, please keep the size # of this file manageable. If a distfile is unfetchable from the first # few dozen locations, it is unlikely to be fetchable from any past that, # and those fetch failures will simply waste time and bandwidth. Please # pick a globally representative subset. # # Note: all entries should terminate with a slash. # Where to put distfiles that don't have any other master site .if !defined(IGNORE_MASTER_SITE_LOCAL) MASTER_SITE_LOCAL+= \ http://distcache.FreeBSD.org/local-distfiles/%SUBDIR%/ \ http://distcache.us-east.FreeBSD.org/local-distfiles/%SUBDIR%/ \ http://distcache.eu.FreeBSD.org/local-distfiles/%SUBDIR%/ \ http://distcache.us-west.FreeBSD.org/local-distfiles/%SUBDIR%/ MASTER_SITE_PORTS_JP+= \ ftp://ports.jp.FreeBSD.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \ ftp://ftp4.jp.FreeBSD.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \ ftp://ftp.ics.es.osaka-u.ac.jp/pub/mirrors/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ .endif ## ## KEEP THIS LIST SORTED ## .if !defined(IGNORE_MASTER_SITE_AFTERSTEP) MASTER_SITE_AFTERSTEP+= \ ftp://ftp.afterstep.org/%SUBDIR%/ \ ftp://ftp.kddlabs.co.jp/X11/AfterStep/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_APACHE) MASTER_SITE_APACHE+= \ https://dlcdn.apache.org/%SUBDIR%/ \ https://mirror.netcologne.de/apache.org/%SUBDIR%/ \ https://ftp.wayne.edu/apache/%SUBDIR%/ \ https://mirror.its.dal.ca/apache/%SUBDIR%/ \ http://mirror.cogentco.com/pub/apache/%SUBDIR%/ \ http://mirror.navercorp.com/apache/%SUBDIR%/ \ http://ftp.kddi-research.jp/infosystems/apache/%SUBDIR%/ \ http://miroir.univ-lorraine.fr/apache/%SUBDIR%/ \ ftp://ftp.acc.umu.se/mirror/apache.org/%SUBDIR%/ \ ftp://ftp.nluug.nl/internet/apache/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_BINARIES) MASTER_SITE_APACHE_COMMONS_BINARIES+= \ ${MASTER_SITE_APACHE:S,%SUBDIR%,commons/&/binaries,} .endif .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_SOURCE) MASTER_SITE_APACHE_COMMONS_SOURCE+= \ ${MASTER_SITE_APACHE:S,%SUBDIR%,commons/&/source,} .endif .if !defined(IGNORE_MASTER_SITE_APACHE_HTTPD) MASTER_SITE_APACHE_HTTPD+= \ ${MASTER_SITE_APACHE:S,%SUBDIR%,httpd/&,} .endif .if !defined(IGNORE_MASTER_SITE_APACHE_JAKARTA) MASTER_SITE_APACHE_JAKARTA+= \ ${MASTER_SITE_APACHE:S,%SUBDIR%,jakarta/&,} .endif .if !defined(IGNORE_MASTER_SITE_APACHE_TOMCAT) MASTER_SITE_APACHE_TOMCAT+= \ ${MASTER_SITE_APACHE:S,%SUBDIR%,tomcat/&,} .endif .if !defined(IGNORE_MASTER_SITE_APACHE_XML) MASTER_SITE_APACHE_XML+= \ ${MASTER_SITE_APACHE:S,%SUBDIR%,xml/&,} .endif .if !defined(IGNORE_MASTER_SITE_BERLIOS) MASTER_SITE_BERLIOS+= \ ${MASTER_SITE_SOURCEFORGE} .endif .if !defined(IGNORE_MASTER_SITE_CHEESESHOP) MASTER_SITE_CHEESESHOP+= \ https://files.pythonhosted.org/packages/%SUBDIR%/ \ https://pypi.org/packages/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_COMP_SOURCES) MASTER_SITE_COMP_SOURCES+= \ http://ftp.isc.org/pub/usenet/comp.sources.%SUBDIR%/ \ http://ftp.funet.fi/pub/archive/comp.sources.%SUBDIR%/ \ http://ftp.fi.netbsd.org/pub/misc/archive/comp.sources.%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_CRAN) MASTER_SITE_CRAN+= \ https://cloud.r-project.org/%SUBDIR%/ \ https://stat.ethz.ch/CRAN/%SUBDIR%/ \ http://cran.utstat.utoronto.ca/%SUBDIR%/ \ https://cran.cnr.berkeley.edu/%SUBDIR%/ \ https://cran.csiro.au/%SUBDIR%/ \ https://mirrors.tuna.tsinghua.edu.cn/CRAN/%SUBDIR%/ \ http://camoruco.ing.uc.edu.ve/cran/%SUBDIR%/ \ https://mirror.las.iastate.edu/CRAN/%SUBDIR%/ \ https://cran.ma.imperial.ac.uk/%SUBDIR%/ \ https://cran.gis-lab.info/%SUBDIR%/ \ https://cran.ism.ac.jp/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_CRAN_ARCHIVE) MASTER_SITE_CRAN_ARCHIVE+= ${MASTER_SITE_CRAN:S,$,Archive/${PORTNAME}/,} .endif .if !defined(IGNORE_MASTER_SITE_CRATESIO) MASTER_SITE_CRATESIO+= https://crates.io/api/v1/crates/%SUBDIR%/download?dummy=/ .endif .if !defined(IGNORE_MASTER_SITE_DEBIAN) MASTER_SITE_DEBIAN+= \ http://cdn.debian.net/debian/%SUBDIR%/ \ http://http.debian.net/debian/%SUBDIR%/ \ http://www.gtlib.gatech.edu/pub/debian/%SUBDIR%/ \ ftp://ftp.us.debian.org/debian/%SUBDIR%/ \ http://ftp.au.debian.org/debian/%SUBDIR%/ \ ftp://ftp.bg.debian.org/debian/%SUBDIR%/ \ ftp://ftp.br.debian.org/debian/%SUBDIR%/ \ http://ftp.cl.debian.org/debian/%SUBDIR%/ \ ftp://ftp.cz.debian.org/debian/%SUBDIR%/ \ ftp://ftp.de.debian.org/debian/%SUBDIR%/ \ ftp://ftp.ee.debian.org/debian/%SUBDIR%/ \ ftp://ftp.es.debian.org/debian/%SUBDIR%/ \ ftp://ftp.fi.debian.org/debian/%SUBDIR%/ \ ftp://ftp.fr.debian.org/debian/%SUBDIR%/ \ http://ftp.hk.debian.org/debian/%SUBDIR%/ \ http://ftp.hr.debian.org/debian/%SUBDIR%/ \ ftp://ftp.hu.debian.org/debian/%SUBDIR%/ \ http://ftp.ie.debian.org/debian/%SUBDIR%/ \ ftp://ftp.is.debian.org/debian/%SUBDIR%/ \ http://ftp.it.debian.org/debian/%SUBDIR%/ \ http://ftp.jp.debian.org/debian/%SUBDIR%/ \ ftp://ftp.nl.debian.org/debian/%SUBDIR%/ \ ftp://ftp.no.debian.org/debian/%SUBDIR%/ \ ftp://ftp.pl.debian.org/debian/%SUBDIR%/ \ ftp://ftp.ru.debian.org/debian/%SUBDIR%/ \ ftp://ftp.se.debian.org/debian/%SUBDIR%/ \ ftp://ftp.si.debian.org/debian/%SUBDIR%/ \ ftp://ftp.sk.debian.org/debian/%SUBDIR%/ \ ftp://ftp.uk.debian.org/debian/%SUBDIR%/ \ http://ftp.wa.au.debian.org/debian/%SUBDIR%/ \ ftp://ftp2.de.debian.org/debian/%SUBDIR%/ \ ftp://ftp.snt.utwente.nl/pub/linux/debian/%SUBDIR%/ \ ftp://ftp.acc.umu.se/debian/%SUBDIR%/ \ ftp://mirror.symnds.com/debian/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_DEBIAN_POOL) MASTER_SITE_DEBIAN_POOL+= \ ${MASTER_SITE_DEBIAN:C|(/%SUBDIR%/)|/pool/main/${PORTNAME:C/^(.).*$/\1/}/${PORTNAME}/|} .endif .if !defined(IGNORE_MASTER_SITE_EASYSW) MASTER_SITE_EASYSW+= \ http://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/mirrors/ftp.easysw.com/pub/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_ECLIPSE) MASTER_SITE_ECLIPSE+= \ ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse.org/%SUBDIR%/ \ ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/eclipse/%SUBDIR%/ \ https://ftp-stud.hs-esslingen.de/pub/Mirrors/eclipse/%SUBDIR%/ \ https://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/%SUBDIR%/ \ http://eclipse.stu.edu.tw/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_EXIM) MASTER_SITE_EXIM+= \ ftp://ftp.exim.org/pub/exim/%SUBDIR%/ \ ftp://mirror.easyname.at/exim-ftp/%SUBDIR%/ \ http://dl.ambiweb.de/mirrors/ftp.exim.org/exim/%SUBDIR%/ \ ftp://exim.noris.de/exim/%SUBDIR%/ \ ftp://ftp.bytemine.net/exim/exim/%SUBDIR%/ \ ftp://ftp.heanet.ie/pub/exim/%SUBDIR%/ \ https://ftp.heanet.ie/pub/exim/%SUBDIR%/ \ http://washitake.com/mail/exim/mirror/exim/%SUBDIR%/ \ ftp://ftp.kaist.ac.kr/exim/%SUBDIR%/ \ http://ftp.kaist.ac.kr/exim/%SUBDIR%/ \ ftp://sunsite.uio.no/pub/mail/exim/exim/%SUBDIR%/ \ ftp://sunsite.icm.edu.pl/pub/unix/mail/exim/exim/%SUBDIR%/ \ https://sunsite.icm.edu.pl/pub/unix/mail/exim/exim/%SUBDIR%/ \ ftp://mirrors.dominios.pt/pub/ftp.exim.org/exim/%SUBDIR%/ \ ftp://mirror.switch.ch/mirror/exim/exim/%SUBDIR%/ \ http://mirror.switch.ch/ftp/mirror/exim/exim/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/ftp.exim.org/pub/%SUBDIR%/ \ http://exim.telcom.net.ua/ftp/%SUBDIR/ \ ftp://idcnetwork.org/pub/exim/exim/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_CENTOS_LINUX) MASTER_SITE_CENTOS_LINUX+= \ http://mirror.centos.org/%SUBDIR%/:DEFAULT,aarch64,amd64,i386 \ http://vault.centos.org/%SUBDIR%/:DEFAULT,aarch64,amd64,i386,SOURCE .endif .if !defined(IGNORE_MASTER_SITE_EPEL) MASTER_SITE_EPEL+= \ https://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/%SUBDIR%/:DEFAULT,amd64 \ https://dl.fedoraproject.org/pub/epel/6/i386/Packages/%SUBDIR%/:DEFAULT,i386 \ https://dl.fedoraproject.org/pub/epel/6/SRPMS/Packages/%SUBDIR%/:SOURCE \ http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/%SUBDIR%/:DEFAULT,amd64 \ http://dl.fedoraproject.org/pub/epel/6/i386/Packages/%SUBDIR%/:DEFAULT,i386 \ http://dl.fedoraproject.org/pub/epel/6/SRPMS/Packages/%SUBDIR%/:SOURCE .endif .if !defined(IGNORE_MASTER_SITE_EPEL7) MASTER_SITE_EPEL7+= \ https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/%SUBDIR%/:DEFAULT,aarch64 \ https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/%SUBDIR%/:DEFAULT,amd64 \ https://dl.fedoraproject.org/pub/epel/7/SRPMS/Packages/%SUBDIR%/:SOURCE \ http://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/%SUBDIR%/:DEFAULT,aarch64 \ http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/%SUBDIR%/:DEFAULT,amd64 \ http://dl.fedoraproject.org/pub/epel/7/SRPMS/Packages/%SUBDIR%/:SOURCE .endif .if !defined(IGNORE_MASTER_SITE_FEDORA_LINUX) MASTER_SITE_FEDORA_LINUX+= \ https://archives.fedoraproject.org/pub/archive/fedora/linux/%SUBDIR%/:DEFAULT,SOURCE \ https://archives.fedoraproject.org/pub/archive/fedora/linux/%SUBDIR%/:DEFAULT,SOURCE \ ftp://ftp.pbone.net/vol4/archive.fedoraproject.org/fedora/linux/%SUBDIR%/:DEFAULT,SOURCE \ ftp://ftp.gmd.de/archives.fedoraproject.org/fedora/linux/%SUBDIR%/:DEFAULT,SOURCE \ ftp://mirror.fraunhofer.de/archives.fedoraproject.org/fedora/linux/%SUBDIR%/:DEFAULT,SOURCE \ ftp://ftp-mirror.bi.fraunhofer.de/archives.fedoraproject.org/fedora/linux/%SUBDIR%/:DEFAULT,SOURCE .endif .if !defined(IGNORE_MASTER_SITE_FARSIGHT) MASTER_SITE_FARSIGHT+= \ https://dl.farsightsecurity.com/dist/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_FESTIVAL) MASTER_SITE_FESTIVAL+= \ http://www.festvox.org/packed/festival/%SUBDIR%/ \ http://www.cstr.ed.ac.uk/downloads/festival/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_FESTIVAL_OGI) MASTER_SITE_FESTIVAL_OGI+= \ ftp://ftp.tuwien.ac.at/opsys/linux/blinux/festival/mirror.ogi-synth_home/ \ http://www.cslu.ogi.edu/tts/download/data/ .endif # # FreeBSD mirror sites # # For the full list, see the Handbook: # # https://docs.FreeBSD.org/en/books/handbook/mirrors/#mirrors-ftp # .if !defined(IGNORE_MASTER_SITE_FREEBSD_ORG) MASTER_SITE_FREEBSD_ORG+= \ https://download.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.se.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_FRUGALWARE) MASTER_SITE_FRUGALWARE+= \ ftp://ftp7.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \ ftp://ftp2.frugalware.org/mirror/ftp.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \ ftp://ftp6.frugalware.org/mirrors/linux/frugalware/frugalware-stable/source/%SUBDIR%/ \ ftp://ftp4.frugalware.org/pub/linux/distributions/frugalware/frugalware-stable/source/%SUBDIR%/ \ ftp://ftp12.frugalware.org/mirrors/ftp.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ \ ftp://ftp10.frugalware.org/pub/linux/frugalware/frugalware-stable/source/%SUBDIR%/ # ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware/frugalware-stable/source/%SUBDIR%/ # ftp://ftp3.frugalware.org/mirrors/frugalware/pub/frugalware/frugalware-stable/source/%SUBDIR%/ # ftp://ftp9.frugalware.org/pub/frugalware/frugalware-stable/source/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GCC) MASTER_SITE_GCC+= \ https://mirrors.kernel.org/sourceware/gcc/%SUBDIR%/ \ http://gcc.parentingamerica.com/%SUBDIR%/ \ http://gcc.cybermirror.org/%SUBDIR%/ \ http://gcc-uk.internet.bs/%SUBDIR%/ \ http://www.netgull.com/gcc/%SUBDIR%/ \ http://robotlab.itk.ppke.hu/gcc/%SUBDIR%/ \ http://gcc.fyxm.net/%SUBDIR%/ \ https://ftp-stud.hs-esslingen.de/pub/Mirrors/sourceware.org/gcc/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/mirrors/sourceware.org/pub/gcc/%SUBDIR%/ \ ftp://gcc.gnu.org/pub/gcc/%SUBDIR%/ \ ftp://ftp.lip6.fr/pub/gcc/%SUBDIR%/ \ ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/%SUBDIR%/ \ ftp://ftp.uvsq.fr/pub/gcc/%SUBDIR%/ \ ftp://ftp.gwdg.de/pub/misc/gcc/%SUBDIR%/ \ ftp://ftp.mpi-sb.mpg.de/pub/gnu/mirror/gcc.gnu.org/pub/gcc/%SUBDIR%/ \ ftp://ftp.nluug.nl/mirror/languages/gcc/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/gnu/gcc/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GENTOO) MASTER_SITE_GENTOO+= \ http://gentoo.mirrors.pair.com/%SUBDIR%/ \ http://mirrors.tds.net/pub/gentoo/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/%SUBDIR%/ \ http://ftp.snt.utwente.nl/pub/os/linux/gentoo/%SUBDIR%/ \ http://trumpetti.atm.tut.fi/gentoo/%SUBDIR%/ \ https://ftp.uni-erlangen.de/pub/mirrors/gentoo/%SUBDIR%/ \ http://gentoo.inode.at/%SUBDIR%/ \ http://gentoo.gg3.net/%SUBDIR%/ \ http://mirrors.163.com/gentoo/%SUBDIR%/ \ ftp://ftp.gtlib.gatech.edu/pub/gentoo/%SUBDIR%/ \ ftp://ftp.ussg.iu.edu/pub/linux/gentoo/%SUBDIR%/ \ ftp://mirrors.tds.net/pub/gentoo/%SUBDIR%/ \ ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/%SUBDIR%/ \ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/%SUBDIR%/ \ ftp://trumpetti.atm.tut.fi/gentoo/%SUBDIR%/ \ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/%SUBDIR%/ \ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/%SUBDIR%/ \ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/%SUBDIR%/ \ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo/%SUBDIR%/ \ ftp://gentoo.inode.at/source/%SUBDIR%/ .endif # Keep this before USE_GITHUB .if !empty(MASTER_SITES:M*/github.com/*/archive/*) DEV_WARNING+= "MASTER_SITES contains ${MASTER_SITES:M*/github.com/*/archive/*}, please use USE_GITHUB instead." .endif .if !defined(IGNORE_MASTER_SITE_GITHUB) # # In order to use GitHub your port must define USE_GITHUB and the following # variables: # # GH_ACCOUNT - account name of the GitHub user hosting the project # default: ${PORTNAME} # # GH_PROJECT - name of the project on GitHub # default: ${PORTNAME} # # GH_TAGNAME - name of the tag to download (2.0.1, hash, ...) # Using the name of a branch here is incorrect. It is # possible to do GH_TAGNAME= GIT_HASH to do a snapshot. # default: ${DISTVERSIONFULL} # # GH_SUBDIR - directory relative to WRKSRC where to move this distfile's # content after extracting. # # GH_TUPLE - above shortened to account:project:tagname[:group][/subdir] # -.if defined(USE_GITHUB) -. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master +. if defined(USE_GITHUB) +. if defined(GH_TAGNAME) && ${GH_TAGNAME} == master IGNORE?= Using master as GH_TAGNAME is invalid. \ Must use a tag or commit hash so the upstream does \ not "reroll" as soon as the branch is updated -. endif -. if defined(GH_TUPLE) -. for _tuple in ${GH_TUPLE} +. endif +. if defined(GH_TUPLE) +. for _tuple in ${GH_TUPLE} _t_tmp=${_tuple} -. if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\4@:S/://:C/[a-zA-Z0-9_]//g} +. if ${_t_tmp:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\4@:S/://:C/[a-zA-Z0-9_]//g} check-makevars:: @${ECHO_MSG} "The ${_tuple} GH_TUPLE line has" @${ECHO_MSG} "a tag containing something else than [a-zA-Z0-9_]" @${FALSE} -. endif -. endfor +. endif +. endfor GH_ACCOUNT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\1\4@} GH_PROJECT+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\2\4@} GH_TAGNAME+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\3\4@} GH_SUBDIR+= ${GH_TUPLE:C@^([^:]*):([^:]*):([^:]*)((:[^:/]*)?)((/.*)?)@\6\4@:M/*:S/^\///} -. endif +. endif # We are cheating and using backend URLS for GitHub here. See ports/194898 # comment #15 for explanation as to why and how to deal with it if it breaks. MASTER_SITE_GITHUB+= https://codeload.github.com/%SUBDIR% MASTER_SITE_GITHUB_CLOUD+= https://cloud.github.com/downloads/%SUBDIR% -. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault} +. if !defined(MASTER_SITES) || !${MASTER_SITES:MGH} && !${MASTER_SITES:MGHC} && !${USE_GITHUB:Mnodefault} MASTER_SITES+= GH -. endif +. endif GH_ACCOUNT_DEFAULT= ${PORTNAME} GH_ACCOUNT?= ${GH_ACCOUNT_DEFAULT} GH_PROJECT_DEFAULT= ${PORTNAME} GH_PROJECT?= ${GH_PROJECT_DEFAULT} # Use full PREFIX/SUFFIX and converted DISTVERSION GH_TAGNAME_DEFAULT= ${DISTVERSIONFULL} GH_TAGNAME?= ${GH_TAGNAME_DEFAULT} # Iterate over GH_ACCOUNT, GH_PROJECT, GH_TAGNAME and GH_SUBDIR to extract groups _GITHUB_GROUPS= DEFAULT -. for _gh_v in GH_ACCOUNT GH_PROJECT GH_TAGNAME GH_SUBDIR -. for _v_ex in ${${_gh_v}} +. for _gh_v in GH_ACCOUNT GH_PROJECT GH_TAGNAME GH_SUBDIR +. for _v_ex in ${${_gh_v}} _GH_GROUPS= ${_v_ex:S/^${_v_ex:C@:[^/:]+$@@}//:S/^://} -. if !empty(_GH_GROUPS) -. for _group in ${_GH_GROUPS:S/,/ /g} -. if ${_group} == all || ${_group} == ALL || ${_group} == default +. if !empty(_GH_GROUPS) +. for _group in ${_GH_GROUPS:S/,/ /g} +. if ${_group} == all || ${_group} == ALL || ${_group} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your ${_gh_v}" @${FALSE} -. endif -. if !${_GITHUB_GROUPS:M${_group}} +. endif +. if !${_GITHUB_GROUPS:M${_group}} _GITHUB_GROUPS+= ${_group} -. endif +. endif ${_gh_v}_${_group}= ${_v_ex:C@^(.*):[^/:]+$@\1@} -. endfor -. else +. endfor +. else ${_gh_v}_DEFAULT= ${_v_ex:C@^(.*):[^/:]+$@\1@} -. endif +. endif +. endfor . endfor -. endfor # Put the default values back into the variables so that the *default* behavior # is not changed. GH_ACCOUNT:= ${GH_ACCOUNT_DEFAULT} GH_PROJECT:= ${GH_PROJECT_DEFAULT} GH_TAGNAME:= ${GH_TAGNAME_DEFAULT} GH_SUBDIR:= ${GH_SUBDIR_DEFAULT} -. if defined(GH_TAGNAME) +. if defined(GH_TAGNAME) # If you change either of the _SANITIZED or _EXTRACT variables, please keep the # changes in sync with the GH_TAGNAME_${_group}_* variables 50 lines below. GH_TAGNAME_SANITIZED= ${GH_TAGNAME:S,/,-,g} # GitHub silently converts tags starting with v to not have v in the filename # and extraction directory. It also replaces + with -. GH_TAGNAME_EXTRACT= ${GH_TAGNAME_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g:C/--*/-/g} -. endif +. endif # This new scheme rerolls distfiles. Also ensure they are renamed to avoid # conflicts. Use _GITHUB_REV in case github changes their zipping or structure # which has happened before. _GITHUB_REV= 0 _GITHUB_EXTRACT_SUFX= .tar.gz # Put the DEFAULT distfile first _GITHUB_CLONE_DIR?= ${WRKDIR}/git-clone _PORTS_DIRECTORIES+= ${_GITHUB_CLONE_DIR} -. if !${USE_GITHUB:Mnodefault} && empty(MASTER_SITES:MGHC) +. if !${USE_GITHUB:Mnodefault} && empty(MASTER_SITES:MGHC) # GH_TAGNAME defaults to DISTVERSIONFULL; Avoid adding DISTVERSIONFULL in twice -. if ${GH_TAGNAME} != ${DISTVERSIONFULL} +. if ${GH_TAGNAME} != ${DISTVERSIONFULL} DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${DISTVERSIONFULL}-${GH_TAGNAME_SANITIZED} -. else +. else DISTNAME= ${GH_ACCOUNT}-${GH_PROJECT}-${GH_TAGNAME_SANITIZED} -. endif +. endif DISTNAME_DEFAULT:= ${DISTNAME}_GH${_GITHUB_REV} DISTFILE_DEFAULT= ${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX} DISTNAME:= ${DISTNAME_DEFAULT} DISTFILES+= ${DISTFILE_DEFAULT} git-clone: git-clone-DEFAULT git-clone-DEFAULT: ${_GITHUB_CLONE_DIR} @git clone https://github.com/${GH_ACCOUNT_DEFAULT}/${GH_PROJECT_DEFAULT}.git ${_GITHUB_CLONE_DIR}/${GH_PROJECT_DEFAULT} @${ECHO_MSG} "Cloned the default github repository into ${_GITHUB_CLONE_DIR}/${GH_PROJECT_DEFAULT}" | ${FMT_80} -. endif -. if !empty(GH_SUBDIR) +. endif +. if !empty(GH_SUBDIR) _SITES_extract:= 690:post-extract-gh-DEFAULT post-extract-gh-DEFAULT: @${RMDIR} ${WRKSRC}/${GH_SUBDIR_DEFAULT} 2>/dev/null || : @${MKDIR} ${WRKSRC}/${GH_SUBDIR_DEFAULT:H} 2>/dev/null || : @${LN} -s ${GH_SUBDIR_DEFAULT:C/[^\/]//g:C/\//..\//g:S/^$/./} ${WRKSRC}/${GH_SUBDIR_DEFAULT} -. endif +. endif # If there are non default groups -. if !empty(_GITHUB_GROUPS:NDEFAULT) +. if !empty(_GITHUB_GROUPS:NDEFAULT) # Then for each of the remaining groups, add DISTFILES and MASTER_SITES # entries with the correct group and create {WRKSRC,DISTNAME,DISTFILES}_group # helper variables. -. for _group in ${_GITHUB_GROUPS:NDEFAULT} +. for _group in ${_GITHUB_GROUPS:NDEFAULT} GH_ACCOUNT_${_group}?= ${GH_ACCOUNT_DEFAULT} GH_PROJECT_${_group}?= ${GH_PROJECT_DEFAULT} GH_TAGNAME_${_group}?= ${GH_TAGNAME_DEFAULT} # If you change either of the _SANITIZED or _EXTRACT variables, please keep the # changes in sync with the GH_TAGNAME_* variables 50 lines above. GH_TAGNAME_${_group}_SANITIZED= ${GH_TAGNAME_${_group}:S,/,-,g} GH_TAGNAME_${_group}_EXTRACT= ${GH_TAGNAME_${_group}_SANITIZED:C/^[vV]([0-9])/\1/:S/+/-/g:C/--*/-/g} _GH_TUPLE_OUT:= ${_GH_TUPLE_OUT} ${GH_ACCOUNT_${_group}}:${GH_PROJECT_${_group}}:${GH_TAGNAME_${_group}}:${_group}/${GH_SUBDIR_${_group}} DISTNAME_${_group}:= ${GH_ACCOUNT_${_group}}-${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_SANITIZED} DISTFILE_${_group}:= ${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUFX} DISTFILES:= ${DISTFILES} ${DISTFILE_${_group}}:${_group} MASTER_SITES:= ${MASTER_SITES} ${MASTER_SITE_GITHUB:S@%SUBDIR%@${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}/tar.gz/${GH_TAGNAME_${_group}}?dummy=/:${_group}@} WRKSRC_${_group}:= ${WRKDIR}/${GH_PROJECT_${_group}}-${GH_TAGNAME_${_group}_EXTRACT} -. if !empty(GH_SUBDIR_${_group}) +. if !empty(GH_SUBDIR_${_group}) # In order to sort the subdir extraction so that foo/bar is moved in before # foo/bar/baz, we count the number of / in the path and use it to order the # targets. This handles up to 9 levels. The max as of r463123 is 4. _SITES_extract:= ${_SITES_extract} 69${GH_SUBDIR_${_group}:C=[^/]+= =g:[#]}:post-extract-gh-${_group} post-extract-gh-${_group}: @${RMDIR} ${WRKSRC}/${GH_SUBDIR_${_group}} 2>/dev/null || : @${MKDIR} ${WRKSRC}/${GH_SUBDIR_${_group}:H} 2>/dev/null || : @${MV} ${WRKSRC_${_group}} ${WRKSRC}/${GH_SUBDIR_${_group}} @${LN} -s ${WRKSRC:T}/${GH_SUBDIR_${_group}} ${WRKSRC_${_group}} -. endif +. endif git-clone: git-clone-${_group} git-clone-${_group}: ${_GITHUB_CLONE_DIR} @git clone https://github.com/${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}.git ${_GITHUB_CLONE_DIR}/${GH_PROJECT_${_group}} @${ECHO_MSG} "Cloned the ${_group} github repository into ${_GITHUB_CLONE_DIR}/${GH_PROJECT_${_group}}" | ${FMT_80} -. endfor -. endif +. endfor +. endif convert-to-gh-tuple: @${ECHO_MSG} ${GH_ACCOUNT}:${GH_PROJECT}:${GH_TAGNAME} ${_GH_TUPLE_OUT:S/\/$//} -.endif # defined(USE_GITHUB) +. endif # defined(USE_GITHUB) .endif # !defined(IGNORE_MASTER_SITE_GITHUB) .if !defined(IGNORE_MASTER_SITE_GITLAB) # # In order to use GitLab your port must define USE_GITLAB and the following # variables: # # GL_SITE - site URL hosting GitLab and the project # default: https://gitlab.com # # GL_ACCOUNT - account name of the GitLab user hosting the project # default: ${PORTNAME} # # GL_PROJECT - name of the project on GitLab # default: ${PORTNAME} # # GL_COMMIT - the commit hash of the repository, must be the full hash and # is a required variable for GitLab. # # GL_SUBDIR - directory relative to WRKSRC where to move this distfile's # content after extracting. # # GL_TUPLE - above shortened to [site[:port][/webroot]:]account:project:commit:group[/subdir] # -.if defined(USE_GITLAB) -. if defined(GL_TUPLE) -. for _tuple in ${GL_TUPLE} -. if ${_tuple:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\7@:S/^://:C/[a-f0-9]{40}//g} +. if defined(USE_GITLAB) +. if defined(GL_TUPLE) +. for _tuple in ${GL_TUPLE} +. if ${_tuple:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\7@:S/^://:C/[a-f0-9]{40}//g} check-makevars:: @${ECHO_MSG} "The ${_tuple}" @${ECHO_MSG} "GL_TUPLE is improperly formatted or, the commit" @${ECHO_MSG} "section contains something other than [a-f0-9]" @${FALSE} -. endif -. endfor +. endif +. endfor GL_SITE+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\1\8@:S@::@:@} GL_ACCOUNT+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\5\8@} GL_PROJECT+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\6\8@} GL_COMMIT+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\7\8@} GL_SUBDIR+= ${GL_TUPLE:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\9\8@:M/*:S/^\///} -. endif +. endif -. if empty(USE_GITLAB:Mnodefault) +. if empty(USE_GITLAB:Mnodefault) MASTER_SITES+= ${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/archive/${GL_COMMIT}.tar.gz?dummy=/ -. endif +. endif GL_SITE_DEFAULT= https://gitlab.com GL_SITE?= ${GL_SITE_DEFAULT} GL_ACCOUNT_DEFAULT= ${PORTNAME} GL_ACCOUNT?= ${GL_ACCOUNT_DEFAULT} GL_PROJECT_DEFAULT= ${PORTNAME} GL_PROJECT?= ${GL_PROJECT_DEFAULT} _GITLAB_GROUPS= DEFAULT -. for _gl_v in GL_SITE GL_ACCOUNT GL_PROJECT GL_COMMIT GL_SUBDIR -. for _v_ex in ${${_gl_v}} +. for _gl_v in GL_SITE GL_ACCOUNT GL_PROJECT GL_COMMIT GL_SUBDIR +. for _v_ex in ${${_gl_v}} _GL_GROUPS= ${_v_ex:S/^${_v_ex:C@:[^/:]+$@@}//:S/^://} -. if !empty(_GL_GROUPS) -. for _group in ${_GL_GROUPS:S/,/ /g} -. if ${_group} == all || ${_group} == ALL || ${_group} == default +. if !empty(_GL_GROUPS) +. for _group in ${_GL_GROUPS:S/,/ /g} +. if ${_group} == all || ${_group} == ALL || ${_group} == default check-makevars:: @${ECHO_MSG} "Makefile error: the words all, ALL and default are reserved and cannot be" @${ECHO_MSG} "used in group definitions. Please fix your ${_gl_v}" @${FALSE} -. endif -. if !${_GITLAB_GROUPS:M${_group}} +. endif +. if !${_GITLAB_GROUPS:M${_group}} _GITLAB_GROUPS+= ${_group} -. endif +. endif ${_gl_v}_${_group}= ${_v_ex:C@^(.*):[^/:]+$@\1@} -. endfor -. else +. endfor +. else ${_gl_v}_DEFAULT= ${_v_ex:C@^(.*):[^/:]+$@\1@} -. endif +. endif +. endfor . endfor -. endfor GL_SITE:= ${GL_SITE_DEFAULT} GL_ACCOUNT:= ${GL_ACCOUNT_DEFAULT} GL_PROJECT:= ${GL_PROJECT_DEFAULT} GL_COMMIT:= ${GL_COMMIT_DEFAULT} GL_SUBDIR:= ${GL_SUBDIR_DEFAULT} _GITLAB_REV= 0 _GITLAB_EXTRACT_SUFX= .tar.gz _GITLAB_CLONE_DIR?= ${WRKDIR}/git-clone _PORTS_DIRECTORIES+= ${_GITLAB_CLONE_DIR} -. if !${USE_GITLAB:Mnodefault} +. if !${USE_GITLAB:Mnodefault} DISTNAME:= ${GL_ACCOUNT}-${GL_PROJECT}-${GL_COMMIT}_GL${_GITLAB_REV} DISTFILES+= ${DISTNAME}${_GITLAB_EXTRACT_SUFX} git-clone: git-clone-DEFAULT git-clone-DEFAULT: ${_GITLAB_CLONE_DIR} @git clone ${GL_SITE_DEFAULT}/${GL_ACCOUNT_DEFAULT}/${GL_PROJECT_DEFAULT}.git ${_GITLAB_CLONE_DIR}/${GL_PROJECT_DEFAULT} @${ECHO_MSG} "Cloned the default GitLab repository into ${_GITLAB_CLONE_DIR}/${GL_PROJECT_DEFAULT}" | ${FMT_80} -. endif -. if !empty(GL_SUBDIR) +. endif +. if !empty(GL_SUBDIR) _SITES_extract:= 69${GL_SUBDIR_${_group}:C=[^/]+= =g:[#]}:post-extract-gl-DEFAULT post-extract-gl-DEFAULT: @${RMDIR} ${WRKSRC}/${GL_SUBDIR_DEFAULT} 2>/dev/null || : @${MKDIR} ${WRKSRC}/${GL_SUBDIR_DEFAULT:H} 2>/dev/null || : @${LN} -s ${GL_SUBDIR_DEFAULT:C/[^\/]//g:C/\//..\//g:S/^$/./} ${WRKSRC}/${GL_SUBDIR_DEFAULT} -. endif -. if !empty(_GITLAB_GROUPS:NDEFAULT) -. for _group in ${_GITLAB_GROUPS:NDEFAULT} +. endif +. if !empty(_GITLAB_GROUPS:NDEFAULT) +. for _group in ${_GITLAB_GROUPS:NDEFAULT} # We set GL_SITE earlier, we need to verify it's not empty -. if empty(GL_SITE_${_group}) +. if empty(GL_SITE_${_group}) GL_SITE_${_group}= ${GL_SITE_DEFAULT} -. endif +. endif GL_ACCOUNT_${_group}?= ${GL_ACCOUNT_DEFAULT} GL_PROJECT_${_group}?= ${GL_PROJECT_DEFAULT} _GL_TUPLE_OUT:= ${_GL_TUPLE_OUT} ${GL_SITE_${_group}}:${GL_ACCOUNT_${_group}}:${GL_PROJECT_${_group}}:${GL_COMMIT_${_group}}:${_group}/${GL_SUBDIR_${_group}} DISTNAME_${_group}:= ${GL_ACCOUNT_${_group}}-${GL_PROJECT_${_group}}-${GL_COMMIT_${_group}}_GL${_GITLAB_REV} DISTFILE_${_group}:= ${DISTNAME_${_group}}${_GITLAB_EXTRACT_SUFX} DISTFILES:= ${DISTFILES} ${DISTFILE_${_group}}:${_group} MASTER_SITES:= ${MASTER_SITES} ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}/-/archive/${GL_COMMIT_${_group}}.tar.gz?dummy=/:${_group} WRKSRC_${_group}:= ${WRKDIR}/${GL_PROJECT_${_group}}-${GL_COMMIT_${_group}} -. if !empty(GL_SUBDIR_${_group}) +. if !empty(GL_SUBDIR_${_group}) _SITES_extract:= ${_SITES_extract} 690:post-extract-gl-${_group} post-extract-gl-${_group}: @${RMDIR} ${WRKSRC}/${GL_SUBDIR_${_group}} 2>/dev/null || : @${MKDIR} ${WRKSRC}/${GL_SUBDIR_${_group}:H} 2>/dev/null || : @${MV} ${WRKSRC_${_group}} ${WRKSRC}/${GL_SUBDIR_${_group}} @${LN} -s ${WRKSRC:T}/${GL_SUBDIR_${_group}} ${WRKSRC_${_group}} -. endif +. endif git-clone: git-clone-${_group} git-clone-${_group}: ${_GITLAB_CLONE_DIR} @git clone ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}.git ${_GITLAB_CLONE_DIR}/${GL_PROJECT_${_group}} @${ECHO_MSG} "Cloned the ${_group} GitLab repository into ${_GITLAB_CLONE_DIR}/${GL_PROJECT_${_group}}" | ${FMT_80} -. endfor -. endif -.endif # defined(USE_GITLAB) +. endfor +. endif +. endif # defined(USE_GITLAB) .endif # !defined(IGNORE_MASTER_SITE_GITLAB) .if !defined(IGNORE_MASTER_SITE_GNOME) MASTER_SITE_GNOME+= \ https://download.gnome.org/%SUBDIR%/ \ http://download.gnome.org/%SUBDIR%/ \ https://gitlab.gnome.org/GNOME/${PORTNAME}/-/archive/${PORTVERSION}/ \ http://ftp.belnet.be/mirror/ftp.gnome.org/%SUBDIR%/ \ ftp://ftp.belnet.be/mirror/ftp.gnome.org/%SUBDIR%/ \ https://ftp.acc.umu.se/pub/GNOME/%SUBDIR%/ \ ftp://ftp.cse.buffalo.edu/pub/Gnome/%SUBDIR%/ \ https://fr2.rpmfind.net/linux/gnome.org/%SUBDIR%/ \ http://www.gtlib.gatech.edu/pub/gnome/%SUBDIR%/ \ ftp://ftp.kddlabs.co.jp/pub/GNOME/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/ftp.gnome.org/pub/GNOME/%SUBDIR%/ \ ftp://ftp.nara.wide.ad.jp/pub/X11/GNOME/%SUBDIR%/ \ https://ftp.gnome.org/pub/GNOME/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GIMP) MASTER_SITE_GIMP+= \ http://gimp.mirrors.hoobly.com/pub/%SUBDIR%/ \ http://gimper.net/downloads/pub/%SUBDIR%/ \ http://mirror.hessmo.com/gimp/pub/%SUBDIR%/ \ http://de-mirror.gimper.net/pub/%SUBDIR%/ \ http://gimp.afri.cc/pub/%SUBDIR%/ \ https://download.gimp.org/pub/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GNU) MASTER_SITE_GNU+= \ https://ftpmirror.gnu.org/%SUBDIR%/ \ https://mirrors.kernel.org/gnu/%SUBDIR%/ \ https://mirror.netcologne.de/gnu/%SUBDIR%/ \ https://www.nic.funet.fi/pub/gnu/gnu/%SUBDIR%/ \ http://mirror.navercorp.com/gnu/%SUBDIR%/ \ http://ftp.halifax.rwth-aachen.de/gnu/%SUBDIR%/ \ http://download.xs4all.nl/gnu/%SUBDIR%/ \ http://ftp.kddilabs.jp/GNU/gnu/%SUBDIR%/ \ ftp://mirrors.rit.edu/gnu/%SUBDIR%/ \ ftp://ftp.fu-berlin.de/unix/gnu/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/%SUBDIR%/ \ https://ftp.gnu.org/gnu/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GNUPG) MASTER_SITE_GNUPG+= \ https://gnupg.org/ftp/gcrypt/%SUBDIR%/ \ https://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/%SUBDIR%/ \ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/%SUBDIR%/ \ ftp://mirror.switch.ch/mirror/gnupg/%SUBDIR%/ \ https://mirrors.dotsrc.org/gcrypt/%SUBDIR%/ \ ftp://ftp.freenet.de/pub/ftp.gnupg.org/gcrypt/%SUBDIR%/ \ ftp://ftp.crysys.hu/pub/gnupg/%SUBDIR%/ \ https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/%SUBDIR%/ \ https://artfiles.org/gnupg.org/%SUBDIR%/ \ ftp://ftp.gnupg.org/gcrypt/%SUBDIR%/ \ http://mirror.tje.me.uk/pub/mirrors/ftp.gnupg.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GNUSTEP) MASTER_SITE_GNUSTEP+= \ ftp://ftp.gnustep.org/pub/gnustep/%SUBDIR%/ \ http://ftp.gnustep.org/pub/gnustep/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GNU_ALPHA) MASTER_SITE_GNU_ALPHA+= \ https://alpha.gnu.org/gnu/%SUBDIR%/ \ ftp://spinellicreations.com/alpha/gnu/%SUBDIR%/ \ http://www.nic.funet.fi/pub/gnu/alpha/gnu/%SUBDIR%/ \ http://mirror.thecodefactory.org/gnualpha/%SUBDIR%/ \ https://www.mirrorservice.org/sites/alpha.gnu.org/gnu/%SUBDIR%/ \ http://gnu.c3sl.ufpr.br/alpha/%SUBDIR%/ \ https://mirror.cedia.org.ec/gnualpha/%SUBDIR%/ \ http://gnu-alpha.mirrors.hostinginnederland.nl/%SUBDIR%/ \ https://gnualpha.uib.no/%SUBDIR%/ \ https://mirrors.fe.up.pt/pub/gnu-alpha/%SUBDIR%/ \ http://mirror.lihnidos.org/GNU/alpha/gnu/%SUBDIR%/ \ https://alpha-gnu-org.ip-connect.vn.ua/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GOOGLE_CODE) PROJECTHOST?= ${PORTNAME} MASTER_SITE_GOOGLE_CODE+= \ http://${PROJECTHOST}.googlecode.com/files/ .endif .if !defined(IGNORE_MASTER_SITE_HORDE) MASTER_SITE_HORDE+= \ https://ftp.horde.org/pub/%SUBDIR%/ \ ftp://ftp.horde.org/pub/%SUBDIR%/ \ ftp://ftp.at.horde.org/infosys/webapps/horde/%SUBDIR%/ \ ftp://ftp.se.horde.org/mirror/horde/pub/%SUBDIR%/ \ ftp://ftp.tw.horde.org/pub/%SUBDIR%/ \ ftp://ftp.us.horde.org/pub/software/horde//%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_IDSOFTWARE) MASTER_SITE_IDSOFTWARE+= \ ftp://ftp.gwdg.de/pub/misc2/ftp.idsoftware.com/idstuff/%SUBDIR%/ \ http://ftp4.de.freesbie.org/pub/misc/ftp.idsoftware.com/idstuff/%SUBDIR%/ \ ftp://ftp.fu-berlin.de/pc/games/idgames/idstuff/%SUBDIR%/ \ ftp://ftp.gamers.org/pub/idgames/idstuff/%SUBDIR%/ \ http://ftp.iinet.net.au/games/idstuff/%SUBDIR%/ \ ftp://ftp.mirror.nl/disk2/idsoftware/idstuff/%SUBDIR%/ \ ftp://freebsd.nsu.ru/mirrors/ftp.idsoftware.com/idstuff/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/vendors/idgames/idstuff/%SUBDIR%/ \ ftp://ftp.omen.net.au/games/idstuff/%SUBDIR%/ \ ftp://ftp.idsoftware.com/idstuff/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_ISC) MASTER_SITE_ISC+= \ https://ftp.isc.org/isc/%SUBDIR%/ \ ftp://ftp.isc.org/isc/%SUBDIR%/ \ ftp://ftp.ciril.fr/pub/isc/%SUBDIR%/ \ ftp://ftp.freenet.de/pub/ftp.isc.org/isc/%SUBDIR%/ \ ftp://ftp.iij.ad.jp/pub/network/isc/%SUBDIR%/ \ ftp://ftp.u-aizu.ac.jp/pub/net/isc/%SUBDIR%/ \ ftp://ftp.task.gda.pl/mirror/ftp.isc.org/isc/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/ftp.isc.org/isc/%SUBDIR%/ \ ftp://ftp.nominum.com/pub/isc/%SUBDIR%/ \ ftp://ftp.ripe.net/mirrors/sites/ftp.isc.org/isc/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/net/isc/isc/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/mirrors/ftp.isc.org/isc/%SUBDIR%/ .endif # List: http://download.kde.org/extra/mirrors.html # Updated: 2012-10-26 .if !defined(IGNORE_MASTER_SITE_KDE) MASTER_SITE_KDE+= \ https://download.kde.org/%SUBDIR%/ \ ftp://ftp.gtlib.gatech.edu/pub/kde/%SUBDIR%/ \ ftp://ftp.informatik.hu-berlin.de/pub/Mirrors/ftp.kde.org/%SUBDIR%/ \ http://ftp.gtlib.gatech.edu/pub/kde/%SUBDIR%/ \ http://kde.mirrors.tds.net/pub/kde/%SUBDIR%/ \ ftp://ftp.rz.uni-wuerzburg.de/pub/unix/kde/%SUBDIR%/ \ https://mirrors.dotsrc.org/kde/%SUBDIR%/ \ ftp://mirrors.dotsrc.org/kde/%SUBDIR%/ \ ftp://ftp.fi.muni.cz/pub/kde/%SUBDIR%/ \ http://ftp.fi.muni.cz/pub/kde/%SUBDIR%/ \ ftp://sunsite.icm.edu.pl/pub/unix/kde/%SUBDIR%/ \ https://sunsite.icm.edu.pl/pub/unix/kde/%SUBDIR%/ \ ftp://ftp.lip6.fr/pub/X11/kde/%SUBDIR%/ \ http://www-ftp.lip6.fr/pub/X11/kde/%SUBDIR%/ \ https://ftp-stud.hs-esslingen.de/Mirrors/ftp.kde.org/pub/kde/%SUBDIR%/ \ ftp://ftp.cronyx.ru/pub/mirror/kde/%SUBDIR%/ \ ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/%SUBDIR%/ \ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/kde/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/X11/kde/%SUBDIR%/ \ http://ftp.ntua.gr/pub/X11/kde/%SUBDIR%/ \ ftp://ftp.heanet.ie/mirrors/ftp.kde.org/%SUBDIR%/ \ https://ftp.heanet.ie/mirrors/ftp.kde.org/%SUBDIR%/ \ ftp://ftp.kddlabs.co.jp/pub/X11/kde/%SUBDIR%/ \ http://ftp.kddlabs.co.jp/pub/X11/kde/%SUBDIR%/ \ ftp://ftp.ussg.iu.edu/pub/kde/%SUBDIR%/ \ http://ftp.ussg.iu.edu/kde/%SUBDIR%/ \ ftp://ftp.sayclub.com/pub/X/KDE/%SUBDIR%/ \ http://ftp.sayclub.com/pub/X/KDE/%SUBDIR%/ \ http://mirror.cc.columbia.edu/pub/software/kde/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/ftp.kde.org/pub/kde/%SUBDIR%/ \ https://www.mirrorservice.org/sites/ftp.kde.org/pub/kde/%SUBDIR%/ \ https://ftp.icm.edu.pl/pub/unix/kde/%SUBDIR%/ \ http://ftp.fi.muni.cz/pub/kde/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/%SUBDIR%/ \ http://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/%SUBDIR%/ \ https://kde.cs.nctu.edu.tw/ftp/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_LIBREOFFICE_DEV) MASTER_SITE_LIBREOFFICE_DEV+= \ https://dev-www.libreoffice.org/src/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_MATE) MASTER_SITE_MATE+= \ https://pub.mate-desktop.org/releases/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_MOZDEV) MASTER_SITE_MOZDEV+= \ http://ftp.scarlet.be/pub/mozdev/%SUBDIR%/ \ http://ftp.rz.tu-bs.de/pub/mirror/downloads.mozdev.org/%SUBDIR%/ \ http://ftp.ntua.gr/pub/www/mozdev/%SUBDIR%/ \ https://ftp.heanet.ie/pub/mozdev/%SUBDIR%/ \ http://mozdev.oregonstate.edu/%SUBDIR%/ \ http://ftp.ntua.gr/pub/www/mozdev/%SUBDIR%/ \ http://www.devlib.org/mozdev/%SUBDIR%/ \ ftp://ftp.heanet.ie/pub/mozdev/%SUBDIR%/ \ http://mirrors.ibiblio.org/mozdev.org/%SUBDIR%/ \ https://ftp.osuosl.org/pub/mozdev/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_MOZILLA) MASTER_SITE_MOZILLA+= \ https://download.cdn.mozilla.net/pub/%SUBDIR%/ \ https://archive.mozilla.org/pub/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_MOZILLA_ADDONS) MASTER_SITE_MOZILLA_ADDONS+= \ https://addons.cdn.mozilla.net/user-media/%SUBDIR%/ \ http://kyoto-mz-dl.sinet.ad.jp/pub/mozilla.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_MYSQL) MASTER_SITE_MYSQL+= \ ftp://ftp.fi.muni.cz/pub/mysql/Downloads/%SUBDIR%/ \ ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/%SUBDIR%/ \ http://mirrors.ntua.gr/MySQL/Downloads/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/databases/mysql/Downloads/%SUBDIR%/ \ ftp://mirror.switch.ch/mirror/mysql/Downloads/%SUBDIR%/ \ http://mysql.mirrors.pair.com/Downloads/%SUBDIR%/ \ http://download.softagency.net/MySQL/Downloads/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_NETBSD) MASTER_SITE_NETBSD+= \ https://ftp.netbsd.org/pub/pkgsrc/distfiles/%SUBDIR%/ \ http://ftp.fr.netbsd.org/pub/pkgsrc/%SUBDIR%/ \ ftp://ftp2.fr.netbsd.org/pub/pkgsrc/%SUBDIR%/ \ ftp://ftp3.de.netbsd.org/pub/pkgsrc/%SUBDIR%/ \ ftp://ftp2.jp.netbsd.org/pub/pkgsrc/%SUBDIR%/ \ ftp://ftp7.jp.netbsd.org/pub/pkgsrc/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_NETLIB) MASTER_SITE_NETLIB+= \ http://www.netlib.org/%SUBDIR%/ \ https://ftp.mirrorservice.org/sites/ftp.netlib.org/%SUBDIR%/ \ https://www.mirrorservice.org/sites/ftp.netlib.org/%SUBDIR%/ \ ftp://ftp.irisa.fr/pub/netlib/%SUBDIR%/ \ http://netlib.sandia.gov/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_NVIDIA) MASTER_SITE_NVIDIA+= \ https://jp.download.nvidia.com/%SUBDIR%/ \ http://us.download.nvidia.com/%SUBDIR%/ \ https://tw.download.nvidia.com/%SUBDIR%/ \ http://download.nvidia.com/%SUBDIR%/ \ https://download1.nvidia.com/%SUBDIR%/ \ ftp://download.nvidia.com/%SUBDIR%/ \ ftp://download1.nvidia.com/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_OPENBSD) MASTER_SITE_OPENBSD+= \ https://cdn.openbsd.org/pub/OpenBSD/%SUBDIR%/ \ https://ftp.OpenBSD.org/pub/OpenBSD/%SUBDIR%/ \ https://ftp.eu.openbsd.org/pub/OpenBSD/%SUBDIR%/ \ https://ftp3.usa.openbsd.org/pub/OpenBSD/%SUBDIR%/ \ https://mirror.leaseweb.com/pub/OpenBSD/%SUBDIR%/ \ https://openbsd.hk/pub/OpenBSD/%SUBDIR%/ \ https://mirror.aarnet.edu.au/pub/OpenBSD/%SUBDIR%/ .endif # Reference: https://osdn.net/docs/FileRelease_Guide#h2-Release.20File.20URL.20Formats .if !defined(IGNORE_MASTER_SITE_OSDN) MASTER_SITE_OSDN+= \ https://osdn.net/dl/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_OSDN_CHAMBER) MASTER_SITE_OSDN_CHAMBER+= \ https://osdn.net/downloads/users/%SUBDIR%/ .endif # From https://osdn.net/docs/FileRelease_Guide#h2-Direct.20Download # "Currently, when a release-file URL is accessed from wget, curl, # libwww-perl, PowerShell, apt, dnf, or other package management # tools, downloading of the file will begin right away without # having to go via html page." # Unfortunately fetch(1) isn't included in such user agents. Therefore # add --user-agent option to FETCH_ARGS so access is considered as # that of ftp/curl. .if !empty(MASTER_SITES:M*OSDN*) || !empty(PATCH_SITES:M*OSDN*) FETCH_ARGS+= --user-agent=curl/7.68.0 .endif .if !defined(IGNORE_MASTER_SITE_OSSP) MASTER_SITE_OSSP+= \ ftp://ftp.ossp.org/pkg/%SUBDIR%/ \ ftp://ftp.ntua.gr/pub/utils/ossp/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_PACKETSTORM) MASTER_SITE_PACKETSTORM+= \ https://dl.packetstormsecurity.net/%SUBDIR%/ \ https://packetstorm.foofus.com/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_PERL_CPAN) _PERL_CPAN_SORT?= modules/by-module # Please add URI to MASTER_SITE_PERL_CPAN_BY instead of this one. MASTER_SITE_PERL_CPAN?= MASTER_SITE_PERL_CPAN_BY+= \ https://cpan.metacpan.org/%CPANSORT%/%SUBDIR%/ \ https://cpan.metacpan.org/modules/by-module/%SUBDIRPLUS%/ \ https://www.cpan.org/%CPANSORT%/%SUBDIR%/ \ ftp://ftp.cpan.org/pub/CPAN/%CPANSORT%/%SUBDIR%/ \ ftp://ftp.kddlabs.co.jp/lang/perl/CPAN/%CPANSORT%/%SUBDIR%/ \ http://ftp.jaist.ac.jp/pub/CPAN/%CPANSORT%/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/cpan.perl.org/CPAN/%CPANSORT%/%SUBDIR%/ \ ftp://ftp.auckland.ac.nz/pub/perl/CPAN/%CPANSORT%/%SUBDIR%/ \ http://backpan.perl.org/%CPANSORT%/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/languages/perl/CPAN/%CPANSORT%/%SUBDIR%/ \ http://ftp.twaren.net/Unix/Lang/CPAN/%CPANSORT%/%SUBDIR%/ \ ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%SUBDIRPLUS%/ _PERL_CPAN_FLAG=${MASTER_SITE_SUBDIR:C/(CPAN):.*$/\1/} _PERL_CPAN_ID= ${MASTER_SITE_SUBDIR:C/^CPAN:(.)(.)(.*)$/\1\/\1\2\/\1\2\3/} -.if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan" +. if !empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan" _PERL_CPAN_SORT=authors/id/${_PERL_CPAN_ID} MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIR%\///:S/%SUBDIRPLUS%\//${PORTNAME:C/-.*//}\//} -.else +. else MASTER_SITE_PERL_CPAN=${MASTER_SITE_PERL_CPAN_BY:S/%CPANSORT%/${_PERL_CPAN_SORT}/:S/%SUBDIRPLUS%\///} -.endif +. endif .endif # # PostgreSQL master site # .if !defined(IGNORE_MASTER_SITE_PGSQL) MASTER_SITE_PGSQL+= \ https://ftp.postgresql.org/pub/%SUBDIR%/ .endif # Currently MyraCloud is blocking fetch. Hence add php Github distributions # untill it is fixed. .if !defined(IGNORE_MASTER_SITE_PHP) MASTER_SITE_PHP+= \ https://www.php.net/distributions/ \ https://raw.githubusercontent.com/php/web-php-distributions/master/ .endif .if !defined(IGNORE_MASTER_SITE_PYTHON) MASTER_SITE_PYTHON+= \ https://www.python.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_QMAIL) MASTER_SITE_QMAIL+= \ http://qmail.glasswings.com.au/%SUBDIR%/ \ http://qmail.psshee.com/%SUBDIR%/ \ https://mirrors.sunsite.dk/qmailwww/%SUBDIR%/ \ http://www.agria.hu/qmail/%SUBDIR%/ \ http://qmail.netvisao.pt/%SUBDIR%/ \ http://qmail.ipg.sk/%SUBDIR%/ \ http://qmail.omnis.ch/%SUBDIR%/ \ http://www.qmail.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_QT) MASTER_SITE_QT+= \ https://download.qt.io/%SUBDIR%/ \ http://master.qt.io/%SUBDIR%/ \ https://www.mirrorservice.org/sites/download.qt-project.org/%SUBDIR%/ \ http://www.nic.funet.fi/pub/mirrors/download.qt-project.org/%SUBDIR%/ \ http://qtmirror.ics.com/pub/qtproject/%SUBDIR%/ \ https://ftp.jaist.ac.jp/pub/qtproject/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_REDHAT_LINUX) MASTER_SITE_REDHAT_LINUX+= \ http://mirrors.usc.edu/pub/linux/distributions/redhat/redhat/linux/%SUBDIR%/ \ http://www.gtlib.gatech.edu/pub/redhat/linux/%SUBDIR%/ \ ftp://mirror.cs.wisc.edu/pub/mirrors/linux/redhat/%SUBDIR%/ \ ftp://ftp.nluug.nl/site/ftp.redhat.com/redhat/linux/%SUBDIR%/ \ ftp://ftp.icm.edu.pl/pub/linux/redhat/linux/%SUBDIR%/ \ ftp://ftp.riken.go.jp/pub/Linux/redhat/linux/%SUBDIR%/ \ ftp://ftp.kddlabs.co.jp/pub/Linux/packages/RedHat/redhat/linux/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_RUBY) MASTER_SITE_RUBY+= \ https://cache.ruby-lang.org/pub/ruby/%SUBDIR%/ \ ftp://ftp.fu-berlin.de/unix/languages/ruby/%SUBDIR%/ \ ftp://ftp.kr.FreeBSD.org/pub/ruby/%SUBDIR%/ \ ftp://ftp.iDaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/%SUBDIR%/ .endif # See http://rubygems.org/pages/about .if !defined(IGNORE_MASTER_SITE_RUBYGEMS) MASTER_SITE_RUBYGEMS+= \ https://rubygems.org/downloads/ .endif .if !defined(IGNORE_MASTER_SITE_SAMBA) MASTER_SITE_SAMBA+= \ https://ftp.samba.org/pub/%SUBDIR%/ .endif # List: https://download.savannah.gnu.org/mirmon/ .if !defined(IGNORE_MASTER_SITE_SAVANNAH) MASTER_SITE_SAVANNAH+= \ https://download.savannah.gnu.org/releases/%SUBDIR%/ \ https://download-mirror.savannah.gnu.org/releases/%SUBDIR%/ \ http://nongnu.askapache.com/%SUBDIR%/ \ http://mirror.lihnidos.org/GNU/savannah/%SUBDIR%/ \ http://ftp.twaren.net/Unix/NonGNU/%SUBDIR%/ \ ftp://ftp.twaren.net/Unix/NonGNU/%SUBDIR%/ \ http://gnu.mirrors.pair.com/savannah/savannah/%SUBDIR%/ .endif # List: https://sourceforge.net/p/forge/documentation/Mirrors/ # Updated: 2017-03-13 .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE) -.for p in https http +. for p in https http MASTER_SITE_SOURCEFORGE+= ${p}://downloads.sourceforge.net/project/%SUBDIR%/ -.for m in excellmedia freefr jaist nchc \ +. for m in excellmedia freefr jaist nchc \ netcologne netix superb-dca2 superb-sea2 ufpr vorboss MASTER_SITE_SOURCEFORGE+= ${p}://${m}.dl.sourceforge.net/project/%SUBDIR%/ -.endfor -.endfor +. endfor +. endfor .endif .if !defined(IGNORE_MASTER_SITE_SOURCEWARE) MASTER_SITE_SOURCEWARE+= \ https://mirrors.kernel.org/sourceware/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/mirrors/sourceware.org/pub/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_SUDO) MASTER_SITE_SUDO+= \ https://www.sudo.ws/sudo/dist/ \ http://ftp.arcane-networks.fr/pub/mirrors/sudo/ \ http://sudo.p8ra.de/sudo/dist/ \ http://sudo.cybermirror.org/ \ http://sudo-ftp.basemirror.de/ \ http://core.ring.gr.jp/archives/misc/sudo/ \ http://www.ring.gr.jp/archives/misc/sudo/ \ http://ftp.twaren.net/Unix/Security/Sudo/ \ ftp://ftp.sudo.ws/pub/sudo/ \ ftp://plier.ucar.edu/pub/sudo/ \ ftp://obsd.isc.org/pub/sudo/ \ ftp://ftp.uwsg.indiana.edu/pub/security/sudo/ \ ftp://ftp.tuwien.ac.at/utils/admin-tools/sudo/ \ ftp://sunsite.ualberta.ca/pub/Mirror/sudo/ \ ftp://zoot.tele.dk/pub/sudo/ \ ftp://ftp.in2p3.fr/pub/sudo/ \ ftp://ftp.arcane-networks.fr/pub/mirrors/sudo/ \ ftp://ftp.usbm.de/pub/sudo/ \ ftp://ftp.cs.tu-berlin.de/pub/misc/sudo/ \ ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/sudo/ \ ftp://ftp.st.ryukoku.ac.jp/pub/security/tool/sudo/ \ ftp://ftp.cin.nihon-u.ac.jp/pub/misc/sudo/ \ ftp://core.ring.gr.jp/pub/misc/sudo/ \ ftp://ftp.ring.gr.jp/pub/misc/sudo/ \ ftp://sunsite.icm.edu.pl/packages/sudo/ \ ftp://mirror.cdmon.com/pub/sudo/ \ ftp://ftp.twaren.net/Unix/Security/Sudo/ .endif .if !defined(IGNORE_MASTER_SITE_SUNSITE) MASTER_SITE_SUNSITE+= \ https://www.ibiblio.org/pub/Linux/%SUBDIR%/ \ http://www.gtlib.gatech.edu/pub/Linux/%SUBDIR%/ \ ftp://ftp.icm.edu.pl/pub/Linux/sunsite/%SUBDIR%/ \ ftp://ftp.sun.ac.za/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_TCLTK) MASTER_SITE_TCLTK+= \ ftp://ftp.tcl.tk/pub/tcl/%SUBDIR%/ \ ftp://ftp.kddlabs.co.jp/lang/tcl/ftp.scriptics.com/%SUBDIR%/ \ ftp://ftp.mirrorservice.org/sites/ftp.tcl.tk/pub/tcl/%SUBDIR%/ \ ftp://ftp.funet.fi/pub/languages/tcl/tcl/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_TEX_CTAN) MASTER_SITE_TEX_CTAN+= \ https://ftp.math.utah.edu/pub/tex/historic/%SUBDIR%/ \ https://ftp.tu-chemnitz.de/pub/tug/historic/%SUBDIR%/ \ https://pi.kwarc.info/historic/%SUBDIR%/ \ https://mirrors.tuna.tsinghua.edu.cn/tex-historic-archive/%SUBDIR%/ \ https://mirror.nju.edu.cn/tex-historic/%SUBDIR%/ .endif # Derived from: https://www.torproject.org/getinvolved/mirrors.html.en .if !defined(IGNORE_MASTER_SITE_TOR) MASTER_SITE_TOR+= \ https://dist.torproject.org/%SUBDIR%/ \ https://archive.torproject.org/tor-package-archive/%SUBDIR%/ \ ftp://ftp.bit.nl/mirror/tor/%SUBDIR%/ \ https://cyberside.net.ee/tor/%SUBDIR%/ \ https://ftp.bit.nl/mirror/tor/%SUBDIR%/ \ http://mirror.hessmo.com/tor/dist/%SUBDIR%/ \ http://mirror.host4site.co.il/torproject.org/dist/%SUBDIR%/ \ http://mirror.open-networx.org/torproject.org/dist/%SUBDIR%/ \ http://mirror.tor.hu/dist/%SUBDIR%/ \ https://mirror.torland.me/torproject.org/dist/%SUBDIR%/ \ http://mirrors.chaos-darmstadt.de/tor-mirror/dist/%SUBDIR%/ \ http://theonionrouter.com/dist/%SUBDIR%/ \ http://tor.amorphis.eu/dist/%SUBDIR%/ \ http://tor.askapache.com/dist/%SUBDIR%/ \ http://tor.beme-it.de/dist/%SUBDIR%/ \ http://tor.borgmann.tv/dist/%SUBDIR%/ \ https://tor.ccc.de/dist/%SUBDIR%/ \ http://tor.cyberarmy.at/dist/%SUBDIR%/ \ http://tor.dont-know-me.at/dist/%SUBDIR%/ \ http://tor.factor.cc/dist/%SUBDIR%/ \ http://tor.homosu.net/dist/%SUBDIR%/ \ http://tor.idnr.ws/dist/%SUBDIR%/ \ https://tor.myrl.net/dist/%SUBDIR%/ \ http://tor.kamagurka.org/dist/%SUBDIR%/ \ http://tor.spline.de/dist/%SUBDIR%/ \ http://tor.vesta.nu/dist/%SUBDIR%/ \ http://torproj.xpdm.us/dist/%SUBDIR%/ \ https://torproject.antagonism.org/dist/%SUBDIR%/ \ https://torproject.crypto.is/dist/%SUBDIR%/ \ https://torproject.is/dist/%SUBDIR%/ \ http://torproject.nwlinux.us/dist/%SUBDIR%/ \ https://torproject.ph3x.at/dist/%SUBDIR%/ \ https://www.coevoet.nl/tor/dist/%SUBDIR%/ \ http://www.oignon.net/dist/%SUBDIR%/ \ https://www.torproject.nl/dist/%SUBDIR%/ \ http://www.torproject.org.nyud.net/dist/%SUBDIR%/ \ http://www.torproject.us/dist/%SUBDIR%/ \ https://www.torservers.net/mirrors/torproject.org/dist/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_TUCOWS) MASTER_SITE_TUCOWS+= \ http://iinets.linux.tucows.com/files/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_WINDOWMAKER) MASTER_SITE_WINDOWMAKER+= \ ftp://ftp.windowmaker.info/pub/%SUBDIR%/ \ ftp://ftp.uvsq.fr/pub/X11/window-managers/windowmaker/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_XCONTRIB) MASTER_SITE_XCONTRIB+= \ ftp://ftp.gwdg.de/pub/x11/x.org/contrib/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_XFCE) _XFCE_PATH= ${DISTNAME:S/-${DISTVERSIONFULL}//:tl}/${DISTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} MASTER_SITE_XFCE+= \ https://archive.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ \ https://mirror.netcologne.de/xfce/src/%SUBDIR%/${_XFCE_PATH}/ \ https://ftp.cixug.es/xfce/src/%SUBDIR%/${_XFCE_PATH}/ \ https://archive.be.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ \ https://archive.al-us.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ \ http://mirror.perldude.de/archive.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ .endif .if !defined(IGNORE_MASTER_SITE_XORG) MASTER_SITE_XORG+= \ https://xorg.freedesktop.org/releases/%SUBDIR%/ \ https://mirror.csclub.uwaterloo.ca/x.org/%SUBDIR%/ \ https://artfiles.org/x.org/pub/%SUBDIR%/ \ https://ftp.gwdg.de/pub/x11/x.org/pub/%SUBDIR%/ \ https://mi.mirror.garr.it/mirrors/x.org/%SUBDIR%/ \ https://mirrors.ircam.fr/pub/x.org/%SUBDIR%/ \ https://www.mirrorservice.org/sites/ftp.x.org/pub/%SUBDIR%/ \ https://mirror.nl.leaseweb.net/xorg/%SUBDIR%/ \ https://ftp.yz.yamagata-u.ac.jp/pub/X11/x.org/%SUBDIR%/ \ http://piotrkosoft.net/pub/mirrors/ftp.x.org/pub/%SUBDIR%/ \ http://xorg.mirrors.pair.com/%SUBDIR%/ \ http://ftp.kaist.ac.kr/x.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_KERNEL_ORG) MASTER_SITE_KERNEL_ORG+= \ https://cdn.kernel.org/pub/%SUBDIR%/ \ https://www.kernel.org/pub/%SUBDIR%/ \ https://download.xs4all.nl/ftp.kernel.org/pub/%SUBDIR%/ \ https://mirrors.mit.edu/kernel/%SUBDIR%/ \ http://ftp.nara.wide.ad.jp/pub/kernel.org/%SUBDIR%/ \ http://ftp.yandex.ru/pub/%SUBDIR%/ \ http://ftp.heanet.ie/pub/kernel.org/pub/%SUBDIR%/ \ ftp://ftp.ntu.edu.tw/%SUBDIR%/ \ ftp://ftp.riken.jp/Linux/kernel.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_ZI) MASTER_SITE_ZI+= \ https://mirrors.rit.edu/zi/%SUBDIR%/ \ https://www.zi0r.com/mirrors/%SUBDIR%/ \ ${MASTER_SITE_LOCAL:S/%SUBDIR%/zi/} .endif # Macro magic MASTER_SITES_ABBREVS= CPAN:PERL_CPAN \ GH:GITHUB \ GHC:GITHUB_CLOUD \ LODEV:LIBREOFFICE_DEV \ NL:NETLIB \ RG:RUBYGEMS \ SF:SOURCEFORGE MASTER_SITES_SUBDIRS= APACHE_COMMONS_BINARIES:${PORTNAME:S,commons-,,} \ APACHE_COMMONS_SOURCE:${PORTNAME:S,commons-,,} \ APACHE_JAKARTA:${PORTNAME:S,-,/,}/source \ BERLIOS:${PORTNAME:tl}.berlios \ CHEESESHOP:source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:S/-${DISTVERSIONFULL}$//} \ CRATESIO:${PORTNAME}/${DISTVERSIONFULL} \ DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \ FARSIGHT:${PORTNAME} \ FESTIVAL:${PORTVERSION} \ GCC:releases/${DISTNAME} \ GENTOO:distfiles \ GIMP:${PORTNAME}/${PORTVERSION:R}/ \ GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/tar.gz/${GH_TAGNAME}?dummy=/ \ GITHUB_CLOUD:${GH_ACCOUNT}/${GH_PROJECT}/ \ GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \ GNU:${PORTNAME} \ GNUPG:${PORTNAME} \ GNU_ALPHA:${PORTNAME} \ HORDE:${PORTNAME} \ LIBREOFFICE_DEV:${PORTNAME} \ MATE:${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \ MOZDEV:${PORTNAME:tl} \ NETLIB:${PORTNAME} \ PERL_CPAN:${PORTNAME:C/-.*//} \ QT:archive/qt/${PORTVERSION:R} \ SAMBA:${PORTNAME} \ SAVANNAH:${PORTNAME:tl} \ SOURCEFORGE:${PORTNAME:tl}/${PORTNAME:tl}/${PORTVERSION} \ XFCE:xfce .if defined(MASTER_SITES) && ${MASTER_SITES:N*\:/*} -.for _site__ in ${MASTER_SITES} +. for _site__ in ${MASTER_SITES} _site_=${_site__} -. if ${_site_:M*\:/*} +. if ${_site_:M*\:/*} MASTER_SITES_EXP+= ${_site_} MASTER_SITES_EXP:= ${MASTER_SITES_EXP} -. else +. else _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@} -. if ${_site_urlpath_:M*/*} +. if ${_site_urlpath_:M*/*} _site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@} _site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!} -. else +. else _site_url_= ${_site_urlpath_} .undef _site_subdir_ -. endif +. endif _site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://} -. for _abbrev_ in ${MASTER_SITES_ABBREVS} -. if ${_site_url_} == ${_abbrev_:C/:.*//} +. for _abbrev_ in ${MASTER_SITES_ABBREVS} +. if ${_site_url_} == ${_abbrev_:C/:.*//} _site_url_= ${_abbrev_:C/.*://} -. endif -. endfor -. if !defined(MASTER_SITE_SUBDIR) -. for _subdir_ in ${MASTER_SITES_SUBDIRS} -. if ${_site_url_} == ${_subdir_:C/:.*//} +. endif +. endfor +. if !defined(MASTER_SITE_SUBDIR) +. for _subdir_ in ${MASTER_SITES_SUBDIRS} +. if ${_site_url_} == ${_subdir_:C/:.*//} _site_subdir_?= ${_subdir_:C/.*://} -. endif -. endfor -. endif -. ifdef MASTER_SITE_${_site_url_} -. ifdef _site_subdir_ +. endif +. endfor +. endif +. ifdef MASTER_SITE_${_site_url_} +. ifdef _site_subdir_ MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//} -. else +. else MASTER_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//} -. endif +. endif MASTER_SITES_EXP:= ${MASTER_SITES_EXP} -. endif -. endif -.endfor +. endif +. endif +. endfor MASTER_SITES= ${MASTER_SITES_EXP} .endif .if defined(PATCH_SITES) && ${PATCH_SITES:N*\:/*} -.for _site__ in ${PATCH_SITES} +. for _site__ in ${PATCH_SITES} _site_=${_site__} -. if ${_site_:M*\:/*} +. if ${_site_:M*\:/*} PATCH_SITES_EXP+= ${_site_} PATCH_SITES_EXP:= ${PATCH_SITES_EXP} -. else +. else _site_urlpath_= ${_site_:C@^(.*):[^/:]+$@\1@} -. if ${_site_urlpath_:M*/*} +. if ${_site_urlpath_:M*/*} _site_url_= ${_site_urlpath_:C@^([^/]+)/.*$@\1@} _site_subdir_= ${_site_urlpath_:S/^${_site_urlpath_:C@^([^/]+)/.*$@\1@}//:S!^/!!:S!/$!!} -. else +. else _site_url_= ${_site_urlpath_} .undef _site_subdir_ -. endif +. endif _site_group_= ${_site_:S/^${_site_:C@^(.*):[^/:]+$@\1@}//:S/^://} -. for _abbrev_ in ${MASTER_SITES_ABBREVS} -. if ${_site_url_} == ${_abbrev_:C/:.*//} +. for _abbrev_ in ${MASTER_SITES_ABBREVS} +. if ${_site_url_} == ${_abbrev_:C/:.*//} _site_url_= ${_abbrev_:C/.*://} -. endif -. endfor -. if !defined(MASTER_SITE_SUBDIR) -. for _subdir_ in ${MASTER_SITES_SUBDIRS} -. if ${_site_url_} == ${_subdir_:C/:.*//} +. endif +. endfor +. if !defined(MASTER_SITE_SUBDIR) +. for _subdir_ in ${MASTER_SITES_SUBDIRS} +. if ${_site_url_} == ${_subdir_:C/:.*//} _site_subdir_?= ${_subdir_:C/.*://} -. endif -. endfor -. endif -. ifdef MASTER_SITE_${_site_url_} -. ifdef _site_subdir_ +. endif +. endfor +. endif +. ifdef MASTER_SITE_${_site_url_} +. ifdef _site_subdir_ PATCH_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S^%SUBDIR%^${_site_subdir_}^:S/$/:${_site_group_}/:S/:$//} -. else +. else PATCH_SITES_EXP+= ${MASTER_SITE_${_site_url_}:S/$/:${_site_group_}/:S/:$//} -. endif +. endif PATCH_SITES_EXP:= ${PATCH_SITES_EXP} -. endif -. endif -.endfor +. endif +. endif +. endfor PATCH_SITES= ${PATCH_SITES_EXP} .endif diff --git a/Mk/bsd.tex.mk b/Mk/bsd.tex.mk index 3a7725958ede..ce8efc912194 100644 --- a/Mk/bsd.tex.mk +++ b/Mk/bsd.tex.mk @@ -1,628 +1,628 @@ # bsd.tex.mk - Common part for TeX related ports # TEX_MAINTAINER= freebsd-tex@FreeBSD.org # # Ports which depend on TeX should use USE_TEX. # # USE_TEX= yes # imports variables only, and # USE_TEX= full # means full TeXLive dependency except for documentation and source. # # The other valid keywords # # base: base part # texmf: texmf tree (except for documentation and source) # source: source # docs: documentation # # web2c: WEB2C toolchain and TeX engines # kpathsea: kpathsea library # ptexenc: character code conversion library for pTeX # basic: basic TeX engines including tex and pdftex # tlmgr: tlmgr dependency (Perl modules) # texlua: texlua53 library # texluajit: texluajit library # synctex: synctex library # xpdfopen: pdfopen/pdfclose utility # # dvipsk: dvipsk # dvipdfmx: DVIPDFMx # xdvik: XDvi # gbklatex: gbklatex # # formats: TeX, LaTeX, AMSTeX, ConTeXT, EplainTeX, # CSplainTeX, METAFONT, MLTeX, PDFTeX, TeXsis # tex: TeX # latex: LaTeX # pdftex: PDFTeX # jadetex: JadeTeX # luatex: LuaTeX # ptex: pTeX # xetex: XeTeX # xmltex: XMLTeX # # texhash: directory search hash regeneration # updmap: font map regeneration # fmtutil: format regeneration # # Examples: # USE_TEX= latex:build # USE_TEX= formats # USE_TEX= latex:build dvipsk:build # default TeX distribution. "texlive" TEX_DEFAULT?= texlive .if ${TEX_DEFAULT} != texlive IGNORE= Only 'texlive' is supported as value for TEX_DEFAULT .endif TEXMFDIR?= share/texmf TEXMFDISTDIR?= share/texmf-dist TEXMFLOCALDIR?= share/texmf-local TEXMFVARDIR?= share/texmf-var TEXMFCONFIGDIR?=share/texmf-config FMTUTIL_CNF?= ${TEXMFCONFIGDIR}/web2c/fmtutil.cnf TEXHASHDIRS?= ${TEXMFDIR} ${TEXMFDISTDIR} ${TEXMFLOCALDIR} ${TEXMFVARDIR} ${TEXMFCONFIGDIR} TEXLIVE_YEAR?= 2021 TEXLIVE_VERSION?= ${TEXLIVE_YEAR}0325 .for V in TEXMFDIR TEXMFDISTDIR TEXMFLOCALDIR TEXMFVARDIR TEXMFCONFIGDIR FMTUTIL_CNF PLIST_SUB+= $V="${$V}" .endfor .if !empty(USE_TEX:tu:MTEXLIVE) IGNORE= "texlive" must not be defined in USE_TEX .endif _USE_TEX_TEXMF_DEP= ${LOCALBASE}/${TEXMFDISTDIR}/README _USE_TEX_TEXMF_PORT= print/${_USE_TEX_TEXMF_PKGNAME} _USE_TEX_TEXMF_PKGNAME= texlive-texmf _USE_TEX_BASE_DEP= texconfig _USE_TEX_BASE_PORT= print/${_USE_TEX_BASE_PKGNAME} _USE_TEX_BASE_PKGNAME= texlive-base _USE_TEX_GBKLATEX_DEP= gbklatex _USE_TEX_GBKLATEX_PORT= ${_USE_TEX_BASE_PORT} _USE_TEX_GBKLATEX_PKGNAME=${_USE_TEX_BASE_PKGNAME} _USE_TEX_SOURCE_DEP= ${_USE_TEX_SOURCE_PKGNAME}>=${TEXLIVE_VERSION} _USE_TEX_SOURCE_PORT= print/${_USE_TEX_SOURCE_PKGNAME} _USE_TEX_SOURCE_PKGNAME=texlive-texmf-source _USE_TEX_DOCS_DEP= ${LOCALBASE}/${TEXMFDISTDIR}/doc/texlive/texlive-en/README _USE_TEX_DOCS_PORT= print/${_USE_TEX_DOCS_PKGNAME} _USE_TEX_DOCS_PKGNAME= texlive-docs _USE_TEX_TLMGR_DEP= ${LOCALBASE}/${TEXMFDISTDIR}/.texlive-tlmgr _USE_TEX_TLMGR_PORT= print/${_USE_TEX_TLMGR_PKGNAME} _USE_TEX_TLMGR_PKGNAME= texlive-tlmgr _USE_TEX_DVIPSK_DEP= dvips _USE_TEX_DVIPSK_PORT= print/${_USE_TEX_DVIPSK_PKGNAME} _USE_TEX_DVIPSK_PKGNAME=tex-dvipsk _USE_TEX_XDVIK_DEP= xdvi _USE_TEX_XDVIK_PORT= print/${_USE_TEX_XDVIK_PKGNAME} _USE_TEX_XDVIK_PKGNAME= tex-xdvik _USE_TEX_DVIPDFMX_DEP= dvipdfmx _USE_TEX_DVIPDFMX_PORT= print/${_USE_TEX_DVIPDFMX_PKGNAME} _USE_TEX_DVIPDFMX_PKGNAME=tex-dvipdfmx _USE_TEX_BASIC_DEP= tex _USE_TEX_BASIC_PORT= print/${_USE_TEX_BASIC_PKGNAME} _USE_TEX_BASIC_PKGNAME= tex-basic-engines .for _L in TEX LATEX PDFTEX _USE_TEX_${_L}_DEP= ${_USE_TEX_FORMATS_DEP} _USE_TEX_${_L}_PORT= ${_USE_TEX_FORMATS_PORT} _USE_TEX_${_L}_PKGNAME= ${_USE_TEX_FORMATS_PKGNAME} .endfor _USE_TEX_JADETEX_DEP= jadetex _USE_TEX_JADETEX_PORT= print/${_USE_TEX_JADETEX_PKGNAME} _USE_TEX_JADETEX_PKGNAME=tex-jadetex _USE_TEX_XMLTEX_DEP= xmltex _USE_TEX_XMLTEX_PORT= print/${_USE_TEX_XMLTEX_PKGNAME} _USE_TEX_XMLTEX_PKGNAME=tex-xmltex _USE_TEX_PTEX_DEP= ptex _USE_TEX_PTEX_PORT= japanese/${_USE_TEX_PTEX_PKGNAME} _USE_TEX_PTEX_PKGNAME= tex-ptex _USE_TEX_WEB2C_DEP= weave _USE_TEX_WEB2C_PORT= devel/${_USE_TEX_WEB2C_PKGNAME} _USE_TEX_WEB2C_PKGNAME= tex-web2c _USE_TEX_KPATHSEA_DEP= libkpathsea.so _USE_TEX_KPATHSEA_PORT= devel/${_USE_TEX_KPATHSEA_PKGNAME} _USE_TEX_KPATHSEA_PKGNAME=tex-kpathsea _USE_TEX_PTEXENC_DEP= libptexenc.so _USE_TEX_PTEXENC_PORT= print/${_USE_TEX_PTEXENC_PKGNAME} _USE_TEX_PTEXENC_PKGNAME=tex-ptexenc _USE_TEX_TEXLUA_DEP= libtexlua53.so _USE_TEX_TEXLUA_PORT= devel/${_USE_TEX_TEXLUA_PKGNAME} _USE_TEX_TEXLUA_PKGNAME=tex-libtexlua _USE_TEX_TEXLUAJIT_DEP= libtexluajit.so _USE_TEX_TEXLUAJIT_PORT= devel/${_USE_TEX_TEXLUAJIT_PKGNAME} _USE_TEX_TEXLUAJIT_PKGNAME=tex-libtexluajit _USE_TEX_FORMATS_DEP= ${LOCALBASE}/${TEXMFVARDIR}/web2c/tex/tex.fmt _USE_TEX_FORMATS_PORT= print/${_USE_TEX_FORMATS_PKGNAME} _USE_TEX_FORMATS_PKGNAME=tex-formats _USE_TEX_SYNCTEX_DEP= libsynctex.so _USE_TEX_SYNCTEX_PORT= devel/${_USE_TEX_SYNCTEX_PKGNAME} _USE_TEX_SYNCTEX_PKGNAME=tex-synctex _USE_TEX_XPDFOPEN_DEP= pdfopen _USE_TEX_XPDFOPEN_PORT= print/${_USE_TEX_XPDFOPEN_PKGNAME} _USE_TEX_XPDFOPEN_PKGNAME= xpdfopen _USE_TEX_LUATEX_DEP= luatex _USE_TEX_LUATEX_PORT= print/${_USE_TEX_LUATEX_PKGNAME} _USE_TEX_LUATEX_PKGNAME=tex-luatex _USE_TEX_XETEX_DEP= xetex _USE_TEX_XETEX_PORT= print/${_USE_TEX_XETEX_PKGNAME} _USE_TEX_XETEX_PKGNAME= tex-xetex _USE_TEX_FULLLIST= texmf>=${TEXLIVE_VERSION} base>=${TEXLIVE_VERSION} \ web2c tlmgr:run \ basic formats xetex jadetex luatex xmltex ptex \ dvipsk dvipdfmx xdvik xpdfopen:run \ kpathsea:lib ptexenc:lib texlua:lib texluajit:lib synctex:lib .if !empty(USE_TEX:tu:MFULL) USE_TEX:= ${USE_TEX:tu:NFULL} ${_USE_TEX_FULLLIST:tu} .endif .for _UU in ${USE_TEX:tu} _U:= ${_UU} # ugly but necessary in for loop _VOP:= -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXMF) && empty(_U:M*[<>=]*) +. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXMF) && empty(_U:M*[<>=]*) _U:= ${_U}>=${TEXLIVE_VERSION} -. endif -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MBASE) && empty(_U:M*[<>=]*) +. endif +. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MBASE) && empty(_U:M*[<>=]*) _U:= ${_U}>=${TEXLIVE_VERSION} -. endif -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MKPATHSEA) || \ +. endif +. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MKPATHSEA) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MPTEXENC) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXLUA) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MTEXLUAJIT) || \ !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MSYNCTEX) _U:= ${_U}:lib -. endif -. if !empty(_U:M*[<>=]*) +. endif +. if !empty(_U:M*[<>=]*) _VOP:= ${_U:C/^[^<>=]*//:C/\:.*$//} -. endif -. if empty(_U:M*\:*) +. endif +. if empty(_U:M*\:*) _C:= BUILD RUN -. else +. else _C:= ${_U:C/.*://:S/,/ /g:C/[<>=][^\:]*//g} -. endif +. endif #. warning DEBUG: ${_U}: _VOP=${_VOP}, _C=${_C} -. for _CC in ${_C:tu} +. for _CC in ${_C:tu} _V:=${_UU:C/[<>=][^\:]*//:C/\:.*$//} -. if defined(_USE_TEX_${_V}_PORT) -. if !empty(_VOP) -. for _T in ${_USE_TEX_${_V}_PKGNAME}${_VOP}:${_USE_TEX_${_V}_PORT} +. if defined(_USE_TEX_${_V}_PORT) +. if !empty(_VOP) +. for _T in ${_USE_TEX_${_V}_PKGNAME}${_VOP}:${_USE_TEX_${_V}_PORT} TEX_${_CC}_DEPENDS+= ${_T} -. endfor -. else -. for _T in ${_USE_TEX_${_V}_DEP}:${_USE_TEX_${_V}_PORT} +. endfor +. else +. for _T in ${_USE_TEX_${_V}_DEP}:${_USE_TEX_${_V}_PORT} TEX_${_CC}_DEPENDS+= ${_T} -. endfor -. endif -. endif -. endfor +. endfor +. endif +. endif +. endfor .endfor .for _C in EXTRACT BUILD LIB RUN ${_C}_DEPENDS+= ${TEX_${_C}_DEPENDS:O:u} .endfor .ORDER: do-texhash do-fmtutil do-updmap .if !empty(USE_TEX:Mtexhash) || \ !empty(USE_TEX:Mtexhash-bootstrap) || \ !empty(USE_TEX:Mfmtutil) || \ !empty(USE_TEX:Mupdmap) .PHONY: do-texhash do-texhash: -. if !empty(USE_TEX:Mtexhash-bootstrap) +. if !empty(USE_TEX:Mtexhash-bootstrap) @${ECHO_CMD} "@postexec ${LOCALBASE}/bin/mktexlsr " \ "${TEXHASHDIRS:S,^,%D/,}" >> ${TMPPLIST} @for D in ${TEXHASHDIRS}; do \ ${ECHO_CMD} "@rmtry $$D/ls-R"; \ ${ECHO_CMD} "@dir $$D"; \ done >> ${TMPPLIST} -. else +. else @${ECHO_CMD} "@postexec for D in ${TEXHASHDIRS:S,^,${PREFIX}/,}; do " \ "if [ -r \$$D/ls-R ]; then " \ "${LOCALBASE}/bin/mktexlsr \$$D; " \ "fi; done" >> ${TMPPLIST} @${ECHO_CMD} "@preunexec for D in ${TEXHASHDIRS:S,^,${PREFIX}/,}; do " \ "if [ -r \$$D/ls-R ]; then " \ "${LOCALBASE}/bin/mktexlsr \$$D; " \ "fi; done" >> ${TMPPLIST} -. endif +. endif post-install-script: do-texhash .endif .if !empty(USE_TEX:Mfmtutil) .PHONY: do-fmtutil -. for F in ${TEX_FORMATS} +. for F in ${TEX_FORMATS} do-fmtutil: post-install-$F do-fmtutil-$F do-fmtutil-$F: ${TEST} -n '${TEX_FORMAT_${F:tu}}' ${PRINTF} "%s\t#$F\n" ${TEX_FORMAT_${F:tu}} \ > ${WRKDIR}/fmtutil.cnf ${MKDIR} ${STAGEDIR}${PREFIX}/${TEXMFVARDIR}/web2c \ ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/web2c ${LN} -f -s ${LOCALBASE}/${TEXMFDISTDIR}/web2c/texmf.cnf \ ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/web2c/texmf.cnf ${LOCALBASE}/bin/mktexlsr ${TEXHASHDIRS:S,^,${STAGEDIR}${PREFIX}/,} ${CAT} ${WRKDIR}/fmtutil.cnf | \ while read format dum; do \ ${SETENV} PATH=${STAGEDIR}${PREFIX}/bin:${PATH}:${LOCALBASE}/bin \ TEXMFDIST=${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}:${LOCALBASE}/${TEXMFDISTDIR} \ ${LOCALBASE}/bin/fmtutil-sys \ --byfmt $$format \ --fmtdir ${STAGEDIR}${PREFIX}/${TEXMFVARDIR}/web2c \ --cnffile ${WRKDIR}/fmtutil.cnf; \ done # XXX #cd ${STAGEDIR}${PREFIX}/${TEXMFVARDIR}/web2c && \ # ${FIND} . -name "*.log" | ${XARGS} \ # ${REINPLACE_CMD:S/.bak/ ""/} "s,${STAGEDIR},,g" ${RM} ${TEXHASHDIRS:S,^,${STAGEDIR}${PREFIX}/,:S,$,/ls-R,} \ ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/web2c/texmf.cnf ${RMDIR} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/web2c || ${TRUE} ${RMDIR} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR} || ${TRUE} _PLIST_FILES+= ${TEX_FORMAT_${F:tu}_FILES} _PLIST_DIRS+=${TEX_FORMAT_${F:tu}_DIRS} _PLIST_FILES+= ${TEX_FORMAT_${F:tu}_BIN} -. endfor +. endfor post-install-script: do-fmtutil PLIST_FILES= ${_PLIST_FILES:O:u} PLIST_DIRS= ${_PLIST_DIRS:O:u} ${TEXMFVARDIR}/web2c .endif .if !empty(USE_TEX:Mupdmap) .PHONY: do-updmap do-updmap: @${ECHO_CMD} "@postexec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin " \ "TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} " \ "${LOCALBASE}/bin/updmap-sys" >> ${TMPPLIST} @${ECHO_CMD} "@preunexec ${SETENV} PATH=${PATH}:${LOCALBASE}/bin " \ "TEXMFMAIN=${LOCALBASE}/${TEXMFDIR} " \ "${LOCALBASE}/bin/updmap-sys" >> ${TMPPLIST} post-install-script: do-updmap .endif TEX_FORMAT_AMSTEX?= \ "amstex pdftex - -translate-file=cp227.tcx *amstex.ini" TEX_FORMAT_AMSTEX_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/amstex.log \ ${TEXMFVARDIR}/web2c/pdftex/amstex.fmt TEX_FORMAT_AMSTEX_BIN= \ bin/amstex TEX_FORMAT_AMSTEX_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-amstex: ${LN} -fs pdftex ${STAGEDIR}${PREFIX}/bin/amstex TEX_FORMAT_CONTEXT?= \ "cont-en pdftex cont-usr.tex -8bit *cont-en.mkii" # XXX # "metafun mpost - metafun.mp" TEX_FORMAT_CONTEXT_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/cont-en.log \ ${TEXMFVARDIR}/web2c/pdftex/cont-en.fmt # bin/metafun TEX_FORMAT_CONTEXT_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-context: @${DO_NADA} # ${LN} -sf mpost ${PREFIX}/bin/metafun TEX_FORMAT_CSPLAIN?= \ "csplain pdftex - -etex -enc csplain-utf8.ini" \ "pdfcsplain pdftex - -etex -enc csplain-utf8.ini" TEX_FORMAT_CSPLAIN_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/csplain.log \ ${TEXMFVARDIR}/web2c/pdftex/csplain.fmt \ ${TEXMFVARDIR}/web2c/pdftex/pdfcsplain.log \ ${TEXMFVARDIR}/web2c/pdftex/pdfcsplain.fmt TEX_FORMAT_CSPLAIN_BIN= \ bin/csplain TEX_FORMAT_CSPLAIN_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-csplain: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/csplain TEX_FORMAT_EPLAIN?= \ "eplain pdftex language.dat -translate-file=cp227.tcx *eplain.ini" TEX_FORMAT_EPLAIN_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/eplain.log \ ${TEXMFVARDIR}/web2c/pdftex/eplain.fmt TEX_FORMAT_EPLAIN_BIN= \ bin/eplain TEX_FORMAT_EPLAIN_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-eplain: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/eplain TEX_FORMAT_JADETEX?= \ "jadetex pdftex language.dat *jadetex.ini" \ "pdfjadetex pdftex language.dat *pdfjadetex.ini" TEX_FORMAT_JADETEX_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/jadetex.log \ ${TEXMFVARDIR}/web2c/pdftex/jadetex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/pdfjadetex.log \ ${TEXMFVARDIR}/web2c/pdftex/pdfjadetex.fmt TEX_FORMAT_JADETEX_BIN= \ bin/jadetex \ bin/pdfjadetex TEX_FORMAT_JADETEX_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-jadetex: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/jadetex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdfjadetex TEX_FORMAT_LATEX-BIN?= \ "latex pdftex language.dat -translate-file=cp227.tcx *latex.ini" \ "pdflatex pdftex language.dat -translate-file=cp227.tcx *pdflatex.ini" TEX_FORMAT_LATEX-BIN_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/latex.log \ ${TEXMFVARDIR}/web2c/pdftex/latex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/pdflatex.log \ ${TEXMFVARDIR}/web2c/pdftex/pdflatex.fmt TEX_FORMAT_LATEX-BIN_BIN= \ bin/latex \ bin/pdflatex TEX_FORMAT_LATEX-BIN_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-latex-bin: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/latex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdflatex TEX_FORMAT_LUATEX?= \ "luatex luatex language.def,language.dat.lua luatex.ini" \ "dviluatex luatex language.def,language.dat.lua dviluatex.ini" \ "dvilualatex luatex language.dat,language.dat.lua dvilualatex.ini" \ "lualatex luatex language.dat,language.dat.lua lualatex.ini" \ "luajittex luajittex language.def,language.dat.lua luatex.ini" \ "pdfcsplain luatex - -etex csplain.ini" \ "lollipop luatex - lollipop.ini" TEX_FORMAT_LUATEX_FILES= \ ${TEXMFVARDIR}/web2c/luatex/dviluatex.log \ ${TEXMFVARDIR}/web2c/luatex/dviluatex.fmt \ ${TEXMFVARDIR}/web2c/luatex/dvilualatex.log \ ${TEXMFVARDIR}/web2c/luatex/dvilualatex.fmt \ ${TEXMFVARDIR}/web2c/luatex/luatex.log \ ${TEXMFVARDIR}/web2c/luatex/luatex.fmt \ ${TEXMFVARDIR}/web2c/luatex/lualatex.log \ ${TEXMFVARDIR}/web2c/luatex/lualatex.fmt \ ${TEXMFVARDIR}/web2c/luatex/pdfcsplain.log \ ${TEXMFVARDIR}/web2c/luatex/pdfcsplain.fmt \ ${TEXMFVARDIR}/web2c/luajittex/luajittex.log \ ${TEXMFVARDIR}/web2c/luajittex/luajittex.fmt TEX_FORMAT_LUATEX_BIN= \ bin/dviluatex \ bin/dvilualatex \ bin/luajittex \ bin/lualatex \ bin/lualollipop \ bin/luatex \ bin/texlua \ bin/texluac \ bin/texluajit \ bin/texluajitc TEX_FORMAT_LUATEX_DIRS= \ ${TEXMFVARDIR}/web2c/luatex \ ${TEXMFVARDIR}/web2c/luajittex post-install-luatex: ${LN} -sf luatex ${STAGEDIR}${PREFIX}/bin/dviluatex ${LN} -sf luatex ${STAGEDIR}${PREFIX}/bin/dvilualatex ${LN} -sf luatex ${STAGEDIR}${PREFIX}/bin/lualatex ${LN} -sf luatex ${STAGEDIR}${PREFIX}/bin/lualollipop ${LN} -sf luatex ${STAGEDIR}${PREFIX}/bin/texlua ${LN} -sf luatex ${STAGEDIR}${PREFIX}/bin/texluac ${LN} -sf luajittex ${STAGEDIR}${PREFIX}/bin/texluajit ${LN} -sf luajittex ${STAGEDIR}${PREFIX}/bin/texluajitc TEX_FORMAT_LOLLIPOP?= \ "lollipop pdftex - -translate-file=cp227.tcx *lollipop.ini" TEX_FORMAT_LOLLIPOP_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/lollipop.log \ ${TEXMFVARDIR}/web2c/pdftex/lollipop.fmt TEX_FORMAT_LOLLIPOP_BIN= \ bin/lollipop TEX_FORMAT_LOLLIPOP_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-lollipop-bin: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/lollipop TEX_FORMAT_METAFONT?= \ "mf mf-nowin - -translate-file=cp227.tcx mf.ini" TEX_FORMAT_METAFONT_FILES= \ ${TEXMFVARDIR}/web2c/metafont/mf.log \ ${TEXMFVARDIR}/web2c/metafont/mf.base TEX_FORMAT_METAFONT_DIRS= \ ${TEXMFVARDIR}/web2c/metafont post-install-metafont: @${DO_NADA} TEX_FORMAT_MEX?= \ "mex pdftex mexconf.tex -translate-file=cp227.tcx *mex.ini" \ "pdfmex pdftex mexconf.tex -translate-file=cp227.tcx *pdfmex.ini" \ "utf8mex pdftex mexconf.tex -enc *utf8mex.ini" TEX_FORMAT_MEX_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/mex.log \ ${TEXMFVARDIR}/web2c/pdftex/mex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/pdfmex.log \ ${TEXMFVARDIR}/web2c/pdftex/pdfmex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/utf8mex.log \ ${TEXMFVARDIR}/web2c/pdftex/utf8mex.fmt TEX_FORMAT_MEX_BIN= \ bin/mex \ bin/pdfmex \ bin/utf8mex TEX_FORMAT_MEX_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-mex: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/mex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdfmex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/utf8mex TEX_FORMAT_MLTEX?= \ "mllatex pdftex language.dat -translate-file=cp227.tcx -mltex mllatex.ini" \ "mltex pdftex - -translate-file=cp227.tcx -mltex mltex.ini" TEX_FORMAT_MLTEX_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/mllatex.log \ ${TEXMFVARDIR}/web2c/pdftex/mllatex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/mltex.log \ ${TEXMFVARDIR}/web2c/pdftex/mltex.fmt TEX_FORMAT_MLTEX_BIN= \ bin/mltex \ bin/mllatex TEX_FORMAT_MLTEX_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-mltex: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/mltex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/mllatex TEX_FORMAT_MPTOPDF?= \ "mptopdf pdftex - -translate-file=cp227.tcx mptopdf.tex" TEX_FORMAT_MPTOPDF_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/mptopdf.log \ ${TEXMFVARDIR}/web2c/pdftex/mptopdf.fmt TEX_FORMAT_MPTOPDF_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-mptopdf: @${DO_NADA} TEX_FORMAT_PDFTEX?= \ "pdftex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini" \ "etex pdftex language.def -translate-file=cp227.tcx *etex.ini" \ "pdfetex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini" TEX_FORMAT_PDFTEX_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/pdftex.log \ ${TEXMFVARDIR}/web2c/pdftex/pdftex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/etex.log \ ${TEXMFVARDIR}/web2c/pdftex/etex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/pdfetex.log \ ${TEXMFVARDIR}/web2c/pdftex/pdfetex.fmt TEX_FORMAT_PDFTEX_BIN= \ bin/etex \ bin/pdfetex TEX_FORMAT_PDFTEX_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-pdftex: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdfetex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/etex TEX_FORMAT_PTEX?= \ "ptex ptex - ptex.ini" \ "ptex eptex language.def *eptex.ini" \ "platex eptex language.dat *platex.ini" TEX_FORMAT_PTEX_FILES= \ ${TEXMFVARDIR}/web2c/ptex/ptex.log \ ${TEXMFVARDIR}/web2c/ptex/ptex.fmt \ ${TEXMFVARDIR}/web2c/eptex/ptex.log \ ${TEXMFVARDIR}/web2c/eptex/ptex.fmt \ ${TEXMFVARDIR}/web2c/eptex/platex.log \ ${TEXMFVARDIR}/web2c/eptex/platex.fmt TEX_FORMAT_PTEX_BIN= \ bin/eptex \ bin/pbibtex \ bin/pdvitype \ bin/ptex \ bin/platex \ bin/ppltotf \ bin/ptftopl \ bin/upbibtex \ bin/updvitype \ bin/uppltotf \ bin/uptftopl TEX_FORMAT_PTEX_DIRS= \ ${TEXMFVARDIR}/web2c/ptex \ ${TEXMFVARDIR}/web2c/eptex post-install-ptex: ${LN} -sf eptex ${STAGEDIR}${PREFIX}/bin/platex TEX_FORMAT_TEX?= \ "tex tex - tex.ini" TEX_FORMAT_TEX_FILES= \ ${TEXMFVARDIR}/web2c/tex/tex.log \ ${TEXMFVARDIR}/web2c/tex/tex.fmt TEX_FORMAT_TEX_DIRS= \ ${TEXMFVARDIR}/web2c/tex post-install-tex: @${DO_NADA} TEX_FORMAT_TEXSIS?= \ "texsis pdftex - -translate-file=cp227.tcx texsis.ini" TEX_FORMAT_TEXSIS_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/texsis.log \ ${TEXMFVARDIR}/web2c/pdftex/texsis.fmt TEX_FORMAT_TEXSIS_BIN= \ bin/texsis TEX_FORMAT_TEXSIS_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-texsis: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/texsis TEX_FORMAT_UPTEX?= \ "uptex uptex - uptex.ini" \ "euptex euptex language.def *euptex.ini" \ "uplatex euptex language.dat *uplatex.ini" TEX_FORMAT_UPTEX_FILES= \ ${TEXMFVARDIR}/web2c/euptex/euptex.log \ ${TEXMFVARDIR}/web2c/euptex/euptex.fmt \ ${TEXMFVARDIR}/web2c/uptex/uptex.log \ ${TEXMFVARDIR}/web2c/uptex/uptex.fmt \ ${TEXMFVARDIR}/web2c/euptex/uplatex.log \ ${TEXMFVARDIR}/web2c/euptex/uplatex.fmt TEX_FORMAT_UPTEX_BIN= \ bin/euptex \ bin/uptex \ bin/uplatex TEX_FORMAT_UPTEX_DIRS= \ ${TEXMFVARDIR}/web2c/euptex \ ${TEXMFVARDIR}/web2c/uptex post-install-uptex: ${LN} -sf euptex ${STAGEDIR}${PREFIX}/bin/uplatex TEX_FORMAT_XETEX?= \ "xetex xetex language.def -etex xetex.ini" \ "xelatex xetex language.dat -etex xelatex.ini" \ "pdfcsplain xetex - -etex csplain.ini" \ "cont-en xetex cont-usr.tex -8bit *cont-en.mkii" \ "lollipop xetex - -etex lollipop.ini" TEX_FORMAT_XETEX_FILES= \ ${TEXMFVARDIR}/web2c/xetex/lollipop.fmt \ ${TEXMFVARDIR}/web2c/xetex/lollipop.log \ ${TEXMFVARDIR}/web2c/xetex/cont-en.log \ ${TEXMFVARDIR}/web2c/xetex/cont-en.fmt \ ${TEXMFVARDIR}/web2c/xetex/pdfcsplain.log \ ${TEXMFVARDIR}/web2c/xetex/pdfcsplain.fmt \ ${TEXMFVARDIR}/web2c/xetex/xetex.log \ ${TEXMFVARDIR}/web2c/xetex/xetex.fmt \ ${TEXMFVARDIR}/web2c/xetex/xelatex.log \ ${TEXMFVARDIR}/web2c/xetex/xelatex.fmt TEX_FORMAT_XETEX_BIN= \ bin/xetex \ bin/xelatex \ bin/xelollipop TEX_FORMAT_XETEX_DIRS= \ ${TEXMFVARDIR}/web2c/xetex post-install-xetex: ${LN} -sf xetex ${STAGEDIR}${PREFIX}/bin/xelatex ${LN} -sf xetex ${STAGEDIR}${PREFIX}/bin/xelollipop TEX_FORMAT_XMLTEX?= \ "xmltex pdftex language.dat *xmltex.ini" \ "pdfxmltex pdftex language.dat *pdfxmltex.ini" TEX_FORMAT_XMLTEX_FILES= \ ${TEXMFVARDIR}/web2c/pdftex/xmltex.log \ ${TEXMFVARDIR}/web2c/pdftex/xmltex.fmt \ ${TEXMFVARDIR}/web2c/pdftex/pdfxmltex.log \ ${TEXMFVARDIR}/web2c/pdftex/pdfxmltex.fmt TEX_FORMAT_XMLTEX_BIN= \ bin/xmltex \ bin/pdfxmltex TEX_FORMAT_XMLTEX_DIRS= \ ${TEXMFVARDIR}/web2c/pdftex post-install-xmltex: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/xmltex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdfxmltex diff --git a/Mk/bsd.wx.mk b/Mk/bsd.wx.mk index e4d389e36622..9269867d22fe 100644 --- a/Mk/bsd.wx.mk +++ b/Mk/bsd.wx.mk @@ -1,518 +1,518 @@ # bsd.wx.mk - Support for wxWidgets based ports. # # Created by: Alejandro Pulver # # The following variables can be defined in a port that uses the wxWidgets # library, contributed libraries, WxPython and/or more wxWidgets related # components (with run and/or build dependencies). It can be used after and/or # before bsd.port.pre.mk, but Python components will only work if Python # variables (e.g. USE_PYTHON) are defined before it (this is a bsd.python.mk # limitation), at least it is manually included. # # USE_WX - Set to the list of wxWidgets versions that can be used by # the port. The syntax allows the following elements: # - Single version (e.g. "3.0"). # - Range of versions (e.g. "2.8-3.0"). Must be ascending. # - Partial range: single version and upper (e.g. "2.8+"). # - Partial range: single version and lower (e.g. "-2.8"). # Multiple elements can be specified separated by spaces. # USE_WX_NOT - Set to the list of wxWidgets versions that can't be used by # the port. In other words, it removes some versions from # USE_WX. If the latter is not defined, it will have the value # of all the possible versions. The syntax is like USE_WX. # WX_COMPS - Set to the list of wxWidgets components the port uses. # Several components can be specified separated by spaces. By # default it will have the value of "wx". Suffixes in the form # ":xxx" may be added to the components to determine the # dependency type. # The available components are: # wx - The wxWidgets library. # contrib - The wxWidgets contributed libraries. # python - The wxWidgets API for Python. # The available dependency types are: # build - Requires component for building. # lib - Requires component for building and running. # run - Requires component for running. # If no suffix is present then "run" will be used for "python" # and "lib" for others. # WX_CONF_ARGS - Set to "absolute" or "relative" if the port needs configure # arguments in addition to the WX_CONFIG environment variable. # It determines the type of parameters that have to be passed # to the configure script. In the first case it adds # "--with-wx-config=${WX_CONFIG}" (absolute path of # WX_CONFIG), and in second one "--with-wx=${LOCALBASE}" plus # "--with-wx-config=${WX_CONFIG:T} (prefix and name). # WX_PREMK - Define to determine version and define WX_CONFIG/WX_VERSION # after (in case the port needs to manually # run the script). # WANT_WX - Set to "yes" or a valid single version (no ranges, etc). # In both cases it will detect the installed wxWidgets # components and add them to the variable HAVE_WX. If a # version is selected, HAVE_WX will contain a list of # components in the other case it will contain a list of # "component-version" pairs (e.g. wx-2.8, contrib-2.8, etc). # It has to be used before bsd.port.pre.mk. # WANT_WX_VER - Set to the preferred wxWidgets version for the port. It must # be present in USE_WX or missing in USE_WX_NOT. This is # overridden by the user variable WITH_WX_VER if set. It can # contain multiple versions in order of preference (last ones # are tried first). # WANT_WXGTK_VER - Set to the preferred GTK+ version, "2" or "3", "3" being # the default (only applicable to wxWidgets 3.0 for now). # # The following variables are intended for the user and can be defined in # make.conf. # WITH_WX_VER - Define to the list of preferred versions in reverse order. # # The following variables are defined by this file, to be read from the port. # WX_CONFIG - The path to the wx-config program (with different name). # WXRC_CMD - The path to the wxrc program (with different name). # WX_VERSION - The wxWidgets version that is going to be used. # HAVE_WX - The list of wxWidgets components installed, if WANT_WX was # defined. The components will have version suffix if it was # set to "yes". # # Examples: # - A port that needs wxWidgets 2.8 and contributed libraries # USE_WX= 2.8 # WX_COMPS= wx contrib # - A port that needs WxPython 2.8 for running. # USE_PYTHON= yes # USE_WX= 2.8 # WX_COMPS= python:run # - A port that needs WxPython 2.8 or 3.0 for building. # USE_PYTHON= yes # USE_WX= 2.8 3.0 # WX_COMPS= python:build # - A port that needs wxWidgets version 2.8 or higher and contributed # libraries. # USE_WX= 2.8+ # WX_COMPS= wx contrib # - A port that needs wxWidgets of any version other than 2.8. # USE_WX_NOT= 2.8 # WX_Include_MAINTAINER= ports@FreeBSD.org # # Global definitions. # .if !defined(_WX_Definitions_Done) _WX_Definitions_Done= yes # # Common variables: # _WX_COMPS_ALL - List of valid components. # _WX_DEP_TYPES_ALL - List of valid dependency types. # _WX_VERS_ALL - List of supported versions. # _WX_VERS_UC_ALL - List of Unicode capable versions. # _WX_VERS_LISTS - Reverse lists preference order. # _WX_COMPS_ALL= wx contrib python _WX_DEP_TYPES_ALL= build lib run _WX_VERS_ALL= 2.8 3.0 3.1 _WX_VERS_UC_ALL= 2.8 3.0 3.1 _WX_VERS_SKIP= 3.0 3.1 _WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED # # Variables used to determine what is needed: # _WX_PORT_comp_ver - Port directory. # _WX_LIB_comp_ver - Name of the shared library (optional). # _WX_SHVER_comp_ver - Shared library version (optional). # _WX_FILE_comp_ver - File installed by that component. # _WX_DEPTYPE_comp_ver - Default dependency type (optional). # # wxgtk 2.8 _WX_PORT_wx_2.8= x11-toolkits/wxgtk28 _WX_LIB_wx_2.8= wx_base${_WX_UC}-2.8 _WX_PORT_contrib_2.8= x11-toolkits/wxgtk28-contrib _WX_LIB_contrib_2.8= wx_gtk2${_WX_UC}_fl-2.8 # wxgtk 3.0 _WX_PORT_wx_3.0= x11-toolkits/wxgtk30@${_GTKFLAVOR} _WX_LIB_wx_3.0= wx_baseu-3.0 _WX_PORT_python_3.1= x11-toolkits/py-wxPython4@${PY_FLAVOR} _WX_FILE_python_3.1= ${PYTHON_SITELIBDIR}/wx/__init__.py # wxgtk 3.1 _WX_PORT_wx_3.1= x11-toolkits/wxgtk31 _WX_LIB_wx_3.1= wx_baseu-3.1 # Set _WX_SHVER_comp_ver to 0 and _WX_FILE_comp_ver for libs appropriately. # Set _WX_DEPTYPE_comp_ver for "python" to "run", and others to "lib". -. for comp in ${_WX_COMPS_ALL} +. for comp in ${_WX_COMPS_ALL} _WX_COMP= ${comp} -. for ver in ${_WX_VERS_ALL} -. if defined(_WX_LIB_${comp}_${ver}) +. for ver in ${_WX_VERS_ALL} +. if defined(_WX_LIB_${comp}_${ver}) _WX_SHVER_${comp}_${ver}= 0 _WX_FILE_${comp}_${ver}= ${LOCALBASE}/lib/lib${_WX_LIB_${comp}_${ver}}.so.${_WX_SHVER_${comp}_${ver}} -. endif -. if ${_WX_COMP} == "python" +. endif +. if ${_WX_COMP} == "python" _WX_DEPTYPE_${comp}_${ver}= run -. else +. else _WX_DEPTYPE_${comp}_${ver}= lib -. endif -. endfor -. endfor +. endif +. endfor +. endfor .endif # !_WX_Defined_Done # # Check if we are going to determine the version. # .if !defined(_WX_Version_Done) && (defined(_POSTMKINCLUDED) || \ (defined(WX_PREMK) && defined(BEFOREPORTMK) && \ (defined(USE_WX) || defined(USE_WX_NOT)))) _WX_Need_Version= yes .endif # # Check for present components. # # Requested by the user. .if defined(WANT_WX) && defined(BEFOREPORTMK) _WANT_WX= ${WANT_WX} .endif # Used for autodetection of installed versions. .if defined(_WX_Need_Version) _WANT_WX= yes .endif .if defined(_WANT_WX) # These variables are reprocessed later so they won't affect other parts. _WX_VER_FINAL= ${_WX_VERS_UC_ALL} _WX_UC= u _WX_PYSUFX= -unicode # Fill _HAVE_WX with the installed components. . undef _HAVE_WX -. for __WANT_WX in ${_WANT_WX} +. for __WANT_WX in ${_WANT_WX} # Check if _WANT_WX contains more than one word. -. if defined(_HAVE_WX) +. if defined(_HAVE_WX) IGNORE?= selected multiple values for WANT_WX: ${_WANT_WX} -. endif +. endif _HAVE_WX= # # Check for all versions. -. if ${_WANT_WX:tl} == "yes" -. for comp in ${_WX_COMPS_ALL} -. for ver in ${_WX_VER_FINAL} +. if ${_WANT_WX:tl} == "yes" +. for comp in ${_WX_COMPS_ALL} +. for ver in ${_WX_VER_FINAL} _WX_COMP= _WX_FILE_${comp}_${ver} -. if defined(${_WX_COMP}) && exists(${${_WX_COMP}}) +. if defined(${_WX_COMP}) && exists(${${_WX_COMP}}) _HAVE_WX+= ${comp}-${ver} -. endif -. endfor -. endfor +. endif +. endfor +. endfor # Check for a specific version. -. elif ${_WX_VERS_ALL:M${__WANT_WX}} -. for comp in ${_WX_COMPS_ALL} -. if exists(${_WX_FILE_${comp}_${__WANT_WX}}) +. elif ${_WX_VERS_ALL:M${__WANT_WX}} +. for comp in ${_WX_COMPS_ALL} +. if exists(${_WX_FILE_${comp}_${__WANT_WX}}) _HAVE_WX+= ${comp} -. endif -. endfor -. else +. endif +. endfor +. else IGNORE?= selected an invalid value for WANT_WX: ${__WANT_WX} -. endif -. endfor +. endif +. endfor .endif # _WANT_WX # Requested by the user. .if defined(WANT_WX) && defined(BEFOREPORTMK) HAVE_WX:= ${_HAVE_WX} .endif # Used for autodetection of installed versions. .if defined(_WX_Need_Version) _WX_VER_INSTALLED:= ${_HAVE_WX:Mwx-*:S/wx-//} .endif # # Select wxWidgets version. # .if defined(_WX_Need_Version) _WX_Version_Done= yes # # Basic component parsing (ignores dependency types). # # The variables used are: # _WX_COMP - Component part. # _WX_COMPS_FINAL - Final list of components. # # Detect duplicated components. _WX_COMPS_FINAL= # -.for comp in ${WX_COMPS} +. for comp in ${WX_COMPS} _WX_COMP= ${comp:C/:([[:alpha:]]+)$//} -. for __WX_COMP in ${_WX_COMP} -. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" +. for __WX_COMP in ${_WX_COMP} +. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" IGNORE?= selected an invalid wxWidgets component: ${__WX_COMP} -. endif -. endfor -. for newcomp in ${_WX_COMP} -. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) +. endif +. endfor +. for newcomp in ${_WX_COMP} +. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) _WX_COMPS_FINAL+= ${newcomp} -. endif -. endfor -.endfor +. endif +. endfor +. endfor # Set defaults (if one isn't present). USE_WX?= ${_WX_VERS_ALL} USE_WX_NOT?= # # # Make lists of valid and invalid versions. # # The following variables are used: # _WX_VER_CHECK - If the version is a single one, express in a range. # _WX_VER_MIN - Lower version of the range. # _WX_VER_MAX - Higher version of the range. # _WX_VER_LIST - List of requested versions. # _WX_VER_NOT_LIST - List of disallowed versions. # _WX_VER_MERGED - List of requested version without disallowed ones. # -.for list in VER VER_NOT +. for list in VER VER_NOT _WX_${list}_LIST= # -. for ver in ${USE_WX${list:C/VER//}} +. for ver in ${USE_WX${list:C/VER//}} _WX_VER_CHECK:= ${ver:C/^([[:digit:]]+(\.[[:digit:]]+)*)$/\1-\1/} _WX_VER_MIN:= ${_WX_VER_CHECK:C/([[:digit:]]+(\.[[:digit:]]+)*)[-+].*/\1/} _WX_VER_MAX:= ${_WX_VER_CHECK:C/.*-([[:digit:]]+(\.[[:digit:]]+)*)/\1/} # Minimum version not specified. -. if ${_WX_VER_MIN} == ${_WX_VER_CHECK} +. if ${_WX_VER_MIN} == ${_WX_VER_CHECK} . undef _WX_VER_MIN -. for v in ${_WX_VERS_ALL} -. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" +. for v in ${_WX_VERS_ALL} +. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" _WX_VER_MIN?= ${v} -. endif -. endfor -. endif +. endif +. endfor +. endif # Maximum version not specified. -. if ${_WX_VER_MAX} == ${_WX_VER_CHECK} -. for v in ${_WX_VERS_ALL} -. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" +. if ${_WX_VER_MAX} == ${_WX_VER_CHECK} +. for v in ${_WX_VERS_ALL} +. if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == "" _WX_VER_MAX= ${v} -. endif -. endfor -. endif +. endif +. endfor +. endif # Expand versions and add valid ones to each list. -. for v in ${_WX_VERS_ALL} -. if ${_WX_VER_MIN} <= ${v} && ${_WX_VER_MAX} >= ${v} && \ +. for v in ${_WX_VERS_ALL} +. if ${_WX_VER_MIN} <= ${v} && ${_WX_VER_MAX} >= ${v} && \ ${_WX_${list}_LIST:M${v}} == "" _WX_${list}_LIST+= ${v} -. endif -. endfor -. endfor -.endfor +. endif +. endfor +. endfor +. endfor # Merge the lists into a single list of valid versions. _WX_VER_MERGED= # -.for ver in ${_WX_VER_LIST} -. if ${_WX_VER_NOT_LIST:M${ver}} == "" +. for ver in ${_WX_VER_LIST} +. if ${_WX_VER_NOT_LIST:M${ver}} == "" _WX_VER_MERGED+= ${ver} -. endif -.endfor +. endif +. endfor # Check for a null version. -.if empty(_WX_VER_MERGED) +. if empty(_WX_VER_MERGED) IGNORE?= selected a null or invalid wxWidgets version -.endif +. endif # Avoid versions which have unavailable components. -.for ver in ${_WX_VER_MERGED} -. for comp in ${_WX_COMPS_FINAL} -. if !defined(_WX_PORT_${comp}_${ver}) +. for ver in ${_WX_VER_MERGED} +. for comp in ${_WX_COMPS_FINAL} +. if !defined(_WX_PORT_${comp}_${ver}) _WX_WRONG_COMPS+= ${comp} _WX_WRONG_VERS+= ${ver} _WX_VER_MERGED:= ${_WX_VER_MERGED:N${ver}} -. endif -. endfor -.endfor +. endif +. endfor +. endfor -.if empty(_WX_VER_MERGED) +. if empty(_WX_VER_MERGED) IGNORE?= selected wxWidgets versions (${_WX_WRONG_VERS}) which do not have the selected components (${_WX_WRONG_COMPS}) -.endif +. endif # # Unicode support. # # Create a list of capable versions. _WX_VER_UC= # -.for ver in ${_WX_VER_MERGED} -. if ${_WX_VERS_UC_ALL:M${ver}} != "" +. for ver in ${_WX_VER_MERGED} +. if ${_WX_VERS_UC_ALL:M${ver}} != "" _WX_VER_UC+= ${ver} -. endif -.endfor +. endif +. endfor # Set Unicode variables. _WX_VER_FINAL= ${_WX_VER_UC} _WX_UC= u _WX_PYSUFX= -unicode # Remove unusable installed versions. -.for ver in ${_WX_VER_INSTALLED} -. if ${_WX_VER_FINAL:M${ver}} == "" +. for ver in ${_WX_VER_INSTALLED} +. if ${_WX_VER_FINAL:M${ver}} == "" _WX_VER_INSTALLED:= ${_WX_VER_INSTALLED:N${ver}} -. endif -.endfor +. endif +. endfor # # Choose final version. # # # Check for the following (in order): # 1) WITH_WX_VER - User preference. # 2) WANT_WX_VER - Port preference. # 3) _WX_VER_INSTALLED - Installed versions. # 4) _WX_VER_FINAL - Available versions. -.for list in _WX_VER_FINAL ${_WX_VERS_LISTS} -. if defined(${list}) -. for ver in ${${list}} -. if ${_WX_VER_FINAL:M${ver}} != "" +. for list in _WX_VER_FINAL ${_WX_VERS_LISTS} +. if defined(${list}) +. for ver in ${${list}} +. if ${_WX_VER_FINAL:M${ver}} != "" _WX_VER= ${ver} -. endif -. endfor -. endif -.endfor +. endif +. endfor +. endif +. endfor # # Set variables. # -.if ${_WX_VER} == 3.1 +. if ${_WX_VER} == 3.1 _GTKVER= 3 -.elif ${_WX_VER} == 3.0 +. elif ${_WX_VER} == 3.0 _GTKVER= ${WANT_WXGTK_VER:U3} _GTKFLAVOR= gtk${_GTKVER} -.else +. else _GTKVER= 2 -.endif +. endif WX_CONFIG?= ${LOCALBASE}/bin/wxgtk${_GTKVER}${_WX_UC}-${_WX_VER}-config WXRC_CMD?= ${LOCALBASE}/bin/wxrc-gtk${_GTKVER}${_WX_UC}-${_WX_VER} WX_VERSION?= ${_WX_VER} .endif # _WX_Need_Version # # Process components list and add dependencies, variables, etc. # .if defined(_POSTMKINCLUDED) # # Component parsing. # # The variables used are: # _WX_COMP - Component part. # _WX_DEP_TYPE - Dependency type part. # _WX_COMP_NEW - Component + dependency type. # _WX_COMPS_FINAL - Final list of components with dependency types. # # Default components. WX_COMPS?= wx # Detect invalid and duplicated components. _WX_COMPS_FINAL= # -.for comp in ${WX_COMPS} +. for comp in ${WX_COMPS} _WX_COMP= ${comp:C/:([[:alpha:]]+)$//} -. if ${_WX_COMP} == ${comp} +. if ${_WX_COMP} == ${comp} _WX_DEP_TYPE= ${_WX_DEPTYPE_${comp}_${_WX_VER}} -. else +. else _WX_DEP_TYPE= ${comp:C/.+:([[:alpha:]]+)$/\1/} -. endif +. endif _WX_COMP_NEW= ${_WX_COMP}_${_WX_DEP_TYPE} -. for __WX_COMP in ${_WX_COMP} -. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" +. for __WX_COMP in ${_WX_COMP} +. if ${_WX_COMPS_ALL:M${__WX_COMP}} == "" IGNORE?= selected an invalid wxWidgets component: ${__WX_COMP} -. endif -. endfor -. for __WX_DEP_TYPE in ${_WX_DEP_TYPE} -. if ${_WX_DEP_TYPES_ALL:M${__WX_DEP_TYPE}} == "" +. endif +. endfor +. for __WX_DEP_TYPE in ${_WX_DEP_TYPE} +. if ${_WX_DEP_TYPES_ALL:M${__WX_DEP_TYPE}} == "" IGNORE?= selected an invalid wxWidgets dependency type: ${__WX_DEP_TYPE} -. endif -. endfor -. if !defined(_WX_PORT_${_WX_COMP}_${_WX_VER}) +. endif +. endfor +. if !defined(_WX_PORT_${_WX_COMP}_${_WX_VER}) IGNORE?= selected a wxWidgets component (${_WX_COMP}) which is not available for the selected version (${_WX_VER}) -. endif -. for newcomp in ${_WX_COMP_NEW} -. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) +. endif +. for newcomp in ${_WX_COMP_NEW} +. if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE) _WX_COMPS_FINAL+= ${newcomp} -. endif -. endfor -.endfor +. endif +. endfor +. endfor # Add dependencies. # # The variable used are: # _WX_COMP - Component part. # _WX_DEP_TYPE - Dependency type part. -.for comp in ${_WX_COMPS_FINAL} +. for comp in ${_WX_COMPS_FINAL} _WX_COMP= ${comp:C/_([[:alpha:]]+)$//} _WX_DEP_TYPE= ${comp:C/.+_([[:alpha:]]+)$/\1/} # XXX Need a .for loop here so the variable is expanded before the assignment. -. for comp_part in ${_WX_COMP} -. if ${_WX_DEP_TYPE} == "lib" -. if defined(_WX_LIB_${_WX_COMP}_${_WX_VER}) +. for comp_part in ${_WX_COMP} +. if ${_WX_DEP_TYPE} == "lib" +. if defined(_WX_LIB_${_WX_COMP}_${_WX_VER}) LIB_DEPENDS+= lib${_WX_LIB_${comp_part}_${_WX_VER}}.so:${_WX_PORT_${comp_part}_${_WX_VER}} -. else +. else BUILD_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}} RUN_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}} -. endif -. else +. endif +. else ${_WX_DEP_TYPE:tu}_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${comp_part}_${_WX_VER}} -. endif -. endfor -.endfor +. endif +. endfor +. endfor # # Set build related variables. # MAKE_ENV+= WX_CONFIG=${WX_CONFIG} CONFIGURE_ENV+= WX_CONFIG=${WX_CONFIG} -.if defined(WX_CONF_ARGS) -. if ${WX_CONF_ARGS:tl} == "absolute" +. if defined(WX_CONF_ARGS) +. if ${WX_CONF_ARGS:tl} == "absolute" CONFIGURE_ARGS+= --with-wx-config=${WX_CONFIG} -. elif ${WX_CONF_ARGS:tl} == "relative" +. elif ${WX_CONF_ARGS:tl} == "relative" CONFIGURE_ARGS+= --with-wx=${LOCALBASE} \ --with-wx-config=${WX_CONFIG:T} -. else +. else IGNORE?= selected an invalid wxWidgets configure argument type: ${WX_CONF_ARGS} -. endif -.endif +. endif +. endif .endif # _POSTMKINCLUDED