wok-next view fpc/receipt @ rev 20740
Up fasm (1.73.04)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue May 29 21:26:14 2018 +0200 (2018-05-29) |
parents | b278b2018965 |
children | a3c581bf52b8 |
line source
1 # SliTaz package receipt v2.
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 WEB_SITE="http://www.freepascal.org/"
11 TARBALL="fpcbuild-$VERSION.tar.gz"
12 WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/source/$TARBALL"
14 BUILD_DEPENDS_arm=""
15 BUILD_DEPENDS="fpc-bootstrap"
16 SPLIT="fpc-src fpc"
18 CROSS_BUGS="arm-slitaz-gnueabi-as: Command not found"
20 compile_rules() {
21 sed -i 's|/man$|/share/man|' $src/install/man/Makefile # fix man install path
23 case $ARCH in
24 arm*) Arch='arm';;
25 i?86) Arch='386';;
26 x86_64) Arch='x64';;
27 esac
29 case "$ARCH" in
30 arm*)
31 make crossinstall \
32 NOGDB=1 \
33 CPU_TARGET=arm \
34 OS_TARGET=linux \
35 OPT=-dFPC_ARMEL \
36 CROSSBINDIR=/cross/$ARCH/tools/bin \
37 BINUTILSPREFIX=arm-slitaz-gnueabi- \
38 INSTALL_PREFIX=$install/usr
39 ;;
40 *)
41 make NOGDB=1 FPC=/usr/bin/ppc$Arch build &&
42 make -j1 NOGDB=1 FPC=/usr/bin/ppc$Arch PREFIX=$install/usr install
43 ;;
44 esac || return 1
46 # install package license
47 install -Dm 644 $src/fpcsrc/rtl/COPYING.FPC \
48 $install/usr/share/licenses/fpc/COPYING.FPC
50 # create symlink for compiler
51 ln -s ../lib/fpc/$VERSION/ppc$Arch $install/usr/bin
53 # config file
54 # mkdir -p $install/etc
55 # cp -a $install/usr/lib/fpc/$VERSION/samplecfg $install/etc/fpc.cfg
57 # FPC sources
58 mkdir -p $install/usr/lib/fpc
59 cp -a $src/fpcsrc $install/usr/lib/fpc/src
60 }
62 genpkg_rules() {
63 case $PACKAGE in
64 fpc-src)
65 copy /usr/lib/fpc/src/
66 CAT="development|sources requierd by the Lazarus IDE"
67 ;;
68 fpc)
69 copy @std @rm
70 DEPENDS="ncurses"
71 CONFIG_FILE="/etc/fpc.cfg"
72 TAGS="compiler pascal"
73 ;;
74 esac
75 }
77 post_install() {
78 if [ ! -s "$1/etc/fpc.cfg" ]; then
79 chroot "$1/" fpcmkcfg > /etc/fpc.cfg
80 fi
82 # Fix units search path
83 sed -i \
84 -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget!' \
85 -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/*!' \
86 -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/rtl!' \
87 "$1/etc/fpc.cfg"
88 }