wok-next view fpc/receipt @ rev 20458
Unlock x86_64 architecture
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Mar 02 12:12:14 2018 +0200 (2018-03-02) |
parents | dfc51ce7954a |
children | b278b2018965 |
line source
1 # SliTaz package receipt.
3 PACKAGE="fpc"
4 VERSION="2.6.4"
5 CATEGORY="development"
6 SHORT_DESC="The Free Pascal Compiler"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="GPL2 LGPL2.1"
9 SOURCE="fpcbuild"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://www.freepascal.org/"
12 WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/source/$TARBALL"
13 CONFIG_FILE="/etc/fpc.cfg"
14 TAGS="compiler pascal"
16 CROSS_BUGS="arm-slitaz-gnueabi-as: Command not found"
18 DEPENDS="ncurses"
19 BUILD_DEPENDS="fpc-bootstrap"
21 # Handle cross compilation. ARM: fpc-bootstrap build host must be installed
22 case "$ARCH" in
23 arm*) BUILD_DEPENDS="" ;;
24 esac
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 case "$ARCH" in
30 i?86)
31 make ${ARCH_ARGS} NOGDB=1 build
32 make -j1 NOGDB=1 PREFIX=$DESTDIR/usr install ;;
33 arm*)
34 make crossinstall \
35 NOGDB=1 \
36 CPU_TARGET=arm \
37 OS_TARGET=linux \
38 OPT=-dFPC_ARMEL \
39 CROSSBINDIR=/cross/$ARCH/tools/bin \
40 BINUTILSPREFIX=arm-slitaz-gnueabi- \
41 INSTALL_PREFIX=$DESTDIR/usr ;;
42 esac &&
44 # install package license
45 install -m 755 -d $DESTDIR/usr/share/licenses/fpc &&
46 install -m 644 $src/fpcsrc/rtl/COPYING.FPC \
47 $DESTDIR/usr/share/licenses/fpc/
49 # move man pages to the right place
50 mv $install/usr/man $install/usr/share
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 mkdir -p $fs/usr $fs/etc
57 cp -a $install/usr/bin $fs/usr
58 cp -a $install/usr/lib $fs/usr
60 # create symlink for compiler
61 ln -s /usr/lib/$PACKAGE/$VERSION/ppc386 $fs/usr/bin
63 # config file
64 #mkdir -p $fs/etc
65 #cp -a $fs/usr/lib/fpc/$VERSION/samplecfg $fs/etc/fpc.cfg
66 }
68 post_install()
69 {
70 if [ ! -f "$1/etc/fpc.cfg" ]; then
71 chroot "$1/" fpcmkcfg > /etc/fpc.cfg
72 fi
74 # Fix units search path
75 sed -i -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget!' \
76 -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/*!' \
77 -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/rtl!' "$1/etc/fpc.cfg"
78 }