From 10c7b304ef5654bc11b09783ec487532eb5ceab2 Mon Sep 17 00:00:00 2001 From: Thomas Bracht Laumann Jespersen Date: Sun, 17 May 2026 07:49:49 +0200 Subject: [PATCH] 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 --- dev-ml/ezjsonm/ezjsonm-1.3.0.ebuild | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dev-ml/ezjsonm/ezjsonm-1.3.0.ebuild b/dev-ml/ezjsonm/ezjsonm-1.3.0.ebuild index b7af6b01f1..056832148b 100644 --- a/dev-ml/ezjsonm/ezjsonm-1.3.0.ebuild +++ b/dev-ml/ezjsonm/ezjsonm-1.3.0.ebuild @@ -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[@]} }