summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-17 00:36:47 +0000
committerSam James <sam@gentoo.org>2021-12-17 00:37:45 +0000
commit160b1d4031074c5d4d49c42c9a07056c9b4b8617 (patch)
treef8f74522a923fbe54d9b114d0efc54094fe71caf /eclass
parentdev-util/patchelf: Drop old 0.12 (diff)
downloadgentoo-160b1d4031074c5d4d49c42c9a07056c9b4b8617.tar.gz
gentoo-160b1d4031074c5d4d49c42c9a07056c9b4b8617.tar.bz2
gentoo-160b1d4031074c5d4d49c42c9a07056c9b4b8617.zip
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 <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/dune.eclass4
1 files changed, 3 insertions, 1 deletions
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}"