Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Aug 2023 16:41:56 +0200
From:      Yuri <yuri@aetern.org>
To:        "Jason E. Hale" <jhale@FreeBSD.org>, ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: 3b2ff2ef194c - main - Mk: Add Uses/ebur128.mk
Message-ID:  <e2dd2f13-eda2-48c6-942b-9df81fe7302c@aetern.org>
In-Reply-To: <202308211424.37LEOQli014118@gitrepo.freebsd.org>
References:  <202308211424.37LEOQli014118@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Jason E. Hale wrote:
> The branch main has been updated by jhale:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=3b2ff2ef194c83835fe7dc6618427b8fd50ea31d
> 
> commit 3b2ff2ef194c83835fe7dc6618427b8fd50ea31d
> Author:     Jason E. Hale <jhale@FreeBSD.org>
> AuthorDate: 2023-08-21 13:57:29 +0000
> Commit:     Jason E. Hale <jhale@FreeBSD.org>
> 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:	<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

Are these '+' at the start of the line intended?

> +.  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
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e2dd2f13-eda2-48c6-942b-9df81fe7302c>