# Description: A Free Pascal compiler. # URL: http://www.freepascal.org/ # Packager: Danny Rawlins, crux at romster dot me # Maintainer: Erich Eckner, crux at eckner dot net name=fpc-cross version=2.6.4 release=1 source=(ftp://ftp.freepascal.org/pub/fpc/dist/$version/source/fpcbuild-$version.tar.gz) build() { cp -a "$SRC/fpcbuild-$version" "$SRC/fpcbuild-$version-win64" mv "$SRC/fpcbuild-$version" "$SRC/fpcbuild-$version-win32" for architecture in win32:i386 win64:x86_64; do cd "$SRC/fpcbuild-$version-${architecture%:*}" pushd fpcsrc/compiler export OS_TARGET="${architecture%:*}" export CPU_TARGET="${architecture#*:}" fpcmake -Tall popd make build NOGDB=1 export HOME="$SRC" make -j1 PREFIX="$PKG/usr" crossinstall NOGDB=1 done find "$PKG" -name '*.exe' -delete sed 's,^-\S\+\s\+\S\+\s\+,'"$PKG"'/,;t;d' $(prt-get path fpc)/.footprint \ | xargs -rn1 rm -f ln -s "/usr/lib/fpc/${version}/ppcrossx64" "$PKG/usr/bin/" ln -s "/usr/lib/fpc/${version}/ppcross386" "$PKG/usr/bin/" find "$PKG" -type f \ | sed 's,^\./,/,' }