blob: 54e0aaa3308d32318bd865af5371406d4bf69074 (
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.2.2
7 release=1
8 source=(https://sourceforge.net/projects/freepascal/files/Source/$version/fpcbuild-$version.tar.gz
9 https://sourceforge.net/projects/freepascal/files/Source/$version/fpc-$version.source.tar.gz
10 https://sourceforge.net/projects/freepascal/files/Linux/$version/$name-$version.x86_64-linux.tar)
11
12 build() {
13 JOBS='-j1'
14
15 tar -xf fpc-$version.x86_64-linux/binary.x86_64-linux.tar
16 tar -xzf base.x86_64-linux.tar.gz
17 tar -xzf utils-fpcm.x86_64-linux.tar.gz
18
19 # use precompiled fpc to build fpc if it's not installed on the host already
20 [ ! -e /usr/bin/fpc ] && PATH="$SRC/bin:$PATH"
21
22 cd fpcbuild-$version/fpcsrc/
23
24 make $JOBS PP=$SRC/lib/fpc/$version/ppcx64 build
25
26 cp $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
27 $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
28
29 make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new build
30 rm $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
31
32 make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl_clean
33 make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl packages_all utils
34
35 set -- PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
36 INSTALL_PREFIX=$PKG/usr \
37 INSTALL_DOCDIR=$PKG/usr/share/doc/fpcbuild \
38 INSTALL_MANDIR=$PKG/usr/share/man \
39 INSTALL_SOURCEDIR=$PKG/usr/lib/fpc/fpcbuild-$version/source
40
41 make $JOBS "$@" compiler_install rtl_install packages_install utils_install
42 ln -sf /usr/lib/fpc/$version/ppcx64 $PKG/usr/bin/ppcx64
43
44 rm -r $PKG/usr/share/doc
45 }
|