contrib/fpc/Pkgfile

46 lines
1.6 KiB
Plaintext
Raw Normal View History

2019-05-04 06:57:56 +02:00
# Description: Free Pascal compiler.
# URL: https://www.freepascal.org/
2023-08-18 19:59:15 +02:00
# Maintainer: unmaintained
2010-04-04 08:33:04 +02:00
name=fpc
2021-06-27 21:00:28 +02:00
version=3.2.2
2012-04-19 10:24:20 +02:00
release=1
2021-06-27 21:00:28 +02:00
source=(https://sourceforge.net/projects/freepascal/files/Source/$version/fpcbuild-$version.tar.gz
2023-08-18 19:59:15 +02:00
https://sourceforge.net/projects/freepascal/files/Source/$version/fpc-$version.source.tar.gz
https://sourceforge.net/projects/freepascal/files/Linux/$version/$name-$version.x86_64-linux.tar)
2010-04-04 08:33:04 +02:00
build() {
2023-08-18 19:59:15 +02:00
JOBS='-j1'
2010-04-04 08:33:04 +02:00
2023-08-18 19:59:15 +02:00
tar -xf fpc-$version.x86_64-linux/binary.x86_64-linux.tar
tar -xzf base.x86_64-linux.tar.gz
tar -xzf utils-fpcm.x86_64-linux.tar.gz
2020-07-22 11:21:18 +02:00
2023-08-18 19:59:15 +02:00
# 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 08:33:04 +02:00
2023-08-18 19:59:15 +02:00
cd fpcbuild-$version/fpcsrc/
2020-05-26 01:20:29 +02:00
2023-08-18 19:59:15 +02:00
make $JOBS PP=$SRC/lib/fpc/$version/ppcx64 build
2010-04-04 08:33:04 +02:00
2023-08-18 19:59:15 +02:00
cp $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
2010-04-04 08:33:04 +02:00
2023-08-18 19:59:15 +02:00
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new build
rm $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
2010-04-04 08:33:04 +02:00
2023-08-18 19:59:15 +02: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 08:33:04 +02:00
2023-08-18 19:59:15 +02:00
set -- PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
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
2010-04-04 08:33:04 +02:00
2023-08-18 19:59:15 +02:00
make $JOBS "$@" compiler_install rtl_install packages_install utils_install
ln -sf /usr/lib/fpc/$version/ppcx64 $PKG/usr/bin/ppcx64
2019-05-04 06:57:56 +02:00
2023-08-18 19:59:15 +02:00
rm -r $PKG/usr/share/doc
2010-04-04 08:33:04 +02:00
}