# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka # # TODO: Separate packages into subpackages? # TODO: Install even packages from the full tarball? # TODO: Figure out how to run tests. pkgname=racket pkgver=8.8 pkgrel=0 pkgdesc="general purpose programming language in the Lisp-Scheme family" url="https://racket-lang.org/" arch="all" license="Apache-2.0 OR MIT" depends=" ca-certificates libcrypto3 libssl3 " makedepends=" chrpath libffi-dev libucontext-dev lz4-dev ncurses-dev zlib-dev " subpackages=" $pkgname-dbg $pkgname-dev $pkgname-doc " source="https://download.racket-lang.org/releases/$pkgver/installers/racket-minimal-$pkgver-src.tgz chez-musl-time_t.patch " builddir="$srcdir/$pkgname-$pkgver/src" _flags= case "$CARCH" in # Racket CS (Chez Scheme backend) is not supported on these platforms, # so build only BC (custom backend). ppc64le | s390x) pkgdesc="Racket BC - $pkgdesc" license="($license) AND LGPL-3.0-or-later" _flags="--enable-bconly --enable-bcdefault --enable-shared" ;; *) pkgdesc="Racket CS - $pkgdesc" # NOTE: --enable-shared is not supported for CS. _flags="--enable-csonly --enable-csdefault" ;; esac prepare() { default_prepare update_config_sub || true # Remove bundled libffi to be sure that system-provided is used. rm -Rf bc/foreign/libffi } build() { export CFLAGS="${CFLAGS/-Os/-O2} -D_GNU_SOURCE" export CPPFLAGS="${CPPFLAGS/-Os/-O2}" export CXXFLAGS="${CXXFLAGS/-Os/-O2}" export LDFLAGS="$LDFLAGS -lucontext" # --enable-sharezo - this shouldn't be enabled for Racket CS because it # installs arch-dependent files to /usr/share, but # https://github.com/racket/racket/issues/3878#issuecomment-863358344 ./configure \ --build=$CBUILD \ --host=$CHOST \ --target=$CTARGET \ --prefix=/usr \ --sysconfdir=/etc \ --disable-docs \ --disable-strip \ --enable-sharezo \ --enable-libz \ --enable-liblz4 \ $_flags make } package() { make install DESTDIR="$pkgdir" rmdir "$pkgdir"/usr/share/applications } sha512sums=" a3543ab30f9a29052567b6bdc31c8ffd50e0f5c2d0e525a4692a6d0d90cedd29250e041005a495c155527524a47674af8dcccb1bfe3c9c690f15d1473d651025 racket-minimal-8.8-src.tgz 3eacfa2fabbadc28942a77fcdc7b79a6dfbcc48d43de6e01140f1a249dc9843e2fb646631bf9b0780d982f185416d9a73a5416b75e95d2d15c6cb12070956917 chez-musl-time_t.patch "