Skip to content

Commit

Permalink
dune.eclass: fix default value of DUNE_PKG_NAME
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thesamesam committed Dec 17, 2021
1 parent 3aa4051 commit 160b1d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eclass/dune.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;;
Expand Down Expand Up @@ -66,13 +66,15 @@ dune_src_test() {
# @CODE
dune-install() {
local -a pkgs=( "${@}" )

[[ ${#pkgs[@]} -eq 0 ]] && pkgs=( "${DUNE_PKG_NAME}" )

local -a myduneopts=(
--prefix="${ED%/}/usr"
--libdir="${D%/}$(ocamlc -where)"
--mandir="${ED%/}/usr/share/man"
)

local pkg
for pkg in "${pkgs[@]}" ; do
ebegin "Installing ${pkg}"
Expand Down

0 comments on commit 160b1d4

Please sign in to comment.