From 0c9f132d03fc4bf0ef6200bc5cd282518d7eb855 Mon Sep 17 00:00:00 2001 From: Maciej Barć Date: Thu, 7 Dec 2023 23:33:06 +0100 Subject: dev-scheme/chez: translate for chez's --machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maciej Barć --- dev-scheme/chez/chez-9.6.4-r1.ebuild | 97 ++++++++++++++++++++++++++++++++++++ dev-scheme/chez/chez-9.6.4.ebuild | 75 ---------------------------- 2 files changed, 97 insertions(+), 75 deletions(-) create mode 100644 dev-scheme/chez/chez-9.6.4-r1.ebuild delete mode 100644 dev-scheme/chez/chez-9.6.4.ebuild (limited to 'dev-scheme') diff --git a/dev-scheme/chez/chez-9.6.4-r1.ebuild b/dev-scheme/chez/chez-9.6.4-r1.ebuild new file mode 100644 index 000000000000..2e64fdec637c --- /dev/null +++ b/dev-scheme/chez/chez-9.6.4-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 2021-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edo toolchain-funcs + +DESCRIPTION="A programming language based on R6RS" +HOMEPAGE="https://cisco.github.io/ChezScheme/ + https://github.com/cisco/ChezScheme/" +SRC_URI="https://github.com/cisco/ChezScheme/releases/download/v${PV}/csv${PV//a}.tar.gz + -> ${P}.tar.gz" +S="${WORKDIR}/csv${PV//a}" + +# Chez Scheme itself is Apache 2.0, but it vendors Nanopass and stex +# which are both MIT licensed. +LICENSE="Apache-2.0 MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="X ncurses threads" + +RDEPEND=" + app-arch/lz4:= + sys-apps/util-linux + sys-libs/zlib:= + X? ( x11-libs/libX11 ) + ncurses? ( sys-libs/ncurses:= ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig +" + +src_prepare() { + tc-export AR CC CXX LD RANLIB + + default + + if use ncurses ; then + local nclibs="\"$($(tc-getPKG_CONFIG) --libs ncurses)\"" + + sed -i "s|ncursesLib=-lncurses|ncursesLib=${nclibs}|g" configure || die + fi + + # Remove -Werror + sed -i "/^C = /s|-Werror||g" c/Mf-* || die +} + +src_configure() { + # See official docs for translation guide. + # https://cisco.github.io/ChezScheme/release_notes/v9.6/release_notes.html + # "t" for threading + arch_map + "le" for Linux (hardcoded for now) + local -A arch_map=( + [amd64]=a6 + [arm]=arm32 + [ppc]=ppc32 + [x86]=i3 + ) + local machine="$(usex threads 't' '')${arch_map[${ARCH}]}le" + + local -a myconfargs=( + --machine="${machine}" + --libkernel + --nogzip-man-pages + + --installprefix="/usr" + --installbin="/usr/bin" + --installlib="/usr/$(get_libdir)" + --installman="/usr/share/man" + --installschemename=chezscheme + --installpetitename=chezscheme-petite + --installscriptname=chezscheme-script + + $(usex threads '--threads' '') + $(usex ncurses '' '--disable-curses') + $(usex X '' '--disable-x11') + + AR="$(tc-getAR)" + CC="$(tc-getCC)" + LD="$(tc-getLD)" + + LZ4="$($(tc-getPKG_CONFIG) --libs liblz4)" + ZLIB="$($(tc-getPKG_CONFIG) --libs zlib)" + ) + edob sh ./configure "${myconfargs[@]}" +} + +src_install() { + # TempRoot == DESTDIR + emake TempRoot="${ED}" install + einstalldocs + + find "${ED}/usr/$(get_libdir)/csv${PV//a}/examples" \ + \( -name "*.md" -o -name "*.so" \) -delete || die +} diff --git a/dev-scheme/chez/chez-9.6.4.ebuild b/dev-scheme/chez/chez-9.6.4.ebuild deleted file mode 100644 index dad71cf90e84..000000000000 --- a/dev-scheme/chez/chez-9.6.4.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2021-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit toolchain-funcs - -DESCRIPTION="A programming language based on R6RS" -HOMEPAGE="https://cisco.github.io/ChezScheme/ https://github.com/cisco/ChezScheme" -SRC_URI="https://github.com/cisco/ChezScheme/releases/download/v${PV}/csv${PV//a}.tar.gz - -> ${P}.tar.gz" -S="${WORKDIR}"/csv${PV//a} - -# Chez Scheme itself is Apache 2.0, but it vendors Nanopass and stex -# which are both MIT licensed. -LICENSE="Apache-2.0 MIT" -SLOT="0/${PV}" -KEYWORDS="~amd64 ~x86" -IUSE="X ncurses threads" - -BDEPEND="virtual/pkgconfig" -RDEPEND=" - app-arch/lz4:= - sys-apps/util-linux - sys-libs/zlib:= - ncurses? ( sys-libs/ncurses:= ) -" -DEPEND="${RDEPEND}" -RDEPEND=" - ${RDEPEND} - X? ( x11-libs/libX11 ) -" - -src_prepare() { - tc-export AR CC CXX LD RANLIB - - default - - if use ncurses ; then - local nclibs="\"$($(tc-getPKG_CONFIG) --libs ncurses)\"" - sed -i "s|ncursesLib=-lncurses|ncursesLib=${nclibs}|g" configure || die - fi - - # Remove -Werror - sed -i "/^C = /s|-Werror||g" c/Mf-* || die -} - -src_configure() { - local myconfargs=( - $(usex threads '--threads' '') - $(usex ncurses '' '--disable-curses') - $(usex X '' '--disable-x11') - --installprefix="/usr" - --installbin="/usr/bin" - --installlib="/usr/$(get_libdir)" - --installman="/usr/share/man" - --installschemename=chezscheme - --installpetitename=chezscheme-petite - --installscriptname=chezscheme-script - --libkernel - --nogzip-man-pages - LZ4=$($(tc-getPKG_CONFIG) --libs liblz4) - ZLIB=$($(tc-getPKG_CONFIG) --libs zlib) - ) - sh ./configure "${myconfargs[@]}" || die -} - -src_install() { - # TempRoot == DESTDIR - emake TempRoot="${ED}" install - einstalldocs - - find "${ED}"/usr/$(get_libdir)/csv${PV//a}/examples \ - \( -name "*.md" -o -name "*.so" \) -delete || die -} -- cgit v1.2.3-65-gdbad