From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 46575158020 for ; Sun, 25 Dec 2022 22:18:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B43C5E0993; Sun, 25 Dec 2022 22:16:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B0B8E0984 for ; Sun, 25 Dec 2022 22:16:20 +0000 (UTC) From: David Seifert To: gentoo-dev@lists.gentoo.org Cc: David Seifert Subject: [gentoo-dev] [PATCH 09/41] dune.eclass: drop EAPI 6 support Date: Sun, 25 Dec 2022 23:15:20 +0100 Message-Id: <20221225221552.8023-9-soap@gentoo.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225221552.8023-1-soap@gentoo.org> References: <20221225221552.8023-1-soap@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 8a9c0aa0-2442-43ab-a3dd-8b19a0011635 X-Archives-Hash: 22575d68780258e6f609b776b2601445 Signed-off-by: David Seifert --- eclass/dune.eclass | 54 +++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/eclass/dune.eclass b/eclass/dune.eclass index 1061461b699..a7c0a0b652f 100644 --- a/eclass/dune.eclass +++ b/eclass/dune.eclass @@ -8,12 +8,20 @@ # ML # @AUTHOR: # Rafael Kitover -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 7 8 # @BLURB: Provides functions for installing Dune packages. # @DESCRIPTION: # Provides dependencies on Dune and OCaml and default src_compile, src_test and # src_install for Dune-based packages. +case ${EAPI} in + 7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ ! ${_DUNE_ECLASS} ]]; then +_DUNE_ECLASS=1 + # @ECLASS_VARIABLE: DUNE_PKG_NAME # @PRE_INHERIT # @DESCRIPTION: @@ -21,28 +29,20 @@ # Set before inheriting the eclass. : ${DUNE_PKG_NAME:=${PN}} -case ${EAPI:-0} in - 6|7|8) ;; - *) die "${ECLASS}: EAPI ${EAPI} not supported" ;; -esac - inherit multiprocessing # Do not complain about CFLAGS etc since ml projects do not use them. QA_FLAGS_IGNORED='.*' -EXPORT_FUNCTIONS src_compile src_test src_install - -RDEPEND=">=dev-lang/ocaml-4:=[ocamlopt?] dev-ml/dune:=" -case ${EAPI:-0} in - 6) - DEPEND="${RDEPEND} dev-ml/dune" - ;; - *) - BDEPEND="dev-ml/dune dev-lang/ocaml" - DEPEND="${RDEPEND}" - ;; -esac +RDEPEND=" + >=dev-lang/ocaml-4:=[ocamlopt?] + dev-ml/dune:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-ml/dune + dev-lang/ocaml +" dune_src_compile() { ebegin "Building" @@ -72,9 +72,9 @@ dune-install() { [[ ${#pkgs[@]} -eq 0 ]] && pkgs=( "${DUNE_PKG_NAME}" ) local -a myduneopts=( - --prefix="${ED%/}/usr" - --libdir="${D%/}$(ocamlc -where)" - --mandir="${ED%/}/usr/share/man" + --prefix="${ED}/usr" + --libdir="${D}$(ocamlc -where)" + --mandir="${ED}/usr/share/man" ) local pkg @@ -84,10 +84,10 @@ dune-install() { eend $? || die # Move docs to the appropriate place. - if [ -d "${ED%/}/usr/doc/${pkg}" ] ; then - mkdir -p "${ED%/}/usr/share/doc/${PF}/" || die - mv "${ED%/}/usr/doc/${pkg}" "${ED%/}/usr/share/doc/${PF}/" || die - rm -rf "${ED%/}/usr/doc" || die + if [[ -d "${ED}/usr/doc/${pkg}" ]] ; then + mkdir -p "${ED}/usr/share/doc/${PF}/" || die + mv "${ED}/usr/doc/${pkg}" "${ED}/usr/share/doc/${PF}/" || die + rm -rf "${ED}/usr/doc" || die fi done } @@ -95,3 +95,7 @@ dune-install() { dune_src_install() { dune-install ${1:-${DUNE_PKG_NAME}} } + +fi + +EXPORT_FUNCTIONS src_compile src_test src_install -- 2.39.0