summaryrefslogtreecommitdiff
path: root/dev-lang/idris2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-lang/idris2
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-lang/idris2')
-rw-r--r--dev-lang/idris2/Manifest3
-rw-r--r--dev-lang/idris2/idris2-0.5.1_p20211112.ebuild105
-rw-r--r--dev-lang/idris2/metadata.xml27
3 files changed, 135 insertions, 0 deletions
diff --git a/dev-lang/idris2/Manifest b/dev-lang/idris2/Manifest
new file mode 100644
index 000000000000..80686c458eef
--- /dev/null
+++ b/dev-lang/idris2/Manifest
@@ -0,0 +1,3 @@
+DIST idris2-0.5.1_p20211112.tar.gz 6202861 BLAKE2B 189bf28c7a33281494edea9b2c0821a934000fe9ca6e929b3318fe33576553142e5ad8d81598249cc384c6e342491ccef0998f33a4f2940b80264f5a3e4b32b2 SHA512 3b419ddbdc4aa3a28d92bf204448090c168d6a844d570886f982129f9e650c7112bbf95b727baf6c9f0f2fd6200c75eb68b6b71fd8684e01365eaf964dea1ea1
+EBUILD idris2-0.5.1_p20211112.ebuild 2513 BLAKE2B cdccbb2fc573524f2fa484c0601f427402055635a1f177a3417db2ce76bfc379380127dbe3a3105befebe4bd18d19d21030ebe527868cb256a5a2ad0346472fe SHA512 1bcb672978151e1d62ee6d057b6a7ee2a9e70988f346914a59375be96f0ca4fc126f32410d573fdb81be27c303bfc88e00475edf26c678621209c600251b5301
+MISC metadata.xml 1164 BLAKE2B d15ac3ae55a531d9f3c4f129206154a4bd5c1ab9adc2d070464d757d542c0a989a4911a9310ea6cfe91ea6016060b477c1de2f53e29b4e2a811c97e4edab6067 SHA512 7436fbad2a6fb17b3e54ddea5c5ddeecb30d8fb17903dd12422e5b463c6ada84840aa0cd4bbaaa4a565365c126843f5084f7ff41938f90411bb6f44e791955fb
diff --git a/dev-lang/idris2/idris2-0.5.1_p20211112.ebuild b/dev-lang/idris2/idris2-0.5.1_p20211112.ebuild
new file mode 100644
index 000000000000..762d534c28a4
--- /dev/null
+++ b/dev-lang/idris2/idris2-0.5.1_p20211112.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+COMMIT_HASH="ba180706d607945d8b419301f4362471d97a306a"
+
+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/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${PN^}-${COMMIT_HASH}"
+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
+ # > 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}
+
+ einstalldocs
+
+ # Install documentation
+ use doc && dodoc -r ./docs/build/html
+}
diff --git a/dev-lang/idris2/metadata.xml b/dev-lang/idris2/metadata.xml
new file mode 100644
index 000000000000..b8e693b1cb86
--- /dev/null
+++ b/dev-lang/idris2/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <maintainer type="project">
+ <email>scheme@gentoo.org</email>
+ <name>Gentoo Scheme Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Idris is a programming language designed to encourage Type-Driven
+ Development.
+ In type-driven development, types are tools for constructing programs.
+ We treat the type as the plan for a program, and use the compiler
+ and type checker as our assistant, guiding us to a complete program that
+ satisfies the type. The more expressive the type is that we give up front,
+ the more confidence we can have that the resulting program will be correct.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/idris-lang/Idris2/issues</bugs-to>
+ <remote-id type="github">idris-lang/Idris2</remote-id>
+ </upstream>
+ <use>
+ <flag name="chez">build using <pkg>dev-scheme/chez</pkg></flag>
+ <flag name="racket">build using <pkg>dev-scheme/racket</pkg></flag>
+ <flag name="test-full">pull in depedndencies to run all tests</flag>
+ </use>
+</pkgmetadata>