1 # Contributor: Artyom Smirnov <smirnoffjr@gmail.com>
5 pkgdesc="The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible Pascal compiler."
7 url="http://www.freepascal.org/"
8 license=('GPL' 'LGPL' 'custom')
10 makedepends=('fpc>=2.2')
13 backup=('etc/fpc.cfg')
18 _svntrunk=http://svn.freepascal.org/svn/fpc/trunk
24 if [ -d $_svnmod/.svn ]; then
25 (cd $_svnmod && svn up -r $pkgver)
27 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
30 msg "SVN checkout done or server timeout"
31 msg "Starting make..."
33 rm -r "$srcdir/$_svnmod-build"
34 cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
35 cd "$srcdir/$_svnmod-build"
40 make build || return 1
41 make PREFIX=${pkgdir}/usr install || return 1
43 # install package license
44 install -m 755 -d ${pkgdir}/usr/share/licenses/${pkgname}
45 install -m 644 rtl/COPYING.FPC ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
47 [ "$CARCH" = "i686" ] && _ppcbin=ppc386
48 [ "$CARCH" = "x86_64" ] && _ppcbin=ppcx64
50 _ppcver=`${srcdir}/${_svnmod}-build/compiler/${_ppcbin} --version|head -n1|awk '{print $5}'`
52 # create symlink for compiler
53 ln -s /usr/lib/fpc/${_ppcver}/${_ppcbin} ${pkgdir}/usr/bin/
55 # install sample config file
56 mkdir -p ${pkgdir}/etc
58 ${pkgdir}/usr/lib/fpc/${_ppcver}/samplecfg /usr/lib/fpc/${_ppcver} ${pkgdir}/etc || return 1