void-packages/srcpkgs/factor/template
2018-10-06 11:16:31 +02:00

49 lines
1.3 KiB
Bash

# Template file for 'factor'
pkgname=factor
version=0.98
revision=1
only_for_archs="i686 x86_64"
build_style=gnu-makefile
hostmakedepends="unzip pkg-config"
makedepends="gtk+-devel gtkglext-devel"
depends="gtk+-devel gtkglext-devel"
wrksrc="factor"
nostrip_files="a.elf"
short_desc="Concatenative programming language, similar to Forth"
maintainer="B. Wilson <x@wilsonb.com>"
license="BSD-2-Clause"
homepage="http://factorcode.org/"
distfiles="http://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip"
checksum=318fb8cdf84528fce17a83f7e9d76e55292ccc779c71d180d99a6465574d3706
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
}