summaryrefslogtreecommitdiff
path: root/dev-lang/idris2
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/idris2')
-rw-r--r--dev-lang/idris2/Manifest4
-rw-r--r--dev-lang/idris2/idris2-0.5.1_p20220131.ebuild104
-rw-r--r--dev-lang/idris2/metadata.xml2
3 files changed, 108 insertions, 2 deletions
diff --git a/dev-lang/idris2/Manifest b/dev-lang/idris2/Manifest
index 90f8db27c613..b75100eb8ff1 100644
--- a/dev-lang/idris2/Manifest
+++ b/dev-lang/idris2/Manifest
@@ -1,3 +1,5 @@
DIST idris2-0.5.1_p20211112.tar.gz 6202861 BLAKE2B 189bf28c7a33281494edea9b2c0821a934000fe9ca6e929b3318fe33576553142e5ad8d81598249cc384c6e342491ccef0998f33a4f2940b80264f5a3e4b32b2 SHA512 3b419ddbdc4aa3a28d92bf204448090c168d6a844d570886f982129f9e650c7112bbf95b727baf6c9f0f2fd6200c75eb68b6b71fd8684e01365eaf964dea1ea1
+DIST idris2-0.5.1_p20220131.tar.gz 6283472 BLAKE2B 86b75457b8772d0a8938a4d3422af08fa8e625b675cc2648bc9f2683a6654586ff91b8b1d592f72a3a44c72fa830f9ebc5ae0c451398e8cb5d3fdf5070f7f8ab SHA512 50f21819dee929f847a6b64c89231da9dd55bc35314300aa7d3c3c5ea0da451caba67081ca8b2ffd89608d3aaa042e9b9a6ecb2df0585589404bae3c6a2fe74a
EBUILD idris2-0.5.1_p20211112.ebuild 2513 BLAKE2B cdccbb2fc573524f2fa484c0601f427402055635a1f177a3417db2ce76bfc379380127dbe3a3105befebe4bd18d19d21030ebe527868cb256a5a2ad0346472fe SHA512 1bcb672978151e1d62ee6d057b6a7ee2a9e70988f346914a59375be96f0ca4fc126f32410d573fdb81be27c303bfc88e00475edf26c678621209c600251b5301
-MISC metadata.xml 1254 BLAKE2B bda411bfd779d576f5c8fdc374f7289ee11d04edefe6308bc7c2c50c92c5d881c51475cf252e5402187779bb9317f1d47d66ea4d324f66db314ff7a7b9d493ab SHA512 4bda5aaf00c768e19b92f5e9f15bec2dcd2d8286d04016f2e30fa512fcb5f5842e735c86c61d38577c2530a67c0b0f70f7e801d57f3ae7b780161f83af50b0cd
+EBUILD idris2-0.5.1_p20220131.ebuild 2536 BLAKE2B 2736a8ec10aae9c0f8f5f76f9f935a6e3bef3ed4ddb16c36486514a1b65223ad8d1f2444e2a677297aa6caaab048cec1f2813ee9ddb59cb9604c32039ab37699 SHA512 4a76a6315d8471a0993678f5a2b137f06fe3e4190d79ac179528b633edb06688432c1d8248383f1318a261851defe8c7c422a793dbcbb87755a505dad9771e75
+MISC metadata.xml 1255 BLAKE2B d4d6a952913f404faab8d2383eab1ece0de7bc20486c3126149f7644b3d3445b6b87948f14b43b812dc748824d26da610914969a906735d6c13b9cdbcc0e6ba1 SHA512 df684d9f038601e7d8728a226743f79c7523bb462ed231fb60f33cc214c267dd1981da3f7c39d6cfc153a389330e779cfd580266677e003f8787366545c1f0fa
diff --git a/dev-lang/idris2/idris2-0.5.1_p20220131.ebuild b/dev-lang/idris2/idris2-0.5.1_p20220131.ebuild
new file mode 100644
index 000000000000..cff414efa8b8
--- /dev/null
+++ b/dev-lang/idris2/idris2-0.5.1_p20220131.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+H=a2c7e9f306ea8ff935bbeff1eac764291b12ce87
+
+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/Idris2.git"
+else
+ SRC_URI="https://github.com/idris-lang/Idris2/archive/${H}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${PN^}-${H}"
+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
+ sed -i 's|, "futures001"||g' ./tests/Main.idr || die
+ # > Missing incremental compile data, reverting to whole program compilation
+ sed -i 's|"chez033",||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
+ 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
+}
diff --git a/dev-lang/idris2/metadata.xml b/dev-lang/idris2/metadata.xml
index aab9447eef4a..2ac8f2763bb1 100644
--- a/dev-lang/idris2/metadata.xml
+++ b/dev-lang/idris2/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">