From 27b9f86609460ebae10b25db33f25fc2a8382d3b Mon Sep 17 00:00:00 2001 From: "B. Wilson" Date: Wed, 20 Jun 2018 22:36:44 +0900 Subject: [PATCH] New package: factor-0.97 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #262 [via git-merge-pr] Signed-off-by: Jürgen Buchmüller --- srcpkgs/factor/template | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 srcpkgs/factor/template diff --git a/srcpkgs/factor/template b/srcpkgs/factor/template new file mode 100644 index 00000000000..0d88980cfe6 --- /dev/null +++ b/srcpkgs/factor/template @@ -0,0 +1,49 @@ +# Template file for 'factor' +pkgname=factor +version=0.97 +revision=1 +only_for_archs="i686 x86_64 x86_64-musl" +build_style=gnu-makefile +hostmakedepends="unzip pkg-config" +makedepends="gtkglext-devel" +nostrip_files="a.elf" +short_desc="Concatenative programming language, similar to Forth" +maintainer="B. Wilson " +license="BSD-2-Clause" +homepage="http://factorcode.org/" +distfiles="http://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip" +checksum=fd75e765590691c89b866e5265ae16bfb36d0e28eed095702ae1e206114663b8 + +post_extract() { + mv "${XBPS_BUILDDIR}/factor" "${wrksrc}" +} + +post_build() { + image='' + + case "${XBPS_TARGET_MACHINE}" in + i686*) image='boot.unix-x86.32.image';; + x86_64*) image='boot.unix-x86.64.image';; + *) return 1;; + esac + + touch /etc/ld.so.cache + ./factor -i="${image}" +} + +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 +}