community/fpc to 3.0.2-1

This commit is contained in:
Kevin Mihelich 2017-02-16 13:34:53 +00:00
parent 06b7cced18
commit 305c8801e2

View file

@ -12,9 +12,9 @@
# - build for armhf on v6/v7
pkgname=fpc
pkgver=3.0.0
pkgver=3.0.2
_gdbver=7.10
pkgrel=1.1
pkgrel=1
pkgdesc="The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit Pascal Compiler. It comes with fully TP 7.0 compatible run-time library."
arch=('i686' 'x86_64')
url="http://www.freepascal.org/"
@ -23,23 +23,25 @@ backup=("etc/fpc.cfg")
depends=(ncurses zlib expat)
makedepends=(fpc)
options=(zipman staticlibs)
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3')
source=(ftp://ftp.freepascal.org/pub/fpc/dist/$pkgver/source/fpcbuild-$pkgver.tar.gz
http://ftp.gnu.org/gnu/gdb/gdb-${_gdbver}.tar.xz
https://ftp.gnu.org/gnu/gdb/gdb-${_gdbver}.tar.xz{,.sig}
fpc-gdb.patch)
md5sums=('bb7d17ef5c7c007466368262c0779cb7'
'2a35bac41fa8e10bf04f3a0dd7f7f363'
'1e45ece6b5d4ee60b860e75926b4122d')
sha256sums=('f261ed0a361f190169fff428d65b707df1507df317fc0ed101b0e63596541b75'
'7ebdaa44f9786ce0c142da4e36797d2020c55fa091905ac5af1846b5756208a8'
'SKIP'
'da73eed880c8d1f0f6ab0b78f72ea380ebe514fc524cfd87678de38939f8fbc7')
build() {
cd ${srcdir}/gdb-${_gdbver}
cd "$srcdir"/gdb-${_gdbver}
# ./configure --prefix=/usr --disable-nls --without-python --disable-werror --disable-tui
# make
# make -C gdb libgdb.a
# cp libdecnumber/libdecnumber.a gdb/
cd ${srcdir}/fpcbuild-$pkgver
# patch -p1 <$srcdir/fpc-gdb.patch
export GDBLIBDIR=${srcdir}/gdb-${_gdbver}/gdb
cd "$srcdir"/fpcbuild-$pkgver
# patch -p1 <"$srcdir"/fpc-gdb.patch
export GDBLIBDIR="$srcdir"/gdb-${_gdbver}/gdb
export LIBGDBFILE=$GDBLIBDIR/libgdb.a
[[ $CARCH == "armv7h" || $CARCH == "armv6h" ]] && EXTRA="OPT=-dFPC_ARMHF"
pushd fpcsrc/compiler
@ -49,27 +51,27 @@ build() {
}
package() {
cd ${srcdir}/fpcbuild-$pkgver
cd "$srcdir"/fpcbuild-$pkgver
export HOME=$srcdir
export HOME="$srcdir"
make -j1 PREFIX=${pkgdir}/usr install
make -j1 PREFIX="$pkgdir"/usr install
export PATH=$pkgdir/usr/bin:$PATH
export PATH="$pkgdir"/usr/bin:$PATH
install -Dm0644 fpcsrc/rtl/COPYING.FPC ${pkgdir}/usr/share/licenses/${pkgname}/COPYING.FPC
install -Dm0644 fpcsrc/rtl/COPYING.FPC "$pkgdir"/usr/share/licenses/${pkgname}/COPYING.FPC
[ "$CARCH" = "i686" ] && ln -s /usr/lib/fpc/${pkgver}/ppc386 ${pkgdir}/usr/bin/
[ "$CARCH" = "x86_64" ] && ln -s /usr/lib/fpc/${pkgver}/ppcx64 ${pkgdir}/usr/bin/
[ "$CARCH" = "arm" -o "$CARCH" = "armv6h" -o "$CARCH" = "armv7h" ] && ln -s /usr/lib/fpc/${pkgver}/ppcarm ${pkgdir}/usr/bin/
[ "$CARCH" = "i686" ] && ln -s /usr/lib/fpc/${pkgver}/ppc386 "$pkgdir"/usr/bin/
[ "$CARCH" = "x86_64" ] && ln -s /usr/lib/fpc/${pkgver}/ppcx64 "$pkgdir"/usr/bin/
[ "$CARCH" = "arm" -o "$CARCH" = "armv6h" -o "$CARCH" = "armv7h" ] && ln -s /usr/lib/fpc/${pkgver}/ppcarm "$pkgdir"/usr/bin/
mkdir -p ${pkgdir}/etc
${pkgdir}/usr/lib/fpc/${pkgver}/samplecfg $pkgdir/usr/lib/fpc/${pkgver} ${pkgdir}/etc
mkdir -p "$pkgdir"/etc
"$pkgdir"/usr/lib/fpc/${pkgver}/samplecfg "$pkgdir"/usr/lib/fpc/${pkgver} "$pkgdir"/etc
# use -fPIC by default
echo -e "#ifdef cpux86_64\n# for x86_64 use -fPIC by default\n-Cg\n#endif" >> "$pkgdir/etc/fpc.cfg"
mv $pkgdir/usr/man $pkgdir/usr/share/
mv "$pkgdir"/usr/man "$pkgdir"/usr/share/
find $pkgdir/etc/ -type f -exec sed -i "s|$pkgdir||g" {} \;
find "$pkgdir"/etc/ -type f -exec sed -i "s|"$pkgdir"||g" {} \;
}