2019-05-04 14:57:56 +10:00
|
|
|
# Description: Free Pascal compiler.
|
|
|
|
# URL: https://www.freepascal.org/
|
2014-11-10 23:28:07 +11:00
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2010-04-04 16:33:04 +10:00
|
|
|
|
|
|
|
name=fpc
|
2021-06-27 19:00:28 +00:00
|
|
|
version=3.2.2
|
2012-04-19 18:24:20 +10:00
|
|
|
release=1
|
2021-06-27 19:00:28 +00:00
|
|
|
source=(https://sourceforge.net/projects/freepascal/files/Source/$version/fpcbuild-$version.tar.gz
|
2019-05-04 14:57:56 +10:00
|
|
|
https://sourceforge.net/projects/freepascal/files/Source/$version/fpc-$version.source.tar.gz
|
2021-06-27 19:00:28 +00:00
|
|
|
https://sourceforge.net/projects/freepascal/files/Linux/$version/$name-$version.x86_64-linux.tar)
|
2010-04-04 16:33:04 +10:00
|
|
|
|
|
|
|
build() {
|
2019-05-04 14:57:56 +10:00
|
|
|
JOBS='-j1'
|
2010-04-04 16:33:04 +10:00
|
|
|
|
2021-06-27 19:00:28 +00:00
|
|
|
tar -xf fpc-$version.x86_64-linux/binary.x86_64-linux.tar
|
2019-05-04 14:57:56 +10:00
|
|
|
tar -xzf base.x86_64-linux.tar.gz
|
2020-07-22 19:21:18 +10:00
|
|
|
tar -xzf utils-fpcm.x86_64-linux.tar.gz
|
|
|
|
|
|
|
|
# use precompiled fpc to build fpc if it's not installed on the host already
|
|
|
|
[ ! -e /usr/bin/fpc ] && PATH="$SRC/bin:$PATH"
|
2010-04-04 16:33:04 +10:00
|
|
|
|
|
|
|
cd fpcbuild-$version/fpcsrc/
|
2020-05-25 23:20:29 +00:00
|
|
|
|
2019-05-04 14:57:56 +10:00
|
|
|
make $JOBS PP=$SRC/lib/fpc/$version/ppcx64 build
|
2010-04-04 16:33:04 +10:00
|
|
|
|
2014-01-24 23:44:54 +11:00
|
|
|
cp $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
|
|
|
|
$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
|
2010-04-04 16:33:04 +10:00
|
|
|
|
2019-05-04 14:57:56 +10:00
|
|
|
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new build
|
2014-01-24 23:44:54 +11:00
|
|
|
rm $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
|
2010-04-04 16:33:04 +10:00
|
|
|
|
2019-05-04 14:57:56 +10:00
|
|
|
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl_clean
|
|
|
|
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl packages_all utils
|
2010-04-04 16:33:04 +10:00
|
|
|
|
2014-01-24 23:44:54 +11:00
|
|
|
set -- PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
|
2010-04-04 16:33:04 +10:00
|
|
|
INSTALL_PREFIX=$PKG/usr \
|
|
|
|
INSTALL_DOCDIR=$PKG/usr/share/doc/fpcbuild \
|
|
|
|
INSTALL_MANDIR=$PKG/usr/share/man \
|
|
|
|
INSTALL_SOURCEDIR=$PKG/usr/lib/fpc/fpcbuild-$version/source
|
|
|
|
|
2019-05-04 14:57:56 +10:00
|
|
|
make $JOBS "$@" compiler_install rtl_install packages_install utils_install
|
2014-01-24 23:44:54 +11:00
|
|
|
ln -sf /usr/lib/fpc/$version/ppcx64 $PKG/usr/bin/ppcx64
|
2019-05-04 14:57:56 +10:00
|
|
|
|
|
|
|
rm -r $PKG/usr/share/doc
|
2010-04-04 16:33:04 +10:00
|
|
|
}
|