diff options
author | Matthew Smith <matthew@gentoo.org> | 2022-07-16 08:49:40 +0100 |
---|---|---|
committer | Matthew Smith <matthew@gentoo.org> | 2022-07-16 08:52:17 +0100 |
commit | 290ee32ea6a501a008ebbfe97a13d2ea33d2291e (patch) | |
tree | 2899657e98c9bf22473f70eaa84b8ae07d0f6b91 /dev-scheme/chez | |
parent | net-misc/wget: arm stable wrt bug #858167 (diff) | |
download | gentoo-290ee32ea6a501a008ebbfe97a13d2ea33d2291e.tar.gz gentoo-290ee32ea6a501a008ebbfe97a13d2ea33d2291e.tar.bz2 gentoo-290ee32ea6a501a008ebbfe97a13d2ea33d2291e.zip |
dev-scheme/chez: use system lz4 and zlib
Also fixes LTO error related to the linking of the vendored versions of
these libraries.
Closes: https://bugs.gentoo.org/858251
Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'dev-scheme/chez')
-rw-r--r-- | dev-scheme/chez/chez-9.5.8-r1.ebuild | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/dev-scheme/chez/chez-9.5.8-r1.ebuild b/dev-scheme/chez/chez-9.5.8-r1.ebuild new file mode 100644 index 000000000000..173e8351b3cc --- /dev/null +++ b/dev-scheme/chez/chez-9.5.8-r1.ebuild @@ -0,0 +1,76 @@ +# Copyright 2021-2022 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}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/csv${PV} + +# 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 examples 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="${D}" install + + if ! use examples; then + rm -r "${D}/usr/$(get_libdir)/csv${PV}/examples" || die + fi + + einstalldocs +} |