From 415b5db762e2dd812d79b4f66baf5f567b42258d Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Tue, 27 Aug 2024 01:44:39 +0300 Subject: dev-scheme/guile-libyaml: switch to new guile mechanism MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alfred Wingate Signed-off-by: Arsen Arsenović --- .../guile-libyaml-20211124-r100.ebuild | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 dev-scheme/guile-libyaml/guile-libyaml-20211124-r100.ebuild (limited to 'dev-scheme') diff --git a/dev-scheme/guile-libyaml/guile-libyaml-20211124-r100.ebuild b/dev-scheme/guile-libyaml/guile-libyaml-20211124-r100.ebuild new file mode 100644 index 000000000000..8b6169d5bf4f --- /dev/null +++ b/dev-scheme/guile-libyaml/guile-libyaml-20211124-r100.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +GUILE_COMPAT=( 2-2 3-0 ) +inherit edo guile + +[[ ${PV} == 20211124 ]] && COMMIT=2bdacb72a65ab63264b2edc9dac9692df7ec9b3e + +DESCRIPTION="Simple yaml module for Guile using the ffi-helper from nyacc" +HOMEPAGE="https://github.com/mwette/guile-libyaml/" +SRC_URI="https://github.com/mwette/${PN}/archive/${COMMIT}.tar.gz + -> ${P}.tar.gz" +S="${WORKDIR}"/${PN}-${COMMIT} + +LICENSE="LGPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +REQUIRED_USE="${GUILE_REQUIRED_USE}" + +RDEPEND=" + ${GUILE_DEPS} + dev-libs/libyaml +" +DEPEND="${RDEPEND}" +BDEPEND="dev-scheme/guile-nyacc" + +src_compile() { + my_compile() { + guild() { + GUILE_LOAD_COMPILED_PATH="${BUILD_DIR}" GUILE_LOAD_PATH="${S}" edo "${GUILD}" "${@}" || die + } + # Generate bindings using NYACC + guild compile-ffi --no-exec "${S}"/yaml/libyaml.ffi + + # Compile modules + mkdir -p "${BUILD_DIR}"/ccache || die + guild compile -o "${BUILD_DIR}"/ccache/libyaml.go "${S}"/yaml/libyaml.scm + guild compile -o "${BUILD_DIR}"/ccache/yaml.go "${S}"/yaml.scm + } + + guile_foreach_impl my_compile +} + +src_install() { + my_install() { + local site_dir="$(${GUILE} -c '(display (%site-dir))')" + mkdir -p "${SLOTTED_D}/${site_dir}/yaml" || die + cp "${S}/yaml/libyaml.scm" "${SLOTTED_D}/${site_dir}/yaml/" || die + cp "${S}/yaml.scm" "${SLOTTED_D}/${site_dir}/" || die + + local site_ccache_dir="$(${GUILE} -c '(display (%site-ccache-dir))')" + mkdir -p "${SLOTTED_D}/${site_ccache_dir}/yaml" || die + cp "${BUILD_DIR}/ccache/libyaml.go" "${SLOTTED_D}/${site_ccache_dir}/yaml/" || die + cp "${BUILD_DIR}/ccache/yaml.go" "${SLOTTED_D}/${site_ccache_dir}/" || die + } + + guile_foreach_impl my_install + guile_merge_roots + guile_unstrip_ccache + + einstalldocs +} -- cgit v1.2.3-65-gdbad