diff options
author | Maciej Barć <xgqt@gentoo.org> | 2023-12-27 01:20:47 +0100 |
---|---|---|
committer | Maciej Barć <xgqt@gentoo.org> | 2023-12-27 02:20:42 +0100 |
commit | 0f91c770efc10cdaf14d527316b247b1a5e4d26b (patch) | |
tree | ba0e3b2ba3805c45b52c44a3115b7cfcfddf7728 /dev-lang | |
parent | app-emacs/osm: bump to 1.1 (diff) | |
download | gentoo-0f91c770efc10cdaf14d527316b247b1a5e4d26b.tar.gz gentoo-0f91c770efc10cdaf14d527316b247b1a5e4d26b.tar.bz2 gentoo-0f91c770efc10cdaf14d527316b247b1a5e4d26b.zip |
dev-lang/idris2: bump to 0.7.0
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/idris2/Manifest | 1 | ||||
-rw-r--r-- | dev-lang/idris2/files/idris2-0.7.0-disable-allbackends-tests.patch | 10 | ||||
-rw-r--r-- | dev-lang/idris2/idris2-0.7.0.ebuild | 135 |
3 files changed, 146 insertions, 0 deletions
diff --git a/dev-lang/idris2/Manifest b/dev-lang/idris2/Manifest index 6ff24ff105e3..02ee2eb10e82 100644 --- a/dev-lang/idris2/Manifest +++ b/dev-lang/idris2/Manifest @@ -1 +1,2 @@ DIST idris2-0.6.0.tar.gz 6706586 BLAKE2B 79c16120b5845047d510a6f75729f1999f5b468e27189bd806f772d07e1789622ca0182933d0ec0833f5c3af05e00f13edda2f595aa35b5d0fcb2301c5c25407 SHA512 342ab3d9e38c8150c7eec997e9cbadd4aa12ccb18994b6b008f165deb20fd5fc79f4944387316cbba03e56fa1545b0afbb277988449af5b21d20f81207f6f367 +DIST idris2-0.7.0.tar.gz 6987849 BLAKE2B 5a3df7eb4541830822c92bc76e616266e9535c7fe989e78db4477c724d25720ec46bb21625ab9c0541da52fbacc0b1f7d49c3316191f88b553ec8a4f8d22892c SHA512 3c645807d71ecf62bc66b674438ebf80ec6e7e4bbf473d86ec06bc7b59f8187618e0d56535380079837e15caebef02deba9beb3eb3c77da787befac88d7a6d2b diff --git a/dev-lang/idris2/files/idris2-0.7.0-disable-allbackends-tests.patch b/dev-lang/idris2/files/idris2-0.7.0-disable-allbackends-tests.patch new file mode 100644 index 000000000000..eb085ca765e6 --- /dev/null +++ b/dev-lang/idris2/files/idris2-0.7.0-disable-allbackends-tests.patch @@ -0,0 +1,10 @@ +--- a/tests/Main.idr ++++ b/tests/Main.idr +@@ -233,7 +233,6 @@ main = runner $ + , !codegenTests + ] + ++ !(traverse idrisTestsAllSchemes [Chez, Racket]) +- ++ map (testPaths "allbackends" . idrisTestsAllBackends) [Chez, Node, Racket, C] + + + where diff --git a/dev-lang/idris2/idris2-0.7.0.ebuild b/dev-lang/idris2/idris2-0.7.0.ebuild new file mode 100644 index 000000000000..acc07f686ab7 --- /dev/null +++ b/dev-lang/idris2/idris2-0.7.0.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs 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" + S="${WORKDIR}/${PN^}-${PV}" + + KEYWORDS="~amd64 ~x86" +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 + ) +" + +CHECKREQS_DISK_BUILD="800M" + +PATCHES=( "${FILESDIR}/${PN}-0.7.0-disable-allbackends-tests.patch" ) + +# 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 + local -a bad_tests=( + allschemes/channels006 + chez/futures001 + refc/args + refc/buffer + refc/clock + refc/doubles + refc/garbageCollect + refc/integers + refc/issue1778 + refc/issue2424 + refc/refc002 + refc/refc003 + refc/strings + ) + local bad_test + for bad_test in "${bad_tests[@]}" ; do + rm -r "tests/${bad_test}" || die + done + + 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="${ED}/usr/lib/idris2" PREFIX="${ED}/usr/lib/idris2" install + dosym "../lib/${PN}/bin/${PN}" "/usr/bin/${PN}" + + # Install documentation + use doc && dodoc -r ./docs/build/html + einstalldocs +} |