diff options
Diffstat (limited to 'Mk')
176 files changed, 9717 insertions, 7585 deletions
diff --git a/Mk/Features/bind_now.mk b/Mk/Features/bind_now.mk new file mode 100644 index 000000000000..99361c487265 --- /dev/null +++ b/Mk/Features/bind_now.mk @@ -0,0 +1,10 @@ +# BIND_NOW Support + +.if !defined(_BIND_NOW_MK_INCLUDED) +_BIND_NOW_MK_INCLUDED= yes +BIND_NOW_Include_MAINTAINER= portmgr@FreeBSD.org + +. if !defined(BIND_NOW_UNSAFE) +LDFLAGS+= -Wl,-znow +. endif +.endif diff --git a/Mk/Features/debug.mk b/Mk/Features/debug.mk new file mode 100644 index 000000000000..6e67a2315223 --- /dev/null +++ b/Mk/Features/debug.mk @@ -0,0 +1,24 @@ +# DEBUG Support +# +# Add WITH_DEBUG into make.conf: +# - 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. + +.if !defined(_DEBUG_MK_INCLUDED) +_DEBUG_MK_INCLUDED= yes +DEBUG_Include_MAINTAINER= portmgr@FreeBSD.org + +. if !defined(INSTALL_STRIPPED) +STRIP= #none +MAKE_ENV+= DONTSTRIP=yes +STRIP_CMD= ${TRUE} +. endif +DEBUG_FLAGS?= -g +CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} +. if defined(INSTALL_TARGET) +INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} +. endif +.endif diff --git a/Mk/Features/debuginfo.mk b/Mk/Features/debuginfo.mk new file mode 100644 index 000000000000..e64e59c68653 --- /dev/null +++ b/Mk/Features/debuginfo.mk @@ -0,0 +1,34 @@ +# DEBUGINFO Support +# +# Add WITH_DEBUGINFO=yes into make.conf: +# - If set, the port will be compiled in the release mode but with debugging +# info generated. The debugging info is then extracted from binaries and put +# into a separate subpackage called debuginfo. +# - If used in conjunction with WITH_DEBUG the port will be compiled in the +# debug mode. + +.if !defined(_DEBUGINFO_MK_INCLUDED) +_DEBUGINFO_MK_INCLUDED= yes +DEBUGINFO_Include_MAINTAINER= portmgr@FreeBSD.org + +# We need to do everything that Features/debug.mk does, but without setting +# WITH_DEBUG to prevent build systems from building in the complete debug mode. +# instead let them detect WITH_DEBUGINFO and build what meson calls "debugoptimized" +# and CMake calls "RelWithDebInfo". +. if !defined(WITH_DEBUG) +. include "debug.mk" +. endif + +SUBPACKAGES+= debuginfo +DESCR.debuginfo= ${WRKDIR}/descr.debuginfo +DEBUGINFO_EXTRACT_ENV= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} STAGEDIR=${STAGEDIR} \ + TMPPLIST=${TMPPLIST} PREPEND_SUBPACKAGE_PREFIX=yes + +_FEATURES_stage= 751:debuginfo-extract + +debuginfo-extract: + @${ECHO_CMD} "Debugging symbols for the ${PKGNAME} package" > ${DESCR.debuginfo} + @${ECHO_CMD} "====> Extracting debugging symbols from binaries" + @${SETENV} ${DEBUGINFO_EXTRACT_ENV} ${SH} ${SCRIPTSDIR}/generate-symbols.sh + +.endif diff --git a/Mk/Features/lto.mk b/Mk/Features/lto.mk new file mode 100644 index 000000000000..3fef5a223e9c --- /dev/null +++ b/Mk/Features/lto.mk @@ -0,0 +1,35 @@ +# LTO Support +# +# This file enforces Link Time Optimization for ports. +# In order to use it, add WITH_LTO=yes to your /etc/make.conf. + +.if !defined(_LTO_MK_INCLUDED) +_LTO_MK_INCLUDED= yes +LTO_Include_MAINTAINER= pkubaj@FreeBSD.org + +. if !defined(LTO_UNSAFE) || defined(LTO_DISABLE_CHECK) +. if "${ARCH}" == "riscv64" && !defined(LTO_DISABLE_CHECK) + DEV_WARNING+= "LTO is currently broken on riscv64, to override set LTO_DISABLE_CHECK=yes" +. elif defined(_INCLUDE_USES_CARGO_MK) + CARGO_ENV+= CARGO_PROFILE_RELEASE_LTO="true" \ + CARGO_PROFILE_RELEASE_PANIC="abort" \ + CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 +. elif defined(_INCLUDE_USES_MESON_MK) + MESON_ARGS+= -Db_lto=true +. elif defined(_INCLUDE_USES_CABAL_MK) + CABAL_LTO_ARGS= --ghc-options=-split-sections \ + --gcc-options="-fdata-sections -ffunction-sections" \ + --ld-options=-Wl,--gc-sections,--build-id,--icf=all +. else +# Overridable as a user may want to use -flto + LTO_FLAGS?= -flto=thin + CFLAGS+= ${LTO_FLAGS} + CXXFLAGS+= ${LTO_FLAGS} + LDFLAGS+= ${LTO_FLAGS} +. endif +. else +. if defined(_INCLUDE_USES_CARGO_MK) + RUSTFLAGS+= -C lto=no +. endif +. endif +.endif diff --git a/Mk/Features/pie.mk b/Mk/Features/pie.mk new file mode 100644 index 000000000000..2f7b902f2660 --- /dev/null +++ b/Mk/Features/pie.mk @@ -0,0 +1,15 @@ +# PIE Support + +.if !defined(_PIE_MK_INCLUDED) +_PIE_MK_INCLUDED= yes +PIE_Include_MAINTAINER= portmgr@FreeBSD.org + +. if !defined(PIE_UNSAFE) +PIE_CFLAGS?= -fPIE -fPIC +CFLAGS+= ${PIE_CFLAGS} +CXXFLAGS+= ${PIE_CFLAGS} +LDFLAGS+= -pie +STATIC_PIE_ARGS+= -static-pie +. endif +.endif + diff --git a/Mk/Features/relro.mk b/Mk/Features/relro.mk new file mode 100644 index 000000000000..6ceb68d5d668 --- /dev/null +++ b/Mk/Features/relro.mk @@ -0,0 +1,10 @@ +# RELRO Support + +.if !defined(_RELRO_MK_INCLUDED) +_RELRO_MK_INCLUDED= yes +RELRO_Include_MAINTAINER= portmgr@FreeBSD.org + +. if !defined(RELRO_UNSAFE) +LDFLAGS+= -Wl,-zrelro +. endif +.endif diff --git a/Mk/Features/sanitize.mk b/Mk/Features/sanitize.mk new file mode 100644 index 000000000000..6d2e3019705e --- /dev/null +++ b/Mk/Features/sanitize.mk @@ -0,0 +1,27 @@ +# Sanitize Support +# +# Variables that can be used: +# +# WITH_SANITIZE Enable for all ports. +# Sanitizer exits for each bug detected, so it is not +# advisable to enable it globally. +# WITH_SANITIZE_PORTS Enable for specified category/port-name +# SANITIZE_FLAGS Comma-separated list of sanitizers to be enabled +# Default: address +# + +.if !defined(_SANITIZE_MK_INCLUDED) +_SANITIZE_MK_INCLUDED= yes +SANITIZE_Include_MAINTAINER= portmgr@FreeBSD.org + +. if !defined(SANITIZE_UNSAFE) + SANITIZE_FLAGS?= address +. if defined(_INCLUDE_USES_MESON_MK) + MESON_ARGS+= -Db_sanitize=${SANITIZE_FLAGS} +. else + CFLAGS+= -fsanitize=${SANITIZE_FLAGS} + CXXFLAGS+= -fsanitize=${SANITIZE_FLAGS} + LDFLAGS+= -fsanitize=${SANITIZE_FLAGS} +. endif +. endif +.endif diff --git a/Mk/bsd.ssp.mk b/Mk/Features/ssp.mk index f85b4e5c58a8..4213e6d668a6 100644 --- a/Mk/bsd.ssp.mk +++ b/Mk/Features/ssp.mk @@ -1,11 +1,14 @@ # SSP Support +.if !defined(_SSP_MK_INCLUDED) +_SSP_MK_INCLUDED= yes SSP_Include_MAINTAINER= portmgr@FreeBSD.org -.if !defined(SSP_UNSAFE) && \ +. if !defined(SSP_UNSAFE) && \ (! ${ARCH:Mmips*}) # Overridable as a user may want to use -fstack-protector-all SSP_CFLAGS?= -fstack-protector-strong CFLAGS+= ${SSP_CFLAGS} LDFLAGS+= ${SSP_CFLAGS} +. endif .endif diff --git a/Mk/Features/testing.mk b/Mk/Features/testing.mk new file mode 100644 index 000000000000..a266f6effe91 --- /dev/null +++ b/Mk/Features/testing.mk @@ -0,0 +1,18 @@ +# Automatic testing Support +# +# Add WITH_TESTING=yes into make.conf: +# - If set, and the port supports it, the software's test suite will be compiled +# and run during the normal building pipeline between 'stage' and 'package' +# stages. +# - A port may define TESTING_UNSAFE=yes if its tests are known to fail at the +# moment. + +.if !defined(_TESTING_MK_INCLUDED) +_TESTING_MK_INCLUDED= yes +TESTING_Include_MAINTAINER= portmgr@FreeBSD.org + +. if !defined(TESTING_UNSAFE) +_TESTING_PACKAGE_DEP= test +. endif + +.endif diff --git a/Mk/Scripts/cargo-crates-git-common.awk b/Mk/Scripts/cargo-crates-git-common.awk index c1c5dcc7ce6e..36eb0027d3d7 100644 --- a/Mk/Scripts/cargo-crates-git-common.awk +++ b/Mk/Scripts/cargo-crates-git-common.awk @@ -38,7 +38,7 @@ function commit_from_git_url(url) { } } -function split_git_url(info, git_url, url, path, account, project, commit, i, dir_ver, host) { +function split_git_url(info, git_url, url, path, account, project, commit, i, dir_ver, host, tag, fragment) { delete info split_url(url, git_url) url["scheme"] = tolower(url["scheme"]) @@ -65,7 +65,9 @@ function split_git_url(info, git_url, url, path, account, project, commit, i, d # "GitHub silently converts tags starting with v to not have v in the filename # and extraction directory. It also replaces + with -." dir_ver = commit - sub(/^[vV]/, "", dir_ver) + if (dir_ver ~ /^[vV][0-9]/) { + sub(/^[vV]/, "", dir_ver) + } gsub(/\+/, "-", dir_ver) gsub(/--/, "-", dir_ver) info["dir"] = sprintf("%s-%s", project, dir_ver) @@ -80,6 +82,8 @@ function split_git_url(info, git_url, url, path, account, project, commit, i, d project = path[i] sub(/\.[gG][iI][tT]$/, "", project) commit = commit_from_git_url(url) + fragment = url["fragment"] + tag = url["query", "tag"] host = url["host"] delete url @@ -93,7 +97,12 @@ function split_git_url(info, git_url, url, path, account, project, commit, i, d gsub(/\//, "-", account) info["filename"] = sprintf("%s-%s-%s_GL0.tar.gz", account, project, commit) - info["dir"] = sprintf("%s-%s", project, commit) + # c.f. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266724 + if (tag) { + info["dir"] = sprintf("%s-%s-%s", project, tag, fragment) + } else { + info["dir"] = sprintf("%s-%s", project, commit) + } return 1 } diff --git a/Mk/Scripts/cargo-crates-git-configure.awk b/Mk/Scripts/cargo-crates-git-configure.awk index ade8718e44f6..bb2884479d22 100644 --- a/Mk/Scripts/cargo-crates-git-configure.awk +++ b/Mk/Scripts/cargo-crates-git-configure.awk @@ -90,8 +90,8 @@ function find_replaced_crates(input, output, in_patch_crates_io, line, cols) { close(output) } -function add_crates_io_patches( header_printed, cmd, cargotoml, source, crates) { - header_printed = 0 +function add_crates_io_patches( print_header, local_crates, cmd, cargotoml, source, crates) { + print_header = 0 # --exclude-dir not supported on FreeBSD < 13 # cmd = GREP " --include='*/Cargo.toml' --exclude-dir='" CARGO_VENDOR_DIR "' -Flr 'patch.crates-io' " WRKSRC cmd = FIND " " WRKSRC " -name Cargo.toml -not -path '" CARGO_VENDOR_DIR "/*' -exec " GREP " -Flr 'patch.crates-io' {} \\\+" @@ -106,16 +106,20 @@ function add_crates_io_patches( header_printed, cmd, cargotoml, source, crates) split(source_crates[source], crates) for (j in crates) { if (replaced_crates[crates[j]]) { - if (!header_printed) { - printf("[patch.crates-io]\n") - header_printed = 1 - } - printf("%s = { path = '%s' }\n", crates[j], get_source_dir(source, crates[j])) + print_header = 1 + local_crates[crates[j]] = get_source_dir(source, crates[j]) } } } } } + if (print_header == 1) { + printf("[patch.crates-io]\n") + + for (i in local_crates) { + printf("%s = { path = '%s' }\n", i, local_crates[i]) + } + } close(cmd) } diff --git a/Mk/Scripts/check_leftovers.sh b/Mk/Scripts/check_leftovers.sh index 65c2d143396c..00e8ad4a45dc 100644 --- a/Mk/Scripts/check_leftovers.sh +++ b/Mk/Scripts/check_leftovers.sh @@ -140,9 +140,6 @@ while read -r modtype path extra; do case "${sub_path}" in # gconftool-2 --makefile-uninstall-rule is unpredictable etc/gconf/gconf.xml.defaults/%gconf-tree*.xml) ;; - # This is a cache file for gio modules could be modified - # for any gio modules - lib/gio/modules/giomodule.cache) ;; # removal of info files leaves entry uneasy to cleanup # in info/dir info/dir) ;; diff --git a/Mk/Scripts/create-manifest.sh b/Mk/Scripts/create-manifest.sh index 8619a6959cbe..1a198ed8aef0 100644 --- a/Mk/Scripts/create-manifest.sh +++ b/Mk/Scripts/create-manifest.sh @@ -52,7 +52,7 @@ licenselogic: ${dp_LICENSE_COMB:-single} EOT # Then, the optional bits -[ -z "${dp_WWW}" ] || echo "www: ${dp_WWW}" +[ -z "${dp_WWW}" ] || echo "www: \"${dp_WWW%% *}\"" [ -z "${dp_LICENSE}" ] || echo "licenses: [ ${dp_LICENSE} ]" [ -z "${dp_USERS}" ] || echo "users: [ ${dp_USERS} ]" [ -z "${dp_GROUPS}" ] || echo "groups: [ ${dp_GROUPS} ]" diff --git a/Mk/Scripts/depends-list.sh b/Mk/Scripts/depends-list.sh index 6c3e03c33288..8eec46229728 100644 --- a/Mk/Scripts/depends-list.sh +++ b/Mk/Scripts/depends-list.sh @@ -69,6 +69,12 @@ check_dep() { d=${overlay}/${2} f= case "${d}" in + *~*/*) ;; # Ignore ~ in the path which would not be a subpkg + *~*) + d=${d%~*} + ;; + esac + case "${d}" in *@*/*) ;; # Ignore @ in the path which would not be a flavor *@*) f=${d##*@} @@ -76,7 +82,7 @@ check_dep() { ;; esac if [ -f ${d}/Makefile ]; then - if [ -n $f ]; then + if [ -n "$f" ]; then export FLAVOR=$f fi break @@ -91,9 +97,9 @@ check_dep() { fi case " ${checked} " in - *\ ${d}\ *) continue ;; # Already checked + *\ ${port_display}\ *) continue ;; # Already checked esac - checked="${checked} ${d}" + checked="${checked} ${port_display}" # Check if the dependency actually exists or skip otherwise. if [ ! -d "${d}" ]; then echo "${dp_PKGNAME}: \"${port_display}\" non-existent -- dependency list incomplete" >&2 diff --git a/Mk/Scripts/desktop-categories.sh b/Mk/Scripts/desktop-categories.sh index 9283751955e4..8daaf2a6d2d7 100644 --- a/Mk/Scripts/desktop-categories.sh +++ b/Mk/Scripts/desktop-categories.sh @@ -23,6 +23,7 @@ for native_category in ${dp_CATEGORIES}; do audio) c="AudioVideo Audio" ;; benchmarks) c="System" ;; biology) c="Education Science Biology" ;; + budgie) c="Budgie GTK" ;; cad) c="Graphics Engineering" ;; comms) c="Utility" ;; converters) c="Utility" ;; diff --git a/Mk/Scripts/dialog4ports.sh b/Mk/Scripts/dialog4ports.sh index e229d7d4bdc1..ba8dbb7cd48d 100644 --- a/Mk/Scripts/dialog4ports.sh +++ b/Mk/Scripts/dialog4ports.sh @@ -10,8 +10,8 @@ if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then exit 1 fi -: ${DIALOGPORT:=ports-mgmt/dialog4ports} -: ${DIALOGNAME:=dialog4ports} +: ${DIALOGPORT:=ports-mgmt/portconfig} +: ${DIALOGNAME:=portconfig} OPTIONSFILE="$1" @@ -42,9 +42,9 @@ fi # Clear environment of PKGNAME or the dialog will show on older versions # that do not understand -v. if ! env -u PKGNAME ${DIALOG4PORTS} -v > /dev/null 2>&1; then - exec $DIALOG4PORTS > $OPTIONSFILE 2>&1 + exec env LC_ALL=C.UTF-8 $DIALOG4PORTS > $OPTIONSFILE 2>&1 fi # Newer versions use stderr to work around a jail issue # http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082383.html -exec $DIALOG4PORTS 2> $OPTIONSFILE +exec env LC_ALL=C.UTF-8 $DIALOG4PORTS 2> $OPTIONSFILE diff --git a/Mk/Scripts/do-depends.sh b/Mk/Scripts/do-depends.sh index 0351d3d4ab02..c01bd8c16965 100644 --- a/Mk/Scripts/do-depends.sh +++ b/Mk/Scripts/do-depends.sh @@ -21,15 +21,22 @@ install_depends() { origin=$1 target=$2 - depends_args=$3 + subpkg=$3 + depends_args=$4 if [ -z "${dp_USE_PACKAGE_DEPENDS}" -a -z "${dp_USE_PACKAGE_DEPENDS_ONLY}" ]; then - MAKEFLAGS="${dp_MAKEFLAGS}" ${dp_MAKE} -C ${origin} -DINSTALLS_DEPENDS ${target} ${depends_args} + INSTALLS_DEPENDS=1 MAKEFLAGS="${dp_MAKEFLAGS}" ${dp_MAKE} -C ${origin} ${target} ${depends_args} return 0 fi - port_var_fetch "${origin}" "${depends_args}" \ - PKGFILE pkgfile \ - PKGBASE pkgbase + if [ -z "${subpkg}" ]; then + port_var_fetch "${origin}" "${depends_args}" \ + PKGFILE pkgfile \ + PKGBASE pkgbase + else + port_var_fetch "${origin}" "${depends_args}" \ + PKGFILE.${subpkg} pkgfile \ + PKGBASE.${subpkg} pkgbase + fi if [ -r "${pkgfile}" -a "${target}" = "${dp_DEPENDS_TARGET}" ]; then echo "===> Installing existing package ${pkgfile}" @@ -46,7 +53,7 @@ install_depends() echo "===> USE_PACKAGE_DEPENDS_ONLY set - not building missing dependency from source" >&2 exit 1 else - MAKEFLAGS="${dp_MAKEFLAGS}" ${dp_MAKE} -C ${origin} -DINSTALLS_DEPENDS ${target} ${depends_args} + INSTALLS_DEPENDS=1 MAKEFLAGS="${dp_MAKEFLAGS}" ${dp_MAKE} -C ${origin} ${target} ${depends_args} fi } @@ -123,12 +130,18 @@ for _line in ${dp_RAWDEPENDS} ; do continue fi + subpkg= case "${origin}" in *@*/*) ;; # Ignore @ in the path which would not be a flavor *@*) export FLAVOR="${origin##*@}" origin=${origin%@*} ;; + *~*/*) ;; # Ignore ~ in the path which would not be a subpackage + *~*) + subpkg="${origin##*~}" + origin=${origin%~*} + ;; esac case "${origin}" in @@ -194,7 +207,7 @@ for _line in ${dp_RAWDEPENDS} ; do fi # Now actually install the dependencies - install_depends "${origin}" "${target}" "${depends_args}" + install_depends "${origin}" "${target}" "${subpkg}" "${depends_args}" # Recheck if the installed dependency validates the pattern except for /nonexistent [ "${fct}" = "false" ] || ${fct} "${pattern}" echo "===> Returning to build of ${dp_PKGNAME}" diff --git a/Mk/Scripts/do-fetch.sh b/Mk/Scripts/do-fetch.sh index 707337928989..da42191cf533 100644 --- a/Mk/Scripts/do-fetch.sh +++ b/Mk/Scripts/do-fetch.sh @@ -123,23 +123,24 @@ for _file in "${@}"; do for site in ${sites}; do sites_remaining=$((sites_remaining - 1)) CKSIZE=$(distinfo_data SIZE "${full_file}") - # There is a lot of escaping, but the " needs to survive echo/eval. + early_args="" case ${file} in */*) case ${dp_TARGET} in - fetch-list|fetch-url-list-int) - echo "mkdir -p \"${file%/*}\" && " - ;; - *) - mkdir -p "${file%/*}" - ;; + fetch-list) + echo "mkdir -p \"${file%/*}\" && " + early_args="-o ${file}" + ;; + fetch-url-list-int) + ;; + *) + mkdir -p "${file%/*}" + early_args="-o ${file}" + ;; esac - args="-o ${file} ${site}${file}" - ;; - *) - args="${site}${file}" - ;; + ;; esac + args="${early_args:+${early_args} }${site}${file}" _fetch_cmd="${dp_FETCH_CMD} ${dp_FETCH_BEFORE_ARGS}" if [ -z "${dp_DISABLE_SIZE}" -a -n "${CKSIZE}" ]; then _fetch_cmd="${_fetch_cmd} -S ${CKSIZE}" diff --git a/Mk/Scripts/do-users-groups.sh b/Mk/Scripts/do-users-groups.sh index 7f57e91ed565..b4ddf5a8a5d3 100644 --- a/Mk/Scripts/do-users-groups.sh +++ b/Mk/Scripts/do-users-groups.sh @@ -52,12 +52,12 @@ if [ -n "${GROUPS}" ]; then error "** ${file} doesn't exist. Exiting." fi done - ${dp_ECHO_MSG} "===> Creating groups." - echo "echo \"===> Creating groups.\"" >> "${dp_UG_INSTALL}" + ${dp_ECHO_MSG} "===> Creating groups" + echo "echo \"===> Creating groups\"" >> "${dp_UG_INSTALL}" for group in ${GROUPS}; do # _bgpd:*:130: if ! grep -q "^${group}:" ${dp_GID_FILES}; then \ - error "** Cannot find any information about group \`${group}' in ${dp_GID_FILES}." + error "** Cannot find any information about group \`${group}' in ${dp_GID_FILES}" fi while read -r line; do # Do not change IFS for more than one command, if we @@ -75,10 +75,10 @@ if [ -n "${GROUPS}" ]; then gid=$((gid+dp_GID_OFFSET)) cat >> "${dp_UG_INSTALL}" <<-eot2 if ! \${PW} groupshow $group >/dev/null 2>&1; then - echo "Creating group '$group' with gid '$gid'." + echo "Creating group '$group' with gid '$gid'" \${PW} groupadd $group -g $gid else - echo "Using existing group '$group'." + echo "Using existing group '$group'" fi eot2 done <<-eot @@ -100,7 +100,7 @@ if [ -n "${USERS}" ]; then for user in ${USERS}; do # _bgpd:*:130:130:BGP Daemon:/var/empty:/sbin/nologin if ! grep -q "^${user}:" ${dp_UID_FILES} ; then - error "** Cannot find any information about user \`${user}' in ${dp_UID_FILES}." + error "** Cannot find any information about user \`${user}' in ${dp_UID_FILES}" fi while read -r line; do # Do not change IFS for more than one command, if we @@ -128,10 +128,10 @@ if [ -n "${USERS}" ]; then homedir=$(echo "$homedir" | sed "s|^/usr/local|${dp_PREFIX}|") cat >> "${dp_UG_INSTALL}" <<-eot2 if ! \${PW} usershow $login >/dev/null 2>&1; then - echo "Creating user '$login' with uid '$uid'." + echo "Creating user '$login' with uid '$uid'" \${PW} useradd $login -u $uid -g $gid $class -c "$gecos" -d $homedir -s $shell else - echo "Using existing user '$login'." + echo "Using existing user '$login'" fi eot2 case $homedir in @@ -184,7 +184,7 @@ if [ -n "${GROUPS}" ]; then if [ -n "${user}" ] && [ "${user}" = "${login}" ]; then cat >> "${dp_UG_INSTALL}" <<-eot2 if ! \${PW} groupshow ${group} | grep -qw ${login}; then - echo "Adding user '${login}' to group '${group}'." + echo "Adding user '${login}' to group '${group}'" \${PW} groupmod ${group} -m ${login} fi eot2 @@ -202,7 +202,7 @@ if [ -n "${USERS}" ]; then if ! echo "${dp_USERS_BLACKLIST}" | grep -qw "${user}"; then cat >> "${dp_UG_DEINSTALL}" <<-eot if \${PW} usershow ${user} >/dev/null 2>&1; then - echo "==> You should manually remove the \"${user}\" user. " + echo "==> You should manually remove the \"${user}\" user" fi eot fi @@ -214,7 +214,7 @@ if [ -n "${GROUPS}" ]; then if ! echo "${dp_GROUPS_BLACKLIST}" | grep -qw "${group}"; then cat >> "${dp_UG_DEINSTALL}" <<-eot if \${PW} groupshow ${group} >/dev/null 2>&1; then - echo "==> You should manually remove the \"${group}\" group " + echo "==> You should manually remove the \"${group}\" group" fi eot fi diff --git a/Mk/Scripts/functions.sh b/Mk/Scripts/functions.sh index 892f2a7218de..0d786af3d242 100644 --- a/Mk/Scripts/functions.sh +++ b/Mk/Scripts/functions.sh @@ -6,7 +6,8 @@ # Strip (owner,group,perm) from keywords _strip_perms() { sed -Ee 's/^@\([^)]*\)[[:space:]]+//' \ - -e 's/^(@[[:alpha:]]+)\([^)]*\)[[:space:]]+/\1 /' + -e 's/^(@[[:alpha:]]+)\([^)]*\)[[:space:]]+/\1 /' \ + -e 's/^@@[[:alnum:]]+@@//' } # Expand TMPPLIST to absolute paths, splitting files and dirs into separate diff --git a/Mk/Scripts/generate-symbols.sh b/Mk/Scripts/generate-symbols.sh index 680ffde814ac..1dfb869768d3 100644 --- a/Mk/Scripts/generate-symbols.sh +++ b/Mk/Scripts/generate-symbols.sh @@ -6,7 +6,6 @@ # For example: # /var/qmail/bin/qmaild -> /usr/local/lib/debug/var/qmail/bin/qmaild.debug # /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug -LIB_DIR_PREFIX="${LOCALBASE}/lib/debug" set -o pipefail @@ -14,7 +13,15 @@ msg() { echo "====> $*" } -msg "Finding symbols" + +if [ -z "${PREFIX}" -o -z "${LOCALBASE}" -o -z "${STAGEDIR}" -o -z "${TMPPLIST}" ]; then + echo "PREFIX, LOCALBASE, STAGEDIR and TMPPLIST are required in environment." >&2 + exit 1 +fi + +if [ ! -z "${PREPEND_SUBPACKAGE_PREFIX}" ]; then + subpkg_prefix="@@debuginfo@@" +fi # Find all ELF files ELF_FILES=$(mktemp -t elf_files) @@ -25,7 +32,7 @@ find ${STAGEDIR} -type f ! -name '*.a' \ > ${ELF_FILES} # Create all of the /usr/local/lib/* dirs -lib_dir="${STAGEDIR}${LIB_DIR_PREFIX}" +lib_dir="${STAGEDIR}${LOCALBASE}/lib/debug" sed -e "s,^${STAGEDIR}/,${lib_dir}/," -e 's,/[^/]*$,,' \ ${ELF_FILES} | sort -u | xargs mkdir -p @@ -40,8 +47,8 @@ while read -r staged_elf_file; do # Strip and add a reference to f.debug for finding the symbols. objcopy --strip-debug --strip-unneeded \ --add-gnu-debuglink="${debug_file_name}" "${staged_elf_file}" - msg "Saved symbols for ${staged_elf_file}" - echo "${debug_file_name#${STAGEDIR}}" >&3 + msg "Saved symbols for ${staged_elf_file#${STAGEDIR}}" + echo "${subpkg_prefix}${debug_file_name#${STAGEDIR}}" >&3 done < ${ELF_FILES} 3>> ${TMPPLIST} # Need @dir entries if PREFIX != LOCALBASE diff --git a/Mk/Scripts/makesum.sh b/Mk/Scripts/makesum.sh index 1d09b7ffb82a..c9f50e56bb5d 100644 --- a/Mk/Scripts/makesum.sh +++ b/Mk/Scripts/makesum.sh @@ -28,7 +28,7 @@ cd "${dp_DISTDIR}" # So, we extract the content of the distinfo file minus the TIMESTAMP, if it # contains a TIMESTAMP. if [ -f "${dp_DISTINFO_FILE}" ] && grep -q "^TIMESTAMP " ${dp_DISTINFO_FILE}; then - grep -v "^TIMESTAMP " ${dp_DISTINFO_FILE} > ${DISTINFO_OLD} + grep -v "^TIMESTAMP " ${dp_DISTINFO_FILE} > ${DISTINFO_OLD} || true fi for file in ${dp_CKSUMFILES}; do diff --git a/Mk/Scripts/qa.sh b/Mk/Scripts/qa.sh index 13548ddb38c7..935edf72065e 100644 --- a/Mk/Scripts/qa.sh +++ b/Mk/Scripts/qa.sh @@ -116,6 +116,7 @@ baselibs() { local found_openssl local file [ "${PKGBASE}" = "pkg" -o "${PKGBASE}" = "pkg-devel" ] && return + while read -r f; do case ${f} in File:\ .*) @@ -136,10 +137,13 @@ baselibs() { done <<-EOF $(list_stagedir_elfs -exec readelf -d {} + 2>/dev/null) EOF - if [ -z "${USESSSL}" -a -n "${found_openssl}" ]; then - warn "you need USES=ssl" - elif [ -n "${USESSSL}" -a -z "${found_openssl}" ]; then - warn "you may not need USES=ssl" + + if ! list_stagedir_elfs | egrep -q 'lib(crypto|ssl).so*'; then + if [ -z "${USESSSL}" -a -n "${found_openssl}" ]; then + warn "you need USES=ssl" + elif [ -n "${USESSSL}" -a -z "${found_openssl}" ]; then + warn "you may not need USES=ssl" + fi fi return ${rc} } @@ -211,7 +215,7 @@ stripped() { # files with spaces are kept intact. # Using readelf -h ... /ELF Header:/ will match on all ELF files. find ${STAGEDIR} -type f ! -name '*.a' ! -name '*.o' \ - -exec sh -c 'readelf -S -- /dev/null "$@" || :' -- {} + 2>/dev/null | awk ' + -exec sh -c 'readelf -S -- /dev/null "$0" "$@" || :' -- {} + 2>/dev/null | awk ' /File:/ {sub(/File: /, "", $0); file=$0} /[[:space:]]\.debug_info[[:space:]]*PROGBITS/ {print file}' | while read -r f; do @@ -412,7 +416,6 @@ proxydeps_suggest_uses() { elif [ ${pkg} = "graphics/libart_lgpl" ]; then warn "you need USE_GNOME+=libartlgpl2" elif [ ${pkg} = "devel/libIDL" ]; then warn "you need USE_GNOME+=libidl" elif [ ${pkg} = "x11-fm/nautilus" ]; then warn "you need USE_GNOME+=nautilus3" - elif [ ${pkg} = "devel/ORBit2" ]; then warn "you need USE_GNOME+=orbit2" elif [ ${pkg} = "graphics/librsvg2-rust" ]; then warn "you need USE_GNOME+=librsvg2" # mate # grep LIB_DEPENDS= Mk/Uses/mate.mk |sed -e 's|\(.*\)_LIB_DEPENDS.*:\(.*\)\/\(.*\)|elif [ ${pkg} = "\2/\3" ]; then warn "you need USE_MATE+=\1"|' @@ -426,7 +429,7 @@ proxydeps_suggest_uses() { elif [ ${pkg} = "x11/mate-panel" ]; then warn "you need USE_MATE+=panel" elif [ ${pkg} = "sysutils/mate-polkit" ]; then warn "you need USE_MATE+=polkit" # KDE - # grep -B1 _LIB= Mk/Uses/kde.mk | grep _PORT=|sed -e 's/^kde-\(.*\)_PORT=[[:space:]]*\([^[:space:]]*\).*/elif [ ${pkg} = "\2" ]; then warn "you need to use USE_KDE+=\1"/' + # grep -B1 _LIB= Mk/Uses/kde.mk | grep _PORT=|sed -e 's/^kde-\(.*\)_PORT=[[:space:]]*\([^[:space:]]*\).*/elif [ ${pkg} = "\2" ]; then warn "you need to use USE_KDE+=\1"/' # KDE Applications elif [ ${pkg} = "net/akonadi-contacts" ]; then warn "you need to use USE_KDE+=akonadicontacts" elif [ ${pkg} = "deskutils/akonadi-import-wizard" ]; then warn "you need to use USE_KDE+=akonadiimportwizard" @@ -434,7 +437,6 @@ proxydeps_suggest_uses() { elif [ ${pkg} = "net/akonadi-notes" ]; then warn "you need to use USE_KDE+=akonadinotes" elif [ ${pkg} = "net/akonadi-calendar" ]; then warn "you need to use USE_KDE+=akonadicalendar" elif [ ${pkg} = "net/akonadi-search" ]; then warn "you need to use USE_KDE+=akonadisearch" - elif [ ${pkg} = "net/kalarmcal" ]; then warn "you need to use USE_KDE+=alarmcalendar" elif [ ${pkg} = "net/calendarsupport" ]; then warn "you need to use USE_KDE+=calendarsupport" elif [ ${pkg} = "net/kcalcore" ]; then warn "you need to use USE_KDE+=calendarcore" elif [ ${pkg} = "net/kcalutils" ]; then warn "you need to use USE_KDE+=calendarutils" @@ -498,7 +500,6 @@ proxydeps_suggest_uses() { elif [ ${pkg} = "x11/kf5-kded" ]; then warn "you need to use USE_KDE+=kded" elif [ ${pkg} = "x11/kf5-kdelibs4support" ]; then warn "you need to use USE_KDE+=kdelibs4support" elif [ ${pkg} = "security/kf5-kdesu" ]; then warn "you need to use USE_KDE+=kdesu" - elif [ ${pkg} = "www/kf5-kdewebkit" ]; then warn "you need to use USE_KDE+=kdewebkit" elif [ ${pkg} = "www/kf5-khtml" ]; then warn "you need to use USE_KDE+=khtml" elif [ ${pkg} = "devel/kf5-kio" ]; then warn "you need to use USE_KDE+=kio" elif [ ${pkg} = "lang/kf5-kross" ]; then warn "you need to use USE_KDE+=kross" @@ -597,6 +598,15 @@ proxydeps_suggest_uses() { # lua elif expr ${pkg} : "^lang/lua" > /dev/null; then warn "you need USES+=lua" + # magick + elif [ ${pkg} = "graphics/ImageMagick6" ] ; then + warn "you need USES=magick:6" + elif [ ${pkg} = "graphics/ImageMagick6-nox11" ] ; then + warn "you need USES=magick:6,nox11" + elif [ ${pkg} = "graphics/ImageMagick7" ] ; then + warn "you need USES=magick:7" + elif [ ${pkg} = "graphics/ImageMagick7-nox11" ] ; then + warn "you need USES=magick:7,nox11" # motif elif [ ${pkg} = "x11-toolkits/lesstif" -o ${pkg} = "x11-toolkits/open-motif" ]; then warn "you need USES+=motif" @@ -642,11 +652,11 @@ proxydeps_suggest_uses() { } proxydeps() { - local file dep_file dep_file_pkg already rc + local file dep_file dep_file_pkg already rc dep_lib_file dep_lib_files rc=0 - # Check all dynamicaly linked ELF files + # Check all dynamically linked ELF files # Some .so are not executable, but we want to check them too. while read -r file; do # No results presents a blank line from heredoc. @@ -663,9 +673,13 @@ proxydeps() { # Check that the .so we need has a SONAME if [ "${dep_file_pkg}" != "${PKGORIGIN}" ]; then - if ! readelf -d "${dep_file}" | grep -q SONAME; then + # When grep -q finds a match it will close the pipe immediately. + # This may cause the test to fail when pipefail is turned on. + set +o pipefail + if ! readelf -d "${dep_file}" | grep SONAME > /dev/null; then err "${file} is linked to ${dep_file} which does not have a SONAME. ${dep_file_pkg} needs to be fixed." fi + set -o pipefail fi # If we don't already depend on it, and we don't provide it @@ -686,6 +700,8 @@ proxydeps() { rc=1 fi already="${already} ${dep_file}" + dep_lib_file=$(basename ${dep_file}) + dep_lib_files="${dep_lib_files} ${dep_lib_file%%.so*}.so" done <<-EOT $(env LD_LIBMAP_DISABLE=1 ldd -a "${STAGEDIR}${file}" | \ awk ' @@ -701,6 +717,13 @@ proxydeps() { sed -e 's/^\.//') EOT + # Check whether all files in LIB_DPEENDS are actually linked against + for _library in ${WANTED_LIBRARIES} ; do + if ! listcontains ${_library} "${dep_lib_files}" ; then + warn "you might not need LIB_DEPENDS on ${_library}" + fi + done + [ -z "${PROXYDEPS_FATAL}" ] && return 0 return ${rc} @@ -713,7 +736,9 @@ sonames() { [ -z "${f}" ] && continue # Ignore symlinks [ -f "${f}" -a ! -L "${f}" ] || continue - if ! readelf -d ${f} | grep -q SONAME; then + # Ignore .debug files + [ "${f}" == "${f%.debug}" ] || continue + if ! readelf -d ${f} | grep SONAME > /dev/null; then warn "${f} doesn't have a SONAME." warn "pkg(8) will not register it as being provided by the port." warn "If another port depend on it, pkg will not be able to know where it comes from." @@ -846,7 +871,7 @@ gemdeps() EOF fi done <<-EOF - $(grep -a 'add_runtime_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PORTNAME}-*.gemspec \ + $(grep -a 's.add_runtime_dependency' ${STAGEDIR}${PREFIX}/lib/ruby/gems/*/specifications/${PORTNAME}-*.gemspec \ | sed 's|.*<\(.*\)>.*\[\(.*\)\])|\1 \2|' \ | sort -u) EOF @@ -865,24 +890,24 @@ gemfiledeps() if [ -z "$USE_RUBY" ]; then return 0 fi - + # skip check if port is a rubygem-* one; they have no Gemfiles if [ "${PKGBASE%%-*}" = "rubygem" ]; then return 0 fi - + # advise install of bundler if its not present for check if ! type bundle > /dev/null 2>&1; then notice "Please install sysutils/rubygem-bundler for additional Gemfile-checks" return 0 fi - + # locate the Gemfile(s) while read -r f; do - + # no results presents a blank line from heredoc [ -z "$f" ] && continue - + # if there is no Gemfile everything is fine - stop here [ ! -f "$f" ] && return 0; @@ -892,7 +917,7 @@ gemfiledeps() if ! bundle check --dry-run --gemfile $f > /dev/null 2>&1; then warn "Dependencies defined in ${f} are not satisfied" fi - + done <<-EOF $(find ${STAGEDIR} -name Gemfile) EOF @@ -967,14 +992,14 @@ depends_blacklist() lang/gcc) instead="USE_GCC" ;; - lang/julia) - instead="a dependency on lang/julia\${JULIA_DEFAULT:S/.//}" + lang/go) + instead="USES=go" ;; - devel/llvm) - instead="a dependency on devel/llvm\${LLVM_DEFAULT}" + lang/mono) + instead="USES=mono" ;; - www/py-django) - instead="one of the www/py-djangoXYZ port" + devel/llvm) + instead="USES=llvm" ;; esac @@ -1009,10 +1034,18 @@ reinplace() fi } +prefixman() { + if [ -d "${STAGEDIR}${PREFIX}/man" ]; then + warn "Installing man files in ${PREFIX}/man is no longer supported. Consider installing these files in ${PREFIX}/share/man instead." + ls -liTd ${STAGEDIR}${PREFIX}/man + fi + return 0 +} + checks="shebang symlinks paths stripped desktopfileutils sharedmimeinfo" checks="$checks suidfiles libtool libperl prefixvar baselibs terminfo" checks="$checks proxydeps sonames perlcore no_arch gemdeps gemfiledeps flavors" -checks="$checks license depends_blacklist pkgmessage reinplace" +checks="$checks license depends_blacklist pkgmessage reinplace prefixman" ret=0 cd ${STAGEDIR} || exit 1 diff --git a/Mk/Scripts/strip_RECORD.py b/Mk/Scripts/strip_RECORD.py new file mode 100644 index 000000000000..abeff3b8b971 --- /dev/null +++ b/Mk/Scripts/strip_RECORD.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Copyright 2023 Charlie Li <vishwin@FreeBSD.org> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# MAINTAINER= python@FreeBSD.org + +import argparse +import csv + +argparser = argparse.ArgumentParser(description="Strip other columns from RECORD.") +argparser.add_argument('file', type=open, help="path to RECORD file") +args = argparser.parse_args() + +csvreader = csv.reader(args.file) +for row in csvreader: + print(row[0]) diff --git a/Mk/Uses/7z.mk b/Mk/Uses/7z.mk index 5f5bd05feab6..f2a7d81639e4 100644 --- a/Mk/Uses/7z.mk +++ b/Mk/Uses/7z.mk @@ -2,9 +2,9 @@ # # Feature: 7z # Usage: USES=7z or USES=7z:ARGS -# Valid ARGS: p7zip, partial +# Valid ARGS: 7-zip, partial # -# p7zip Extract using 7z(1) instead of bsdtar(1) +# 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 @@ -12,46 +12,46 @@ .if !defined(_INCLUDE_USES_7Z_MK) _INCLUDE_USES_7Z_MK= yes -P7ZIP_CMD?= 7z -P7ZIP_BEFORE_ARGS?= x -bd -y -o${P7ZIP_WRKDIR} >/dev/null -P7ZIP_AFTER_ARGS?= # empty -P7ZIP_WRKDIR?= ${EXTRACT_WRKDIR} +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:Np7zip:Npartial) -IGNORE= USES=7z has invalid arguments: ${7z_ARGS:Np7zip:Npartial} -.endif +. if !empty(7z_ARGS:N7-zip:Npartial) +IGNORE= USES=7z has invalid arguments: ${7z_ARGS:N7-zip:Npartial} +. endif -.if ${7z_ARGS:Mp7zip} -EXTRACT_DEPENDS+= ${P7ZIP_CMD}:archivers/p7zip -.endif +. if ${7z_ARGS:M7-zip} +EXTRACT_DEPENDS+= ${7-ZIP_CMD}:archivers/7-zip +. endif -.if ! ${7z_ARGS:Mpartial} +. if ! ${7z_ARGS:Mpartial} EXTRACT_SUFX?= .7z -.endif +. endif -.if ${7z_ARGS:Mp7zip} && ! ${7z_ARGS:Mpartial} -EXTRACT_CMD?= ${P7ZIP_CMD} -EXTRACT_BEFORE_ARGS?= ${P7ZIP_BEFORE_ARGS} -EXTRACT_AFTER_ARGS?= ${P7ZIP_AFTER_ARGS} -.endif +. 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 -.if ! ${7z_ARGS:Mp7zip} && ${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:Mp7zip} && ${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-p7zip-extract -do-p7zip-extract: +_USES_extract+= 520:do-7-zip-extract +do-7-zip-extract: @for file in ${EXTRACT_ONLY_7z}; do \ - if ! ${P7ZIP_CMD} ${P7ZIP_BEFORE_ARGS} \ - ${_DISTDIR}/$$file ${P7ZIP_AFTER_ARGS}; \ + 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 5bec0ce825b2..98badb9f81f7 100644 --- a/Mk/Uses/ada.mk +++ b/Mk/Uses/ada.mk @@ -2,25 +2,57 @@ # To change default compiler, define ADA_DEFAULT in make.conf # # Feature: ada -# Usage: USES=ada -# Valid ARGS: run +# Usage: USES=ada:ARGS +# Valid ARGS: [<version>],[run] +# +# version The chooseable versions are 6 (default), 12 or 13 +# +# run Add run depends # # MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ADA_MK) _INCLUDE_USES_ADA_MK= yes -CC= ada -ADAXX= gcc6 # framework default +_ADA_SUPPORTED= 6 12 13 + +_ada_version= # +. for _ver in ${_ADA_SUPPORTED:O:u} +. if ${ada_ARGS:M${_ver}} +. if empty(_ada_version) +_ada_version= ${_ver} +. else +IGNORE= Incorrect USES=ada:${ada_ARGS} - multiple versions defined +. endif +. endif +. endfor + +. if empty(_ada_version) +_ada_version= 12 # default +. endif + +. if ${_ada_version} == 6 +_ADAPATH= ${LOCALBASE}/gcc6-aux/bin +_ADAPORT= lang/gcc6-aux +_BINDEP= ${_ADAPATH}/ada +CC= ada +. else +_ADAPATH= ${LOCALBASE}/gnat${_ada_version}/bin +_ADAPORT= lang/gnat${_ada_version} +_BINDEP= ${_ADAPATH}/gnat +GNATMAKE= gnatmake -f -u +CC= gcc +BINARY_ALIAS+= ada=${_ADAPATH}/gcc +. endif -. if ${ada_ARGS:Mrun} -RUN_DEPENDS+= ${LOCALBASE}/${ADAXX}-aux/bin/ada:lang/${ADAXX}-aux -. endif +. if ${ada_ARGS:Mrun} +RUN_DEPENDS+= ${_BINDEP}:${_ADAPORT} +. endif -BUILD_DEPENDS+= ${LOCALBASE}/${ADAXX}-aux/bin/ada:lang/${ADAXX}-aux -MAKE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ +BUILD_DEPENDS+= ${_BINDEP}:${_ADAPORT} +MAKE_ENV+= PATH=${_ADAPATH}:${PATH} \ ADA_PROJECT_PATH=${LOCALBASE}/lib/gnat -CONFIGURE_ENV+= PATH=${LOCALBASE}/${ADAXX}-aux/bin:${PATH} \ +CONFIGURE_ENV+= PATH=${_ADAPATH}:${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 @@ -11,18 +11,18 @@ .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..6a5ae2a433ea 100644 --- a/Mk/Uses/angr.mk +++ b/Mk/Uses/angr.mk @@ -25,17 +25,17 @@ _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 @@ -43,15 +43,15 @@ GH_TUPLE+= angr:binaries:${ANGR_BINARIES_TAGNAME}:binaries 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 @@ -59,7 +59,7 @@ TEST_WRKSRC?= ${WRKSRC}/tests ANGR_NOSETESTS?= nosetests-${PYTHON_VER} do-test: - @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${ANGR_NOSETESTS}) -.endif # "${angr_ARGS:Mnose}" != "" + @(cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${ANGR_NOSETESTS}) +. 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 @@ -40,23 +40,23 @@ _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 @@ -65,16 +65,16 @@ ANSIBLE_RUN_DEPENDS?= ${PYTHON_PKGNAMEPREFIX}ansible>0:sysutils/ansible@${PY_FLA 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..d772ec62686f 100644 --- a/Mk/Uses/apache.mk +++ b/Mk/Uses/apache.mk @@ -1,6 +1,3 @@ -#-*- tab-width: 4; -*- -# ex:ts=4 -# # apache.mk - Apache related macros. # Author: Clement Laforet <clement@FreeBSD.org> # Author: Olli Hauer <ohauer@FreeBSD.org> @@ -15,9 +12,8 @@ # 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 # Only use Apache 2.4 # 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 # @@ -51,13 +47,13 @@ # 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 +# USES= apache:server,2.4 # # # 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 +# Apache server, e.g. 2.4 # # APACHEETCDIR Location of the Apache configuration directory # Default: ${LOCALBASE}/etc/apache24 @@ -77,7 +73,7 @@ _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 +_APACHE_SUPPORTED_VERSIONS= 2.4 # preferred version first # Print warnings _ERROR_MSG= : Error from apache.mk. @@ -85,78 +81,78 @@ _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 @@ -165,11 +161,11 @@ 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 @@ -182,69 +178,69 @@ CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-caller=${SUEXEC_CALLER} \ --${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/} @@ -255,56 +251,48 @@ _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} _APACHE_WANTED_VERSIONS:= ${_APACHE_WANTED_VERSIONS:N${_ver}} -. 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 -APXS?= ${LOCALBASE}/bin/apxs -.else APXS?= ${LOCALBASE}/sbin/apxs -.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 -_APACHE_PORT?= www/apache${APACHE_VERSION:S/.//}-devel -.else _APACHE_PORT?= www/apache${APACHE_VERSION:S/.//} -.endif PLIST_SUB+= APACHEMODDIR="${APACHEMODDIR}" \ APACHEINCLUDEDIR="${APACHEINCLUDEDIR}" \ @@ -317,44 +305,44 @@ SUB_LIST+= APACHEMODDIR="${APACHEMODDIR}" \ 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\ @@ -364,72 +352,72 @@ print-closest-mirrors: ${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 3962e14e6ef6..67ee8c824455 100644 --- a/Mk/Uses/autoreconf.mk +++ b/Mk/Uses/autoreconf.mk @@ -37,6 +37,22 @@ # gettext-tools is not optional. If the run dependency on # gettext is optional this can be specified with # NLS_USES=gettext-runtime. +# gtkdocize Provided by textproc/gtk-doc. Updates gtk-doc related *.m4 +# files included with the source code and build scripts such as +# gtk-doc.make. Run by autoreconf if configure.ac contains +# GTK_DOC_CHECK. The build dependency can be made optional with +# DOCS option and DOCS_BUILD_DEPENDS+=gtkdocize:textproc/gtk-doc +# on condition that you remove GTK_DOC_CHECK from configure.ac, +# for instance using a post-patch-DOCS-off target with the +# following command: +# @${REINPLACE_CMD} /^GTK_DOC_CHECK/d ${WRKSRC}/configure.ac +# It is likely that more patching is needed to eliminate or avoid +# use of gtk-doc. +# intltoolize Provided by textproc/intltool. Updates intltool related *.m4 +# files included with the source code and build scripts such as +# po/Makefile.in.in. Run by autoreconf if configure.ac contains +# (AC|IT)_PROG_INTLTOOL. A build dependency on textproc/intltool +# can be added with USES+=gnome and USE_GNOME+=intltool. # 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 @@ -47,14 +63,20 @@ # Feature: autoreconf # Usage: USES=autoreconf or USES=autoreconf:args # Valid args: build Don't run autoreconf, only add build dependencies +# 2.69 Use this legacy version +# +# Port maintainers can set the following variable: # -# MAINTAINER: portmgr@FreeBSD.org +# AUTORECONF_ARGS The string to pass to autoreconf in addition to +# the default "-f -i" +# +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_AUTORECONF_MK) _INCLUDE_USES_AUTORECONF_MK= yes _USES_POST+= autoreconf -AUTORECONF?= ${LOCALBASE}/bin/autoreconf +AUTORECONF?= ${LOCALBASE}/bin/autoreconf${_AUTORECONF} AUTORECONF_WRKSRC?= ${WRKSRC} .endif @@ -62,30 +84,53 @@ AUTORECONF_WRKSRC?= ${WRKSRC} .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 ${autoreconf_ARGS:M2.69} +_AUTORECONF= 2.69 +BUILD_DEPENDS+= autoconf2.69>=2.69:devel/autoconf2.69 +. else +_AUTORECONF= 2.72 +BUILD_DEPENDS+= autoconf>=${_AUTORECONF}:devel/autoconf +. endif + +BUILD_DEPENDS+= automake>=1.16.5: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 + +# In case autoconf-switch wrapper scripts are used during build. +CONFIGURE_ENV+= DEFAULT_AUTOCONF=${_AUTORECONF} +MAKE_ENV+= DEFAULT_AUTOCONF=${_AUTORECONF} +WRK_ENV+= DEFAULT_AUTOCONF=${_AUTORECONF} + +. if ${autoreconf_ARGS:Nbuild:N2.69} +IGNORE= incorrect 'USES+=autoreconf:${autoreconf_ARGS}'\ + expecting 'USES+=autoreconf[:build,2.69]' +. endif -.if empty(autoreconf_ARGS) +. if ! ${autoreconf_ARGS:Mbuild} _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 ${_AUTORECONF} == 2.69 @(cd ${AUTORECONF_WRKSRC} && \ if test -f configure.ac; then configure=configure.ac; \ else configure=configure.in; fi && \ + if ${GREP} -q '^GTK_DOC_CHECK' $${configure}; \ + then if ! ${LOCALBASE}/bin/gtkdocize --copy; then \ + ${ECHO_MSG} '===> Mk/Uses/autoreconf.mk: Error running gtkdocize'; \ + ${FALSE}; fi; fi && \ if ${EGREP} -q '^(AC|IT)_PROG_INTLTOOL' $${configure}; \ - then ${LOCALBASE}/bin/intltoolize -f -c; fi) -.endif - @(cd ${AUTORECONF_WRKSRC} && ${AUTORECONF} -f -i) -.elif ! ${autoreconf_ARGS:Mbuild} -IGNORE= Incorrect 'USES+=autoreconf:${autoreconf_ARGS}' expecting 'USES+=autoreconf[:build]' -.endif + then if ! ${LOCALBASE}/bin/intltoolize -f -c; then \ + ${ECHO_MSG} '===> Mk/Uses/autoreconf.mk: Error running intltoolize'; \ + ${FALSE}; fi; fi) +. endif + @(cd ${AUTORECONF_WRKSRC} && if ! ${AUTORECONF} -f -i ${AUTORECONF_ARGS}; then \ + ${ECHO_MSG} '===> Mk/Uses/autoreconf.mk: Error running ${AUTORECONF}'; \ + ${FALSE}; fi) +. endif .endif diff --git a/Mk/Uses/bdb.mk b/Mk/Uses/bdb.mk index c80db16b58a2..0316ff061229 100644 --- a/Mk/Uses/bdb.mk +++ b/Mk/Uses/bdb.mk @@ -45,9 +45,9 @@ .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 @@ -63,9 +63,9 @@ _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) || ${_bdb_ARGS} == 18 _DB_DEFAULTS+= 18 -. endif +. endif # Dependency lines for different db versions db5_DEPENDS= libdb-5.3.so:databases/db5 @@ -76,120 +76,120 @@ db18_FIND= ${LOCALBASE}/include/db18/db.h # Override the global BDB_DEFAULT with the # port specific <BDB_UNIQUENAME>_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: @@ -220,21 +220,21 @@ debug-bdb: # 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 2ddead64842c..ed3f5cad2a3c 100644 --- a/Mk/Uses/bison.mk +++ b/Mk/Uses/bison.mk @@ -9,30 +9,30 @@ # 'wrapper' will automatically create BINARY_WRAPPER to use base # byacc with a wrapper to mimic a bit more bison # -# MAINTAINER: portmgr@FreeBSD.org +# 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..ff14194e50b5 100644 --- a/Mk/Uses/blaslapack.mk +++ b/Mk/Uses/blaslapack.mk @@ -2,49 +2,63 @@ # # Feature: blaslapack # Usage: USES=blaslapack or USES=blaslapack:ARGS -# Valid ARGS: atlas gotoblas netlib (default) openblas +# Valid ARGS: atlas blis flexiblas netlib (default) openblas # # Provides: BLASLIB and LAPACKLIB # # Maintainer: thierry@FreeBSD.org +# +# /!\ Avoid mixing libraries using different BLAS-LAPACK implementations! .if !defined(_INCLUDE_USES_BLASLAPACK_MK) _INCLUDE_USES_BLASLAPACK_MK= yes -_valid_ARGS= atlas gotoblas netlib openblas +_valid_ARGS= atlas blis flexiblas 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 -LIB_DEPENDS+= libgoto2.so:math/gotoblas -LIB_DEPENDS+= liblapack.so:math/lapack -_BLASLIB= goto2p -LAPACKLIB= -lgoto2p -.elif ${blaslapack_ARGS} == netlib +BLA_VENDOR= ATLAS +. elif ${blaslapack_ARGS} == blis +LIB_DEPENDS+= libblis.so:math/blis +LIB_DEPENDS+= libflame.so:math/libflame +_BLASLIB= blis +LAPACKLIB= -lflame +BLA_VENDOR= FLAME +. elif ${blaslapack_ARGS} == flexiblas +LIB_DEPENDS+= libflexiblas.so:math/flexiblas +_BLASLIB= flexiblas +BLA_VENDOR= FlexiBLAS +. elif ${blaslapack_ARGS} == netlib LIB_DEPENDS+= libblas.so:math/blas LIB_DEPENDS+= liblapack.so:math/lapack _BLASLIB= blas LAPACKLIB= -llapack -.elif ${blaslapack_ARGS} == openblas +BLA_VENDOR= Generic +. elif ${blaslapack_ARGS} == openblas LIB_DEPENDS+= libopenblas.so:math/openblas _BLASLIB= openblas LAPACKLIB= -lopenblas -.else +BLA_VENDOR= OpenBLAS +. else IGNORE= USES=blaslapack: invalid arguments: ${blaslapack_ARGS} -.endif +. endif BLASLIB= -l${_BLASLIB} +. if ${USES:Mcmake} || ${USES:Mcmake\:*} +CONFIGURE_ENV+= BLA_VENDOR="${BLA_VENDOR}" +. endif + .endif diff --git a/Mk/Uses/budgie.mk b/Mk/Uses/budgie.mk new file mode 100644 index 000000000000..006c80bd0799 --- /dev/null +++ b/Mk/Uses/budgie.mk @@ -0,0 +1,84 @@ +# This file provides support for the Budgie Desktop related ports. +# +# Feature: budgie +# Usage: USES= budgie +# Valid ARGS: does not require args +# +# Variable which can be set by the port: +# USE_BUDGIE= List of components +# +# MAINTAINER: desktop@FreeBSD.org + +.if !defined(_INCLUDE_USES_BUDGIE_MK) +_INCLUDE_USES_BUDGIE_MK= yes + +. if !empty(budgie_ARGS) +IGNORE= Incorrect USES+= budgie:${budgie_ARGS} takes no arguments +. endif + +. if !defined(USE_GITHUB) +_BUDGIE_PROJECT= ${DISTNAME:S/-${DISTVERSIONFULL}//:tl} + +WRKSRC?= ${WRKDIR}/${PORTNAME}-${DISTVERSION} + +MASTER_SITE_BUDGIE+= \ + https://github.com/BuddiesOfBudgie/%SUBDIR%/releases/download/v${DISTVERSION}/ +MASTER_SITE_BUDGIE_SUBDIR= ${_BUDGIE_PROJECT} + +MASTER_SITES?= ${MASTER_SITE_BUDGIE} +MASTER_SITE_SUBDIR?= ${MASTER_SITE_BUDGIE_SUBDIR} + +DIST_SUBDIR?= budgie +. endif + +PLIST_SUB+= BUDGIE_PLUGINSDIR="lib/budgie-desktop/plugins" \ + RAVEN_PLUGINSDIR="lib/budgie-desktop/raven-plugins" + +# Available Budgie components are: +_USE_BUDGIE_ALL= libbudgie libmagpie raven screensaver + +libbudgie_LIB_DEPENDS= libbudgie-plugin.so:x11/budgie-desktop + +libmagpie_LIB_DEPENDS= libmagpie-0.so:x11-wm/magpie + +raven_LIB_DEPENDS= libraven.so:x11/budgie-desktop +raven_RUN_DEPENDS= budgie-desktop>0:x11/budgie-desktop + +screensaver_BUILD_DEPENDS= budgie-screensaver:x11/budgie-screensaver +screensaver_RUN_DEPENDS= budgie-screensaver>0:x11/budgie-screensaver + +. if defined(USE_BUDGIE) + +. for comp in ${USE_BUDGIE:C/^([^:]+).*/\1/} +. if empty(_USE_BUDGIE_ALL:M${comp}) +IGNORE= cannot install: Unknown component ${comp} +. else +_USE_BUDGIE+= ${comp} +. endif +. endfor + +# Remove duplicate components +USE_BUDGIE= ${_USE_BUDGIE:O:u} + +. for comp in ${USE_BUDGIE} +. if ${USE_BUDGIE:M${comp}\:build} && defined(${comp}_BUILD_DEPENDS) +BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS} +. elif ${USE_BUDGIE:M${comp}\:run} && defined(${comp}_RUN_DEPENDS) +RUN_DEPENDS+= ${${comp}_RUN_DEPENDS} +. else +. if defined(${comp}_LIB_DEPENDS) +LIB_DEPENDS+= ${${comp}_LIB_DEPENDS} +. else +BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS} +RUN_DEPENDS+= ${${comp}_RUN_DEPENDS} +. endif +. endif +. endfor + +. endif # end of defined(USE_BUDGIE) + +.endif # end of !defined(_INCLUDE_USES_BUDGIE_MK) + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_BUDGIE_POST_MK) +_INCLUDE_USES_BUDGIE_POST_MK= yes +.endif diff --git a/Mk/Uses/cabal.mk b/Mk/Uses/cabal.mk index ce7cba801d69..2ee0596e0a6e 100644 --- a/Mk/Uses/cabal.mk +++ b/Mk/Uses/cabal.mk @@ -19,19 +19,35 @@ # When creating a new port, the initial list can be built # using make-use-cabal auxiliary target. # +# CABAL_REVISION Specifies a Haskell package revision. Set this to an +# integer to pull in revised .cabal file from Hackage. +# # 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. +# CABAL_EXECUTABLES List of executable Cabal targets to be built and installed. +# Consult the .cabal file of the project being ported to find +# out possible values for this variable. # default: ${PORTNAME} # +# HACKAGE_DISTNAME Use this knob if PORTNAME or PORTVERSION doesn't match +# with package name and version on Hackage. +# default: ${PORTNAME}-${PORTVERSION} +# # 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. +# opt_CABAL_EXECUTABLES Variant of CABAL_EXECUTABLES to be used with +# options framework. +# +# CABAL_WRAPPER_SCRIPTS A subset of ${CABAL_EXECUTABLES} containing Haskell +# programs to be wrapped into a shell script that sets +# *_datadir environment variables before running the program. +# This is needed for Haskell programs that install their +# data files under share/ directory. # # FOO_DATADIR_VARS Additional environment vars to add to FOO executable's # wrapper script. @@ -39,6 +55,9 @@ # CABAL_PROJECT Sets how to treat existing cabal.project file. Possible # values are "remove" and "append". # +# SKIP_CABAL_PLIST Set to "yes" to prevent Haskell executables from being +# added to the pkg-plist automatically. +# # MAINTAINER: haskell@FreeBSD.org .if !defined(_INCLUDE_USES_CABAL_MK) @@ -57,29 +76,47 @@ IGNORE= USES=cabal: invalid arguments: ${arg} IGNORE= CABAL_PROJECT: invalid value: ${CABAL_PROJECT} . endif +. if ${ARCH} == i386 && defined(USE_CABAL) && ${USE_CABAL:Mbasement-0.0.1[4-5]} +# Upstream issue: https://github.com/haskell-foundation/foundation/issues/565 +BROKEN= ${USE_CABAL:Mbasement-0.0.1[4-5]} package doesn't compile on i386 +. endif + PKGNAMEPREFIX?= hs- -EXECUTABLES?= ${PORTNAME} +CABAL_EXECUTABLES?= ${PORTNAME} +CABAL_CMD?= cabal +CABAL_PORT= devel/hs-cabal-install CABAL_HOME= ${WRKDIR}/cabal-home +CABAL_HOME_ENV=XDG_DATA_HOME=${CABAL_HOME} XDG_CONFIG_HOME=${CABAL_HOME} XDG_CACHE_HOME=${CABAL_HOME} HOME=${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 +# A special cookie used to signify that the user is a maintainer updating the port +# using cabal-* targets. The presense of this cookie disables cabal-post-patch. +CABAL_COOKIE= ${WRKDIR}/.cabal_update_done.${PORTNAME}.${PREFIX:S/\//_/g} + +HPACK_CMD?= hpack +_CABAL2TUPLE_CMD= cabal2tuple + +. if defined(BUILD_DEPENDS) && ${BUILD_DEPENDS:Mghc?*\:lang/ghc?*} +CABAL_WITH_ARGS= --with-compiler=${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} \ + --with-hsc2hs=${LOCALBASE}/bin/hsc2hs-${BUILD_DEPENDS:Mghc?*\:lang/ghc?*:C/\:.*//} +. else +BUILD_DEPENDS+= ghc:lang/ghc +. endif -. if !defined(CABAL_BOOTSTRAP) -BUILD_DEPENDS+= cabal:devel/hs-cabal-install \ - ghc:lang/ghc +. if "${PORTNAME}" != "cabal-install" +BUILD_DEPENDS+= cabal:${CABAL_PORT} . 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" +# Inherited via lang/ghc we need to depend on libffi.so and libgmp.so (stage q/a) LIB_DEPENDS+= libgmp.so:math/gmp \ libffi.so:devel/libffi @@ -91,18 +128,23 @@ _hackage_is_default= yes _hackage_is_default= no . endif +. if defined(HACKAGE_DISTNAME) && ${_hackage_is_default} == no +IGNORE= HACKAGE_DISTNAME is set, but it makes no sense if the default MASTER_SITES isn't HACKAGE +. endif + +MASTER_SITES+= HACKAGE/${_hackage_group} +. if defined(HACKAGE_DISTNAME) +WRKSRC?= ${WRKDIR}/${HACKAGE_DISTNAME} +. endif +HACKAGE_DISTNAME?= ${PORTNAME}-${PORTVERSION} + . 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} +DISTFILES+= ${HACKAGE_DISTNAME}/${HACKAGE_DISTNAME}${CABAL_EXTRACT_SUFX} +. ifdef CABAL_REVISION +DISTFILES+= ${HACKAGE_DISTNAME}/revision/${CABAL_REVISION}.cabal . endif +. else +_hackage_group= :cabal_mk_hackage . endif _USES_extract= 701:cabal-post-extract @@ -110,160 +152,210 @@ _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 +BUILD_TARGET?= ${CABAL_EXECUTABLES:S/^/exe:&/} _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 +. for pkg_without_group xgroup in ${package:C/:.*$$//} x${package:S/${package:C/:.*$$//}//:C/^.*://} +. for pkg_name xrev in ${pkg_without_group:C/_[0-9]+//} x${pkg_without_group:C/[^_]*//:S/_//} +. if ${xgroup} == "x" +DISTFILES+= ${pkg_name}/${pkg_name}${CABAL_EXTRACT_SUFX}${_hackage_group} +. if ${xrev} != "x" +DISTFILES+= ${pkg_name}/revision/${xrev:S/^x//}.cabal${_hackage_group} +. endif +. else +DISTFILES+= ${pkg_name}${CABAL_EXTRACT_SUFX}:${xgroup:S/^x//} +. if ${xrev} != "x" +DISTFILES+= ${pkg_name}/revision/${xrev:S/^x//}.cabal:${xgroup:S/^x//} +. endif +. endif # ${xgroup} == "x" +_CABAL_EXTRACT_ONLY+= ${pkg_name}/${pkg_name}${CABAL_EXTRACT_SUFX} +. endfor +. endfor +. endfor -. if ${package:C/[^_]*//:S/_//} != "" -DISTFILES+= ${package:C/_[0-9]+//}/revision/${package:C/[^_]*//:S/_//}.cabal:${package:C/[\.-]//g} +. if !defined(EXTRACT_ONLY) +EXTRACT_ONLY= ${_DISTFILES:N*\.cabal} +. else +. if !defined(SKIP_CABAL_EXTRACT) +EXTRACT_ONLY+= ${_CABAL_EXTRACT_ONLY} . endif +. endif -. endfor - +. if defined(CABAL_REPOSITORIES) && !empty(CABAL_REPOSITORIES) +. for r in ${CABAL_REPOSITORIES} +CABAL2TUPLE_ARGS+= --group=${r} --master-site=${MASTER_SITES:M*\:${r}:[1]:S/:${r}//:S|/package/||} +. endfor +. endif # Auxiliary targets used during port creation/updating. +# Populates Haskell package list from Hackage. # 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 isn't a default MASTER_SITE (for instance, when USE_GITHUB is present) +# this target requires distinfo to be present too. +cabal-extract: check-cabal +. if ${_hackage_is_default} == no + @${ECHO_MSG} "===> Recursing down to make extract" + @${MAKE} -C ${.CURDIR} extract SKIP_CABAL_EXTRACT=yes USE_CABAL= + ${RM} -r ${CABAL_HOME} +. endif + @${ECHO_MSG} "===> Fetching Hackage index into ${CABAL_HOME}/.cabal" + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update . if ${_hackage_is_default} == yes cd ${WRKDIR} && \ - ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal get ${PORTNAME}-${PORTVERSION} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} get ${HACKAGE_DISTNAME} . 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 + @${ECHO_MSG} "===> Running ${HPACK_CMD} to generate .cabal file" + cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${HPACK_CMD} . endif +. endif +# Remove Haskell dependencies that come from GH_TUPLE + @${RM} -r ${WRKSRC}/dist-newstyle +. ifdef CABAL_REPOSITORIES + @${ECHO_MSG} "===> Fetching additional Cabal repositories index into ${CABAL_HOME}/.cabal" + @cd ${WRKSRC} && \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} update +. endif +# Create a cookie for cabal-post-patch + @${TOUCH} ${EXTRACT_COOKIE} ${CABAL_COOKIE} + +# Calls cabal build --dry-run on the Haskell package located in ${WRKSRC} +# This is a Cabal way of doing configure step of the building process +# This pulls in all source dependencies, resolves them and generates build plan +cabal-configure: check-cabal cd ${WRKSRC} && \ - ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-configure --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CONFIGURE_ARGS} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --dry-run --disable-benchmarks --disable-tests --flags="${CABAL_FLAGS}" ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} + +# Calls cabal build on the Haskell package located in ${WRKSRC} +cabal-build: check-cabal cd ${WRKSRC} && \ - ${SETENV} ${LOCALE_ENV} HOME=${CABAL_HOME} cabal new-build --disable-benchmarks --disable-tests --dependencies-only ${BUILD_ARGS} ${BUILD_TARGET} + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} ${BUILD_ARGS} ${BUILD_TARGET} + +# Generates USE_CABAL= ... line ready to be pasted into the port based on the plan.json file generated by cabal configure. +make-use-cabal: check-cabal2tuple + @${ECHO_MSG} "===> Processing plan.json" + @${_CABAL2TUPLE_CMD} ${CABAL2TUPLE_ARGS} ${WRKSRC} || (${ECHO_CMD} "Did you forget to make cabal-configure ?" ; exit 1) +. if ${_hackage_is_default} == yes + @if ${GREP} -q 'x-revision' ${WRKSRC}/*.cabal; then \ + ${ECHO_MSG} "Downloaded .cabal file contains x-revision, make sure to add CABAL_REVISION=" `${GREP} 'x-revision' ${WRKSRC}/*.cabal | ${SED} -e s/x-revision://`; \ + fi . 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 +check-cabal: + @if ! type ${CABAL_CMD} > /dev/null 2>&1; then \ + ${ECHO_MSG} "===> cabal executable not found, install ${CABAL_PORT} or set CABAL_CMD"; exit 1; \ + fi; \ + +check-cabal2tuple: + @if ! type ${_CABAL2TUPLE_CMD} > /dev/null 2>&1; then \ + ${ECHO_MSG} "===> cabal2tuple executable not found, install \"ports-mgmt/hs-cabal2tuple\""; exit 1; \ + fi -. if !defined(CABAL_BOOTSTRAP) # Main targets implementation. cabal-post-extract: -# Remove the project file as requested +. if !defined(SKIP_CABAL_EXTRACT) . if "${CABAL_PROJECT}" == "remove" +# Remove the project file if requested ${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} +. ifndef(CABAL_PROJECT) + @${TEST} ! -f ${WRKSRC}/cabal.project || \ + (${ECHO_CMD} "cabal.project file is already present in WRKSRC! Set CABAL_PROJECT variable." && false) +. endif +# Copy revised .cabal file if present +. if defined(CABAL_REVISION) && ${_hackage_is_default} == yes + ${CP} ${DISTDIR}/${DIST_SUBDIR}/${HACKAGE_DISTNAME}/revision/${CABAL_REVISION}.cabal `find ${WRKSRC} -name '*.cabal' -depth 1` . 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} +. for pkg_without_group in ${package:C/:.*$$//} +. for pkg_name xrev in ${pkg_without_group:C/_[0-9]+//} x${pkg_without_group:C/[^_]*//:S/_//} # 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 +. if ${xrev} != "x" + ${CP} ${DISTDIR}/${DIST_SUBDIR}/${pkg_name}/revision/${xrev:S/^x//}.cabal `find ${WRKDIR}/${pkg_name} -name '*.cabal' -depth 1` +. endif # Move the dependency source itself cd ${WRKDIR} && \ - mv ${package:C/_[0-9]+//} ${CABAL_DEPSDIR}/ + ${MV} ${pkg_name} ${CABAL_DEPSDIR}/ +. endfor +. endfor . endfor # Create the cabal-install config ${MKDIR} ${CABAL_HOME}/.cabal ${ECHO_CMD} "jobs: ${MAKE_JOBS_NUMBER}" > ${CABAL_HOME}/.cabal/config +. endif # SKIP_CABAL_EXTRACT cabal-post-patch: -# Create our own cabal.project - ${ECHO_CMD} "packages: ." > ${WRKSRC}/cabal.project +. if !defined(SKIP_CABAL_EXTRACT) + @${TEST} ! -f ${CABAL_COOKIE} || \ + (${ECHO_CMD} "===> Patching done, skipping cabal-post-patch" && false) +# Append our stuff to possibly existing cabal.project.local + ${ECHO_CMD} "" >> ${WRKSRC}/cabal.project.local + ${ECHO_CMD} "-- added by USES=cabal" >> ${WRKSRC}/cabal.project.local + ${ECHO_CMD} "packages:" >> ${WRKSRC}/cabal.project.local . for package in ${_use_cabal} - ${ECHO_CMD} " ${CABAL_DEPS_SUBDIR}/${package:C/_[0-9]+//}" >> ${WRKSRC}/cabal.project +. for pkg_without_group in ${package:C/:.*$$//} +. for pkg_name in ${pkg_without_group:C/_[0-9]+//} + ${ECHO_CMD} " ${CABAL_DEPS_SUBDIR}/${pkg_name}" >> ${WRKSRC}/cabal.project.local +. endfor +. endfor . endfor -# Append the (possibly patched) original cabal.project, if requested -. if "${CABAL_PROJECT}" == "append" - ${CAT} ${WRKSRC}/cabal.project.${PORTNAME} >> ${WRKSRC}/cabal.project -. endif +. endif # SKIP_CABAL_EXTRACT && !CABAL_COOKIE cabal-pre-configure: # Generate .cabal file with hpack if requested -. if ${cabal_ARGS:Mhpack} - cd ${WRKSRC} && ${SETENV} HOME=${CABAL_HOME} hpack -. endif +. if ${cabal_ARGS:Mhpack} + cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} hpack +. endif -. if !target(do-build) +. 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 + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CABAL_HOME_ENV} ${CABAL_CMD} build --offline --disable-benchmarks --disable-tests ${CABAL_WITH_ARGS} ${CABAL_LTO_ARGS} --flags "${CABAL_FLAGS}" ${BUILD_ARGS} ${BUILD_TARGET} +. endif -. if !target(do-install) +. if !target(do-install) do-install: +. if defined(CABAL_WRAPPER_SCRIPTS) && !empty(CABAL_WRAPPER_SCRIPTS) ${MKDIR} ${STAGEDIR}${PREFIX}/${CABAL_LIBEXEC} -. for exe in ${EXECUTABLES} +. endif +. for exe in ${CABAL_EXECUTABLES} +. if defined(CABAL_WRAPPER_SCRIPTS) && ${CABAL_WRAPPER_SCRIPTS:M${exe}} ${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} - ${ECHO_CMD} 'export ${dep:S/-/_/}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} -. endfor + ${ECHO_CMD} 'export ${exe:S/-/_/g}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} +. for dep in ${${exe}_DATADIR_VARS} + ${ECHO_CMD} 'export ${dep:S/-/_/g}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe} +. 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 +. else + ${INSTALL_PROGRAM} \ + $$(find ${WRKSRC}/dist-newstyle -name ${exe} -type f -perm +111) \ + ${STAGEDIR}${PREFIX}/bin/${exe} +. endif +. endfor +. endif -. if !defined(SKIP_CABAL_PLIST) +. if !defined(SKIP_CABAL_PLIST) cabal-post-install-script: -. for exe in ${EXECUTABLES} +. for exe in ${CABAL_EXECUTABLES} ${ECHO_CMD} 'bin/${exe}' >> ${TMPPLIST} +. if defined(CABAL_WRAPPER_SCRIPTS) && ${CABAL_WRAPPER_SCRIPTS:M${exe}} ${ECHO_CMD} '${CABAL_LIBEXEC}/${exe}' >> ${TMPPLIST} -. endfor -. endif - -. endif # !defined(CABAL_BOOTSTRAP) +. endif +. endfor +. endif .endif diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index e1f5544b9c0b..8710374e3584 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -10,9 +10,9 @@ .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" @@ -37,15 +37,15 @@ 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+*} @@ -54,7 +54,7 @@ _CARGO_CRATES:= ${empty(_CARGO_CRATES):?:${_CARGO_CRATES:range:@i@$i ${_CARGO_C # 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} @@ -64,7 +64,7 @@ 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}" \ @@ -73,11 +73,11 @@ _CARGO_AWK= ${AWK} -vCP="${CP}" -vFIND="${FIND}" -vGREP="${GREP}" \ -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 @@ -89,25 +89,33 @@ _CARGO_CRATES+= @git ${_crate} ${_crate} @git # 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" -BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.56.0:lang/${RUST_DEFAULT} -.endif +. if ${CARGO_BUILDDEP:tl} == "yes" +BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.77.0:lang/${RUST_DEFAULT} +. elif ${CARGO_BUILDDEP:tl} == "any-version" +BUILD_DEPENDS+= ${RUST_DEFAULT}>=0:lang/${RUST_DEFAULT} +. endif -# Location of cargo binary (default to lang/rust's Cargo binary) -CARGO_CARGO_BIN?= ${LOCALBASE}/bin/cargo +# 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?= ${ARCH:S/amd64/x86_64/:S/i386/i686/}-unknown-${OPSYS:tl} +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 @@ -123,28 +131,33 @@ CARGO_ENV+= \ CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET} \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ CARGO_TARGET_${CARGO_BUILD_TARGET:S/-/_/g:tu}_LINKER="${CC}" \ - RUST_BACKTRACE=1 \ - RUSTC=${LOCALBASE}/bin/rustc \ - RUSTDOC=${LOCALBASE}/bin/rustdoc \ + RUSTC=${RUSTC} \ + RUSTDOC=${RUSTDOC} \ RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:C/.+/-C link-arg=&/}" +. if ${ARCH} != powerpc +CARGO_ENV+= RUST_BACKTRACE=1 +. endif + +. if defined(WITH_LTO) +_CARGO_MSG= "===> Additional optimization to port applied" +. 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:Mpowerpc64*} +. elif ${ARCH:Mpowerpc*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} -.else +. elif ${ARCH} == aarch64 || ${ARCH} == armv7 +RUSTFLAGS+= -C target-cpu=${CPUTYPE:C/\+.+//g} +. else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} -.endif - -.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_BIN} -CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENV} CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${_CARGO_RUN} +_CARGO_RUN= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} +CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${CARGO_ENV} \ + CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${CARGO} # User arguments for cargo targets. CARGO_BUILD_ARGS?= @@ -163,98 +176,103 @@ CARGO_TEST?= yes # 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} -BUILD_DEPENDS+= cmake:devel/cmake -.endif +. if ${_CARGO_CRATES:Mcmake} +BUILD_DEPENDS+= cmake:devel/cmake-core +. 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} +. if ${_CARGO_CRATES:Mzstd-sys} +# Use the system's zstd instead of building the bundled version +CARGO_ENV+= ZSTD_SYS_USE_PKG_CONFIG=1 +. endif + +. 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: @@ -262,20 +280,20 @@ cargo-extract: # 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}) \ + $$(${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 @@ -284,6 +302,9 @@ 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 +. if defined(_CARGO_MSG) + @${ECHO_MSG} ${_CARGO_MSG} +. endif @${ECHO_MSG} "===> Cargo config:" @${MKDIR} ${WRKDIR}/.cargo @: > ${WRKDIR}/.cargo/config.toml @@ -291,10 +312,10 @@ cargo-configure: @${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}; \ @@ -308,20 +329,20 @@ cargo-configure: --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}" \ @@ -329,32 +350,45 @@ do-install: --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: extract +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_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} # cargo-crates-licenses will try to grab license information from # all downloaded crates. @@ -365,4 +399,19 @@ cargo-crates-licenses: configure -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 553074e8e216..bbf446c35f80 100644 --- a/Mk/Uses/charsetfix.mk +++ b/Mk/Uses/charsetfix.mk @@ -4,14 +4,14 @@ # Usage: USES=charsetfix # Valid ARGS: does not require args # -# MAINTAINER: portmgr@FreeBSD.org +# 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 diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk index 30a8e188600f..4129f0f341fc 100644 --- a/Mk/Uses/cmake.mk +++ b/Mk/Uses/cmake.mk @@ -2,10 +2,13 @@ # # Feature: cmake # Usage: USES=cmake or USES=cmake:ARGS -# Valid ARGS: insource, run, noninja, testing +# Valid ARGS: indirect, insource, noninja, run, testing # ARGS description: +# indirect do not run cmake for configure step, only add build dependency. +# This should be set only for ports which use other build systems, +# e.g. pep517 or meson, but rely internally on cmake. # insource do not perform an out-of-source build -# noninja don't use ninja instead of make +# noninja do not 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 @@ -17,6 +20,7 @@ # 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. +# _internal Not to be used by any other ports than the ones created from the release-tarball of cmake # # # Additional variables that affect cmake behaviour: @@ -30,6 +34,7 @@ # CMAKE_OFF Appends -D<var>:bool=OFF to the CMAKE_ARGS. # CMAKE_ARGS - Arguments passed to cmake # Default: see below +# Variables for ports which use cmake for configure # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). # Projects may have their own build profiles. # CMake supports the following types: Debug, @@ -37,52 +42,63 @@ # 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 +# Default: Release, if neither WITH_DEBUG nor WITH_DEBUGINFO is set, +# RelWithDebInfo, if WITH_DEBUGINFO is set, +# Debug, if WITH_DEBUG is set. # CMAKE_SOURCE_PATH - Path to the source directory # Default: ${WRKSRC} +# Variables for ports which use cmake for testing +# CMAKE_TESTING_ARGS - Additional arguments passed to cmake on test target. +# CMAKE_TESTING_ON Appends -D<var>:bool=ON to the CMAKE_TESTING_ARGS. +# Default: BUILD_TESTING +# CMAKE_TESTING_OFF Appends -D<var>:bool=OFF to the CMAKE_TESTING_ARGS. +# Default: empty +# CMAKE_TESTING_TARGET - Name of the test target. Default: test # # MAINTAINER: kde@FreeBSD.org .if !defined(_INCLUDE_USES_CMAKE_MK) _INCLUDE_USES_CMAKE_MK= yes -_valid_ARGS= insource run noninja testing +_valid_ARGS= indirect insource noninja run testing _internal + +_CMAKE_VERSION= 3.28.3 +CMAKE_BIN= ${LOCALBASE}/bin/cmake # 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 !empty(cmake_ARGS:M_internal) +# _internal is intended only for devel/cmake-core +MASTER_SITES?= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ + https://www.cmake.org/files/v${DISTVERSION}/ +. else +BUILD_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core -.if ${cmake_ARGS:Mrun} -RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake -.endif +. if !empty(cmake_ARGS:Mrun) +RUN_DEPENDS+= ${CMAKE_BIN}:devel/cmake-core +. endif -.if defined(WITH_DEBUG) +. if defined(WITH_DEBUG) CMAKE_BUILD_TYPE?= Debug -.else +. elif defined(WITH_DEBUGINFO) +CMAKE_BUILD_TYPE?= RelWithDebInfo +. else CMAKE_BUILD_TYPE?= Release -.endif #defined(WITH_DEBUG) - -PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" - -.if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) -INSTALL_TARGET?= install/strip -.endif +. endif #defined(WITH_DEBUG) 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_C_FLAGS_RELEASE:STRING="${CFLAGS} -DNDEBUG" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ -DCMAKE_CXX_FLAGS_DEBUG:STRING="${CXXFLAGS}" \ - -DCMAKE_CXX_FLAGS_RELEASE:STRING="${CXXFLAGS}" \ + -DCMAKE_CXX_FLAGS_RELEASE:STRING="${CXXFLAGS} -DNDEBUG" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_MODULE_LINKER_FLAGS:STRING="${LDFLAGS}" \ -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LDFLAGS}" \ @@ -90,73 +106,94 @@ CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ -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 + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -DFETCHCONTENT_FULLY_DISCONNECTED: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 +. endif + +. if empty(cmake_ARGS:Mindirect) +. if defined(STRIP) && ${STRIP} != "" && !defined(WITH_DEBUG) && !defined(WITH_DEBUGINFO) +INSTALL_TARGET?= install/strip +. endif +. endif + +# Use cmake for configure stage and for testing +. if empty(cmake_ARGS:M_internal) && empty(cmake_ARGS:Mindirect) +PLIST_SUB+= CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:tl}" _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) -BROKEN= USES=gmake is incompatible with cmake's ninja-generator -. endif +. if empty(cmake_ARGS:Mnoninja) && empty(cmake_ARGS:Mrun) && empty(USES:Mfortran) +. if "${CONFIGURE_WRKSRC}" == "${BUILD_WRKSRC}" && "${CONFIGURE_WRKSRC}" == "${INSTALL_WRKSRC}" +# USES=gmake sets MAKE_CMD and ninja.mk does too (it also messes with MAKEFILE and MAKE_CMD). +. if ! empty(USES:Mgmake) +BROKEN= USES=gmake is incompatible with cmake's ninja-generator (try cmake:noninja) +. endif +# USES=emacs appends EMACS=<path> to MAKE_ARGS, which then get passed to ninja. +# Since ninja doesn't support that kind of variable-setting on the command-line, +# it errors out. +. if ! empty(USES:Memacs) +BROKEN= USES=emacs is incompatible with cmake's ninja-generator (try cmake:noninja) +. endif . include "${USESDIR}/ninja.mk" -. endif -.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 + @cd ${CONFIGURE_WRKSRC}; ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} \ + ${CMAKE_ARGS} ${CMAKE_SOURCE_PATH} +. 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_ARGS} ${ALL_TARGET} && \ - ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${CMAKE_TESTING_TARGET} -.endif + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_TESTING_ARGS} ${CMAKE_SOURCE_PATH} && \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} && \ + ${SETENVI} ${WRK_ENV} ${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 b83f8acbf952..d668873e1f2a 100644 --- a/Mk/Uses/compiler.mk +++ b/Mk/Uses/compiler.mk @@ -8,6 +8,8 @@ # 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 +# c++20-lang: The port needs a compiler understanding C++20 +# c++2b-lang: The port needs a compiler understanding C++2b # 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 @@ -24,176 +26,193 @@ # 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: portmgr@FreeBSD.org +# 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 +VALID_ARGS= c++11-lib c++11-lang c++14-lang c++17-lang c++20-lang \ + c++2b-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} == c++20-lang +_COMPILER_ARGS+= features c++20-lang +. elif ${compiler_ARGS} == c++2b-lang +_COMPILER_ARGS+= features c++2b-lang +. 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 +CXXSTD= c++98 c++0x c++11 c++14 c++17 c++20 c++2b \ + gnu++98 gnu++11 gnu++14 gnu++17 gnu++20 gnu++2b -.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++2b-lang} && !${COMPILER_FEATURES:Mc++2b}) || \ +(${_COMPILER_ARGS:Mc++20-lang} && !${COMPILER_FEATURES:Mc++20}) || \ +(${_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 ${_COMPILER_ARGS:Mc++2b-lang} +_LLVM_MINVER= 14 +. elif ${_COMPILER_ARGS:Mc++20-lang} +_LLVM_MINVER= 11 +. else +_LLVM_MINVER= 0 +. endif +. 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 || \ + (${COMPILER_VERSION:C/[0-9]$//}<${_LLVM_MINVER}) +. if ${ALT_COMPILER_TYPE} == clang && \ + (${ALT_COMPILER_VERSION:C/[0-9]$//}>=${_LLVM_MINVER}) CPP= clang-cpp CC= clang CXX= clang++ CHOSEN_COMPILER_TYPE= clang -.else -BUILD_DEPENDS+= ${LOCALBASE}/bin/clang10:devel/llvm10 -CPP= ${LOCALBASE}/bin/clang-cpp10 -CC= ${LOCALBASE}/bin/clang10 -CXX= ${LOCALBASE}/bin/clang++10 +. else +. if ${LLVM_DEFAULT:C/^[789]0$/0/}<${_LLVM_MINVER} +_LLVM_REQ= ${_LLVM_MINVER} +. else +_LLVM_REQ= ${LLVM_DEFAULT} +. endif +BUILD_DEPENDS+= clang${_LLVM_REQ}:devel/llvm${_LLVM_REQ} +CPP= ${LOCALBASE}/bin/clang-cpp${_LLVM_REQ} +CC= ${LOCALBASE}/bin/clang${_LLVM_REQ} +CXX= ${LOCALBASE}/bin/clang++${_LLVM_REQ} 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++} -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 +. if ${COMPILER_FEATURES:Mlibc++} +CXXFLAGS+= -stdlib=libc++ +. endif +. endif .endif diff --git a/Mk/Uses/corosync.mk b/Mk/Uses/corosync.mk index ee14d99f2080..869f671c6bd6 100644 --- a/Mk/Uses/corosync.mk +++ b/Mk/Uses/corosync.mk @@ -12,27 +12,20 @@ _INCLUDE_USES_COROSYNC_MK= yes # 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 -_COROSYNC_INSTALLED_VER_MAJOR= 3 -_COROSYNC_INSTALLED_VER_MINOR= 0 -. 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} diff --git a/Mk/Uses/cpe.mk b/Mk/Uses/cpe.mk index 410a05c6e437..92d27e5aa12b 100644 --- a/Mk/Uses/cpe.mk +++ b/Mk/Uses/cpe.mk @@ -1,5 +1,7 @@ # Include CPE information in package manifest as a CPE 2.3 formatted -# string. See http://scap.nist.gov/specifications/cpe/ for details. +# string. +# See https://csrc.nist.gov/projects/security-content-automation-protocol/specifications/cpe +# for details. # # CPE_PART Defaults to "a" for "application". # CPE_VENDOR Defaults to same as ${CPE_PRODUCT} (below). 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 @@ -27,49 +27,49 @@ 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 d89f8d833705..6b9830fbe1fa 100644 --- a/Mk/Uses/desktop-file-utils.mk +++ b/Mk/Uses/desktop-file-utils.mk @@ -9,12 +9,11 @@ .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 -PLIST_FILES+= "@desktop-file-utils" .endif diff --git a/Mk/Uses/desthack.mk b/Mk/Uses/desthack.mk index d9b86247cba6..e4cb32f589f6 100644 --- a/Mk/Uses/desthack.mk +++ b/Mk/Uses/desthack.mk @@ -4,15 +4,15 @@ # Usage: USES=desthack # Valid ARGS: none # -# MAINTAINER: portmgr@FreeBSD.org +# 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} +GNU_CONFIGURE_MANPREFIX= \$${${DESTDIRNAME}}${PREFIX}/share .endif diff --git a/Mk/Uses/display.mk b/Mk/Uses/display.mk index 1e7fe7f6cdef..886d65b01ad7 100644 --- a/Mk/Uses/display.mk +++ b/Mk/Uses/display.mk @@ -9,12 +9,12 @@ .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) -BUILD_DEPENDS+= Xvfb:x11-servers/xorg-vfbserver \ +. if !defined(DISPLAY) +BUILD_DEPENDS+= Xvfb:x11-servers/xorg-server@xvfb \ ${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 \ @@ -31,5 +31,5 @@ start-display: stop-display: pkill -15 -F ${XVFBPIDFILE} -.endif +. endif .endif diff --git a/Mk/Uses/dos2unix.mk b/Mk/Uses/dos2unix.mk index 6d1ea28a6a61..2e8db690dc91 100644 --- a/Mk/Uses/dos2unix.mk +++ b/Mk/Uses/dos2unix.mk @@ -5,40 +5,40 @@ # DOS2UNIX_GLOB list of glob pattern find(1) will match with # DOS2UNIX_WRKSRC top-level path for directory traversal instead of ${WRKSRC} # -# MAINTAINER: portmgr@FreeBSD.org +# 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 @@ -11,25 +11,25 @@ .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} @@ -38,26 +38,26 @@ 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 @@ -85,31 +85,31 @@ PLIST_FILES+= "@owner www" \ "@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/ebur128.mk b/Mk/Uses/ebur128.mk new file mode 100644 index 000000000000..eb5df3630777 --- /dev/null +++ b/Mk/Uses/ebur128.mk @@ -0,0 +1,55 @@ +# Handle dependency on audio/[lib]ebur128 +# Feature: ebur128 +# Usage: USES=ebur128:ARGS +# Valid ARGS: <none>, build, lib, run, test +# <none>: (default) same as lib +# build: add BUILD_DEPENDS +# lib: add LIB_DEPENDS +# run: add RUN_DEPENDS +# test: add TEST_DEPENDS +# +# MAINTAINER: ports@FreeBSD.org +# + +.if !defined(_INCLUDE_USES_EBUR128_MK) +_INCLUDE_USES_EBUR128_MK= YES + +#=== Check for invalid arguments === +. if !empty(ebur128_ARGS:Nbuild:Nlib:Nrun:Ntest) +IGNORE= Invalid USES=ebur128 - unsupported argument(s): ${ebur128_ARGS} +. endif + +#=== Dependency selection === +_ebur128_depends= build lib run test +_ebur128_depend= # +. for _depend in ${_ebur128_depends:O:u} +. if ${ebur128_ARGS:M${_depend}} +_ebur128_depend+= ${_depend} +. endif +. endfor + +. if empty(_ebur128_depend) +_ebur128_depend= lib +. endif + +#=== Prefixes === +_ebur128_prefix_rust= # +_ebur128_prefix_legacy= lib +_ebur128_prefix= ${_ebur128_prefix_${EBUR128_DEFAULT}} + +#=== Dependency setup === +_EBUR128_PORT= audio/${_ebur128_prefix}ebur128 +_EBUR128_LIB= libebur128.so +_EBUR128_PKG= ${_ebur128_prefix}ebur128 + +_EBUR128_BUILD_DEPENDS= ${_EBUR128_PKG}>=0:${_EBUR128_PORT} +_EBUR128_LIB_DEPENDS= ${_EBUR128_LIB}:${_EBUR128_PORT} +_EBUR128_RUN_DEPENDS= ${_EBUR128_PKG}>=0:${_EBUR128_PORT} +_EBUR128_TEST_DEPENDS= ${_EBUR128_PKG}>=0:${_EBUR128_PORT} + +#=== Actual dependency creation === +. for _depend in ${_ebur128_depend} +${_depend:tu}_DEPENDS+= ${_EBUR128_${_depend:tu}_DEPENDS} +. endfor + +.endif diff --git a/Mk/Uses/electronfix.mk b/Mk/Uses/electronfix.mk new file mode 100644 index 000000000000..001bd64a81ad --- /dev/null +++ b/Mk/Uses/electronfix.mk @@ -0,0 +1,72 @@ +# Provide support for easy porting of Electron applications that are distributed +# in binary form. +# +# Feature: electronfix +# Usage: USES=electronfix:version +# +# An example usage might be: +# USES= electronfix:24 +# +# Variables, which can be set by the port: +# +# ELECTRONFIX_SYMLINK_FILES List of files to be symlinked from Electron distribution. +# +# ELECTRONFIX_MAIN_EXECUTABLE File name of the main executable to be replaced +# with the original Electron binary. + +.if !defined(_INCLUDE_USES_ELECTRONFIX_MK) +_INCLUDE_USES_ELECTRONFIX_MK= yes + +_ELECTRONFIX_MK_VALID_VERSIONS= 22 23 24 25 27 28 + +# === parse version arguments === +_ELECTRONFIX_MK_VERSION= # empty +. for _ver in ${_ELECTRONFIX_MK_VALID_VERSIONS} +. if ${electronfix_ARGS:M${_ver}} +. if !empty(_ELECTRONFIX_MK_VERSION) +BROKEN= USES=electronfix:${electronfix_ARGS} contains multiple version definitions +. else +_ELECTRONFIX_MK_VERSION= ${_ver} +. endif +. endif +. endfor + +. include "${.CURDIR}/../../devel/electron${_ELECTRONFIX_MK_VERSION}/Makefile.version" + +BUILD_DEPENDS+= electron${_ELECTRONFIX_MK_VERSION}:devel/electron${_ELECTRONFIX_MK_VERSION} +RUN_DEPENDS+= electron${_ELECTRONFIX_MK_VERSION}:devel/electron${_ELECTRONFIX_MK_VERSION} + +ELECTRONFIX_SYMLINK_FILES?= \ + chromedriver \ + libEGL.so \ + libGLESv2.so \ + libffmpeg.so \ + libvk_swiftshader.so \ + libvulkan.so \ + resources.pak \ + snapshot_blob.bin \ + v8_context_snapshot.bin + +_USES_install= 701:electronfix-post-install + +. if defined(DEVELOPER) +_USES_stage= 995:electronfix-stage-qa +. endif + +electronfix-post-install: + ${RM} ${STAGEDIR}${DATADIR}/chrome-sandbox + ${RM} ${STAGEDIR}${DATADIR}/libvulkan.so.1 +. for f in ${ELECTRONFIX_SYMLINK_FILES} + ${RM} ${STAGEDIR}${DATADIR}/${f} + ${LN} -s ${LOCALBASE}/share/electron${_ELECTRONFIX_MK_VERSION}/${f} ${STAGEDIR}${DATADIR}/${f} +. endfor +. ifdef ELECTRONFIX_MAIN_EXECUTABLE +# We have to copy the electron binary instead of symlinking + ${CP} ${LOCALBASE}/share/electron${_ELECTRONFIX_MK_VERSION}/electron ${STAGEDIR}${DATADIR}/${ELECTRONFIX_MAIN_EXECUTABLE} +. endif + +electronfix-stage-qa: + @${ECHO_CMD} "====> Checking for non-FreeBSD ELF binaries" + @${FIND} ${STAGEDIR}${DATADIR} -type f -exec brandelf {} ';' 2> /dev/null | grep -v "'FreeBSD' (9)" + +.endif diff --git a/Mk/Uses/elfctl.mk b/Mk/Uses/elfctl.mk new file mode 100644 index 000000000000..442f13db596f --- /dev/null +++ b/Mk/Uses/elfctl.mk @@ -0,0 +1,27 @@ +# Change an ELF binary's feature control note +# +# Feature: elfctl +# Usage: USES=elfctl +# Valid ARGS: none +# +# Variables +# +# ELF_FEATURES= featurelist:path/to/file1 \ +# featurelist:path/to/file1 \ + featurelist:path/to/file2 +# +# The file paths listed in ELF_FEATURES are relative to ${BUILD_WRKSRC}. +# + +.if !defined(_INCLUDE_USES_ELFCTL_MK) +_INCLUDE_USES_ELFCTL_MK= yes + +. if ! empty(ELF_FEATURES) +_USES_build+= 720:elfctl-post-build +elfctl-post-build: +. for feat in ${ELF_FEATURES} + ${ELFCTL} -i -e ${feat:C/:.*//} ${BUILD_WRKSRC}/${feat:C/.*://} +. endfor +. endif + +.endif diff --git a/Mk/Uses/elixir.mk b/Mk/Uses/elixir.mk index 7176d2aa6d3a..89d29aa9c46d 100644 --- a/Mk/Uses/elixir.mk +++ b/Mk/Uses/elixir.mk @@ -32,9 +32,9 @@ .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 @@ -42,7 +42,7 @@ 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_COMPILE?= ${SETENVI} ${WRK_ENV} ${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?= @@ -59,35 +59,35 @@ 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 @@ -99,26 +99,26 @@ do-install: ${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 31f9935351ec..d601390f0569 100644 --- a/Mk/Uses/emacs.mk +++ b/Mk/Uses/emacs.mk @@ -34,15 +34,15 @@ # This will prevent flavors. # # Variables, which can be read by ports: -# EMACS_CMD: Emacs command with full path (e.g. /usr/local/bin/emacs-27.1) +# EMACS_CMD: Emacs command with full path (e.g. /usr/local/bin/emacs-28.2) # 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/27.1) -# EMACS_MAJOR_VER: Emacs major version (e.g. 27) +# EMACS_LIBDIR_WITH_VER: Library directory without ${PREFIX} including version (e.g. share/emacs/28.2) +# 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. 27.1) -# EMACS_VERSION_SITE_LISPDIR: Include version (e.g. share/emacs/27.1/site-lisp) +# EMACS_VER: Emacs version (e.g. 28.2) +# EMACS_VERSION_SITE_LISPDIR: Include version (e.g. share/emacs/28.2/site-lisp) #------------------------------------------------------------------------------- # # MAINTAINER: emacs@FreeBSD.org @@ -56,81 +56,87 @@ _INCLUDE_USES_EMACS_MK= yes .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 -.for flavor in ${EMACS_FLAVORS_EXCLUDE} +# Sort the default to be first +. if defined(EMACS_DEFAULT) +FLAVORS:= ${EMACS_DEFAULT} ${FLAVORS:N${EMACS_DEFAULT}} +. 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*} -EMACS_VER= 29.0.50 +. if ${FLAVOR:Mdevel*} +EMACS_VER= 30.0.50 EMACS_PORTDIR= editors/emacs-devel -.else -EMACS_VER= 27.2 +. else +EMACS_VER= 29.3 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 ${FLAVOR:M*nox} -EMACS_PKGNAMESUFFIX= -${EMACS_PORT_NAME}_nox -.elif ${FLAVOR:Mcanna} -EMACS_PKGNAMESUFFIX= -${EMACS_PORT_NAME}_canna -.else -EMACS_PKGNAMESUFFIX= -${EMACS_PORT_NAME} -.endif +. if ${EMACS_FLAVOR} == "devel_full" +EMACS_PKGNAMESUFFIX= -emacs_devel +. elif ${EMACS_FLAVOR} == "devel_nox" +EMACS_PKGNAMESUFFIX= -emacs_devel_nox +. elif ${EMACS_FLAVOR} == "full" +EMACS_PKGNAMESUFFIX= +. else +EMACS_PKGNAMESUFFIX= -emacs_${EMACS_FLAVOR} +. 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} \ diff --git a/Mk/Uses/erlang.mk b/Mk/Uses/erlang.mk index c729ed007fc9..acdd6c031cdd 100644 --- a/Mk/Uses/erlang.mk +++ b/Mk/Uses/erlang.mk @@ -2,7 +2,7 @@ # # Feature: erlang # Usage: USES=erlang -# Valid ARGS: rebar, rebar3, or no argument (custom build) +# Valid ARGS: rebar, rebar3, enc or no argument (custom build) # # Additional variables: # @@ -39,29 +39,33 @@ PLIST_SUB+= VERSION="${PORTVERSION}" BUILD_DEPENDS+= erl:lang/erlang RUN_DEPENDS+= erl:lang/erlang -.if ${erlang_ARGS:Mrebar} +. if ${erlang_ARGS:Menc} +BUILD_DEPENDS+= enc:devel/erlang-native-compiler +. endif + +. 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: @@ -86,29 +90,29 @@ post-patch-erlang: 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) + @cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} REBAR_PROFILE=${REBAR_PROFILE} ${ERLANG_COMPILE} ${target} +. 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; \ @@ -117,20 +121,20 @@ do-install: ${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 @@ -9,7 +9,7 @@ .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 35e70f5079a9..cc4edd6f52ce 100644 --- a/Mk/Uses/fam.mk +++ b/Mk/Uses/fam.mk @@ -1,4 +1,4 @@ -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org # # Feature: fam # Usage: USES=fam or USES=fam:ARG @@ -19,41 +19,41 @@ _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} diff --git a/Mk/Uses/firebird.mk b/Mk/Uses/firebird.mk index 80c06442a251..a06dee9a7a3a 100644 --- a/Mk/Uses/firebird.mk +++ b/Mk/Uses/firebird.mk @@ -6,27 +6,21 @@ .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 +VALID_FIREBIRD_VER= 3.0 4.0 -.for v in ${FIREBIRD_DEFAULT} -. if ! ${VALID_FIREBIRD_VER:M$v} +. if ! ${VALID_FIREBIRD_VER:M${FIREBIRD_DEFAULT}} IGNORE= Invalid Firebird default version ${FIREBIRD_DEFAULT}; valid versions are ${VALID_FIREBIRD_VER} -. endif -.endfor - -.for w in ${FIREBIRD_VER} -. if ! ${VALID_FIREBIRD_VER:M$w} +. elif ! ${VALID_FIREBIRD_VER:M${FIREBIRD_VER}} IGNORE= Invalid Firebird version ${FIREBIRD_VER}; valid versions are ${VALID_FIREBIRD_VER} . endif -.endfor LIB_DEPENDS+= libfbclient.so:databases/firebird${FIREBIRD_VER:S/.//}-client diff --git a/Mk/Uses/fonts.mk b/Mk/Uses/fonts.mk index acc751b5be2f..0c3957410c17 100644 --- a/Mk/Uses/fonts.mk +++ b/Mk/Uses/fonts.mk @@ -40,34 +40,34 @@ .if !defined(_INCLUDE_USES_FONTS_MK) _INCLUDE_USES_FONTS_MK= yes -.if empty(fonts_ARGS) -fonts_ARGS= fcfontsdir -.endif +. if empty(fonts_ARGS) +fonts_ARGS= fontsdir +. endif -.if !empty(fonts_ARGS:Nfc:Nfontsdir:Nfcfontsdir: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:Mfcfontsdir) +. if !empty(fonts_ARGS:Mfc) || !empty(fonts_ARGS:Mfontsdir) RUN_DEPENDS+= fc-cache:x11-fonts/fontconfig -.endif -.if !empty(fonts_ARGS:Mfontsdir) || !empty(fonts_ARGS:Mfcfontsdir) +. 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:Nnone) +. 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..a7dc6717dce8 100644 --- a/Mk/Uses/fortran.mk +++ b/Mk/Uses/fortran.mk @@ -2,43 +2,42 @@ # # Feature: fortran # Usage: USES=fortran -# Valid ARGS: flang, gfortran (default) +# Valid ARGS: gfortran # # 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 -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 -IGNORE= USES=fortran: flang argument only available for amd64 -.endif -.elif ${fortran_ARGS} == gfortran +. if ${fortran_ARGS} == gfortran +. if empty(USE_GCC) _GCC_VER= ${GCC_DEFAULT:S/.//} +. else +_GCC_VER= ${_USE_GCC} +. endif BUILD_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} RUN_DEPENDS+= gfortran${_GCC_VER}:lang/gcc${_GCC_VER} F77= gfortran${_GCC_VER} +F90= gfortran${_GCC_VER} FC= gfortran${_GCC_VER} FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER} +F90FLAGS+= -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 + -L${LOCALBASE}/lib/gcc${_GCC_VER} +CFLAGS_F2018= -I${LOCALBASE}/include/gcc${_GCC_VER} +. 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}" +CONFIGURE_ENV+= F77="${F77}" F90="${FC}" FC="${FC}" \ + FFLAGS="${FFLAGS}" F90FLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" +MAKE_ENV+= F77="${F77}" F90="${FC}" FC="${FC}" \ + FFLAGS="${FFLAGS}" F90FLAGS="${FFLAGS}" FCFLAGS="${FCFLAGS}" .endif diff --git a/Mk/Uses/fpc.mk b/Mk/Uses/fpc.mk index 5371544865fa..dd9a3137e3f9 100644 --- a/Mk/Uses/fpc.mk +++ b/Mk/Uses/fpc.mk @@ -3,22 +3,14 @@ # # Feature: fpc # Usage: USES=fpc -# Valid ARGS: (none), run, base, all +# Valid ARGS: (none), run # -# 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). +# run - Free pascal compiler and units will be registered also +# as run dependencies. # # Example: # # USES+= fpc:run -# USE_FPC=gtk2 # .if !defined(_INCLUDE_USES_FPC_MK) @@ -27,13 +19,13 @@ 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} -IGNORE= Unknown argument for USES=fpc: ${fpc_ARGS:Nrun:Nbase:Nall} -.endif +. if ${fpc_ARGS:Nrun} +IGNORE= Unknown argument for USES=fpc: ${fpc_ARGS:Nrun} +. endif DEFAULT_FPC_VER= ${FPC_DEFAULT} # When adding a version, please keep the comment in @@ -41,176 +33,39 @@ DEFAULT_FPC_VER= ${FPC_DEFAULT} 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 + +. if !defined(WANT_FPC_DEVEL) +FPC_DEVELSUFFIX= # +. else +FPC_DEVELSUFFIX= -devel +. endif BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \ - ${PPNAME}:lang/fpc + ${LOCALBASE}/lib/fpc/${FPC_VER}/${PPNAME}:lang/fpc${FPC_DEVELSUFFIX} + +. if ${fpc_ARGS:Mrun} +RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \ + ${LOCALBASE}/lib/fpc/${FPC_VER}/${PPNAME}:lang/fpc${FPC_DEVELSUFFIX} +. endif 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} -USE_FPC= gdbint graph httpd22 httpd24 ibase mysql odbc oracle pasjpeg \ - postgres pthreads regexpr sqlite -.endif - -.if ${fpc_ARGS:Mall} -USE_FPC= ${_FPC_ALL_UNITS} -.endif - -.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 - -# 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}} != "" -BUILD_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} -. if ${fpc_ARGS:Mrun} || ${fpc_ARGS:Mbase} -RUN_DEPENDS+= ${MKINSTDIR}/${UNIT}.fpm:${${UNIT:S/-/_/}_UNIT} -. endif -. endif -. endfor .endif diff --git a/Mk/Uses/fuse.mk b/Mk/Uses/fuse.mk index 1e63e2b5ed6e..9250a86e2429 100644 --- a/Mk/Uses/fuse.mk +++ b/Mk/Uses/fuse.mk @@ -3,22 +3,22 @@ # Feature: fuse # Usage: USES=fuse[:version] # Valid ARGS: 2 [default], 3 -# MAINTAINER: portmgr@FreeBSD.org +# 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 b92a2dc21b96..e085c45fcab0 100644 --- a/Mk/Uses/gem.mk +++ b/Mk/Uses/gem.mk @@ -4,36 +4,40 @@ # Usage: USES=gem[:noautoplist] # Valid args: noautoplist Don't generate the plist automatically # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ruby@FreeBSD.org .if !defined(_INCLUDE_USES_GEM_MK) _INCLUDE_USES_GEM_MK= yes -_valid_ARGS= noautoplist +_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 +# "USES=gem" implies "USES=ruby" +.include "${USESDIR}/ruby.mk" PKGNAMEPREFIX?= rubygem- EXTRACT_SUFX= .gem -EXTRACT_ONLY= -DIST_SUBDIR= rubygem +# disabled to be able that extract other archives into the gem folder like cargo archives which are required to compile gems that require rust +#EXTRACT_ONLY?= +BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems EXTRACT_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems +RUN_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 +DOC_DIR= ${GEMS_BASE_DIR}/doc EXT_DIR= ${GEMS_BASE_DIR}/extensions +GEMS_DIR= ${GEMS_BASE_DIR}/gems +PLUGINS_DIR= ${GEMS_BASE_DIR}/plugins +SPEC_DIR= ${GEMS_BASE_DIR}/specifications GEM_NAME?= ${DISTNAME} GEM_LIB_DIR?= ${GEMS_DIR}/${GEM_NAME} GEM_DOC_DIR?= ${DOC_DIR}/${GEM_NAME} @@ -47,13 +51,13 @@ 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_BASE_DIR="${GEMS_BASE_DIR}" \ GEMS_DIR="${GEMS_DIR}" \ DOC_DIR="${DOC_DIR}" \ CACHE_DIR="${CACHE_DIR}" \ SPEC_DIR="${SPEC_DIR}" \ EXT_DIR="${EXT_DIR}" \ - PORT="${PORTNAME}-${PORTVERSION}" \ + PLUGINS_DIR="${PLUGINS_DIR}" \ GEM_NAME="${GEM_NAME}" \ GEM_LIB_DIR="${GEM_LIB_DIR}" \ GEM_DOC_DIR="${GEM_DOC_DIR}" \ @@ -61,48 +65,57 @@ PLIST_SUB+= PORTVERSION="${PORTVERSION}" \ GEM_CACHE="${GEM_CACHE}" \ EXTRACT_SUFX="${EXTRACT_SUFX}" -RUBYGEMBIN= ${LOCALBASE}/bin/gem${RUBY_VER:S/.//} +RUBYGEMBIN= ${LOCALBASE}/bin/gem -. if defined(DISTFILES) -GEMFILES= ${DISTFILES:C/:[^:]+$//} -. else -GEMFILES= ${DISTNAME}${EXTRACT_SUFX} -. endif +. if defined(GEMS_SKIP_SUBDIR) +# do not define a DIST_SUBDIR, currently required to have cargo archives available in the gem source directory to be able to compile it +#DIST_SUBDIR= +. else +DIST_SUBDIR= rubygem +. endif + +. if defined(DISTFILES) +# this should maybe be reworked, as if a gem port is used together with cargo archives, the DISTFILES also includes the cargo archives +# this is currently overwritten in the port that requires this +# the cargo archives should be filtered out here or better we should only have here gem archives included +GEMFILES?= ${DISTFILES:C/:[^:]+$//} +. else +GEMFILES?= ${DISTNAME}${EXTRACT_SUFX} +. 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) -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 \ +_USES_extract+= 590:gem-extract +gem-extract: + @${SETENVI} ${WRK_ENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} + @(cd ${BUILD_WRKSRC}; if ! ${SETENVI} ${WRK_ENV} ${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 -.if !target(do-build) +. if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMSPEC} ; then \ + @(cd ${BUILD_WRKSRC}; if ! ${SETENVI} ${WRK_ENV} ${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}) + (cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${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 @@ -110,25 +123,30 @@ do-install: ${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} -.if !${PORT_OPTIONS:MDOCS} + ${RMDIR} ${STAGEDIR}${PREFIX}/${PLUGINS_DIR} 2> /dev/null || ${TRUE} +. 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 -.endif + @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 diff --git a/Mk/Uses/gettext-runtime.mk b/Mk/Uses/gettext-runtime.mk index 50e16fe9961a..1d0f0b8900b9 100644 --- a/Mk/Uses/gettext-runtime.mk +++ b/Mk/Uses/gettext-runtime.mk @@ -4,23 +4,24 @@ # Usage: USES=gettext-runtime or USES=gettext-runtime:ARGS # Valid ARGS: lib (default), build, run # -# MAINTAINER: portmgr@FreeBSD.org +# 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} +BUILD_DEPENDS+= gettext-runtime>=0.22_1:devel/gettext-runtime LIB_DEPENDS+= libintl.so:devel/gettext-runtime -.endif -.if ${gettext-runtime_ARGS:Mbuild} -BUILD_DEPENDS+= gettext:devel/gettext-runtime -.endif -.if ${gettext-runtime_ARGS:Mrun} -RUN_DEPENDS+= gettext:devel/gettext-runtime -.endif +. endif +. if ${gettext-runtime_ARGS:Mbuild} +BUILD_DEPENDS+= gettext-runtime>=0.22_1:devel/gettext-runtime +. endif +. if ${gettext-runtime_ARGS:Mrun} +RUN_DEPENDS+= gettext-runtime>=0.22_1:devel/gettext-runtime +. endif .endif diff --git a/Mk/Uses/gettext-tools.mk b/Mk/Uses/gettext-tools.mk index e05602cf7dec..948a505ed8b9 100644 --- a/Mk/Uses/gettext-tools.mk +++ b/Mk/Uses/gettext-tools.mk @@ -4,20 +4,20 @@ # Usage: USES=gettext-tools or USES=gettext-tools:ARGS # Valid ARGS: build (default), run # -# MAINTAINER: portmgr@FreeBSD.org +# 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 ca23f60d5cb2..bedcbfcce669 100644 --- a/Mk/Uses/gettext.mk +++ b/Mk/Uses/gettext.mk @@ -4,14 +4,14 @@ # Feature: gettext # Usage: USES=gettext # -# MAINTAINER: portmgr@FreeBSD.org +# 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" diff --git a/Mk/Uses/ghostscript.mk b/Mk/Uses/ghostscript.mk index b59bbc28e034..8a04e0bb1112 100644 --- a/Mk/Uses/ghostscript.mk +++ b/Mk/Uses/ghostscript.mk @@ -2,22 +2,21 @@ # # Feature: ghostscript # Usage: USES=ghostscript or USES=ghostscript:args -# Valid ARGS: <version>, build, run, test, x11 +# Valid ARGS: <version>, build, lib, run, test, x11 # -# version The chooseable versions are 7, 8, 9 and agpl. If no version is -# specified version agpl is selected. +# version The chooseable versions are 10 only. If no version is +# specified version 10 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. +# USES=ghostscript:10 # Use Ghostscript 10 +# USES=ghostscript:run # Use to set default Ghostscript as a run dependency +# USES=ghostscript:10,build # Use Ghostscript 10 as a build dependency. +# +# build Ghostscript is used as BUILD_DEPENDS +# lib Ghostscript is used as LIB_DEPENDS +# run Ghostscript is used as RUN_DEPENDS +# test Ghostscript is used as TEST_DEPENDS # # 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. @@ -30,76 +29,69 @@ _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_VERSION= 10 -_GS_ARGS= ${ghostscript_ARGS} +_GS_ARGS= ${ghostscript_ARGS} -.if ${_GS_ARGS:N[789]:Nagpl:Nx11:Nbuild:Nrun:Ntest} +. if ${_GS_ARGS:N10:Nbuild:Nlib:Nrun:Ntest:Nx11} IGNORE?= Unknown ghostscript argument ${_GS_ARGS} -.endif +. endif -.if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl} +. if ${GHOSTSCRIPT_DEFAULT:N10} 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_LIB_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:Mlib} +_GS_LIB_DEP= yes +. 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 +# The port does not specify a build, lib, 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_LIB_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} -_GS_SELECTED?= 9 -.elif ${_V:Magpl} -_GS_SELECTED?= 9-agpl -.elif ${_V:M8} -_GS_SELECTED?= 8 -.elif ${_V:M7} -_GS_SELECTED?= 7 -.endif -.endfor +. if ${_V:M10} +_GS_SELECTED?= 10 +. endif +. endfor -# Resolve minor version number for X11.so library. -.if !empty(_GS_SELECTED:M9-agpl) -_GS_VERSION_MINOR= 9.16_2 -.elif !empty(_GS_SELECTED:M9) -_GS_VERSION_MINOR= 9.06_11 -.elif !empty(_GS_SELECTED:M8) -_GS_VERSION_MINOR= 8.71_19 -.elif !empty(_GS_SELECTED:M7) -_GS_VERSION_MINOR= 7.07_32 -.endif +. if !empty(_GS_SELECTED:M10) +_GS_FULL_VERSION= 10.02.0 +. endif # dependencies -_GS_PORT= ghostscript${_GS_SELECTED}-base -_GS_X11_PORT= ghostscript${_GS_SELECTED}-x11 +_GS_LIB= libgs.so +_GS_PKGNAME= ghostscript${_GS_SELECTED} +_GS_PORT= print/ghostscript${_GS_SELECTED} -.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} -${type}_DEPENDS+= ${_GS_X11_PORT}>=${_GS_VERSION_MINOR}:print/${_GS_X11_PORT} -.endif -.endif -.endfor +. for type in BUILD LIB RUN TEST +. if defined(_GS_${type}_DEP) +. if ${type:MLIB} +${type}_DEPENDS+= ${_GS_LIB}:${_GS_PORT} +. else +${type}_DEPENDS+= ${_GS_PKGNAME}>=${_GS_FULL_VERSION}:${_GS_PORT} +. endif +. endif +. endfor .endif # _INCLUDE_USES_GHOSTSCRIPT_MK diff --git a/Mk/Uses/gl.mk b/Mk/Uses/gl.mk index 8ecd95a4403a..252fb80921be 100644 --- a/Mk/Uses/gl.mk +++ b/Mk/Uses/gl.mk @@ -25,33 +25,30 @@ _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 -# USES+=xorg does not provide any functionality, it just silences an error -# message about USES=xorg not being set -.if defined(USE_XORG) && !empty(USE_XORG) -USES+= 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 601d8fbd4801..3aa9bae0efac 100644 --- a/Mk/Uses/gmake.mk +++ b/Mk/Uses/gmake.mk @@ -3,16 +3,16 @@ # Feature: gmake # Usage: USES=gmake # -# MAINTAINER: portmgr@FreeBSD.org +# 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 +BUILD_DEPENDS+= gmake>=4.4.1:devel/gmake CONFIGURE_ENV+= MAKE=gmake MAKE_CMD= gmake diff --git a/Mk/Uses/gnome.mk b/Mk/Uses/gnome.mk index 42eaaa78a8c6..1628f3b8fb09 100644 --- a/Mk/Uses/gnome.mk +++ b/Mk/Uses/gnome.mk @@ -53,24 +53,23 @@ _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 \ - referencehack gnomemimedata \ - gnomeprefix + gnomemimedata gnomeprefix # GNOME 2 components _USE_GNOME_ALL+= atk cairo \ - gdkpixbuf2 gconf2 glib20 \ + gdkpixbuf2 gdkpixbuf2xlib gconf2 glib20 \ gtk-update-icon-cache gtk20 \ gtksharp20 gtksourceview2 gvfs libartlgpl2 \ libglade2 libgnomecanvas \ - libgsf libidl librsvg2 libwnck \ + libgsf libidl librsvg2 \ libxml2 libxslt \ - orbit2 pango pangox-compat \ + pango pangox-compat \ vte # GNOME 3 components @@ -81,23 +80,17 @@ _USE_GNOME_ALL+=dconf evolutiondataserver3 gnomecontrolcenter3 gnomedesktop3 \ pygobject3 vte3 # GNOME 40 components -_USE_GNOME_ALL+=gtk40 libadwaita +_USE_GNOME_ALL+=gtk40 libadwaita gtksourceview5 # C++ bindings -_USE_GNOME_ALL+=atkmm cairomm gconfmm26 glibmm gtkmm24 \ +_USE_GNOME_ALL+=atkmm cairomm gconfmm26 glibmm glibmm26 gtkmm24 \ gtkmm30 gtksourceviewmm3 libgdamm5 libxml++26 libsigc++20 \ - pangomm + libsigc++30 pangomm # glib-mkenums often fails with C locale # https://gitlab.gnome.org/GNOME/glib/issues/1430 USE_LOCALE?= en_US.UTF-8 -GNOME_MAKEFILEIN?= Makefile.in -SCROLLKEEPER_DIR= /var/db/rarian - -referencehack_PRE_PATCH= ${FIND} ${WRKSRC} -name "Makefile.in" -type f | ${XARGS} ${FRAMEWORK_REINPLACE_CMD} -e \ - "s|test \"\$$\$$installfiles\" = '\$$(srcdir)/html/\*'|:|" - GNOME_HTML_DIR?= ${PREFIX}/share/doc GCONF_CONFIG_OPTIONS?= merged GCONF_CONFIG_DIRECTORY?=etc/gconf/gconf.xml.defaults @@ -126,6 +119,9 @@ gconfmm26_USE_GNOME_IMPL= glibmm gconf2 glibmm_LIB_DEPENDS= libglibmm-2.4.so:devel/glibmm glibmm_USE_GNOME_IMPL= libsigc++20 glib20 +glibmm26_LIB_DEPENDS= libglibmm-2.68.so:devel/glibmm26 +glibmm26_USE_GNOME_IMPL= libsigc++30 glib20 + gsound_BUILD_DEPENDS= gsound-play:audio/gsound gsound_LIB_DEPENDS= libgsound.so:audio/gsound gsound_RUN_DEPENDS= gsound-play:audio/gsound @@ -145,6 +141,8 @@ libgdamm5_USE_GNOME_IMPL= libgda5 glibmm libsigc++20_LIB_DEPENDS= libsigc-2.0.so:devel/libsigc++20 +libsigc++30_LIB_DEPENDS= libsigc-3.0.so:devel/libsigc++30 + pangomm_LIB_DEPENDS= libpangomm-1.4.so:x11-toolkits/pangomm pangomm_USE_GNOME_IMPL= pango glibmm cairomm @@ -154,7 +152,7 @@ gnomemimedata_RUN_DEPENDS=${LOCALBASE}/libdata/pkgconfig/gnome-mime-data-2.0.pc: glib20_LIB_DEPENDS= libglib-2.0.so:devel/glib20 \ libintl.so:devel/gettext-runtime -atk_LIB_DEPENDS= libatk-1.0.so:accessibility/atk +atk_LIB_DEPENDS= libatk-1.0.so:accessibility/at-spi2-core atk_USE_GNOME_IMPL= glib20 dconf_BUILD_DEPENDS= dconf:devel/dconf @@ -171,6 +169,9 @@ pangox-compat_USE_GNOME_IMPL= glib20 pango gdkpixbuf2_LIB_DEPENDS= libgdk_pixbuf-2.0.so:graphics/gdk-pixbuf2 gdkpixbuf2_USE_GNOME_IMPL=glib20 +gdkpixbuf2xlib_LIB_DEPENDS= libgdk_pixbuf_xlib-2.0.so:graphics/gdk-pixbuf2-xlib +gdkpixbuf2xlib_USE_GNOME_IMPL= glib20 gdkpixbuf2 + 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 @@ -189,9 +190,6 @@ GTK4_VERSION= 4.0.0 libidl_LIB_DEPENDS= libIDL-2.so:devel/libIDL libidl_USE_GNOME_IMPL= glib20 -orbit2_LIB_DEPENDS= libORBit-2.so:devel/ORBit2 -orbit2_USE_GNOME_IMPL= libidl - libglade2_LIB_DEPENDS= libglade-2.0.so:devel/libglade2 libglade2_USE_GNOME_IMPL=libxml2 gtk20 @@ -211,7 +209,7 @@ 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= orbit2 libxml2 gtk20 +gconf2_USE_GNOME_IMPL= libxml2 libgnomecanvas_LIB_DEPENDS= libgnomecanvas-2.so:graphics/libgnomecanvas libgnomecanvas_USE_GNOME_IMPL= libglade2 libartlgpl2 @@ -221,9 +219,6 @@ 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 @@ -237,16 +232,16 @@ 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 -librsvg2_USE_GNOME_IMPL=libgsf gdkpixbuf2 pango +. endif +librsvg2_USE_GNOME_IMPL=gdkpixbuf2 pango nautilus3_LIB_DEPENDS= libnautilus-extension.so:x11-fm/nautilus nautilus3_USE_GNOME_IMPL=gnomedesktop3 libxml2 @@ -272,6 +267,9 @@ 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 @@ -313,93 +311,93 @@ 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, +# 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 @@ -407,13 +405,13 @@ SUB_LIST+= GNOME_SUBR=${GNOME_SUBR} .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 \ @@ -423,20 +421,13 @@ gnome-post-gconf-schemas: ${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 -# we put the @glib-schemas behind the plist schema entry, because it compiles files -# in the directory. So we should remove the port file first before recompiling. -.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 - @${ECHO_CMD} "@glib-schemas" >> ${TMPPLIST}; -.endif +. if defined(GLIB_SCHEMAS) +PLIST_FILES+= ${GLIB_SCHEMAS:C,^,share/glib-2.0/schemas/,} +. endif -.if defined(INSTALLS_OMF) +. if defined(INSTALLS_OMF) _USES_install+= 690:gnome-post-omf gnome-post-omf: @for i in `${GREP} "\.omf$$" ${TMPPLIST}`; do \ @@ -445,7 +436,7 @@ gnome-post-omf: ${ECHO_CMD} "@postunexec scrollkeeper-uninstall -q %D/$${i} 2>/dev/null || /usr/bin/true" \ >> ${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 @@ -31,43 +31,43 @@ 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. @@ -77,17 +77,17 @@ 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 81946128114a..e78dbe33b7a5 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -3,9 +3,10 @@ # # Feature: go # Usage: USES=go -# Valid ARGS: (none), modules, no_targets, run +# Valid ARGS: (none), N.NN, N.NN-devel, modules, no_targets, run # -# (none) Setup GOPATH and build in GOPATH mode. +# (none) Setup GOPATH and build in GOPATH mode using default Go version. +# N.NN[-devel] Specify Go version # 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 @@ -19,7 +20,7 @@ # # GO_MODULE # The name of the module as specified by "module" directive in go.mod. -# In most cases, this is the only requred variable for ports that +# In most cases, this is the only required variable for ports that # use Go modules. # # GO_PKGNAME @@ -52,102 +53,121 @@ # 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 +# MAINTAINER: go@FreeBSD.org .if !defined(_INCLUDE_USES_GO_MK) _INCLUDE_USES_GO_MK= yes -.if !empty(go_ARGS:Nmodules:Nno_targets:Nrun) -IGNORE= USES=go has invalid arguments: ${go_ARGS:Nmodules:Nno_targets:Nrun} -.endif +# When adding a version, please keep the comment in +# Mk/bsd.default-versions.mk in sync. +GO_VALID_VERSIONS= 1.20 1.21 1.22 1.23-devel + +# Check arguments sanity +. if !empty(go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun) +IGNORE= USES=go has invalid arguments: ${go_ARGS:N[1-9].[0-9][0-9]:N*-devel:Nmodules:Nno_targets:Nrun} +. endif + +# Parse Go version +GO_VERSION= ${go_ARGS:Nmodules:Nno_targets:Nrun:C/^$/${GO_DEFAULT}/} +. if empty(GO_VALID_VERSIONS:M${GO_VERSION}) +IGNORE?= USES=go has invalid version number: ${GO_VERSION} +. endif +GO_SUFFIX= ${GO_VERSION:S/.//:C/.*-devel/-devel/} +GO_PORT= lang/go${GO_SUFFIX} # 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(PIE_UNSAFE) && defined(WITH_PIE) && ${ARCH} == amd64 +GO_BUILDFLAGS+= -buildmode=pie +. else +GO_BUILDFLAGS+= -buildmode=exe +. endif +GO_BUILDFLAGS+= -v -trimpath +. if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*) GO_BUILDFLAGS+= -ldflags=-s -.endif -GO_TESTFLAGS+= -v +. endif +GO_BUILDFLAGS+= -buildvcs=false +GO_TESTFLAGS+= -v -buildvcs=false 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_CMD= ${LOCALBASE}/bin/go${GO_SUFFIX} GO_WRKDIR_BIN= ${WRKDIR}/bin GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \ CGO_CFLAGS="${CGO_CFLAGS}" \ CGO_LDFLAGS="${CGO_LDFLAGS}" \ - GOARM=${GOARM} + GOAMD64=${GOAMD64} \ + GOARM=${GOARM} \ + GOTMPDIR="${WRKDIR}" -.if ${go_ARGS:Mmodules} +. if ${go_ARGS:Mmodules} GO_BUILDFLAGS+= -mod=vendor GO_TESTFLAGS+= -mod=vendor GO_GOPATH= ${DISTDIR}/go/${PKGORIGIN:S,/,_,g} +GO_MODCACHE= file://${GO_GOPATH}/pkg/mod/cache/download 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/} +. if empty(DISTFILES:Mgo.mod\:*) && empty(DISTFILES:Mgo.mod) +# Unless already setup for download by other means, +# arrange to pull go.mod and distribution archive from GOPROXY. 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} +. endif +EXTRACT_ONLY?= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} +DIST_SUBDIR= go/${PKGORIGIN:S,/,_,g}/${DISTNAME} 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 - -GO_PORT?= lang/go +. endif BUILD_DEPENDS+= ${GO_CMD}:${GO_PORT} -.if ${go_ARGS:Mrun} +BINARY_ALIAS+= go=go${GO_SUFFIX} gofmt=gofmt${GO_SUFFIX} +. if ${go_ARGS:Mrun} RUN_DEPENDS+= ${GO_CMD}:${GO_PORT} -.endif +. endif _USES_POST+= go .endif # !defined(_INCLUDE_USES_GO_MK) @@ -155,26 +175,47 @@ _USES_POST+= go .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) -post-fetch: +. if ${go_ARGS:Mmodules} && defined(GO_MODULE) +_USES_fetch+= 200:go-pre-fetch 800:go-post-fetch +# Check that pkg can be installed or is already available, +# otherwise it will be impossible to install go and fetch dependencies. +go-pre-fetch: +. if defined(CLEAN_FETCH_ENV) && !exists(${PKG_BIN}) + @${ECHO_MSG} "===> CLEAN_FETCH_ENV is defined, cannot download Go modules (pkg and go are required)"; \ + exit 1 +. endif +# Download all required build dependencies to GOMODCACHE. +go-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 + ${SETENVI} ${WRK_ENV} \ + ${HTTP_PROXY:DHTTP_PROXY=${HTTP_PROXY:Q}} \ + ${http_proxy:Dhttp_proxy=${http_proxy:Q}} \ + ${HTTPS_PROXY:DHTTPS_PROXY=${HTTPS_PROXY:Q}} \ + ${https_proxy:Dhttps_proxy=${https_proxy:Q}} \ + ${NO_PROXY:DNO_PROXY=${NO_PROXY:Q}} \ + ${no_proxy:Dno_proxy=${no_proxy:Q}} \ + ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all) +. endif -.if !target(post-extract) -. if empty(go_ARGS) -post-extract: +_USES_extract+= 800:go-post-extract +. if ${go_ARGS:Mmodules} && defined(GO_MODULE) +# Module-aware build mode. Although not strictly necessary (all build dependencies should be +# already in MODCACHE), vendor them so we can patch them if needed. +go-post-extract: + @${ECHO_MSG} "===> Tidying ${GO_MODNAME} dependencies"; + @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod tidy -e) + @${ECHO_MSG} "===> Vendoring ${GO_MODNAME} dependencies"; + @(cd ${GO_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=${GO_MODCACHE} ${GO_CMD} mod vendor -e) +. else +# Legacy (GOPATH) build mode, setup directory structure expected by Go for the main module. +go-post-extract: @${MKDIR} ${GO_WRKSRC:H} @${LN} -sf ${WRKSRC} ${GO_WRKSRC} -. elif ${go_ARGS:Mmodules} && defined(GO_MODULE) -post-extract: - @(cd ${GO_WRKSRC}; ${SETENV} ${GO_ENV} GOPROXY=off ${GO_CMD} mod vendor) -. 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 \ @@ -183,13 +224,13 @@ do-build: 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} \ + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${GO_ENV} GOMAXPROCS=${MAKE_JOBS_NUMBER} 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} | \ @@ -202,32 +243,36 @@ do-install: ${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}; \ + ${SETENVI} ${WRK_ENV} ${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}) @${ECHO_MSG} "===> Cleaning Go module cache" - @${SETENV} ${GO_ENV} ${GO_CMD} clean -modcache + @${SETENVI} ${WRK_ENV} ${GO_ENV} ${GO_CMD} clean -modcache +. else + @${ECHO_MSG} "===> Skipping since ${GO_CMD} is not installed" +. 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 \ @@ -238,14 +283,14 @@ gomod-vendor-deps: fi gomod-vendor: gomod-vendor-deps patch - @cd ${WRKSRC}; ${SETENV} ${GO_ENV} ${GO_CMD} mod vendor; \ + @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${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; \ + @cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${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 @@ -8,24 +8,24 @@ .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} diff --git a/Mk/Uses/grantlee.mk b/Mk/Uses/grantlee.mk index 20c66ee090ad..f050981966f1 100644 --- a/Mk/Uses/grantlee.mk +++ b/Mk/Uses/grantlee.mk @@ -31,7 +31,7 @@ _INCLUDE_USES_GRANTLEE_MK= YES GRANTLEE_SUPPORTED= 5 -GRANTLEE5_VER= 5.2.0 +GRANTLEE5_VER= 5.3.0 GRANTLEE5_LIB_DEPEND= libGrantlee_Templates.so:devel/grantlee5 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 @@ -77,15 +77,15 @@ _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 @@ -94,66 +94,66 @@ _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}" \ diff --git a/Mk/Uses/gstreamer.mk b/Mk/Uses/gstreamer.mk new file mode 100644 index 000000000000..8317a320f275 --- /dev/null +++ b/Mk/Uses/gstreamer.mk @@ -0,0 +1,436 @@ +# +# gstreamer.mk - Support for gstreamer-plugins-based ports. +# +# Usage: +# USES= gstreamer[:version] +# USE_GSTREAMER= [list of components] +# +# Supported versions: 1 -- default +# # + +.if ! defined(_INCLUDE_USES_GSTREAMER_MK) +_INCLUDE_USES_GSTREAMER_MK= YES + +#== Argument handling + +# Preparations to support multiple gstreamer versions +_GST_VER_SUPPORTED= 1 +_GST_VER_DEFAULT= 1 +_GST_VER= # +. for ver in ${_GST_VER_SUPPORTED:O:u} +. if ${gstreamer_ARGS:M${ver}} +. if empty(_GST_VER) +_GST_VER= ${ver} +. else +INGORE= Incorrect USES=gstreamer:${gstramer_ARGS} - multiple versions defined +. endif +. endif +. endfor + +. if empty(_GST_VER) +_GST_VER= ${_GST_VER_DEFAULT} +. endif + +#== Component setup + +_GST1_VERSION= 1.22.10 +_GST1_LIB_VER= 1.0 + +_GST1_CATEGORIES= audio comms devel ftp graphics multimedia net security \ + sysutils www x11 x11-toolkits +_GST1_PLUGINS_audio= a52dec amrnb amrwbdec bs2b cdparanoia chromaprint faac \ + faad flac flite gme gsm jack ladspa lame lv2 modplug \ + mpg123 musepack ogg openmpt opus pulse shout2 sidplay \ + sndfile sndio soundtouch speex taglib twolame vorbis \ + wavpack webrtcdsp +_GST1_PLUGINS_comms= spandsp +_GST1_PLUGINS_devel= soup +_GST1_PLUGINS_ftp= curl +_GST1_PLUGINS_graphics= aalib cairo gdkpixbuf gl jpeg kms libcaca libvisual \ + opencv openexr openjpeg png qt rsvg vulkan webp zbar +_GST1_PLUGINS_multimedia= aom assrender bad dash dts dv dvdread \ + editing-services gnonlin good hls libav libde265 \ + mpeg2dec mpeg2enc mplex mm openh264 resindvd \ + smoothstreaming theora ttml ugly v4l2 vpx x264 x265 \ + zxing +_GST1_PLUGINS_net= srtp +_GST1_PLUGINS_security= dtls +_GST1_PLUGINS_sysutils= cdio +_GST1_PLUGINS_www= neon +_GST1_PLUGINS_x11= x ximagesrc +_GST1_PLUGINS_x11-toolkits= gtk pango + +# == Unversioned information + +# Gather all available plugins for the chosen version +_GST_PLUGINS_BASE= bad core good ugly libgstreamer plugins +_GST_PLUGINS_VER:= ${_GST${_GST_VER}_CATEGORIES:S/^/\${_GST${_GST_VER}_PLUGINS_/:S/$/}/} + +_GST_VERSION= ${_GST${_GST_VER}_VERSION} + +# List of all available components +_USE_GSTREAMER_ALL= ${_GST_PLUGINS_BASE} \ + ${_GST_PLUGINS_VER} + +#== Dependency setup + +#==== Top-level components + +gst-plugins_PORT= multimedia/gstreamer${_GST_VER}-plugins +gst-plugins_IMPL= # empty +gst-plugins_SUFFIX= # + +gst-bad_PORT= multimedia/gstreamer${_GST_VER}-plugins-bad +gst-bad_IMPL= # + +gst-core_PORT= multimedia/gstreamer${_GST_VER}-plugins-core +gst-core_IMPL= # +gst-core_GST1_VERSION= 1.16 +gst-core_VERSION= ${gst-core_GST${_GST_VER}_VERSION} + +gst-good_PORT= multimedia/gstreamer${_GST_VER}-plugins-good +gst-good_IMPL= # + +gst-ugly_PORT= multimedia/gstreamer${_GST_VER}-plugins-ugly +gst-ugly_IMPL= # + +gst-libgstreamer_LIB= libgstreamer${_GST${_GST_VER}_LIB_VER:D-${_GST${_GST_VER}_LIB_VER}}.so +gst-libgstreamer_PORT= multimedia/gstreamer${_GST_VER} + +#==== Audio Plugins Section + +gst-a52dec_PORT= audio/gstreamer${_GST_VER}-plugins-a52dec +gst-a52dec_IMPL= ugly + +gst-amrnb_PORT= audio/gstreamer${_GST_VER}-plugins-amrnb +gst-amrnb_IMPL= ugly + +gst-amrwbdec_PORT= audio/gstreamer${_GST_VER}-plugins-amrwbdec +gst-amrwbdec_IMPL= ugly + +gst-bs2b_PORT= audio/gstreamer${_GST_VER}-plugins-bs2b +gst-bs2b_IMPL= bad + +gst-cdparanoia_PORT= audio/gstreamer${_GST_VER}-plugins-cdparanoia +gst-cdparanoia_IMPL= # + +gst-chromaprint_PORT= audio/gstreamer${_GST_VER}-plugins-chromaprint +gst-chromeprint_IMPL= bad + +gst-faac_PORT= audio/gstreamer${_GST_VER}-plugins-faac +gst-faac_IMPL= bad + +gst-faad_PORT= audio/gstreamer${_GST_VER}-plugins-faad +gst-faad_IMPL= bad + +gst-flac_PORT= audio/gstreamer${_GST_VER}-plugins-flac +gst-flac_IMPL= good + +gst-flite_PORT= audio/gstreamer${_GST_VER}-plugins-flite +gst-flite_IMPL= bad + +gst-gme_PORT= audio/gstreamer${_GST_VER}-plugins-gme +gst-gme_IMPL= bad + +gst-gsm_PORT= audio/gstreamer${_GST_VER}-plugins-gsm +gst-gsm_IMPL= bad + +gst-jack_PORT= audio/gstreamer${_GST_VER}-plugins-jack +gst-jack_IMPL= good + +gst-ladspa_PORT= audio/gstreamer${_GST_VER}-plugins-ladspa +gst-ladspa_IMPL= bad + +gst-lame_PORT= audio/gstreamer${_GST_VER}-plugins-lame +gst-lame_IMPL= ugly + +gst-lv2_PORT= audio/gstreamer${_GST_VER}-plugins-lv2 +gst-lv2_IMPL= bad + +gst-modplug_PORT= audio/gstreamer${_GST_VER}-plugins-modplug +gst-modplug_IMPL= bad + +gst-mpg123_PORT= audio/gstreamer${_GST_VER}-plugins-mpg123 +gst-mpg123_IMPL= ugly + +gst-musepack_PORT= audio/gstreamer${_GST_VER}-plugins-musepack +gst-musepack_IMPL= bad + +gst-neon_PORT= www/gstreamer${_GST_VER}-plugins-neon +gst-neon_IMPL= bad + +gst-ogg_PORT= audio/gstreamer${_GST_VER}-plugins-ogg +gst-ogg_IMPL= # + +gst-opus_PORT= audio/gstreamer${_GST_VER}-plugins-opus +gst-opus_IMPL= # + +gst-pulse_PORT= audio/gstreamer${_GST_VER}-plugins-pulse +gst-pulse_IMPL= good + +gst-shout2_PORT= audio/gstreamer${_GST_VER}-plugins-shout2 +gst-shout2_IMPL= good + +gst-sidplay_PORT= audio/gstreamer${_GST_VER}-plugins-sidplay +gst-sidplay_IMPL= ugly + +gst-sndio_PORT= audio/gstreamer${_GST_VER}-plugins-sndio +gst-sndio_IMPL= # +gst-sndio_VERSION= 1.8.0 + +gst-sndfile_PORT= audio/gstreamer${_GST_VER}-plugins-sndfile +gst-sndfile_IMPL= bad + +gst-soundtouch_PORT= audio/gstreamer${_GST_VER}-plugins-soundtouch +gst-soundtouch_IMPL= bad + +gst-speex_PORT= audio/gstreamer${_GST_VER}-plugins-speex +gst-speex_IMPL= good + +gst-taglib_PORT= audio/gstreamer${_GST_VER}-plugins-taglib +gst-taglib_IMPL= good + +gst-twolame_PORT= audio/gstreamer${_GST_VER}-plugins-twolame +gst-twolame_IMPL= ugly + +gst-vorbis_PORT= audio/gstreamer${_GST_VER}-plugins-vorbis +gst-vorbis_IMPL= # + +gst-wavpack_PORT= audio/gstreamer${_GST_VER}-plugins-wavpack +gst-wavpack_IMPL= good + +gst-webrtcdsp_PORT= audio/gstreamer${_GST_VER}-plugins-webrtcdsp +gst-webrtcdsp_IMPL= bad + +#==== comms plugin section + +gst-spandsp_PORT= comms/gstreamer${_GST_VER}-plugins-spandsp +gst-spandsp_IMPL= bad + +#==== devel plugin section + +gst-soup_PORT= devel/gstreamer${_GST_VER}-plugins-soup +gst-soup_IMPL= good + +#==== ftp plugin section + +gst-curl_PORT= ftp/gstreamer${_GST_VER}-plugins-curl +gst-curl_IMPL= bad + +#==== graphics plugin section + +gst-aalib_PORT= graphics/gstreamer${_GST_VER}-plugins-aalib +gst-aalib_IMPL= good + +gst-aom_PORT= multimedia/gstreamer${_GST_VER}-plugins-aom +gst-aom_IMPL= bad + +gst-assrender_PORT= multimedia/gstreamer${_GST_VER}-plugins-assrender +gst-assrender_IMPL= bad + +gst-cairo_PORT= graphics/gstreamer${_GST_VER}-plugins-cairo +gst-cairo_IMPL= good + +gst-gdkpixbuf_PORT= graphics/gstreamer${_GST_VER}-plugins-gdkpixbuf +gst-gdkpixbuf_IMPL= good + +gst-gl_PORT= graphics/gstreamer${_GST_VER}-plugins-gl +gst-gl_IMPL= bad + +gst-jpeg_PORT= graphics/gstreamer${_GST_VER}-plugins-jpeg +gst-jpeg_IMPL= good + +gst-kms_PORT= graphics/gstreamer${_GST_VER}-plugins-kms +gst-kms_IMPL= bad + +gst-libcaca_PORT= graphics/gstreamer${_GST_VER}-plugins-libcaca +gst-libcaca_IMPL= good + +gst-libvisual_PORT= graphics/gstreamer${_GST_VER}-plugins-libvisual +gst-libvisual_IMPL= # + +gst-opencv_PORT= graphics/gstreamer${_GST_VER}-plugins-opencv +gst-opencv_IMPL= bad + +gst-openexr_PORT= graphics/gstreamer${_GST_VER}-plugins-openexr +gst-openexr_IMPL= bad + +gst-openjpeg_PORT= graphics/gstreamer${_GST_VER}-plugins-openjpeg +gst-openjpeg_IMPL= bad + +gst-openmpt_PORT= audio/gstreamer${_GST_VER}-plugins-openmpt +gst-openmpt_IMPL= bad + +gst-png_PORT= graphics/gstreamer${_GST_VER}-plugins-png +gst-png_IMPL= good + +gst-qt_PORT= graphics/gstreamer${_GST_VER}-plugins-qt +gst-qt_IMPL= good + +gst-rsvg_PORT= graphics/gstreamer${_GST_VER}-plugins-rsvg +gst-rsvg_IMPL= bad + +gst-webp_PORT= graphics/gstreamer${_GST_VER}-plugins-webp +gst-webp_IMPL= bad + +gst-zbar_PORT= graphics/gstreamer${_GST_VER}-plugins-zbar +gst-zbar_IMPL= bad + +#==== multimedia plugins section + +gst-dash_PORT= multimedia/gstreamer${_GST_VER}-plugins-dash +gst-dash_IMPL= bad + +gst-dvdread_PORT= multimedia/gstreamer${_GST_VER}-plugins-dvdread +gst-dvdread_IMPL= ugly + +gst-editing-services_PORT= multimedia/gstreamer${_GST_VER}-editing-services +gst-editing-services_SUFFIX= # +gst-editing-services_IMPL= # + +gst-dts_PORT= multimedia/gstreamer${_GST_VER}-plugins-dts +gst-dts_IMPL= bad + +gst-dv_PORT= multimedia/gstreamer${_GST_VER}-plugins-dv +gst-dv_IMPL= good + +gst-gnonlin_PORT= multimedia/gstreamer${_GST_VER}-plugins-gnonlin +gst-gnonlin_IMPL= good +gst-gnonlin_VERSION= 1.4.0 + +gst-hls_PORT= multimedia/gstreamer${_GST_VER}-plugins-hls +gst-hls_IMPL= bad + +gst-libav_PORT= multimedia/gstreamer${_GST_VER}-libav +gst-libav_SUFFIX= # +gst-libav_IMPL= # + +gst-libde265_PORT= multimedia/gstreamer${_GST_VER}-plugins-libde265 +gst-libde265_IMPL= bad + +gst-mm_PORT= multimedia/gstreamermm +gst-mm_PREFIX= gstreamer +gst-mm_SUFFIX= # +gst-mm_IMPL= # +gst-mm_GST1_VERSION= 1.10.0 +gst-mm_VERSION= ${gst-mm_GST${_GST_VER}_VERSION} + +gst-mpeg2dec_PORT= multimedia/gstreamer${_GST_VER}-plugins-mpeg2dec +gst-mpeg2dec_IMPL= ugly + +gst-mpeg2enc_PORT= multimedia/gstreamer${_GST_VER}-plugins-mpeg2enc +gst-mpeg2enc_IMPL= bad + +gst-mplex_PORT= multimedia/gstreamer${_GST_VER}-plugins-mplex +gst-mplex_IMPL= bad + +gst-openh264_PORT= multimedia/gstreamer${_GST_VER}-plugins-openh264 +gst-openh264_IMPL= bad + +gst-smoothstreaming_PORT= multimedia/gstreamer${_GST_VER}-plugins-smoothstreaming +gst-smoothstreaming_IMPL= bad + +gst-ttml_PORT= multimedia/gstreamer${_GST_VER}-plugins-ttml +gst-ttml_IMPL= bad + +gst-v4l2_PORT= multimedia/gstreamer${_GST_VER}-plugins-v4l2 +gst-v4l2_IMPL= good + +# hmmm +gst-vaapi_PORT= multimedia/gstreamer-vaapi +gst-vaapi_IMPL= bad + +gst-vpx_PORT= multimedia/gstreamer${_GST_VER}-plugins-vpx +gst-vpx_IMPL= good + +gst-vulkan_PORT= graphics/gstreamer${_GST_VER}-plugins-vulkan +gst-vulkan_IMPL= bad + +gst-resindvd_PORT= multimedia/gstreamer${_GST_VER}-plugins-resindvd +gst-resindvd_IMPL= bad + +gst-theora_PORT= multimedia/gstreamer${_GST_VER}-plugins-theora +gst-theora_IMPL= # + +gst-x264_PORT= multimedia/gstreamer${_GST_VER}-plugins-x264 +gst-x264_IMPL= ugly + +gst-x265_PORT= multimedia/gstreamer${_GST_VER}-plugins-x265 +gst-x265_IMPL= bad + +gst-zxing_PORT= textproc/gstreamer${_GST_VER}-plugins-zxing +gst-zxing_IMPL= bad + +#==== Net Plugins Section + +gst-srtp_PORT= net/gstreamer${_GST_VER}-plugins-srtp +gst-srtp_IMPL= bad + +#==== security plugins section + +gst-dtls_PORT= security/gstreamer${_GST_VER}-plugins-dtls +gst-dtls_IMPL= bad + +#==== sysutils plugins section + +gst-cdio_PORT= sysutils/gstreamer${_GST_VER}-plugins-cdio +gst-cdio_IMPL= ugly + +#==== x11 plugins section + +gst-x_PORT= x11/gstreamer${_GST_VER}-plugins-x +gst-x_IMPL= # + +gst-ximagesrc_PORT= x11/gstreamer${_GST_VER}-plugins-ximagesrc +gst-ximagesrc_IMPL= good + +#==== x11-toolkits plugins section + +gst-gtk_PORT= x11-toolkits/gstreamer${_GST_VER}-plugins-gtk +gst-gtk_IMPL= bad + +gst-pango_PORT= x11-toolkits/gstreamer${_GST_VER}-plugins-pango +gst-pango_IMPL= # + +#== Dependency creation + +_GST_BR_DEPENDS= # +_GST_LIB_DEPENDS= # + +USE_GSTREAMER?= # +# everything wants this +USE_GSTREAMER+= libgstreamer +. if ${PORTDIRNAME} != gstreamer${_GST_VER}-plugins +USE_GSTREAMER+= plugins +. endif + +# Gather all Impl values +_GST_IMPL_LIST:= ${USE_GSTREAMER:S/^/\${gst-/:S/$/_IMPL}/} + +# Combine the wanted copmonents and the required implementations +_USE_GSTREAMER= ${USE_GSTREAMER} \ + ${_GST_IMPL_LIST} + +. for component in ${_USE_GSTREAMER:O:u} +# Fill in the common default component values +gst-${component}_VERSION?= ${_GST_VERSION} +gst-${component}_NAME?= ${component} +gst-${component}_PREFIX?= gstreamer${_GST_VER}- +gst-${component}_SUFFIX?= plugins- +gst-${component}_PKG?= ${gst-${component}_PREFIX}${gst-${component}_SUFFIX}${gst-${component}_NAME} + +. if empty(_USE_GSTREAMER_ALL:M${component}) +IGNORE= unknown gstreamer component '${component}' for gstreamer:${_GST_VER} +. endif +. if !empty(gst-${component}_LIB) +_GST_LIB_DEPENDS+= ${gst-${component}_LIB}:${gst-${component}_PORT} +. else +_GST_BR_DEPENDS+= ${gst-${component}_PKG}>=${gst-${component}_VERSION}:${gst-${component}_PORT} +. endif +. endfor + +LIB_DEPENDS+= ${_GST_LIB_DEPENDS:O:u} +BUILD_DEPENDS+= ${_GST_BR_DEPENDS:O:u} +RUN_DEPENDS+= ${_GST_BR_DEPENDS:O:u} + +.endif diff --git a/Mk/Uses/guile.mk b/Mk/Uses/guile.mk new file mode 100644 index 000000000000..d2822fd1c57d --- /dev/null +++ b/Mk/Uses/guile.mk @@ -0,0 +1,263 @@ +# Provide support for guile +# +# MAINTAINER: ports@FreeBSD.org +# Usage: +# +# USES+= guile[:options,...] +# +# Options: +# +# X.Y specify a Guile version, e.g. 2.2 or 3.0 +# +# flavors define FLAVOR / FLAVORS as guileX from the allowed versions +# +# build add dependency to BUILD_DEPENDS instead of LIB_DEPENDS +# run add dependency to RUN_DEPENDS instead of LIB_DEPENDS +# +# env define only the GUIL[DE]_* vars and add them to PLIST_SUB, +# do not add dependencies or other global state +# +# alias add BINARY_ALIAS for guile tools +# +# conflicts add GUILE_NEWER_PKGS to CONFLICTS_BUILD, this tries to +# ensure that non-clean builds of programs that insist on +# using the latest available version (there are a surprising +# number of these) will fail if the selected version is wrong. +# +# noextra don't add _GUILE_EXTRA_LIB_DEPENDS +# +# nopkgconf don't add to PKGCONFIG_PATHS +# +# nocmds don't add GUILE_*CMD* to CONFIGURE_ENV and MAKE_ENV +# (but still define them) +# +# Variables defined for use by the port: +# +# GUILE_VER e.g. 2.2 +# GUILE_SFX e.g. 2 (be careful, consider the possibility of 3.1) +# GUILE_FLAVOR e.g. guile22 +# GUILE_PORT e.g. lang/guile2 +# GUILE_CMD name of guile binary, e.g. guile-2.2 +# GUILE_*_CMD name of guile-* binary (legacy) +# GUILD_CMD name of guild binary, e.g. guild-2.2 +# GUIL*_CMDPATH full paths of commands +# GUILE_PKGCONFIG_DIR directory for version-specific .pc files +# (relative to PREFIX or LOCALBASE) +# GUILE_PREFIX +# GUILE_GLOBAL_SITE_DIR +# GUILE_SITE_DIR +# GUILE_SITE_CCACHE_DIR +# GUILE_DOCS_DIR where to put version-specific docs +# GUILE_EXAMPLES_DIR where to put version-specific examples +# GUILE_INFO_PATH a suitable value for INFO_PATH +# +# (the _DIR vars are relativized and added to PLIST_SUB without the +# _DIR suffix) +# +.if !defined(_INCLUDE_USES_GUILE_MK) +_INCLUDE_USES_GUILE_MK= yes + +# When adding a version, please keep the comment in +# Mk/bsd.default-versions.mk in sync. +_GUILE_VALID_VERSIONS:= 1.8 2.2 3.0 +. if defined(_GUILE_EXTRA_VER) +_GUILE_VALID_VERSIONS+= ${_GUILE_EXTRA_VER} +. endif + +_GUILE_DEFAULT_VERSION:= ${GUILE_DEFAULT} + +. if ! ${_GUILE_VALID_VERSIONS:M${_GUILE_DEFAULT_VERSION}} +IGNORE= Invalid default Guile version ${GUILE_DEFAULT} +. endif + +# args. Allow a list of numeric versions +_GUILE_ARG_VERSIONS:= ${guile_ARGS:M[1-9].[0-9]} + +# We anticipate which args will be almost universally required +# and define them negatively. In practice "alias" is needed a lot +# thanks to makefile assumptions, but it's intrusive enough that +# we require it to be stated explicitly. +_GUILE_ARG_NAMES:= flavors build run env alias conflicts \ + noextra nopkgconf nocmds + +# Define an 0/1 flag for each arg +. for _v in ${_GUILE_ARG_NAMES} +. if ${_v:Mno*} +_GUILE_ARG_${_v:tu:S/^NO//}:=${"${guile_ARGS:M${_v}}":?0:1} +. else +_GUILE_ARG_${_v:tu}:=${"${guile_ARGS:M${_v}}":?1:0} +. endif +. endfor + +# +# Parse ver arguments +# +# If multiple versions are specified, we are either doing flavors (in +# which case we build them all) or we are supposed to pick just one, in +# which case we pick the default version if it was specified, otherwise +# the highest. +# +_GUILE_CHOSEN_VER:= +_GUILE_REQUESTED_VERS:= + +# check args for validity first +. for _v in ${_GUILE_ARG_VERSIONS} +. if ! ${_GUILE_VALID_VERSIONS:M${_v}} +IGNORE= Invalid Guile version ${_v} +. else +_GUILE_REQUESTED_VERS+= ${_v} +. endif +. endfor + +. if ${_GUILE_ARG_FLAVORS} + +# default to all versions (unlikely in practice) +. if empty(_GUILE_REQUESTED_VERS) +_GUILE_REQUESTED_VERS:= ${_GUILE_VALID_VERSIONS} +. endif + +# Note that we organize the FLAVORS list so that the +# first (default) one corresponds to the default version. +. if empty(FLAVORS) +FLAVORS=${_GUILE_DEFAULT_VERSION:S/.//:S/^/guile/} \ + ${_GUILE_REQUESTED_VERS:N${_GUILE_DEFAULT_VERSION}:S/.//:S/^/guile/} +. endif +# User may have specified this; we must respect that. +. if empty(FLAVOR) +FLAVOR= ${FLAVORS:[1]} +. endif +# Translate the selected (possibly by the user) flavor back to the +# corresponding Guile version. +_GUILE_CHOSEN_VER:= ${FLAVOR:S/^guile//:C/./&./} + +. else # !${_GUILE_ARG_FLAVORS} + +# default to default version +. if empty(_GUILE_REQUESTED_VERS) +_GUILE_REQUESTED_VERS:= ${_GUILE_DEFAULT_VERSION} +. endif + +# Find default version, or highest. (We abuse alphabetic sort here.) +_GUILE_CHOSEN_VER:= ${_GUILE_REQUESTED_VERS:M${_GUILE_DEFAULT_VERSION}} +. if empty(_GUILE_CHOSEN_VER) +_GUILE_CHOSEN_VER:= ${_GUILE_REQUESTED_VERS:O:[-1]} +. endif + +. endif # ${_GUILE_ARG_FLAVORS} + +# _GUILE_CHOSEN_VER is now the desired version in all cases. +# +# The GUILE_VER / GUILE_SFX here is the existing usage, but if a +# version 3.1 comes along, that'll all need to be revisited. (So +# we discourage the use of GUILE_SFX for anything important.) +# +# GUILE_VER= 3.0 (for example) +# GUILE_SFX= 3 +# GUILE_FLAVOR= guile30 +# +# GUILE_OTHER/NEWER_PKGS is defined such that it can be placed in +# CONFLICTS_BUILD for ports that use non-overridable version searches. +# This gives a proper diagnostic for non-clean builds. + +GUILE_VER= ${_GUILE_CHOSEN_VER} +GUILE_SFX= ${_GUILE_CHOSEN_VER:R} + +GUILE_OTHER_PKGS:=${_GUILE_VALID_VERSIONS:@_v@${${_v} != ${_GUILE_CHOSEN_VER}:?guile${_v:R}:}@} +GUILE_NEWER_PKGS:=${_GUILE_VALID_VERSIONS:@_v@${${_v} > ${_GUILE_CHOSEN_VER}:?guile${_v:R}:}@} + +. if ${_GUILE_ARG_CONFLICTS} +CONFLICTS_BUILD+=${GUILE_NEWER_PKGS} +. endif + +GUILE_PORT= lang/guile${GUILE_SFX} +GUILE_FLAVOR= guile${GUILE_VER:S/.//} + +GUILE_PREFIX= ${PREFIX} + +GUILE_GLOBAL_SITE_DIR= ${GUILE_PREFIX}/share/guile/site +GUILE_SITE_DIR= ${GUILE_GLOBAL_SITE_DIR}/${GUILE_VER} +GUILE_SITE_CCACHE_DIR= ${GUILE_PREFIX}/lib/guile/${GUILE_VER}/site-ccache +GUILE_DOCS_DIR= ${GUILE_PREFIX}/share/doc/${GUILE_FLAVOR} +GUILE_EXAMPLES_DIR= ${GUILE_PREFIX}/share/examples/${GUILE_FLAVOR} +GUILE_INFO_PATH= share/info/guile${GUILE_SFX} + +_GUILE_CMDNAMES:= guile guile-snarf guile-config guile-tools +. if ${GUILE_SFX} > 1 +_GUILE_CMDNAMES+= guild +. endif + +. for _c in ${_GUILE_CMDNAMES} +${_c:S/-/_/:tu}_CMD:= ${_c}-${GUILE_VER} +${_c:S/-/_/:tu}_CMDPATH:= ${LOCALBASE}/bin/${_c}-${GUILE_VER} +. endfor + +PLIST_SUB+= GUILE_VER=${GUILE_VER} GUILE_SFX=${GUILE_SFX} \ + GUILE_SITE=${GUILE_SITE_DIR:S,^${GUILE_PREFIX}/,,} \ + GUILE_GLOBAL_SITE=${GUILE_GLOBAL_SITE_DIR:S,^${GUILE_PREFIX}/,,} \ + GUILE_SITE_CCACHE=${GUILE_SITE_CCACHE_DIR:S,^${GUILE_PREFIX}/,,} \ + GUILE_DOCS=${GUILE_DOCS_DIR:S,^${GUILE_PREFIX}/,,} \ + GUILE_EXAMPLES=${GUILE_EXAMPLES_DIR:S,^${GUILE_PREFIX}/,,} + +# This may reduce the need for BINARY_ALIAS +GUILE_ENV= ${_GUILE_CMDNAMES:tu:S/-/_/:@t@${t}=${${t}_CMDPATH}@} + +# XXX XXX XXX +# +# This all assumes that the underlying Guile >= 2 is built with the +# threading option, which is on by default. + +_GUILE_1.8_EXTRA_LIB_DEPENDS= \ + libgmp.so:math/gmp \ + libltdl.so:devel/libltdl +_GUILE_2.2_EXTRA_LIB_DEPENDS= \ + libgc-threaded.so:devel/boehm-gc-threaded +_GUILE_3.0_EXTRA_LIB_DEPENDS= \ + libgc-threaded.so:devel/boehm-gc-threaded + +. if ${_GUILE_ARG_EXTRA} +_GUILE_EXTRA_LIB_DEPENDS= ${_GUILE_${GUILE_VER}_EXTRA_LIB_DEPENDS} +. else +_GUILE_EXTRA_LIB_DEPENDS?= +. endif + +. if !${_GUILE_ARG_ENV} +. if ${_GUILE_ARG_BUILD} +BUILD_DEPENDS+= ${GUILE_CMD}:${GUILE_PORT} +. endif +. if ${_GUILE_ARG_RUN} +RUN_DEPENDS+= ${GUILE_CMD}:${GUILE_PORT} +. endif +. if !${_GUILE_ARG_BUILD} && !${_GUILE_ARG_RUN} +. if ${GUILE_SFX} > 1 +LIB_DEPENDS+= libguile-${GUILE_VER}.so:${GUILE_PORT} ${_GUILE_EXTRA_LIB_DEPENDS} +. else +LIB_DEPENDS+= libguile.so:${GUILE_PORT} ${_GUILE_EXTRA_LIB_DEPENDS} +. endif +. endif +. if ${_GUILE_ARG_CMDS} +. if ${_GUILE_ARG_ALIAS} +# If we're doing binary-alias, then only add GUILE itself to the +# environment, not the build-only tools. This helps when dealing with +# broken configure scripts that respect e.g. GUILE_CONFIG but then +# barf on the output if the program name has a suffix. +CONFIGURE_ENV+= GUILE=${GUILE_CMDPATH} +MAKE_ENV+= GUILE=${GUILE_CMDPATH} +. else +CONFIGURE_ENV+= ${GUILE_ENV} +MAKE_ENV+= ${GUILE_ENV} +. endif +. endif # ${_GUILE_ARG_CMDS} +CONFIGURE_ENV+= GUILE_EFFECTIVE_VERSION=${GUILE_VER} +. endif # !${_GUILE_ARG_ENV} + +. if ${_GUILE_ARG_ALIAS} +BINARY_ALIAS+= ${_GUILE_CMDNAMES:@t@${t}=${${t:tu:S/-/_/}_CMD}@} +. endif + +. if ${_GUILE_ARG_PKGCONF} +GUILE_PKGCONFIG_DIR:= libdata/pkgconfig/guile/${GUILE_VER} +PKGCONFIG_PATHS+= ${LOCALBASE}/${GUILE_PKGCONFIG_DIR} +PLIST_SUB+= GUILE_PKGCONFIG_DIR=${GUILE_PKGCONFIG_DIR} +. endif + +.endif diff --git a/Mk/Uses/horde.mk b/Mk/Uses/horde.mk index bcbcae7ec639..39f554a72c42 100644 --- a/Mk/Uses/horde.mk +++ b/Mk/Uses/horde.mk @@ -40,7 +40,7 @@ horde-Horde_Date_Parser-DEPEND= ${PEARDIR}/Horde/Date/Parser.php:devel/pear-Hord 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_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 @@ -101,8 +101,8 @@ horde-Horde_Service_UrlShortener-DEPEND= ${PEARDIR}/Horde/Service/UrlShortener.p 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_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 @@ -117,41 +117,30 @@ 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 e55fcffe8cc5..8561e51c666b 100644 --- a/Mk/Uses/iconv.mk +++ b/Mk/Uses/iconv.mk @@ -6,12 +6,12 @@ # wchar_t (port uses "WCHAR_T" extension), # translit (port uses "//TRANSLIT" extension) # -# MAINTAINER: portmgr@FreeBSD.org +# 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 @@ -21,15 +21,15 @@ 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= @@ -39,10 +39,10 @@ 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 @@ -50,7 +50,7 @@ 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 diff --git a/Mk/Uses/imake.mk b/Mk/Uses/imake.mk index 85b43071555c..6848907e8934 100644 --- a/Mk/Uses/imake.mk +++ b/Mk/Uses/imake.mk @@ -12,37 +12,37 @@ .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 + @(cd ${CONFIGURE_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${XMKMF} ${XMKMF_ARGS}) +. 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 bd75336e5f6b..f4108fde2f73 100644 --- a/Mk/Uses/jpeg.mk +++ b/Mk/Uses/jpeg.mk @@ -6,31 +6,31 @@ # # User defined variables: # JPEG_PORT - jpeg implementation -# Valid value: graphics/jpeg-turbo +# Valid values: graphics/jpeg-turbo, graphics/mozjpeg # Default value: graphics/jpeg-turbo # -# MAINTAINER: portmgr@FreeBSD.org +# 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 1d70e461387f..089a4fa9f9a4 100644 --- a/Mk/Uses/kde.mk +++ b/Mk/Uses/kde.mk @@ -1,16 +1,17 @@ # Provides support for KDE and KF5-based ports. # # Feature: kde -# Valid ARGS: 5 +# Valid ARGS: 5 6 # # 5: Depend on KDE Frameworks 5 components and variables. +# 6: Depend on KDE Frameworks 6 components and variables. # # Variables that can be set by a port: # -# USE_KDE List of KF5/Plasma5 components (other ports) that this +# USE_KDE List of KF[56]/Plasma[56] 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:build Add a build-time dependency (BUILD_DEPENDS) +# * foo:run Add a run-time dependency (RUN_DEPENDS) # * foo (default) Add both dependencies on component <foo>, or # a LIB_DEPENDS if applicable. # @@ -25,7 +26,7 @@ # # 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 +# 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 @@ -51,7 +52,7 @@ .if !defined(_INCLUDE_USES_KDE_MK) _INCLUDE_USES_KDE_MK= yes -_KDE_SUPPORTED= 5 +_KDE_SUPPORTED= 5 6 . if empty(kde_ARGS) IGNORE= kde needs a version (${_KDE_SUPPORTED}) @@ -74,18 +75,55 @@ IGNORE?= kde:[${_KDE_SUPPORTED:S/ //g}] needs an argument #' _KDE_RELNAME= KDE${_KDE_VERSION} # === VERSIONS OF THE DIFFERENT COMPONENTS ===================================== +KDE_PLASMA_VERSION?= ${KDE_PLASMA${_KDE_VERSION}_VERSION} +KDE_PLASMA_BRANCH?= ${KDE_PLASMA${_KDE_VERSION}_BRANCH} + +KDE_FRAMEWORKS_VERSION?= ${KDE_FRAMEWORKS${_KDE_VERSION}_VERSION} +KDE_FRAMEWORKS_BRANCH?= ${KDE_FRAMEWORKS${_KDE_VERSION}_BRANCH} + +. if ${CATEGORIES:Mkde-devel} +KDE_APPLICATIONS_BRANCH?= ${KDE_APPLICATIONS6_BRANCH} +KDE_APPLICATIONS_VERSION?= ${KDE_APPLICATIONS6_VERSION} +KDE_APPLICATIONS_SHLIB_VER?= ${KDE_APPLICATIONS6_SHLIB_VER} +KDE_APPLICATIONS_SHLIB_G_VER?= ${KDE_APPLICATIONS6_SHLIB_G_VER} +PKGNAMESUFFIX?= -devel +. else +KDE_APPLICATIONS_BRANCH?= ${KDE_APPLICATIONS5_BRANCH} +KDE_APPLICATIONS_VERSION?= ${KDE_APPLICATIONS5_VERSION} +KDE_APPLICATIONS_SHLIB_VER?= ${KDE_APPLICATIONS5_SHLIB_VER} +KDE_APPLICATIONS_SHLIB_G_VER?= ${KDE_APPLICATIONS5_SHLIB_G_VER} +. endif + + # Current KDE desktop. -KDE_PLASMA_VERSION?= 5.23.1 -KDE_PLASMA_BRANCH?= stable +KDE_PLASMA5_VERSION?= 5.27.11 +KDE_PLASMA5_BRANCH?= stable + +# Next KDE Plasma desktop +KDE_PLASMA6_VERSION?= 6.0.4 +KDE_PLASMA6_BRANCH?= stable # Current KDE frameworks. -KDE_FRAMEWORKS_VERSION?= 5.87.0 -KDE_FRAMEWORKS_BRANCH?= stable +KDE_FRAMEWORKS5_VERSION?= 5.115.0 +KDE_FRAMEWORKS5_BRANCH?= stable + +# Next KDE Frameworks (Qt6 based) +KDE_FRAMEWORKS6_VERSION?= 6.1.0 +KDE_FRAMEWORKS6_BRANCH?= stable # Current KDE applications. -KDE_APPLICATIONS_VERSION?= 21.08.2 -KDE_APPLICATIONS_SHLIB_VER?= 5.18.2 -KDE_APPLICATIONS_BRANCH?= stable +KDE_APPLICATIONS5_VERSION?= 23.08.5 +KDE_APPLICATIONS5_SHLIB_VER?= 5.24.5 +# G as in KDE Gear, and as in "don't make the variable name longer than required" +KDE_APPLICATIONS5_SHLIB_G_VER?= 23.8.5 +KDE_APPLICATIONS5_BRANCH?= stable + +# Next KDE applications. +KDE_APPLICATIONS6_VERSION?= 24.01.90 +KDE_APPLICATIONS6_SHLIB_VER?= 5.24.3 +# G as in KDE Gear, and as in "don't make the variable name longer than required" +KDE_APPLICATIONS6_SHLIB_G_VER?= 24.01.90 +KDE_APPLICATIONS6_BRANCH?= unstable # Extended KDE universe applications. CALLIGRA_VERSION?= 2.9.11 @@ -99,8 +137,8 @@ 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} +_KDE_CATEGORIES_SUPPORTED= kde-applications kde-frameworks kde-plasma kde-devel +. for cat in ${_KDE_CATEGORIES_SUPPORTED:Nkde-devel} . if ${CATEGORIES:M${cat}} . if !defined(_KDE_CATEGORY) _KDE_CATEGORY= ${cat} @@ -132,7 +170,7 @@ USE_GITLAB= yes GL_SITE= https://invent.kde.org GL_ACCOUNT= ${_invent_category} GL_PROJECT= ${_invent_name} -GL_COMMIT= ${_invent_hash} +GL_TAGNAME= ${_invent_hash} . endif . endif @@ -154,38 +192,51 @@ MASTER_SITES?= KDE/${KDE_APPLICATIONS_BRANCH}/release-service/${KDE_APPLICATION # 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 +USE_KDE+= doctools:build +. 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- +PKGNAMEPREFIX?= plasma${_KDE_VERSION}- MASTER_SITES?= KDE/${KDE_PLASMA_BRANCH}/plasma/${KDE_PLASMA_VERSION} DIST_SUBDIR?= KDE/plasma/${KDE_PLASMA_VERSION} +. if ${_KDE_VERSION:M6} +DESCR= ${.CURDIR:H:H}/x11/plasma6-plasma/pkg-descr +. endif . elif ${_KDE_CATEGORY:Mkde-frameworks} PORTVERSION?= ${KDE_FRAMEWORKS_VERSION} -PKGNAMEPREFIX?= kf5- +PKGNAMEPREFIX?= kf${_KDE_VERSION}- +WWW?= https://api.kde.org/frameworks/${PORTNAME}/html/index.html # 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}*} +_PORTINGAIDS= kjs kjsembed kdelibs4support kdesignerplugin khtml kmediaplayer kross kxmlrpcclient +. if ${_KDE_VERSION:M5} +. 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 . else MASTER_SITES?= KDE/${KDE_FRAMEWORKS_BRANCH}/frameworks/${KDE_FRAMEWORKS_VERSION:R} . endif DIST_SUBDIR?= KDE/frameworks/${KDE_FRAMEWORKS_VERSION} +. if ${_KDE_VERSION:M6} +DESCR= ${.CURDIR:H:H}/x11/kf6-frameworks/pkg-descr +. endif . else IGNORE?= unknown CATEGORY value '${_KDE_CATEGORY}' #' . endif . endif #defined(_KDE_CATEGORY) # ============================================================================== +# === SET UP LOCALE ENVIRONMENT ================================================= +USE_LOCALE?= en_US.UTF-8 # === SET UP CMAKE ENVIRONMENT ================================================= # Help cmake to find files when testing ports with non-default PREFIX. @@ -197,9 +248,7 @@ 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" +KDE_MAN_PREFIX?= ${KDE_PREFIX}/share/man # Disable autotests unless TEST_TARGET is defined. . if !defined(TEST_TARGET) @@ -216,14 +265,14 @@ PLIST_SUB+= KDE_APPLICATIONS_VERSION="${KDE_APPLICATIONS_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 +_USE_KDE_BOTH= akonadi libkcddb libkcompactdisc libkdcraw libkdegames \ + libkeduvocdocument libkipi libksane okular \ + baloo-widgets kate marble # List of components of the KDE Frameworks distribution. # The *_TIER<n> 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 \ +_USE_FRAMEWORKS_TIER1= apidox archive attica breeze-icons codecs config \ coreaddons dbusaddons dnssd holidays i18n idletime itemmodels \ itemviews kirigami2 kquickcharts oxygen-icons5 plotting prison \ qqc2-desktop-style solid sonnet syntaxhighlighting \ @@ -234,21 +283,21 @@ _USE_FRAMEWORKS_TIER2= auth completion crash doctools \ filemetadata kimageformats jobwidgets notifications \ package pty syndication unitconversion -_USE_FRAMEWORKS_TIER3= activities activities-stats baloo5 bookmarks configwidgets \ +_USE_FRAMEWORKS_TIER3= activities activities-stats baloo bookmarks configwidgets \ designerplugin emoticons globalaccel guiaddons \ iconthemes init kcmutils kdav kdeclarative \ - kded kdesu kdewebkit kio kwayland-server newstuff notifyconfig parts \ + kded kdesu kio kpipewire newstuff notifyconfig parts \ people plasma-framework purpose runner service texteditor \ textwidgets wallet xmlgui xmlrpcclient -_USE_FRAMEWORKS_TIER4= frameworkintegration calendarcore contacts +_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_FRAMEWORKS5_ALL= ecm \ ${_USE_FRAMEWORKS_TIER1} \ ${_USE_FRAMEWORKS_TIER2} \ ${_USE_FRAMEWORKS_TIER3} \ @@ -257,6 +306,18 @@ _USE_FRAMEWORKS_ALL= ecm \ ${_USE_FRAMEWORKS_EXTRA} \ kpublictransport kosm \ plasma-wayland-protocols +# TODO: fix +_USE_FRAMEWORKS6_ALL= ecm colorscheme \ + svg \ + statusnotifieritem \ + plasma-wayland-protocols \ + userfeedback \ + ${_USE_FRAMEWORKS_TIER1:Noxygen-icons5:Nwayland} \ + ${_USE_FRAMEWORKS_TIER2} \ + ${_USE_FRAMEWORKS_TIER3:Nemoticons:Ndesignerplugin:Nactivities:Nactivities-stats:Ninit:Nplasma-framework:Nxmlrpcclient:Nkpipewire} \ + ${_USE_FRAMEWORKS_TIER4} \ + ${_USE_FRAMEWORKS_EXTRA} +_USE_FRAMEWORKS_ALL= ${_USE_FRAMEWORKS${_KDE_VERSION}_ALL} # List of components of the KDE Plasma distribution. _USE_PLASMA_ALL= activitymanagerd breeze breeze-gtk \ @@ -265,14 +326,15 @@ _USE_PLASMA_ALL= activitymanagerd breeze breeze-gtk \ 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 \ + libksysguard milou oxygen oxygen-sounds plasma-browser-integration \ plasma-desktop plasma-disks plasma-integration plasma-pa \ plasma-sdk plasma-workspace plasma-workspace-wallpapers \ - polkit-kde-agent-1 powerdevil systemsettings + polkit-kde-agent-1 powerdevil systemsettings xdg-desktop-portal-kde \ + kirigami-addons # List of components of the KDE PIM distribution (part of applications). _USE_KDEPIM5_ALL= akonadicontacts akonadiimportwizard akonadimime akonadinotes \ - akonadicalendar akonadisearch alarmcalendar \ + akonadicalendar akonadisearch \ calendarcore calendarsupport calendarutils \ contacts eventviews gapi grantleetheme \ gravatar identitymanagement imap \ @@ -284,487 +346,574 @@ _USE_KDEPIM5_ALL= akonadicontacts akonadiimportwizard akonadimime akonadinotes \ kalarm kontact kmail mbox-importer \ akonadiconsole akregator grantlee-editor kaddressbook \ kalarm kmail-account-wizard kmail knotes kontact \ - korganizer pim-data-exporter + korganizer pim-data-exporter ktextaddons + +_USE_PHONON_ALL= phonon phonon-backend _USE_KDE5_ALL= ${_USE_FRAMEWORKS_ALL} \ ${_USE_PLASMA_ALL} \ ${_USE_KDEPIM5_ALL} \ - ${_USE_KDE_BOTH} + ${_USE_KDE_BOTH} \ + ${_USE_PHONON_ALL} \ + libkexiv2 +# TODO: fix +_USE_KDE6_ALL= ecm colorscheme \ + svg \ + plasma-wayland-protocols \ + mediaplayer \ + ${_USE_FRAMEWORKS_ALL} \ + ${_USE_PLASMA_ALL} \ + plasma5support activities activities-stats kpipewire wayland globalacceld libplasma \ + ${_USE_PHONON_ALL} \ + libkexiv2 # ====================== 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-activities_PORT5= x11/kf${_KDE_VERSION}-kactivities +kde-activities_PORT6= x11/plasma${_KDE_VERSION}-plasma-activities +kde-activities_PORT= ${kde-activities_PORT${_KDE_VERSION}} +kde-activities_LIB5= libKF${_KDE_VERSION}Activities.so +kde-activities_LIB6= libPlasmaActivities.so +kde-activities_LIB= ${kde-activities_LIB${_KDE_VERSION}} + +kde-activities-stats_PORT5= x11/kf${_KDE_VERSION}-kactivities-stats +kde-activities-stats_PORT6= x11/plasma${_KDE_VERSION}-plasma-activities-stats +kde-activities-stats_PORT= ${kde-activities-stats_PORT${_KDE_VERSION}} +kde-activities-stats_LIB5= libKF${_KDE_VERSION}ActivitiesStats.so +kde-activities-stats_LIB6= libPlasmaActivitiesStats.so +kde-activities-stats_LIB= ${kde-activities-stats_LIB${_KDE_VERSION}} + +kde-apidox_PORT= devel/kf${_KDE_VERSION}-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-archive_PORT= archivers/kf${_KDE_VERSION}-karchive +kde-archive_LIB= libKF${_KDE_VERSION}Archive.so -kde-attica5_PORT= x11-toolkits/kf5-attica -kde-attica5_LIB= libKF5Attica.so +kde-attica_PORT= x11-toolkits/kf${_KDE_VERSION}-attica +kde-attica_LIB= libKF${_KDE_VERSION}Attica.so -kde-auth_PORT= devel/kf5-kauth -kde-auth_LIB= libKF5Auth.so +kde-auth_PORT= devel/kf${_KDE_VERSION}-kauth +kde-auth_LIB= libKF${_KDE_VERSION}AuthCore.so -kde-baloo5_PORT= sysutils/kf5-baloo -kde-baloo5_LIB= libKF5Baloo.so +kde-baloo_PORT= sysutils/kf${_KDE_VERSION}-baloo +kde-baloo_LIB= libKF${_KDE_VERSION}Baloo.so -kde-bookmarks_PORT= devel/kf5-kbookmarks -kde-bookmarks_LIB= libKF5Bookmarks.so +kde-bookmarks_PORT= devel/kf${_KDE_VERSION}-kbookmarks +kde-bookmarks_LIB= libKF${_KDE_VERSION}Bookmarks.so -kde-breeze-icons_PORT= x11-themes/kf5-breeze-icons +kde-breeze-icons_PORT= x11-themes/kf${_KDE_VERSION}-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-codecs_PORT= textproc/kf${_KDE_VERSION}-kcodecs +kde-codecs_LIB= libKF${_KDE_VERSION}Codecs.so -kde-completion_PORT= x11-toolkits/kf5-kcompletion -kde-completion_LIB= libKF5Completion.so +kde-completion_PORT= x11-toolkits/kf${_KDE_VERSION}-kcompletion +kde-completion_LIB= libKF${_KDE_VERSION}Completion.so -kde-config_PORT= devel/kf5-kconfig -kde-config_LIB= libKF5ConfigCore.so +kde-config_PORT= devel/kf${_KDE_VERSION}-kconfig +kde-config_LIB= libKF${_KDE_VERSION}ConfigCore.so -kde-configwidgets_PORT= x11-toolkits/kf5-kconfigwidgets -kde-configwidgets_LIB= libKF5ConfigWidgets.so +kde-configwidgets_PORT= x11-toolkits/kf${_KDE_VERSION}-kconfigwidgets +kde-configwidgets_LIB= libKF${_KDE_VERSION}ConfigWidgets.so -kde-coreaddons_PORT= devel/kf5-kcoreaddons -kde-coreaddons_LIB= libKF5CoreAddons.so +kde-coreaddons_PORT= devel/kf${_KDE_VERSION}-kcoreaddons +kde-coreaddons_LIB= libKF${_KDE_VERSION}CoreAddons.so -kde-crash_PORT= devel/kf5-kcrash -kde-crash_LIB= libKF5Crash.so +kde-crash_PORT= devel/kf${_KDE_VERSION}-kcrash +kde-crash_LIB= libKF${_KDE_VERSION}Crash.so -kde-dbusaddons_PORT= devel/kf5-kdbusaddons -kde-dbusaddons_LIB= libKF5DBusAddons.so +kde-dbusaddons_PORT= devel/kf${_KDE_VERSION}-kdbusaddons +kde-dbusaddons_LIB= libKF${_KDE_VERSION}DBusAddons.so -kde-designerplugin_PORT= x11-toolkits/kf5-kdesignerplugin +kde-designerplugin_PORT= x11-toolkits/kf${_KDE_VERSION}-kdesignerplugin kde-designerplugin_PATH= ${KDE_PREFIX}/bin/kgendesignerplugin kde-designerplugin_TYPE= run -kde-dnssd_PORT= dns/kf5-kdnssd -kde-dnssd_LIB= libKF5DNSSD.so +kde-dnssd_PORT= dns/kf${_KDE_VERSION}-kdnssd +kde-dnssd_LIB= libKF${_KDE_VERSION}DNSSD.so -kde-doctools_PORT= devel/kf5-kdoctools -kde-doctools_PATH= ${KDE_PREFIX}/bin/meinproc5 +kde-doctools_PORT= devel/kf${_KDE_VERSION}-kdoctools +kde-doctools_PATH= ${KDE_PREFIX}/bin/meinproc${_KDE_VERSION} -kde-ecm_PORT= devel/kf5-extra-cmake-modules +kde-ecm_PORT= devel/kf${_KDE_VERSION}-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-emoticons_PORT= x11-themes/kf${_KDE_VERSION}-kemoticons +kde-emoticons_LIB= libKF${_KDE_VERSION}Emoticons.so -kde-filemetadata_PORT= devel/kf5-kfilemetadata -kde-filemetadata_LIB= libKF5FileMetaData.so +kde-filemetadata_PORT= devel/kf${_KDE_VERSION}-kfilemetadata +kde-filemetadata_LIB= libKF${_KDE_VERSION}FileMetaData.so -kde-frameworkintegration_PORT= x11/kf5-frameworkintegration -kde-frameworkintegration_LIB= libKF5Style.so +kde-frameworkintegration_PORT= x11/kf${_KDE_VERSION}-frameworkintegration +kde-frameworkintegration_LIB= libKF${_KDE_VERSION}Style.so -kde-globalaccel_PORT= x11/kf5-kglobalaccel -kde-globalaccel_LIB= libKF5GlobalAccel.so +kde-globalaccel_PORT= x11/kf${_KDE_VERSION}-kglobalaccel +kde-globalaccel_LIB= libKF${_KDE_VERSION}GlobalAccel.so -kde-guiaddons_PORT= x11-toolkits/kf5-kguiaddons -kde-guiaddons_LIB= libKF5GuiAddons.so +kde-guiaddons_PORT= x11-toolkits/kf${_KDE_VERSION}-kguiaddons +kde-guiaddons_LIB= libKF${_KDE_VERSION}GuiAddons.so -kde-holidays_PORT= net/kf5-kholidays -kde-holidays_LIB= libKF5Holidays.so +kde-holidays_PORT= net/kf${_KDE_VERSION}-kholidays +kde-holidays_LIB= libKF${_KDE_VERSION}Holidays.so -kde-i18n_PORT= devel/kf5-ki18n -kde-i18n_LIB= libKF5I18n.so +kde-i18n_PORT= devel/kf${_KDE_VERSION}-ki18n +kde-i18n_LIB= libKF${_KDE_VERSION}I18n.so -kde-iconthemes_PORT= x11-themes/kf5-kiconthemes -kde-iconthemes_LIB= libKF5IconThemes.so +kde-iconthemes_PORT= x11-themes/kf${_KDE_VERSION}-kiconthemes +kde-iconthemes_LIB= libKF${_KDE_VERSION}IconThemes.so -kde-idletime_PORT= devel/kf5-kidletime -kde-idletime_LIB= libKF5IdleTime.so +kde-idletime_PORT= devel/kf${_KDE_VERSION}-kidletime +kde-idletime_LIB= libKF${_KDE_VERSION}IdleTime.so -kde-init_PORT= x11/kf5-kinit +kde-init_PORT= x11/kf${_KDE_VERSION}-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-itemmodels_PORT= devel/kf${_KDE_VERSION}-kitemmodels +kde-itemmodels_LIB= libKF${_KDE_VERSION}ItemModels.so -kde-jobwidgets_PORT= x11-toolkits/kf5-kjobwidgets -kde-jobwidgets_LIB= libKF5JobWidgets.so +kde-itemviews_PORT= x11-toolkits/kf${_KDE_VERSION}-kitemviews +kde-itemviews_LIB= libKF${_KDE_VERSION}ItemViews.so -kde-js_PORT= www/kf5-kjs -kde-js_LIB= libKF5JS.so +kde-jobwidgets_PORT= x11-toolkits/kf${_KDE_VERSION}-kjobwidgets +kde-jobwidgets_LIB= libKF${_KDE_VERSION}JobWidgets.so -kde-jsembed_PORT= www/kf5-kjsembed -kde-jsembed_LIB= libKF5JsEmbed.so +kde-js_PORT= www/kf${_KDE_VERSION}-kjs +kde-js_LIB= libKF${_KDE_VERSION}JS.so -kde-kcmutils_PORT= devel/kf5-kcmutils -kde-kcmutils_LIB= libKF5KCMUtils.so +kde-jsembed_PORT= www/kf${_KDE_VERSION}-kjsembed +kde-jsembed_LIB= libKF${_KDE_VERSION}JsEmbed.so -kde-kdeclarative_PORT= devel/kf5-kdeclarative -kde-kdeclarative_LIB= libKF5Declarative.so +kde-kcmutils_PORT= devel/kf${_KDE_VERSION}-kcmutils +kde-kcmutils_LIB= libKF${_KDE_VERSION}KCMUtils.so -kde-kded_PORT= x11/kf5-kded -kde-kded_PATH= ${KDE_PREFIX}/bin/kded5 +kde-kdeclarative_PORT= devel/kf${_KDE_VERSION}-kdeclarative +kde-kdeclarative_LIB5= libKF${_KDE_VERSION}Declarative.so +kde-kdeclarative_LIB6= libKF${_KDE_VERSION}CalendarEvents.so +kde-kdeclarative_LIB= ${kde-kdeclarative_LIB${_KDE_VERSION}} -kde-kdelibs4support_PORT= x11/kf5-kdelibs4support -kde-kdelibs4support_LIB= libKF5KDELibs4Support.so +kde-kded_PORT= x11/kf${_KDE_VERSION}-kded +kde-kded_PATH= ${KDE_PREFIX}/bin/kded${_KDE_VERSION} -kde-kdesu_PORT= security/kf5-kdesu -kde-kdesu_LIB= libKF5Su.so +kde-kdelibs4support_PORT= x11/kf${_KDE_VERSION}-kdelibs4support +kde-kdelibs4support_LIB= libKF${_KDE_VERSION}KDELibs4Support.so -kde-kdewebkit_PORT= www/kf5-kdewebkit -kde-kdewebkit_LIB= libKF5WebKit.so +kde-kdesu_PORT= security/kf${_KDE_VERSION}-kdesu +kde-kdesu_LIB= libKF${_KDE_VERSION}Su.so -kde-khtml_PORT= www/kf5-khtml -kde-khtml_LIB= libKF5KHtml.so +kde-khtml_PORT= www/kf${_KDE_VERSION}-khtml +kde-khtml_LIB= libKF${_KDE_VERSION}KHtml.so -kde-kimageformats_PORT= graphics/kf5-kimageformats +kde-kimageformats_PORT= graphics/kf${_KDE_VERSION}-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-kio_PORT= devel/kf${_KDE_VERSION}-kio +kde-kio_LIB= libKF${_KDE_VERSION}KIOCore.so -kde-kquickcharts_PORT= graphics/kf5-kquickcharts -kde-kquickcharts_PATH= ${QT_QMLDIR}/org/kde/quickcharts/controls/libchartscontrolsplugin.so +kde-kirigami2_PORT5= x11-toolkits/kf${_KDE_VERSION}-kirigami2 +kde-kirigami2_PORT6= x11-toolkits/kf${_KDE_VERSION}-kirigami +kde-kirigami2_PATH5= ${QT_QMLDIR}/org/kde/kirigami.2/libKirigamiPlugin.so +kde-kirigami2_PATH6= ${QT_QMLDIR}/org/kde/kirigami/libKirigamiplugin.so +kde-kirigami2_PORT= ${kde-kirigami2_PORT${_KDE_VERSION}} +kde-kirigami2_PATH= ${kde-kirigami2_PATH${_KDE_VERSION}} -kde-kross_PORT= lang/kf5-kross -kde-kross_LIB= libKF5KrossCore.so +kde-kquickcharts_PORT= graphics/kf${_KDE_VERSION}-kquickcharts +kde-kquickcharts_PATH5= ${QT_QMLDIR}/org/kde/quickcharts/libQuickCharts.so +kde-kquickcharts_PATH6= ${QT_QMLDIR}/org/kde/quickcharts/libQuickChartsplugin.so +kde-kquickcharts_PATH= ${kde-kquickcharts_PATH${_KDE_VERSION}} -kde-kwayland-server_PORT= x11/plasma5-kwayland-server -kde-kwayland-server_LIB= libKWaylandServer.so +kde-kross_PORT= lang/kf${_KDE_VERSION}-kross +kde-kross_LIB= libKF${_KDE_VERSION}KrossCore.so -kde-layer-shell-qt_PORT= x11/plasma5-layer-shell-qt +kde-layer-shell-qt_PORT= x11/plasma${_KDE_VERSION}-layer-shell-qt kde-layer-shell-qt_LIB= libLayerShellQtInterface.so -kde-mediaplayer_PORT= multimedia/kf5-kmediaplayer -kde-mediaplayer_LIB= libKF5MediaPlayer.so.5 +kde-mediaplayer_PORT= multimedia/kf${_KDE_VERSION}-kmediaplayer +kde-mediaplayer_LIB= libKF${_KDE_VERSION}MediaPlayer.so.5 -kde-newstuff_PORT= devel/kf5-knewstuff -kde-newstuff_LIB= libKF5NewStuff.so +kde-newstuff_PORT= devel/kf${_KDE_VERSION}-knewstuff +kde-newstuff_LIB= libKF${_KDE_VERSION}NewStuffCore.so -kde-notifications_PORT= devel/kf5-knotifications -kde-notifications_LIB= libKF5Notifications.so +kde-notifications_PORT= devel/kf${_KDE_VERSION}-knotifications +kde-notifications_LIB= libKF${_KDE_VERSION}Notifications.so -kde-notifyconfig_PORT= devel/kf5-knotifyconfig -kde-notifyconfig_LIB= libKF5NotifyConfig.so +kde-notifyconfig_PORT= devel/kf${_KDE_VERSION}-knotifyconfig +kde-notifyconfig_LIB= libKF${_KDE_VERSION}NotifyConfig.so -kde-oxygen-icons5_PORT= x11-themes/kf5-oxygen-icons5 +kde-oxygen-icons5_PORT= x11-themes/kf${_KDE_VERSION}-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-oxygen-sounds_PORT= audio/plasma${_KDE_VERSION}-oxygen-sounds +kde-oxygen-sounds_PATH= ${KDE_PREFIX}/share/sounds/Oxygen-Sys-Log-In.ogg +kde-oxygen-sounds_TYPE= run -kde-parts_PORT= devel/kf5-kparts -kde-parts_LIB= libKF5Parts.so +kde-package_PORT= devel/kf${_KDE_VERSION}-kpackage +kde-package_LIB= libKF${_KDE_VERSION}Package.so -kde-people_PORT= devel/kf5-kpeople -kde-people_LIB= libKF5People.so +kde-parts_PORT= devel/kf${_KDE_VERSION}-kparts +kde-parts_LIB= libKF${_KDE_VERSION}Parts.so -kde-plasma-framework_PORT= x11/kf5-plasma-framework -kde-plasma-framework_LIB= libKF5Plasma.so +kde-people_PORT= devel/kf${_KDE_VERSION}-kpeople +kde-people_LIB= libKF${_KDE_VERSION}People.so + +kde-plasma-framework_PORT= x11/kf${_KDE_VERSION}-plasma-framework +kde-plasma-framework_LIB= libKF${_KDE_VERSION}Plasma.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-plotting_PORT= graphics/kf${_KDE_VERSION}-kplotting +kde-plotting_LIB= libKF${_KDE_VERSION}Plotting.so + +kde-prison_PORT= graphics/kf${_KDE_VERSION}-prison +kde-prison_LIB= libKF${_KDE_VERSION}Prison.so -kde-prison_PORT= graphics/kf5-prison -kde-prison_LIB= libKF5Prison.so +kde-pty_PORT= devel/kf${_KDE_VERSION}-kpty +kde-pty_LIB= libKF${_KDE_VERSION}Pty.so -kde-pty_PORT= devel/kf5-kpty -kde-pty_LIB= libKF5Pty.so +kde-purpose_PORT= misc/kf${_KDE_VERSION}-purpose +kde-purpose_LIB= libKF${_KDE_VERSION}Purpose.so -kde-purpose_PORT= misc/kf5-purpose -kde-purpose_LIB= libKF5Purpose.so +kde-qqc2-desktop-style_PORT= x11-themes/kf${_KDE_VERSION}-qqc2-desktop-style +kde-qqc2-desktop-style_PATH5= ${QT_PLUGINDIR}/kf${_KDE_VERSION}/kirigami/org.kde.desktop.so +kde-qqc2-desktop-style_PATH6= ${QT_QMLDIR}/org/kde/desktop/liborg_kde_desktop.so +kde-qqc2-desktop-style_PATH= ${kde-qqc2-desktop-style_PATH${_KDE_VERSION}} -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/kf${_KDE_VERSION}-krunner +kde-runner_LIB= libKF${_KDE_VERSION}Runner.so -kde-runner_PORT= x11/kf5-krunner -kde-runner_LIB= libKF5Runner.so +kde-service_PORT= devel/kf${_KDE_VERSION}-kservice +kde-service_LIB= libKF${_KDE_VERSION}Service.so -kde-service_PORT= devel/kf5-kservice -kde-service_PATH= ${KDE_PREFIX}/bin/kbuildsycoca5 +kde-solid_PORT= devel/kf${_KDE_VERSION}-solid +kde-solid_LIB= libKF${_KDE_VERSION}Solid.so -kde-solid_PORT= devel/kf5-solid -kde-solid_LIB= libKF5Solid.so +kde-sonnet_PORT= textproc/kf${_KDE_VERSION}-sonnet +kde-sonnet_LIB= libKF${_KDE_VERSION}SonnetCore.so -kde-sonnet_PORT= textproc/kf5-sonnet -kde-sonnet_LIB= libKF5SonnetCore.so +kde-syndication_PORT= net/kf${_KDE_VERSION}-syndication +kde-syndication_LIB= libKF${_KDE_VERSION}Syndication.so -kde-syndication_PORT= net/kf5-syndication -kde-syndication_LIB= libKF5Syndication.so +kde-syntaxhighlighting_PORT= textproc/kf${_KDE_VERSION}-syntax-highlighting +kde-syntaxhighlighting_LIB= libKF${_KDE_VERSION}SyntaxHighlighting.so -kde-syntaxhighlighting_PORT= textproc/kf5-syntax-highlighting -kde-syntaxhighlighting_LIB= libKF5SyntaxHighlighting.so +kde-texteditor_PORT= devel/kf${_KDE_VERSION}-ktexteditor +kde-texteditor_LIB= libKF${_KDE_VERSION}TextEditor.so -kde-texteditor_PORT= devel/kf5-ktexteditor -kde-texteditor_LIB= libKF5TextEditor.so +kde-textwidgets_PORT= x11-toolkits/kf${_KDE_VERSION}-ktextwidgets +kde-textwidgets_LIB= libKF${_KDE_VERSION}TextWidgets.so -kde-textwidgets_PORT= x11-toolkits/kf5-ktextwidgets -kde-textwidgets_LIB= libKF5TextWidgets.so +kde-threadweaver_PORT= devel/kf${_KDE_VERSION}-threadweaver +kde-threadweaver_LIB= libKF${_KDE_VERSION}ThreadWeaver.so -kde-threadweaver_PORT= devel/kf5-threadweaver -kde-threadweaver_LIB= libKF5ThreadWeaver.so +kde-unitconversion_PORT= devel/kf${_KDE_VERSION}-kunitconversion +kde-unitconversion_LIB= libKF${_KDE_VERSION}UnitConversion.so -kde-unitconversion_PORT= devel/kf5-kunitconversion -kde-unitconversion_LIB= libKF5UnitConversion.so +kde-wallet_PORT= sysutils/kf${_KDE_VERSION}-kwallet +kde-wallet_LIB= libKF${_KDE_VERSION}Wallet.so -kde-wallet_PORT= sysutils/kf5-kwallet -kde-wallet_LIB= libKF5Wallet.so +kde-wayland_PORT5= x11/kf${_KDE_VERSION}-kwayland +kde-wayland_PORT6= x11/plasma${_KDE_VERSION}-kwayland +kde-wayland_PORT= ${kde-wayland_PORT${_KDE_VERSION}} +kde-wayland_LIB5= libKF${_KDE_VERSION}WaylandClient.so +kde-wayland_LIB6= libKWaylandClient.so +kde-wayland_LIB= ${kde-wayland_LIB${_KDE_VERSION}} -kde-wayland_PORT= x11/kf5-kwayland -kde-wayland_LIB= libKF5WaylandClient.so +kde-widgetsaddons_PORT= x11-toolkits/kf${_KDE_VERSION}-kwidgetsaddons +kde-widgetsaddons_LIB= libKF${_KDE_VERSION}WidgetsAddons.so -kde-widgetsaddons_PORT= x11-toolkits/kf5-kwidgetsaddons -kde-widgetsaddons_LIB= libKF5WidgetsAddons.so +kde-windowsystem_PORT= x11/kf${_KDE_VERSION}-kwindowsystem +kde-windowsystem_LIB= libKF${_KDE_VERSION}WindowSystem.so -kde-windowsystem_PORT= x11/kf5-kwindowsystem -kde-windowsystem_LIB= libKF5WindowSystem.so +kde-xmlgui_PORT= x11-toolkits/kf${_KDE_VERSION}-kxmlgui +kde-xmlgui_LIB= libKF${_KDE_VERSION}XmlGui.so -kde-xmlgui_PORT= x11-toolkits/kf5-kxmlgui -kde-xmlgui_LIB= libKF5XmlGui.so +kde-xmlrpcclient_PORT= net/kf${_KDE_VERSION}-kxmlrpcclient +kde-xmlrpcclient_LIB= libKF${_KDE_VERSION}XmlRpcClient.so + +kde-calendarcore_PORT= net/kf${_KDE_VERSION}-kcalendarcore +kde-calendarcore_LIB= libKF${_KDE_VERSION}CalendarCore.so + +kde-contacts_PORT= net/kf${_KDE_VERSION}-kcontacts +kde-contacts_LIB= libKF${_KDE_VERSION}Contacts.so + +kde-kdav_PORT= net/kf${_KDE_VERSION}-kdav +kde-kdav_LIB= libKF${_KDE_VERSION}DAV.so + +kde-colorscheme_PORT= x11-themes/kf${_KDE_VERSION}-kcolorscheme +kde-colorscheme_LIB= libKF${_KDE_VERSION}ColorScheme.so + +kde-svg_PORT= graphics/kf${_KDE_VERSION}-ksvg +kde-svg_LIB= libKF${_KDE_VERSION}Svg.so + +kde-statusnotifieritem_PORT= deskutils/kf6-kstatusnotifieritem +kde-statusnotifieritem_LIB= libKF${_KDE_VERSION}StatusNotifierItem.so + +kde-userfeedback_PORT= sysutils/kf6-kuserfeedback +kde-userfeedback_LIB= libKF${_KDE_VERSION}UserFeedbackCore.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-kpipewire_PORT= audio/plasma${_KDE_VERSION}-kpipewire +kde-kpipewire_LIB= libKPipeWire.so + +kde-activitymanagerd_PORT= x11/plasma${_KDE_VERSION}-kactivitymanagerd kde-activitymanagerd_LIB= libkactivitymanagerd_plugin.so -kde-breeze_PORT= x11-themes/plasma5-breeze +kde-breeze_PORT= x11-themes/plasma${_KDE_VERSION}-breeze kde-breeze_PATH= ${KDE_PREFIX}/share/QtCurve/Breeze.qtcurve -kde-breeze-gtk_PORT= x11-themes/plasma5-breeze-gtk +kde-breeze-gtk_PORT= x11-themes/plasma${_KDE_VERSION}-breeze-gtk kde-breeze-gtk_PATH= ${KDE_PREFIX}/share/themes/Breeze/gtk-2.0/gtkrc -kde-decoration_PORT= x11-wm/plasma5-kdecoration +kde-decoration_PORT= x11-wm/plasma${_KDE_VERSION}-kdecoration kde-decoration_LIB= libkdecorations2.so -kde-discover_PORT= sysutils/plasma5-discover +kde-discover_PORT= sysutils/plasma${_KDE_VERSION}-discover kde-discover_PATH= ${KDE_PREFIX}/bin/plasma-discover -kde-drkonqi_PORT= sysutils/plasma5-drkonqi +kde-drkonqi_PORT= sysutils/plasma${_KDE_VERSION}-drkonqi kde-drkonqi_PATH= ${KDE_PREFIX}/lib/libexec/drkonqi -kde-hotkeys_PORT= devel/plasma5-khotkeys +kde-hotkeys_PORT= devel/plasma${_KDE_VERSION}-khotkeys kde-hotkeys_LIB= libkhotkeysprivate.so.5 -kde-infocenter_PORT= sysutils/plasma5-kinfocenter +kde-infocenter_PORT= sysutils/plasma${_KDE_VERSION}-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-cli-tools_PORT= sysutils/plasma${_KDE_VERSION}-kde-cli-tools +kde-kde-cli-tools_PATH= ${KDE_PREFIX}/bin/kde-open -kde-kde-gtk-config_PORT= x11-themes/plasma5-kde-gtk-config +kde-kde-gtk-config_PORT= x11-themes/plasma${_KDE_VERSION}-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_PATH= ${QT_PLUGINDIR}/kcm_krunner_dictionary.so +kde-kdeplasma-addons_PORT= x11-toolkits/plasma${_KDE_VERSION}-kdeplasma-addons +kde-kdeplasma-addons_LIB= libplasmapotdprovidercore.so -kde-kgamma5_PORT= x11/plasma5-kgamma5 -kde-kgamma5_PATH= ${QT_PLUGINDIR}/kcm_kgamma.so +kde-kgamma5_PORT5= x11/plasma${_KDE_VERSION}-kgamma5 +kde-kgamma5_PORT6= x11/plasma${_KDE_VERSION}-kgamma +kde-kgamma5_PORT= ${kde-kgamma5_PORT${_KDE_VERSION}} +kde-kgamma5_PATH5= ${QT_PLUGINDIR}/plasma/kcms/systemsettings/kcm_kgamma.so +kde-kgamma5_PATH6= ${QT_PLUGINDIR}/plasma/kcms/systemsettings_qwidgets/kcm_kgamma.so +kde-kgamma5_PATH= ${kde-kgamma5_PATH${_KDE_VERSION}} -kde-kmenuedit_PORT= sysutils/plasma5-kmenuedit +kde-kmenuedit_PORT= sysutils/plasma${_KDE_VERSION}-kmenuedit kde-kmenuedit_PATH= ${KDE_PREFIX}/bin/kmenuedit -kde-kscreen_PORT= x11/plasma5-kscreen +kde-kscreen_PORT= x11/plasma${_KDE_VERSION}-kscreen kde-kscreen_PATH= ${KDE_PREFIX}/bin/kscreen-console -kde-kscreenlocker_PORT= security/plasma5-kscreenlocker +kde-kscreenlocker_PORT= security/plasma${_KDE_VERSION}-kscreenlocker kde-kscreenlocker_LIB= libKScreenLocker.so -kde-ksshaskpass_PORT= security/plasma5-ksshaskpass +kde-ksshaskpass_PORT= security/plasma${_KDE_VERSION}-ksshaskpass kde-ksshaskpass_PATH= ${KDE_PREFIX}/bin/ksshaskpass -kde-ksysguard_PORT= sysutils/plasma5-ksysguard +kde-ksysguard_PORT= sysutils/plasma${_KDE_VERSION}-ksysguard kde-ksysguard_PATH= ${KDE_PREFIX}/bin/ksysguard -kde-ksystemstats_PORT= sysutils/plasma5-ksystemstats +kde-ksystemstats_PORT= sysutils/plasma${_KDE_VERSION}-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-kwallet-pam_PORT= security/plasma${_KDE_VERSION}-kwallet-pam +kde-kwallet-pam_PATH5= ${KDE_PREFIX}/lib/pam_kwallet5.so +kde-kwallet-pam_PATH6= ${KDE_PREFIX}/lib/security/pam_kwallet5.so +kde-kwallet-pam_PATH= ${kde-kwallet-pam_PATH${_KDE_VERSION}} -kde-kwayland-integration_PORT= x11/plasma5-kwayland-integration -kde-kwayland-integration_PATH= ${QT_PLUGINDIR}/kf5/org.kde.kidletime.platforms/KF5IdleTimeKWaylandPlugin.so +kde-kwayland-integration_PORT= x11/plasma${_KDE_VERSION}-kwayland-integration +kde-kwayland-integration_PATH= ${QT_PLUGINDIR}/kf${_KDE_VERSION}/kwindowsystem/KF5WindowSystemKWaylandPlugin.so -kde-kwin_PORT= x11-wm/plasma5-kwin +kde-kwin_PORT= x11-wm/plasma${_KDE_VERSION}-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-kwrited_PORT= devel/plasma${_KDE_VERSION}-kwrited +kde-kwrited_PATH= ${QT_PLUGINDIR}/kf${_KDE_VERSION}/kded/kwrited.so -kde-libkscreen_PORT= x11/plasma5-libkscreen -kde-libkscreen_LIB= libKF5Screen.so +kde-libkscreen_PORT= x11/plasma${_KDE_VERSION}-libkscreen +kde-libkscreen_LIB= libKF${_KDE_VERSION}Screen.so -kde-libksysguard_PORT= sysutils/plasma5-libksysguard -kde-libksysguard_LIB= libksgrd.so +kde-libksysguard_PORT= sysutils/plasma${_KDE_VERSION}-libksysguard +kde-libksysguard_LIB5= libksgrd.so +kde-libksysguard_LIB6= libKSysGuardSystemStats.so +kde-libksysguard_LIB= ${kde-libksysguard_LIB${_KDE_VERSION}} -kde-milou_PORT= deskutils/plasma5-milou -kde-milou_LIB= libmilou.so.5 +kde-milou_PORT= deskutils/plasma${_KDE_VERSION}-milou +kde-milou_PATH5= ${KDE_PREFIX}/lib/libmilou.so.5 +kde-milou_PATH6= ${QT_QMLDIR}/org/kde/milou/libmilouqmlplugin.so +kde-milou_PATH= ${kde-milou_PATH${_KDE_VERSION}} -kde-oxygen_PORT= x11-themes/plasma5-oxygen -kde-oxygen_PATH= ${QT_PLUGINDIR}/styles/oxygen.so +kde-oxygen_PORT= x11-themes/plasma${_KDE_VERSION}-oxygen +kde-oxygen_PATH5= ${QT_PLUGINDIR}/styles/oxygen.so +kde-oxygen_PATH6= ${QT_PLUGINDIR}/kstyle_config/kstyle_oxygen_config.so +kde-oxygen_PATH= ${kde-oxygen_PATH${_KDE_VERSION}} -kde-plasma-browser-integration_PORT= www/plasma5-plasma-browser-integration +kde-plasma-browser-integration_PORT= www/plasma${_KDE_VERSION}-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_PORT= x11/plasma${_KDE_VERSION}-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-disks_PORT= sysutils/plasma${_KDE_VERSION}-plasma-disks +kde-plasma-disks_PATH5= ${KDE_PREFIX}/lib/libexec/kauth/kded-smart-helper +kde-plasma-disks_PATH6= ${KDE_PREFIX}/lib/libexec/kf6/kauth/kded-smart-helper +kde-plasma-disks_PATH= ${kde-plasma-disks_PATH${_KDE_VERSION}} -kde-plasma-integration_PORT= x11/plasma5-plasma-integration -kde-plasma-integration_PATH= ${QT_PLUGINDIR}/platformthemes/KDEPlasmaPlatformTheme.so +kde-plasma-integration_PORT= x11/plasma${_KDE_VERSION}-plasma-integration +kde-plasma-integration_PATH5= ${QT_PLUGINDIR}/platformthemes/KDEPlasmaPlatformTheme.so +kde-plasma-integration_PATH6= ${QT_PLUGINDIR}/platformthemes/KDEPlasmaPlatformTheme6.so +kde-plasma-integration_PATH= ${kde-plasma-integration_PATH${_KDE_VERSION}} -kde-plasma-pa_PORT= audio/plasma5-plasma-pa -kde-plasma-pa_PATH= ${QT_PLUGINDIR}/kcms/kcm_pulseaudio.so +kde-plasma-pa_PORT= audio/plasma${_KDE_VERSION}-plasma-pa +kde-plasma-pa_PATH= ${QT_PLUGINDIR}/plasma/kcms/systemsettings/kcm_pulseaudio.so -kde-plasma-sdk_PORT= devel/plasma5-plasma-sdk +kde-plasma-sdk_PORT= devel/plasma${_KDE_VERSION}-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_PORT= x11/plasma${_KDE_VERSION}-plasma-workspace +kde-plasma-workspace_LIB= libkworkspace${_KDE_VERSION}.so -kde-plasma-workspace-wallpapers_PORT= x11-themes/plasma5-plasma-workspace-wallpapers +kde-plasma-workspace-wallpapers_PORT= x11-themes/plasma${_KDE_VERSION}-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_PORT= sysutils/plasma${_KDE_VERSION}-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_PORT= sysutils/plasma${_KDE_VERSION}-powerdevil kde-powerdevil_LIB= libpowerdevilcore.so -kde-systemsettings_PORT= sysutils/plasma5-systemsettings -kde-systemsettings_PATH= ${KDE_PREFIX}/bin/systemsettings5 +kde-systemsettings_PORT= sysutils/plasma${_KDE_VERSION}-systemsettings +kde-systemsettings_PATH5= ${KDE_PREFIX}/bin/systemsettings5 +kde-systemsettings_PATH6= ${KDE_PREFIX}/bin/systemsettings +kde-systemsettings_PATH= ${kde-systemsettings_PATH${_KDE_VERSION}} + + + +kde-xdg-desktop-portal-kde_PORT= deskutils/plasma${_KDE_VERSION}-xdg-desktop-portal-kde +kde-xdg-desktop-portal-kde_PATH= ${KDE_PREFIX}/lib/libexec/xdg-desktop-portal-kde + +kde-plasma5support_PORT= devel/plasma${_KDE_VERSION}-plasma5support +kde-plasma5support_LIB= libPlasma5Support.so + +kde-kirigami-addons_PORT5= x11-toolkits/kirigami-addons +kde-kirigami-addons_PORT6= x11-toolkits/kirigami-addons-devel +kde-kirigami-addons_PORT= ${kde-kirigami-addons_PORT${_KDE_VERSION}} +kde-kirigami-addons_PATH= ${QT_QMLDIR}/org/kde/kirigamiaddons/components/libcomponentsplugin.so + +kde-globalacceld_PORT= x11/plasma${_KDE_VERSION}-kglobalacceld +kde-globalacceld_PATH= ${QT_PLUGINDIR}/org.kde.kglobalacceld.platforms/KGlobalAccelDXcb.so + +kde-libplasma_PORT= x11/plasma${_KDE_VERSION}-libplasma +kde-libplasma_LIB= libPlasma.so # ====================== end of plasma components ============================== # ====================== pim5 components ======================================= kde-akonadicontacts_PORT= net/akonadi-contacts -kde-akonadicontacts_LIB= libKF5AkonadiContact.so +kde-akonadicontacts_LIB= libKPim5AkonadiContact.so kde-akonadiimportwizard_PORT= deskutils/akonadi-import-wizard -kde-akonadiimportwizard_LIB= libKPimImportWizard.so +kde-akonadiimportwizard_LIB= libKPim5ImportWizard.so kde-akonadimime_PORT= net/akonadi-mime -kde-akonadimime_LIB= libKF5AkonadiMime.so +kde-akonadimime_LIB= libKPim5AkonadiMime.so kde-akonadinotes_PORT= net/akonadi-notes -kde-akonadinotes_LIB= libKF5AkonadiNotes.so +kde-akonadinotes_LIB= libKPim5AkonadiNotes.so kde-akonadicalendar_PORT= net/akonadi-calendar -kde-akonadicalendar_LIB= libKF5AkonadiCalendar.so +kde-akonadicalendar_LIB= libKPim5AkonadiCalendar.so kde-akonadisearch_PORT= net/akonadi-search -kde-akonadisearch_LIB= libKF5AkonadiSearchCore.so - -kde-alarmcalendar_PORT= net/kalarmcal -kde-alarmcalendar_LIB= libKF5AlarmCalendar.so +kde-akonadisearch_LIB= libKPim5AkonadiSearchCore.so kde-calendarsupport_PORT= net/calendarsupport -kde-calendarsupport_LIB= libKF5CalendarSupport.so - -kde-calendarcore_PORT= net/kf5-kcalendarcore -kde-calendarcore_LIB= libKF5CalendarCore.so +kde-calendarsupport_LIB= libKPim5CalendarSupport.so kde-calendarutils_PORT= net/kcalutils -kde-calendarutils_LIB= libKF5CalendarUtils.so - -kde-contacts_PORT= net/kf5-kcontacts -kde-contacts_LIB= libKF5Contacts.so +kde-calendarutils_LIB= libKPim5CalendarUtils.so kde-eventviews_PORT= net/eventviews -kde-eventviews_LIB= libKF5EventViews.so +kde-eventviews_LIB= libKPim5EventViews.so kde-gapi_PORT= net/libkgapi -kde-gapi_LIB= libKPimGAPICore.so +kde-gapi_LIB= libKPim5GAPIBlogger.so kde-grantleetheme_PORT= deskutils/grantleetheme -kde-grantleetheme_LIB= libKF5GrantleeTheme.so +kde-grantleetheme_LIB= libKPim5GrantleeTheme.so kde-gravatar_PORT= net/libgravatar -kde-gravatar_LIB= libKF5Gravatar.so +kde-gravatar_LIB= libKPim5Gravatar.so kde-identitymanagement_PORT= net/kidentitymanagement -kde-identitymanagement_LIB= libKF5IdentityManagement.so +kde-identitymanagement_LIB= libKPim5IdentityManagement.so kde-imap_PORT= net/kimap -kde-imap_LIB= libKF5IMAP.so +kde-imap_LIB= libKPim5IMAP.so kde-incidenceeditor_PORT= net/incidenceeditor -kde-incidenceeditor_LIB= libKF5IncidenceEditor.so - -kde-kdav_PORT= net/kf5-kdav -kde-kdav_LIB= libKF5DAV.so +kde-incidenceeditor_LIB= libKPim5IncidenceEditor.so kde-kdepim-addons_PORT= deskutils/kdepim-addons -kde-kdepim-addons_PATH= ${KDE_PREFIX}/lib/contacteditor/editorpageplugins/cryptopageplugin.so +kde-kdepim-addons_PATH= ${QT_PLUGINDIR}/pim5/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-kitinerary_LIB= libKPim5Itinerary.so kde-kontactinterface_PORT= net/kontactinterface -kde-kontactinterface_LIB= libKF5KontactInterface.so +kde-kontactinterface_LIB= libKPim5KontactInterface.so kde-kpkpass_PORT= security/kpkpass -kde-kpkpass_LIB= libKPimPkPass.so +kde-kpkpass_LIB= libKPim5PkPass.so kde-ksmtp_PORT= net/ksmtp -kde-ksmtp_LIB= libKPimSMTP.so +kde-ksmtp_LIB= libKPim5SMTP.so kde-ldap_PORT= net/kldap -kde-ldap_LIB= libKF5Ldap.so +kde-ldap_LIB= libKPim5Ldap.so kde-libkdepim_PORT= deskutils/libkdepim -kde-libkdepim_LIB= libKF5Libkdepim.so +kde-libkdepim_LIB= libKPim5Libkdepim.so kde-libkleo_PORT= security/libkleo -kde-libkleo_LIB= libKF5Libkleo.so +kde-libkleo_LIB= libKPim5Libkleo.so kde-libksieve_PORT= net/libksieve -kde-libksieve_LIB= libKF5KSieve.so +kde-libksieve_LIB= libKPim5KSieve.so kde-mailcommon_PORT= net/mailcommon -kde-mailcommon_LIB= libKF5MailCommon.so +kde-mailcommon_LIB= libKPim5MailCommon.so kde-mailimporter_PORT= net/mailimporter -kde-mailimporter_LIB= libKF5MailImporter.so +kde-mailimporter_LIB= libKPim5MailImporter.so kde-mailtransport_PORT= net/kmailtransport -kde-mailtransport_LIB= libKF5MailTransport.so +kde-mailtransport_LIB= libKPim5MailTransport.so kde-mbox_PORT= net/kmbox -kde-mbox_LIB= libKF5Mbox.so +kde-mbox_LIB= libKPim5Mbox.so kde-messagelib_PORT= net/messagelib -kde-messagelib_LIB= libKF5MessageList.so +kde-messagelib_LIB= libKPim5MessageList.so kde-mime_PORT= net/kmime -kde-mime_LIB= libKF5Mime.so +kde-mime_LIB= libKPim5Mime.so kde-pimcommon_PORT= net/pimcommon -kde-pimcommon_LIB= libKF5PimCommon.so +kde-pimcommon_LIB= libKPim5PimCommon.so kde-pimtextedit_PORT= net/kpimtextedit -kde-pimtextedit_LIB= libKF5PimTextEdit.so +kde-pimtextedit_LIB= libKPim5TextEdit.so kde-tnef_PORT= net/ktnef -kde-tnef_LIB= libKF5Tnef.so +kde-tnef_LIB= libKPim5Tnef.so + +kde-ktextaddons_PORT= devel/ktextaddons +kde-ktextaddons_LIB= libKF${_KDE_VERSION}TextAutoCorrectionCore.so # PIM Applications kde-akonadiconsole_PORT= deskutils/akonadiconsole @@ -806,37 +955,41 @@ kde-pim-data-exporter_PATH= ${KDE_PREFIX}/bin/pimdataexporter # ====================== multiversion component ================================ kde-akonadi5_PORT= databases/akonadi -kde-akonadi5_LIB= libKF5AkonadiPrivate.so +kde-akonadi5_LIB= libKPim5AkonadiPrivate.so kde-baloo-widgets5_PORT= sysutils/baloo-widgets -kde-baloo-widgets5_LIB= libKF5BalooWidgets.so +kde-baloo-widgets5_LIB= libKF${_KDE_VERSION}BalooWidgets.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-libkcddb5_LIB= libKF${_KDE_VERSION}Cddb.so kde-libkcompactdisc5_PORT= audio/libkcompactdisc -kde-libkcompactdisc5_LIB= libKF5CompactDisc.so +kde-libkcompactdisc5_LIB= libKF${_KDE_VERSION}CompactDisc.so -kde-libkdcraw5_PORT= graphics/libkdcraw -kde-libkdcraw5_LIB= libKF5KDcraw.so +kde-libkdcraw5_PORT= graphics/libkdcraw@qt${_KDE_VERSION} +kde-libkdcraw5_LIB= libKF${_KDE_VERSION}KDcraw.so kde-libkdegames5_PORT= games/libkdegames -kde-libkdegames5_LIB= libKF5KDEGames.so +kde-libkdegames5_LIB= libKF${_KDE_VERSION}KDEGames.so kde-libkeduvocdocument5_PORT= misc/libkeduvocdocument kde-libkeduvocdocument5_LIB= libKEduVocDocument.so -kde-libkexiv25_PORT= graphics/libkexiv2 -kde-libkexiv25_LIB= libKF5KExiv2.so +kde-libkexiv2_PORT5= graphics/libkexiv2 +kde-libkexiv2_PORT6= graphics/libkexiv2-devel +kde-libkexiv2_PORT= ${kde-libkexiv2_PORT${_KDE_VERSION}} +kde-libkexiv2_LIB5= libKF${_KDE_VERSION}KExiv2.so +kde-libkexiv2_LIB6= libKExiv2Qt${_KDE_VERSION}.so +kde-libkexiv2_LIB= ${kde-libkexiv2_LIB${_KDE_VERSION}} kde-libkipi5_PORT= graphics/libkipi -kde-libkipi5_LIB= libKF5Kipi.so +kde-libkipi5_LIB= libKF${_KDE_VERSION}Kipi.so kde-libksane5_PORT= graphics/libksane -kde-libksane5_LIB= libKF5Sane.so +kde-libksane5_LIB= libKF${_KDE_VERSION}Sane.so kde-marble5_PORT= astro/marble kde-marble5_LIB= libmarblewidget-qt5.so @@ -849,6 +1002,12 @@ kde-kosm_LIB= libKOSM.so kde-okular5_PORT= graphics/okular kde-okular5_LIB= libOkular5Core.so + +kde-phonon_PORT= multimedia/phonon@${_QT_RELNAME} +kde-phonon_LIB= libphonon4${_QT_RELNAME}.so + +kde-phonon-backend_PORT= multimedia/phonon-vlc@${_QT_RELNAME} +kde-phonon-backend_PATH= ${QT_PLUGINDIR}/phonon4${_QT_RELNAME}_backend/phonon_vlc_${_QT_RELNAME}.so # ====================== end of multiversion components ======================== # ====================== select the proper multiversion component ============== @@ -870,18 +1029,18 @@ kde-${comp}_PATH= ${kde-${comp}${_KDE_VERSION}_LIB} _USE_KDE_ALL= ${_USE_${_KDE_RELNAME}_ALL} # Iterate through components deprived of suffix. -. for component in ${USE_KDE:O:u:C/_.+//} +. 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}} == "" +. if ${USE_KDE:M${component}\:*} != "" && ${USE_KDE:M${component}} == "" kde-${component}_TYPE= # empty -. if ${USE_KDE:M${component}_build} != "" +. if ${USE_KDE:M${component}\:build} != "" kde-${component}_TYPE+= build . endif -. if ${USE_KDE:M${component}_run} != "" +. if ${USE_KDE:M${component}\:run} != "" kde-${component}_TYPE+= run . endif . endif # ${USE_KDE:M${component}_*} != "" && ${USE_KDE:M${component}} == "" diff --git a/Mk/Uses/kmod.mk b/Mk/Uses/kmod.mk index 26400765b6b6..a28077e67697 100644 --- a/Mk/Uses/kmod.mk +++ b/Mk/Uses/kmod.mk @@ -11,26 +11,27 @@ _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 +PIE_UNSAFE= kernel modules are not executable 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%%\"" ; \ @@ -55,13 +56,13 @@ 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 @@ -72,10 +73,10 @@ _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 @@ -13,11 +13,11 @@ _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 \ @@ -29,7 +29,7 @@ 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 \ @@ -39,6 +39,6 @@ kodi-autoplist: ${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..ef5569ab8eb9 100644 --- a/Mk/Uses/lazarus.mk +++ b/Mk/Uses/lazarus.mk @@ -2,14 +2,16 @@ # # Feature: lazarus # Usage: USES=lazarus -# Valid ARGS: (none), gtk2, qt5, flavors +# Valid ARGS: (none), gtk2, qt5, qt6, 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 -# +# +# qt6 - This automatically build lazarus-app with qt6 interface +# # flavors - This automatically build lazarus-app with flavors feature # # If the port not requires compile lazarus project files automatically, you can @@ -42,19 +44,19 @@ 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} -IGNORE= Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt5:Nflavors} -.endif +. if ${lazarus_ARGS:Ngtk2:Nqt5:Nqt6:Nflavors} +IGNORE= Unknown argument for USES=lazarus: ${lazarus_ARGS:Ngtk2:Nqt5:Nqt6:Nflavors} +. endif -.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 +. if !empty(LAZARUS_NO_FLAVORS) +. if ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5:Nqt6} +IGNORE= Unknown argument for LAZARUS_NO_FLAVORS: ${LAZARUS_NO_FLAVORS:Ngtk2:Nqt5:Nqt6} +. endif +. endif DEFAULT_LAZARUS_VER= ${LAZARUS_DEFAULT} DEFAULT_FPC_VER= ${FPC_DEFAULT} @@ -69,53 +71,64 @@ 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 +. if !defined(WANT_FPC_DEVEL) +FPC_DEVELSUFFIX= # +. else +FPC_DEVELSUFFIX= -devel +. endif 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 +BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils \ + ${MKINSTDIR}/utils-lexyacc.fpm:lang/fpc${FPC_DEVELSUFFIX} + +LAZARUS_FLAVORS= gtk2 qt5 qt6 -.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 -BUILD_DEPENDS+= ${MKINSTDIR}/gtk2.fpm:x11-toolkits/fpc-gtk2 +. if ${lazarus_ARGS:Mgtk2} || ${FLAVOR} == gtk2 LIB_DEPENDS+= libglib-2.0.so:devel/glib20 \ libgtk-x11-2.0.so:x11-toolkits/gtk20 \ - libatk-1.0.so:accessibility/atk \ + libatk-1.0.so:accessibility/at-spi2-core \ 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 + +. if ${lazarus_ARGS:Mqt6} || ${FLAVOR} == qt6 +LIB_DEPENDS+= libQt6Pas.so:x11-toolkits/qt6pas +LCL_PLATFORM= qt6 +BUILD_DEPENDS+= ${LCL_UNITS_DIR}/${LCL_PLATFORM}/interfaces.ppu:editors/lazarus-qt6${LAZARUS_DEVELSUFFIX} +. endif LAZBUILD_CMD= ${LOCALBASE}/bin/lazbuild LAZBUILD_ARGS?= # empty @@ -127,15 +140,15 @@ _USES_POST+= lazarus .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} - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${LAZBUILD_CMD} \ +. for PROJECT_FILE in ${LAZARUS_PROJECT_FILES} + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${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/ldap.mk b/Mk/Uses/ldap.mk new file mode 100644 index 000000000000..893ebb70ca22 --- /dev/null +++ b/Mk/Uses/ldap.mk @@ -0,0 +1,108 @@ +# Provide support for OpenLDAP +# Feature: ldap +# Usage: USES=ldap or USES=ldap:args +# Valid ARGS: <version>, client, server, (none) +# +# 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 (OpenLDAP-2.6 = 26, look at bsd.default-versions.mk for +# possible values). +# client Depends on the libldap library (default) +# server +# Depend on the server at runtime. If none of these is +# set, depends on the client. +# +# IGNORE_WITH_OPENLDAP +# This variable can be defined if the ports does not support one +# or more version of OpenLDAP. +# WITH_OPENLDAP_VER +# User defined variable to set OpenLDAP version. +# OPENLDAP_VER +# Detected OpenLDAP version. +# +# MAINTAINER: ports@FreeBSD.org + +.if !defined(_INCLUDE_USES_LDAP_MK) +_INCLUDE_USES_LDAP_MK= yes + +. if !empty(ldap_ARGS) +.undef _WANT_OPENLDAP_VER +.undef _WANT_OPENLDAP_SERVER +_OPENLDAP_ARGS= ${ldap_ARGS:S/,/ /g} +. if ${_OPENLDAP_ARGS:Mserver} +_WANT_OPENLDAP_SERVER= yes +_OPENLDAP_ARGS:= ${_OPENLDAP_ARGS:Nserver} +. endif +. if ${_OPENLDAP_ARGS:Mclient} +_WANT_OPENLDAP_CLIENT= yes +_OPENLDAP_ARGS:= ${_OPENLDAP_ARGS:Nclient} +. endif + +# Port requested a version +. if !empty(_OPENLDAP_ARGS) +_WANT_OPENLDAP_VER= ${_OPENLDAP_ARGS} +. endif +. endif # !empty(ldap_ARGS) + +. if defined(DEFAULT_OPENLDAP_VER) +WARNING+= "DEFAULT_OPENLDAP_VER is defined, consider using DEFAULT_VERSIONS=openldap=${DEFAULT_OPENLDAP_VER} instead" +. endif + +DEFAULT_OPENLDAP_VER?= ${OPENLDAP_DEFAULT:S/.//} +# OpenLDAP client version currently supported. +# When adding a version, please keep the comment in +# Mk/bsd.default-versions.mk in sync. +# OpenLDAP client versions currently supported +OPENLDAP25_LIB= libldap-2.5.so.0 +OPENLDAP26_LIB= libldap.so.2 + +. 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 + +. 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 +OPENLDAP_VER= ${WANT_OPENLDAP_VER} +. elif defined(WITH_OPENLDAP_VER) +OPENLDAP_VER= ${WITH_OPENLDAP_VER} +. else +. if defined(_OPENLDAP_VER) +OPENLDAP_VER= ${_OPENLDAP_VER} +. else +OPENLDAP_VER= ${DEFAULT_OPENLDAP_VER} +. endif +. endif # WANT_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 + +CFLAGS+= -DLDAP_DEPRECATED + +_OPENLDAP_CLIENT= net/openldap${OPENLDAP_VER}-client +_OPENLDAP_SERVER= net/openldap${OPENLDAP_VER}-server + +# And now we are checking if we can use it +. if defined(OPENLDAP${OPENLDAP_VER}_LIB) +. 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 +. if defined(_WANT_OPENLDAP_SERVER) +RUN_DEPENDS+= ${LOCALBASE}/libexec/slapd:${_OPENLDAP_SERVER} +. endif +. if defined(_WANT_OPENLDAP_CLIENT) || !defined(_WANT_OPENLDAP_SERVER) +LIB_DEPENDS+= ${OPENLDAP${OPENLDAP_VER}_LIB}:${_OPENLDAP_CLIENT} +. endif +. else +IGNORE= cannot install: unknown OpenLDAP version: ${OPENLDAP_VER} +. endif # Check for correct libs + +.endif # !defined(_INCLUDE_USES_LDAP_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 @@ -8,9 +8,9 @@ _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} diff --git a/Mk/Uses/libarchive.mk b/Mk/Uses/libarchive.mk index 71e513e96057..460a248455d8 100644 --- a/Mk/Uses/libarchive.mk +++ b/Mk/Uses/libarchive.mk @@ -4,7 +4,7 @@ # Usage: USES=libarchive # Valid ARGS: none # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_LIBARCHIVE_MK) _INCLUDE_USES_LIBARCHIVE_MK= yes diff --git a/Mk/Uses/libedit.mk b/Mk/Uses/libedit.mk index 293b3e672aa8..b5d3b4883e8a 100644 --- a/Mk/Uses/libedit.mk +++ b/Mk/Uses/libedit.mk @@ -4,7 +4,7 @@ # Usage: USES=libedit # Valid ARGS: none # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_LIBEDIT_MK) _INCLUDE_USES_LIBEDIT_MK= yes 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 @@ -15,9 +15,9 @@ _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) @@ -67,16 +67,16 @@ patch-libtool: _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 0750a47982ed..e098234fcbc5 100644 --- a/Mk/Uses/linux.mk +++ b/Mk/Uses/linux.mk @@ -23,24 +23,24 @@ _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 -IGNORE= Invalid Linux distribution: ${linux_ARGS} -.endif +. else +ERROR+= "Invalid Linux distribution: ${linux_ARGS}" +. endif -.ifndef ONLY_FOR_ARCHS -ONLY_FOR_ARCHS= amd64 i386 -ONLY_FOR_ARCHS_REASON= Linux compatibility is only available on amd64 and i386 -.endif +. 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 _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 @@ -51,18 +51,19 @@ _linux_c7_at-spi2-core= linux-c7-at-spi2-core>0:accessibility/linux-c7-at-spi2 _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_c7_ca-certificates= linux-c7-ca-certificates>0:security/linux-c7-ca-certificates _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_c7_expat-devel= linux-c7-expat-devel>0:textproc/linux-c7-expat-devel _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 @@ -112,6 +113,7 @@ _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-devel= linux-c7-openssl-devel>0:security/linux-c7-openssl-devel _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 @@ -136,41 +138,45 @@ _linux_${linux_ARGS}_userspace-rcu= linux-${linux_ARGS}-userspace-rcu>0:sysutils _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 +_linux_c7_zlib-devel= linux-c7-zlib-devel>0:devel/linux-c7-zlib-devel 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= centos/${LINUX_DIST_VER}/os/x86_64/Packages/:DEFAULT,amd64 \ +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} @@ -180,93 +186,100 @@ 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:Mamd64)) \ +. 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)) \ && empty(NOT_FOR_ARCHS:Mamd64) -.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_i386: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 -DISTFILES_amd64?= ${LIB_DISTNAMES:S/$/${EXTRACT_SUFX_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 +. 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_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_amd64 +. ifdef DISTNAME_aarch64 +DISTFILES_aarch64?= ${DISTNAME_aarch64}${EXTRACT_SUFX} +. 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 -.ifndef DISTFILES -.ifdef DISTFILES_amd64 || DISTFILES_i386 -.if make(makesum) -_ALL_DISTFILES= ${DISTFILES_amd64} ${DISTFILES_i386} +. endif + +. 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/llvm.mk b/Mk/Uses/llvm.mk new file mode 100644 index 000000000000..cc6e7f464fcc --- /dev/null +++ b/Mk/Uses/llvm.mk @@ -0,0 +1,144 @@ +# Provides support to depend on LLVM +# +# USES=llvm supports two kinds of arguments: +# +# * mode +# <none>: defaults to build +# build: add a BUILD_DEPENDS on chosen llvm-port +# run: add a RUN_DEPENDS on chosen llvm-port +# lib: add a LIB_DEPENDS on chosen llvm-port +# +# * version +# <none>: defaults to ${LLVM_DEFAULT} +# number: use explicitly the specified version +# min=number: use specified min if ${LLVM_DEFAULT} is lower +# max=number: use specified max if ${LLVM_DEFAULT} is higher +# +# * environment +# export: do export CC, CXX,... variables [default] +# noexport: do not export CC,CXX,... variables +# +# An example usage might be: +# USES= llvm +# or +# USES= llvm:13,build +# or +# USES= llvm:min=14,lib +# +# The following variables are exposed to be used in the ports tree at the moment: +# * LLVM_VERSION version chosen from the arguments to llvm.mk +# * LLVM_PORT chosen llvm port +# * LLVM_CONFIG llvm-config of the chosen port +# * LLVM_LIBLLVM libLLVM.so of the chosen port +# * LLVM_PREFIX installation prefix of the chosen port +# + +.if !defined(_INCLUDE_USES_LLVM_MK) +_INCLUDE_USES_LLVM_MK= YES + +_LLVM_MK_VALID_VERSIONS= 11 12 13 14 15 16 17 18 +_LLVM_MK_VALID_CONSTRAINTS= min max +_LLVM_MK_VALID_MODES= build run lib +_LLVM_MK_VALID_EXPORTS= export noexport + +# === parse mode arguments === +_LLVM_MK_MODES= # empty +. for _mode in ${_LLVM_MK_VALID_MODES} +. if ${llvm_ARGS:M${_mode}} +_LLVM_MK_MODES+= ${_mode} +. endif +. endfor +. if empty(_LLVM_MK_MODES) +_LLVM_MK_MODES= build +. endif + +# === parse version arguments === +_LLVM_MK_VERSION= # empty +. for _ver in ${_LLVM_MK_VALID_VERSIONS} +. if ${llvm_ARGS:M${_ver}} +. if !empty(_LLVM_MK_VERSION) +BROKEN= USES=llvm:${llvm_ARGS} contains multiple version definitions +. else +_LLVM_MK_VERSION= ${_ver} +. endif +. endif +. endfor +. if empty(_LLVM_MK_VERSION) +. if ${LLVM_DEFAULT:N1[0-9]*} +_LLVM_MK_VERSION= ${LLVM_DEFAULT:S/0$//} +. else +_LLVM_MK_VERSION= ${LLVM_DEFAULT} +. endif +. endif + +# === parse environment arguments === +_LLVM_MK_EXPORT= # empty +. for _export in ${_LLVM_MK_VALID_EXPORTS} +. if ${llvm_ARGS:M${_export}} +. if !empty(_LLVM_MK_EXPORT) +BROKEN= USES=llvm:${llvm_ARGS} contains multiple export definitions +. else +_LLVM_MK_EXPORT= ${_export} +. endif +. endif +. endfor +. if empty(_LLVM_MK_EXPORT) +_LLVM_MK_EXPORT= export +. endif + +# === handle constraints === +. for _constraint in ${_LLVM_MK_VALID_CONSTRAINTS} +_version= ${llvm_ARGS:M${_constraint}=[0-9]*:S/${_constraint}=//} +. if !empty(_version) +_LLVM_MK_CONSTRAINT_${_constraint}:= ${_version} +. endif +. endfor + +. if !empty(_LLVM_MK_CONSTRAINT_min) +. if ${_LLVM_MK_CONSTRAINT_min} > ${_LLVM_MK_VERSION} +_LLVM_MK_VERSION= ${_LLVM_MK_CONSTRAINT_min} +. endif +. endif + +. if !empty(_LLVM_MK_CONSTRAINT_max) +. if ${_LLVM_MK_CONSTRAINT_max} < ${_LLVM_MK_VERSION} +_LLVM_MK_VERSION= ${_LLVM_MK_CONSTRAINT_max} +. endif +. endif + +# === define helpers for the dependencies === +. for _ver in ${_LLVM_MK_VALID_VERSIONS:N1[0-9]} +_LLVM_MK_SUFFIX_${_ver}= ${_ver}0 +. endfor + +. for _ver in ${_LLVM_MK_VALID_VERSIONS} +_LLVM_MK_SUFFIX_${_ver}?= ${_ver} +. endfor + +# === define variables to depend on and export === +_LLVM_MK_PORT= devel/llvm${_LLVM_MK_SUFFIX_${_LLVM_MK_VERSION}} +_LLVM_MK_LIBLLVM= libLLVM-${_LLVM_MK_VERSION}.so +_LLVM_MK_PATH= llvm-config${_LLVM_MK_SUFFIX_${_LLVM_MK_VERSION}} +_LLVM_MK_PREFIX= ${PREFIX}/llvm${_LLVM_MK_SUFFIX_${_LLVM_MK_VERSION}} + +# == add actual dependencies === +_LLVM_MK_PATH_lib= ${_LLVM_MK_LIBLLVM} +. for _mode in ${_LLVM_MK_MODES} +_LLVM_MK_PATH_${_mode}?= ${_LLVM_MK_PATH} +${_mode:tu}_DEPENDS+= ${_LLVM_MK_PATH_${_mode}}:${_LLVM_MK_PORT} +. endfor + +# == export config === +LLVM_PORT= ${_LLVM_MK_PORT} +LLVM_CONFIG= ${_LLVM_MK_PATH} +LLVM_LIBLLVM= ${_LLVM_MK_LIBLLVM} +LLVM_VERSION= ${_LLVM_MK_VERSION} +LLVM_PREFIX= ${_LLVM_MK_PREFIX} + +. if empty(_LLVM_MK_EXPORT:Mnoexport) +CC= ${LLVM_PREFIX}/bin/clang +CXX= ${LLVM_PREFIX}/bin/clang++ +CPP= ${LLVM_PREFIX}/bin/clang-cpp +. endif + +.endif diff --git a/Mk/Uses/localbase.mk b/Mk/Uses/localbase.mk index b14173afd709..58103a6b85ce 100644 --- a/Mk/Uses/localbase.mk +++ b/Mk/Uses/localbase.mk @@ -4,7 +4,7 @@ # Usage: USES=localbase or USES=localbase:args # Valid ARGS: ldflags Set LDFLAGS instead of LIBS # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_LOCALBASE_MK) _INCLUDE_USES_LOCALBASE_MK= yes @@ -17,11 +17,11 @@ _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. 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 @@ -56,9 +56,9 @@ _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/.//} @@ -67,107 +67,107 @@ _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 @@ -186,17 +186,17 @@ _LUA_NUM_ALL:= \ _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 @@ -207,11 +207,11 @@ _LUA_WANTED_VERSION:= ${_LUA_WANTED_VERSIONS:[1]} # 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} @@ -253,28 +253,28 @@ MAKE_ENV+= LUA_MODLIBDIR=${LUA_MODLIBDIR} \ # 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/luajit.mk b/Mk/Uses/luajit.mk new file mode 100644 index 000000000000..c7a15b191209 --- /dev/null +++ b/Mk/Uses/luajit.mk @@ -0,0 +1,40 @@ +# Select your favorite luajit runtime +# Feature: luajit +# Usage: USES= luajit[:version] +# MAINTAINER: adamw@FreeBSD.org + +# After bsd.port.options.mk or bsd.port.pre.mk, the following are set: +# LUAJIT_VER: The selected luajit version +# LUAJIT_INCDIR: The path to luajit's header files +# LUAJIT_LUAVER: Which luajit spec version is selected +# (2.0 for luajit, else 2.1) + +.if !defined(_INCLUDE_USES_LUAJIT_MK) +_INCLUDE_USES_LUAJIT_MK=yes + +.if !empty(luajit_ARGS) +LUAJIT_VER= ${luajit_ARGS} +.else +LUAJIT_VER= ${LUAJIT_DEFAULT} +.endif + +# When adding a version, please keep the comment in +# Mk/bsd.default-versions.mk in sync +VALID_LUAJIT_VER= luajit luajit-devel luajit-openresty + +.if empty(VALID_LUAJIT_VER:M${LUAJIT_DEFAULT}) +IGNORE= Invalid luajit default version ${LUAJIT_DEFAULT}: valid versions are ${VALID_LUAJIT_VER} +.elif empty(VALID_LUAJIT_VER:M${LUAJIT_VER}) +IGNORE= Invalid luajit version ${LUAJIT_VER}: valid versions are ${VALID_LUAJIT_VER} +.endif + +.if ${LUAJIT_VER} == luajit +LUAJIT_LUAVER= 2.0 +.else +LUAJIT_LUAVER= 2.1 +.endif + +LIB_DEPENDS+= libluajit-5.1.so:lang/${LUAJIT_VER} +LUAJIT_INCDIR= ${LOCALBASE}/include/luajit-${LUAJIT_LUAVER} + +.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 @@ -18,9 +18,9 @@ .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} @@ -59,42 +59,42 @@ 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) diff --git a/Mk/Uses/magick.mk b/Mk/Uses/magick.mk new file mode 100644 index 000000000000..9739a8260f9d --- /dev/null +++ b/Mk/Uses/magick.mk @@ -0,0 +1,125 @@ +# Handle dependency on ImageMagick +# +# Feature: magick +# Usage: USES=magick:ARGS +# Valid ARGS: [version],[flavor],[kinds] +# +# version The chooseable versions are <none>, 6 and 7. +# USES=magick -- depend on version from DEFAULT_VERSIONS +# USES=magick:6 -- depend on ImageMagick6 +# USES=magick:7 -- depend on ImageMagick7 +# +# flavor The flavors are <none>, x11 and nox11 +# USES=magick -- depend on flavor from DEFAULT_VERSIONS +# USES=magick:x11 -- depend on the x11 flavor +# USES=magick:nox11 -- depend on the nox11 flavor +# +# kinds The dependency kinds are <none>, 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=magick:build,run -- add a BUILD_- and RUN_DEPENDS +# +# In short, on a default ports tree without custom DEFAULT_VERSIONS +# USES=magick +# is equivalent to +# USES=magick:7,x11,lib +# +# Make sure to only add arguments strictly needed, as [version] and [flavor] +# will override user configuration in DEFAULT_VERSIONS. +# +# 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) +_magick_version= ${IMAGEMAGICK_DEFAULT:C/-.*//} +. endif +. if !${_magick_versions:M${_magick_version}} +IGNORE= Invalid version of ImageMagick: "${_magick_version}" +. endif + +#=== Flavor selection === +_magick_flavors= x11 nox11 +_magick_flavor= # +_magick_portflavor= # +_magick_pkgflavor= # +. 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 +# Fallback to the default flavor +. if empty(_magick_flavor) && ${IMAGEMAGICK_DEFAULT:M*-*} +_magick_flavor= ${IMAGEMAGICK_DEFAULT:C/.*-//} +. endif +. if !empty(_magick_flavor) +. if !${_magick_flavors:M${_magick_flavor}} +IGNORE= Invalid flavor of ImageMagick: "${_magick_flavor}" +. else +_magick_portflavor= @${_magick_flavor} +. if ${_magick_flavor:Mnox11} +_magick_pkgflavor= -nox11 +. endif +. endif +. endif + +#=== Dependency 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) +_magick_depend= lib +. endif + +#=== Check for invalid arguments === +_magick_unknown_args:= ${magick_ARGS:N${_magick_version}:N${_magick_flavor}} +. for _depend in ${_magick_depend} +_magick_unknown_args:= ${_magick_unknown_args:N${_depend}} +. endfor +. if !empty(_magick_unknown_args) +IGNORE= Invalid USES=magick - unsupported argument(s): ${_magick_unknown_args} +. endif + +#=== Dependency setup === +_MAGICK_PORT= graphics/ImageMagick${_magick_version}${_magick_portflavor} +_MAGICK_LIB= libMagick++-${_magick_version}.so +_MAGICK_PKG= ImageMagick${_magick_version}${_magick_pkgflavor} + +_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 3c9e25fec110..ea7351f826e2 100644 --- a/Mk/Uses/makeinfo.mk +++ b/Mk/Uses/makeinfo.mk @@ -4,14 +4,14 @@ # Usage: USES=makeinfo # Valid ARGS: none # -# MAINTAINER: portmgr@FreeBSD.org +# 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 diff --git a/Mk/Uses/makeself.mk b/Mk/Uses/makeself.mk index af6d18fcf006..6198672a982c 100644 --- a/Mk/Uses/makeself.mk +++ b/Mk/Uses/makeself.mk @@ -3,14 +3,14 @@ # Feature: makeself # Usage: USES=makeself # -# MAINTAINER: portmgr@FreeBSD.org +# 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 diff --git a/Mk/Uses/mate.mk b/Mk/Uses/mate.mk index add32a68b547..dc4272bb90a0 100644 --- a/Mk/Uses/mate.mk +++ b/Mk/Uses/mate.mk @@ -20,9 +20,9 @@ _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. @@ -49,8 +49,6 @@ _USE_MATE_ALL+= caja common controlcenter desktop dialogs docutils icontheme \ marco menus mixer notificationdaemon panel polkit pluma \ session settingsdaemon -SCROLLKEEPER_DIR= /var/db/rarian - 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 @@ -90,9 +88,9 @@ intlhack_PRE_PATCH= ${FIND} ${WRKSRC} -name "intltool-merge.in" | ${XARGS} ${RE 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 @@ -146,58 +144,58 @@ settingsdaemon_RUN_DEPENDS= ${settingsdaemon_DETECT}:sysutils/mate-settings-daem # 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. @@ -205,23 +203,23 @@ MATE_PRE_PATCH+= ; ${${component}_PRE_PATCH} .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 + @(cd ${CONFIGURE_WRKSRC} ; ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ./autogen.sh) +. 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..571e8a990be0 100644 --- a/Mk/Uses/meson.mk +++ b/Mk/Uses/meson.mk @@ -14,17 +14,17 @@ # MESON_BUILD_DIR - Path to the build directory relative to ${WRKSRC} # Default: _build # -# MAINTAINER: gnome@FreeBSD.org +# MAINTAINER: desktop@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 +BUILD_DEPENDS+= meson:devel/meson # meson uses ninja .include "${USESDIR}/ninja.mk" @@ -33,9 +33,15 @@ BUILD_DEPENDS+= meson>=0.57.1_1:devel/meson USE_LOCALE?= en_US.UTF-8 CONFIGURE_ARGS+= --prefix ${PREFIX} \ - --mandir man \ --infodir ${INFO_PATH} +# Enable all optional features to make builds deterministic. Consumers can +# expose those as port OPTIONS_* or explicitly pass -D<option>=disabled +CONFIGURE_ARGS+= --auto-features=enabled + +# Temporarily disable bytecode due to embedding STAGEDIR +CONFIGURE_ARGS+= -Dpython.bytecompile=-1 + # 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. @@ -45,12 +51,15 @@ CONFIGURE_ARGS+= -Db_colorout=never INSTALL_TARGET= install # should we have strip separate from WITH_DEBUG? -.if defined(WITH_DEBUG) +. if defined(WITH_DEBUG) CONFIGURE_ARGS+= --buildtype debug -.else +. elif defined(WITH_DEBUGINFO) +CONFIGURE_ARGS+= --buildtype debugoptimized +. else CONFIGURE_ARGS+= --buildtype release \ + --optimization plain \ --strip -.endif +. endif HAS_CONFIGURE= yes CONFIGURE_CMD= meson diff --git a/Mk/Uses/metaport.mk b/Mk/Uses/metaport.mk index 29794872bdbb..d051cebfb1b9 100644 --- a/Mk/Uses/metaport.mk +++ b/Mk/Uses/metaport.mk @@ -8,6 +8,11 @@ .if !defined(_INCLUDE_USES_METAPORT_MK) _INCLUDE_USES_METAPORT_MK= yes +LICENSE= NA +LICENSE_COMB= single +LICENSE_NAME= Non applicable +LICENSE_TEXT= No licenses are applicable to metaports +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept MASTER_SITES= # DISTFILES= # EXTRACT_ONLY= # diff --git a/Mk/Uses/minizip.mk b/Mk/Uses/minizip.mk new file mode 100644 index 000000000000..737df835d698 --- /dev/null +++ b/Mk/Uses/minizip.mk @@ -0,0 +1,19 @@ +# handle minizip version +# +# Feature: minizip +# Usage: USES=minizip[:ng] +# +# MAINTAINER: lbartoletti@FreeBSD.org + +.if !defined(_INCLUDE_USES_MINIZIP_MK) +_INCLUDE_USES_MINIZIP_MK= yes + +. if empty(minizip_ARGS) +LIB_DEPENDS+= libminizip.so:archivers/minizip +. elif ${minizip_ARGS} == "ng" +LIB_DEPENDS+= libminizip-ng.so:archivers/minizip-ng +. else +IGNORE= Incorrect 'USES+=minizip:${minizip_ARGS}' expecting 'USES+=minizip[:ng]' +. endif + +.endif diff --git a/Mk/Uses/mlt.mk b/Mk/Uses/mlt.mk index bb9bc5f1328c..222ddd30691e 100644 --- a/Mk/Uses/mlt.mk +++ b/Mk/Uses/mlt.mk @@ -4,8 +4,7 @@ # Usage: USES=mlt:ARGS # Valid ARGS: <version>,nodepend # -# version The chooseable versions are 6 and 7. -# USES=mlt:6 # Use mlt 6.x +# version The only currently supported version is 7. # USES=mlt:7 # Use mlt 7.x # nodepend If nodepend is set, no LIB_DEPENDS line # will be generated (useful for the mlt-ports) @@ -16,7 +15,7 @@ .if ! defined(_INCLUDE_USES_MLT_MK) _INCLUDE_USES_MLT_MK= YES -_MLT_SUPPORTED= 6 7 +_MLT_SUPPORTED= 7 _mlt_version= # . for _ver in ${_MLT_SUPPORTED:O:u} @@ -38,12 +37,8 @@ _MLT_NODEPEND= yes . endif # Library dependencies -_MLT6_VERSION= 6.26.1 -_MLT7_VERSION= 7.0.1 -_MLT6_PORTNAME= mlt6 +_MLT7_VERSION= 7.24.0 _MLT7_PORTNAME= mlt7 -_MLT6_LIB= libmlt.so -_MLT6_MELT= ${LOCALBASE}/bin/melt _MLT7_LIB= libmlt-7.so _MLT7_MELT= ${LOCALBASE}/bin/melt-7 diff --git a/Mk/Uses/mono.mk b/Mk/Uses/mono.mk index 923adc517c30..e58c2edfe2c1 100644 --- a/Mk/Uses/mono.mk +++ b/Mk/Uses/mono.mk @@ -4,7 +4,7 @@ # Usage: USES=mono:ARGS # Valid ARGS: nuget # -# MAINTAINER= mono@FreeBSD.org +# MAINTAINER= ports@FreeBSD.org # # Arguments: # @@ -71,19 +71,19 @@ .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) -RUN_DEPENDS+= mono:lang/mono -.endif +BUILD_DEPENDS+= mono:lang/mono${MONO_DEFAULT} +. if empty(mono_ARGS:Mbuild) +RUN_DEPENDS+= mono:lang/mono${MONO_DEFAULT} +. endif # Set the location that webaps served by XSP should use. XSP_DOCROOT= ${PREFIX}/www/xsp @@ -93,7 +93,7 @@ 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 @@ -111,29 +111,29 @@ 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} @@ -141,16 +141,16 @@ 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 \ @@ -162,10 +162,10 @@ nuget-extract: @${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; \ @@ -174,32 +174,32 @@ nuget-extract: ${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 | \ diff --git a/Mk/Uses/motif.mk b/Mk/Uses/motif.mk index 8828ceb4c4d1..a64cdbb98336 100644 --- a/Mk/Uses/motif.mk +++ b/Mk/Uses/motif.mk @@ -6,31 +6,31 @@ # If WANT_LESSTIF is defined in user make.conf then lesstif will be used # instead of open-motif # -# MAINTAINER: portmgr@FreeBSD.org +# 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 +. elif defined(WANT_OPEN_MOTIF_DEVEL) +USE_XORG+= xpm +LIB_DEPENDS+= libXm.so.4:x11-toolkits/open-motif-devel +. 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 -# USES+=xorg does not provide any functionality, it just silences an error -# message about USES=xorg not being set -.if defined(USE_XORG) && !empty(USE_XORG) -USES+= 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..cf14ec675118 100644 --- a/Mk/Uses/mpi.mk +++ b/Mk/Uses/mpi.mk @@ -19,47 +19,53 @@ _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} +MPI4PY= ${PYTHON_PKGNAMEPREFIX}mpi4py-mpich>0:net/py-mpi4py-mpich@${PY_FLAVOR} +. if ${USES:Mfortran} MPI_LIBS+= -lmpifort MPIFC= ${MPI_HOME}/bin/mpif90 MPIF90= ${MPIFC} -. endif +. endif MPI_CFLAGS+= `pkgconf --cflags mpich` -.elif ${mpi_ARGS} == openmpi -LIB_DEPENDS+= libmpi_cxx.so:net/openmpi +. elif ${mpi_ARGS} == openmpi +. if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc +LIB_DEPENDS+= libmpi_cxx.so:net/openmpi4 +. else +LIB_DEPENDS+= libmpi_mpifh.so:net/openmpi +. endif MPI_HOME= ${LOCALBASE}/mpi/openmpi -. if ${USES:Mfortran} +MPI4PY= ${PYTHON_PKGNAMEPREFIX}mpi4py>0:net/py-mpi4py@${PY_FLAVOR} +. 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 27d4418aa055..cf5840131744 100644 --- a/Mk/Uses/mysql.mk +++ b/Mk/Uses/mysql.mk @@ -1,15 +1,14 @@ # Provide support for MySQL # Feature: mysql # Usage: USES=mysql or USES=mysql:args -# Valid ARGS: <version>, client, server, embedded +# Valid ARGS: <version>, client, server # # 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 +# necessary (MySQL-8.0 = 80, 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 +# server Depend on the server at run/build time. If none of these is # set, depends on the client. # # IGNORE_WITH_MYSQL @@ -20,157 +19,136 @@ # MYSQL_VER # Detected MySQL version. # +# DBD_MYSQL +# Set compatible p5-DBD-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} -_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") -_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 -MYSQL${v}_LIBVER= 18 -.endfor -MYSQL57_LIBVER= 20 -MYSQL57p_LIBVER= 20 MYSQL80_LIBVER= 21 -MYSQL102m_LIBVER= 3 -MYSQL103m_LIBVER= 3 -MYSQL104m_LIBVER= 3 -MYSQL105m_LIBVER= 3 +MYSQL81_LIBVER= 22 +. for v in 5 6 11 +MYSQL10${v}m_LIBVER= 3 +. endfor # 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 -_MYSQL_VER= ${_MYSQL}p -_MYSQL_FLAVOUR= percona -.elif ${_MARIADB} == 1 +. if ${_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") -WITH_MYSQL_FLAVOUR= percona -.else +. else WITH_MYSQL_FLAVOUR= mysql -.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 +. if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${_WANT_MYSQL_VER} +IGNORE= cannot install: the port wants ${_WANT_MYSQL_FLAVOUR}${_WANT_MYSQL_VER:C/[m]//}-client and you try to install ${WITH_MYSQL_FLAVOUR}${WITH_MYSQL_VER:C/[m]//}-client +. 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" -MYSQL_FLAVOUR= percona -.else +. else MYSQL_FLAVOUR= mysql -.endif +. endif -.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 +. if defined(_MYSQL_VER) +. if ${_MYSQL_VER} != ${MYSQL_VER} +IGNORE= cannot install: MySQL versions mismatch: ${_MYSQL_FLAVOUR}${_MYSQL_VER:C/[m]//}-client is installed and wanted version is ${MYSQL_FLAVOUR}${MYSQL_VER:C/[m]//}-client +. 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//} >= 105 _MYSQL_SHLIB= libmariadb -. endif -.elif (${MYSQL_VER:C/[0-9]*//} == "p") -_MYSQL_SERVER_FLAVOUR= percona -_MYSQL_CLIENT_FLAVOUR= percona -.elif (${MYSQL_VER:C/[0-9]*//} == "w") -_MYSQL_SERVER_FLAVOUR= mysqlwsrep -_MYSQL_CLIENT_FLAVOUR= mysql -.else +. endif +. 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 +_MYSQL_CLIENT= databases/${_MYSQL_CLIENT_FLAVOUR}${MYSQL_VER:C/[m]//}-client +_MYSQL_SERVER= databases/${_MYSQL_SERVER_FLAVOUR}${MYSQL_VER:C/[m]//}-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) RUN_DEPENDS+= ${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER} -.if defined(_WANT_MYSQL_EMBEDDED) -BUILD_DEPENDS+= ${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER} -.endif -.endif -.if defined(_WANT_MYSQL_CLIENT) || \ - !(defined(_WANT_MYSQL_SERVER) || defined(_WANT_MYSQL_EMBEDDED)) +. endif +. if defined(_WANT_MYSQL_CLIENT) || !defined(_WANT_MYSQL_SERVER) 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 + +. if ${MYSQL_FLAVOUR} == mariadb +DBD_MYSQL= p5-DBD-mysql4>=0:databases/p5-DBD-mysql4 +. else +DBD_MYSQL= p5-DBD-mysql>=0:databases/p5-DBD-mysql +. endif .endif diff --git a/Mk/Uses/ncurses.mk b/Mk/Uses/ncurses.mk index 6fad636a5ab4..23b5c0216fa3 100644 --- a/Mk/Uses/ncurses.mk +++ b/Mk/Uses/ncurses.mk @@ -19,24 +19,24 @@ # BUILD_DEPENDS - are added if needed # RUN_DEPENDS - are added if needed # -# MAINTAINER: portmgr@FreeBSD.org +# 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" @@ -44,27 +44,27 @@ check-depends-ncurses: @${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 @@ -75,14 +75,14 @@ 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 diff --git a/Mk/Uses/nextcloud.mk b/Mk/Uses/nextcloud.mk new file mode 100644 index 000000000000..2c65c3cf2965 --- /dev/null +++ b/Mk/Uses/nextcloud.mk @@ -0,0 +1,62 @@ +# Support for Nextcloud apps +# +# Feature: nextcloud +# Usage: USES=nextcloud +# +# MAINTAINER: brnrd@FreeBSD.org + +.if !defined(_INCLUDE_USES_NEXTCLOUD_MK) +_INCLUDE_USES_NEXTCLOUD_MK= yes + +NEXTCLOUD_BASE?= www/nextcloud + +NEXTCLOUD_DIR= ${PREFIX}/${NEXTCLOUD_BASE} +NEXTCLOUD_APPSDIR?= ${PREFIX}/${NEXTCLOUD_BASE}/apps-pkg + +PKGNAMEPREFIX= nextcloud- +PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} +WRKSRC?= ${WRKDIR}/${PORTNAME} + +. if ${DISTNAME} == ${PORTNAME} +DIST_SUBDIR?= nextcloud/${PORTNAME}-${PORTVERSION} +. else +DIST_SUBDIR?= nextcloud +. endif + +MASTER_SITES?= https://github.com/nextcloud-releases/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${PORTVERSION}/ + +LICENSE?= AGPLv3 + +RUN_DEPENDS= nextcloud${PHP_PKGNAMESUFFIX}>=${NEXTCLOUD_RUN_DEPENDS}:www/nextcloud@${PHP_FLAVOR} + +USES+= php:flavors +NO_BUILD= yes +NO_ARCH= yes + +WWWDIR?= ${NEXTCLOUD_APPSDIR}/${PORTNAME} + +NEXTCLOUD_APP_PKGMESSAGE= ${WRKDIR}/pkg-message +_PKGMESSAGES+= ${NEXTCLOUD_APP_PKGMESSAGE} + +_USES_stage= 899:add-pkg-message +add-pkg-message: + @${ECHO_CMD} "[" > ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "{ type: install" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} " message: <<EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "Run \`occ upgrade\` to create the Nextcloud ${PORTNAME} app database structure" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "}," >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "{ type: upgrade:" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} " message: <<EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "Run \`occ upgrade\` to update the Nextcloud ${PORTNAME} app database structure" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "}" >> ${NEXTCLOUD_APP_PKGMESSAGE} + @${ECHO_CMD} "]" >> ${NEXTCLOUD_APP_PKGMESSAGE} + +do-install: + @${MKDIR} ${STAGEDIR}${WWWDIR} + @(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}) + @(cd ${WRKSRC}; ${FIND} . -not -type d) | ${SORT} | \ + ${SED} -e 's,^\.,${WWWDIR_REL},' >> ${TMPPLIST} + +.endif diff --git a/Mk/Uses/ninja.mk b/Mk/Uses/ninja.mk index 6f71484f1ec4..5c78cf152d07 100644 --- a/Mk/Uses/ninja.mk +++ b/Mk/Uses/ninja.mk @@ -8,60 +8,60 @@ # make use ninja for the build instead of make, implies "build" # run add a run dependency on ninja # -# MAINTAINER: portmgr@FreeBSD.org +# 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} @@ -69,10 +69,10 @@ 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 new file mode 100644 index 000000000000..e92b2f34f2a3 --- /dev/null +++ b/Mk/Uses/nodejs.mk @@ -0,0 +1,60 @@ +# Provide support for Node.js +# +# Feature: nodejs +# +# Usage: USES=nodejs[:args] +# Valid args: +# - build use node as build-time dependency +# - run use node as runtime dependency +# - env set the environment (NODEJS_VERSION and NODEJS_SUFFIX) +# - version available version: lts, current, 18, 20, 21 +# +# Note: +# - The supported versions follow upstream release schedule +# https://github.com/nodejs/Release/blob/main/README.md#release-schedule +# - lts is 20 now +# - current is 21 now +# - USES=nodejs means USES=nodejs:build,run +# - If you define a version, you must provide run and/or build +# +# MAINTAINER: sunpoet@FreeBSD.org + +.if !defined(_INCLUDE_USES_NODEJS_MK) +_INCLUDE_USES_NODEJS_MK= yes + +_VALID_NODEJS_VERSIONS= 18 20 21 current lts + +. if ! ${_VALID_NODEJS_VERSIONS:M${NODEJS_DEFAULT}} +IGNORE= Invalid default nodejs version ${NODEJS_DEFAULT}; valid versions are ${_VALID_NODEJS_VERSIONS} +. endif + +. if !empty(nodejs_ARGS:Nbuild:Nenv:Nrun:Nlts:Ncurrent:N18:N20:N21) +IGNORE= USES=nodejs has invalid arguments ${nodejs_ARGS} +. endif + +. if empty(nodejs_ARGS) +nodejs_ARGS= build,run +. endif + +.undef _NODEJS_VER +. for version in ${_VALID_NODEJS_VERSIONS} +. if ${nodejs_ARGS:M${version}} +_NODEJS_VER= ${version} +. endif +. endfor + +. if !defined(_NODEJS_VER) +_NODEJS_VER= ${NODEJS_DEFAULT} +. endif + +NODEJS_VERSION= ${_NODEJS_VER:S|current|21|:S|lts|20|} +NODEJS_SUFFIX= -node${NODEJS_VERSION} + +. if ${nodejs_ARGS:M*build*} +BUILD_DEPENDS+= node:www/node${NODEJS_VERSION} +. endif +. if ${nodejs_ARGS:M*run*} +RUN_DEPENDS+= node:www/node${NODEJS_VERSION} +. endif + +.endif diff --git a/Mk/Uses/objc.mk b/Mk/Uses/objc.mk index 5b055b629998..4e96421f89e7 100644 --- a/Mk/Uses/objc.mk +++ b/Mk/Uses/objc.mk @@ -8,72 +8,72 @@ .if !defined(_INCLUDE_USES_OBJC_MK) _INCLUDE_USES_OBJC_MK= yes -OBJC_CLANG_VERSION=70 +OBJC_CLANG_VERSION= ${LLVM_DEFAULT} 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}" diff --git a/Mk/Uses/ocaml.mk b/Mk/Uses/ocaml.mk new file mode 100644 index 000000000000..666c29078c19 --- /dev/null +++ b/Mk/Uses/ocaml.mk @@ -0,0 +1,82 @@ +# Provide support to use the Dune package builder for OCaml +# +# Feature: ocaml +# Usage: USES=ocaml:dune +# USE_OCAML=yes +# +# Variables that may be set by the port: +# +# OCAML_PACKAGES List of packages to build and install, defaults to PORTNAME +# +# USE_OCAML_LDCONFIG Dune may install stublibs in site-lib package directory(ies) +# OCAML_LDLIBS or in a single directory below DUNE_LIBDIR. +# +# Appends to: BUILD_DEPENDS, MAKE_ENV +# +# MAINTAINER: freebsd@dev.thsi.be + +.if !defined(_INCLUDE_USES_OCAML_MK) +_INCLUDE_USES_OCAML_MK= yes + +. if empty(ocaml_ARGS:Mdune) +IGNORE= Incorrect 'USES+= ocaml:${ocaml_ARGS}' ocaml requires a single 'dune' argument (for now) +. endif + +. if !defined(OCAML_include) +.error USES=dune only works with USE_OCAML=yes +. endif + +# +# Dune builder port +# +DUNE_PORT?= devel/ocaml-dune +DUNE_DEPEND?= ocaml-dune>=3.7.1_2:devel/ocaml-dune + +BUILD_DEPENDS+= ${DUNE_DEPEND} + +DUNE_ARGS= --display=short --always-show-command-line \ + --no-config -j ${MAKE_JOBS_NUMBER} --profile release \ + --root=${DUNE_ROOT} --build-dir=${DUNE_BUILD_DIR} \ + --promote-install-files --ignore-promoted-rules \ + --default-target @install --require-dune-project-file \ + --only-packages=${OCAML_PACKAGES:ts,} +DUNE_BUILD_ARGS?= +DUNE_BUILD_DIR?= _build +DUNE_CMD?= dune +DUNE_INSTALL_ARGS?= --prefix=${PREFIX} \ + --libdir=${PREFIX}/${OCAML_SITELIBDIR} \ + --docdir=${OCAML_DOCSDIR} --destdir=${STAGEDIR} +DUNE_INSTALL_TARGETS?= +DUNE_LIBDIR?= ${OCAML_SITELIBDIR} +OCAML_PACKAGES?= ${PORTNAME} +DUNE_ROOT?= . + +. if USE_OCAML_LDCONFIG +. if !empty(OCAML_LDLIBS) +. if ${OCAML_LDLIBS:[#]} > 1 +. for _l in ${OCAML_LDLIBS} +. if empty(OCAML_PACKAGES:M${_l:T}) || "${_l:H}" != "${DUNE_LIBDIR}" +IGNORE+= OCAML_LDLIBS member ${_l} should match a OCAML_PACKAGES +. endif +. endfor +DUNE_ENV+= DUNE_FREEBSD_STUBLIBS_IN_PACKAGE= +. else +DUNE_ENV+= DUNE_FREEBSD_STUBLIBS_RELATIVE_TO_LIBDIR=${OCAML_LDLIBS:S/${DUNE_LIBDIR}\///} +. endif +. else +DUNE_ENV+= DUNE_FREEBSD_STUBLIBS_RELATIVE_TO_LIBDIR=${OCAML_PACKAGES:[1]} +. endif +. endif + +# left empty for default @install target +ALL_TARGET?= +MAKE_ENV+= ${DUNE_ENV} + +DO_MAKE_BUILD?= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${DUNE_CMD} build ${DUNE_ARGS} ${DUNE_BUILD_ARGS} + +. if !target(do-install) && !defined(NO_INSTALL) +do-install: + @(cd ${INSTALL_WRKSRC} && ${SETENV} ${WRK_ENV} ${MAKE_ENV} ${FAKEROOT} ${DUNE_CMD} install ${DUNE_ARGS} ${DUNE_INSTALL_ARGS} ${DUNE_INSTALL_TARGETS}) +. endif + +.endif diff --git a/Mk/Uses/octave.mk b/Mk/Uses/octave.mk new file mode 100644 index 000000000000..31c98e616fe1 --- /dev/null +++ b/Mk/Uses/octave.mk @@ -0,0 +1,90 @@ +# Support for octave based ports +# +# Feature: octave +# Usage: USES=octave +# Valid ARGS: (none), env +# - env : Loads only one environmental variable OCTAVE_VERSION +# MAINTAINER: stephen@FreeBSD.org +# +# Common code to install octave-forge packages. +# It is, in effect, a wrapper using the package handling already built +# into math/octave. + +.if !defined(_INCLUDE_USES_OCTAVE_MK) +_INCLUDE_USES_OCTAVE_MK= yes + +_valid_octave_ARGS= env + +# Sanity check +. for arg in ${octave_ARGS} +. if empty(_valid_octave_ARGS:M${arg}) +IGNORE= Incorrect 'USES+= octave:${octave_ARGS}' usage: argument [${arg}] is not recognized +. endif +. endfor + +OCTAVE_VERSION= 9.1.0 + +. if empty(octave_ARGS:Menv) +BUILD_DEPENDS+= octave:math/octave +RUN_DEPENDS+= octave:math/octave \ + ${LOCALBASE}/libexec/octave/load-octave-pkg:math/octave-forge-base +LIB_DEPENDS+= libpcre.so:devel/pcre + +. if ! ${USES:Mcompiler} +_USES_POST+= compiler:c++14-lang +. endif + +. if ! ${USES:Mfortran} +_USES_POST+= fortran +. endif + +. if ! ${USES:Mgmake} +_USES_POST+= gmake +. endif + +CXXFLAGS+= -I${LOCALBASE}/include/octave-${OCTAVE_VERSION} +CFLAGS+= -I${LOCALBASE}/include/octave-${OCTAVE_VERSION} +CPPFLAGS+= -I${LOCALBASE}/include/octave-${OCTAVE_VERSION} + +DIST_SUBDIR?= octave-forge +OCTAVE_PKGNAME= ${PORTNAME:S/octave-forge-//} +OCTAVE_DISTNAME= ${OCTAVE_PKGNAME}-${DISTVERSION} +OCTAVE_TARBALLS_DIR= ${LOCALBASE}/share/octave/tarballs +OCTAVE_INSTALL_TARBALLS_DIR= ${STAGEDIR}${PREFIX}/share/octave/tarballs +OCTAVE_SRC?= ${DISTNAME} +WRKSRC?= ${WRKDIR}/${OCTAVE_SRC}/src + +MAKE_ENV+= PACKAGE=${OCTAVE_DISTNAME}.tar.gz +MAKE_ARGS+= CC="${CC}" CXX="${CXX}" LD_CXX="${CXX}" DL_LD="${CXX}" MKOCTFILE="${LOCALBASE}/bin/mkoctfile" OCTAVE_VERSION=-${OCTAVE_VERSION} + +LOAD_OCTAVE_PKG_CMD= ${LOCALBASE}/libexec/octave/load-octave-pkg + +. if !target(pre-install) +pre-install: octave-pre-install +. endif # !target(pre-install) + +. if !target(do-install) +do-install: octave-do-install +. endif # !target(do-install) + +. if !target(post-install) +post-install: octave-post-install +. endif # !target(post-install) + +octave-pre-install: + ${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure + cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_SRC} + +octave-do-install: + ${MKDIR} ${OCTAVE_INSTALL_TARBALLS_DIR} + ${INSTALL_DATA} ${WRKDIR}/${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_INSTALL_TARBALLS_DIR}/. + ${LN} -s -f ${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_INSTALL_TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz + +octave-post-install: + @${ECHO_CMD} "share/octave/tarballs/${OCTAVE_DISTNAME}.tar.gz" >> ${TMPPLIST} + @${ECHO_CMD} "share/octave/tarballs/${OCTAVE_PKGNAME}.tar.gz" >> ${TMPPLIST} + @${ECHO_CMD} "@postunexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST} + @${ECHO_CMD} "@postexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST} +. endif # empty(octave_ARGS:Menv) + +.endif # !defined(_INCLUDE_USES_OCTAVE_MK) diff --git a/Mk/Uses/openal.mk b/Mk/Uses/openal.mk index 59e408691d84..ff91a4afda74 100644 --- a/Mk/Uses/openal.mk +++ b/Mk/Uses/openal.mk @@ -4,25 +4,25 @@ # Usage: USES=openal or USES=openal:ARGS # Valid ARGS: al, soft (default), alut # -# MAINTAINER: portmgr@FreeBSD.org +# 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 ca982f131088..049224a15621 100644 --- a/Mk/Uses/pathfix.mk +++ b/Mk/Uses/pathfix.mk @@ -5,29 +5,30 @@ # Usage: USES=pathfix # Valid ARGS: does not require args # -# MAINTAINER: portmgr@FreeBSD.org +# 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_FULL_LIBDIR[}]/pkgconfig|{CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|g ; \ + 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 ; \ @@ -38,9 +39,9 @@ pathfix: 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 ; \ @@ -52,10 +53,10 @@ pathfix: 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|[$$][(]localstatedir[)]/scrollkeeper|${SCROLLKEEPER_DIR}|g ; \ s|[(]libdir[)]/bonobo/servers|(prefix)/libdata/bonobo/servers|g' -.endfor -.endif +. endfor +. endif .endif diff --git a/Mk/Uses/pear.mk b/Mk/Uses/pear.mk index 9a9083aaf32f..0496dded11b9 100644 --- a/Mk/Uses/pear.mk +++ b/Mk/Uses/pear.mk @@ -7,7 +7,7 @@ # - env : Only provide the environment variables, no fetch/build/install # targets. # -# MAINTAINER= portmgr@FreeBSD.org +# MAINTAINER= ports@FreeBSD.org .if !defined(_INCLUDE_USES_PEAR_MK) _INCLUDE_USES_PEAR_MK= yes @@ -22,42 +22,53 @@ IGNORE= Incorrect 'USES+= pear:${pear_ARGS}' usage: argument [${arg}] is not rec . endif . endfor +_pear_IGNORE_WITH_PHP= +IGNORE_WITH_PHP?= ${_pear_IGNORE_WITH_PHP} php_ARGS+= flavors .include "${USESDIR}/php.mk" -. if empty(pear_ARGS:Menv) +# Mark the port ignored if it wants pear for an unsupported flavor +. if ${_pear_IGNORE_WITH_PHP:tw:S/^/php/:M${PHP_FLAVOR}} +IGNORE= devel/pear does not support flavor ${PHP_FLAVOR} +_pear_INVALID= yes +. endif + +. if !defined(_pear_INVALID) +. if empty(pear_ARGS:Menv) MASTER_SITES?= http://pear.php.net/get/ EXTRACT_SUFX?= .tgz DIST_SUBDIR?= PEAR -. if empty(php_ARGS:Mphpize) +WWW?= https://pear.php.net/package/${PORTNAME}/ + +. if empty(php_ARGS:Mphpize) NO_BUILD= yes +. endif . endif -. endif BUILD_DEPENDS+= pear:devel/pear@${PHP_FLAVOR} RUN_DEPENDS+= pear:devel/pear@${PHP_FLAVOR} PEAR_PKGNAMEPREFIX= php${PHP_VER}-pear- -. if defined(PEAR_CHANNEL) && ${PEAR_CHANNEL} != "" +. if defined(PEAR_CHANNEL) && ${PEAR_CHANNEL} != "" PEAR_${PEAR_CHANNEL:tu}_PKGNAMEPREFIX= php${PHP_VER}-pear-${PEAR_CHANNEL}- PKGNAMEPREFIX?= ${PEAR_${PEAR_CHANNEL:tu}_PKGNAMEPREFIX} PEARPKGREF= ${PEAR_CHANNEL}/${PORTNAME} PEAR_CHANNEL_VER?= >=0 BUILD_DEPENDS+= ${PEAR_PKGNAMEPREFIX}channel-${PEAR_CHANNEL}${PEAR_CHANNEL_VER}:devel/pear-channel-${PEAR_CHANNEL}@${PHP_FLAVOR} RUN_DEPENDS+= ${PEAR_PKGNAMEPREFIX}channel-${PEAR_CHANNEL}${PEAR_CHANNEL_VER}:devel/pear-channel-${PEAR_CHANNEL}@${PHP_FLAVOR} -. else +. else PKGNAMEPREFIX?= ${PEAR_PKGNAMEPREFIX} PEARPKGREF= ${PORTNAME} -. endif +. endif -. if exists(${LOCALBASE}/bin/php-config) +. if exists(${LOCALBASE}/bin/php-config) PHP_BASE!= ${LOCALBASE}/bin/php-config --prefix -. else +. else PHP_BASE= ${LOCALBASE} -. endif +. endif PEAR= ${LOCALBASE}/bin/pear LPEARDIR= share/pear LPKGREGDIR= ${LPEARDIR}/packages/${PKGNAME} @@ -75,29 +86,31 @@ EXAMPLESDIR= ${PHP_BASE}/${LEXAMPLESDIR} SQLSDIR= ${PHP_BASE}/${LSQLSDIR} SCRIPTFILESDIR= ${LOCALBASE}/bin TESTSDIR= ${PHP_BASE}/${LTESTSDIR} -. if defined(CATEGORY) && !empty(CATEGORY) +. if defined(CATEGORY) && !empty(CATEGORY) LINSTDIR= ${LPEARDIR}/${CATEGORY} -. else +. else LINSTDIR= ${LPEARDIR} -. endif +. endif INSTDIR= ${PHP_BASE}/${LINSTDIR} SUB_LIST+= PKG_NAME=${PEARPKGREF} -. if empty(pear_ARGS:Menv) -. if empty(php_ARGS:Mphpize) && !exists(${.CURDIR}/pkg-plist) +. if empty(pear_ARGS:Menv) +. if empty(php_ARGS:Mphpize) && !exists(${.CURDIR}/pkg-plist) PLIST= ${WRKDIR}/PLIST -. endif +. endif PKGINSTALL?= ${PORTSDIR}/devel/pear/pear-install PKGDEINSTALL?= ${WRKDIR}/pear-deinstall -. endif +. endif PLIST_SUB+= PEARDIR=${LPEARDIR} PKGREGDIR=${LPKGREGDIR} \ TESTSDIR=${LTESTSDIR} INSTDIR=${LINSTDIR} SQLSDIR=${LSQLSDIR} \ SCRIPTFILESDIR=${LCRIPTSDIR} +. endif # !defined(_pear_INVALID) .endif -.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PEAR_POST_MK) + +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PEAR_POST_MK) && !defined(_pear_INVALID) _INCLUDE_USES_PEAR_POST_MK= yes . if empty(pear_ARGS:Menv) @@ -114,6 +127,10 @@ pear-pre-install: @${ECHO_MSG} "" @${FALSE} . endif + (if [ -f ${WRKSRC}/package.xml ] \ + && [ ! -f ${WRKDIR}/package.xml ] ; then \ + ${CP} -p ${WRKSRC}/package.xml ${WRKDIR} ; \ + fi) DIRFILTER= ${SED} -En '\:^.*/[^/]*$$:s:^(.+)/[^/]*$$:\1:p' \ | ( while read r; do \ diff --git a/Mk/Uses/perl5.mk b/Mk/Uses/perl5.mk index 586c8aa95cab..e7c5fd5b5068 100644 --- a/Mk/Uses/perl5.mk +++ b/Mk/Uses/perl5.mk @@ -42,19 +42,19 @@ 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 -.include "${PORTSDIR}/lang/perl5.30/version.mk" -. elif ${PERL5_DEFAULT} == 5.32 -.include "${PORTSDIR}/lang/perl5.32/version.mk" -. elif ${PERL5_DEFAULT} == 5.34 +. if ${PERL5_DEFAULT} == 5.34 .include "${PORTSDIR}/lang/perl5.34/version.mk" -. elif ${PERL5_DEFAULT} == devel +. elif ${PERL5_DEFAULT} == 5.36 +.include "${PORTSDIR}/lang/perl5.36/version.mk" +. elif ${PERL5_DEFAULT} == 5.38 +.include "${PORTSDIR}/lang/perl5.38/version.mk" +. 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]+$//} @@ -81,12 +81,12 @@ PERL_ARCH?= mach # 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 +. if ${PERL_LEVEL} >= 503800 +PERL_PORT?= perl5.38 +. elif ${PERL_LEVEL} >= 503600 +PERL_PORT?= perl5.36 +. else # ${PERL_LEVEL} < 503600 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 @@ -166,12 +166,6 @@ IGNORE= has unknown USE_PERL5 components: ${_USE_PERL5_UNKNOWN} _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) @@ -199,8 +193,8 @@ 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" + --install_path libdoc="${PERLMANPREFIX}/man/man3" \ + --install_path bindoc="${PERLMANPREFIX}/man/man1" CONFIGURE_SCRIPT?= Build.PL PL_BUILD?= Build CONFIGURE_ARGS+=--destdir ${STAGEDIR} @@ -214,7 +208,7 @@ 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 +BUILD_DEPENDS+= p5-Module-Build-Tiny>=0.043:devel/p5-Module-Build-Tiny . endif CONFIGURE_ARGS+=--create_packlist 1 . endif @@ -257,8 +251,7 @@ TEST_DEPENDS+= ${PERL5_DEPEND}:lang/${PERL_PORT} 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} +PERLMANPREFIX?= ${PREFIX}/${SITE_PERL_REL} .undef HAS_CONFIGURE . if !target(do-configure) @@ -268,7 +261,7 @@ do-configure: ${SCRIPTDIR}/configure; \ fi @cd ${CONFIGURE_WRKSRC} && \ - ${SETENV} ${CONFIGURE_ENV} \ + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} \ ${PERL5} ${CONFIGURE_CMD} ${CONFIGURE_ARGS} . if !${_USE_PERL5:Mmodbuild*} @cd ${CONFIGURE_WRKSRC} && \ @@ -280,13 +273,13 @@ do-configure: . if ${_USE_PERL5:Mmodbuild*} . if !target(do-build) do-build: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${ALL_TARGET} ${MAKE_ARGS}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${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}) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PERL5} ${PL_BUILD} ${INSTALL_TARGET} ${MAKE_ARGS}) . endif # !target(do-install) . endif # ! USES=gmake . endif # modbuild @@ -332,9 +325,9 @@ 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} + @cd ${TEST_WRKSRC}/ && ${SETENVI} ${WRK_ENV} ${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} + @cd ${TEST_WRKSRC}/ && ${SETENVI} ${WRK_ENV} ${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 cb04222245f2..e82d1ee5c58f 100644 --- a/Mk/Uses/pgsql.mk +++ b/Mk/Uses/pgsql.mk @@ -5,13 +5,13 @@ # # 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: +# (eg. 12-14 for [min]-[max], 12+ or 12- +# for min+ and max-, 13 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:13 # Only use PostgreSQL 13 +# USES=pgsql:12+ # Use PostgreSQL 12 or newer +# USES=pgsql:12-14 # Use PostgreSQL between 12 & 14 inclusive +# USES=pgsql:12- # Use any PostgreSQL up to 12 # USES=pgsql # Use the default PostgreSQL # # WANT_PGSQL= server[:fetch] plperl plpython pltcl @@ -39,21 +39,21 @@ _INCLUDE_USES_PGSQL_MK= yes # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -VALID_PGSQL_VER= 9.6 10 11 12 13 14 +VALID_PGSQL_VER= 12 13 14 15 16 # 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 @@ -63,7 +63,7 @@ PGSQL_DEFAULT?= ${$w_PGSQL_VER:C,^.,&.,} . 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=9.6 instead +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. @@ -134,20 +134,20 @@ PGSQL_VER= ${PGSQL_DEFAULT} 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 diff --git a/Mk/Uses/php.mk b/Mk/Uses/php.mk index 7a0bf584efdd..6195ad71a71e 100644 --- a/Mk/Uses/php.mk +++ b/Mk/Uses/php.mk @@ -40,13 +40,15 @@ # For example: # # USES= php:ext -# USE_PHP= xml wddx +# 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. # @@ -62,14 +64,14 @@ _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" @@ -108,7 +110,7 @@ DIST_SUBDIR= PECL PHPBASE?= ${LOCALBASE} -_ALL_PHP_VERSIONS= 73 74 80 +_ALL_PHP_VERSIONS= 81 82 83 # Make the already installed PHP the default one. . if exists(${PHPBASE}/etc/php.conf) @@ -128,9 +130,14 @@ IGNORE= does not work with PHP versions "${IGNORE_WITH_PHP}" and "${_INSTALLED_P PHP_VER?= ${PHP_DEFAULT:S/.//} . endif # .if exists(${PHPBASE}/etc/php.conf) +. if defined(BUILD_ONLY_DEFAULT_PHP_FLAVOR) +# Only build php ports of the default flavor +_ALL_FLAVOR_VERSIONS= ${PHP_VER} +. 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 # 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. @@ -157,10 +164,6 @@ FLAVOR= ${FLAVORS:[1]} . endif . endif -.if ${PHP_VER} == 74 && (${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64) -USE_GCC= yes -.endif - # This variable is for dependencies lines, so you write: # ${PHP_PKGNAMEPREFIX}foo:devel/php-foo@${PHP_FLAVOR} PHP_FLAVOR= php${PHP_VER} @@ -176,19 +179,19 @@ PHP_VER= ${FLAVOR:S/^php//} (${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} == 80 -PHP_EXT_DIR= 20200930 -PHP_EXT_INC= hash json pcre spl -. elif ${PHP_VER} == 74 -PHP_EXT_DIR= 20190902 -PHP_EXT_INC= hash pcre spl -. elif ${PHP_VER} == 73 -PHP_EXT_DIR= 20180731 -PHP_EXT_INC= pcre spl +. if ${PHP_VER} == 83 +PHP_EXT_DIR= 20230831 +PHP_EXT_INC= hash json openssl pcre random spl +. elif ${PHP_VER} == 82 +PHP_EXT_DIR= 20220829 +PHP_EXT_INC= hash json openssl pcre random spl +. elif ${PHP_VER} == 81 +PHP_EXT_DIR= 20210902 +PHP_EXT_INC= hash json openssl pcre spl . else # (rene) default to DEFAULT_VERSIONS -PHP_EXT_DIR= 20190902 -PHP_EXT_INC= hash pcre spl +PHP_EXT_DIR= 20220829 +PHP_EXT_INC= hash json openssl pcre random spl . endif # Try to figure out what the PHP_EXT_DIR should be WRT the @@ -221,7 +224,7 @@ PECL_PKGNAMEPREFIX= php${PHP_VER}-pecl- . 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./}) + (doesn't support PHP ${IGNORE_WITH_PHP:C/^(8)/\1./}) . endif . endfor . endif @@ -270,10 +273,9 @@ 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" -# 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} +apache_ARGS?=run +.include "${USESDIR}/apache.mk" +RUN_DEPENDS+= ${PHPBASE}/${APACHEMODDIR}/libphp.so:${MOD_PHP_PORT} . endif PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR} @@ -316,7 +318,7 @@ PHP_MOD_PRIO= 30 PHP_MOD_PRIO= 20 . endif . endif -PHP_EXT_INI_FILE= etc/php/ext-${PHP_MOD_PRIO}-${PHP_MODNAME}.ini +PHP_EXT_INI_FILE= etc/php/ext-${PHP_MOD_PRIO}-${PHP_MODNAME}.ini.sample do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR} @@ -351,7 +353,7 @@ add-plist-phpext: >> ${TMPPLIST} @${ECHO_CMD} "@preunexec ${RM} %D/include/php/ext/php_config.h.orig" \ >> ${TMPPLIST} - @${ECHO_CMD} "${PHP_EXT_INI_FILE}" \ + @${ECHO_CMD} "@sample ${PHP_EXT_INI_FILE}" \ >> ${TMPPLIST} @${ECHO_CMD} "[" > ${PHP_EXT_PKGMESSAGE} @${ECHO_CMD} "{" >> ${PHP_EXT_PKGMESSAGE} @@ -368,18 +370,19 @@ add-plist-phpext: . 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 fileinfo filter ftp gd gettext gmp \ + 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 spl sqlite3 sysvmsg sysvsem sysvshm \ - tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib + pspell radius random readline redis session shmop simplexml snmp \ + soap sockets sodium spl sqlite3 sysvmsg sysvsem sysvshm \ + tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zephir_parser \ + zip zlib # version specific components -_USE_PHP_VER73= ${_USE_PHP_ALL} interbase pdf recode sodium wddx -_USE_PHP_VER74= ${_USE_PHP_ALL} ffi pdf sodium -_USE_PHP_VER80= ${_USE_PHP_ALL} ffi sodium +_USE_PHP_VER81= ${_USE_PHP_ALL} +_USE_PHP_VER82= ${_USE_PHP_ALL} +_USE_PHP_VER83= ${_USE_PHP_ALL} bcmath_DEPENDS= math/php${PHP_VER}-bcmath bitset_DEPENDS= math/pecl-bitset@${PHP_FLAVOR} @@ -388,7 +391,6 @@ 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 -dbase_DEPENDS= databases/php${PHP_VER}-dbase dom_DEPENDS= textproc/php${PHP_VER}-dom enchant_DEPENDS= textproc/php${PHP_VER}-enchant exif_DEPENDS= graphics/php${PHP_VER}-exif @@ -399,25 +401,19 @@ 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 -hash_DEPENDS= security/php${PHP_VER}-hash iconv_DEPENDS= converters/php${PHP_VER}-iconv igbinary_DEPENDS= converters/pecl-igbinary@${PHP_FLAVOR} imap_DEPENDS= mail/php${PHP_VER}-imap -interbase_DEPENDS= databases/php${PHP_VER}-interbase intl_DEPENDS= devel/php${PHP_VER}-intl -json_DEPENDS= devel/php${PHP_VER}-json 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} -mssql_DEPENDS= databases/php${PHP_VER}-mssql mysqli_DEPENDS= databases/php${PHP_VER}-mysqli odbc_DEPENDS= databases/php${PHP_VER}-odbc opcache_DEPENDS= www/php${PHP_VER}-opcache -openssl_DEPENDS=security/php${PHP_VER}-openssl 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 @@ -431,7 +427,6 @@ 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 -recode_DEPENDS= converters/php${PHP_VER}-recode redis_DEPENDS= databases/pecl-redis@${PHP_FLAVOR} session_DEPENDS=www/php${PHP_VER}-session shmop_DEPENDS= devel/php${PHP_VER}-shmop @@ -441,22 +436,17 @@ 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 -sybase_ct_DEPENDS= databases/php${PHP_VER}-sybase_ct 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 -wddx_DEPENDS= textproc/php${PHP_VER}-wddx xml_DEPENDS= textproc/php${PHP_VER}-xml xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader -.if ${PHP_VER} >= 80 xmlrpc_DEPENDS= net/pecl-xmlrpc@${PHP_FLAVOR} -.else -xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc -.endif xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter xsl_DEPENDS= textproc/php${PHP_VER}-xsl +zephir_parser_DEPENDS= textproc/pecl-zephir_parser@${PHP_FLAVOR} zip_DEPENDS= archivers/php${PHP_VER}-zip zlib_DEPENDS= archivers/php${PHP_VER}-zlib diff --git a/Mk/Uses/pkgconfig.mk b/Mk/Uses/pkgconfig.mk index 25392f4ccd90..671a4f0608c1 100644 --- a/Mk/Uses/pkgconfig.mk +++ b/Mk/Uses/pkgconfig.mk @@ -4,28 +4,44 @@ # Usage: USES=pkgconfig or USES=pkgconfig:ARGS # Valid ARGS: build (default, implicit), run, both # -# MAINTAINER: portmgr@FreeBSD.org +# 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 + +_USES_POST+= pkgconfig .endif +.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PKGCONFIG_POST_MK) +_INCLUDE_USES_PKGCONFIG_POST_MK=yes + +# Provide a cooperative mechanism for managing PKG_CONFIG_PATH. +. if defined(PKGCONFIG_PATHS) +. if !${CONFIGURE_ENV:MPKG_CONFIG_PATH=*} && !${MAKE_ENV:MPKG_CONFIG_PATH=*} +CONFIGURE_ENV+= PKG_CONFIG_PATH=${PKGCONFIG_PATHS:ts:} +MAKE_ENV+= PKG_CONFIG_PATH=${PKGCONFIG_PATHS:ts:} +. else +DEV_WARNING+= "PKGCONFIG_PATHS was ignored due to conflict with CONFIGURE_ENV or MAKE_ENV" +. endif +. endif + .endif diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk index 42d37d71d9aa..b197f1ffcfb5 100644 --- a/Mk/Uses/pyqt.mk +++ b/Mk/Uses/pyqt.mk @@ -2,19 +2,19 @@ # # Feature: pyqt # Usage: USES=pyqt:ARGS -# Valid ARGS: 5 +# Valid ARGS: 5, 6 # # MAINTAINER: kde@FreeBSD.org # # Internal Port variables for PyQt ports: -# PYQT_DIST - This port is part of PyQt5 itself. Variables and +# PYQT_DIST - This port is part of PyQt5/6 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) +# * foo:build only build depend +# * foo:run only run depend +# * foo:test only test depend +# * foo build and run depend (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 @@ -23,15 +23,15 @@ .if !defined(_INCLUDE_USES_PYQT_MK) _INCLUDE_USES_PYQT_MK= yes -# At the moment we support PyQt bindings versions 5, sip +# At the moment we support PyQt bindings versions 5 and 6 # option is for internal use by the py-sip ports. -_PYQT_SUPPORTED= 5 sip +_PYQT_SUPPORTED= 5 6 sip . if empty(pyqt_ARGS) IGNORE= pyqt needs a qt-version (${_PYQT_SUPPORTED}) . endif -# At the moment we support PyQt bindings versions 5 +# At the moment we support PyQt bindings versions 5 and 6 . for ver in ${_PYQT_SUPPORTED:O:u} . if ${pyqt_ARGS:M${ver}} . if empty(_PYQT_VERSION) @@ -53,87 +53,110 @@ MASTER_SITE_RIVERBANK= https://www.riverbankcomputing.com/static/Downloads/%SUBD 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_PYQT6= https://pypi.python.org/packages/source/P/PyQt6/ +MASTER_SITES_PYQT= ${MASTER_SITES_PYQT${_PYQT_VERSION}} +MASTER_SITES_PYQT5SIP= https://pypi.python.org/packages/source/P/PyQt5-sip/ +MASTER_SITES_PYQT6SIP= https://pypi.python.org/packages/source/P/PyQt6-sip/ +MASTER_SITES_PYQTSIP= ${MASTER_SITES_PYQT${_PYQT_VERSION}SIP} +MASTER_SITES_PYQT63D= https://pypi.python.org/packages/source/P/PyQt6-3D/ +MASTER_SITES_PYQT3D= ${MASTER_SITES_PYQT${_PYQT_VERSION}3D} +MASTER_SITES_PYQT5CHART= https://pypi.python.org/packages/source/P/PyQtChart/ +MASTER_SITES_PYQT6CHART= https://pypi.python.org/packages/source/P/PyQt6-Charts/ +MASTER_SITES_PYQTCHART= ${MASTER_SITES_PYQT${_PYQT_VERSION}CHART} +MASTER_SITES_PYQT6DATAVIS3D= https://pypi.python.org/packages/source/P/PyQt6-DataVisualization/ +MASTER_SITES_PYQTDATAVIS3D= ${MASTER_SITES_PYQT${_PYQT_VERSION}DATAVIS3D} +MASTER_SITES_PYQT5NETWORKAUTH= https://pypi.python.org/packages/source/P/PyQtNetworkAuth/ +MASTER_SITES_PYQT6NETWORKAUTH= https://pypi.python.org/packages/source/P/PyQt6-NetworkAuth/ +MASTER_SITES_PYQTNETWORKAUTH= ${MASTER_SITES_PYQT${_PYQT_VERSION}NETWORKAUTH} MASTER_SITES_PYQTBUILDER= https://pypi.io/packages/source/P/PyQt-builder/ +MASTER_SITES_PYQT5WEBENGINE= https://pypi.python.org/packages/source/P/PyQtWebEngine/ +MASTER_SITES_PYQT6WEBENGINE= https://pypi.python.org/packages/source/P/PyQt6-WebEngine/ +MASTER_SITES_PYQTWEBENGINE= ${MASTER_SITES_PYQT${_PYQT_VERSION}WEBENGINE} #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= 5.5.0 -QSCI2_VERSION= 2.13.0 -PYQT5_VERSION= 5.15.4 -PYQTSIP_VERSION= 12.9.0 -PYQTBUILDER_VERSION= 1.9.1 +# PORTEPOCH is important here, because version-comparisons in *_DEPENDS +# take it into account (visually, 6.5.1 >= 5.5.3,1, but it isn't). +# Adding the epoch directly into the version here cannot be done, +# because the DISTVERSION of each of these ports is obtained from the +# *_VERSION variable (and PORTEPOCH is set in each individual port). +# +# Where noted, the ports are epoched and the py-${comp}-PATH variables, +# below, should have a suitable epoch appended to the version. +SIP_VERSION= 6.8.3 # ,1 +SIP4_VERSION= 4.19.25 +QSCI2_VERSION= 2.14.1 +PYQT5_VERSION= 5.15.10 +PYQT6_VERSION= 6.6.1 +PYQT63D_VERSION= 6.6.0 +PYQT5CHART_VERSION= 5.15.6 +PYQT6CHART_VERSION= 6.6.0 +PYQT6DATAVIS3D_VERSION= 6.6.0 +PYQT5NETWORKAUTH_VERSION=5.15.5 +PYQT6NETWORKAUTH_VERSION=6.6.0 +PYQT5WEBENGINE_VERSION= 5.15.6 +PYQT6WEBENGINE_VERSION= 6.6.0 +PYQT5SIP_VERSION= 12.13.0 +PYQT6SIP_VERSION= 13.6.0 +PYQTBUILDER_VERSION= 1.15.4 -SIP_DISTNAME= sip-${SIP_VERSION} +SIP4_DISTNAME= sip-${SIP4_VERSION} PYQT5_DISTNAME= PyQt5-${PYQT5_VERSION} -PYQTSIP_DISTNAME= PyQt5_sip-${PYQTSIP_VERSION} -PYQTCHART_DISTNAME= PyQtChart-${PYQT_VERSION} -PYQTNETWORKAUTH_DISTNAME= PyQtNetworkAuth-${PYQT_VERSION} -PYQTBUILDER_DISTNAME= PyQt-builder-${PYQTBUILDER_VERSION} +PYQT6_DISTNAME= PyQt6-${PYQT6_VERSION} +PYQT5SIP_DISTNAME= PyQt5_sip-${PYQT5SIP_VERSION} +PYQT6SIP_DISTNAME= PyQt6_sip-${PYQT6SIP_VERSION} +PYQT63D_DISTNAME= PyQt6_3D-${PYQT63D_VERSION} +PYQT5CHART_DISTNAME= PyQtChart-${PYQT5CHART_VERSION} +PYQT6CHART_DISTNAME= PyQt6_Charts-${PYQT6CHART_VERSION} +PYQT6DATAVIS3D_DISTNAME= PyQt6_DataVisualization-${PYQT6DATAVIS3D_VERSION} +PYQT5NETWORKAUTH_DISTNAME= PyQtNetworkAuth-${PYQT5NETWORKAUTH_VERSION} +PYQT6NETWORKAUTH_DISTNAME= PyQt6_NetworkAuth-${PYQT6NETWORKAUTH_VERSION} +PYQT5WEBENGINE_DISTNAME= PyQtWebEngine-${PYQT5WEBENGINE_VERSION} +PYQT6WEBENGINE_DISTNAME= PyQt6_WebEngine-${PYQT6WEBENGINE_VERSION} PYQT5_DISTINFO_FILE= ${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo +PYQT6_DISTINFO_FILE= ${.CURDIR:H:H}/devel/${PYQT_RELNAME}/distinfo QSCI2_DISTNAME= QScintilla_src-${QSCI2_VERSION} PYQT5_LICENSE= GPLv3 +PYQT6_LICENSE= GPLv3 -_USE_PYQT_COMMS= sensors serialport -_USE_PYQT_DATABASES= sql -_USE_PYQT_DEVEL= core dbus dbussupport help location \ - designer designerplugin remoteobjects test -_USE_PYQT_GRAPHICS= svg -_USE_PYQT_LANG= qml -_USE_PYQT_LOCATION= location -_USE_PYQT_MISC= demo -_USE_PYQT_MULTIMEDIA= multimedia multimediawidgets -_USE_PYQT_NET= network networkauth -_USE_PYQT_POSITIONING= positioning -_USE_PYQT_PRINT= printsupport -_USE_PYQT_TEXTPROC= xml xmlpatterns -_USE_PYQT_WWW= webchannel webengine webkit webkitwidgets websockets -_USE_PYQT_X11= opengl -_USE_PYQT_X11-TOOLKITS= chart gui widgets quick quick3d quickwidgets - -# Keep these synchronized with OPTIONS_DEFINE in devel/py-qt5 -# PyQt components split up into pyqt5/... -_USE_PYQT_ALL= ${_USE_PYQT_COMMS} \ - ${_USE_PYQT_DATABASES} \ - ${_USE_PYQT_DEVEL} \ - ${_USE_PYQT_GRAPHICS} \ - ${_USE_PYQT_LANG} \ - ${_USE_PYQT_LOCATION} \ - ${_USE_PYQT_MISC} \ - ${_USE_PYQT_MULTIMEDIA} \ - ${_USE_PYQT_NET} \ - ${_USE_PYQT_POSITIONING} \ - ${_USE_PYQT_PRINT} \ - ${_USE_PYQT_TEXTPROC} \ - ${_USE_PYQT_WWW} \ - ${_USE_PYQT_X11} \ - ${_USE_PYQT_X11-TOOLKITS} +_USE_PYQT_ALL= pyqt5 pyqt6 3d chart datavis3d 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} +PYQT3D_VERSION= ${PYQT${_PYQT_VERSION}3D_VERSION} +PYQTCHART_VERSION= ${PYQT${_PYQT_VERSION}CHART_VERSION} +PYQTDATAVIS3D_VERSION= ${PYQT${_PYQT_VERSION}DATAVIS3D_VERSION} +PYQTNETWORKAUTH_VERSION=${PYQT${_PYQT_VERSION}NETWORKAUTH_VERSION} +PYQTWEBENGINE_VERSION=${PYQT${_PYQT_VERSION}WEBENGINE_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} +PYQT3D_DISTNAME= ${PYQT${_PYQT_VERSION}3D_DISTNAME} +PYQTCHART_DISTNAME= ${PYQT${_PYQT_VERSION}CHART_DISTNAME} +PYQTDATAVIS3D_DISTNAME= ${PYQT${_PYQT_VERSION}DATAVIS3D_DISTNAME} +PYQTNETWORKAUTH_DISTNAME=${PYQT${_PYQT_VERSION}NETWORKAUTH_DISTNAME} +PYQTWEBENGINE_DISTNAME=${PYQT${_PYQT_VERSION}WEBENGINE_DISTNAME} PYQT_DISTINFO_FILE= ${PYQT${_PYQT_VERSION}_DISTINFO_FILE} PYQT_LICENSE= ${PYQT${_PYQT_VERSION}_LICENSE} -# PATH -py-sip_PATH= ${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION} +# PATH (see note about epochs, above) +py-sip_PATH= ${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION},1 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} - -. for _component in ${_USE_PYQT_ALL} -py-${_component}_PATH?=${PYQT_PY_RELNAME}-${_component}>=${PYQT_VERSION} -. endfor +py-qtbuilder_PATH= ${PYTHON_PKGNAMEPREFIX}PyQt-builder>=${PYQTBUILDER_VERSION} +py-pyqt5_PATH= ${PYQT_PY_RELNAME}-pyqt>=${PYQT_VERSION} +py-pyqt6_PATH= ${PYQT_PY_RELNAME}-pyqt>=${PYQT_VERSION} +py-3d_PATH= ${PYQT_PY_RELNAME}-3d>=${PYQT3D_VERSION} +py-chart_PATH= ${PYQT_PY_RELNAME}-chart>=${PYQTCHART_VERSION} +py-datavis3d_PATH= ${PYQT_PY_RELNAME}-datavis3d>=${PYQTDATAVIS3D_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 @@ -141,53 +164,16 @@ 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 - -. for _categorie in comms databases devel graphics lang misc multimedia net print textproc www x11 x11-toolkits -_PYQT_CATEGORIE= _USE_PYQT_${_categorie:tu} -. for _component in ${${_PYQT_CATEGORIE}} -py-${_component}_PORT?=${_categorie}/${PYQT_RELNAME}-${_component} -. endfor -. endfor - -py-core_DESC= Python bindings for QtCore module -py-chart_DESC= Python bindings for QtChart module -py-dbus_DESC= Python bindings for QtDBus module -py-dbussupport_DESC= Qt event loop support for dbus-python -py-demo_DESC= PyQt demo and examples -py-designer_DESC= Python bindings for QtDesigner module -py-designerplugin_DESC= Python bindings for QtDesigner plugin -py-gui_DESC= Python bindings for QtGui module -py-help_DESC= Python bindings for QtHelp module -py-location_DESC= Python bindings for Location module -py-multimedia_DESC= Python bindings for Multimedia module -py-multimediawidgets_DESC= Python bindings for QtMultimediaWidgets module -py-network_DESC= Python bindings for QtNetwork module -py-networkauth_DESC= Python bindings for QtNetworkAuth module -py-opengl_DESC= Python bindings for QtOpenGL module -py-positioning_DESC= Python bindings for QtPositioning module -py-printsupport_DESC= Python bindings for Printsupport module -py-qml_DESC= Python bindings for Qml module -py-qscintilla2_DESC= Python bindings for QScintilla2 -py-quick_DESC= Python bindings for QtQuick module -py-quick3d_DESC= Python bindings for QtQuick3D module -py-quickwidgets_DESC= Python bindings for QtQuickWidgets module -py-remoteobjects_DESC= Python bindings for QtRemoteObjects module -py-sip_DESC= Python bindings generator for C and C++ libraries -py-sensors_DESC= Python bindings for QtSensors -py-serialport_DESC= Python bindings for QtSerialPort -py-sql_DESC= Python bindings for QtSql module -py-svg_DESC= Python bindings for QtSvg module -py-test_DESC= Python bindings for QtTest module -py-webchannel_DESC= Python bindings for QtWebChannel module -py-webengine_DESC= Python bindings for QtWebEngine module -py-webkit_DESC= Python bindings for QtWebKit module -py-webkitwidgets_DESC= Python bindings for QtWebKitWidgets module -py-widgets_DESC= Python bindings for QTWidgets module -py-xml_DESC= Python bindings for QtXml module -py-xmlpatterns_DESC= Python bindings for QtXmlPatterns module +py-pyqt5_PORT= devel/${PYQT_RELNAME}-pyqt +py-pyqt6_PORT= devel/${PYQT_RELNAME}-pyqt +py-3d_PORT= graphics/${PYQT_RELNAME}-3d +py-chart_PORT= x11-toolkits/${PYQT_RELNAME}-chart +py-datavis3d_PORT= x11-toolkits/${PYQT_RELNAME}-datavis3d +py-networkauth_PORT= net/${PYQT_RELNAME}-networkauth +py-webengine_PORT= www/${PYQT_RELNAME}-webengine # The versionned executable of sip -SIP= ${LOCALBASE}/bin/sip5-${PYTHON_VER} +SIP= ${LOCALBASE}/bin/sip-build-${PYTHON_VER} # Relative directories _VERSION_SUBDIR_REL= PyQt${_PYQT_VERSION}/${PYTHON_VER} @@ -217,49 +203,40 @@ PLIST_SUB+= PYQT_APIDIR=${_APIDIR_REL} \ PYQT_PYQTVERSION=${PYQT_VERSION} . if defined(PYQT_DIST) -PORTVERSION= ${PYQT_VERSION} -MASTER_SITES= ${PYQT_MASTERSITES} -PKGNAMEPREFIX= ${PYQT_PY_RELNAME}- -DISTNAME= ${PYQT_DISTNAME} -DISTINFO_FILE= ${PYQT_DISTINFO_FILE} + LICENSE?= ${PYQT_LICENSE} -HAS_CONFIGURE= yes -. if ${_PYQT_VERSION} > 4 -# PyQt5's configure.py generates .pro files and calls qmake to generate the -# Makefiles. qmake's Makefiles use INSTALL_ROOT instead of DESTDIR. -DESTDIRNAME= INSTALL_ROOT -# Limit PyQt5's version to the Qt5 version in ports -PORTSCOUT?= limit:^${_QT_VERSION:R} +PLIST_SUB+= PYTHON_MAJOR_VER="${PYTHON_MAJOR_VER}" + +SIP_ARGS+= --qmake ${QMAKE} \ + --verbose \ + --build-dir build \ + --protected-is-public \ + --api-dir ${PYQT_APIDIR} \ + --jobs ${MAKE_JOBS_NUMBER} +. if ${PORTNAME} == "pyqt" +SIP_ARGS+= --confirm-license . endif -PATCHDIR= ${.CURDIR}/../../devel/${PYQT_RELNAME}-core/files -CONFIGURE_ARGS+=-b ${PREFIX}/bin \ - -d ${PYTHONPREFIX_SITELIBDIR} \ - -q ${QMAKE} \ - --confirm-license \ - --sip ${SIP} \ - --sipdir ${PYQT_SIPDIR} -. if ${_PYQT_VERSION:M5} -# Move the designer plugin and qml libraries to versioned folders. -CONFIGURE_ARGS+=--qml-plugindir ${PYQT_QMLDIR} \ - --designer-plugindir ${PYQT_DESIGNERDIR} -# Further do not gernate the dinstinfo files. -CONFIGURE_ARGS+=--no-dist-info +. 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 -# One of the things PyQt looks for to determine whether to build the Qt DBus -# main loop module (${PYQT_RELNAME}-dbussupport) is whether the dbus/ directory is -# present. Only extract it for that port then. -. if ${PORTNAME} != "dbussupport" -EXTRACT_AFTER_ARGS+= --exclude "${DISTNAME}/dbus" -. endif # ${PORTNAME} != "dbussupport" -. if !target(do-configure) -do-configure: - ${REINPLACE_CMD} -e "s/sip-module/sip-module-${PYTHON_VER}/" ${WRKSRC}/configure.py - cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \ - ${PYTHON_CMD} configure.py ${CONFIGURE_ARGS} -. endif # !target(do-configure) +. if !target(do-build) +do-build: + (cd ${WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${SIP} ${SIP_ARGS}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} -C ./build) + +. endif # !target(do-build) + +. if !target(do-install) +do-install: + (cd ${WRKSRC} ; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${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-" @@ -268,7 +245,7 @@ _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 +_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} @@ -280,9 +257,9 @@ py-${comp}_test_TEST_DEPENDS?= ${py-${comp}_TEST_DEPENDS} _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} +BUILD_DEPENDS+= ${py-${comp:S/:/_/}_BUILD_DEPENDS} +RUN_DEPENDS+= ${py-${comp:S/:/_/}_RUN_DEPENDS} +TEST_DEPENDS+= ${py-${comp:S/:/_/}_TEST_DEPENDS} . else IGNORE?= cannot be installed: unknown USE_PYQT component ${comp} #' . endif diff --git a/Mk/Uses/pytest.mk b/Mk/Uses/pytest.mk new file mode 100644 index 000000000000..4d0a0039672f --- /dev/null +++ b/Mk/Uses/pytest.mk @@ -0,0 +1,69 @@ +# handle testing with pytest +# +# Feature: pytest +# Usage: USES=pytest[:4] +# +# It implies USES=python:test automatically if no USES=python has been +# specified yet +# +# It provides the following additional variables to set by the ports: +# +# PYTEST_ARGS additional args to pytest (defaults to empty). +# PYTEST_IGNORED_TESTS lists of `pytest -k` patterns of tests to ignore +# (defaults to empty). For tests which are not +# expected to pass, such as ones requiring a database +# access. +# PYTEST_BROKEN_TESTS lists of `pytest -k` patterns of tests to ignore +# (defaults to empty). For broken tests which require +# fixing. +# +# The following variables may be set by the user: +# +# PYTEST_ENABLE_IGNORED_TESTS enable tests which are otherwise ignored by +# PYTEST_IGNORED_TESTS. +# PYTEST_ENABLE_BROKEN_TESTS enable tests which are otherwise ignored by +# PYTEST_BROKEN_TESTS. +# PYTEST_ENABLE_ALL_TESTS enable tests which are otherwise ignored by +# PYTEST_IGNORED_TESTS and PYTEST_BROKEN_TESTS. +# +# MAINTAINER: amdmi3@FreeBSD.org + +.if !defined(_INCLUDE_USES_PYTEST_MK) +_INCLUDE_USES_PYTEST_MK= yes + +. if !${USES:Mpython*} +python_ARGS= test +. include "${USESDIR}/python.mk" +. endif + +. if empty(pytest_ARGS) +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} +. elif ${pytest_ARGS} == "4" +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest4>=0:devel/py-pytest4@${PY_FLAVOR} +. else +IGNORE= Incorrect 'USES+=pytest:${pytest_ARGS}' expecting 'USES+=pytest[:4]' +. endif + +PYTEST_IGNORED_TESTS?= # empty +PYTEST_BROKEN_TESTS?= # empty +PYTEST_ARGS?= # empty + +_PYTEST_ALL_IGNORED_TESTS?= # empty +. if !defined(PYTEST_ENABLE_IGNORED_TESTS) && !defined(PYTEST_ENABLE_ALL_TESTS) +_PYTEST_ALL_IGNORED_TESTS+= ${PYTEST_IGNORED_TESTS} +. endif +. if !defined(PYTEST_ENABLE_BROKEN_TESTS) && !defined(PYTEST_ENABLE_ALL_TESTS) +_PYTEST_ALL_IGNORED_TESTS+= ${PYTEST_BROKEN_TESTS} +. endif + +_PYTEST_FILTER_EXPRESSION= ${_PYTEST_ALL_IGNORED_TESTS:C/^(.)/and not \1/:tW:C/^and //} + +. if !target(do-test) +do-test: + @cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest \ + -k '${_PYTEST_FILTER_EXPRESSION}' \ + -v -rs -o addopts= \ + ${PYTEST_ARGS} +. endif + +.endif diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 2a12dad52d4f..feb46eb9b70b 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -17,19 +17,19 @@ # Examples: # # USES=python:2.7 # Supports Python 2.7 Only -# USES=python:3.6+ # Supports Python 3.6 or later -# USES=python:3.6-3.9 # Supports Python 3.6 to 3.9 +# USES=python:3.8+ # Supports Python 3.8 or later +# USES=python:3.8-3.10 # Supports Python 3.8 to 3.10 # USES=python:-3.8 # Supports Python up to 3.8 -# USES=python # Supports 3.6+ +# USES=python # Supports 3.8+ # # NOTE: <version-spec> should be as specific as possible, matching the versions # upstream declares support for, without being incorrect. In particular, -# USES=python *without* a <version-spec> means 3.6+, +# USES=python *without* a <version-spec> means 3.8+, # including unreleased versions, which is probably incorrect. # # Not specifying a <version-spec> should only be used when a more specific # <version-spec> cannot be specified due to syntax limitations, for -# example: 2.7,3.4-3.6, but even in this case, X.Y+ (2.7+), or -X.Y (-3.6) +# example: 2.7,3.8-3.9, but even in this case, X.Y+ (2.7+), or -X.Y (-3.8) # is preferred and likely more correct. # # patch Python is needed at patch time. Adds dependency to PATCH_DEPENDS. @@ -50,7 +50,7 @@ # Exported variables: # # PYTHON_VERSION - The chosen Python interpreter including the version, -# e.g. python2.7, python3.5, etc. +# e.g. python2.7, python3.8, etc. # # Variables, which can be set by the port: # @@ -82,10 +82,20 @@ # prefix-less original name, e.g. # bin/foo-2.7 --> bin/foo. # +# cryptography_build +# - Depend on security/cryptography at build-time. +# +# cryptography - Depend on security/cryptography at run-time. +# +# cryptography_test +# - Depend on security/cryptography at test-time. +# # cython - Depend on lang/cython at build-time. # # cython_run - Depend on lang/cython at run-time. # +# cython_test - Depend on lang/cython for tests. +# # flavors - Force creation of flavors for Python 2 and 3 default # versions, where applicable. # @@ -103,6 +113,9 @@ # distutils - Use distutils as do-configure, do-build and # do-install targets. implies flavors. # +# pep517 - Follow the PEP-517 standard to build and install wheels +# as do-build and do-install targets. implies flavors. +# # autoplist - Automatically generates the packaging list for a # port that uses distutils when defined. # requires: distutils @@ -119,10 +132,38 @@ # # noegginfo - Skip an egg-info entry from plist, if defined. # +# nose - Run tests with nose (devel/py-nose) +# +# nose2 - Run tests with nose2 (devel/py-nose2) +# +# pytest - Run tests with latest pytest (devel/py-pytest) +# +# pytest4 - Run tests with pytest 4.x (devel/py-pytest4) +# +# unittest - Run tests with unittest +# +# unittest2 - Run tests with unittest2 (devel/py-unittest2) +# # PYTHON_CMD - Python's command line file name, including the # version number (used for dependencies). # default: ${PYTHONBASE}/bin/${PYTHON_VERSION} # +# PEP517_BUILD_CMD - Command sequence for a PEP-517 build frontend that builds a wheel. +# default: ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING} +# +# PEP517_BUILD_DEPEND - Port needed to execute ${PEP517_BUILD_CMD}. +# default: ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR} +# +# PEP517_BUILD_CONFIG_SETTING +# - Options for the build backend. Must include -C or --config-setting per option. +# default: <empty> +# +# PEP517_INSTALL_CMD - Command sequence for a PEP-517 install frontend that installs a wheel. +# default: ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl +# +# PEP517_INSTALL_DEPEND - Port needed to execute ${PEP517_INSTALL_CMD}. +# default: ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR} +# # PYSETUP - Name of the setup script used by the distutils # package. # default: setup.py @@ -163,6 +204,14 @@ # - 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 # +# PYTEST_BROKEN_TESTS - Lists of 'pytest -k' patterns to skip tests which +# require fixing. +# default: <empty> +# +# PYTEST_IGNORED_TESTS - Lists of 'pytest -k' patterns to skip tests which are +# not expected to pass, e.g. requiring a database access. +# default: <empty> +# # The following variables can be read by ports and must not be modified: # # PYTHONBASE - The installation prefix of the chosen Python @@ -174,17 +223,17 @@ # 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, ... +# without dots, e.g. 20706, 30801, ... # # PYTHON_SUFFIX - The major-minor release number of the chosen Python -# interpreter without dots, e.g. 27, 36, ... +# interpreter without dots, e.g. 27, 38, ... # 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.6, ... +# interpreter, e.g. 2.7, 3.8, ... # # PYTHON_ABIVER - Additional ABI flags set by the chosen Python # interpreter, e.g. md @@ -222,17 +271,20 @@ # packages for different Python versions. # default: -py${PYTHON_SUFFIX} # -# Using USES=python also will add some useful entries to PLIST_SUB: +# Using USES=python also will add some useful entries to SUB_LIST and PLIST_SUB: # -# PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} -# PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} +# PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR} +# PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR} # PYTHON_PLATFORM=${PYTHON_PLATFORM} -# PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} +# PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR} # PYTHON_SUFFIX=${PYTHON_SUFFIX} # PYTHON_VER=${PYTHON_VER} # PYTHON_VERSION=${PYTHON_VERSION} # -# and PYTHON2 and PYTHON3 will be set according to the Python version: +# where PYTHON_INCLUDEDIR, PYTHON_LIBDIR and PYTHON_SITELIBDIR have their PREFIX +# stripped for PLIST_SUB. +# +# PYTHON2 and PYTHON3 will also be set according to the Python version: # # PYTHON2="" PYTHON3="@comment " for Python 2.x # PYTHON2="@comment " PYTHON3="" for Python 3.x @@ -240,6 +292,22 @@ # PYDISTUTILS_INSTALLNOSINGLE # - Deprecated without replacement # +# Dependency lines of selected Python modules: +# +# PY_SETUPTOOLS - setuptools port based on USE_PYTHON=distutils +# PYGAME - pygame port +# PYNUMPY - NumPy port +# PY_MERCURIAL - mercurial port, PKGNAME varies based on default +# Python version +# PY_BOOST - Boost Python libraries port +# +# The following variables may be set by the user: +# +# PYTEST_ENABLE_ALL_TESTS - Enable tests skipped by PYTEST_BROKEN_TESTS +# and PYTEST_IGNORED_TESTS. +# PYTEST_ENABLE_BROKEN_TESTS - Enable tests skipped by PYTEST_BROKEN_TESTS. +# PYTEST_ENABLE_IGNORED_TESTS - Enable tests skipped by PYTEST_IGNORED_TESTS. +# # MAINTAINER: python@FreeBSD.org .if !defined(_INCLUDE_USES_PYTHON_MK) @@ -248,39 +316,68 @@ _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.6 3.10 2.7 # preferred first -_PYTHON_PORTBRANCH= 3.8 # ${_PYTHON_VERSIONS:[1]} +_PYTHON_VERSIONS= 3.9 3.8 3.10 3.11 2.7 # preferred first +_PYTHON_PORTBRANCH= 3.9 # ${_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 +_VALID_PYTHON_FEATURES= allflavors \ + autoplist \ + concurrent \ + cryptography_build \ + cryptography \ + cryptography_test \ + cython \ + cython_run \ + cython_test \ + distutils \ + flavors \ + noegginfo \ + noflavors \ + nose \ + nose2 \ + optsuffix \ + pep517 \ + py3kplist \ + pytest \ + pytest4 \ + pythonprefix \ + unittest \ + unittest2 _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_<FEATURENAME> -.for var in ${USE_PYTHON} +. for var in ${USE_PYTHON} _PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} -.endfor +. endfor +. if defined(_PYTHON_FEATURE_PYTEST) && defined(_PYTHON_FEATURE_PYTEST4) +IGNORE= uses either USE_PYTHON=pytest or USE_PYTHON=pytest4, not both of them +. endif # distutils automatically generates flavors depending on the supported # versions. -.if defined(_PYTHON_FEATURE_DISTUTILS) +. if defined(_PYTHON_FEATURE_DISTUTILS) +_PYTHON_FEATURE_FLAVORS= yes +. endif + +# pep517 automatically generates flavors depending on the supported +# versions. +. if defined(_PYTHON_FEATURE_PEP517) _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 @@ -288,53 +385,49 @@ _PYTHON_FEATURE_FLAVORS= yes .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 - -.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 -DEV_WARNING+= "lang/python27 reached End of Life and will be removed on 2020-12-31, consider converting to a modern version of python" -.elif ${_PYTHON_ARGS} == 2 +. 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 DEV_ERROR+= "USES=python:2 is no longer supported, use USES=python:2.7" -.elif ${_PYTHON_ARGS} == 3 -DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.6+ or an appropriate version range" -.endif # ${_PYTHON_ARGS} == 2.7 +. elif ${_PYTHON_ARGS} == 3 +DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.8+ or an appropriate version range" +. endif # ${_PYTHON_ARGS} == 2.7 _PYTHON_VERSION:= ${PYTHON_DEFAULT} -.if empty(_PYTHON_ARGS) -_PYTHON_ARGS= 3.6+ -.endif +. if empty(_PYTHON_ARGS) +_PYTHON_ARGS= 3.8+ +. endif # Validate Python version whether it meets the version restriction. _PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[1-9]?[0-9])$/\1-\1/} @@ -348,94 +441,94 @@ _PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]}${_PYTHON_V _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 ${PYTHON_DEFAULT} ${PYTHON2_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} ${_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} _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.6+), from the first +# - If using a version restriction (USES=python:3.8+), from the first # acceptable default Python version. # - From PYTHON_DEFAULT PY_FLAVOR= py${_PYTHON_VERSION:S/.//} @@ -451,41 +544,37 @@ 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 +# tokens if it's a single character. Only use 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_MAJOR_VER} > 2 +. if exists(${PYTHON_CMD}-config) PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags -.elif ${PYTHON_REL} < 30800 -# Default ABI flags for lang/python3[67] ports -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} < 3 DEPRECATED?= Uses Python 2.7 which is EOLed upstream -EXPIRATION_DATE?= 2020-12-31 -.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} @@ -515,55 +604,95 @@ _PYTHONPKGLIST= ${WRKDIR}/.PLIST.pymodtmp # - it uses USE_PYTHON=distutils # -.if defined(_PYTHON_FEATURE_CYTHON) +# cryptography* support +. if ${PYCRYPTOGRAPHY_DEFAULT} == rust +CRYPTOGRAPHY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography>=42.0.5,1:security/py-cryptography@${PY_FLAVOR} +. else +CRYPTOGRAPHY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cryptography-legacy>=3.4.8_1,1:security/py-cryptography-legacy@${PY_FLAVOR} +. endif + +. if defined(_PYTHON_FEATURE_CRYPTOGRAPHY_BUILD) +BUILD_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS} +. endif + +. if defined(_PYTHON_FEATURE_CRYPTOGRAPHY) +RUN_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS} +. endif + +. if defined(_PYTHON_FEATURE_CRYPTOGRAPHY_TEST) +TEST_DEPENDS+= ${CRYPTOGRAPHY_DEPENDS} +. endif + +# cython* support +. 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_CYTHON_TEST) +TEST_DEPENDS+= cython-${PYTHON_VER}:lang/cython@${PY_FLAVOR} +. 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) && \ - ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools &&\ +. if defined(_PYTHON_FEATURE_DISTUTILS) && \ + ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools && \ + ${_CURRENTPORT} != ${PYTHON_PKGNAMEPREFIX}setuptools58 && \ ${_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 -BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} -RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} -.endif -.endif +. else +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} +. endif +. endif + +. if defined(_PYTHON_FEATURE_PEP517) +. if ${PYTHON_MAJOR_VER} < 3 +DEV_ERROR+= "USES=python:2.7 is incompatible with USE_PYTHON=pep517" +. endif +. if defined(_PYTHON_FEATURE_DISTUTILS) +DEV_ERROR+= "USE_PYTHON=distutils is incompatible with USE_PYTHON=pep517" +. endif +. if defined(_PYTHON_FEATURE_PY3KPLIST) +DEV_ERROR+= "USE_PYTHON=py3kplist is incompatible with USE_PYTHON=pep517" +. endif +. if defined(_PYTHON_FEATURE_NOEGGINFO) +DEV_ERROR+= "USE_PYTHON=noegginfo is incompatible with USE_PYTHON=pep517" +. endif +. endif # distutils support PYSETUP?= setup.py @@ -574,12 +703,12 @@ PYDISTUTILS_SETUP?= -c \ 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} @@ -588,22 +717,64 @@ 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) && \ +# PEP-517 support +PEP517_BUILD_CMD?= ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING} +PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR} +PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl +PEP517_INSTALL_DEPEND?= ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR} + +# nose support +. if defined(_PYTHON_FEATURE_NOSE) +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR} +. endif + +# nose2 support +. if defined(_PYTHON_FEATURE_NOSE2) +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose2>=0:devel/py-nose2@${PY_FLAVOR} +. endif + +# pytest support +. if defined(_PYTHON_FEATURE_PYTEST) +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest>=7,1:devel/py-pytest@${PY_FLAVOR} +. elif defined(_PYTHON_FEATURE_PYTEST4) +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest4>=4.6,1:devel/py-pytest4@${PY_FLAVOR} +. endif +. if defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) +PYTEST_BROKEN_TESTS?= # empty +PYTEST_IGNORED_TESTS?= # empty +_PYTEST_SKIPPED_TESTS?= # empty +. if !defined(PYTEST_ENABLE_ALL_TESTS) +. if !defined(PYTEST_ENABLE_BROKEN_TESTS) +_PYTEST_SKIPPED_TESTS+= ${PYTEST_BROKEN_TESTS} +. endif +. if !defined(PYTEST_ENABLE_IGNORED_TESTS) +_PYTEST_SKIPPED_TESTS+= ${PYTEST_IGNORED_TESTS} +. endif +. endif # !defined(PYTEST_ENABLE_ALL_TESTS) +_PYTEST_FILTER_EXPRESSION= ${_PYTEST_SKIPPED_TESTS:C/^(.)/and not \1/:tW:C/^and //} +. endif # defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) + +# unittest2 support +. if defined(_PYTHON_FEATURE_UNITTEST2) +TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}unittest2>=0:devel/py-unittest2@${PY_FLAVOR} +. endif + +. 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) || defined(_PYTHON_FEATURE_PEP517)) _RELSITELIBDIR= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} _RELLIBDIR= ${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} @@ -617,8 +788,8 @@ add-plist-pymod: -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/) @@ -634,8 +805,8 @@ add-plist-python: 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) || defined(_PYTHON_FEATURE_PEP517)) # Fix for programs that build python from a GNU auto* environment CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" @@ -643,38 +814,64 @@ 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} +CMAKE_ARGS+= -DPython_EXECUTABLE:FILEPATH="${PYTHON_CMD}" +CMAKE_ARGS+= -DPython${PYTHON_MAJOR_VER}_EXECUTABLE:FILEPATH="${PYTHON_CMD}" # 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} +PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.26,1:math/py-numpy@${PY_FLAVOR} + +. if defined(_PYTHON_FEATURE_DISTUTILS) +. if ${PYTHON_MAJOR_VER} < 3 +PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR} +. else +#PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools58>0:devel/py-setuptools58@${PY_FLAVOR} +PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} +. endif +. else +PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} +. endif # Common Python modules that can be needed but only for some versions of Python. -.if ${PYTHON_REL} < 30500 -.else +. if ${PYTHON_REL} < 31100 +PY_EXCEPTIONGROUP= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.1.1:devel/py-exceptiongroup@${PY_FLAVOR} +. endif + +. if ${PYTHON_REL} >= 30000 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 SUB_FILES +SUB_LIST+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR} \ + PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR} \ + PYTHON_PLATFORM=${PYTHON_PLATFORM} \ + PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR} \ + PYTHON_SUFFIX=${PYTHON_SUFFIX} \ + PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ + PYTHON_VER=${PYTHON_VER} \ + PYTHON_VERSION=${PYTHON_VERSION} # Substitutions for pkg-plist # Use a short form of the PYTHONPREFIX_*DIR variables; we don't need the @@ -687,11 +884,13 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \ PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ PYTHON_VER=${PYTHON_VER} \ PYTHON_VERSION=${PYTHON_VERSION} -.if ${PYTHON_REL} < 30000 +. if ${PYTHON_MAJOR_VER} < 3 +SUB_LIST+= PYTHON2="" PYTHON3="@comment " PLIST_SUB+= PYTHON2="" PYTHON3="@comment " -.else +. else +SUB_LIST+= PYTHON2="@comment " PYTHON3="" PLIST_SUB+= PYTHON2="@comment " PYTHON3="" -.endif +. endif _USES_POST+= python .endif # _INCLUDE_USES_PYTHON_MK @@ -704,23 +903,100 @@ 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 + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_CONFIGURE_TARGET} ${PYDISTUTILS_CONFIGUREARGS}) +. 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 + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) +. 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) + @(cd ${INSTALL_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) +. endif +. endif # defined(_PYTHON_FEATURE_DISTUTILS) + +. if defined(_PYTHON_FEATURE_PEP517) +. if !empty(PEP517_BUILD_DEPEND) +BUILD_DEPENDS+= ${PEP517_BUILD_DEPEND} +. endif +. if !empty(PEP517_INSTALL_DEPEND) +BUILD_DEPENDS+= ${PEP517_INSTALL_DEPEND} +. endif + +. if !target(do-configure) +do-configure: + @${DO_NADA} +. endif + +. if !target(do-build) +do-build: + @cd ${BUILD_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_BUILD_CMD} +. endif + +. if !target(do-install) +do-install: + @${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + @cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${PEP517_INSTALL_CMD} + @${PYTHON_CMD} -B ${PORTSDIR}/Mk/Scripts/strip_RECORD.py \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.dist-info/RECORD >> ${_PYTHONPKGLIST} + @${REINPLACE_CMD} \ + -e '/\.pyc$$/d' \ + -e 's|^|${PYTHONPREFIX_SITELIBDIR}/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../etc/|etc/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../bin/|bin/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../include/|include/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../lib/|lib/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libdata/|libdata/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../libexec/|libexec/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../man/|man/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../sbin/|sbin/|' \ + -e 's|^${PYTHONPREFIX_SITELIBDIR}/../../../share/|share/|' \ + ${_PYTHONPKGLIST} + @cd ${STAGEDIR}${PREFIX} && ${FIND} lib -name '*.pyc' >> ${_PYTHONPKGLIST} +. endif +. endif # defined(_PYTHON_FEATURE_PEP517) + +. if defined(_PYTHON_FEATURE_NOSE) +. if !target(do-test) +do-test: + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m nose ${TEST_ARGS:NDESTDIR=*} -v +. endif +. endif # defined(_PYTHON_FEATURE_NOSE) + +. if defined(_PYTHON_FEATURE_NOSE2) +. if !target(do-test) +do-test: + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m nose2 ${TEST_ARGS:NDESTDIR=*} -v +. endif +. endif # defined(_PYTHON_FEATURE_NOSE2) + +. if defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) +. if !target(do-test) +do-test: + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -k '${_PYTEST_FILTER_EXPRESSION}' -rs -v -o addopts= ${TEST_ARGS:NDESTDIR=*} +. endif +. endif # defined(_PYTHON_FEATURE_PYTEST) || defined(_PYTHON_FEATURE_PYTEST4) + +. if defined(_PYTHON_FEATURE_UNITTEST) +. if !target(do-test) +do-test: + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest ${TEST_ARGS:NDESTDIR=*} -v +. endif +. endif # defined(_PYTHON_FEATURE_UNITTEST) + +. if defined(_PYTHON_FEATURE_UNITTEST2) +. if !target(do-test) +do-test: + cd ${TEST_WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${PYTHON_CMD} -m unittest2 ${TEST_ARGS:NDESTDIR=*} -v +. endif +. endif # defined(_PYTHON_FEATURE_UNITTEST2) + .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) diff --git a/Mk/Uses/qca.mk b/Mk/Uses/qca.mk index 72f46105946c..29ef2215f72f 100644 --- a/Mk/Uses/qca.mk +++ b/Mk/Uses/qca.mk @@ -13,11 +13,16 @@ _INCLUDE_QCA_MK= yes IGNORE+= USES=qca takes no arguments . endif -_QCA_LIB= libqca-qt5.so +. if empty(USES:Mqt*) +IGNORE+= Qt version not specified +. endif + +_QCA_LIB= libqca-qt${_QT_VER}.so _QCA_DEFAULT_PORT= devel/qca _QCA_CHOSEN_PORT= DEFAULT +_QCA_FLAVOR= qt${_QT_VER} -LIB_DEPENDS+= ${_QCA_LIB}:${_QCA_${_QCA_CHOSEN_PORT}_PORT} +LIB_DEPENDS+= ${_QCA_LIB}:${_QCA_${_QCA_CHOSEN_PORT}_PORT}@${_QCA_FLAVOR} .endif 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 @@ -18,44 +18,44 @@ _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/qmake.mk b/Mk/Uses/qmake.mk index 1524aed3d95d..926d98002b53 100644 --- a/Mk/Uses/qmake.mk +++ b/Mk/Uses/qmake.mk @@ -109,8 +109,8 @@ QMAKE_SOURCE_PATH?= # empty . endif # Add qmake to USE_QT -- unless it's qmake itself -. if !${PORTNAME} == qmake -USE_QT+= qmake_build +. if !${PORTNAME} == qmake && ${_QT_VER:M5} +USE_QT+= qmake:build . endif . if empty(qmake_ARGS:Mno_env) @@ -139,7 +139,7 @@ _QMAKE_MK_POST_INCLUDED= qmake.mk qmake-configure: @${MKDIR} ${_QMAKE_WRKSRC} @cd ${_QMAKE_WRKSRC} && \ - ${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \ + ${SETENVI} ${WRK_ENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \ ${QMAKE_SOURCE_PATH} \ ${QMAKE_CONFIGURE_ARGS:?--:} ${QMAKE_CONFIGURE_ARGS} diff --git a/Mk/Uses/qt-dist.mk b/Mk/Uses/qt-dist.mk index ec1c314b175d..9b0b4d5ee08e 100644 --- a/Mk/Uses/qt-dist.mk +++ b/Mk/Uses/qt-dist.mk @@ -1,8 +1,8 @@ # 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 an part of Qt5 -# - auto inclues qt.mk +# - qt-dist: The port is a port for a part of Qt +# - auto includes qt.mk # - qt.mk - Dependency handling. USE_QT=foo bar # # @@ -21,14 +21,18 @@ qmake_ARGS?= # empty .include "${USESDIR}/qmake.mk" # Supported distribution arguments -_QT5_DISTS= 3d activeqt androidextras base charts connectivity datavis3d \ - declarative doc gamepad graphicaleffects imageformats location \ - lottie macextras multimedia networkauth purchasing quick3d quickcontrols \ - quickcontrols2 quicktimeline remoteobjects script scxml sensors serialbus \ - serialport speech svg tools translations virtualkeyboard wayland \ - webchannel webengine webglplugin websockets webview winextras \ +_COMMON_DISTS= 3d base charts connectivity datavis3d declarative imageformats location multimedia \ + networkauth quick3d quicktimeline remoteobjects scxml sensors \ + serialbus serialport speech svg tools translations virtualkeyboard \ + wayland webchannel webengine websockets webview +_QT5_DISTS= gamepad graphicaleffects quickcontrols \ + quickcontrols2 script webglplugin \ x11extras xmlpatterns -_QT_DISTS= ${_QT${_QT_VER}_DISTS} +_QT6_DISTS= 5compat coap doc graphs httpserver languageserver lottie positioning \ + quick3dphysics quickeffectmaker shadertools + +_QT_DISTS= ${_COMMON_DISTS} \ + ${_QT${_QT_VER}_DISTS} # We only accept one item as an argument. The fetch target further below works # around this. @@ -45,9 +49,7 @@ IGNORE= cannot be installed: different Qt dists specified via qt-dist:[${qt-dis # Fall back to sensible defaults for _QT_DIST . if empty(_QT_DIST) -. if ${_QT_VER:M5} _QT_DIST= ${PORTNAME} # don't force qt-dist to be set for Qt5 ports which 75% of time are ${PORTNAME} -. endif . endif # Check validitiy @@ -56,30 +58,113 @@ IGNORE= Unsupported qt-dist ${_QT_DIST} for qt:${_QT_VER} . endif ################################################################################ -# Set standard bsd.port.mk variables -MASTER_SITES= ${MASTER_SITE_QT} -DISTINFO_FILE?= ${PORTSDIR}/devel/${_QT_RELNAME}/distinfo - +# Set standard bsd.port.mk variables. LICENSE?= LGPL21 +WWW?= https://www.qt.io/ . if !exists(${PKGDIR}/pkg-descr) DESCR?= ${PORTSDIR}/devel/${_QT_RELNAME}/pkg-descr . endif # Stage support. -DESTDIRNAME= INSTALL_ROOT +_QT5_DESTDIRNAME= INSTALL_ROOT +_QT6_DESTDIRNAME= DESTDIR +DESTDIRNAME= ${_QT${_QT_VER}_DESTDIRNAME} + +# Qt's tarballs are xz compressed. +. if empty(USES:Mtar) +EXTRACT_SUFX?= .tar.xz +. endif + +# Qt5 specific master sites +_QT5_MASTER_SITES_kde= LOCAL +_QT5_MASTER_SITE_SUBDIR_kde= kde/KDE/Qt/${_QT_VERSION} +_QT5_MASTER_SITES= ${MASTER_SITE_QT} +_QT5_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ +# Qt6 specific master sites +_QT6_MASTER_SITES= ${MASTER_SITE_QT} +_QT6_MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules \ + official_releases/additional_libraries/${_QT_VERSION:R}/${_QT_VERSION}/ +# Qt5 specific distnames +. if ${_QT_DIST} == webengine +_QT5_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-opensource-src-${DISTVERSION},} +. else +_QT5_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} +. endif +_QT5_DISTNAME_kde= ${_QT_DIST:S,^,kde-qt,:S,$,-${DISTVERSION},} +# Qt6 specific distnames +_QT6_DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} + +# Effective master sites and distfile values +# net/qt6-coap has no submodule distfile and uses USE_GITHUB +. if ${_QT_DIST} != coap +MASTER_SITES= ${_QT${_QT_VER}_MASTER_SITES${_KDE_${_QT_DIST}:D_kde}} +MASTER_SITE_SUBDIR= ${_QT${_QT_VER}_MASTER_SITE_SUBDIR${_KDE_${_QT_DIST}:D_kde}} +DISTNAME= ${_QT${_QT_VER}_DISTNAME${_KDE_${_QT_DIST}:D_kde}} +DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},} +. endif +DIST_SUBDIR= KDE/Qt/${_QT_VERSION} . if ${_QT_VER:M5} -MASTER_SITE_SUBDIR?= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/ -# www/qt5-webengine hackery: The tarballs of 5.9.5 had a different naming scheme. -. if ${QT5_VERSION} == "5.9.5" -DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-opensource-src-${DISTVERSION},} +# KDE maintains a repository with a patched Qt5 distribution. +_KDE_3d= 0 +_KDE_base= 142 +_KDE_charts= 0 +_KDE_connectivity= 4 +_KDE_datavis3d= 0 +_KDE_declarative= 30 +_KDE_gamepad= 0 +_KDE_graphicaleffects= 0 +_KDE_imageformats= 7 +_KDE_location= 6 +_KDE_multimedia= 2 +_KDE_networkauth= 0 +_KDE_quick3d= 1 +_KDE_quickcontrols= 0 +_KDE_quickcontrols2= 5 +_KDE_quicktimeline= 0 +_KDE_remoteobjects= 0 +_KDE_script= 0 +_KDE_script_ORIGIN_TAG= v5.15.16-lts +_KDE_script_VERSION= 5.15.16 +_KDE_scxml= 0 +_KDE_sensors= 0 +_KDE_serialbus= 0 +_KDE_serialport= 0 +_KDE_speech= 1 +_KDE_svg= 6 +_KDE_tools= 4 +_KDE_translations= 0 +_KDE_virtualkeyboard= 0 +_KDE_wayland= 60 +_KDE_webchannel= 3 +_KDE_webengine= 9 +_KDE_webengine_BRANCH= 5.15 +_KDE_webengine_ORIGIN_TAG= v5.15.16-lts +_KDE_webengine_VERSION= 5.15.16 +_KDE_webglplugin= 0 +_KDE_websockets= 2 +_KDE_webview= 0 +_KDE_x11extras= 0 +_KDE_xmlpatterns= 0 + +. if defined(_KDE_${_QT_DIST}) +. if defined(_KDE_${_QT_DIST}_ORIGIN_TAG) +_KDE_${_QT_DIST}_BRANCH?= ${_KDE_${_QT_DIST}_VERSION} +. else +_KDE_${_QT_DIST}_BRANCH= kde/5.15 +COMMENT+= (KDE patched) +. endif +QT5_KDE_PATCH= p${_KDE_${_QT_DIST}} +_KDE_${_QT_DIST}_VERSION?= ${_QT_VERSION} +_KDE_${_QT_DIST}_ORIGIN_TAG?= v${_KDE_${_QT_DIST}_VERSION}-lts-lgpl . else -DISTNAME= ${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},} +QT5_KDE_PATCH= # . endif -DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},} -DIST_SUBDIR= KDE/Qt/${_QT_VERSION} +. endif # ${_QT_VER:M5} +# Environment setup for Qt5 +. if ${_QT_VER:M5} # Qt (at least when used with qmake) has a tendency to overlink: some libraries # have dependencies on others in the mkspec configurations and the latter are # always passed to the linker even if they are not actually used. By passing @@ -87,20 +172,6 @@ DIST_SUBDIR= KDE/Qt/${_QT_VERSION} # have to declare a lot of unnecessary dependencies in USE_QT5. LDFLAGS+= -Wl,--as-needed -. if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \ - defined(DISABLE_SIZE) && defined(NO_CHECKSUM) -# Ensure that the "makesum" target (with its inner "fetch" one) uses -# devel/qt*/distinfo for every port. -. if ${DISTINFO_FILE:H} == ${PORTSDIR}/devel/${_QT_RELNAME} -_QT_DIST= ${_QT5_DISTS} -. endif -. endif - -# Qt5's tarballs are xz compressed. -. if empty(USES:Mtar) -EXTRACT_SUFX?= .tar.xz -. endif - . if ${_QT_DIST} == "base" && ${PORTNAME} != "qmake" # Qt configure requires pkg-config to detect dependencies. .include "${USESDIR}/pkgconfig.mk" @@ -114,6 +185,26 @@ EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \ --no-same-owner --no-same-permissions . endif # ! ${_QT_VER:M5} +# Build setup for Qt6 +. if ${_QT_VER:M6} +CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX=${PREFIX} \ + -DINSTALL_BINDIR=${PREFIX}/${QT_BINDIR_REL} \ + -DINSTALL_PUBLICBINDIR=${PREFIX}/bin \ + -DINSTALL_LIBDIR=${PREFIX}/${QT_LIBDIR_REL} \ + -DINSTALL_LIBEXECDIR=${PREFIX}/${QT_LIBEXECDIR_REL} \ + -DINSTALL_DOCDIR=${PREFIX}/${QT_DOCDIR_REL} \ + -DINSTALL_ARCHDATADIR=${PREFIX}/${QT_ARCHDIR_REL} \ + -DINSTALL_DATADIR=${PREFIX}/${QT_DATADIR_REL} \ + -DINSTALL_INCLUDEDIR=${PREFIX}/${QT_INCDIR_REL} \ + -DINSTALL_MKSPECSDIR=${PREFIX}/${QT_MKSPECDIR_REL} \ + -DINSTALL_EXAMPLESDIR=${PREFIX}/${QT_EXAMPLEDIR_REL} \ + -DINSTALL_DESCRIPTIONSDIR=${PREFIX}/${QT_DESCRIPTIONSDIR_REL} \ + -DQT_QMAKE_TARGET_MKSPEC:String=freebsd-clang \ + --log-level=TRACE +. endif + +# Build setup for Qt5 +. if ${_QT_VER:M5} CONFIGURE_ENV+= MAKE="${MAKE:T}" CONFIGURE_ARGS+= -opensource -confirm-license \ @@ -127,10 +218,8 @@ CONFIGURE_ARGS+= -opensource -confirm-license \ -datadir ${PREFIX}/${QT_DATADIR_REL} \ -docdir ${PREFIX}/${QT_DOCDIR_REL} \ -translationdir ${PREFIX}/${QT_L10NDIR_REL} \ - -sysconfdir ${PREFIX}/${QT_ETCDIR_REL} - -. if ${_QT_VER:M5} -CONFIGURE_ARGS+= -nomake examples -nomake tests \ + -sysconfdir ${PREFIX}/${QT_ETCDIR_REL} \ + -nomake examples -nomake tests \ -platform ${QMAKESPECNAME} \ -archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \ -libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \ @@ -172,18 +261,21 @@ _EXTRA_PATCHES_QT5= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_fe ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_features_qt__module.prf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_common_bsd_bsd.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-clang_qmake.conf -. if ${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) || ${ARCH} == sparc64 +. if ${ARCH:Mmips*} || (${ARCH:Mpowerpc*} && !exists(/usr/bin/clang)) _EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf USE_GCC= yes -. elif ${ARCH} == powerpc +. elif ${ARCH} == armv7 || ${ARCH} == powerpc _EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \ ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf . endif +. if ${_QT_VER:M5} EXTRA_PATCHES?= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-configure \ + ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-sync.profiles \ ${_EXTRA_PATCHES_QT5} +. endif # ${_QT_VER:M5} . endif # ${_QT_DIST} == "base" # Override settings installed in qconfig.h and *.pri files. The flags will be @@ -208,15 +300,28 @@ QMAKE_ARGS+= QT_CONFIG+="${QT_CONFIG:N-*:O:u}" QMAKE_ARGS+= QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}" . endif -PLIST_SUB+= SHORTVER=${DISTVERSION:R} \ - FULLVER=${DISTVERSION:C/-.*//} +PLIST_SUB+= SHORTVER=${_QT_VERSION:R} \ + FULLVER=${_QT_VERSION:C/-.*//} +. if defined(WITH_DEBUG) +PLIST_SUB+= DEBUG="" \ + NO_DEBUG="@comment " +. else +PLIST_SUB+= DEBUG="@comment " \ + NO_DEBUG="" +. endif # Handle additional PLIST directories, which should only be used for Qt-dist ports. -. for dir in CMAKE ETC -# Export QT_CMAKEDIR and QT_ETCDIR. +. for dir in ETC +# Export QT_ETCDIR. PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}" . endfor +. if ${_QT_VER:M5} +. for dir in CMAKE +# Export QT_CMAKEDIR. +PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}" +. endfor +. endif . if ${_QT_VER:M5} . if ${_QT_DIST} == "base" @@ -302,6 +407,7 @@ _QMAKE= ${CONFIGURE_WRKSRC}/bin/qmake . endif . endif + pre-configure: qt5-pre-configure qt5-pre-configure: # Qt 5.3.2 introduced a check in mkspecs/features/create_cmake.prf that @@ -312,7 +418,15 @@ qt5-pre-configure: # value through to the configure script in qtbase). ${MKDIR} ${CONFIGURE_WRKSRC} ${ECHO_CMD} 'CMAKE_MODULE_TESTS = -' > ${CONFIGURE_WRKSRC}/.qmake.cache -# + + # configure will run syncqt.pl if it finds a .git entry in the working directory + touch ${WRKSRC}/.git + # As the patch collection was created after a version bump, all module verisions + # are tagged as 5.15.3 + touch ${WRKSRC}/.qmake.conf # easier than to -f before the sed + ${REINPLACE_CMD} -e '/MODULE_VERSION/s|5\.15\.\([0-9]*\)|${_QT_VERSION}|g' \ + ${WRKSRC}/.qmake.conf + # **** THIS PART IS OBSOLETE FOR THE NEXT QT UPGRADE **** # # We piggyback on QMAKE_LIBDIR_FLAGS to make sure -L${WRKSRC}/lib is passed to @@ -346,10 +460,10 @@ _sub_need_add= _sub_need_remove= \#\# . else _sub_need_add= \#\# -_sub_need_remove= +_sub_need_remove= . endif -# If a port installs Qt version-specific binaries (e.g. "designer" which -# existed as a Qt4 application and exists as a Qt5 application and will +# If a port installs Qt version-specific binaries (e.g. "designer" which +# existed as a Qt4 application and exists as a Qt5 application and will # probably be a Qt6 application) the port should set `QT_BINARIES=yes`. . if defined(QT_BINARIES) _sub_need_bin= @@ -359,11 +473,15 @@ _sub_need_bin= \#\# . if ${QT_MODNAME} == core # QtCore (e.g. devel/qt5-core) is the one that starts the header, # and is also the one that can clean it up when deinstalled. -_sub_need_clean= +_sub_need_clean= . else _sub_need_clean= \#\# . endif +# The Qt modules have an install- and deinstall-step for wrangling +# the qconfig-modules.h header, but qmake does not. +. if ${PORTNAME} != "qmake" post-install: qt-post-install +. endif # PORTNAME != qmake qt-post-install: # We can't use SUB_FILES with the shared pkg-change.in. # We need it to be a script instead of a group of @unexecs. @@ -409,4 +527,24 @@ qt-post-install: >> ${TMPPLIST} . endif # ${QT_CONFIG:N-*} . endif # M5 + +. if ${_QT_VER:M6} +post-stage: qt6-post-stage +# Clean-up of empty directories, as we install +# * cmake to ${LOCALBASE}/lib/cmake not ${QT_LIBDIR}/cmake. +# * pkgconfig to ${LOCALBASE}/libexec/pkgconfig not ${QT_LIBDIR}/pkgconfig +qt6-post-stage: + ${RM} -r ${STAGEDIR}${QT_LIBDIR}/cmake + ${RM} -r ${STAGEDIR}${QT_LIBDIR}/pkgconfig +. endif + +qt-create-kde-distfile: + ${MKDIR} ${DISTDIR}/${DIST_SUBDIR} + ${SH} ${PORTSDIR}/devel/${_QT_RELNAME}/files/create_kde-qt_release.sh \ + ${_QT_DIST} \ + ${DISTDIR}/${DIST_SUBDIR} \ + ${_KDE_${_QT_DIST}_VERSION} \ + ${_KDE_${_QT_DIST}_ORIGIN_TAG} \ + ${_KDE_${_QT_DIST}_BRANCH} + .endif # defined(_QT_DIST_MK_INCLUDED) diff --git a/Mk/Uses/qt.mk b/Mk/Uses/qt.mk index a91f4d407e46..1a6178b62d1b 100644 --- a/Mk/Uses/qt.mk +++ b/Mk/Uses/qt.mk @@ -1,18 +1,18 @@ # 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 +# - qt-dist: The port is a port for a part of Qt # - auto includes qt.mk and qmake.mk # - qt.mk - Dependency handling. USE_QT=foo bar # # Usage: # USES=qt:<version>[,no_env] # -# Versions: 5 +# Versions: 5, 6 # # Port variables: -# USE_QT - List of Qt modules to depend on, with optional '_build' -# and '_run' suffixes. Define it empty to include this file +# 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 @@ -21,8 +21,10 @@ _QT_MK_INCLUDED= qt.mk # Qt versions currently supported by the framework. -_QT_SUPPORTED?= 5 -QT5_VERSION?= 5.15.2 +_QT_SUPPORTED?= 5 6 +QT5_VERSION?= 5.15.13 +QT6_VERSION?= 6.6.3 +PYSIDE6_VERSION?= 6.6.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) @@ -54,12 +56,12 @@ IGNORE?= cannot decide what Qt version to use: specify one via qt:[${_QT_SUPPOR _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_DESCRIPTIONSDIR_REL?=${QT_DATADIR_REL}/modules QT_LIBEXECDIR_REL?= libexec/${_QT_RELNAME} QT_IMPORTDIR_REL?= ${QT_ARCHDIR_REL}/imports QT_QMLDIR_REL?= ${QT_ARCHDIR_REL}/qml @@ -70,6 +72,9 @@ QT_ETCDIR_REL?= etc/xdg QT_EXAMPLEDIR_REL?= share/examples/${_QT_RELNAME} QT_TESTDIR_REL?= ${QT_DATADIR_REL}/tests QT_CMAKEDIR_REL?= lib/cmake +_QT5_TOOLDIR_REL= ${QT_BINDIR_REL} +_QT6_TOOLDIR_REL= ${QT_LIBEXECDIR_REL} +QT_TOOLDIR_REL= ${_QT${_QT_VER}_TOOLDIR_REL} # Not customizable. QT_MKSPECDIR_REL= ${QT_ARCHDIR_REL}/mkspecs @@ -78,12 +83,12 @@ _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 +MOC?= ${QT_TOOLDIR}/moc +RCC?= ${QT_TOOLDIR}/rcc +UIC?= ${QT_TOOLDIR}/uic QMAKE?= ${QT_BINDIR}/qmake -QCOLLECTIONGENERATOR?= ${QT_BINDIR}/qcollectiongenerator -QHELPGENERATOR?= ${QT_BINDIR}/qhelpgenerator +QCOLLECTIONGENERATOR?= ${QT_TOOLDIR}/qcollectiongenerator +QHELPGENERATOR?= ${QT_TOOLDIR}/qhelpgenerator # Needed to redefine the qmake target for internal Qt configuration. _QMAKE?= ${QMAKE} @@ -98,7 +103,7 @@ QMAKE_COMPILER= $$(ccver="$$(${CXX} --version)"; case "$$ccver" in *clang*) echo . for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \ QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC \ - CMAKE + CMAKE TOOL 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. @@ -107,7 +112,11 @@ PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}" . endif . endfor -# Pass the chosen Qt version to the environment for qtchooser. +# Suppress warnings from rcc about not using a UTF-8 locale. +. if ${_QT_VER:M6} +USE_LOCALE?= C.UTF-8 +. endif + CONFIGURE_ENV+= QT_SELECT=${_QT_RELNAME} MAKE_ENV+= QT_SELECT=${_QT_RELNAME} @@ -116,6 +125,12 @@ MAKE_ENV+= QT_SELECT=${_QT_RELNAME} CONFIGURE_ENV+= QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules" MAKE_ENV+= QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules" +# Qt uses generated linker version scripts which always have a qt_version_tag +# symbol, but that symbol is only defined in the main Qt shared library. For +# other Qt components, this leads to lld >= 17 erroring out due to the symbol +# being undefined. Supress these errors. +LDFLAGS+= -Wl,--undefined-version + _USES_POST+= qt .endif # _QT_MK_INCLUDED @@ -127,38 +142,48 @@ _USES_POST+= qt _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 -_USE_QT_ALL+= sql-ibase -.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 +_USE_QT_COMMON= 3d charts connectivity datavis3d declarative doc examples imageformats location \ + multimedia networkauth quick3d quicktimeline remoteobjects scxml \ + sensors serialbus serialport speech svg virtualkeyboard wayland \ + webchannel webengine websockets webview + +_USE_QT5_ONLY= assistant buildtools concurrent core dbus \ + declarative-test designer diag gamepad \ + graphicaleffects gui help l10n linguist linguisttools \ + network opengl paths pixeltool plugininfo printsupport \ + qdbus qdbusviewer qdoc qdoc-data qev qmake quickcontrols \ + quickcontrols2 script scripttools sql sql-mysql sql-odbc \ + sql-pgsql sql-sqlite2 sql-sqlite3 sql-tds testlib uiplugin \ + uitools webglplugin websockets-qml \ + widgets x11extras xml xmlpatterns + +_USE_QT6_ONLY= 5compat base coap graphs httpserver languageserver lottie pdf positioning \ + quick3dphysics quickeffectmaker shadertools tools translations \ + sqldriver-sqlite sqldriver-mysql sqldriver-psql sqldriver-odbc # Dependency tuples: _LIB should be preferred if possible. qt-3d_PORT= graphics/${_QT_RELNAME}-3d qt-3d_LIB= libQt${_QT_LIBVER}3DCore.so +qt-5compat_PORT= devel/${_QT_RELNAME}-5compat +qt-5compat_LIB= libQt${_QT_LIBVER}Core5Compat.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-buildtools_PATH= ${_QT_RELNAME}-buildtools>=${_QT_VERSION:R} + +qt-base_PORT= devel/${_QT_RELNAME}-base +qt-base_LIB= libQt${_QT_LIBVER}Core.so qt-charts_PORT= x11-toolkits/${_QT_RELNAME}-charts qt-charts_LIB= libQt${_QT_LIBVER}Charts.so +qt-coap_PORT= net/${_QT_RELNAME}-coap +qt-coap_LIB= libQt${_QT_LIBVER}Coap.so + qt-concurrent_PORT= devel/${_QT_RELNAME}-concurrent qt-concurrent_LIB= libQt${_QT_LIBVER}Concurrent.so @@ -198,15 +223,27 @@ 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-graphs_PORT= x11-toolkits/${_QT_RELNAME}-graphs +qt-graphs_LIB= libQt${_QT_LIBVER}Graphs.so + 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-httpserver_PORT= www/${_QT_RELNAME}-httpserver +qt-httpserver_LIB= libQt${_QT_LIBVER}HttpServer.so + qt-imageformats_PORT= graphics/${_QT_RELNAME}-imageformats qt-imageformats_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/imageformats/libqtiff.so +qt-languageserver_PORT= devel/${_QT_RELNAME}-languageserver +qt-languageserver_LIB= libQt${_QT_LIBVER}LanguageServer.so + +qt-lottie_PORT= graphics/${_QT_RELNAME}-lottie +qt-lottie_LIB= libQt${_QT_LIBVER}Bodymovin.so + qt-linguist_PORT= devel/${_QT_RELNAME}-linguist qt-linguist_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/linguist @@ -234,11 +271,14 @@ qt-opengl_LIB= libQt${_QT_LIBVER}OpenGL.so qt-paths_PORT= sysutils/${_QT_RELNAME}-qtpaths qt-paths_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qtpaths +qt-pdf_PORT= print/${_QT_RELNAME}-pdf +qt-pdf_LIB= libQt${_QT_LIBVER}Pdf.so + 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-positioning_PORT= devel/${_QT_RELNAME}-positioning +qt-positioning_LIB= libQt${_QT_LIBVER}Positioning.so qt-plugininfo_PORT= sysutils/${_QT_RELNAME}-qtplugininfo qt-plugininfo_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qtplugininfo @@ -263,17 +303,23 @@ 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-qmake_PATH= ${_QT_RELNAME}-qmake>=${_QT_VERSION:R} qt-quick3d_PORT= x11-toolkits/${_QT_RELNAME}-quick3d qt-quick3d_LIB= libQt${_QT_LIBVER}Quick3D.so +qt-quick3dphysics_PORT= science/${_QT_RELNAME}-quick3dphysics +qt_quick3dphysics_LIB= libQt${_QT_LIBVER}Quick3DPhysics.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-quickeffectmaker_PORT= graphics/${_QT_RELNAME}-quickeffectmaker +qt-quickeffectmaker_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qqem + qt-quicktimeline_PORT= x11-toolkits/${_QT_RELNAME}-quicktimeline qt-quicktimeline_PATH= ${LOCALBASE}/${QT_QMLDIR_REL}/QtQuick/Timeline/libqtquicktimelineplugin.so @@ -298,6 +344,9 @@ qt-serialbus_LIB= libQt${_QT_LIBVER}SerialBus.so qt-serialport_PORT= comms/${_QT_RELNAME}-serialport qt-serialport_LIB= libQt${_QT_LIBVER}SerialPort.so +qt-shadertools_PORT= x11-toolkits/${_QT_RELNAME}-shadertools +qt-shadertools_LIB= libQt${_QT_LIBVER}ShaderTools.so + qt-speech_PORT= accessibility/${_QT_RELNAME}-speech qt-speech_LIB= libQt${_QT_LIBVER}TextToSpeech.so @@ -308,17 +357,28 @@ 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 +. for db in 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 +. for db in sqlite mysql psql odbc +qt-sqldriver-${db}_PORT= databases/${_QT_RELNAME}-base_sqldriver@${db} +qt-sqldriver-${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-tools_PORT= devel/${_QT_RELNAME}-tools +qt-tools_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/lupdate + +qt-translations_PORT= devel/${_QT_RELNAME}-translations +qt-translations_PATH= ${LOCALBASE}/${QT_DATADIR_REL}/translations/qt_en.qm + qt-uiplugin_PORT= x11-toolkits/${_QT_RELNAME}-uiplugin qt-uiplugin_PATH= ${LOCALBASE}/${QT_INCDIR_REL}/QtUiPlugin/QtUiPlugin @@ -335,7 +395,7 @@ 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-webengine_LIB= libQt${_QT_LIBVER}WebEngineCore.so qt-webglplugin_PORT= www/${_QT_RELNAME}-webglplugin qt-webglplugin_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/platforms/libqwebgl.so @@ -346,9 +406,6 @@ 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 @@ -365,21 +422,22 @@ 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_ALL= ${_USE_QT_COMMON} \ + ${_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)$//} +. 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}} == "" +. if ${_USE_QT:M${component}\:*} != "" && ${_USE_QT:M${component}} == "" qt-${component}_TYPE= # empty -. if ${_USE_QT:M${component}_build} != "" +. if ${_USE_QT:M${component}\:build} != "" qt-${component}_TYPE+= build . endif -. if ${_USE_QT:M${component}_run} != "" +. if ${_USE_QT:M${component}\:run} != "" qt-${component}_TYPE+= run . endif . endif # ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == "" diff --git a/Mk/Uses/readline.mk b/Mk/Uses/readline.mk index 4893ebfdee6b..01b5ed09093b 100644 --- a/Mk/Uses/readline.mk +++ b/Mk/Uses/readline.mk @@ -3,14 +3,14 @@ # Feature: readline # Usage: USES=readline # -# MAINTAINER: portmgr@FreeBSD.org +# 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 diff --git a/Mk/bsd.ruby.mk b/Mk/Uses/ruby.mk index b933608d0f6b..c062bcf02f45 100644 --- a/Mk/bsd.ruby.mk +++ b/Mk/Uses/ruby.mk @@ -1,17 +1,21 @@ -# bsd.ruby.mk - Utility definitions for Ruby related ports. +# Provide support for Ruby releated ports. # -# Created by: Akinori MUSHA <knu@FreeBSD.org> - -.if !defined(Ruby_Include) - -Ruby_Include= bsd.ruby.mk -Ruby_Include_MAINTAINER= ruby@FreeBSD.org - +# Feature: ruby +# Usage: USES=ruby[:args,..] +# Valid ARGS: build, extconf, run, setup +# ARGS description: +# build Says that ruby is required only for build time. +# extconf Says that the port uses extconf.rb to configure. +# none Says that no dependency is added to the port. +# Intended to be used with lang/ruby*. +# run Says that ruby is required only for run time. +# setup Says that the port uses setup.rb to configure and +# build. # # [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" +# RUBY_DEFAULT_VER - Set to (e.g.) "3.1" if you want to refer to "ruby31" # just as "ruby". # RUBY_ARCH - (See below) # @@ -20,24 +24,16 @@ Ruby_Include_MAINTAINER= ruby@FreeBSD.org # 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_NAME, RUBY_ARCH, RUBY_LIBDIR, RUBY_ARCHLIBDIR, +# 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] # @@ -45,8 +41,10 @@ Ruby_Include_MAINTAINER= ruby@FreeBSD.org # (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 +# 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. @@ -66,12 +64,9 @@ Ruby_Include_MAINTAINER= ruby@FreeBSD.org # (${RUBY_VER:S/.//}). # RUBY_WITHOUT_SUFFIX - Always ${LOCALBASE}/bin/ruby. # RUBY_WITH_SUFFIX - Always ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX}. -# RUBY_NAME - Ruby's name with trailing 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. @@ -95,24 +90,43 @@ Ruby_Include_MAINTAINER= ruby@FreeBSD.org # RUBY_MODDOCDIR - Installation path for the module's documents. # RUBY_MODEXAMPLESDIR - Installation path for the module's examples. # +# MAINTAINER: ruby@FreeBSD.org + +.if !defined(_INCLUDE_USES_RUBY_MK) +_INCLUDE_USES_RUBY_MK= yes + +_valid_ARGS= build extconf none run setup + +# "USES=gem" implies "USES=ruby" +. if defined(_INCLUDE_USES_GEM_MK) +ruby_ARGS= +. endif + +# Sanity check +. for arg in ${ruby_ARGS} +. if empty(_valid_ARGS:M${arg}) +IGNORE= Incorrect 'USES+= ruby:${ruby_ARGS}' usage: argument [${arg}] is not recognized +. endif +. endfor -.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 @@ -120,70 +134,65 @@ RUBY_VERSION!= ${_RUBY_CONFIG} 'puts C["ruby_version"]' RUBY_SUFFIX?= # empty RUBY_ARCH!= ${_RUBY_CONFIG} 'puts C["target"]' -RUBY_NAME!= ${_RUBY_CONFIG} 'puts C["ruby_install_name"]' _RUBY_SYSLIBDIR!= ${_RUBY_CONFIG} 'puts C["libdir"]' _RUBY_SITEDIR!= ${_RUBY_CONFIG} 'puts C["sitedir"]' _RUBY_VENDORDIR!= ${_RUBY_CONFIG} 'puts C["vendordir"]' -.else -RUBY?= ${LOCALBASE}/bin/${RUBY_NAME} +. 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.6 +. if ${RUBY_VER} == 3.1 # -# Ruby 2.6 +# Ruby 3.1 # -RUBY_VERSION= 2.6.8 +RUBY_DISTVERSION= 3.1.5 RUBY_PORTREVISION= 0 -RUBY_PORTEPOCH= 1 -RUBY26= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 2.7 +. elif ${RUBY_VER} == 3.2 # -# Ruby 2.7 +# Ruby 3.2 # -RUBY_VERSION= 2.7.4 +RUBY_DISTVERSION= 3.2.4 RUBY_PORTREVISION= 0 -RUBY_PORTEPOCH= 1 -RUBY27= "" # PLIST_SUB helpers -. elif ${RUBY_VER} == 3.0 +. elif ${RUBY_VER} == 3.3 # -# Ruby 3.0 +# Ruby 3.3 # -RUBY_VERSION= 3.0.2 -RUBY_PORTREVISION= 0 -RUBY_PORTEPOCH= 1 -RUBY30= "" # PLIST_SUB helpers +RUBY_DISTVERSION= 3.3.1 +RUBY_PORTREVISION= 1 # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -. else +. else # # Other versions # -IGNORE= Only ruby 2.6, 2.7 and 3.0 are supported +IGNORE= Only ruby 3.1, 3,2 and 3.3 are supported _INVALID_RUBY_VER= 1 -. endif -.endif # defined(RUBY_VER) +. endif +RUBY_PORTEPOCH= 1 +RUBY_VERSION= ${RUBY_DISTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/} +. endif # defined(RUBY_VER) -.if !defined(_INVALID_RUBY_VER) +. if !defined(_INVALID_RUBY_VER) -RUBY26?= "@comment " -RUBY27?= "@comment " -RUBY30?= "@comment " +RUBY31?= "@comment " +RUBY32?= "@comment " +RUBY33?= "@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_VERSION} +RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION} RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-${RUBY_VER}/" \ --with-rubylibprefix="${PREFIX}/lib/ruby" \ @@ -193,22 +202,21 @@ RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-${RUBY_VER}/" \ CONFIGURE_TARGET?= ${ARCH}-portbld-${OPSYS:tl}${OSREL:C/\..*//} RUBY_ARCH?= ${ARCH}-${OPSYS:tl}${OSREL:C/\..*//} -RUBY_NAME?= ruby${RUBY_SUFFIX} _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_VERSION} +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_VERSION} +RUBY_DISTNAME?= ruby-${RUBY_DISTVERSION} RUBY_WRKSRC?= ${WRKDIR}/${RUBY_DISTNAME} @@ -225,21 +233,14 @@ 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 -.if ${RUBY_VER} < 2.7 -RUBY_RDOC?= ${LOCALBASE}/bin/rdoc${RUBY_VER:S/.//} -.else -RUBY_RDOC?= ${LOCALBASE}/bin/rdoc -.endif - # Ports RUBY_BASE_PORT?= lang/ruby${RUBY_VER:S/.//} RUBY_PORT?= ${RUBY_BASE_PORT} @@ -254,8 +255,8 @@ 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_NAME} -RUBY_EXAMPLESDIR?= ${PREFIX}/share/examples/${RUBY_NAME} +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} @@ -281,21 +282,16 @@ PLIST_SUB+= ${PLIST_RUBY_DIRS:C,DIR="(${LOCALBASE}|${PREFIX})/,DIR=",} \ RUBY_SHLIBVER="${RUBY_SHLIBVER}" \ RUBY_ARCH="${RUBY_ARCH}" \ RUBY_SUFFIX="${RUBY_SUFFIX}" \ - RUBY_NAME="${RUBY_NAME}" \ - RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" \ - RUBY26=${RUBY26} \ - RUBY27=${RUBY27} \ - RUBY30=${RUBY30} + RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" -.if ${PORT_OPTIONS:MDEBUG} +. if ${PORT_OPTIONS:MDEBUG} RUBY_FLAGS+= -d -.endif +. endif # # extconf.rb support # -.if defined(USE_RUBY_EXTCONF) -USE_RUBY= yes +. if ${ruby_ARGS:Mextconf} RUBY_EXTCONF?= extconf.rb CONFIGURE_ARGS+= --with-opt-dir="${LOCALBASE}" @@ -304,23 +300,23 @@ 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 + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} +. endfor +. else @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure" @cd ${CONFIGURE_WRKSRC}; \ - ${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} -.endif -.endif + ${SETENVI} ${WRK_ENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_EXTCONF} ${CONFIGURE_ARGS} +. endif +. endif # # setup.rb support # -.if defined(USE_RUBY_SETUP) +. if ${ruby_ARGS:Msetup} RUBY_SETUP?= setup.rb do-configure: ruby-setup-configure @@ -328,33 +324,35 @@ 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} + ${SETENVI} ${WRK_ENV} ${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 + ${SETENVI} ${WRK_ENV} ${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 + ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${RUBY} ${RUBY_FLAGS} ${RUBY_SETUP} install --prefix=${STAGEDIR} +. endif -.if defined(USE_RUBY) -.if !defined(RUBY_NO_BUILD_DEPENDS) +. if !${ruby_ARGS:Mbuild} && !${ruby_ARGS:Mrun} && !${ruby_ARGS:Mnone} EXTRACT_DEPENDS+= ${DEPEND_RUBY} PATCH_DEPENDS+= ${DEPEND_RUBY} BUILD_DEPENDS+= ${DEPEND_RUBY} -.endif -.if !defined(RUBY_NO_RUN_DEPENDS) RUN_DEPENDS+= ${DEPEND_RUBY} -.endif -.endif +. elif ${ruby_ARGS:Mbuild} +EXTRACT_DEPENDS+= ${DEPEND_RUBY} +PATCH_DEPENDS+= ${DEPEND_RUBY} +BUILD_DEPENDS+= ${DEPEND_RUBY} +. elif ${ruby_ARGS:Mrun} +RUN_DEPENDS+= ${DEPEND_RUBY} +. endif -.endif # _INVALID_RUBY_VER +. endif # _INVALID_RUBY_VER .endif diff --git a/Mk/Uses/samba.mk b/Mk/Uses/samba.mk index 101aa6439d68..4631a0dfeb95 100644 --- a/Mk/Uses/samba.mk +++ b/Mk/Uses/samba.mk @@ -11,30 +11,30 @@ .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.16 || ${SAMBA_DEFAULT} == 4.19 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/scons.mk b/Mk/Uses/scons.mk index 8c598a6983dc..8e7fb7a27cdc 100644 --- a/Mk/Uses/scons.mk +++ b/Mk/Uses/scons.mk @@ -13,7 +13,7 @@ _INCLUDE_USES_SCONS_MK= yes IGNORE+= USES=scons takes no arguments . endif -_SCONS_PYTHON_VER= ${PYTHON3_DEFAULT} +_SCONS_PYTHON_VER= ${PYTHON_DEFAULT} _SCONS_PYTHON_FLAVOR= py${_SCONS_PYTHON_VER:S|.||} diff --git a/Mk/Uses/sdl.mk b/Mk/Uses/sdl.mk index 14631bd8735b..5289c3c02f25 100644 --- a/Mk/Uses/sdl.mk +++ b/Mk/Uses/sdl.mk @@ -3,7 +3,7 @@ # Feature: sdl # Usage: USES=sdl # USE_SDL=sdl console gfx image mixer mm net pango sound ttf -# sdl2 gfx2 image2 mixer2 net2 ttf2 +# 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. @@ -47,7 +47,7 @@ _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 ttf2 +_SDL_USE_ALL+= sdl2 gfx2 image2 mixer2 net2 sound2 ttf2 _SDL_sdl2_LIB_DEPENDS= libSDL2.so:devel/sdl20 @@ -63,47 +63,50 @@ _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 @@ -9,9 +9,9 @@ .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 diff --git a/Mk/Uses/shebangfix.mk b/Mk/Uses/shebangfix.mk index dcacff9ae68d..20dba5279964 100644 --- a/Mk/Uses/shebangfix.mk +++ b/Mk/Uses/shebangfix.mk @@ -31,17 +31,17 @@ # # perl_CMD= ${SETENV} perl # -# MAINTAINER: portmgr@FreeBSD.org +# 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} @@ -49,58 +49,58 @@ 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 @@ -6,17 +6,17 @@ .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 fe8f78db3003..a8c95e4d9a4d 100644 --- a/Mk/Uses/ssl.mk +++ b/Mk/Uses/ssl.mk @@ -4,11 +4,12 @@ # Usage: USES=ssl # Valid ARGS: none (build and run), build, run # -# The user can choose which ssl library he wants with: +# The user can choose which ssl library they want with: # # DEFAULT_VERSIONS+= ssl=<openssl variant> # -# Variants being base, openssl, libressl, and libressl-devel. +# Variants being base, openssl, openssl30, openssl31, openssl32, +# openssl-quictls, libressl, and libressl-devel. # # The Makefile sets these variables: # OPENSSLBASE - "/usr" or ${LOCALBASE} @@ -21,49 +22,49 @@ # BUILD_DEPENDS - are added if needed # RUN_DEPENDS - are added if needed # -# MAINTAINER: portmgr@FreeBSD.org +# 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" @@ -72,17 +73,17 @@ check-depends:: @${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} @@ -91,20 +92,20 @@ 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 @@ -114,13 +115,13 @@ 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} diff --git a/Mk/Uses/tar.mk b/Mk/Uses/tar.mk index 0ce79a3840d8..c5b07ac3aa0b 100644 --- a/Mk/Uses/tar.mk +++ b/Mk/Uses/tar.mk @@ -1,34 +1,36 @@ # handle tar archives # # Feature: tar -# Usage: USES=tar[:[xz|lz|lzma|txz|bz[ip]2|tgz|tbz|tbz2|Z]] +# Usage: USES=tar[:[Z|bz2|bzip2|lz|lzma|tbz|tbz2|tgz|txz|xz|zst|zstd] # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_TAR_MK) _INCLUDE_USES_TAR_MK= yes -.if ${tar_ARGS} == xz -EXTRACT_SUFX?= .tar.xz -.elif ${tar_ARGS} == lz +. if empty(tar_ARGS) +EXTRACT_SUFX?= .tar +. elif ${tar_ARGS} == Z +EXTRACT_SUFX?= .tar.Z +. elif ${tar_ARGS} == bz2 || ${tar_ARGS} == bzip2 +EXTRACT_SUFX?= .tar.bz2 +. elif ${tar_ARGS} == lz EXTRACT_SUFX?= .tar.lz -.elif ${tar_ARGS} == lzma +. elif ${tar_ARGS} == lzma EXTRACT_SUFX?= .tar.lzma -.elif ${tar_ARGS} == txz -EXTRACT_SUFX?= .txz -.elif ${tar_ARGS} == bzip2 || ${tar_ARGS} == bz2 -EXTRACT_SUFX?= .tar.bz2 -.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 -EXTRACT_SUFX?= .tar.Z -.elif empty(tar_ARGS) -EXTRACT_SUFX?= .tar -.else +. elif ${tar_ARGS} == tgz +EXTRACT_SUFX?= .tgz +. elif ${tar_ARGS} == txz +EXTRACT_SUFX?= .txz +. elif ${tar_ARGS} == xz +EXTRACT_SUFX?= .tar.xz +. elif ${tar_ARGS} == zst || ${tar_ARGS} == zstd +EXTRACT_SUFX?= .tar.zst +. else IGNORE= Incorrect 'USES+=tar:${tar_ARGS}' -.endif +. endif .endif diff --git a/Mk/Uses/tcl.mk b/Mk/Uses/tcl.mk index 4ff56439b635..eb47dfea7bbf 100644 --- a/Mk/Uses/tcl.mk +++ b/Mk/Uses/tcl.mk @@ -25,7 +25,7 @@ # # Usage: # -# USES+= PORT[:(VERSION|wrapper),build,run,tea] +# USES+= PORT[:(VERSION|wrapper),build,run,tea,test] # # where PORT is one of: # @@ -38,18 +38,19 @@ # is installed, bring in the default version. See # ${_TCLTK_DEFAULT_VERSION} below. # -# - 85, 86, 87 - Depend on a specific version series of PORT. Multiple +# - 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 +# - 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. +# Build-time / Run-time / Test-time only dependencies can be specified with +# build, run or test. # # 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. @@ -57,9 +58,9 @@ # 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) @@ -70,16 +71,16 @@ _INCLUDE_USES_TCL_MK= yes # # When adding a version, please keep the comment in # Mk/bsd.default-versions.mk in sync. -_TCLTK_VALID_VERSIONS= 85 86 87 +_TCLTK_VALID_VERSIONS= 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 @@ -90,75 +91,66 @@ _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" -IGNORE= Minimum tcltk version 85+ is meaningless -.endif -.endif +. endif # # Parse one or more ver arguments. # -.if ${tcl_ARGS:M8[5-7]} -_TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[5-7]} -.endif +. if ${tcl_ARGS:M8[6-7]} +_TCLTK_WANTED_VERSIONS:=${tcl_ARGS:M8[6-7]} +. 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" -DEPRECATED= Tcl/Tk 8.5 is nearing EOL, please consider porting to Tcl/Tk 8.6 -.endif # # Exported variables @@ -169,13 +161,13 @@ 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 @@ -185,47 +177,50 @@ _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 +. elif ${tcl_ARGS:Mtest} +TEST_DEPENDS+= ${_TCLTK_WRAPPER_PORT} \ + ${_TCLTK_EXE_LINE} +. 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) 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 @@ -7,9 +7,9 @@ .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 diff --git a/Mk/bsd.tex.mk b/Mk/Uses/tex.mk index dfb36193656b..c62df38e53ec 100644 --- a/Mk/bsd.tex.mk +++ b/Mk/Uses/tex.mk @@ -1,43 +1,39 @@ -# bsd.tex.mk - Common part for TeX related ports -# -TEX_MAINTAINER= freebsd-tex@FreeBSD.org +# Feature: tex +# Usage: USES=tex +# Valid ARGS: (none) +# MAINTAINER: tex@FreeBSD.org -# -# Ports which depend on TeX should use USE_TEX. -# -# USE_TEX= yes -# imports variables only, and -# USE_TEX= full +# This 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 +# USE_TEX is used to enable additional specific features and +# fnctionalities for tex. # -# web2c: WEB2C toolchain and TeX engines +# Valid keywords for USE_TEX are as following: + +# 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: texlua52 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 +# synctex: synctex library # xpdfopen: pdfopen/pdfclose utility -# -# dvipsk: dvipsk +# dvipsk: dvipsk # dvipdfmx: DVIPDFMx -# xdvik: XDvi +# xdvik: XDvi # gbklatex: gbklatex -# -# formats: TeX, LaTeX, AMSTeX, ConTeXT, CSLaTeX, EplainTeX, + +# formats: TeX, LaTeX, AMSTeX, EplainTeX, # CSplainTeX, METAFONT, MLTeX, PDFTeX, TeXsis # tex: TeX # latex: LaTeX # pdftex: PDFTeX -# aleph: Aleph # jadetex: JadeTeX # luatex: LuaTeX # ptex: pTeX @@ -53,6 +49,34 @@ TEX_MAINTAINER= freebsd-tex@FreeBSD.org # USE_TEX= formats # USE_TEX= latex:build dvipsk:build +.if !defined(_INCLUDE_USES_TEX_MK) +_INCLUDE_USES_TEX_MK= yes + +# List all valid USE_TEX features here +_VALID_TEX_FEATURES= base texmf source docs web2c kpathsea ptexenc basic \ + tlmgr texlua texluajit synctex xpdfopen dvipsk dvipdfmx \ + xdvik gbklatex formats tex latex pdftex jadetex luatex \ + ptex xetex xmltex texhash texhash-bootstrap updmap fmtutil full + +_INVALID_TEX_FEATURES= +. for var in ${USE_TEX:O:u:C/:(build|extract|lib|run|test)$//} +. if empty(_VALID_TEX_FEATURES:M${var}) +_INVALID_TEX_FEATURES+= ${var} +. endif +. endfor +. if !empty(_INVALID_TEX_FEATURES) +IGNORE= uses unknown USE_TEX features: ${_INVALID_TEX_FEATURES} +. endif + +. if !empty(tex_ARGS) +IGNORE= USES=tex takes no arguments +. endif + +# Make each individual feature available as _TEX_FEATURE_<FEATURENAME> +. for var in ${USE_TEX} +_TEX_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} +. endfor + # default TeX distribution. "texlive" TEX_DEFAULT?= texlive @@ -67,15 +91,14 @@ TEXMFVARDIR?= share/texmf-var TEXMFCONFIGDIR?=share/texmf-config FMTUTIL_CNF?= ${TEXMFCONFIGDIR}/web2c/fmtutil.cnf TEXHASHDIRS?= ${TEXMFDIR} ${TEXMFDISTDIR} ${TEXMFLOCALDIR} ${TEXMFVARDIR} ${TEXMFCONFIGDIR} +TEXLIVE_YEAR?= 2023 +TEXLIVE_VERSION?= ${TEXLIVE_YEAR}0313 +DISTNAME_TEXMF= texlive-${TEXLIVE_VERSION}-texmf .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 @@ -85,7 +108,7 @@ _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= ${LOCALBASE}/${TEXMFDISTDIR}/source/.keep_me +_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 @@ -129,7 +152,7 @@ _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= libtexlua52.so +_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 @@ -144,9 +167,6 @@ _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_ALEPH_DEP= aleph -_USE_TEX_ALEPH_PORT= print/${_USE_TEX_ALEPH_PKGNAME} -_USE_TEX_ALEPH_PKGNAME= tex-aleph _USE_TEX_LUATEX_DEP= luatex _USE_TEX_LUATEX_PORT= print/${_USE_TEX_LUATEX_PKGNAME} _USE_TEX_LUATEX_PKGNAME=tex-luatex @@ -154,9 +174,9 @@ _USE_TEX_XETEX_DEP= xetex _USE_TEX_XETEX_PORT= print/${_USE_TEX_XETEX_PKGNAME} _USE_TEX_XETEX_PKGNAME= tex-xetex -_USE_TEX_FULLLIST= texmf>=20150523_3 base>=20150521_5 \ +_USE_TEX_FULLLIST= texmf>=${TEXLIVE_VERSION} base>=${TEXLIVE_VERSION} \ web2c tlmgr:run \ - basic formats aleph xetex jadetex luatex xmltex ptex \ + basic formats xetex jadetex luatex xmltex ptex \ dvipsk dvipdfmx xdvik xpdfopen:run \ kpathsea:lib ptexenc:lib texlua:lib texluajit:lib synctex:lib @@ -167,45 +187,44 @@ USE_TEX:= ${USE_TEX:tu:NFULL} ${_USE_TEX_FULLLIST:tu} .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*[<>=]*) -_U:= ${_U}>=20150523_3 -. endif -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MBASE) && empty(_U:M*[<>=]*) -_U:= ${_U}>=20150521_5 -. endif -. if !empty(_U:tu:C/[<>=][^\:]*//:C/\:.*$//:MKPATHSEA) || \ +. 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*[<>=]*) +_U:= ${_U}>=${TEXLIVE_VERSION} +. 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 -#. warning DEBUG: ${_U}: _VOP=${_VOP}, _C=${_C} -. for _CC in ${_C:tu} +. endif +. 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 +.for _C in EXTRACT BUILD LIB RUN TEST ${_C}_DEPENDS+= ${TEX_${_C}_DEPENDS:O:u} .endfor @@ -217,14 +236,14 @@ ${_C}_DEPENDS+= ${TEX_${_C}_DEPENDS:O:u} !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; " \ @@ -233,14 +252,14 @@ do-texhash: "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}}' @@ -271,7 +290,7 @@ do-fmtutil-$F: _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 @@ -290,21 +309,6 @@ do-updmap: post-install-script: do-updmap .endif -TEX_FORMAT_ALEPH?= \ - "aleph aleph - *aleph.ini" \ - "lamed aleph language.dat *lambda.ini" -TEX_FORMAT_ALEPH_FILES= \ - ${TEXMFVARDIR}/web2c/aleph/aleph.log \ - ${TEXMFVARDIR}/web2c/aleph/aleph.fmt \ - ${TEXMFVARDIR}/web2c/aleph/lamed.log \ - ${TEXMFVARDIR}/web2c/aleph/lamed.fmt -TEX_FORMAT_ALEPH_BIN= \ - bin/lamed -TEX_FORMAT_ALEPH_DIRS= \ - ${TEXMFVARDIR}/web2c/aleph -post-install-aleph: - ${LN} -sf aleph ${STAGEDIR}${PREFIX}/bin/lamed - TEX_FORMAT_AMSTEX?= \ "amstex pdftex - -translate-file=cp227.tcx *amstex.ini" TEX_FORMAT_AMSTEX_FILES= \ @@ -317,37 +321,6 @@ TEX_FORMAT_AMSTEX_DIRS= \ 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_CSLATEX?= \ - "cslatex pdftex - -etex cslatex.ini" \ - "pdfcslatex pdftex - -etex cslatex.ini" -TEX_FORMAT_CSLATEX_FILES= \ - ${TEXMFVARDIR}/web2c/pdftex/cslatex.log \ - ${TEXMFVARDIR}/web2c/pdftex/cslatex.fmt \ - ${TEXMFVARDIR}/web2c/pdftex/pdfcslatex.log \ - ${TEXMFVARDIR}/web2c/pdftex/pdfcslatex.fmt -TEX_FORMAT_CSLATEX_BIN= \ - bin/cslatex \ - bin/pdfcslatex -TEX_FORMAT_CSLATEX_DIRS= \ - ${TEXMFVARDIR}/web2c/pdftex -post-install-cslatex: - ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/cslatex - ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdfcslatex - TEX_FORMAT_CSPLAIN?= \ "csplain pdftex - -etex -enc csplain-utf8.ini" \ "pdfcsplain pdftex - -etex -enc csplain-utf8.ini" @@ -413,10 +386,10 @@ 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" \ + "lualatex luahbtex language.dat,language.dat.lua lualatex.ini" \ "luajittex luajittex language.def,language.dat.lua luatex.ini" \ "pdfcsplain luatex - -etex csplain.ini" \ - "lualollipop luatex - lualollipop.in" + "lollipop luatex - lollipop.ini" TEX_FORMAT_LUATEX_FILES= \ ${TEXMFVARDIR}/web2c/luatex/dviluatex.log \ ${TEXMFVARDIR}/web2c/luatex/dviluatex.fmt \ @@ -424,15 +397,16 @@ TEX_FORMAT_LUATEX_FILES= \ ${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/luahbtex/lualatex.fmt \ + ${TEXMFVARDIR}/web2c/luahbtex/lualatex.log \ ${TEXMFVARDIR}/web2c/luajittex/luajittex.log \ ${TEXMFVARDIR}/web2c/luajittex/luajittex.fmt TEX_FORMAT_LUATEX_BIN= \ bin/dviluatex \ bin/dvilualatex \ + bin/luahbtex \ bin/luajittex \ bin/lualatex \ bin/lualollipop \ @@ -445,9 +419,9 @@ TEX_FORMAT_LUATEX_DIRS= \ ${TEXMFVARDIR}/web2c/luatex \ ${TEXMFVARDIR}/web2c/luajittex post-install-luatex: + ${LN} -sf luahbtex ${STAGEDIR}${PREFIX}/bin/lualatex ${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 @@ -559,7 +533,11 @@ TEX_FORMAT_PTEX_FILES= \ TEX_FORMAT_PTEX_BIN= \ bin/eptex \ bin/ptex \ - bin/platex + bin/platex \ + bin/upbibtex \ + bin/updvitype \ + bin/uppltotf \ + bin/uptftopl TEX_FORMAT_PTEX_DIRS= \ ${TEXMFVARDIR}/web2c/ptex \ ${TEXMFVARDIR}/web2c/eptex @@ -613,19 +591,16 @@ 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" \ - "xelollipop xetex - -etex xelollipop.ini" + "lollipop xetex - -etex lollipop.ini" TEX_FORMAT_XETEX_FILES= \ - ${TEXMFVARDIR}/web2c/xetex/cont-en.log \ - ${TEXMFVARDIR}/web2c/xetex/cont-en.fmt \ + ${TEXMFVARDIR}/web2c/xetex/lollipop.fmt \ + ${TEXMFVARDIR}/web2c/xetex/lollipop.log \ ${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 \ - ${TEXMFVARDIR}/web2c/xetex/xelollipop.log \ - ${TEXMFVARDIR}/web2c/xetex/xelollipop.fmt + ${TEXMFVARDIR}/web2c/xetex/xelatex.fmt TEX_FORMAT_XETEX_BIN= \ bin/xetex \ bin/xelatex \ @@ -652,3 +627,5 @@ TEX_FORMAT_XMLTEX_DIRS= \ post-install-xmltex: ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/xmltex ${LN} -sf pdftex ${STAGEDIR}${PREFIX}/bin/pdfxmltex + +.endif # !defined(_INCLUDE_USES_TEX_MK) diff --git a/Mk/Uses/trigger.mk b/Mk/Uses/trigger.mk index bf15e9512a84..c43fba595a1b 100644 --- a/Mk/Uses/trigger.mk +++ b/Mk/Uses/trigger.mk @@ -5,25 +5,25 @@ # Variables: # TRIGGERS: list of triggers to package # -# MAINTAINER= portmgr@FreeBSD.org +# 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..4fcce22846ef 100644 --- a/Mk/Uses/uidfix.mk +++ b/Mk/Uses/uidfix.mk @@ -8,10 +8,8 @@ .if !defined(_INCLUDE_USES_UIDFIX_MK) _INCLUDE_USES_UIDFIX_MK= yes -.if !defined(GID) -GID!= id -g -.endif -.if ${UID} != 0 +GID?= ${.MAKE.GID} +. 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} @@ -25,5 +23,5 @@ SHAREGRP= ${GID} WWWGRP= ${GID} INCSOWN= ${UID} INCSGRP= ${GID} -.endif +. endif .endif diff --git a/Mk/Uses/uniquefiles.mk b/Mk/Uses/uniquefiles.mk index f9e3aea6f18a..18b7f35adfb9 100644 --- a/Mk/Uses/uniquefiles.mk +++ b/Mk/Uses/uniquefiles.mk @@ -70,7 +70,7 @@ # NOTE: multiple logical instances are not supported by pkg and the original # pkg_tools at the moment. # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_UNIQUEFILES_MK) _INCLUDE_USES_UNIQUEFILES_MK= yes @@ -82,13 +82,13 @@ 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 @@ -102,24 +102,24 @@ _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##*/} ; \ @@ -131,8 +131,8 @@ move-uniquefiles: ${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##*/} ; \ @@ -145,18 +145,18 @@ move-uniquefiles: ${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}}; \ @@ -172,8 +172,8 @@ move-uniquefiles: ${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}}; \ @@ -190,8 +190,8 @@ move-uniquefiles: ${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... diff --git a/Mk/Uses/vala.mk b/Mk/Uses/vala.mk new file mode 100644 index 000000000000..aec0e7a3a968 --- /dev/null +++ b/Mk/Uses/vala.mk @@ -0,0 +1,26 @@ +# Handle dependency on lang/vala +# +# Valid args: +# - lib: add a lib depends +# - build: add a build depends +# - no_depend: only used for lang/vala itself + +.if ! defined(_INCLUDE_USES_VALA_MK) +_INCLUDE_USES_VALA_MK= yes + +_VALA_VERSION= 0.56.16 +_VALA_LIB_VERSION= ${_VALA_VERSION:R} +_VALA_LIBRARY= libvala-${_VALA_LIB_VERSION}.so +_VALA_BINARY= valac +_VALA_PORT= lang/vala + +. if empty(vala_ARGS:Mno_depend) +. if ! empty(vala_ARGS:Mlib) +LIB_DEPENDS+= ${_VALA_LIBRARY}:${_VALA_PORT} +. endif +. if ! empty(vala_ARGS:Mbuild) +BUILD_DEPENDS+= ${_VALA_BINARY}:${_VALA_PORT} +. endif +. endif + +.endif diff --git a/Mk/Uses/varnish.mk b/Mk/Uses/varnish.mk index c453d464d62d..96948774f19f 100644 --- a/Mk/Uses/varnish.mk +++ b/Mk/Uses/varnish.mk @@ -2,7 +2,7 @@ # # Feature: varnish # Usage: USES=varnish -# Valid ARGS: 4, 6, run +# Valid ARGS: 6, 7, run # # MAINTAINER: ports@FreeBSD.org @@ -11,12 +11,12 @@ _INCLUDE_USES_VARNISH_MK= yes VARNISH_VERSION= ${VARNISH_DEFAULT} -. if ${varnish_ARGS:M4} -VARNISH_VERSION= 4 -. elif ${varnish_ARGS:M6} +. if ${varnish_ARGS:M6} VARNISH_VERSION= 6 -. elif defined(VARNISH_DEFAULT) -. endif +. elif ${varnish_ARGS:M7} +VARNISH_VERSION= 7 +. 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} 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 @@ -15,14 +15,14 @@ .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= # 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 @@ -112,41 +112,41 @@ _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 @@ -159,18 +159,18 @@ _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..506c7b1bf753 100644 --- a/Mk/Uses/xfce.mk +++ b/Mk/Uses/xfce.mk @@ -23,7 +23,7 @@ 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_LIB_DEPENDS= libgarcon-1.so:sysutils/garcon garcon_USE_XFCE_REQ= libmenu libexo_LIB_DEPENDS= libexo-2.so:x11/libexo @@ -31,51 +31,48 @@ 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 diff --git a/Mk/Uses/xorg-cat.mk b/Mk/Uses/xorg-cat.mk index 1134ff977b94..0853fd6b3e3c 100644 --- a/Mk/Uses/xorg-cat.mk +++ b/Mk/Uses/xorg-cat.mk @@ -17,7 +17,6 @@ # * proto install .pc file, needs pathfix, most only needed at # build time. # * util no particular notes -# * xserver xorg x servers # # These categories has to match upstream categories. Don't invent # your own. @@ -27,7 +26,7 @@ # * meson (experimental) # # -# By defining USE_GITLAB and GL_COMMIT, it is possible to pull code straight +# By defining USE_GITLAB and GL_TAGNAME, it is possible to pull code straight # from the freedesktop.org gitlab, instead of official release tarballs. # #.MAINTAINER: x11@FreeBSD.org @@ -35,7 +34,7 @@ .if !defined(_INCLUDE_USES_XORG_CAT_MK) _INCLUDE_USES_XORG_CAT_MK=yes -_XORG_CATEGORIES= app data doc driver font lib proto util xserver +_XORG_CATEGORIES= app data doc driver font lib proto util _XORG_BUILDSYSTEMS= autotools meson _XORG_CAT= # empty @@ -76,7 +75,6 @@ EXTRACT_SUFX?= .tar.bz2 DIST_SUBDIR= xorg/${_XORG_CAT} . if ${_XORG_BUILDSYS} == meson -IGNORE= meson build not supported yet .include "${USESDIR}/meson.mk" . elif ${_XORG_BUILDSYS} == autotools GNU_CONFIGURE= yes @@ -163,21 +161,6 @@ CONFIGURE_ARGS+=--enable-malloc0returnsnull . elif ${_XORG_CAT} == proto .include "${USESDIR}/pathfix.mk" -. elif ${_XORG_CAT} == xserver -DISTNAME?= xorg-server-${PORTVERSION} -CFLAGS+= -Werror=uninitialized -.include "${USESDIR}/pathfix.mk" -. if ${_XORG_BUILDSYS} == meson -# put meson stuff here -. else -CONFIGURE_ARGS+= --with-xkb-path=${LOCALBASE}/share/X11/xkb \ - --with-fontrootdir=${LOCALBASE}/share/fonts -libtool_ARGS?= # empty -.include "${USESDIR}/libtool.mk" -. endif -LIB_PC_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri -USE_XORG+= fontutil - . endif # ${_XORG_CAT} == <category> # We only need to include xorg.mk if we want USE_XORG modules diff --git a/Mk/Uses/xorg.mk b/Mk/Uses/xorg.mk index ecb5b6d46af5..bf4e78b9a5de 100644 --- a/Mk/Uses/xorg.mk +++ b/Mk/Uses/xorg.mk @@ -1,5 +1,4 @@ # Originally from bsd.xorg.mk -# Created by: Florent Thoumie <flz@FreeBSD.org> # # Feature: xorg # Usage: USES=xorg @@ -34,8 +33,7 @@ IGNORE= need to specify xorg modules with USE_XORG . endif # List of xorg modules -XORG_MODULES= dmx \ - fontenc \ +XORG_MODULES= fontenc \ fontutil \ ice \ libfs \ @@ -83,7 +81,6 @@ XORG_MODULES= dmx \ # Register all xorg .pc files here. # foo_LIB_PC_DEPENDS means it should go to BUILD_DEPENDS *and* RUN_DEPENDS. -dmx_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/dmx.pc:x11/libdmx fontenc_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontenc.pc:x11-fonts/libfontenc fontutil_BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontutil.pc:x11-fonts/font-util ice_LIB_PC_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/ice.pc:x11/libICE diff --git a/Mk/Uses/zip.mk b/Mk/Uses/zip.mk index 37f2cbe25fe5..b137fa0b2688 100644 --- a/Mk/Uses/zip.mk +++ b/Mk/Uses/zip.mk @@ -3,7 +3,7 @@ # Feature: zip # Usage: USES=zip[:infozip] # -# MAINTAINER: portmgr@FreeBSD.org +# MAINTAINER: ports@FreeBSD.org .if !defined(_INCLUDE_USES_ZIP_MK) _INCLUDE_USES_ZIP_MK= yes @@ -13,13 +13,13 @@ 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..83f225748420 100644 --- a/Mk/bsd.ccache.mk +++ b/Mk/bsd.ccache.mk @@ -11,6 +11,7 @@ # default. # # Port use (users should not modify these): +# - CCACHE_ENABLED - tells the port if ccache is enabled. # - 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 @@ -38,56 +39,63 @@ COMMANDS_Include_MAINTAINER= portmgr@FreeBSD.org _CCACHEMKINCLUDED= yes -.if defined(NOCCACHE) +. if defined(NOCCACHE) NO_CCACHE= t -.endif +. endif + +. if defined(WITH_CCACHE_BUILD) +CCACHE_ENABLED= yes +. else +CCACHE_ENABLED= no +. 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 +CCACHE_ENABLED= no 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. @@ -95,6 +103,6 @@ ${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.commands.mk b/Mk/bsd.commands.mk index 620c62eb1533..8ab99a18e22b 100644 --- a/Mk/bsd.commands.mk +++ b/Mk/bsd.commands.mk @@ -1,6 +1,5 @@ # bsd.commands.mk - Common commands used within the ports infrastructure # -# Created by: Gabor Kovesdan <gabor@FreeBSD.org> # # 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 @@ -29,11 +28,16 @@ CP?= /bin/cp CPIO?= /usr/bin/cpio CUT?= /usr/bin/cut DC?= /usr/bin/dc +. if exists(/usr/bin/dialog) DIALOG?= /usr/bin/dialog -DIALOG4PORTS?= ${LOCALBASE}/bin/dialog4ports +. else +DIALOG?= /usr/bin/bsddialog +. endif +DIALOG4PORTS?= ${LOCALBASE}/bin/portconfig DIFF?= /usr/bin/diff DIRNAME?= /usr/bin/dirname EGREP?= /usr/bin/egrep +ELFCTL?= /usr/bin/elfctl EXPR?= /bin/expr FALSE?= false # Shell builtin FILE?= /usr/bin/file @@ -64,6 +68,7 @@ MOUNT_DEVFS?= ${MOUNT} -t devfs devfs # a make target MOUNT_NULLFS?= /sbin/mount_nullfs MV?= /bin/mv +NPROC?= /bin/nproc OBJCOPY?= /usr/bin/objcopy OBJDUMP?= /usr/bin/objdump PASTE?= /usr/bin/paste @@ -78,6 +83,7 @@ RM?= /bin/rm -f RMDIR?= /bin/rmdir SED?= /usr/bin/sed SETENV?= /usr/bin/env +SETENVI?= /usr/bin/env -i SH?= /bin/sh SORT?= /usr/bin/sort STRIP_CMD?= /usr/bin/strip diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index 1dff8bce1d94..a319b8dd12de 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -10,157 +10,179 @@ # 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 +# DEFAULT_VERSIONS= perl5=5.20 ruby=3.1 .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 \ - IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM LUA MYSQL NINJA PERL5 \ - PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH -.if defined(${lang}_DEFAULT) +. for lang in APACHE BDB COROSYNC EBUR128 EMACS FIREBIRD FORTRAN FPC GCC \ + GHOSTSCRIPT GL GO GUILE IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \ + LUA LUAJIT MONO MYSQL NINJA NODEJS OPENLDAP PERL5 PGSQL PHP \ + PYCRYPTOGRAPHY PYTHON PYTHON2 RUBY RUST SAMBA SSL TCLTK VARNISH +. 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 +COROSYNC_DEFAULT?= 3 +# Possible values: rust, legacy +. if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) +EBUR128_DEFAULT?= rust +. else +EBUR128_DEFAULT?= legacy +. endif # 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 +# Possible values: 3.0, 4.0 +FIREBIRD_DEFAULT?= 3.0 +# Possible values: gfortran FORTRAN_DEFAULT?= gfortran -# Possible values: 3.2.2 +# Possible values: 3.2.2, 3.3.1 +. if !defined(WANT_FPC_DEVEL) FPC_DEFAULT?= 3.2.2 -# Possible values: 8 (last to support powerpcspe), 9, 10, 11 +. else +FPC_DEFAULT?= 3.3.1 +. endif +# Possible values: 9, 10, 11, 12, 13, 14 # (Any other version is completely unsupported and not meant for general use.) -.if ${ARCH} == "powerpcspe" -GCC_DEFAULT?= 8 -.else -GCC_DEFAULT?= 10 -.endif +GCC_DEFAULT?= 13 +# Possible values: 10 +GHOSTSCRIPT_DEFAULT?= 10 # 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 +# Possible values: 1.20, 1.21, 1.22, 1.23-devel +GO_DEFAULT?= 1.21 +# Possible values: 1.8, 2.2, 3.0 +GUILE_DEFAULT?= 2.2 +# Possible versions: 6, 7 +# Possible flavors: x11, nox11 +# (defaults to x11 when not specified) +# Format: version[-flavor] +# Examples: 6-nox11, 7 IMAGEMAGICK_DEFAULT?= 7 -# Possible values: 7, 8, 11, 12, 13, 14, 15, 16 +# Possible values: 8, 11, 17, 18, 19, 20, 21 JAVA_DEFAULT?= 8 -# Possible values: 2.0.12, 2.3.0 -.if !defined(WANT_LAZARUS_DEVEL) -LAZARUS_DEFAULT?= 2.0.12 -.else -LAZARUS_DEFAULT?= 2.3.0 -.endif +# Possible values: 3.2.0, 3.1.0 +. if !defined(WANT_LAZARUS_DEVEL) +LAZARUS_DEFAULT?= 3.2.0 +. else +LAZARUS_DEFAULT?= 3.3.1 +. endif # Possible values: rust, legacy -.if empty(ARCH:Naarch64:Narmv6:Narmv7:Namd64:Ni386:Npowerpc64:Npowerpc64le:Npowerpc) +. if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) 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 -LLVM_DEFAULT?= 10 -.else -LLVM_DEFAULT?= 90 -.endif +# Possible values: 11, 12, 13, 14, 15, 16, 17, -devel (to be used when non-base compiler is required) +LLVM_DEFAULT?= 15 # Possible values: 5.1, 5.2, 5.3, 5.4 -LUA_DEFAULT?= 5.2 +LUA_DEFAULT?= 5.4 +# Possible values: luajit, luajit-devel, luajit-openresty +. if ${ARCH:Mpowerpc64*} +LUAJIT_DEFAULT?= luajit-openresty +. else +LUAJIT_DEFAULT?= luajit-devel +. endif # 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 +MONO_DEFAULT?= 5.20 +# Possible values: 8.0, 8.1, 10.5m, 10.6m, 10.11m +MYSQL_DEFAULT?= 8.0 # 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) && \ +# Possible value: 18, 20, 21, current, lts (Note: current = 21 and lts = 20) +NODEJS_DEFAULT?= lts +# Possible value: 25, 26 +OPENLDAP_DEFAULT?= 26 +# Possible values: 5.34, 5.36, 5.38, devel +. if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \ defined(PACKAGE_BUILDING)) -PERL5_DEFAULT?= 5.32 -.elif !defined(PERL5_DEFAULT) +PERL5_DEFAULT?= 5.36 +. 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 -# Possible values: 9.6, 10, 11, 12, 13, 14 -PGSQL_DEFAULT?= 13 -# Possible values: 7.3, 7.4, 8.0 -PHP_DEFAULT?= 7.4 -# Possible values: 2.7, 3.6, 3.7, 3.8, 3.9, 3.10 -PYTHON_DEFAULT?= 3.8 +. endif +# Possible values: 12, 13, 14, 15, 16 +PGSQL_DEFAULT?= 15 +# Possible values: 8.1, 8.2, 8.3 +PHP_DEFAULT?= 8.2 +# Possible values: rust, legacy +. if empty(ARCH:Naarch64:Namd64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64) +PYCRYPTOGRAPHY_DEFAULT?= rust +. else +PYCRYPTOGRAPHY_DEFAULT?= legacy +. endif +# Possible values: 3.8, 3.9, 3.10, 3.11 +PYTHON_DEFAULT?= 3.9 # Possible values: 2.7 PYTHON2_DEFAULT?= 2.7 -# Possible values: 3.6, 3.7, 3.8, 3.9, 3.10 -PYTHON3_DEFAULT?= 3.8 -# Possible values: 2.6, 2.7, 3.0 -RUBY_DEFAULT?= 2.7 +# Possible values: 3.1, 3.2, 3.3 +RUBY_DEFAULT?= 3.2 # 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) +# Possible values: 4.16, 4.19 +SAMBA_DEFAULT?= 4.16 +# Possible values: base, openssl, openssl111, openssl31, openssl32, libressl, libressl-devel +. 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=<openssl package name> 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 values: 6, 7 +VARNISH_DEFAULT?= 6 .endif diff --git a/Mk/bsd.destdir.mk b/Mk/bsd.destdir.mk index d7782d4544fe..8d50da7a7f58 100644 --- a/Mk/bsd.destdir.mk +++ b/Mk/bsd.destdir.mk @@ -3,7 +3,6 @@ # # bsd.destdir.mk - Support for chrooted installation # -# Created by: Gabor Kovesdan <gabor@FreeBSD.org> # # Please make sure all changes to this file are passed through the maintainer. @@ -67,17 +66,17 @@ DESTDIR_Include_MAINTAINER= portmgr@FreeBSD.org _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 @@ -85,31 +84,31 @@ DESTDIR_ENV+= ${_var}="${${_var}}" # 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"; \ @@ -216,5 +215,5 @@ do-chroot: ${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..170865b57bab 100644 --- a/Mk/bsd.gcc.mk +++ b/Mk/bsd.gcc.mk @@ -3,16 +3,13 @@ # # bsd.gcc.mk - Support for smarter USE_GCC usage. # -# Created by: Edwin Groothuis <edwin@freebsd.org> # # 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. +# If your port needs a specific version of GCC, you can instead specify +# that using USE_GCC=X (where X is the version of GCC). # # Optionally comma-separated arguments follow the version specifier. # Currently we support: @@ -25,13 +22,10 @@ # 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= 12 # port requires GCC 12. # 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. +# USE_GCC= 12:build # port requires GCC 12 at build time only. # # If you are wondering what your port exactly does, use "make test-gcc" # to see some debugging. @@ -41,7 +35,7 @@ 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 +GCCVERSIONS= 9 10 11 12 13 14 # No configurable parts below this. #################################### # @@ -66,77 +60,64 @@ IGNORE= bad target specification in USE_GCC; only "build" is supported .if defined(USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) # Handle USE_GCC=yes. -.if ${USE_GCC} == yes -USE_GCC= ${GCC_DEFAULT}+ -.endif +. if ${USE_GCC} == yes +USE_GCC= ${GCC_DEFAULT} +. endif -# See if we can use a later version or exclusively the one specified. -_USE_GCC:= ${USE_GCC:S/+//} -.if ${USE_GCC} != ${_USE_GCC} -_GCC_ORLATER:= true -.endif +_USE_GCC:= ${USE_GCC} # 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 - -# 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} -_USE_GCC:= ${GCC_DEFAULT} -. endif -.endif # defined(_GCC_ORLATER) +. endif # A concrete version has been selected. Set proper ports dependencies, # CC, CXX, CPP, and flags. V:= ${_USE_GCC:S/.//} -. if ${V} == 12 +. if ${V} == 14 _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) 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 # defined(_USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) @@ -146,18 +127,11 @@ test-gcc: .if defined(IGNORE) @echo "IGNORE: ${IGNORE}" .else -.if defined(USE_GCC) -.if defined(_GCC_ORLATER) - @echo Port can use later versions. -.else - @echo Port cannot use later versions. -.endif +. if defined(USE_GCC) @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 bd29efe9cad0..9e83aab4aec0 100644 --- a/Mk/bsd.gecko.mk +++ b/Mk/bsd.gecko.mk @@ -14,7 +14,7 @@ # 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 @@ -60,57 +60,42 @@ 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 +USES+= compiler:c++17-lang cpe gl gmake gnome iconv llvm:17,noexport localbase \ + pkgconfig python:build desktop-file-utils CPE_VENDOR?=mozilla USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk30 -.if ${MOZILLA_VER:R:R} < 90 -USE_GNOME+= gtk20 -.endif -USE_PERL5= build -USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt +USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrandr xrender xt xtst HAS_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes -LDFLAGS+= -Wl,--as-needed +LDFLAGS+= -Wl,--as-needed -Wl,--undefined-version 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.56.0:lang/${RUST_DEFAULT} \ +BUILD_DEPENDS+= rust-cbindgen>=0.26.0:devel/rust-cbindgen \ + ${RUST_DEFAULT}>=1.77.0:lang/${RUST_DEFAULT} \ node:www/node LIB_DEPENDS+= libdrm.so:graphics/libdrm -.if ${MOZILLA_VER:R:R} >= 85 RUN_DEPENDS+= ${LOCALBASE}/lib/libpci.so:devel/libpci -.endif -.if ${MOZILLA_VER:R:R} >= 90 LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim -.endif 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) -MOZ_EXPORT+= LLVM_OBJDUMP="${LOCALBASE}/bin/llvm-objdump${LLVM_DEFAULT}" -.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} -LLVM_DEFAULT= 13 # chase bundled LLVM in lang/rust for LTO -.endif +MOZ_OPTIONS+= --with-libclang-path="${LLVM_PREFIX:S/${PREFIX}/${LOCALBASE}/}/lib" +. if !exists(/usr/bin/llvm-objdump) +MOZ_EXPORT+= LLVM_OBJDUMP="${LOCALBASE}/bin/llvm-objdump${LLVM_VERSION}" +. endif # Require newer Clang than what's in base system unless user opted out -. 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} +. if ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so) +CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_VERSION} +CC= ${LOCALBASE}/bin/clang${LLVM_VERSION} +CXX= ${LOCALBASE}/bin/clang++${LLVM_VERSION} USES:= ${USES:Ncompiler\:*} # XXX avoid warnings -. endif +. endif MOZSRC?= ${WRKSRC} PLISTF?= ${WRKDIR}/plist_files @@ -119,21 +104,21 @@ 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: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 # 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 @@ -141,13 +126,13 @@ 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 @@ -166,7 +151,7 @@ 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} +png_MOZ_OPTIONS= --with-system-png sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite @@ -178,24 +163,24 @@ 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+= \ @@ -210,158 +195,154 @@ MOZ_OPTIONS+= \ 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 +RUN_DEPENDS+= ffmpeg>=6.0,1:multimedia/ffmpeg +. 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 +MOZ_OPTIONS+= --enable-sndio +. else +MOZ_OPTIONS+= --disable-sndio +. 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" -MOZ_EXPORT+= UNAME_m="${ARCH}" -. 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; \ @@ -392,12 +373,12 @@ 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 deleted file mode 100644 index c6009f416a50..000000000000 --- a/Mk/bsd.gstreamer.mk +++ /dev/null @@ -1,562 +0,0 @@ -#-*- tab-width: 4; -*- -# ex:ts=4 -# -# bsd.gstreamer.mk - Support for gstreamer-plugins-based ports. -# -# Created by: Michael Johnson <ahze@FreeBSD.org> - -.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 <bsd.port.pre.mk> -# you must follow one of the examples listed below -# -# .include <bsd.port.options.mk> -# .if defined(WITH_VORBIS) -# USE_GSTREAMER= vorbis -# .endif -# -# or -# USE_GSTREAMER= yes -# .include <bsd.port.options.mk> -# .if defined(WITH_FAAD) -# USE_GSTREAMER+= faad -# .endif -# .include <bsd.port.pre.mk> -# -# 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)) -IGNORE= USE_GSTREAMER and USE_GSTREAMER1 can't be used together -.endif - -_GST_IMPL_LIST:= # - -.if defined(USE_GSTREAMER) -# update this with the gst 1.0 version below -. 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}) -_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 -IGNORE= cannot install: unknown gstreamer ${GST_VERSION} plugin -- ${ext} -. 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} -_GST_BUILD_DEPENDS+= gstreamer-plugins-${plugin}>=0:multimedia/gstreamer-plugins-${plugin} -_GST_RUN_DEPENDS+= gstreamer-plugins-${plugin}>=0:multimedia/gstreamer-plugins-${plugin} -. endfor - -BUILD_DEPENDS+= ${_GST_BUILD_DEPENDS:O:u} -LIB_DEPENDS+= ${_GST_LIB_DEPENDS:O:u} -RUN_DEPENDS+= ${_GST_RUN_DEPENDS:O:u} -.endif - -.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}) -_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) -_GST_IMPL_LIST+= ${${ext}1_IMPL} -. else -_GST_IMPL_LIST+= ${${ext}_IMPL} -. endif -. else -IGNORE= cannot install: unknown gstreamer ${GST1_VERSION} plugin -- ${ext} -. 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} -_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 - -BUILD_DEPENDS+= ${_GST_BUILD_DEPENDS:O:u} -LIB_DEPENDS+= ${_GST_LIB_DEPENDS:O:u} -RUN_DEPENDS+= ${_GST_RUN_DEPENDS:O:u} -.endif - -# The End -.endif diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk index b558be790db5..91ea9516c846 100644 --- a/Mk/bsd.java.mk +++ b/Mk/bsd.java.mk @@ -3,7 +3,6 @@ # # bsd.java.mk - Support for Java-based ports. # -# Created by: Ernst de Haan <znerd@FreeBSD.org> # # For FreeBSD committers: # Please send all suggested changes to the maintainer instead of committing @@ -23,8 +22,8 @@ Java_Include_MAINTAINER= java@FreeBSD.org # # 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[+]) +# versions. (allowed values: 8[+] 11[+] 17[+] 18[+] 19[+] +# 20[+] 21[+]) # # JAVA_OS List of space-separated suitable JDK port operating systems # for the port. (allowed values: native linux) @@ -127,11 +126,11 @@ Java_Include_MAINTAINER= java@FreeBSD.org # 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 @@ -150,40 +149,38 @@ PLIST_SUB+= JAVASHAREDIR="${JAVASHAREDIR: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 +__JAVA_VERSION_LIST= 8 11 17 18 19 20 21 _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_NATIVE_OPENJDK_JDK_19_INFO= PORT=java/openjdk19 HOME=${LOCALBASE}/openjdk19 \ + VERSION=19 OS=native VENDOR=openjdk +_JAVA_PORT_NATIVE_OPENJDK_JDK_20_INFO= PORT=java/openjdk20 HOME=${LOCALBASE}/openjdk20 \ + VERSION=20 OS=native VENDOR=openjdk +_JAVA_PORT_NATIVE_OPENJDK_JDK_21_INFO= PORT=java/openjdk21 HOME=${LOCALBASE}/openjdk21 \ + VERSION=21 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 @@ -199,12 +196,11 @@ _JAVA_OS_linux= Linux __JAVA_PORTS_ALL= \ JAVA_PORT_NATIVE_OPENJDK_JDK_8 \ JAVA_PORT_NATIVE_OPENJDK_JDK_11 \ - 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_7 \ + JAVA_PORT_NATIVE_OPENJDK_JDK_17 \ + JAVA_PORT_NATIVE_OPENJDK_JDK_18 \ + JAVA_PORT_NATIVE_OPENJDK_JDK_19 \ + JAVA_PORT_NATIVE_OPENJDK_JDK_20 \ + JAVA_PORT_NATIVE_OPENJDK_JDK_21 \ JAVA_PORT_LINUX_ORACLE_JDK_8 _JAVA_PORTS_ALL= ${JAVA_PREFERRED_PORTS} \ JAVA_PORT_NATIVE_OPENJDK_JDK_${JAVA_DEFAULT} \ @@ -222,106 +218,106 @@ _JDK_FILE=bin/javac # 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) -_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/} -. else +. if defined(JAVA_VERSION) +_JAVA_VERSION= ${JAVA_VERSION:S/^8+/8 11+/:S/^11+/11 17+/:S/^17+/17 18+/:S/^18+/18 19+/:S/^19+/19 20+/:S/^20+/20 21+/:S/^21+/21/} +. 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} @@ -333,27 +329,27 @@ _JAVA_PORTS_POSSIBLE= ${__JAVA_PORTS_POSSIBLE:C/ [ ]+/ /g} . 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=,,} @@ -370,47 +366,47 @@ JAVA_PORT_OS_DESCRIPTION:= ${JAVA_PORT_OS:S/^/\${_JAVA_OS_/:S/$/}/} # # 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) + @(cd ${BUILD_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} \ + ${ANT} ${MAKE_ARGS} ${ALL_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 + @(cd ${TEST_WRKSRC}; ${SETENVI} ${WRK_ENV} ${MAKE_ENV} \ + ${ANT} ${MAKE_ARGS} ${TEST_TARGET}) +. endif +. endif #----------------------------------------------------------------------------- # Stage 5: Define all settings for the port to use @@ -423,11 +419,11 @@ do-test: . 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 @@ -481,5 +477,5 @@ java-debug: @${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 deleted file mode 100644 index a6f37dd99b10..000000000000 --- a/Mk/bsd.ldap.mk +++ /dev/null @@ -1,86 +0,0 @@ -# -*- 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) -DEFAULT_OPENLDAP_VER?= 24 -# OpenLDAP client versions currently supported -OPENLDAP24_LIB= libldap-2.4.so.2 -OPENLDAP25_LIB= libldap-2.5.so.0 - -.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 - -.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 -OPENLDAP_VER= ${WANT_OPENLDAP_VER} -.elif defined(WITH_OPENLDAP_VER) -OPENLDAP_VER= ${WITH_OPENLDAP_VER} -.else -.if defined(_OPENLDAP_VER) -OPENLDAP_VER= ${_OPENLDAP_VER} -.else -OPENLDAP_VER= ${DEFAULT_OPENLDAP_VER} -.endif -.endif # WANT_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 - -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) -# compatability shim -.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}") -IGNORE= cannot install: doesn't work with OpenLDAP version: ${OPENLDAP_VER} (Doesn't support OpenLDAP ${IGNORE_WITH_OPENLDAP}) -. endif -. endfor -.endif # IGNORE_WITH_OPENLDAP -LIB_DEPENDS+= ${OPENLDAP${OPENLDAP_VER}_LIB}:net/openldap${OPENLDAP_VER}-client -.else -IGNORE= cannot install: unknown OpenLDAP version: ${OPENLDAP_VER} -.endif # Check for correct libs - -.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..674c72d7eabc 100644 --- a/Mk/bsd.licenses.db.mk +++ b/Mk/bsd.licenses.db.mk @@ -8,7 +8,6 @@ Licenses_db_Include_MAINTAINER= portmgr@FreeBSD.org # # bsd.licenses.db.mk - License database for bsd.licenses.mk # -# Created by: Alejandro Pulver <alepulver@FreeBSD.org> # # Please view me with 4 column tabs! # @@ -421,7 +420,7 @@ _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..e66d223b7e4c 100644 --- a/Mk/bsd.licenses.mk +++ b/Mk/bsd.licenses.mk @@ -8,7 +8,6 @@ Licenses_Include_MAINTAINER= portmgr@FreeBSD.org # # bsd.licenses.mk - License auditing framework. # -# Created by: Alejandro Pulver <alepulver@FreeBSD.org> # # Please view me with 4 column tabs! # @@ -127,7 +126,7 @@ Licenses_Include_MAINTAINER= portmgr@FreeBSD.org .if defined(_POSTMKINCLUDED) && !defined(BEFOREPORTMK) -.if defined(LICENSE) +. if defined(LICENSE) # Include known licenses from database @@ -154,10 +153,13 @@ _LICENSE_LIST_PORT_VARS= PERMS NAME GROUPS # few more targets only. _LICENSE_DIR?= ${PREFIX}/share/licenses/${PKGNAME} +. for sp in ${_PKGS} +_LICENSE_DIR.${sp}?= ${PREFIX}/share/licenses/${PKGNAME${_SP.${sp}}} +_LICENSE_CATALOG.${sp}?= ${_LICENSE_DIR.${sp}}/catalog.mk +_LICENSE_REPORT.${sp}?= ${_LICENSE_DIR.${sp}}/LICENSE +. endfor _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} @@ -167,37 +169,37 @@ _LICENSE_COOKIE?= ${WRKDIR}/.license_done.${PORTNAME}.${PREFIX:S/\//_/g} # _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 @@ -211,174 +213,174 @@ _LICENSE_ERROR?= no licenses present in LICENSE (empty string) # 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 @@ -391,129 +393,129 @@ 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. @@ -522,103 +524,103 @@ _LICENSE_ASK_DATA!= mktemp -ut portslicense # 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 @@ -626,35 +628,35 @@ 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" - @${DIALOG} --title "License for ${PKGNAME} (${_LICENSE})" \ +. if ${_LICENSE_COMB} == "single" + @${SETENV} LC_ALL=C.UTF-8 ${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); \ @@ -663,25 +665,25 @@ ${_LICENSE_COOKIE}: done; \ menu_cmd="$${menu_cmd} REJECT \"Reject the licenses (all)\""; \ while true; do \ - ${SH} -c "$${menu_cmd} 2>\"$${tmpfile}\""; \ + ${SH} -c "${SETENV} LC_ALL=C.UTF-8 $${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 ;; \ + ${SETENV} LC_ALL=C.UTF-8 ${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 - @menu_cmd="${DIALOG} --hline \"This port requires you to accept all mentioned licenses\" --menu \"License for ${PKGNAME} (multi)\" 21 70 15"; \ +. endfor + @menu_cmd="${SETENV} LC_ALL=C.UTF-8 ${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 \ @@ -696,120 +698,137 @@ ${_LICENSE_COOKIE}: 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 ;; \ + ${SETENV} LC_ALL=C.UTF-8 ${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) -PLIST_FILES+= ${_LICENSE_CATALOG} \ - ${_LICENSE_REPORT} - -.if ${_LICENSE_COMB} == "single" -PLIST_FILES+= ${_LICENSE_DIR}/${_LICENSE} -.else -. for lic in ${_LICENSE} -. if defined(_LICENSE_FILE_${lic}) -PLIST_FILES+= ${_LICENSE_DIR}/${lic} -. 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" - @${INSTALL_DATA} ${_LICENSE_FILE} ${STAGEDIR}${_LICENSE_DIR}/${_LICENSE} -.else -. for lic in ${_LICENSE} - @${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${STAGEDIR}${_LICENSE_DIR}/${lic} -. endfor -.endif -.endif - -.else # !LICENSE +. if !defined(NO_LICENSES_INSTALL) +. for sp in ${_PKGS} +. if ${sp} == ${PKGBASE} +PLIST_FILES+= ${_LICENSE_CATALOG.${sp}} \ + ${_LICENSE_REPORT.${sp}} +. if ${_LICENSE_COMB} == "single" +PLIST_FILES+= ${_LICENSE_DIR.${sp}}/${_LICENSE} +. else +. for lic in ${_LICENSE} +. if defined(_LICENSE_FILE_${lic}) +PLIST_FILES+= ${_LICENSE_DIR.${sp}}/${lic} +. endif +. endfor +. endif +. else +PLIST_FILES${_SP.${sp}}+= ${_LICENSE_CATALOG.${sp}} \ + ${_LICENSE_REPORT.${sp}} +. if ${_LICENSE_COMB} == "single" +PLIST_FILES${_SP.${sp}}+= ${_LICENSE_DIR.${sp}}/${_LICENSE} +. else +. for lic in ${_LICENSE} +. if defined(_LICENSE_FILE_${lic}) +PLIST_FILES${_SP.${sp}}+= ${_LICENSE_DIR.${sp}}/${lic} +. endif +. endfor +. endif +. endif + + +install-license: install-license.${sp} +install-license.${sp}: + @${MKDIR} ${STAGEDIR}${_LICENSE_DIR.${sp}} + @${INSTALL_DATA} ${_LICENSE_CATALOG_TMP} ${STAGEDIR}${_LICENSE_CATALOG.${sp}} + @${INSTALL_DATA} ${_LICENSE_REPORT_TMP} ${STAGEDIR}${_LICENSE_REPORT.${sp}} +. if ${_LICENSE_COMB} == "single" + @${INSTALL_DATA} ${_LICENSE_FILE} ${STAGEDIR}${_LICENSE_DIR.${sp}}/${_LICENSE} +. else +. for lic in ${_LICENSE} + @${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${STAGEDIR}${_LICENSE_DIR.${sp}}/${lic} +. endfor +. endif +. endfor +. endif + +. 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.local.mk b/Mk/bsd.local.mk index 468442a19428..3a3c544d6380 100644 --- a/Mk/bsd.local.mk +++ b/Mk/bsd.local.mk @@ -1,6 +1,5 @@ # bsd.local.mk - Sandbox for local modification to ports framework. # -# Created by: Mark Linimon <linimon@FreeBSD.org> .if !defined(_POSTMKINCLUDED) && !defined(Local_Pre_Include) diff --git a/Mk/bsd.lto.mk b/Mk/bsd.lto.mk deleted file mode 100644 index 196f686f9a7c..000000000000 --- a/Mk/bsd.lto.mk +++ /dev/null @@ -1,13 +0,0 @@ -# LTO Support -# This file enforces Link Time Optimization for ports. -# In order to use it, add USE_LTO=yes to your /etc/make.conf. - -LTO_Include_MAINTAINER= pkubaj@FreeBSD.org - -.if !defined(LTO_UNSAFE) -# Overridable as a user may want to use -flto -LTO_FLAGS?= -flto=thin -CFLAGS+= ${LTO_FLAGS} -CXXFLAGS+= ${LTO_FLAGS} -LDFLAGS+= ${LTO_FLAGS} -.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 @@ -97,28 +97,28 @@ 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 @@ -135,64 +135,64 @@ MAKE_ENV+= OCAMLFIND_DESTDIR="${STAGEDIR}${OCAMLFIND_DESTDIR}" \ # 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.octave.mk b/Mk/bsd.octave.mk deleted file mode 100644 index e2fc1710c47a..000000000000 --- a/Mk/bsd.octave.mk +++ /dev/null @@ -1,45 +0,0 @@ -#-*- tab-width: 4; -*- -# ex:ts=4 -# -# bsd.octave.mk - Octave related macro -# Common code to install octave-forge packages. -# It is, in effect, a wrapper using the package handling already built -# into math/octave. - -MASTER_SITES= SF/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases \ - SF/octave/Octave%20Forge%20Packages/Old%20Monolithic%20Releases/R2009-06-07 \ - SF/octave/Octave%20Forge%20Packages/Old%20Monolithic%20Releases/R2009-05-08 -DISTNAME= ${OCTAVE_PKGNAME}-${DISTVERSIONFULL} - -bsd_octave_mk_MAINTAINER= stephen@FreeBSD.org - -BUILD_DEPENDS+= octave:math/octave -RUN_DEPENDS+= octave:math/octave \ - ${LOCALBASE}/libexec/octave/load-octave-pkg:math/octave-forge-base -LIB_DEPENDS+= libpcre.so:devel/pcre - -USES+= fortran gmake compiler:c++14-lang -CXXFLAGS+= -std=gnu++11 - -DIST_SUBDIR= octave-forge -OCTAVE_PKGNAME= ${PORTNAME:S/octave-forge-//} -TARBALLS_DIR= ${LOCALBASE}/share/octave/tarballs -INSTALL_TARBALLS_DIR= ${STAGEDIR}${PREFIX}/share/octave/tarballs - -.include "${.CURDIR}/../../math/octave/Makefile.version" - -MAKE_ENV+= PACKAGE=${WRKDIR}/${DISTNAME}.tar.gz -MAKE_ARGS= CC="${CC}" CXX="${CXX}" LD_CXX="${CXX}" DL_LD="${CXX}" MKOCTFILE="${LOCALBASE}/bin/mkoctfile" OCTAVE_VERSION=-${OCTAVE_VERSION} - -LOAD_OCTAVE_PKG_CMD= ${LOCALBASE}/libexec/octave/load-octave-pkg - -do-install: - ${MKDIR} ${INSTALL_TARBALLS_DIR} - ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}.tar.gz ${INSTALL_TARBALLS_DIR}/. - ${LN} -s -f ${DISTNAME}.tar.gz ${INSTALL_TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz - -post-install: - @${ECHO_CMD} "share/octave/tarballs/${DISTNAME}.tar.gz" >> ${TMPPLIST} - @${ECHO_CMD} "share/octave/tarballs/${OCTAVE_PKGNAME}.tar.gz" >> ${TMPPLIST} - @${ECHO_CMD} "@postunexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST} - @${ECHO_CMD} "@postexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST} diff --git a/Mk/bsd.options.desc.mk b/Mk/bsd.options.desc.mk index 53dd362e3f39..41fe01be5a12 100644 --- a/Mk/bsd.options.desc.mk +++ b/Mk/bsd.options.desc.mk @@ -20,7 +20,7 @@ AALIB_DESC?= AAlib graphics library support ACOUSTID_DESC?= AcoustID audio fingerprinting support ALAC_DESC?= Apple Lossless audio format support ALSA_DESC?= ALSA audio architecture support -ALTIVEC_DESC?= Use Altivec optimized routines +ALTIVEC_DESC?= Use AltiVec optimized routines AMR_DESC?= AMR 3GPP speech codec support (opencore) AMR_NB_DESC?= AMR Narrow Band audio support (opencore) AMR_WB_DESC?= AMR Wide Band audio support (opencore) @@ -30,12 +30,14 @@ APE_DESC?= Monkey's Audio lossless format support ARCHIVE_DESC?= bzip2/zip/iso9660 archive support ARMADILLO_DESC?= TPS transform computation via Armadillo ASIO_DESC?= Asynchronous I/O support +ASLR_DESC?= Enable Address Space Layout Randomization support ASM_DESC?= Use optimized assembly code ASPELL_DESC?= Spell checking support via GNU Aspell ASSERT_DESC?= Enable debug assertions -ATLAS_DESC?= ATLAS blas implementation +ATLAS_DESC?= ATLAS BLAS implementation AUDIOFILE_DESC?= SGI audio file format support AVAHI_DESC?= Zeroconf support via Avahi +AVIF_DESC?= AV1 Image File Format via libavif BASH_DESC?= Install programmable completions for Bash BDB_DESC?= Berkeley DB support BDB1_DESC?= Berkeley DB 1.85 support @@ -53,6 +55,7 @@ CDIO_DESC?= CDIO support via libcdio CDPARANOIA_DESC?= CD ripping support (via cdparanoia) CELT_DESC?= CELT audio codec support CFITSIO_DESC?= FITS support via CFITSIO +CLI_DESC?= Command-line interface support COLORD_DESC?= Color management via colord COMPOSITE_DESC?= X11 Composite extension support COOKIE_DESC?= Web cookie support @@ -79,6 +82,7 @@ DTRACE_DESC?= Build with DTrace probes DV_DESC?= Quasar DV video codec support (libdv) DVDCSS_DESC?= Encrypted DVD support via libdvdcss ECW_DESC?= ECW image format support +ESPEAK_DESC?= eSpeak speech synthesizer support EXAMPLES_DESC?= Build and/or install examples EXIV2_DESC?= EXIF and IPTC metadata support via exiv2 EXPAT_DESC?= XML parser support via Expat @@ -137,6 +141,7 @@ GRAPHMAGICK_DESC?= GraphicsMagick image processing support GRAPHVIZ_DESC?= Graphviz graph drawing support GRASS_DESC?= Geographic Information System (GIS) support GRIB_API_DESC?= ECMWF GRIB API support +GRPC_DESC?= gRPC Remote Procedure Call support GSM_DESC?= GSM codec support GSSAPI_BASE_DESC?= GSSAPI support via base system (needs Kerberos) GSSAPI_DESC?= GSSAPI Security API support @@ -145,14 +150,17 @@ GSSAPI_MIT_DESC?= GSSAPI support via security/krb5 GSSAPI_NONE_DESC?= Disable GSSAPI support GSTREAMER_DESC?= Multimedia support via GStreamer GTA_DESC?= Generic Tagged Array (GTA) support -GTK2_DESC?= GTK+ 2 GUI toolkit support -GTK3_DESC?= GTK+ 3 GUI toolkit support +GTK2_DESC?= GTK 2 GUI toolkit support +GTK3_DESC?= GTK 3 GUI toolkit support +GTK4_DESC?= GTK 4 GUI toolkit support +GTKDOC_DESC?= Build development documentation with gtkdoc GUI_DESC?= GUI (Graphical User Interface) support GUILE_DESC?= Guile extension language support GVFS_DESC?= Virtual filesystems support via GVFS H323_DESC?= H.323 codec support HAL_DESC?= HAL (Hardware Abstraction Layer) support HDF5_DESC?= HDF-5 data format support +HEIF_DESC?= ISO/IEC 23008-12:2017 HEIF file format support HPACK_DESC?= Header Compression for HTTP/2.0 support HTTP2_DESC?= HTTP protocol version 2.0 support HTTPD_DESC?= httpd output streaming support @@ -183,6 +191,7 @@ JPEG_DESC?= JPEG image format support JPEG2000_DESC?= JPEG 2000 support JSON_C_DESC?= JSON file/format parser support via json-c JSON_DESC?= JSON file/format/parser support +JXL_DESC?= JPEG XL image format via libjxl KDE4_DESC?= KDE 4 desktop environment support KERBEROS_DESC?= Kerberos support KERBEROS4_DESC?= Kerberos 4 support @@ -355,15 +364,17 @@ MYSQL_DESC?= MySQL database support MYSQL_JDBC_DESC?= JDBC connection to MySQL databases NAGPLUGINS_DESC?= Plugins from nagios-plugins.org NAS_DESC?= Network Audio System support +NATIVE_DESC?= Use native optimization (-march=native) NCURSES_DESC?= Console (text) interface support NETCDF_DESC?= NetCDF data format support -NETLIB_DESC?= Blas implementation from Netlib +NETLIB_DESC?= BLAS implementation from Netlib NETPBM_DESC?= Netpbm graphics toolkit support NFS_DESC?= Network File System support NIS_DESC?= Network Information Services/YP support NLS_DESC?= Native Language Support NMAP_DESC?= NMAP security scanning support NNTP_DESC?= NNTP (News) support +NOASLR_DESC?= Disable ASLR support NOTIFY_DESC?= Desktop notification support NSS_DESC?= SSL/TLS support via NSS NTLM_DESC?= NTLM authentication support @@ -373,7 +384,7 @@ ODBC_DESC?= ODBC database backend ODF_DESC?= Open Document Format (ODF) file support OGG_DESC?= Ogg media format support OPENAL_DESC?= Audio support via OpenAL -OPENBLAS_DESC?= OpenBLAS blas implementation +OPENBLAS_DESC?= OpenBLAS BLAS implementation OPENCL_DESC?= Heterogeneous computing via OpenCL OPENCV_DESC?= Computer Vision support via OpenCV OPENEXR_DESC?= HDR image format support via OpenEXR @@ -400,6 +411,7 @@ PGSQL_DESC?= PostgreSQL database support PGSQL_JDBC_DESC?= JDBC connection to PostgreSQL databases PHONON_DESC?= Multimedia support via Phonon PHP_DESC?= PHP bindings or support +PIPEWIRE_DESC?= PipeWire multimedia server support PIXBUF_DESC?= GDK-PixBuf library support PLUGINS_DESC?= Build and/or install plugins PNG_DESC?= PNG image format support @@ -422,6 +434,7 @@ PYTHON_DESC?= Python bindings or support PYTHON2_DESC?= Python 2.x bindings or support PYTHON3_DESC?= Python 3.x bindings or support QT5_DESC?= Qt 5 toolkit support +QT6_DESC?= Qt 6 toolkit support QUICKTIME_DESC?= QuickTime media support RADIUS_DESC?= RADIUS protocol support RAW_DESC?= RAW format support @@ -429,8 +442,6 @@ READLINE_DESC?= Command line editing via libreadline REDIS_DESC?= Redis key-value store database support REGEX_DESC?= Regular expression support RESIN3_DESC?= Resin 3.x support -RTMP_DESC?= RTMP protocol support via librtmp -RTMPDUMP_DESC?= RTMP protocol support via rtmpdump RTSP_DESC?= Real Time Streaming Protocol (RTSP) support RUBY_DESC?= Ruby bindings or support SAMPLERATE_DESC?= Sample rate conversion support @@ -477,6 +488,7 @@ SYSLOG_DESC?= Syslog logging support SZIP_DESC?= Szip compression support TCL_DESC?= Tcl scripting language support TCLTK_DESC?= Tcl/Tk GUI toolkit support +TCMALLOC_DESC?= Use the tcmalloc memory allocation library TELNET_DESC?= Telnet support TEST_DESC?= Build and/or run tests TFTP_DESC?= TFTP support @@ -487,12 +499,10 @@ TIFF_DESC?= TIFF image format support TINYXML_DESC?= XML parser support via TinyXML TK_DESC?= Tk GUI toolkit support TLS_DESC?= Secure network connection support via TLS -TOMCAT6_DESC?= Tomcat 6.x support -TOMCAT7_DESC?= Tomcat 7.x support -TOMCAT8_DESC?= Tomcat 8.x support -TOMCAT85_DESC?= Tomcat 8.5.x support -TOMCAT9_DESC?= Tomcat 9.x support -TOMCAT10_DESC?= Tomcat 10.x support +TOMCAT85_DESC?= Use Tomcat 8.5.x +TOMCAT9_DESC?= Use Tomcat 9.0.x +TOMCAT101_DESC?= Use Tomcat 10.1.x +TOML_DESC?= TOML format or parser support TOOLAME_DESC?= TooLAME MP2 audio encoder support TREMOR_DESC?= Tremor audio decoder support TTA_DESC?= TTA lossless audio format support @@ -517,6 +527,7 @@ VO_AACENC_DESC?= AAC audio encoding via vo-aacenc VO_AMRWBENC_DESC?= AMR Wide Band encoding via vo-amrwbenc VORBIS_DESC?= Ogg Vorbis audio codec support VPX_DESC?= VP8/VP9 video codec support +VST3_DESC?= VST3 audio plugins support WAV_DESC?= WAV audio format support WAVPACK_DESC?= WavPack lossless audio format support WAYLAND_DESC?= Wayland (graphics) support diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk index 99a3275b05eb..964b817ff706 100644 --- a/Mk/bsd.options.mk +++ b/Mk/bsd.options.mk @@ -180,11 +180,11 @@ 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 \ +_OPTIONS_FLAGS= ALL_TARGET BROKEN CABAL_EXECUTABLES CATEGORIES CFLAGS CONFIGURE_ENV \ + CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL CPPFLAGS CXXFLAGS \ + DESKTOP_ENTRIES DISTFILES 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 \ + GL_ACCOUNT GL_PROJECT GL_SITE GL_SUBDIR GL_TAGNAME 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 \ @@ -197,8 +197,8 @@ _ALL_OPTIONS_HELPERS= ${_OPTIONS_DEPENDS:S/$/_DEPENDS/} \ 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 + PREVENTS PREVENTS_MSG QMAKE_OFF QMAKE_ON \ + SUBPACKAGES SUBPACKAGES_OFF 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 \ @@ -212,49 +212,53 @@ _OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch: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 +. if defined(OPTIONS_DEFAULT_${ARCH}) OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${ARCH}} +. else +OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_OTHER_ARCHS} +. endif _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} @@ -262,92 +266,92 @@ 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) @@ -380,52 +384,52 @@ NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} ## 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} @@ -437,201 +441,224 @@ _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} +# Handle subpackages before the rest to be able to handle options helpers +# with subpackages +. for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} +. if ${PORT_OPTIONS:M${opt}} +. if defined(${opt}_SUBPACKAGES) +SUBPACKAGES+= ${${opt}_SUBPACKAGES} +. endif +. else +. if defined(${opt}_SUBPACKAGES_OFF) +SUBPACKAGES+= ${${opt}_SUBPACKAGES_OFF} +. endif +. endif +. endfor +. 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 +. for p in ${SUBPACKAGES} +. if defined(${opt}_${deptype}_DEPENDS.${p}) +${deptype}_DEPENDS.${p}+= ${${opt}_${deptype}_DEPENDS.${p}} +. endif +. endfor +. 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 +. for p in ${SUBPACKAGES} +. if defined(${opt}_${deptype}_DEPENDS_OFF.${p}) +${deptype}_DEPENDS.${p}+= ${${opt}_${deptype}_DEPENDS_OFF.${p}} +. endif +. endfor +. 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) @@ -640,12 +667,12 @@ _OPTIONS_HELPERS_SEEN+= ${opt}_${helper} # 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} diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index ba8e97da8f9c..8e13aa4f9b24 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -40,9 +40,9 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # 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.2"). +# string (e.g., "12.4"). # OSVERSION - The operating system version as a comparable integer; -# the value of __FreeBSD_version (e.g., 1202000). +# the value of __FreeBSD_version (e.g., 1302000). # # 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 @@ -63,7 +63,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # In this case, incrementing PORTEPOCH forces the revision. # Default: 0 (no effect). # PKGNAME - Always defined as -# ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION}. +# ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}. # Do not define this in your Makefile. # PKGNAMEPREFIX - Prefix to specify that port is language-specific, etc. # Optional. @@ -71,7 +71,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # designator (in case there are different versions of # one port as is the case for Tcl). # Optional. -# PKGVERSION - Always defined as ${PORTVERSION}. +# PKGVERSION - Version of package. # Do not define this in your Makefile. # DISTVERSION - Vendor version of the distribution. # Default: ${PORTVERSION} @@ -123,9 +123,13 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # # (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. +# COMMENT - A short description of the package (less than 70 characters) +# WWW - URL users can get more information on the provided package +# was previously part of pkg-descr +# +# The following 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 @@ -151,8 +155,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # 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 @@ -325,17 +327,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # 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. @@ -346,6 +337,11 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # can be used in Makefiles by port maintainers # if a port breaks with it (it should be # extremely rare). +# PIE_CFLAGS - Defaults to -fPIE -fPIC. This value +# is added to CFLAGS and the necessary flags +# are added to LDFLAGS. Note that PIE_UNSAFE +# can be used in Makefiles by port maintainers +# if a port breaks with it. ## # 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 @@ -373,9 +369,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # 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. @@ -506,13 +499,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # Installs all directories and files from ${WRKSRC}/doc # to ${DOCSDIR} except sed(1) backup files. # -# MANPREFIX - The directory prefix for manual pages. -# Default: ${PREFIX} -# MAN<sect>PREFIX -# - 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"); @@ -572,10 +558,15 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # fetch-url-list # - Show list of URLS to retrieve missing ${DISTFILES} and # ${PATCHFILES} for this port. +# fetch-url-recursive-list +# - Show list of URLS to retrieve missing ${DISTFILES} and +# ${PATCHFILES} for this port and dependencies. # fetch-urlall-list # - Show list of URLS to retrieve ${DISTFILES} and # ${PATCHFILES} for this port. -# +# fetch-urlall-recursive-list +# - Show list of URLS to retrieve ${DISTFILES} and +# ${PATCHFILES} for this port and dependencies. # all-depends-list # - Show all directories which are dependencies # for this port. @@ -600,8 +591,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # - Show all directories which are test-dependencies # for this port. # install-missing-packages -# - Install missing dependencies from package and mark -# them as automatically installed. +# - 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 @@ -618,9 +609,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # - 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. +# describe-json - Generate a JSON-compliant representation of each port. +# 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. @@ -675,6 +667,10 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # # For options see bsd.options.mk # +# WRK_ENV - Environment used when running the upstream build system. +# Target-specific environment variables can be defined using +# CONFIGURE_ENV, MAKE_ENV, TEST_ENV, and similar variables. +# # For fetch: # # FETCH_BINARY - Path to ftp/http fetch command if not in $PATH. @@ -755,7 +751,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # - 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 +# --mandir=${PREFIX}/share/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 @@ -857,7 +853,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # 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} +# Some pairs are added by default: e.g. PREFIX=${PREFIX} # # USE_LDCONFIG - If set to "yes", this adds ${PREFIX}/lib to the list of # directories to be searched for shared libraries. @@ -903,7 +899,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # "Name" "Comment" "Icon" "Exec" "Categories" StartupNotify # Rules: # * Only add desktop entries for applications which do not -# require a terminal (ie. X applications). +# require a terminal (i.e. X11 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 @@ -1019,6 +1015,8 @@ LC_ALL= C # 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. +_LIST_OF_WITH_FEATURES= bind_now debug debuginfo lto pie relro sanitize ssp testing +_DEFAULT_WITH_FEATURES= ssp PORTSDIR?= /usr/ports LOCALBASE?= /usr/local LINUXBASE?= /compat/linux @@ -1047,16 +1045,22 @@ _FLAVOR:= ${FLAVOR} .if !defined(PORTS_FEATURES) && empty(${PORTS_FEATURES:MFLAVORS}) PORTS_FEATURES+= FLAVORS .endif -MINIMAL_PKG_VERSION= 1.15.9 +MINIMAL_PKG_VERSION= 1.17.2 _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ - ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} + ${STAGEDIR}${PREFIX} ${WRKDIR}/pkg ${BINARY_LINKDIR} \ + ${PKGCONFIG_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} +# Ensure .CURDIR doesn't contain a colon, which breaks makefile targets +.if ${.CURDIR:S/:/\:/g} != ${.CURDIR} +.error The current directory path contains ':', this is not supported +.endif + # make sure bmake treats -V as expected .MAKE.EXPAND_VARIABLES= yes @@ -1066,27 +1070,27 @@ _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \ .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 @@ -1105,60 +1109,58 @@ STRIPBIN= ${STRIP_CMD} .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 @@ -1166,24 +1168,23 @@ 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} < 1202000) || \ - (${OPSYS} == DragonFly && ${DFLYVERSION} < 400400) +. if ${OPSYS} == FreeBSD && (${OSVERSION} < 1302000 ) _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} @@ -1192,95 +1193,112 @@ show-unsupported-system-error: @${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} +# Now that PKGORIGIN is set, look for origin-specific variables. +# These are typically set in a make.conf, in the form: +# +# category_portname_VARS= varname=value othervar+=value novar@ +# +# e.g. devel_llvm10_VARS= MAKE_JOBS_NUMBER=2 + +. for var in ${${PKGORIGIN:S/\//_/}_VARS:C/=.*//:O:u} +. if ${var:M*@} +. undef ${var:C/.$//} +. elif ${var:M*+} +${var:C/.$//}+= ${${PKGORIGIN:S/\//_/}_VARS:M${var}=*:C/[^+]*\+=//:C/^"(.*)"$$/\1/} +. else +${var}= ${${PKGORIGIN:S/\//_/}_VARS:M${var}=*:C/[^=]*=//:C/^"(.*)"$$/\1/} +. endif +. endfor + # where 'make config' records user configuration options PORT_DBDIR?= /var/db/ports @@ -1302,52 +1320,71 @@ 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}} -WITH_DEBUG= yes -.endif -.endif +# Enable default features unless they have been disabled by the user, and cleanup +. for feature in ${_DEFAULT_WITH_FEATURES} +. if !defined(WITHOUT_${feature:tu}) +WITH_${feature:tu}= yes +.undef WITHOUT_${feature:tu} +. endif +. endfor + +# For each Feature we support, process the +# WITH_FEATURE_PORTS and WITHOUT_FEATURE_PORTS variables +. for feature in ${_LIST_OF_WITH_FEATURES} +. if defined(WITHOUT_${feature:tu}_PORTS) && ${WITHOUT_${feature:tu}_PORTS:M${PKGORIGIN}} +# Feature disabled for this port, remove WITH_<feat> +.undef WITH_${feature:tu} +. elif defined(WITH_${feature:tu}_PORTS) && ${WITH_${feature:tu}_PORTS:M${PKGORIGIN}} +# Feature enabled for this port, set WITH_<feat> +WITH_${feature:tu}= yes +. endif +. endfor + +. if defined(USE_LTO) +WITH_LTO= ${USE_LTO} +WARNING+= USE_LTO is deprecated in favor of WITH_LTO +. 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} @@ -1370,156 +1407,112 @@ 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 - -.if defined(USE_XORG) && (!defined(USES) || !${USES:Mxorg}) -DEV_WARNING+= "Using USE_XORG alone is deprecated, please use USES=xorg" -USES+= xorg -.endif - -.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} )) -DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" -USES+= php -.endif +. endfor -.if defined(USE_JAVA) +. if defined(USE_JAVA) .include "${PORTSDIR}/Mk/bsd.java.mk" -.endif - -.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 - -.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 - -.if (defined(USE_GNOME) || defined(INSTALLS_ICONS)) && empty(USES:Mgnome) -DEV_WARNING+= "Using USE_GNOME alone is deprecated, please add USES=gnome." -USES+= gnome -.endif - -.if defined(USE_MATE) && empty(USES:Mmate) -DEV_WARNING+= "Using USE_MATE alone is deprecated, please add USES=mate." -USES+= mate -.endif - -.if defined(USE_GL) && (!defined(USES) || !${USES:Mgl}) -DEV_WARNING+= "Using USE_GL alone is deprecated, please add USES=gl." -USES+= gl -.endif - -.if defined(USE_SDL) && (!defined(USES) || !${USES:Msdl}) -DEV_WARNING+= "Using USE_SDL alone is deprecated, please add USES=sdl." -USES+= sdl -.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 - -.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1) -.include "${PORTSDIR}/Mk/bsd.gstreamer.mk" -.endif +. endif -.if !defined(UID) -UID!= ${ID} -u -.endif +UID?= ${.MAKE.UID} 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 \ @@ -1527,52 +1520,51 @@ _FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \ 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} +DOCSDIR?= ${PREFIX}/usr/share/doc/${PORTNAME}-${DISTVERSION} 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} @@ -1590,38 +1582,49 @@ 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 + +WRK_ENV+= HOME=${WRKDIR} \ + PWD="$${PWD}" \ + __MAKE_CONF=${NONEXISTENT} +. for e in OSVERSION PATH TERM TMPDIR \ + UNAME_b UNAME_i UNAME_K UNAME_m UNAME_n \ + UNAME_p UNAME_r UNAME_s UNAME_U UNAME_v +. ifdef ${e} +WRK_ENV+= ${e}=${${e}:Q} +. endif +. endfor TEST_ARGS?= ${MAKE_ARGS} TEST_ENV?= ${MAKE_ENV} @@ -1637,10 +1640,10 @@ MAKE_ENV+= XDG_DATA_HOME=${WRKDIR} \ 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} \ @@ -1658,29 +1661,29 @@ QA_ENV+= STAGEDIR=${STAGEDIR} \ PKGORIGIN=${PKGORIGIN} \ LIB_RUN_DEPENDS='${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}' \ UNIFIED_DEPENDS=${_UNIFIED_DEPENDS:C,([^:]*:[^:]*):?.*,\1,:O:u:Q} \ + WANTED_LIBRARIES='${LIB_DEPENDS:C,([^:]*):([^:]*):?.*,\1,}' \ 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) + "NO_ARCH_IGNORE=${NO_ARCH_IGNORE}" +. 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} \ @@ -1694,66 +1697,73 @@ CO_ENV+= STAGEDIR=${STAGEDIR} \ 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 + +PKGCONFIG_LINKDIR= ${WRKDIR}/.pkgconfig +PKGCONFIG_BASEDIR= /usr/libdata/pkgconfig +. if !${MAKE_ENV:MPKG_CONFIG_LIBDIR=*} && !${CONFIGURE_ENV:MPKG_CONFIG_LIBDIR=*} +MAKE_ENV+= PKG_CONFIG_LIBDIR=${PKGCONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig:${LOCALBASE}/share/pkgconfig:${PKGCONFIG_BASEDIR} +CONFIGURE_ENV+= PKG_CONFIG_LIBDIR=${PKGCONFIG_LINKDIR}:${LOCALBASE}/libdata/pkgconfig:${LOCALBASE}/share/pkgconfig:${PKGCONFIG_BASEDIR} +. 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 -WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_COMMIT} -.endif +. endif +WRKSRC?= ${WRKDIR}/${GL_PROJECT}-${GL_TAGNAME} +. 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} @@ -1785,38 +1795,20 @@ PLIST_SUB_SED?= ${PLIST_SUB_SED_tmp3:C/([^=]*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\. # 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 - -# Reset value from bsd.own.mk. -.if defined(WITH_DEBUG) -.if !defined(INSTALL_STRIPPED) -STRIP= #none -MAKE_ENV+= DONTSTRIP=yes -STRIP_CMD= ${TRUE} -.endif -DEBUG_FLAGS?= -g -CFLAGS:= ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} -.if defined(INSTALL_TARGET) -INSTALL_TARGET:= ${INSTALL_TARGET:S/^install-strip$/install/g} -.endif -.endif - -.if defined(USE_LTO) -.include "${PORTSDIR}/Mk/bsd.lto.mk" -.endif +. endif +. endif +. endif -.if !defined(WITHOUT_SSP) -.include "${PORTSDIR}/Mk/bsd.ssp.mk" -.endif +. for f in ${_LIST_OF_WITH_FEATURES} +. if defined(WITH_${f:tu}) +.include "${PORTSDIR}/Mk/Features/$f.mk" +. endif +. endfor -# 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 @@ -1828,121 +1820,116 @@ 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 - -.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER) -.include "${PORTSDIR}/Mk/bsd.ldap.mk" -.endif +. endif +. endfor +. 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 @@ -1951,99 +1938,75 @@ 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 \ - gio-querymodules \ - gtk-query-immodules \ - ldconfig \ - load-octave-pkg \ - ocamlfind \ - update-desktop-database update-mime-database \ - gdk-pixbuf-query-loaders catalog.ports \ - glib-compile-schemas \ - 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 - -.if defined(USE_XORG) && (!defined(USES) || ( defined(USES) && !${USES:Mxorg} )) -DEV_WARNING+= "Using USE_XORG alone is deprecated, please use USES=xorg" -_USES_POST+= xorg -.endif - -.if defined(USE_GSTREAMER1) -.include "${PORTSDIR}/Mk/bsd.gstreamer.mk" -.endif +. endfor -.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 - -.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} )) -DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php" -_USES_POST+= php -.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) +. if !defined(PACKAGE_BUILDING) || empty(.TARGETS) || make(all) || \ + make(check-sanity) || make(show*-errors) || make(show*-warnings) .include "${PORTSDIR}/Mk/bsd.sanity.mk" -.endif +. endif +. endif -.if defined(USE_LOCALE) -CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} -MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} -.endif +. if defined(USE_LOCALE) +WRK_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE} +. 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 @@ -2078,74 +2041,73 @@ MAKE_ENV+= PREFIX=${PREFIX} \ CC="${CC}" CFLAGS="${CFLAGS}" \ CPP="${CPP}" CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ - CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - MANPREFIX="${MANPREFIX}" + CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" # 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) -_SMP_CPUS!= ${SYSCTL} -n kern.smp.cpus -.endif +. else +. if !defined(_SMP_CPUS) +_SMP_CPUS!= ${NPROC} 2>/dev/null || ${SYSCTL} -n kern.smp.cpus +. 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 @@ -2154,35 +2116,35 @@ 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 @@ -2192,13 +2154,13 @@ 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 @@ -2233,9 +2195,9 @@ COPYTREE_SHARE= ${SH} -c '(${FIND} -Ed $$1 $$3 | ${CPIO} -dumpl $$2 >/dev/null 2 # 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 @@ -2246,31 +2208,32 @@ PKGMESSAGE?= ${PKGDIR}/pkg-message _PKGMESSAGES+= ${PKGMESSAGE} TMPPLIST?= ${WRKDIR}/.PLIST.mktmp +_PLIST?= ${WRKDIR}/.PLIST # 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 -#.if ${OSVERSION} > 1400000 -#PKG_COMPRESSION_FORMAT?= tzst -#.else +. else +. if ${OSVERSION} > 1400000 +PKG_COMPRESSION_FORMAT?= tzst +. else PKG_COMPRESSION_FORMAT?= txz -#.endif -.endif +. endif +. endif # where pkg(8) stores its data PKG_DBDIR?= /var/db/pkg @@ -2279,11 +2242,6 @@ ALL_TARGET?= all INSTALL_TARGET?= install INSTALL_TARGET+= ${LATE_INSTALL_ARGS} -# Integrate with the license auditing framework -.if !defined (DISABLE_LICENSES) -.include "${PORTSDIR}/Mk/bsd.licenses.mk" -.endif - # Popular master sites .include "${PORTSDIR}/Mk/bsd.sites.mk" @@ -2297,200 +2255,200 @@ _PATCH_SITES_DEFAULT?= # 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= @@ -2501,13 +2459,13 @@ 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) @@ -2515,47 +2473,47 @@ 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= @@ -2571,65 +2529,65 @@ 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 \ + benchmarks biology budgie cad chinese comms converters \ databases deskutils devel dns docs \ editors education elisp emulators enlightenment finance french ftp \ games geography german gnome gnustep graphics \ @@ -2647,34 +2605,96 @@ VALID_CATEGORIES+= accessibility afterstep arabic archivers astro audio \ 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}) -PACKAGES:= ${PACKAGES:S/:/\:/g} -_HAVE_PACKAGES= yes -PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} -PKGOLDFILE?= ${PKGREPOSITORY}/${PKGNAME}.${PKG_COMPRESSION_FORMAT} -.else -PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX} -.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} +. if ${PKG_COMPRESSION_FORMAT} == txz 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 +. endif + + +_PKGS= ${PKGBASE} +PORTS_FEATURES+= SUBPACKAGES +. if defined(SUBPACKAGES) +. if ${SUBPACKAGES:Mmain} +DEV_ERROR+= "SUBPACKAGES cannot contain 'main', it is a reserved value" +. endif +. for sp in ${SUBPACKAGES} +. if ${sp:C/[[:lower:][:digit:]_]//g} +_BAD_SUBPACKAGES_NAMES+= ${sp} +. endif +. endfor +. if !empty(_BAD_SUBPACKAGES_NAMES) +DEV_ERROR+= "SUBPACKAGES cannot subpackages that are not all [a-z0-9_]: ${_BAD_SUBPACKAGES_NAMES}" +. endif +. endif +. for sp in ${SUBPACKAGES} +# If a FRAMEWORK generated package needs to override its subpackage package name +# it can do it with this mechanism +. if !defined(_PKGS.${sp}) +_PKGS.${sp}= ${PKGBASE}-${sp} +. endif +_PKGS+= ${_PKGS.${sp}} +PKGBASE.${sp}= ${_PKGS.${sp}} +_SP.${_PKGS.${sp}}=.${sp} +. endfor + +. if !defined(_DID_SUBPACKAGES_HELPERS) +_DID_SUBPACKAGES_HELPERS= yes +_SUBPACKAGE_HELPERS_FILE= DESCR PKGINSTALL PKGDEINSTALL PKGMESSAGE \ + PKGPREINSTALL PKGPOSTINSTALL PKGPREDEINSTALL PKGPOSTDEINSTALL \ + PKGPREUPGRADE PKGPOSTUPGRADE PKGUPGRADE + +. for sp in ${SUBPACKAGES} +# These overwrite the current value +. for v in ${_SUBPACKAGE_HELPERS_FILE} +${v}.${sp}?= ${$v}.${sp} +. endfor +_PKGMESSAGES.${sp}= ${PKGMESSAGE}.${sp} +. if !exists(${DESCR.${sp}}) && ${sp} != debuginfo +DESCR.${sp}= ${DESCR} +DEV_WARNING+= "DESCR.${sp} needs to point to an existing file." +. endif +COMMENT.${sp}?= ${COMMENT} (subpkg: ${sp}) +. endfor +. endif + +. if exists(${PACKAGES}) +PACKAGES:= ${PACKAGES:S/:/\:/g} +_HAVE_PACKAGES= yes +_PKGDIR= ${PKGREPOSITORY} +. else +_PKGDIR= ${.CURDIR} +. endif +. for sp in ${_PKGS} +PKGNAME${_SP.${sp}}= ${sp}-${PKGVERSION} +PKGNAMES+= ${PKGNAME${_SP.${sp}}} +PKGFILE${_SP.${sp}}= ${_PKGDIR}/${PKGNAME${_SP.${sp}}}${PKG_SUFX} +. endfor +_EXTRA_PACKAGE_TARGET_DEP+= ${_PKGDIR} +. for sp in ${_PKGS} +WRKDIR_PKGFILE${_SP.${sp}}= ${WRKDIR}/pkg/${PKGNAME${_SP.${sp}}}${PKG_SUFX} +. endfor + +# Integrate with the license auditing framework +. if !defined (DISABLE_LICENSES) +.include "${PORTSDIR}/Mk/bsd.licenses.mk" +. endif CONFIGURE_SCRIPT?= configure CONFIGURE_CMD?= ./${CONFIGURE_SCRIPT} @@ -2686,19 +2706,19 @@ CONFIGURE_LOG?= config.log 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} +GNU_CONFIGURE_MANPREFIX?= ${PREFIX}/share 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 @@ -2725,7 +2745,7 @@ SET_LATE_CONFIGURE_ARGS= \ else \ _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} ${CONFIGURE_TARGET}" ; \ fi ; -.endif +. endif # Passed to most of script invocations SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ @@ -2733,40 +2753,28 @@ SCRIPTS_ENV+= CURDIR=${MASTERDIR} DISTDIR=${DISTDIR} \ 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 -MANPREFIX?= /usr/share -.else -MANPREFIX?= ${PREFIX} MANDIRS+= ${PREFIX}/share/man -.endif - -MANDIRS+= ${MANPREFIX}/man -.for sect in 1 2 3 4 5 6 7 8 9 -MAN${sect}PREFIX?= ${MANPREFIX} -.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}/,,} @@ -2808,170 +2816,166 @@ DESKTOPDIR?= ${PREFIX}/share/applications ################################################################ # 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) +. for v in ${OSREL} ${OSREL:R} +. for f in ${FLAVOR} +. if defined($f_IGNORE_${OPSYS}_${v}) +IGNORE+= "${${f}_IGNORE_${OPSYS}_${v}}" +. endif +. endfor +. endfor +. 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 - -# Define the text to be output to LEGAL -.if defined(LEGAL_TEXT) -LEGAL= ${LEGAL_TEXT} -.elif defined(RESTRICTED) -LEGAL= ${RESTRICTED} -.elif defined(NO_CDROM) -LEGAL= ${NO_CDROM} -.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} \ @@ -2980,33 +2984,27 @@ all: 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 - -.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 +. endif ################################################################ # @@ -3014,12 +3012,12 @@ check-makevars:: # 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 @@ -3031,18 +3029,18 @@ _OPTIONS_OK=yes ################################################################ # 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. @@ -3052,17 +3050,17 @@ package: # 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" @@ -3075,27 +3073,27 @@ check-deprecated: @${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}" \ @@ -3104,7 +3102,7 @@ check-vulnerable: 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 @@ -3128,86 +3126,106 @@ _DO_FETCH_ENV= \ 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 + +. if !target(fetch-url-recursive-list-int) +fetch-url-recursive-list-int: fetch-url-list-int + @recursive_cmd="fetch-url-list-int"; \ + recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + ${_FLAVOR_RECURSIVE_SH} +. 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 + +. if !target(fetch-urlall-recursive-list) +fetch-urlall-recursive-list: fetch-urlall-list + @recursive_cmd="fetch-urlall-list"; \ + recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + ${_FLAVOR_RECURSIVE_SH} +. 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 +. if !target(fetch-url-recursive-list) +fetch-url-recursive-list: fetch-url-list + @recursive_cmd="fetch-url-list"; \ + recursive_dirs="$$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + ${_FLAVOR_RECURSIVE_SH} +. 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});\ @@ -3220,11 +3238,11 @@ do-extract: ${EXTRACT_WRKDIR} ${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}" \ @@ -3250,12 +3268,12 @@ do-patch: 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 \ @@ -3272,18 +3290,18 @@ run-autotools-fixup: ${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 \ @@ -3294,12 +3312,12 @@ do-configure: ${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}" \ + if ! ${SETENVI} ${WRK_ENV} CC="${CC}" CPP="${CPP}" CXX="${CXX}" \ CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \ LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ INSTALL="/usr/bin/install -c" \ @@ -3312,12 +3330,13 @@ do-configure: (${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) +DO_MAKE_BUILD?= ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ + ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} +. if !target(do-build) do-build: @(cd ${BUILD_WRKSRC}; if ! ${DO_MAKE_BUILD} ${ALL_TARGET}; then \ if [ -n "${BUILD_FAIL_MESSAGE}" ] ; then \ @@ -3326,24 +3345,18 @@ do-build: 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) - @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 ( defined(CONFLICTS) || defined(CONFLICTS_BUILD) ) && !defined(DISABLE_CONFLICTS) && !defined(DEFER_CONFLICTS_CHECK) + @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ @@ -3355,19 +3368,14 @@ check-build-conflicts: ${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) - @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 ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) ) && !defined(DISABLE_CONFLICTS) + @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ @@ -3377,22 +3385,16 @@ identify-install-conflicts: ${ECHO_MSG}; \ ${ECHO_MSG} " They install files into the same place."; \ ${ECHO_MSG} " You may want to stop build with Ctrl + C."; \ - sleep 10; \ + 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) - @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 ( defined(CONFLICTS) || defined(CONFLICTS_INSTALL) || ( defined(CONFLICTS_BUILD) && defined(DEFER_CONFLICTS_CHECK) ) ) && !defined(DISABLE_CONFLICTS) +. if defined(DEFER_CONFLICTS_CHECK) + @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_BUILD:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ @@ -3403,14 +3405,8 @@ check-install-conflicts: ${ECHO_MSG} " Please remove them first with pkg delete."; \ exit 1; \ fi -.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); \ +. else + @conflicts_with=$$(${PKG_QUERY} -ge "%n != ${PKGBASE}" "%n-%v" ${CONFLICTS:C/.+/'&'/} ${CONFLICTS_INSTALL:C/.+/'&'/} 2>/dev/null || : ; ) ; \ if [ -n "$${conflicts_with}" ]; then \ ${ECHO_MSG}; \ ${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \ @@ -3422,21 +3418,23 @@ check-install-conflicts: ${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 + @(cd ${INSTALL_WRKSRC} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${FAKEROOT} \ + ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) +. endif # Test -.if !target(do-test) && defined(TEST_TARGET) -DO_MAKE_TEST?= ${SETENV} ${TEST_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${TEST_ARGS:N${DESTDIRNAME}=*} +. if !target(do-test) && defined(TEST_TARGET) +DO_MAKE_TEST?= ${SETENVI} ${WRK_ENV} ${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 \ @@ -3445,107 +3443,119 @@ do-test: 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) -_EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDFILE} -${PKGOLDFILE}: ${PKGFILE} - ${INSTALL} -l rs ${PKGFILE} ${PKGOLDFILE} -.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) && ${PKG_COMPRESSION_FORMAT} == txz _EXTRA_PACKAGE_TARGET_DEP+= ${PKGOLDLATESTFILE} ${PKGOLDSIGFILE} -${PKGOLDLATESTFILE}: ${PKGOLDFILE} ${PKGLATESTREPOSITORY} - ${INSTALL} -l rs ${PKGOLDFILE} ${PKGOLDLATESTFILE} +${PKGOLDLATESTFILE}: ${PKGFILE} ${PKGLATESTREPOSITORY} + ${INSTALL} -l rs ${PKGFILE} ${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 \ +. for sp in ${_PKGS} +${_PLIST}.${sp}: ${TMPPLIST} + @if [ "${PKGBASE}" = "${sp}" ]; then \ + ${SED} "/^@comment /d; /@@/d" ${TMPPLIST} > ${.TARGET} ; \ + else \ + ${SED} -n "s/@@${sp:S/${PKGBASE}-//}@@//p" ${TMPPLIST} > ${.TARGET} ; \ + fi + +${WRKDIR_PKGFILE${_SP.${sp}}}: ${_PLIST}.${sp} create-manifest ${WRKDIR}/pkg + @echo "===> Building ${PKGNAME${_SP.${sp}}}" + @if ! ${SETENV} ${PKG_ENV} ${PKG_CREATE} ${PKG_CREATE_ARGS} -m ${METADIR}.${sp} -p ${_PLIST}.${sp} -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} + +_EXTRA_PACKAGE_TARGET_DEP+= ${WRKDIR_PKGFILE${_SP.${sp}}} + +. if defined(_HAVE_PACKAGES) +${PKGFILE${_SP.${sp}}}: ${WRKDIR_PKGFILE${_SP.${sp}}} + @${LN} -f ${WRKDIR_PKGFILE${_SP.${sp}}} ${PKGFILE${_SP.${sp}}} 2>/dev/null \ + || ${CP} -f ${WRKDIR_PKGFILE${_SP.${sp}}} ${PKGFILE${_SP.${sp}}} + +_EXTRA_PACKAGE_TARGET_DEP+= ${PKGFILE${_SP.${sp}}} +. endif +. endfor # 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}" +. for sp in ${_PKGS} + @${ECHO_MSG} "===> Deleting package for ${sp}" # When staging, the package may only be in the workdir if not root - @${RM} ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || : -.endif + @${RM} ${PKGFILE${_SP.${sp}}} ${WRKDIR_PKGFILE${_SP.${sp}}} 2>/dev/null || : +. endfor +. 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 +. for sp in ${_PKGS} + @${ECHO_CMD} "[ -f ${PKGFILE${_SP.${sp}}} ] && (${ECHO_CMD} deleting ${PKGFILE${_SP.${sp}}}; ${RM} ${PKGFILE${_SP.${sp}}})" +. endfor +. 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 -install-package: - @if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \ - _pkgfile="${WRKDIR_PKGFILE}"; \ +. endif +. for sp in ${_PKGS} +install-package: install-package.${sp} +install-package.${sp}: + @if [ -f "${WRKDIR_PKGFILE${_SP.${sp}}}" ]; then \ + _pkgfile="${WRKDIR_PKGFILE${_SP.${sp}}}"; \ else \ - _pkgfile="${PKGFILE}"; \ + _pkgfile="${PKGFILE${_SP.${sp}}}"; \ fi; \ ${PKG_ADD} ${_INSTALL_PKG_ARGS} $${_pkgfile} -.endif - +. endfor +. 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}`; \ @@ -3563,75 +3573,79 @@ check-already-installed: ${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 \ + if [ -n "${DEVELOPER:Dyes}" ]; then \ + ${ECHO_MSG} "===> File(s) found in lib/pkgconfig while correct path is libdata/pkgconfig"; \ + ${ECHO_MSG} " Applying fix but consider using USES= pathfix or adjust install path"; \ + fi; \ ${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} @@ -3654,11 +3668,13 @@ create-users-groups: 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) +_WWW= ${WWW:[1]} + +. if !defined(DISABLE_SECURITY_CHECK) +. if !target(security-check) security-check: ${TMPPLIST} # Scan PLIST for: # 1. setugid files @@ -3689,19 +3705,18 @@ security-check: ${TMPPLIST} ! ${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 \ + if [ ! -z "${_WWW}" ]; 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}"; \ + ${ECHO_MSG} "${_WWW}"; \ 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 @@ -3727,35 +3742,34 @@ install-message: test-message: @${ECHO_MSG} "===> Testing for ${PKGNAME}" package-message: - @${ECHO_MSG} "===> Building package for ${PKGNAME}" + @${ECHO_MSG} "===> Building packages 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 \ + @if [ -n "${_WWW}" ]; then \ ${ECHO_MSG} -n " and/or visit the "; \ - ${ECHO_MSG} -n "<a href=\"$${www_site}\">web site</a>"; \ + ${ECHO_MSG} -n "<a href=\"${_WWW}\">web site</a>"; \ ${ECHO_MSG} " for further information"; \ fi -.endif +. endif ################################################################ # Some more targets supplied for users' convenience @@ -3765,63 +3779,65 @@ pretty-print-www-site: # # 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 - @${ECHO_MSG} "===> Deinstalling for ${PKGBASE}" - @if ${PKG_INFO} -e ${PKGBASE}; then \ - p=`${PKG_INFO} -q -O ${PKGBASE}`; \ +. else +. for _sp in ${_PKGS} + @${ECHO_MSG} "===> Deinstalling for ${_sp}" + @if ${PKG_INFO} -e ${_sp}; then \ + p=`${PKG_INFO} -q -O ${_sp}`; \ ${ECHO_MSG} "===> Deinstalling $${p}"; \ - ${PKG_DELETE} -f ${PKGBASE} ; \ + ${PKG_DELETE} -f ${_sp} ; \ else \ - ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \ + ${ECHO_MSG} "===> ${_sp} not installed, skipping"; \ fi +. endfor @${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 \ @@ -3836,12 +3852,12 @@ deinstall-all: ${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 \ @@ -3850,73 +3866,73 @@ do-clean: ${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 \ @@ -3929,12 +3945,12 @@ delete-distfiles: 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 \ @@ -3946,23 +3962,10 @@ delete-distfiles-list: fi; \ done; \ fi -.if defined(DIST_SUBDIR) +. if defined(DIST_SUBDIR) @${ECHO_CMD} "${RMDIR} ${_DISTDIR} 2>/dev/null || ${TRUE}" -.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 +. endif +. endif # Checksumming utilities @@ -3970,7 +3973,7 @@ update-patches: _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 @@ -3979,7 +3982,10 @@ _CHECKSUM_INIT_ENV= \ # checksum and sizes checks. makesum: check-sanity @cd ${.CURDIR} && ${MAKE} fetch NO_CHECKSUM=yes \ - DISABLE_SIZE=yes DISTFILES="${DISTFILES}" + DISABLE_SIZE=yes DISTFILES="${DISTFILES}" \ + MASTER_SITES="${MASTER_SITES}" \ + MASTER_SITE_SUBDIR="${MASTER_SITE_SUBDIR}" \ + PATCH_SITES="${PATCH_SITES}" @${SETENV} \ ${_CHECKSUM_INIT_ENV} \ dp_CHECKSUM_ALGORITHMS='${CHECKSUM_ALGORITHMS:tu}' \ @@ -3989,11 +3995,11 @@ makesum: check-sanity 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}' \ @@ -4009,8 +4015,8 @@ checksum: fetch 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: @@ -4030,39 +4036,42 @@ extract-fixup-modes: # 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 + @${RM} ${PACKAGE_COOKIE} ${TMPPLIST}* +. 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 +. for sp in ${_PKGS} +${deptype}_DEPENDS_ALL+= ${${deptype}_DEPENDS${_SP.${sp}}} +. endfor ${deptype:tl}-depends: -.if defined(${deptype}_DEPENDS) && !defined(NO_DEPENDS) +. if !empty(${deptype}_DEPENDS_ALL) && !defined(NO_DEPENDS) @${SETENV} \ - dp_RAWDEPENDS="${${deptype}_DEPENDS}" \ + dp_RAWDEPENDS="${${deptype}_DEPENDS_ALL}" \ dp_DEPTYPE="${deptype}_DEPENDS" \ dp_DEPENDS_TARGET="${DEPENDS_TARGET}" \ dp_DEPENDS_PRECLEAN="${DEPENDS_PRECLEAN}" \ @@ -4084,20 +4093,20 @@ ${deptype:tl}-depends: 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} +_UNIFIED_DEPENDS=${PKG_DEPENDS_ALL} ${EXTRACT_DEPENDS_ALL} ${PATCH_DEPENDS_ALL} ${FETCH_DEPENDS_ALL} ${BUILD_DEPENDS_ALL} ${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL} ${TEST_DEPENDS_ALL} _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} @@ -4112,7 +4121,7 @@ _FLAVOR_RECURSIVE_SH= \ ${FALSE}; \ fi; \ for dir in $${recursive_dirs}; do \ - unset flavor; \ + unset flavor FLAVOR; \ case $${dir} in \ *@*/*) ;; \ *@*) \ @@ -4144,55 +4153,55 @@ 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} +BUILD-DEPENDS-LIST= ${DEPENDS-LIST} "${PKG_DEPENDS_ALL} ${EXTRACT_DEPENDS_ALL} ${PATCH_DEPENDS_ALL} ${FETCH_DEPENDS_ALL} ${BUILD_DEPENDS_ALL} ${LIB_DEPENDS_ALL}" +RUN-DEPENDS-LIST= ${DEPENDS-LIST} "${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL}" +TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS_ALL: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} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + 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} $$(${ALL-DEPENDS-FLAVORS-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, @@ -4227,66 +4236,66 @@ FETCH_LIST?= for i in $$deps; do \ 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) - @targ=fetch; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} -.endif -.endfor -.endif +. for deptype in PKG EXTRACT PATCH FETCH BUILD RUN +. if defined(${deptype}_DEPENDS) + @targ=fetch; deps="${${deptype}_DEPENDS_ALL}"; ${FETCH_LIST} +. 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) - @targ=fetch-list; deps="${${deptype}_DEPENDS}"; ${FETCH_LIST} -.endif -.endfor -.endif -.endif +. if !defined(NO_DEPENDS) +. for deptype in PKG EXTRACT PATCH FETCH BUILD RUN +. if defined(${deptype}_DEPENDS) + @targ=fetch-list; deps="${${deptype}_DEPENDS_ALL}"; ${FETCH_LIST} +. 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} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + 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} +_LIB_RUN_DEPENDS= ${LIB_DEPENDS_ALL} ${RUN_DEPENDS_ALL} PACKAGE-DEPENDS-LIST?= \ if [ "${CHILD_DEPENDS}" ]; then \ installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ @@ -4305,6 +4314,11 @@ PACKAGE-DEPENDS-LIST?= \ for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \ unset flavor; \ case $${dir} in \ + *~*) \ + dir=$${dir%~*}; \ + ;; \ + esac; \ + case $${dir} in \ *@*) \ flavor=$${dir\#*@}; \ dir=$${dir%@*}; \ @@ -4333,62 +4347,85 @@ PACKAGE-DEPENDS-LIST?= \ fi; \ done -ACTUAL-PACKAGE-DEPENDS?= \ +# FIXME: SELF_DEPENDS can only be used to depend on sub packages whose +# package name has not been overrided by the framework, otherwize the +# assumption made below that the package name is "PKGBASE-$$self" is broken. +. for sp in ${_PKGS} +ACTUAL-PACKAGE-DEPENDS${_SP.${sp}}?= \ depfiles="" ; \ - for lib in ${LIB_DEPENDS:C/\:.*//}; do \ + for lib in ${LIB_DEPENDS${_SP.${sp}}: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"/} + for self in ${SELF_DEPENDS${_SP.${sp}}}; do \ + if [ "$$self" = "main" ]; then \ + printf "\"%s\": {origin: \"%s\", version: \"%s\"}\n" ${PKGBASE} ${PKGORIGIN} ${PKGVERSION}; \ + else \ + printf "\"%s-%s\": {origin: \"%s\", version: \"%s\"}\n" ${PKGBASE} $$self ${PKGORIGIN} ${PKGVERSION}; \ + fi ; \ + done ; \ + ${SETENV} PKG_BIN="${PKG_BIN}" ${SH} ${SCRIPTSDIR}/actual-package-depends.sh $${depfiles} ${RUN_DEPENDS${_SP.${sp}}:C/(.*)\:.*/"\1"/} +. endfor 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: +. for sp in ${_PKGS} +PKG_NOTES.${sp}= ${PKG_NOTES} +PKG_NOTES_ENV.${sp}= ${PKG_NOTES_ENV} +. if ${sp} != ${PKGBASE} +PKG_NOTES.${sp}+= subpackage +PKG_NOTES_ENV.${sp}+= dp_PKG_NOTE_subpackage=${_SP.${sp}:S/^.//1} +. endif +create-manifest: create-manifest.${sp} +create-manifest.${sp}: @${SETENV} \ dp_SCRIPTSDIR='${SCRIPTSDIR}' \ - dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS}' \ + dp_ACTUAL_PACKAGE_DEPENDS='${ACTUAL-PACKAGE-DEPENDS${_SP.${sp}}}' \ dp_CATEGORIES='${CATEGORIES:u:S/$/,/}' \ - dp_COMMENT=${COMMENT:Q} \ + dp_COMMENT=${COMMENT${_SP.${sp}}:Q} \ dp_COMPLETE_OPTIONS_LIST='${COMPLETE_OPTIONS_LIST}' \ dp_DEPRECATED=${DEPRECATED:Q} \ - dp_DESCR='${DESCR}' \ + dp_DESCR='${DESCR${_SP.${sp}}}' \ 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_METADIR='${METADIR}.${sp}' \ dp_NO_ARCH='${NO_ARCH}' \ - dp_PKGBASE='${PKGBASE}' \ - dp_PKGDEINSTALL='${PKGDEINSTALL}' \ - dp_PKGINSTALL='${PKGINSTALL}' \ - dp_PKGMESSAGES='${_PKGMESSAGES}' \ + dp_PKGBASE='${sp}' \ + dp_PKGDEINSTALL='${PKGDEINSTALL${_SP.${sp}}}' \ + dp_PKGINSTALL='${PKGINSTALL${_SP.${sp}}}' \ + dp_PKGMESSAGES='${_PKGMESSAGES${_SP.${sp}}}' \ dp_PKGORIGIN='${PKGORIGIN}' \ - dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL}' \ - dp_PKGPOSTINSTALL='${PKGPOSTINSTALL}' \ - dp_PKGPREDEINSTALL='${PKGPREDEINSTALL}' \ - dp_PKGPREINSTALL='${PKGPREINSTALL}' \ + dp_PKGPOSTDEINSTALL='${PKGPOSTDEINSTALL${_SP.${sp}}}' \ + dp_PKGPOSTINSTALL='${PKGPOSTINSTALL${_SP.${sp}}}' \ + dp_PKGPREDEINSTALL='${PKGPREDEINSTALL${_SP.${sp}}}' \ + dp_PKGPREINSTALL='${PKGPREINSTALL${_SP.${sp}}}' \ dp_PKGVERSION='${PKGVERSION}' \ dp_PKG_BIN='${PKG_BIN}' \ dp_PKG_IGNORE_DEPENDS='${PKG_IGNORE_DEPENDS}' \ - dp_PKG_NOTES='${PKG_NOTES}' \ + dp_PKG_NOTES='${PKG_NOTES.${sp}}' \ dp_PORT_OPTIONS='${PORT_OPTIONS}' \ dp_PREFIX='${PREFIX}' \ dp_USERS='${USERS:u:S/$/,/}' \ dp_WWW='${WWW}' \ - ${PKG_NOTES_ENV} \ + ${PKG_NOTES_ENV.${sp}} \ ${SH} ${SCRIPTSDIR}/create-manifest.sh - +. endfor # Print out package names. package-depends: @${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}' -actual-package-depends: - @${ACTUAL-PACKAGE-DEPENDS} +. for sp in ${_PKGS} +actual-package-depends: actual-package-depends.${sp} +actual-package-depends.${sp}: + @${ACTUAL-PACKAGE-DEPENDS${_SP.${sp}}} +. endfor # Build packages for port and dependencies @@ -4434,65 +4471,118 @@ install-missing-packages: # If this ever changes, portmgr should contact the portsnap maintainer # first to avoid gratuitous breakage. -. 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 !target(describe) +_EXTRACT_DEPENDS=${EXTRACT_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} +_PATCH_DEPENDS=${PATCH_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} +_FETCH_DEPENDS=${FETCH_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} +_LIB_DEPENDS=${LIB_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} +_BUILD_DEPENDS=${BUILD_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} +_RUN_DEPENDS=${RUN_DEPENDS_ALL:C/^[^ :]+:([^ :@]+)(@[^ :]+)?(:[^ :]+)?/\1/:O:u:C,(^[^/]),${PORTSDIR}/\1,} ${_LIB_DEPENDS} +. 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) + @(${ECHO_CMD} "${PKGNAME}|${.CURDIR}|${PREFIX}|"${COMMENT:Q}"|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|${_WWW}" >> ${INDEX_OUT}) +. 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 + +. if empty(FLAVORS) || defined(_DESCRIBE_WITH_FLAVOR) + +. if defined(_DESCRIBE_WITH_FLAVOR) +_JSON_OBJ_NAME="\"${FLAVOR}-${.CURDIR:T}\":" +. endif + +describe-json: + @(${ECHO_CMD} "${_JSON_OBJ_NAME} { ";\ + ${ECHO_CMD} \"uses\":[\"${USES:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"flavors\":[\"${FLAVORS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"options_default\":[\"${OPTIONS_DEFAULT:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"fetch_depends\":[\"${FETCH_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"extract_depends\":[\"${EXTRACT_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"patch_depends\":[\"${PATCH_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"build_depends\":[\"${BUILD_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"lib_depends\":[\"${LIB_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"run_depends\":[\"${RUN_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"test_depends\":[\"${TEST_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"pkg_depends\":[\"${PKG_DEPENDS:ts,:Q:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"complete_options_list\":[\"${COMPLETE_OPTIONS_LIST:ts,:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"categories\":[\"${CATEGORIES:ts,:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"license\":[\"${LICENSE:ts,:S/,/\",\"/g}\"], ;\ + ${ECHO_CMD} \"deprecated\":\""${DEPRECATED:S/"/\\\"/g:S/\\\\*/*/g:S/\\\'/'/g}" \", ;\ + ${ECHO_CMD} \"broken\":\"${BROKEN:Q:S/"/\\\"/g:S/\\\\*/*/g:S/\\\'/'/g}\", ;\ + ${ECHO_CMD} \"distversion\":\"${DISTVERSION}\", ;\ + ${ECHO_CMD} \"distversionprefix\":\"${DISTVERSIONPREFIX}\", ;\ + ${ECHO_CMD} \"distversionsuffix\":\"${DISTVERSIONSUFFIX}\", ;\ + ${ECHO_CMD} \"expiration_date\":\"${EXPIRATION_DATE}\", ;\ + ${ECHO_CMD} \"flavor\":\"${FLAVOR}\", ;\ + ${ECHO_CMD} \"gh_account\":\"${GH_ACCOUNT}\", ;\ + ${ECHO_CMD} \"gh_project\":\"${GH_PROJECT}\", ;\ + ${ECHO_CMD} \"gh_tagname\":\"${GH_TAGNAME}\", ;\ + ${ECHO_CMD} \"gl_account\":\"${GL_ACCOUNT}\", ;\ + ${ECHO_CMD} \"gl_commit\":\"${GL_COMMIT}\", ;\ + ${ECHO_CMD} \"gl_project\":\"${GL_PROJECT}\", ;\ + ${ECHO_CMD} \"gl_site\":\"${GL_SITE}\", ;\ + ${ECHO_CMD} \"maintainer\":\"${MAINTAINER}\", ;\ + ${ECHO_CMD} \"makefiles\":\"${MAKEFILES}\", ;\ + ${ECHO_CMD} \"pkgbase\":\"${PKGBASE}\", ;\ + ${ECHO_CMD} \"pkgname\":\"${PKGNAME}\", ;\ + ${ECHO_CMD} \"pkgnamesuffix\":\"${PKGNAMESUFFIX}\", ;\ + ${ECHO_CMD} \"pkgorigin\":\"${PKGORIGIN}\", ;\ + ${ECHO_CMD} \"comment\":\"${COMMENT:Q:S/"/\\\"/g:S/\\\\*/*/g:S/\\\'/'/g}\", ;\ + ${ECHO_CMD} \"portepoch\":\"${PORTEPOCH}\", ;\ + ${ECHO_CMD} \"portname\":\"${PORTNAME}\", ;\ + ${ECHO_CMD} \"portrevision\":\"${PORTREVISION}\", ;\ + ${ECHO_CMD} \"portversion\":\"${PORTVERSION}\", ;\ + ${ECHO_CMD} \"use_github\":\"${USE_GITHUB}\", ;\ + ${ECHO_CMD} \"use_gitlab\":\"${USE_GITLAB}\", ;\ + ${ECHO_CMD} \"www\":\"${WWW:Q}\" ;\ + ${ECHO_CMD} "}" >> ${INDEX_OUT}) +. else # empty(FLAVORS) +describe-json: ${FLAVORS:S/^/describe-json-/} +_LAST_FLAVOR = ${FLAVORS:[-1]} +. for f in ${FLAVORS} +describe-json-${f}: + @if [ "${f}" == "${FLAVORS:[1]}" ]; then \ + ${ECHO_CMD} "{" ;\ + fi; + @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -D_DESCRIBE_WITH_FLAVOR describe-json + @if [ "${f}" != "${_LAST_FLAVOR}" ]; then \ + ${ECHO_MSG} "," ;\ + else \ + ${ECHO_CMD} "}" ;\ + fi; \ + +. endfor +. endif # empty(FLAVORS) www-site: -.if exists(${DESCR}) - @${AWK} '$$1 ~ /^WWW:/ {print $$2}' ${DESCR} | ${HEAD} -1 -.else - @${ECHO_CMD} -.endif + @${ECHO_CMD} ${_WWW} -.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}" @@ -4526,45 +4616,44 @@ _PRETTY_PRINT_DEPENDS_LIST=\ ${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} @@ -4573,77 +4662,91 @@ generate-plist: ${WRKDIR} @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} +. for sp in ${_PKGS} +. if ${sp} != ${PKGBASE} + @for file in ${PLIST_FILES${_SP.${sp}}}; do \ + ${ECHO_CMD} $${file} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's/^/@@${_SP.${sp}:S/^.//}@@/' >> ${TMPPLIST}; \ + done +. endif +. endfor +. 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 +. for sp in ${_PKGS} +. if ${sp} != ${PKGBASE} +. for dir in ${PLIST_DIRS${_SP.${sp}}} + @${ECHO_CMD} ${dir} | ${SED} ${PLIST_SUB_SANITIZED:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} -e 's,^,@@${_SP.${sp}:S/^.//}@@@dir ,' >> ${TMPPLIST} +. endfor +. endif +. endfor +. 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 \ @@ -4652,10 +4755,10 @@ install-rc-script: ${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= ; \ @@ -4671,12 +4774,12 @@ check-man: stage 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= ; \ @@ -4703,102 +4806,105 @@ compress-man: ${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) - @${ECHO_CMD} "no flavor: ${PKGNAME}" -.else -.for f in ${FLAVORS} +. if empty(FLAVORS) + @${ECHO_CMD} "no flavor: ${PKGNAMES}" +. else +. for f in ${FLAVORS} @${ECHO_CMD} -n "${f}: " - @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME -.endfor -.endif + @cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V PKGNAMES +. endfor +. endif flavors-package-names: .PHONY -.if empty(FLAVORS) - @${ECHO_CMD} "${PKGNAME}" -.else -.for f in ${FLAVORS} - @cd ${.CURDIR} && ${SETENV} FLAVOR=${f} ${MAKE} -B -V PKGNAME -.endfor -.endif +. if empty(FLAVORS) + @${ECHO_CMD} "${PKGNAMES}" | ${XARGS} -n 1 +. else +. for f in ${FLAVORS} + @cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V PKGNAMES | ${XARGS} -n 1 +. 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) +. for sp in ${_PKGS} +fake-pkg: fake-pkg.${sp} +fake-pkg.${sp}: ${_PLIST}.${sp} +. if defined(INSTALLS_DEPENDS) +. if !defined(NO_PKG_REGISTER) @${ECHO_MSG} "===> Registering installation for ${PKGNAME} as automatic" -.endif - @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.else -.if !defined(NO_PKG_REGISTER) +. endif + @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} -d ${STAGE_ARGS} -m ${METADIR}.${sp} -f ${_PLIST}.${sp} +. else +. if !defined(NO_PKG_REGISTER) @${ECHO_MSG} "===> Registering installation for ${PKGNAME}" -.endif - @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR} -f ${TMPPLIST} -.endif - @${RM} -r ${METADIR} -.endif +. endif + @${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_REGISTER} ${STAGE_ARGS} -m ${METADIR}.${sp} -f ${_PLIST}.${sp} +. endif + @${RM} -r ${METADIR}.${sp} +. endfor +. 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 @@ -4806,135 +4912,135 @@ _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 \ @@ -4942,10 +5048,10 @@ sanity-config: _check-config 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}" \ @@ -4966,31 +5072,31 @@ D4P_ENV= PKGNAME="${PKGNAME}" \ 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 \ @@ -5006,6 +5112,7 @@ do-config: trap "${RM} $${TMPOPTIONSFILE}; exit 1" 1 2 3 5 10 13 15; \ ${SETENV} ${D4P_ENV} ${SH} ${SCRIPTSDIR}/dialog4ports.sh $${TMPOPTIONSFILE} || { \ ${RM} $${TMPOPTIONSFILE}; \ + ${ECHO_CMD}; \ ${ECHO_MSG} "===> Options unchanged"; \ exit 0; \ }; \ @@ -5039,85 +5146,85 @@ do-config: 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} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + 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} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + 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 \ @@ -5129,20 +5236,20 @@ rmconfig: ${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} $$(${ALL-DEPENDS-FLAVORS-LIST})"; \ + 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= [ @@ -5152,23 +5259,23 @@ 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} \ @@ -5179,7 +5286,7 @@ desktop-categories: dp_TR="${TR}" \ ${SH} ${SCRIPTSDIR}/desktop-categories.sh -.if defined(DESKTOP_ENTRIES) +. if defined(DESKTOP_ENTRIES) check-desktop-entries: @${SETENV} \ dp_CURDIR="${.CURDIR}" \ @@ -5194,10 +5301,10 @@ check-desktop-entries: 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}" \ @@ -5209,83 +5316,97 @@ install-desktop-entries: 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(PKGCONFIG_BASE) +. if !target(create-base-pkgconfig) +create-base-pkgconfig: ${PKGCONFIG_LINKDIR} +. for pcfile in ${PKGCONFIG_BASE:S/$/.pc/} + @if `test -f ${PKGCONFIG_BASEDIR}/${pcfile}`; then \ + ${RLN} ${PKGCONFIG_BASEDIR}/${pcfile} ${PKGCONFIG_LINKDIR}/${pcfile}; \ + else \ + ${ECHO_MSG} "===> Missing \"${pcfile}\" to create a link at \"${PKGCONFIG_LINKDIR}/${pcfile}\" "; \ + ${FALSE}; \ + fi +. 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} @@ -5310,7 +5431,7 @@ _SANITY_SEQ= 050:post-chroot 100:pre-everything \ 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 \ + 500:check-deprecated \ 550:check-vulnerable 600:check-license 650:check-config \ 700:buildanyway-message 750:options-message ${_USES_sanity} @@ -5335,7 +5456,7 @@ _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ ${_OPTIONS_patch} ${_USES_patch} _CONFIGURE_DEP= patch _CONFIGURE_SEQ= 150:build-depends 151:lib-depends 160:create-binary-alias \ - 161:create-binary-wrappers \ + 161:create-binary-wrappers 170:create-base-pkgconfig \ 200:configure-message 210:apply-slist \ 300:pre-configure 450:pre-configure-script \ 490:run-autotools-fixup 500:do-configure 700:post-configure \ @@ -5358,142 +5479,143 @@ _STAGE_SEQ= 050:stage-message 100:stage-dir 150:run-depends \ 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) + ${_OPTIONS_stage} ${_USES_stage} ${_FEATURES_stage} +. 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 \ + 150:identify-install-conflicts \ 200:check-already-installed \ 300:create-manifest _INSTALL_SUSEQ= 400:fake-pkg 500:security-check -_PACKAGE_DEP= stage +_PACKAGE_DEP= stage ${_TESTING_PACKAGE_DEP} _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 diff --git a/Mk/bsd.port.options.mk b/Mk/bsd.port.options.mk index af8e56dbb69a..41adf6065366 100644 --- a/Mk/bsd.port.options.mk +++ b/Mk/bsd.port.options.mk @@ -8,7 +8,6 @@ # <other work, including adjusting dependencies> # .include "bsd.port.post.mk" # -# Created by: Shaun Amott <shaun@inerd.com> OPTIONS_Include_MAINTAINER= portmgr@FreeBSD.org diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk index dbeea2d27cdb..d83379a52feb 100644 --- a/Mk/bsd.port.subdir.mk +++ b/Mk/bsd.port.subdir.mk @@ -51,6 +51,11 @@ MOVEDFILE?= MOVED # make -C /usr/ports/category/port/. .CURDIR:= ${.CURDIR:tA} +# Ensure .CURDIR doesn't contain a colon, which breaks makefile targets +.if ${.CURDIR:S/:/\:/g} != ${.CURDIR} +.error The current directory path contains ':', this is not supported +.endif + .include "${PORTSDIR}/Mk/bsd.commands.mk" .MAIN: all @@ -64,77 +69,75 @@ STRIP?= -s # 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) -UID!= ${ID} -u -.endif +UID?= ${.MAKE.UID} _EXPORTED_VARS+= UID .endif @@ -172,20 +175,20 @@ 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}; \ @@ -210,19 +213,19 @@ _SUBDIRUSE: .USE 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/} @@ -231,11 +234,11 @@ realinstall: beforeinstall ${SUBDIR:S/^/_/:S/$/.realinstall/} 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) @@ -262,24 +265,24 @@ checksubdir: .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 \ @@ -292,17 +295,37 @@ describe: ${ECHO_MSG} "===> ${DIRPRFX}$${sub} non-existent"; \ fi; \ done +. endif .endif -.endif + +# Store last subdir name +_LAST_DIR = ${SUBDIR:[-1]} +describe-json: + @${ECHO_MSG} "{" + @for sub in ${SUBDIR}; do \ + if ${TEST} -d ${.CURDIR}/$${sub}; then \ + cd ${.CURDIR}/$${sub}; \ + ${ECHO_MSG} "\"$${sub}\": " ;\ + ${MAKE} -B describe-json || \ + (${ECHO_CMD} "===> ${DIRPRFX}$${sub} failed" >&2; \ + exit 1) ;\ + if [ "$${sub}" != "${_LAST_DIR}" ]; then \ + (${ECHO_MSG} ",") ; \ + fi; \ + else \ + ${ECHO_MSG} "===> ${DIRPRFX}$${sub} non-existent"; \ + fi; \ + done + @${ECHO_MSG} "}" .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) @@ -320,14 +343,14 @@ README.html: @${ECHO_CMD} "===> Creating README.html" @> $@.tmp .for entry in ${SUBDIR} -.if exists(${entry}) -.if defined(PORTSTOP) +. if exists(${entry}) +. if defined(PORTSTOP) @${ECHO_CMD} -n '<a href="'${entry}/README.html'">'"`${ECHO_CMD} ${entry} | ${HTMLIFY}`"'</a>: ' >> $@.tmp -.else +. else @${ECHO_CMD} -n '<a href="'${entry}/README.html'">'"`cd ${entry}; ${MAKE} package-name | ${HTMLIFY}`</a>: " >> $@.tmp -.endif +. endif @${ECHO_CMD} `cd ${entry}; ${MAKE} -V COMMENT` | ${HTMLIFY} >> $@.tmp -.endif +. endif .endfor @${SORT} -t '>' +1 -2 $@.tmp > $@.tmp2 .if exists(${DESCR}) @@ -353,11 +376,11 @@ README.html: # 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 @@ -505,7 +528,7 @@ _PORTSEARCH= \ } \ }' ${MOVEDDIR}/${MOVEDFILE}; \ fi \ - fi + fi search: @${_PORTSEARCH} diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk index 1e7578ed2c3c..557b72a30509 100644 --- a/Mk/bsd.sanity.mk +++ b/Mk/bsd.sanity.mk @@ -4,12 +4,12 @@ # 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 \ @@ -35,31 +35,32 @@ PYTHON2_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION 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 defined(DEVELOPER) .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 @@ -105,9 +106,9 @@ DEV_ERROR+= "All LIB_DEPENDS should use the new format and start out with lib. .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" @@ -115,9 +116,9 @@ DEV_WARNING+= "Please set LICENSE for this port" .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" @@ -126,25 +127,25 @@ DEV_ERROR+= "USE_PYDISTUTILS=easy_install is no longer supported, please use USE .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 @@ -160,6 +161,10 @@ DEV_ERROR+= "USE_TCL and USE_TK are no longer supported, please use USES=tcl or DEV_ERROR+= "USE_FPC=yes is no longer supported, please use USES=fpc" .endif +.if ! empty(USES:Mruby) && ! empty(USES:Mgem) +DEV_ERROR= "'USES=gem' implies 'USES=ruby'. You should not specify both of them" +.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." @@ -202,11 +207,13 @@ SANITY_UNSUPPORTED= USE_OPENAL USE_FAM USE_MAKESELF USE_ZIP USE_LHA USE_CMAKE \ 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 + XORG_CAT CARGO_USE_GITHUB CARGO_USE_GITLAB CARGO_GIT_SUBDIR \ + USE_RUBY USE_RUBY_EXTCONF USE_RUBY_SETUP RUBY_NO_BUILD_DEPENDS \ + RUBY_NO_RUN_DEPENDS USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN \ + USE_OPENLDAP WANT_OPENLDAP_VER SANITY_DEPRECATED= MLINKS \ USE_MYSQL WANT_MYSQL_VER \ - PYDISTUTILS_INSTALLNOSINGLE \ - USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN + PYDISTUTILS_INSTALLNOSINGLE SANITY_NOTNEEDED= CMAKE_NINJA WX_UNICODE USE_KDEBASE_VER \ USE_KDELIBS_VER USE_QT_VER @@ -238,6 +245,7 @@ USE_SCONS_ALT= USES=scons USE_DRUPAL_ALT= USES=drupal USE_PYDISTUTILS_ALT= USE_PYTHON=distutils USE_PGSQL_ALT= USES=pgsql +USE_OPENLDAP_ALT= USES=ldap INSTALLS_SHLIB_ALT= USE_LDCONFIG NEED_ROOT_ALT= USES=fakeroot or USES=uidfix PYTHON_CONCURRENT_INSTALL_ALT= USE_PYTHON=concurrent @@ -256,6 +264,7 @@ 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} +WANT_OPENLDAP_VER_ALT= USES=ldap:${WANT_OPENLDAP_VER} USE_OPENSSL_ALT= USES=ssl USE_PHPIZE_ALT= USES=php:phpize USE_PHPEXT_ALT= USES=php:ext @@ -293,21 +302,28 @@ 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\) +USE_RUBY_ALT= USES=ruby +USE_RUBY_EXTCONF_ALT= USES=ruby:extconf +USE_RUBY_SETUP_ALT= USES=ruby:setup +RUBY_NO_BUILD_DEPENDS_ALT= USES=ruby:run +RUBY_NO_RUN_DEPENDS_ALT= USES=ruby:build .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 + +.endif # defined(DEVELOPER) diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk index ac66be4d02e8..25019117c79a 100644 --- a/Mk/bsd.sites.mk +++ b/Mk/bsd.sites.mk @@ -47,15 +47,12 @@ MASTER_SITE_AFTERSTEP+= \ .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%/ + http://miroir.univ-lorraine.fr/apache/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_APACHE_COMMONS_BINARIES) @@ -93,12 +90,6 @@ 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%/ \ @@ -111,13 +102,10 @@ 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 @@ -130,41 +118,11 @@ 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%/ +MASTER_SITE_DEBIAN+= http://deb.debian.org/debian/%SUBDIR%/ +. for country in am au at by be br bg ca cl cn hr cz dk fi fr de hk hu is it \ + jp kr lt md nl nc nz no pl pt ru sk si es se ch tw uk us +MASTER_SITE_DEBIAN+= http://ftp.${country}.debian.org/debian/%SUBDIR%/ +. endfor .endif .if !defined(IGNORE_MASTER_SITE_DEBIAN_POOL) @@ -172,78 +130,41 @@ 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%/ + https://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/%SUBDIR%/ .endif +# List: https://www.exim.org/mirmon/ftp_mirrors.html .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%/ + https://exim.mirror.globo.tech/exim/%SUBDIR%/ \ + https://mirror.easyname.at/exim-ftp/exim/%SUBDIR%/ \ + https://www.mirrorservice.org/sites/ftp.exim.org/pub/exim/%SUBDIR%/ \ + https://exim.mirror.iphh.net/ftp/exim/%SUBDIR%/ \ + http://ftp.carnet.hr/misc/exim/exim/%SUBDIR%/ \ + http://ftp.kaist.ac.kr/exim/exim/%SUBDIR%/ \ + http://sunsite.icm.edu.pl/pub/unix/mail/exim/exim/%SUBDIR%/ \ + https://ftp.exim.org/pub/exim/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_CENTOS_LINUX) MASTER_SITE_CENTOS_LINUX+= \ - http://mirror.centos.org/%SUBDIR%/:DEFAULT,amd64,i386 \ - http://vault.centos.org/%SUBDIR%/:DEFAULT,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 + 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_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%/ @@ -257,7 +178,6 @@ MASTER_SITE_FESTIVAL+= \ .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 @@ -270,7 +190,7 @@ MASTER_SITE_FESTIVAL_OGI+= \ # .if !defined(IGNORE_MASTER_SITE_FREEBSD_ORG) MASTER_SITE_FREEBSD_ORG+= \ - https://download.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ + https://download.FreeBSD.org/%SUBDIR%/ \ ftp://ftp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.se.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/%SUBDIR%/ \ @@ -281,60 +201,32 @@ MASTER_SITE_FREEBSD_ORG+= \ .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%/ + ftp://ftp12.frugalware.org/mirrors/ftp.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%/ + https://ftp.funet.fi/pub/mirrors/sourceware.org/pub/gcc/%SUBDIR%/ \ + https://ftp.mpi-inf.mpg.de/pub/gnu/mirror/gcc.gnu.org/pub/gcc/%SUBDIR%/ \ + https://mirrorservice.org/sites/sourceware.org/pub/gcc/%SUBDIR%/ \ + http://mirror.koddos.net/gcc/%SUBDIR%/ \ + http://ftp.ntua.gr/pub/gnu/gcc/%SUBDIR%/ \ + http://gcc.gnu.org/pub/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%/ + https://mirror.leaseweb.com/gentoo/%SUBDIR%/ \ + https://mirror.rackspace.com/gentoo/%SUBDIR%/ \ + https://mirror.init7.net/gentoo/%SUBDIR%/ \ + https://mirrors.rit.edu/gentoo/%SUBDIR%/ \ + http://ftp.iij.ad.jp/pub/linux/gentoo/%SUBDIR%/ \ + http://ftp.belnet.be/pub/rsync.gentoo.org/gentoo/%SUBDIR%/ \ + http://ftp.uni-hannover.de/gentoo/%SUBDIR%/ \ + http://gentoo-mirror.flux.utah.edu/%SUBDIR%/ .endif # Keep this before USE_GITHUB @@ -363,35 +255,35 @@ DEV_WARNING+= "MASTER_SITES contains ${MASTER_SITES:M*/github.com/*/archive/*}, # # 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_]" + @${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} @@ -401,41 +293,41 @@ 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. @@ -444,13 +336,13 @@ _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} @@ -459,20 +351,20 @@ 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} @@ -486,7 +378,7 @@ DISTFILE_${_group}:= ${DISTNAME_${_group}}_GH${_GITHUB_REV}${_GITHUB_EXTRACT_SUF 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. @@ -496,18 +388,28 @@ post-extract-gh-${_group}: @${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) +WWW?= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/ +. endif # defined(USE_GITHUB) .endif # !defined(IGNORE_MASTER_SITE_GITHUB) +# Keep this before USE_GITLAB +# first try to detect when fetch was called by makesum, which passes +# MASTER_SITES and would cause a bogus warning here. +.if !(make(fetch) && !empty(NO_CHECKSUM) && !empty(DISABLE_SIZE)) +. if !empty(MASTER_SITES:M*//*/*/*/-/archive/${DISTVERSIONFULL}/) +DEV_WARNING+= "MASTER_SITES contains ${MASTER_SITES:M*//*/*/*/-/archive/${DISTVERSIONFULL}/}, please use USE_GITLAB instead." +. endif +.endif + .if !defined(IGNORE_MASTER_SITE_GITLAB) # # In order to use GitLab your port must define USE_GITLAB and the following @@ -522,145 +424,160 @@ convert-to-gh-tuple: # 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_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 GL_TAGNAME= GIT_HASH to do a snapshot. +# default: ${DISTVERSIONFULL} # # 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] +# GL_TUPLE - above shortened to [site[:port][/webroot]:]account:project:tagname: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_TAGNAME) && defined(GL_COMMIT) +GL_TAGNAME= ${GL_COMMIT} +DEV_WARNING+= "GL_COMMIT is deprecated, please use GL_TAGNAME instead" +. endif +. if defined(GL_TUPLE) +. for _tuple in ${GL_TUPLE} +. if ${_tuple:C@^(([^:]*://[^:/]*(:[0-9]{1,5})?(/[^:]*[^/])?:)?)([^:]*):([^:]*):([^:]*)(:[^:/]*)((/.*)?)@\7@:S/^://:C/[a-zA-Z0-9_.+-]//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]" + @${ECHO_MSG} "GL_TUPLE is improperly formatted or, the tagname" + @${ECHO_MSG} "section contains something other than [a-zA-Z0-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_TAGNAME+= ${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) -MASTER_SITES+= ${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/archive/${GL_COMMIT}.tar.gz?dummy=/ -. endif +. if empty(USE_GITLAB:Mnodefault) +MASTER_SITES+= ${GL_SITE}/${GL_ACCOUNT}/${GL_PROJECT}/-/archive/${GL_TAGNAME:C@^[a-f0-9]{40}$@\0.tar.gz?dummy=@}/ +. 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} +GL_TAGNAME_DEFAULT= ${DISTVERSIONFULL} +GL_TAGNAME?= ${GL_TAGNAME_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_TAGNAME 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_TAGNAME:= ${GL_TAGNAME_DEFAULT} GL_SUBDIR:= ${GL_SUBDIR_DEFAULT} _GITLAB_REV= 0 -_GITLAB_EXTRACT_SUFX= .tar.gz +_GITLAB_EXTRACT_SUFX= .tar.gz +_GITLAB_TAG_EXTRACT_SUFX= .tar.bz2 _GITLAB_CLONE_DIR?= ${WRKDIR}/git-clone _PORTS_DIRECTORIES+= ${_GITLAB_CLONE_DIR} -. if !${USE_GITLAB:Mnodefault} -DISTNAME:= ${GL_ACCOUNT}-${GL_PROJECT}-${GL_COMMIT}_GL${_GITLAB_REV} +. if !${USE_GITLAB:Mnodefault} +. if ${GL_TAGNAME:C/^[a-f0-9]{40}$//} +DISTNAME:= ${GL_PROJECT}-${GL_TAGNAME} +DISTFILES+= ${DISTNAME}${_GITLAB_TAG_EXTRACT_SUFX} +. else +DISTNAME:= ${GL_ACCOUNT}-${GL_PROJECT}-${GL_TAGNAME}_GL${_GITLAB_REV} DISTFILES+= ${DISTNAME}${_GITLAB_EXTRACT_SUFX} +. endif 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} +_GL_TUPLE_OUT:= ${_GL_TUPLE_OUT} ${GL_SITE_${_group}}:${GL_ACCOUNT_${_group}}:${GL_PROJECT_${_group}}:${GL_TAGNAME_${_group}}:${_group}/${GL_SUBDIR_${_group}} +. if ${GL_TAGNAME_${_group}:C/^[a-f0-9]{40}$//} +DISTNAME_${_group}:= ${GL_PROJECT_${_group}}-${GL_TAGNAME_${_group}} +DISTFILE_${_group}:= ${DISTNAME_${_group}}${_GITLAB_TAG_EXTRACT_SUFX} +MASTER_SITES:= ${MASTER_SITES} ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}/-/archive/${GL_TAGNAME_${_group}}/:${_group} +. else +DISTNAME_${_group}:= ${GL_ACCOUNT_${_group}}-${GL_PROJECT_${_group}}-${GL_TAGNAME_${_group}}_GL${_GITLAB_REV} DISTFILE_${_group}:= ${DISTNAME_${_group}}${_GITLAB_EXTRACT_SUFX} +MASTER_SITES:= ${MASTER_SITES} ${GL_SITE_${_group}}/${GL_ACCOUNT_${_group}}/${GL_PROJECT_${_group}}/-/archive/${GL_TAGNAME_${_group}}.tar.gz?dummy=/:${_group} +. endif 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}) +WRKSRC_${_group}:= ${WRKDIR}/${GL_PROJECT_${_group}}-${GL_TAGNAME_${_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 +WWW?= https://gitlab.com/${GL_ACCOUNT}/${GL_PROJECT}/ +. 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%/ \ + http://ftp.belnet.be/mirror/ftp.gnome.org/gnomeftp/%SUBDIR%/ \ + ftp://ftp.belnet.be/mirror/ftp.gnome.org/gnomeftp/%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%/ + ftp://ftp.nara.wide.ad.jp/pub/X11/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 @@ -673,7 +590,6 @@ MASTER_SITE_GNU+= \ 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%/ \ @@ -681,19 +597,14 @@ MASTER_SITE_GNU+= \ https://ftp.gnu.org/gnu/%SUBDIR%/ .endif +# List: https://gnupg.org/download/mirrors.html (contains stale information) .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://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/%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%/ + http://www.ring.gr.jp/pub/net/gnupg/%SUBDIR%/ \ + https://gnupg.org/ftp/gcrypt/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_GNUSTEP) @@ -718,20 +629,10 @@ MASTER_SITE_GNU_ALPHA+= \ 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%/ +.if !defined(IGNORE_MASTER_SITE_HACKAGE) +MASTER_SITE_HACKAGE+= \ + https://hackage.haskell.org/package/ \ + http://hackage.haskell.org/package/ .endif .if !defined(IGNORE_MASTER_SITE_IDSOFTWARE) @@ -764,46 +665,9 @@ MASTER_SITE_ISC+= \ 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%/ + https://download.kde.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_LIBREOFFICE_DEV) @@ -818,16 +682,7 @@ MASTER_SITE_MATE+= \ .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%/ + http://mirrors.ibiblio.org/mozdev.org/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_MOZILLA) @@ -838,7 +693,6 @@ MASTER_SITE_MOZILLA+= \ .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 @@ -846,11 +700,7 @@ MASTER_SITE_MOZILLA_ADDONS+= \ 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%/ + https://dev.mysql.com/get/Downloads/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_NETBSD) @@ -866,8 +716,6 @@ MASTER_SITE_NETBSD+= \ .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 @@ -878,7 +726,7 @@ MASTER_SITE_NVIDIA+= \ http://us.download.nvidia.com/%SUBDIR%/ \ https://tw.download.nvidia.com/%SUBDIR%/ \ http://download.nvidia.com/%SUBDIR%/ \ - https://download1.nvidia.com/%SUBDIR%/ \ + https://http.download.nvidia.com/%SUBDIR%/ \ ftp://download.nvidia.com/%SUBDIR%/ \ ftp://download1.nvidia.com/%SUBDIR%/ .endif @@ -886,11 +734,11 @@ MASTER_SITE_NVIDIA+= \ .if !defined(IGNORE_MASTER_SITE_OPENBSD) MASTER_SITE_OPENBSD+= \ https://cdn.openbsd.org/pub/OpenBSD/%SUBDIR%/ \ + https://cloudflare.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://ftp.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 @@ -919,14 +767,13 @@ FETCH_ARGS+= --user-agent=curl/7.68.0 .if !defined(IGNORE_MASTER_SITE_OSSP) MASTER_SITE_OSSP+= \ - ftp://ftp.ossp.org/pkg/%SUBDIR%/ \ + http://ftp.ntua.gr/pub/utils/ossp/%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%/ + https://dl.packetstormsecurity.net/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_PERL_CPAN) @@ -953,12 +800,12 @@ MASTER_SITE_PERL_CPAN_BY+= \ _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 @@ -970,9 +817,18 @@ 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/%SUBDIR%/ + https://www.php.net/distributions/ \ + https://raw.githubusercontent.com/php/web-php-distributions/master/ +.endif + +.if !defined(IGNORE_MASTER_SITE_PYPI) +MASTER_SITE_PYPI+= \ + https://files.pythonhosted.org/packages/%SUBDIR%/ \ + https://pypi.org/packages/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_PYTHON) @@ -984,10 +840,7 @@ MASTER_SITE_PYTHON+= \ 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 @@ -998,21 +851,9 @@ MASTER_SITE_QT+= \ 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%/ \ @@ -1032,34 +873,40 @@ MASTER_SITE_SAMBA+= \ https://ftp.samba.org/pub/%SUBDIR%/ .endif -# List: https://download.savannah.gnu.org/mirmon/ +# List: https://download-mirror.savannah.gnu.org/releases/00_MIRRORS.html .if !defined(IGNORE_MASTER_SITE_SAVANNAH) MASTER_SITE_SAVANNAH+= \ https://download.savannah.gnu.org/releases/%SUBDIR%/ \ - https://download-mirror.savannah.gnu.org/releases/%SUBDIR%/ \ + https://nongnu.uib.no/%SUBDIR%/ \ + https://mirror.kumi.systems/nongnu/%SUBDIR%/ \ + https://mirrors.up.pt/pub/nongnu/%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%/ + http://mirror.netcologne.de/savannah/%SUBDIR%/ \ + http://mirror.csclub.uwaterloo.ca/nongnu/%SUBDIR%/ \ + http://mirror.easyname.at/nongnu/%SUBDIR%/ \ + https://download-mirror.savannah.gnu.org/releases/%SUBDIR%/ .endif # List: https://sourceforge.net/p/forge/documentation/Mirrors/ -# Updated: 2017-03-13 +# Updated: 2022-11-26 .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 \ - netcologne netix superb-dca2 superb-sea2 ufpr vorboss +. for m in cfhcable cytranet deac-ams deac-fra deac-riga excellmedia \ + freefr gigenet ixpeering jaist kumisystems liquidtelecom \ + nchc netactuate netcologne netix onboardcloud phoenixnap \ + razaoinfo sinalbr sitsa tenet udomain ufpr versaweb 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%/ + https://ftp-stud.hs-esslingen.de/pub/Mirrors/sourceware.org/%SUBDIR%/ \ + https://ftp.funet.fi/pub/mirrors/sourceware.org/pub/%SUBDIR%/ \ + https://mirrorservice.org/sites/sourceware.org/pub/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_SUDO) @@ -1109,62 +956,52 @@ MASTER_SITE_TCLTK+= \ ftp://ftp.funet.fi/pub/languages/tcl/tcl/%SUBDIR%/ .endif +.if !defined(IGNORE_MASTER_SITE_TEX) +MASTER_SITE_TEX+= \ + https://mirror.ctan.org/%SUBDIR%/ +.endif + .if !defined(IGNORE_MASTER_SITE_TEX_CTAN) MASTER_SITE_TEX_CTAN+= \ - http://ctan.unsw.edu.au/%SUBDIR%/ \ - ftp://ftp.kddlabs.co.jp/CTAN/%SUBDIR%/ \ - ftp://ctan.tug.org/tex-archive/%SUBDIR%/ \ - ftp://ftp.dante.de/tex-archive/%SUBDIR%/ \ - ftp://mirror.macomnet.net/pub/CTAN/%SUBDIR%/ \ - ftp://ftp.funet.fi/pub/TeX/CTAN/%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%/ \ + https://ftp.math.utah.edu/pub/tex/historic/%SUBDIR%/ .endif # Derived from: https://www.torproject.org/getinvolved/mirrors.html.en +# Please do not blindly follow and add URLs from the above list .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://cyberside.net.ee/sibul/dist/%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%/ + http://www.torproject.us/dist/%SUBDIR%/ .endif .if !defined(IGNORE_MASTER_SITE_WINDOWMAKER) @@ -1186,8 +1023,7 @@ MASTER_SITE_XFCE+= \ 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}/ + https://archive.al-us.xfce.org/src/%SUBDIR%/${_XFCE_PATH}/ .endif .if !defined(IGNORE_MASTER_SITE_XORG) @@ -1196,13 +1032,10 @@ MASTER_SITE_XORG+= \ 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 @@ -1210,7 +1043,6 @@ MASTER_SITE_XORG+= \ 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%/ \ @@ -1221,6 +1053,7 @@ MASTER_SITE_KERNEL_ORG+= \ .if !defined(IGNORE_MASTER_SITE_ZI) MASTER_SITE_ZI+= \ + https://ftpmirror.your.org/pub/zi/%SUBDIR%/ \ https://mirrors.rit.edu/zi/%SUBDIR%/ \ https://www.zi0r.com/mirrors/%SUBDIR%/ \ ${MASTER_SITE_LOCAL:S/%SUBDIR%/zi/} @@ -1239,7 +1072,6 @@ 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} \ @@ -1253,12 +1085,12 @@ MASTER_SITES_SUBDIRS= APACHE_COMMONS_BINARIES:${PORTNAME:S,commons-,,} \ 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/-.*//} \ + PYPI:source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:S/-${DISTVERSIONFULL}$//} \ QT:archive/qt/${PORTVERSION:R} \ SAMBA:${PORTNAME} \ SAVANNAH:${PORTNAME:tl} \ @@ -1267,86 +1099,86 @@ MASTER_SITES_SUBDIRS= APACHE_COMMONS_BINARIES:${PORTNAME:S,commons-,,} \ .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.wx.mk b/Mk/bsd.wx.mk index e3729cd0d744..a036ce1284c0 100644 --- a/Mk/bsd.wx.mk +++ b/Mk/bsd.wx.mk @@ -1,6 +1,5 @@ # bsd.wx.mk - Support for wxWidgets based ports. # -# Created by: Alejandro Pulver <alepulver@FreeBSD.org> # # The following variables can be defined in a port that uses the wxWidgets # library, contributed libraries, WxPython and/or more wxWidgets related @@ -12,9 +11,9 @@ # 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"). +# - Range of versions (e.g. "3.0-3.2"). Must be ascending. +# - Partial range: single version and upper (e.g. "3.2+"). +# - Partial range: single version and lower (e.g. "-3.2"). # 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 @@ -27,7 +26,6 @@ # 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. @@ -50,14 +48,14 @@ # 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). +# "component-version" pairs (e.g. wx-3.0, 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 +# 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 @@ -73,26 +71,26 @@ # 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. +# - A port that needs wxWidgets 3.0 +# USE_WX= 3.0 +# WX_COMPS= wx +# - A port that needs WxPython 3.0 for running. # USE_PYTHON= yes -# USE_WX= 2.8 +# USE_WX= 3.0 # WX_COMPS= python:run -# - A port that needs WxPython 2.8 or 3.0 for building. +# - A port that needs WxPython 3.0 or 3.2 for building. # USE_PYTHON= yes -# USE_WX= 2.8 3.0 +# USE_WX= 3.0 3.2 # WX_COMPS= python:build -# - A port that needs wxWidgets version 2.8 or higher and contributed +# - A port that needs wxWidgets version 3.0 or higher # 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 +# USE_WX= 3.0+ +# WX_COMPS= wx +# - A port that needs wxWidgets of any version other than 3.0. +# USE_WX_NOT= 3.0 # -WX_Include_MAINTAINER= ports@FreeBSD.org +WX_Include_MAINTAINER= desktop@FreeBSD.org # # Global definitions. @@ -110,11 +108,11 @@ _WX_Definitions_Done= yes # _WX_VERS_LISTS - Reverse lists preference order. # -_WX_COMPS_ALL= wx contrib python +_WX_COMPS_ALL= wx 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_ALL= 3.0 3.2 +_WX_VERS_UC_ALL= 3.0 3.2 +_WX_VERS_SKIP= 3.0 3.2 _WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED # @@ -126,41 +124,34 @@ _WX_VERS_LISTS= WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED # _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.0= x11-toolkits/py-wxPython40@${PY_FLAVOR} -_WX_FILE_python_3.0= ${PYTHON_SITELIBDIR}/wx/__init__.py +_WX_PORT_python_3.2= x11-toolkits/py-wxPython4@${PY_FLAVOR} +_WX_FILE_python_3.2= ${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 +# wxgtk 3.2 +_WX_PORT_wx_3.2= x11-toolkits/wxgtk32 +_WX_LIB_wx_3.2= wx_baseu-3.2 # 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 # @@ -200,33 +191,33 @@ _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. @@ -259,19 +250,19 @@ _WX_Version_Done= yes # 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). @@ -290,69 +281,69 @@ USE_WX_NOT?= # # _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. @@ -361,11 +352,11 @@ IGNORE?= selected wxWidgets versions (${_WX_WRONG_VERS}) which do not have the # 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. @@ -375,11 +366,11 @@ _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. @@ -393,28 +384,26 @@ _WX_VER_INSTALLED:= ${_WX_VER_INSTALLED:N${ver}} # 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.2 _GTKVER= 3 -.elif ${_WX_VER} == 3.0 +. elif ${_WX_VER} == 3.0 _GTKVER= ${WANT_WXGTK_VER:U3} _GTKFLAVOR= gtk${_GTKVER} -.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} @@ -445,33 +434,33 @@ 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. # @@ -479,23 +468,23 @@ _WX_COMPS_FINAL+= ${newcomp} # _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. @@ -504,15 +493,15 @@ ${_WX_DEP_TYPE:tu}_DEPENDS+= ${_WX_FILE_${comp_part}_${_WX_VER}}:${_WX_PORT_${co 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 |