mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 12:03:02 -04:00
dev-ml/ezjsonm: use dune.eclass functions
Simplify the ebuild, by introducing OCAML_SUBPACKAGES and use dune-compile and dune-install from dune.eclass that accept a list of packages. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 2025 Gentoo Authors
|
||||
# Copyright 2025-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -26,21 +26,23 @@ RDEPEND="${DEPEND}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
OCAML_SUBPACKAGES=(
|
||||
ezjsonm
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
use lwt && OCAML_SUBPACKAGES+=( ezjsonm-lwt )
|
||||
|
||||
# test libs and binaries are built unconditionally otherwise
|
||||
rm lib_test/dune
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local pkgs="ezjsonm"
|
||||
if use lwt ; then
|
||||
pkgs="${pkgs},ezjsonm-lwt"
|
||||
fi
|
||||
dune build --only-packages "${pkgs}" -j $(makeopts_jobs) --profile release || die
|
||||
dune-compile ${OCAML_SUBPACKAGES[@]}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dune_src_install ezjsonm
|
||||
use lwt && dune_src_install ezjsonm-lwt
|
||||
dune-install ${OCAML_SUBPACKAGES[@]}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user