aboutsummaryrefslogtreecommitdiffstats
path: root/testing/idris2/APKBUILD
blob: 668ac6b5355726239062c1936aaf363582ce469e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=idris2
pkgver=0.3.0
pkgrel=0
pkgdesc="Purely functional programming language with first class types"
url="https://www.idris-lang.org"
arch="x86 x86_64" # limited by chez-scheme
license="BSD-3-Clause"
depends="chez-scheme"
makedepends="bash py3-sphinx py3-sphinx_rtd_theme"
subpackages="$pkgname-doc"
options="!check" # TODO
source="https://github.com/idris-lang/Idris2/archive/v$pkgver/idris2-$pkgver.tar.gz
	0001-Flush-standard-out-after-writing-prompt-to-it.patch
	0002-Better-default-permissions-for-created-directories.patch
	0003-Makefile-Don-t-run-bootstrap-test-on-bootstrap-by-de.patch"
builddir="$srcdir/Idris2-$pkgver"

# TODO: Install idris libs to /usr/lib/idris-$pkgver instead of /usr/idris-$pkgver
# TODO: Make all tests pass
# TODO: Self-hosting step (maybe split into idris2 and idris2-bootstrap?)
# TODO: Install the Idris 2 API (make install-api)

# TODO: https://github.com/idris-lang/Idris2/issues/737
# TODO: https://github.com/idris-lang/Idris2/pull/1123

build() {
	# Bootstrap Idris 2 compiler from scheme sources.
	make -j1 bootstrap PREFIX=/usr SCHEME=chez

	# Create HTML documentation.
	make -C docs html
}

check() {
	make -j1 bootstrap-test
}

package() {
	# Idris2 Makefile doesn't honor ${DESTDIR}
	make IDRIS2_PREFIX="$pkgdir/usr" \
		PREFIX="$pkgdir/usr" install

	# Install additional documentation files
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 CHANGELOG.md CONTRIBUTING.md \
		CONTRIBUTORS README.md "$pkgdir"/usr/share/doc/$pkgname/
	cp -r docs/build/html "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="465153b1d39b0e9a5195ecd836a6e678469b73f619e82c64dab87bdf61c0a6222972a5a65a46fa3ee3ac2342e93e9dfda316eedae59a29bcaf86ff046ef6bb04  idris2-0.3.0.tar.gz
2b84e01da8afcd0e2631f153b1b6ffab9db11385b4dc6bdcb6a9be6b13546300c765717b5766dbaced013f7cc914aec19ef8bbd5cddbc56bd9514a5c0cac3e76  0001-Flush-standard-out-after-writing-prompt-to-it.patch
43bfd62529d2188dd3093f3c729441ce365aaf60a0cc5b3107b74ae29bf58ecac5ebbd7eaf31b9761788255bebcbc98e8749fc80618b41d1bfe62fb1784a0295  0002-Better-default-permissions-for-created-directories.patch
0e25a363c447cdac6b32fc4f322cb2be8b57f3d7a8dcb42244b8738941c757a06c6f76e3ca96447f3325794e0089c9468db322c0f5b94230d62919f17b3229eb  0003-Makefile-Don-t-run-bootstrap-test-on-bootstrap-by-de.patch"