synit/packaging/packages/squeak-cog-vm/APKBUILD

82 lines
2.7 KiB
Plaintext

# Contributor: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=squeak-cog-vm
pkgver=202206021410
pkgrel=0
pkgdesc="Squeak Spur Cog (JIT) Virtual Machine"
url="https://opensmalltalk.org/"
arch="all"
license="MIT"
depends=""
makedepends="git bash linux-headers alsa-lib-dev openssl-dev libevdev-dev mesa-dev libxrandr-dev"
source="
$pkgname-$pkgver.tar.gz::https://github.com/OpenSmalltalk/opensmalltalk-vm/archive/refs/tags/$pkgver.tar.gz
https://files.squeak.org/sources_files/SqueakV50.sources.gz
https://files.squeak.org/sources_files/SqueakV60.sources.gz
"
builddir="$srcdir/opensmalltalk-vm-$pkgver"
options="!check"
build() {
PATH=$(echo "$PATH" | tr ':' '\n' | grep -v crossdirect | tr '\n' ':')
echo 'false' > ./scripts/checkSCCSversion
case "$CARCH" in
aarch64)
cd building/linux64ARMv8
;;
x86_64)
cd building/linux64x64
sed -i \
-e 's:^OPT="\(.*\)":OPT="\1 -DMUSL -D_GNU_SOURCE -DUSEEVDEV":' \
squeak.cog.spur/build/mvm
;;
*)
echo "Architecture $CARCH not yet supported"
exit 1
;;
esac
cd squeak.cog.spur/build
echo Running initial build
(echo y | ./mvm > log.initial-build 2>&1) || true
nn=0
echo Checking to see if ./squeak exists and is executable...
while [ ! -x ./squeak ]
do
echo Running subsequent build $nn
echo n | ./mvm > log.$nn 2>&1
nn=$((nn+1))
done
}
package() {
case "$CARCH" in
aarch64)
cd products/sqcogspur64ARMv8linuxht
;;
x86_64)
cd products/sqcogspur64linuxht
;;
*)
echo "Architecture $CARCH not yet supported"
exit 1
;;
esac
ls -laR
mkdir -p "$pkgdir/usr/lib/squeak"
cp -rp lib/squeak/*/. "$pkgdir/usr/lib/squeak/."
gzip -dc ../../../SqueakV50.sources.gz > "$pkgdir/usr/lib/squeak/SqueakV50.sources"
gzip -dc ../../../SqueakV60.sources.gz > "$pkgdir/usr/lib/squeak/SqueakV60.sources"
mkdir -p "$pkgdir/usr/bin"
ln -sf /usr/lib/squeak/squeak "$pkgdir/usr/bin/squeak"
}
sha512sums="
a72b221eb76178d8d80134b58523bddb5ae480d1497a4b1cbd7079268b9687f3ddf06e391557abcb2e8ec0db972ebbb9529affea8eed41753252ac986abc3905 squeak-cog-vm-202206021410.tar.gz
3571f4c8c11aed1005f885fa0b2eb56cea011eb77c162619e29bd36ecb3161083b7a4808973d08c1271509fc6386d8f5e3b5eabab9193ec56c31c93d1379656e SqueakV50.sources.gz
22272ca74c1a7021b5f49614046e1ca779ddea7cff84ca64c752163ffbdf9c7d5870eb56b7cfb208dc41a3e7ed75ac0623f07cab8054de3ff622885739a0e2c8 SqueakV60.sources.gz
"