From 160b1d4031074c5d4d49c42c9a07056c9b4b8617 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 17 Dec 2021 00:36:47 +0000 Subject: dune.eclass: fix default value of DUNE_PKG_NAME We need to use :=, not :-, because we want to reassign DUNE_PKG_NAME, not just return the new value. Closes: https://bugs.gentoo.org/829199 Closes: https://bugs.gentoo.org/829299 Closes: https://bugs.gentoo.org/829327 Signed-off-by: Sam James --- eclass/dune.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'eclass/dune.eclass') diff --git a/eclass/dune.eclass b/eclass/dune.eclass index 69aad36921b9..4653db3ae791 100644 --- a/eclass/dune.eclass +++ b/eclass/dune.eclass @@ -19,7 +19,7 @@ # @DESCRIPTION: # Sets the actual Dune package name, if different from Gentoo package name. # Set before inheriting the eclass. -: ${DUNE_PKG_NAME:-${PN}} +: ${DUNE_PKG_NAME:=${PN}} case ${EAPI:-0} in 6|7|8) ;; @@ -66,6 +66,7 @@ dune_src_test() { # @CODE dune-install() { local -a pkgs=( "${@}" ) + [[ ${#pkgs[@]} -eq 0 ]] && pkgs=( "${DUNE_PKG_NAME}" ) local -a myduneopts=( @@ -73,6 +74,7 @@ dune-install() { --libdir="${D%/}$(ocamlc -where)" --mandir="${ED%/}/usr/share/man" ) + local pkg for pkg in "${pkgs[@]}" ; do ebegin "Installing ${pkg}" -- cgit v1.2.3-65-gdbad