# 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=6.12 pkgrel=4 pkgdesc="A general purpose programming language in the Lisp-Scheme family" url="https://racket-lang.org/" arch="all" license="LGPL-3.0-or-later MIT" depends="ca-certificates libressl3.0-libcrypto libressl3.0-libssl" makedepends="chrpath libffi-dev libucontext-dev paxmark" subpackages="$pkgname-dev $pkgname-doc" source="https://download.racket-lang.org/releases/$pkgver/installers/racket-minimal-$pkgver-src.tgz paxmark.patch musl-fixes.patch makefile-fix-bashism.patch libressl.patch" prepare() { default_prepare # 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 # Needed when running on Grsecurity kernel. paxmark m usr/bin/racket paxmark m usr/lib/racket/gracket mkdir -p usr/share/licenses/$pkgname mv usr/share/racket/COPYING* usr/share/licenses/$pkgname/ rm -Rf usr/share/applications } sha512sums="f342f0e475abb8ceb692cc66cde8d0741f0b106721210d427b569453ead642bbb951dd182378bcb468c53e170c2691cf05a64ccd49fc5a701ff24047874eb82a racket-minimal-6.12-src.tgz ff7804e37cbab237921f7d4c334f6cbb2909e9284b7b2cec1dfd3e73ec189b8ecf0cb0cabd1abedb09020f2a57ad4c32088ea73e5cb71afdafce39a7a718b10c paxmark.patch 6af0ae984ac54f167f0513795905e9dc845e1c1554935f73958d4e21c5fad35eca791866cfdf94dfcee586ec28335d90520d769010c63cd6ab528e6be3f2c21c musl-fixes.patch 1a96718e6a065bd08f0ff046e799fd4d7657d99789b2cdda8cf7cdd8c2d91742dd34fb43f4c6fabde89a764e073bdecdd96e2caeee49feaac242d30b17d6422b makefile-fix-bashism.patch 780f9d0336acfe887a30ed044df93adbc4a09a5154b5edf034b225a7de350788077820d9f8cc633d2527015e30348bd7b083991e77caa88871ddc5cf899d07f3 libressl.patch"