diff options
author | Erich Eckner <git@eckner.net> | 2018-10-09 16:12:12 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-09 16:12:12 +0200 |
commit | f150ff131d2a36b580508da94d9c4ab598638d95 (patch) | |
tree | e2ed949841e32ef3b1ddd60208449d4c4f218536 | |
parent | ad34838ea61a3bf7c5dc28ff01d3842d8e88e792 (diff) | |
download | archlinuxewe-f150ff131d2a36b580508da94d9c4ab598638d95.tar.xz |
fpc-cross new as split package
-rw-r--r-- | fpc-cross/PKGBUILD | 107 | ||||
-rw-r--r-- | fpc-win32/PKGBUILD | 64 | ||||
-rw-r--r-- | fpc-win64/PKGBUILD | 64 |
3 files changed, 107 insertions, 128 deletions
diff --git a/fpc-cross/PKGBUILD b/fpc-cross/PKGBUILD new file mode 100644 index 000000000..ec5d979e5 --- /dev/null +++ b/fpc-cross/PKGBUILD @@ -0,0 +1,107 @@ +# 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 + +pkgbase=fpc-cross +pkgname=(fpc-cross-common fpc-win32 fpc-win64) +pkgver=3.0.4 +pkgrel=1 +arch=('i686' 'x86_64') +url="http://www.freepascal.org/" +license=('GPL' 'LGPL' 'custom') +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') + +prepare() { + cp -a "$srcdir/fpcbuild-$pkgver" "$srcdir/fpcbuild-$pkgver-win64" + mv "$srcdir/fpcbuild-$pkgver" "$srcdir/fpcbuild-$pkgver-win32" +} + +build() { + for architecture in win32:i386 win64:x86_64; do + ( + cd "$srcdir/fpcbuild-$pkgver-${architecture%:*}" + pushd fpcsrc/compiler + export OS_TARGET="${architecture%:*}" + export CPU_TARGET="${architecture#*:}" + fpcmake -Tall + popd + make build NOGDB=1 + + mkdir "$srcdir/pkg-${architecture%:*}" + export HOME="$srcdir" + + make -j1 PREFIX="$srcdir/pkg-${architecture%:*}/usr" install NOGDB=1 + + export PATH="$srcdir/pkg-${architecture%:*}/usr/bin:$PATH" + + install -Dm0644 fpcsrc/rtl/COPYING.FPC "$srcdir/pkg-${architecture%:*}/usr/share/licenses/${pkgname}/COPYING.FPC" + find "$srcdir/pkg-${architecture%:*}" -name '*.exe' -delete + + { + pacman -Qql fpc | \ + grep -v '/$' + cd "$srcdir/pkg-${architecture%:*}" + find . -type f | \ + sed 's,^\./,/,' + } | \ + sort | \ + uniq -d | \ + while read -r file; do + if ! diff -u --color "${file}" "$srcdir/pkg-${architecture%:*}${file}"; then + exit 1 + fi + rm "$srcdir/pkg-${architecture%:*}${file}" + done + ) || exit $? + done + ln -s "/usr/lib/fpc/${pkgver}/ppcrossx64" "$srcdir/pkg-win64/usr/bin/" + ln -s "/usr/lib/fpc/${pkgver}/ppcrossx32" "$srcdir/pkg-win32/usr/bin/" + mkdir "$srcdir/pkg-common" + { + cd "$srcdir/pkg-win64" + find . -type f | \ + sed 's,^\./,/,' + cd "$srcdir/pkg-win32" + find . -type f | \ + sed 's,^\./,/,' + } | \ + sort | \ + uniq -d | \ + while read -r file; do + if ! diff -u --color "$srcdir/pkg-win32${file}" "$srcdir/pkg-win64${file}"; then + exit 1 + fi + rm "$srcdir/pkg-win32${file}" + mkdir -p "$srcdir/pkg-common${file%/*}" + mv "$srcdir/pkg-win64${file}" "$srcdir/pkg-common${file}" + done +} + +_package() { + pkgdesc="Free Pascal Compiler, Turbo Pascal 7.0 and Delphi compatible - cross compiler for $1 target." + depends+=("fpc-cross-common=${pkgver}") + + mv "$srcdir/pkg-$1" "$pkgdir" +} + +package_fpc-cross-common() { + pkgdesc="Common files for fpc-win32 and fpc-win64 cross compilers." + mv "$srcdir/pkg-common" "$pkgdir" +} + +package_fpc-win64() { + _package win64 +} + +package_fpc-win32() { + _package win32 +} diff --git a/fpc-win32/PKGBUILD b/fpc-win32/PKGBUILD deleted file mode 100644 index 060f8d375..000000000 --- a/fpc-win32/PKGBUILD +++ /dev/null @@ -1,64 +0,0 @@ -# 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=win32 - export CPU_TARGET=i386 - 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 - - find "$pkgdir"/usr/bin -name '*.exe' -delete - - 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 -} diff --git a/fpc-win64/PKGBUILD b/fpc-win64/PKGBUILD deleted file mode 100644 index abefc72fd..000000000 --- a/fpc-win64/PKGBUILD +++ /dev/null @@ -1,64 +0,0 @@ -# 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 - - find "$pkgdir"/usr/bin -name '*.exe' -delete - - 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 -} |