diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2023-08-21 13:57:29 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2023-08-21 14:24:20 +0000 |
commit | 3b2ff2ef194c83835fe7dc6618427b8fd50ea31d (patch) | |
tree | c504987094f991f628e27ba6f0460c78d2153fc1 | |
parent | 944e00e9f40f573dc08548e56398332475746a44 (diff) | |
download | ports-3b2ff2ef194c83835fe7dc6618427b8fd50ea31d.tar.gz ports-3b2ff2ef194c83835fe7dc6618427b8fd50ea31d.zip |
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
-rw-r--r-- | CHANGES | 19 | ||||
-rw-r--r-- | Mk/Uses/ebur128.mk | 55 | ||||
-rw-r--r-- | Mk/bsd.default-versions.mk | 8 |
3 files changed, 81 insertions, 1 deletions
@@ -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: <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 + + 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: <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/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 |