blob: 81a8b15517a134a82c3490d266338700af010fea (
plain)
1 # Description: Free Pascal compiler.
2 # URL: https://www.freepascal.org/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4
5 name=fpc
6 version=3.0.4
7 release=1
8 source=(
9 https://sourceforge.net/projects/freepascal/files/Source/$version/fpcbuild-$version.tar.gz
10 https://sourceforge.net/projects/freepascal/files/Source/$version/fpc-$version.source.tar.gz
11 https://sourceforge.net/projects/freepascal/files/Linux/$version/$name-$version.x86_64-linux.tar
12 )
13
14 build() {
15 JOBS='-j1'
16
17 tar -xf fpc-$version.x86_64-linux/binary.x86_64-linux.tar
18 tar -xzf base.x86_64-linux.tar.gz
19
20 cd fpcbuild-$version/fpcsrc/
21
22 make $JOBS PP=$SRC/lib/fpc/$version/ppcx64 build
23
24 cp $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
25 $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
26
27 make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new build
28 rm $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
29
30 make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl_clean
31 make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl packages_all utils
32
33 set -- PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
34 INSTALL_PREFIX=$PKG/usr \
35 INSTALL_DOCDIR=$PKG/usr/share/doc/fpcbuild \
36 INSTALL_MANDIR=$PKG/usr/share/man \
37 INSTALL_SOURCEDIR=$PKG/usr/lib/fpc/fpcbuild-$version/source
38
39 make $JOBS "$@" compiler_install rtl_install packages_install utils_install
40 ln -sf /usr/lib/fpc/$version/ppcx64 $PKG/usr/bin/ppcx64
41
42 rm -r $PKG/usr/share/doc
43 }
|