summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2023-12-07 23:33:06 +0100
committerMaciej Barć <xgqt@gentoo.org>2023-12-08 01:29:41 +0100
commit0c9f132d03fc4bf0ef6200bc5cd282518d7eb855 (patch)
tree3d9477650d2e0ca59d887af52ad627662a92ba66 /dev-scheme
parentapp-text/poppler: add 23.12.0 (diff)
downloadgentoo-0c9f132d03fc4bf0ef6200bc5cd282518d7eb855.tar.gz
gentoo-0c9f132d03fc4bf0ef6200bc5cd282518d7eb855.tar.bz2
gentoo-0c9f132d03fc4bf0ef6200bc5cd282518d7eb855.zip
dev-scheme/chez: translate for chez's --machine
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-scheme')
-rw-r--r--dev-scheme/chez/chez-9.6.4-r1.ebuild (renamed from dev-scheme/chez/chez-9.6.4.ebuild)56
1 files changed, 39 insertions, 17 deletions
diff --git a/dev-scheme/chez/chez-9.6.4.ebuild b/dev-scheme/chez/chez-9.6.4-r1.ebuild
index dad71cf90e84..2e64fdec637c 100644
--- a/dev-scheme/chez/chez-9.6.4.ebuild
+++ b/dev-scheme/chez/chez-9.6.4-r1.ebuild
@@ -3,13 +3,14 @@
EAPI=8
-inherit toolchain-funcs
+inherit edo toolchain-funcs
DESCRIPTION="A programming language based on R6RS"
-HOMEPAGE="https://cisco.github.io/ChezScheme/ https://github.com/cisco/ChezScheme"
+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}
+S="${WORKDIR}/csv${PV//a}"
# Chez Scheme itself is Apache 2.0, but it vendors Nanopass and stex
# which are both MIT licensed.
@@ -18,17 +19,18 @@ SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE="X ncurses threads"
-BDEPEND="virtual/pkgconfig"
RDEPEND="
app-arch/lz4:=
sys-apps/util-linux
sys-libs/zlib:=
+ X? ( x11-libs/libX11 )
ncurses? ( sys-libs/ncurses:= )
"
-DEPEND="${RDEPEND}"
-RDEPEND="
+DEPEND="
${RDEPEND}
- X? ( x11-libs/libX11 )
+"
+BDEPEND="
+ virtual/pkgconfig
"
src_prepare() {
@@ -38,6 +40,7 @@ src_prepare() {
if use ncurses ; then
local nclibs="\"$($(tc-getPKG_CONFIG) --libs ncurses)\""
+
sed -i "s|ncursesLib=-lncurses|ncursesLib=${nclibs}|g" configure || die
fi
@@ -46,10 +49,22 @@ src_prepare() {
}
src_configure() {
- local myconfargs=(
- $(usex threads '--threads' '')
- $(usex ncurses '' '--disable-curses')
- $(usex X '' '--disable-x11')
+ # 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)"
@@ -57,12 +72,19 @@ src_configure() {
--installschemename=chezscheme
--installpetitename=chezscheme-petite
--installscriptname=chezscheme-script
- --libkernel
- --nogzip-man-pages
- LZ4=$($(tc-getPKG_CONFIG) --libs liblz4)
- ZLIB=$($(tc-getPKG_CONFIG) --libs zlib)
+
+ $(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)"
)
- sh ./configure "${myconfargs[@]}" || die
+ edob sh ./configure "${myconfargs[@]}"
}
src_install() {
@@ -70,6 +92,6 @@ src_install() {
emake TempRoot="${ED}" install
einstalldocs
- find "${ED}"/usr/$(get_libdir)/csv${PV//a}/examples \
+ find "${ED}/usr/$(get_libdir)/csv${PV//a}/examples" \
\( -name "*.md" -o -name "*.so" \) -delete || die
}