From nobody Mon Aug 21 14:24:26 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RTvqv1K33z4qrJ5; Mon, 21 Aug 2023 14:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RTvqv0rKFz3fdW; Mon, 21 Aug 2023 14:24:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692627867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yRulLpeIxFpb2JXEztdGKPza/kMTPBMB5ylZeniCMw=; b=rDnhhNwjUSu8cRlQw8SHA0WudydKb3BsRIilOhugEiJyoVkN/a2wwiL6GqdcYX/MZxSEKX xTH2qqpaUQxJZ/M2gP8d2fW3bT1TotPQqXyhDOHFWe+B5Nk5s92J5aqve2QsWgZruad2rS 7btRhX+DFfl2vI/LP6rhmbr+KnOkTwMHNYQs3zmi35rR7rxXMxmuV7OKGuiixxdwTmrRgL f2wJ+Eacieh+b8E2JPqsfrJtE3FGkwweQzPJqC6OmHljNR7YlGGuVqA3k5b8dHpKihwCdJ i88aG49bHY7ItF8CG0tXRfyBa4LLJRhkb1pvXMn0VtGSi4mDyHbKwocioRR0pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692627867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2yRulLpeIxFpb2JXEztdGKPza/kMTPBMB5ylZeniCMw=; b=lIWbIAZMcKAsPz7VpNpfw6g9yFfuLO12Y9T/aKRcWXnHZibAZMOmKSZ0QmYzTn/FZx6+s3 U3WscslGT/mlYdG6guCc/S0nhYERE9wESCunygwl1h7Um0d9mkzf4hJLxzeS5GuxIFLtWz OdExaye8ShQ8jQmeUuLKs6r+xIvlW57g18NjyIF8uhTp9sQ6yTlQlRQfthkCYvNUo/g2r4 hO9yWHCXS9IiphUUiwrs7S13wgxSm3atZfCRlyfAXWxVsSR26mXPJ6FwyfwCigTiy19ZO7 x1TJLfIVr5Pz8ANs/yFdOoCvtz3CWtunxBWPCiNhmW19VSjx3eAj2bf4w2z94A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692627867; a=rsa-sha256; cv=none; b=Se4pk9zXgkSfkjVrlUUcbjFHG/IMoN8DzSYdXz86rtfFHjUgmVl3HPLYFujelUplNEJLvG 2CXugSmhEd6xLsD6HhspyEKizOAG3xcOMvG7tYrPPLV8KS4cqWIFUe3os2P91MpBM9u50c g+dGxKevVj8KVV60F7dY+CcPydRlPphlgUvRfJJJ8115EpFi+O8z0kauHGHnYaIzUUzGwt 5TRkg8PJRiekibqsIywg9eEas+k4RnWnzhCSpjj2MlB1b/u3FN3nkZ+ekdrTzpVzU/H6zy 1lq8Qha8bSHhZ7dhfrZXxxwmDvvLV5qrOqgmYr0Cs18XuACcoaJga4a/jBq7Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RTvqt71mQz8HN; Mon, 21 Aug 2023 14:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37LEOQc9014121; Mon, 21 Aug 2023 14:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37LEOQli014118; Mon, 21 Aug 2023 14:24:26 GMT (envelope-from git) Date: Mon, 21 Aug 2023 14:24:26 GMT Message-Id: <202308211424.37LEOQli014118@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: 3b2ff2ef194c - main - Mk: Add Uses/ebur128.mk List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b2ff2ef194c83835fe7dc6618427b8fd50ea31d Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=3b2ff2ef194c83835fe7dc6618427b8fd50ea31d commit 3b2ff2ef194c83835fe7dc6618427b8fd50ea31d Author: Jason E. Hale AuthorDate: 2023-08-21 13:57:29 +0000 Commit: Jason E. Hale CommitDate: 2023-08-21 14:24:20 +0000 Mk: Add Uses/ebur128.mk Handles dependencies for the chosen implementation of libebur128 set via DEFAULT_VERSIONS: audio/libebur128 (legacy) and audio/ebur128 (rust). PR: 272843 --- CHANGES | 19 ++++++++++++++++ Mk/Uses/ebur128.mk | 55 ++++++++++++++++++++++++++++++++++++++++++++++ Mk/bsd.default-versions.mk | 8 ++++++- 3 files changed, 81 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 3a28ea34e815..2f6c9a61499d 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,25 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20230821: +AUTHOR: jhale@FreeBSD.org + + A new uses 'ebur128' has been added to transparently depend on the + proper variant of 'rust' or 'legacy' depending on the default version + set by the user. + + Usage: USES=ebur128:ARGS + Valid ARGS: , build, lib, run, test + : (default) same as lib + build: add BUILD_DEPENDS + lib: add LIB_DEPENDS + run: add RUN_DEPENDS + test: add TEST_DEPENDS + + If you prefer not to use rust, add the following to your make.conf: + + DEFAULT_VERSIONS+=ebur128=legacy + 20230728: AUTHOR: andrew@tao11.riddles.org.uk, fuz@FreeBSD.org 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: , build, lib, run, test +# : (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/bsd.default-versions.mk b/Mk/bsd.default-versions.mk index 93c4c1a5cd28..ad9011da03a5 100644 --- a/Mk/bsd.default-versions.mk +++ b/Mk/bsd.default-versions.mk @@ -17,7 +17,7 @@ _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes LOCALBASE?= /usr/local -. for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC \ +. 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 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH @@ -38,6 +38,12 @@ APACHE_DEFAULT?= 2.4 BDB_DEFAULT?= 5 # Possible values: 2, 3 COROSYNC_DEFAULT?= 2 +# 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: 3.0, 4.0