contrib/fpc/Pkgfile
2019-05-04 14:57:56 +10:00

44 lines
1.4 KiB
Plaintext

# Description: Free Pascal compiler.
# URL: https://www.freepascal.org/
# Maintainer: Danny Rawlins, crux at romster dot me
name=fpc
version=3.0.4
release=1
source=(
https://sourceforge.net/projects/freepascal/files/Source/$version/fpcbuild-$version.tar.gz
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
)
build() {
JOBS='-j1'
tar -xf fpc-$version.x86_64-linux/binary.x86_64-linux.tar
tar -xzf base.x86_64-linux.tar.gz
cd fpcbuild-$version/fpcsrc/
make $JOBS PP=$SRC/lib/fpc/$version/ppcx64 build
cp $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new build
rm $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl_clean
make $JOBS PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl packages_all utils
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
make $JOBS "$@" compiler_install rtl_install packages_install utils_install
ln -sf /usr/lib/fpc/$version/ppcx64 $PKG/usr/bin/ppcx64
rm -r $PKG/usr/share/doc
}