core/fpc/PKGBUILD

52 lines
1.5 KiB
Bash
Raw Normal View History

2013-03-25 08:40:01 +08:00
# Maintainer: Fabian Kosmale <0inkane@googlemail.com>
2010-08-19 05:48:17 +08:00
pkgname=fpc
2013-03-25 08:40:01 +08:00
pkgver=2.6.2
pkgrel=1
_gdbver=7.5.1
2010-08-19 05:48:17 +08:00
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/"
license=('GPL' 'LGPL' 'custom')
backup=("etc/fpc.cfg")
depends=(ncurses)
makedepends=(fpc)
options=(zipman)
2013-03-25 08:40:01 +08:00
source=("ftp://ftp.freepascal.org/pub/fpc/dist/$pkgver/source/fpcbuild-$pkgver.tar.gz"
"http://ftp.gnu.org/gnu/gdb/gdb-${_gdbver}.tar.bz2")
md5sums=('89c7e60db6280f3d5cc006a4a9ff43a9'
'3f48f468b24447cf24820054ff6e85b1')
2010-08-19 05:48:17 +08:00
build() {
cd ${srcdir}/fpcbuild-$pkgver
2013-03-25 08:40:01 +08:00
export GDBLIBDIR=${srcdir}/gdb-${_gdbver}/gdb
export LIBGDBFILE=$GDBLIBDIR/libgdb.a
2012-03-02 05:29:54 +08:00
pushd fpcsrc/compiler
fpcmake -Tall
popd
make NOGDB=1 build
}
package() {
cd ${srcdir}/fpcbuild-$pkgver
2012-03-02 05:29:54 +08:00
export HOME=$srcdir
make -j1 NOGDB=1 PREFIX=${pkgdir}/usr install
2010-08-19 05:48:17 +08:00
2012-03-02 05:29:54 +08:00
export PATH=$pkgdir/usr/bin:$PATH
install -Dm0644 fpcsrc/rtl/COPYING.FPC ${pkgdir}/usr/share/licenses/${pkgname}/COPYING.FPC
2010-08-19 05:48:17 +08:00
[ "$CARCH" = "x86_64" ] && ln -s /usr/lib/fpc/${pkgver}/ppcx64 ${pkgdir}/usr/bin/
2010-08-19 05:48:17 +08:00
mkdir -p ${pkgdir}/etc
2012-03-02 05:29:54 +08:00
${pkgdir}/usr/lib/fpc/${pkgver}/samplecfg $pkgdir/usr/lib/fpc/${pkgver} ${pkgdir}/etc
2010-08-19 05:48:17 +08:00
2013-03-25 08:40:01 +08:00
# use -fPIC by default, this should prevent some bug
echo -e "#ifdef cpux86_64\n# for x86_64 use -fPIC by default\n-Cg\n#endif" >> "$pkgdir/etc/fpc.cfg"
2010-08-19 05:48:17 +08:00
mv $pkgdir/usr/man $pkgdir/usr/share/
2012-03-02 05:29:54 +08:00
find $pkgdir/etc/ -type f -exec sed -i "s|$pkgdir||g" {} \;
2013-03-25 08:40:01 +08:00
}