diff options
Diffstat (limited to 'fpc-win64/PKGBUILD')
-rw-r--r-- | fpc-win64/PKGBUILD | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/fpc-win64/PKGBUILD b/fpc-win64/PKGBUILD new file mode 100644 index 000000000..43b89b265 --- /dev/null +++ b/fpc-win64/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: BlackIkeEagle <ike DOT devolder AT gmail DOT com> +# Contributor: Valeriy Lyasotskiy <onestep@ukr.net> +# Contributor: Jan Willemson <janwil@hot.ee> +# Contributor: Hugo Ideler <hugoideler@dse.nl> +# Original PKGBUILD: Andre Naumann <anaumann@SPARCed.org> +# 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 +} |