diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-01 09:07:00 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-01 09:07:00 +0000 |
commit | 7a795be3ed6b29502cf5dccb5ea8294fc1ec2860 (patch) | |
tree | c5a028ba6f5ad04992cbc8ff1e20b5c9790b073c /dev-lang/idris2/idris2-0.6.0.ebuild | |
parent | b9fc63c20df1fdeead24c989c4aca4090830f9d4 (diff) |
gentoo auto-resync : 01:11:2022 - 09:06:59
Diffstat (limited to 'dev-lang/idris2/idris2-0.6.0.ebuild')
-rw-r--r-- | dev-lang/idris2/idris2-0.6.0.ebuild | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/dev-lang/idris2/idris2-0.6.0.ebuild b/dev-lang/idris2/idris2-0.6.0.ebuild new file mode 100644 index 000000000000..806cbe1cac3c --- /dev/null +++ b/dev-lang/idris2/idris2-0.6.0.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Purely functional programming language with first class types" +HOMEPAGE="https://idris-lang.org/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/idris-lang/${PN^}.git" +else + SRC_URI="https://github.com/idris-lang/${PN^}/archive/v${PV}.tar.gz + -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}"/${PN^}-${PV} +fi + +LICENSE="BSD" +SLOT="0" +IUSE="+chez doc racket test-full" +REQUIRED_USE="^^ ( chez racket )" + +RDEPEND=" + dev-libs/gmp + chez? ( dev-scheme/chez:=[threads] ) + racket? ( dev-scheme/racket:=[threads] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( dev-python/sphinx_rtd_theme ) + test-full? ( + dev-scheme/chez[threads] + dev-scheme/racket[threads] + net-libs/nodejs + ) +" + +# Generated via "SCHEME", not CC +QA_FLAGS_IGNORED=" + usr/lib/idris2/bin/idris2_app/idris2 + usr/lib/idris2/bin/idris2_app/idris2-boot +" +QA_PRESTRIPPED="${QA_FLAGS_IGNORED}" + +src_prepare() { + # Clean up environment of Idris and Racket variables + unset IDRIS2_DATA IDRIS2_INC_CGS IDRIS2_LIBS IDRIS2_PACKAGE_PATH + unset IDRIS2_PATH IDRIS2_PREFIX + unset PLTUSERHOME + + tc-export AR CC CXX LD RANLIB + export CFLAGS + sed -i '/^CFLAGS/d' ./support/*/Makefile || die + + # Fix "PREFIX" + sed -i 's|$(HOME)/.idris2|/usr/lib/idris2|g' ./config.mk || die + + # Bad tests + # Weird Racket Futures (parallelism) test, might need further investigation + sed -i 's|, "futures001"||g' ./tests/Main.idr || die + + default +} + +src_configure() { + export IDRIS2_VERSION=${PV} + export SCHEME=$(usex chez chezscheme racket) + + if use chez ; then + export IDRIS2_CG=chez + export BOOTSTRAP_TARGET=bootstrap + elif use racket ; then + export IDRIS2_CG=racket + export BOOTSTRAP_TARGET=bootstrap-racket + else + die 'Neither "chez" nor "racket" was chosen' + fi +} + +src_compile() { + # > jobserver unavailable + # This is caused by Makefile using a script which in turn calls make + # https://github.com/idris-lang/Idris2/issues/2152 + emake SCHEME=${SCHEME} ${BOOTSTRAP_TARGET} -j1 + + use doc && emake -C ./docs html +} + +src_test() { + emake SCHEME=${SCHEME} bootstrap-test +} + +src_install() { + # "DESTDIR" variable is not respected, use "PREFIX" instead + emake IDRIS2_PREFIX="${D}"/usr/lib/idris2 PREFIX="${D}"/usr/lib/idris2 install + dosym ../lib/${PN}/bin/${PN} /usr/bin/${PN} + + # Install documentation + use doc && dodoc -r ./docs/build/html + einstalldocs +} |