diff options
author | Alfred Wingate <parona@protonmail.com> | 2024-08-27 01:44:39 +0300 |
---|---|---|
committer | Arsen Arsenović <arsen@gentoo.org> | 2024-09-18 15:06:36 +0200 |
commit | 415b5db762e2dd812d79b4f66baf5f567b42258d (patch) | |
tree | 865706770910294c6c96c7e59d16862854ea2d4e /dev-scheme | |
parent | dev-scheme/guile-lib: switch to new guile mechanism (diff) | |
download | gentoo-415b5db762e2dd812d79b4f66baf5f567b42258d.tar.gz gentoo-415b5db762e2dd812d79b4f66baf5f567b42258d.tar.bz2 gentoo-415b5db762e2dd812d79b4f66baf5f567b42258d.zip |
dev-scheme/guile-libyaml: switch to new guile mechanism
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r-- | dev-scheme/guile-libyaml/guile-libyaml-20211124-r100.ebuild | 65 |
1 files changed, 65 insertions, 0 deletions
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 +} |