#Maintainer: Shador pkgname=fpc pkgver=2.2.4 pkgrel=1ab arch=x86_64 source=("http://sourceforge.net/projects/freepascal/files/Source/2.2.4/fpc-2.2.4.source.tar.gz" "http://downloads.sourceforge.net/project/freepascal/Linux/2.2.4/fpc-2.2.4.x86_64-linux.tar" "fpc.cfg") sourcetemplate="http://gaia.homelinux.org/salix/packages-x86_64/$pkgname/$pkgver/" #docs=("readme" "install" "copying" "changelog" "authors" "news" "todo") url='http://www.freepascal.org/' slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname - Free Pascal compiler" "Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal" "compiler. It is available for different processors: Intel x86," "Amd64/x86_64, PowerPC, Sparc. The discontinued 1.0 version also" "supports the Motorola 680x0. The following operating systems are" "supported: Linux, FreeBSD, Mac OS X/Darwin, Mac OS classic,DOS," "win32, OS/2, Netware (libc and classic) and MorphOS." ) build() { threadcount=$(($(sed -ne '/cpu cores/h;${g;s/[^0-9]*//p}' \ < /proc/cpuinfo)*2)) if [ $threadcount -lt 2 ]; then threadcount=2 elif [ $threadcount -gt 8 ]; then threadcount=8 fi threads="-j${threadcount}" # bootstrap compiler cd $startdir/src tar -xf binary.x86_64-linux.tar base.x86_64-linux.tar.gz tar -xf base.x86_64-linux.tar.gz lib/fpc/2.2.4/ppcx64 -O >ppcx64 chmod +x ppcx64 cd $startdir/src/fpc-$pkgver INSTALLOPTS="INSTALL_PREFIX=$startdir/pkg/usr INSTALL_LIBDIR=$startdir/pkg/usr/lib64 INSTALL_BASEDIR=$startdir/pkg/usr/lib64/fpc/${pkgver}" make all $threads PP=$startdir/src/ppcx64 ${INSTALLOPTS} || return 1 make install PP=compiler/ppcx64 ${INSTALLOPTS} || return 1 # post fixes install -vD -m644 $startdir/src/fpc.cfg $startdir/pkg/etc/fpc.cfg install -vd $startdir/pkg/usr/doc mv $startdir/pkg/usr/share/doc/fpc-$pkgver/ $startdir/pkg/usr/doc/fpc-$pkgver/ rmdir $startdir/pkg/usr/share/doc ln -s ../lib64/fpc/$pkgver/ppcx64 $startdir/pkg/usr/bin/ }