# Contributor: Sören Tempel # Contributor: Eric Timmons # Contributor: Will Sinatra # Maintainer: Will Sinatra pkgname=sbcl pkgver=2.0.1 pkgrel=1 pkgdesc="Steel Bank Common Lisp" url="http://www.sbcl.org/" arch="x86_64 armv7" #aarch64 is WIP license="custom" options="!check" checkdepends="ed" makedepends="ecl ecl-dev gmp-dev gc gc-dev libffi-dev linux-headers paxmark zlib-dev" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.bz2::https://prdownloads.sourceforge.net/sbcl/sbcl-$pkgver-source.tar.bz2 0001-Fix-sb-bsd-sockets-on-musl-libc.patch 0002-Fix-threads-on-musl-libc.patch 0003-Fix-foreign-tests-on-musl-libc.patch 0004-Only-include-old-memcpy-version-on-glibc.patch Disable-fcntl.1-POSIX-test.patch Fix-ARM-build-using-ECL-host.patch march-armv5-removed.patch" prepare() { #TODO: handle this properly #Patches to build on musl libc, required universally, pending upstream patch -p1 -i "$srcdir"/0001-Fix-sb-bsd-sockets-on-musl-libc.patch patch -p1 -i "$srcdir"/0002-Fix-threads-on-musl-libc.patch patch -p1 -i "$srcdir"/0003-Fix-foreign-tests-on-musl-libc.patch patch -p1 -i "$srcdir"/0004-Only-include-old-memcpy-version-on-glibc.patch #Arch specific patches required by platform case "$CARCH" in armv7) patch -p1 -i "$srcdir"/Disable-fcntl.1-POSIX-test.patch patch -p1 -i "$srcdir"/Fix-ARM-build-using-ECL-host.patch patch -p1 -i "$srcdir"/march-armv5-removed.patch ;; aarch64) patch -p1 -i "$srcdir"/Fix-ARM-build-using-ECL-host.patch ;; esac } build() { all_arch_conf='--with-sb-test --with-sb-unicode --with-sb-core-compression' case "$CARCH" in armv7) conf="$all_arch_conf" ;; aarch64) conf="--prefix=/usr" ;; *) conf="$all_arch_conf --with-sb-thread" ;; esac GNUMAKE=make ./make.sh ecl --prefix=/usr $conf } package() { INSTALL_ROOT="$pkgdir/usr" \ LIB_DIR="/usr/lib" \ DOC_DIR="$pkgdir/usr/share/doc/$pkgname" \ sh install.sh paxmark -rm "$pkgdir"/usr/bin/sbcl install -Dm644 COPYING \ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt rmdir "$pkgdir"/usr/share/doc/sbcl/html \ "$pkgdir"/usr/share/info 2>/dev/null || true } sha512sums="1d92589033e123c21377f820dbc22e27f2610a372c5545799bec7c247795ba4b8b65102c7fe739f4a15a84579ec72f63fb9f4b197db5c6da1f8d59bd35966bea sbcl-2.0.1.tar.bz2 76ccb2206f0a9abd3f74859c9db3d8622e7006a62f867f6cf2398ce16256800a880111f5ea3911a315f6f82eb4b2b77dbeeb73f609ec065421b11978fd6fe18f 0001-Fix-sb-bsd-sockets-on-musl-libc.patch 4caa863e5e44170b4ca8f9a3199886303e02821edbc0c7866ac1013681cfaeb76153856a28bff632f2f396d39ee05ac0e427393716209db8e3f0bc640f4816ec 0002-Fix-threads-on-musl-libc.patch 7686f3110c1b6920790257d6b938b701afb4ea1710e0057c74f19f107affa0cfaaf2519215df9f9d5b6f326ee9feb1d935ffb8152390560f22e3188db9759065 0003-Fix-foreign-tests-on-musl-libc.patch 02452684bccc200c0117252019679b0cf0403a90e5fb97f0981cb658888e73e7792efc47ae82f01cdaec128b1b3e356b0878fdb07cf04d7c5fdd0b2afd97186f 0004-Only-include-old-memcpy-version-on-glibc.patch cffecafd3f902d5f2be05fde3c0c5d0e0b0b8bb57d9561296ea9e630490c9a02c79ec616ca9c41de8d8be204e9e019df14e5d621adaa3dc444853f2cb5a6101c Disable-fcntl.1-POSIX-test.patch 6f49d1f1c6bd4e8d839e6b4ab3bb74cbdcce85ee83a0f1c5efab04d97b613a624f8874dadd7f6d981940ff28c468f00b74a56ff2afc53f41884d753ac7a5028f Fix-ARM-build-using-ECL-host.patch 367454a75de122134fdbf1064182a96ee00cf0685db0922134fdbdfc0e0bb2c6a5cfb9878f23409eca48a443e0f19b291f8d380e3475176a4c8cea0c9768c2bd march-armv5-removed.patch"