aboutsummaryrefslogtreecommitdiffstats
path: root/testing/racket/APKBUILD
blob: 02415ab489613fd7479800f4e9594ded76979554 (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
56
57
58
59
60
61
62
63
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
#
# TODO: Separate packages into subpackages?
# TODO: Install even packages from the full tarball?
# TODO: Figure out how to run tests.
pkgname=racket
pkgver=7.7
pkgrel=2
pkgdesc="A general purpose programming language in the Lisp-Scheme family"
url="https://racket-lang.org/"
# Racket BC does not seem to support riscv64.
arch="all !riscv64"
license="LGPL-3.0-or-later MIT"
depends="ca-certificates libcrypto1.1 libssl1.1"
makedepends="chrpath libffi-dev libucontext-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://download.racket-lang.org/releases/$pkgver/installers/racket-minimal-$pkgver-src.tgz
	0001-Ensure-that-the-GMP-ARM-extra-file-has-the-correct-e.patch"

# XXX: Upstream repository uses a racket/ subdirectory, this can be
# removed if the aport builds without any git format patches.
patch_args="-p2"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
	# Remove bundled libffi to be sure that system-provided is used.
	rm -Rf src/foreign/libffi
}

build() {
	cd "$builddir"/src

	export CFLAGS="$CFLAGS -D_GNU_SOURCE"
	export LDFLAGS="$LDFLAGS -lucontext"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--target=$CTARGET \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-shared \
		--disable-docs
	make
}

package() {
	cd "$builddir"/src

	make install DESTDIR="$pkgdir"

	cd "$pkgdir"

	# Remove redundant RPATH.
	chrpath -d usr/bin/racket usr/lib/racket/gracket

	rm -Rf usr/share/applications
}

sha512sums="e683a2f90dc2f0a0f73d07319f9241359c85593d2e227183c604fa60c734bc922a0c184cae4934dc04f71b889f433c40902098b02c03078a3da8bb0a10c24e30  racket-minimal-7.7-src.tgz
ce29c2761ad69b8f9415e23080fa607bd45e8e8ac76394d8fde1e9f022aa58374651ebf3576de88c1280a3aeaae4c9921eaa66d3a950943eec4fe1528f10311a  0001-Ensure-that-the-GMP-ARM-extra-file-has-the-correct-e.patch"