You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.1 KiB
68 lines
2.1 KiB
4 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
4 years ago
|
EAPI=7
|
||
8 years ago
|
|
||
4 years ago
|
CABAL_FEATURES="profile"
|
||
8 years ago
|
inherit haskell-cabal elisp-common
|
||
|
|
||
|
## shared with sci-mathematics/agda
|
||
|
# upstream does not maintain version ordering:
|
||
|
# https://github.com/agda/agda-stdlib/releases
|
||
|
# 0.11 -> 2.5.0.20160213 -> 2.5.0.20160412 -> 0.12 -> 0.13
|
||
|
# As Agda-stdlib is tied to Agda version we encode
|
||
|
# both versions in gentoo version.
|
||
|
##
|
||
4 years ago
|
MY_UPSTREAM_AGDA_STDLIB_V="1.4"
|
||
8 years ago
|
MY_GENTOO_AGDA_STDLIB_V="${PV}.${MY_UPSTREAM_AGDA_STDLIB_V}"
|
||
|
MY_UPSTREAM_AGDA_V="${PV%.${MY_UPSTREAM_AGDA_STDLIB_V}}"
|
||
|
|
||
|
DESCRIPTION="Agda standard library"
|
||
4 years ago
|
HOMEPAGE="https://wiki.portal.chalmers.se/agda/"
|
||
8 years ago
|
SRC_URI="https://github.com/agda/${PN}/archive/v${MY_UPSTREAM_AGDA_STDLIB_V}.tar.gz -> ${P}.tar.gz"
|
||
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
4 years ago
|
IUSE=""
|
||
8 years ago
|
|
||
|
RDEPEND=">=sci-mathematics/agda-${MY_UPSTREAM_AGDA_V}:=[profile?]
|
||
|
"
|
||
|
DEPEND="${RDEPEND}
|
||
4 years ago
|
>=dev-haskell/cabal-1.24.2.0
|
||
8 years ago
|
>=dev-haskell/filemanip-0.3.6.2[profile?] <dev-haskell/filemanip-0.4[profile?]
|
||
4 years ago
|
>=dev-lang/ghc-8.0.2
|
||
8 years ago
|
"
|
||
|
|
||
|
S=${WORKDIR}/${PN}-${MY_UPSTREAM_AGDA_STDLIB_V}
|
||
|
|
||
|
src_compile() {
|
||
|
haskell-cabal_src_compile
|
||
|
"${S}"/dist/build/GenerateEverything/GenerateEverything \
|
||
|
|| die "GenerateEverything failed"
|
||
|
local prof
|
||
|
use profile && prof="--ghc-flag=-prof"
|
||
|
agda +RTS -K1G -RTS ${prof} \
|
||
|
-i "${S}" -i "${S}"/src "${S}"/Everything.agda || die
|
||
|
# Although my agda-9999 build has
|
||
|
# /var/tmp/portage/sci-mathematics/agda-9999/work/agda-9999/dist/build/autogen/Paths_Agda.hs
|
||
|
# containing:
|
||
|
# datadir = "/usr/share/agda-9999/ghc-7.6.1"
|
||
|
# it fails without the --css option like:
|
||
|
# /usr/share/agda-9999/ghc-7.4.1/Agda.css: copyFile: does not exist
|
||
|
local cssdir=$(egrep 'datadir *=' "${S}/dist/build/autogen/Paths_lib.hs" | sed -e 's@datadir = \(.*\)@\1@')
|
||
|
agda --html -i "${S}" -i "${S}"/src --css="${cssdir}/Agda.css" "${S}"/README.agda || die
|
||
|
}
|
||
|
|
||
|
src_test() {
|
||
|
agda -i "${S}" -i "${S}"/src README.agda || die
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
insinto usr/share/agda-stdlib
|
||
|
insopts --preserve-timestamps
|
||
|
doins -r src/*
|
||
|
dodoc -r html/*
|
||
|
doins "${FILESDIR}/standard-library.agda-lib"
|
||
|
}
|