1 # Maintainer: Leonidas <marek@xivilization.net>
5 pkgdesc="Factor is a general purpose, dynamically typed, stack-based programming language."
7 url="http://factorcode.org"
10 conflicts=(factor-git)
11 depends=(pango cairo glib2 freetype2 mesa libgl)
13 source=(http://downloads.factorcode.org/releases/$pkgver/$pkgname-src-$pkgver.zip
17 md5sums=('6c89c27ed3127f9b0f308f3b3dba34a2'
18 '59242ddb19a9be927915e489e2bfca27'
19 '74512251d922434c3a973f06800d6181'
20 '9d297a5b9dd60ec51d91068e82939474')
23 # thanks to qx from #concatenative for the proper SSE settings:
24 # i686: no SSE, x87 floating point => _sseversion=0
25 # x86_64: SSE2 => _sseversion=20
26 _bootimg="boot.unix-x86.32.image"
27 # unfortunately, factor 0.94 needs SSE2 to run, so this needs to be
28 # set (temporarily?) to SSE2
30 [ $CARCH = x86_64 ] && _bootimg="boot.unix-x86.64.image" && _sseversion=20
34 patch -p1 < $srcdir/fuel-factor-vm.patch
38 # bootstrap factor with the minimum supported SSE
39 ./factor -i=$_bootimg -sse-version=$_sseversion
41 mkdir -p $pkgdir/usr/bin
42 mkdir -p $pkgdir/usr/lib/factor
43 mkdir -p $pkgdir/usr/share/licenses/$pkgname/
45 # copy over the stdlib
46 cp -a misc extra core basis factor.image $pkgdir/usr/lib/factor/
47 # make folders r+x and files r
48 chmod -R 0755 $pkgdir/usr/lib/factor
49 find $pkgdir/usr/lib/factor -type f -exec chmod -x {} \;
51 # copy over the actual binary and create a symlink called factor-vm
52 # (otherwise it conflicts with factor from the GNU coreutils)
53 cp -a factor $pkgdir/usr/lib/factor/factor
55 ln -s ../lib/factor/factor factor-vm
58 # copy over the license (as defined in Arch Packaging Standards)
60 cp license.txt $pkgdir/usr/share/licenses/$pkgname/COPYING
62 # add the desktop entry
63 install -D "$srcdir/factor.desktop" "$pkgdir/usr/share/applications/factor.desktop"
64 install -D "$srcdir/factor.png" "$pkgdir/usr/share/pixmaps/factor.png"