#Maintainer: Shador pkgname=fpc pkgver=2.2.4 pkgrel=1ab arch=i486 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.i386-linux.tar" "fpc.cfg") sourcetemplate="http://gaia.homelinux.org/salix/packages/$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.i386-linux.tar base.i386-linux.tar.gz tar -xf base.i386-linux.tar.gz lib/fpc/2.2.4/ppc386 -O >ppc386 chmod +x ppc386 cd $startdir/src/fpc-$pkgver make all $threads PP=$startdir/src/ppc386 || return 1 make install INSTALL_PREFIX=$startdir/pkg/usr PP=compiler/ppc386 || 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 ../lib/fpc/$pkgver/ppc386 $startdir/pkg/usr/bin/ }