# Maintainer: Erich Eckner # Contributor: Sergej Pupykin # Contributor: BlackIkeEagle # Contributor: Valeriy Lyasotskiy # Contributor: Jan Willemson # Contributor: Hugo Ideler # Original PKGBUILD: Andre Naumann # See http://bbs.archlinux.org/viewtopic.php?t=9318&highlight=fpc pkgname=fpc-win64 pkgver=3.0.4 pkgrel=1 pkgdesc="Free Pascal Compiler, Turbo Pascal 7.0 and Delphi compatible - cross compiler for win64 target." arch=('i686' 'x86_64') url="http://www.freepascal.org/" license=('GPL' 'LGPL' 'custom') backup=("etc/fpc.cfg") depends=('ncurses' 'zlib' 'expat' 'binutils' 'make') makedepends=("fpc=${pkgver}") options=(zipman staticlibs) source=(ftp://ftp.freepascal.org/pub/fpc/dist/$pkgver/source/fpcbuild-$pkgver.tar.gz) sha256sums=('f66514e6f2c2e4e1bccccb4d554c24b77682ed61c87811ae5dd210f421855e76') build() { cd "$srcdir"/fpcbuild-$pkgver pushd fpcsrc/compiler export OS_TARGET=win64 export CPU_TARGET=x86_64 fpcmake -Tall popd make build NOGDB=1 } package() { cd "$srcdir"/fpcbuild-$pkgver export HOME="$srcdir" make -j1 PREFIX="$pkgdir"/usr install NOGDB=1 export PATH="$pkgdir"/usr/bin:$PATH install -Dm0644 fpcsrc/rtl/COPYING.FPC "$pkgdir"/usr/share/licenses/${pkgname}/COPYING.FPC ln -s /usr/lib/fpc/${pkgver}/ppcrossx64 "$pkgdir"/usr/bin/ { pacman -Qql fpc | \ grep -v '/$' cd "${pkgdir}" find . -type f | \ sed 's,^\./,/,' } | \ sort | \ uniq -d | \ while read -r file; do if ! diff -u --color "${file}" "${pkgdir}${file}"; then exit 1 fi rm "${pkgdir}${file}" done }