commit: f19bc995e90dfcd4e5e265ac50efce38b672efb1 Author: Maciej Barć <xgqt <AT> riseup <DOT> net> AuthorDate: Fri Nov 12 05:24:38 2021 +0000 Commit: Maciej Barć <xgqt <AT> riseup <DOT> net> CommitDate: Fri Nov 12 05:24:52 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f19bc995
dev-lang/idris2: new package; add version 0.5.1 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Maciej Barć <xgqt <AT> riseup.net> dev-lang/idris2/Manifest | 1 + dev-lang/idris2/idris2-0.5.1.ebuild | 105 ++++++++++++++++++++++++++++++++++++ dev-lang/idris2/metadata.xml | 27 ++++++++++ 3 files changed, 133 insertions(+) diff --git a/dev-lang/idris2/Manifest b/dev-lang/idris2/Manifest new file mode 100644 index 000000000..97fd4e376 --- /dev/null +++ b/dev-lang/idris2/Manifest @@ -0,0 +1 @@ +DIST idris2-0.5.1.tar.gz 6057004 BLAKE2B d44d28739d350d7987b86ef3a08e2f6d73cd32fdb406c8156336f72d996fbd30296edf8b74e461d7a67861edc188d9e0d0f939bace337bebbf4124862b81a243 SHA512 6b4a4092570136a684bdd80765d271bc1ebe163c273ff22d22c808f586183a8e90a326573dd0e4b339e1ab0b88fd31f1cc7bf2820ff7bab2742c4156b816c5b7 diff --git a/dev-lang/idris2/idris2-0.5.1.ebuild b/dev-lang/idris2/idris2-0.5.1.ebuild new file mode 100644 index 000000000..46d5f2085 --- /dev/null +++ b/dev-lang/idris2/idris2-0.5.1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# NOTICE: make targets for documentation fail: libdocs & install-libdocs + +EAPI=8 + +inherit toolchain-funcs xdg-utils + +DESCRIPTION="Purely functional programming language with first class types" +HOMEPAGE="https://github.com/idris-lang/Idris2/" + +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/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/${P^}" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="+chez doc racket test-full" +REQUIRED_USE="^^ ( chez racket )" + +BDEPEND=" + dev-libs/gmp + chez? ( dev-scheme/chez ) + racket? ( dev-scheme/racket ) + doc? ( dev-python/sphinx_rtd_theme ) + test-full? ( + dev-scheme/chez + dev-scheme/racket + 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() { + xdg_environment_reset + 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 + + # Sorry... (jobserver unavailable) + unset MAKEOPTS + + export IDRIS2_VERSION=${PV} + export SCHEME=$(usex chez chezscheme racket) + + if use chez; then + export IDRIS2_CG=chez + export BOOTSTRAP_MAKE_TARGET=bootstrap + elif use racket; then + export IDRIS2_CG=racket + export BOOTSTRAP_MAKE_TARGET=bootstrap-racket + else + die "Neither chez nor racket was chosen" + fi + + # Fix "PREFIX" + sed -i 's|$(HOME)/.idris2|/usr/lib/idris2|g' ./config.mk || die + + # Bad tests + sed -i 's|"chez033",||g' ./tests/Main.idr || die + + default +} + +src_configure() { + : +} + +src_compile() { + emake SCHEME=${SCHEME} ${BOOTSTRAP_MAKE_TARGET} + + 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 + + if use doc; then + insinto /usr/share/doc/${PF}/ + doins -r ./docs/build/html + fi +} diff --git a/dev-lang/idris2/metadata.xml b/dev-lang/idris2/metadata.xml new file mode 100644 index 000000000..66edc68e0 --- /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="person"> + <email>x...@riseup.net</email> + <name>Maciej Barć</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>