void-packages/srcpkgs/factor/template

49 lines
1.3 KiB
Bash

# Template file for 'factor'
pkgname=factor
version=0.99
revision=1
archs="i686 x86_64"
build_style=gnu-makefile
hostmakedepends="unzip pkg-config"
makedepends="gtk+-devel gtkglext-devel"
depends="gtk+-devel gtkglext-devel"
short_desc="Concatenative programming language, similar to Forth"
maintainer="B. Wilson <x@wilsonb.com>"
license="BSD-2-Clause"
homepage="https://factorcode.org/"
distfiles="https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip"
checksum=f5626bb3119bd77de9ac3392fdbe188bffc26557fab3ea34f7ca21e372a8443e
nostrip_files="a.elf"
post_build() {
image=''
case "${XBPS_TARGET_MACHINE}" in
i686*) image='boot.unix-x86.32.image'
sse_version=0;;
x86_64*) image='boot.unix-x86.64.image'
sse_version=20;;
*) return 1;;
esac
touch /etc/ld.so.cache
./factor -i="${image}" -sse-version="${sse_version}"
}
do_install() {
vmkdir "usr/lib/${pkgname}"
vcopy misc "usr/lib/${pkgname}"
vcopy extra "usr/lib/${pkgname}"
vcopy core "usr/lib/${pkgname}"
vcopy basis "usr/lib/${pkgname}"
vinstall factor 755 "usr/lib/${pkgname}"
vinstall factor.image 644 "usr/lib/${pkgname}"
vmkdir usr/bin
ln -sr "${DESTDIR}/usr/lib/${pkgname}/factor" \
"${DESTDIR}/usr/bin/factor-vm"
vlicense LICENSE.txt
}