wok-next annotate 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 |
rev | line source |
---|---|
al@20481 | 1 # SliTaz package receipt v2. |
slaxemulator@9411 | 2 |
slaxemulator@9411 | 3 PACKAGE="fpc" |
pascal@16231 | 4 VERSION="2.6.4" |
slaxemulator@9411 | 5 CATEGORY="development" |
pankso@16194 | 6 SHORT_DESC="The Free Pascal Compiler" |
slaxemulator@9411 | 7 MAINTAINER="slaxemulator@gmail.com" |
pascal@15215 | 8 LICENSE="GPL2 LGPL2.1" |
slaxemulator@9411 | 9 WEB_SITE="http://www.freepascal.org/" |
al@20481 | 10 |
al@20481 | 11 TARBALL="fpcbuild-$VERSION.tar.gz" |
slaxemulator@9411 | 12 WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/source/$TARBALL" |
slaxemulator@9411 | 13 |
al@20481 | 14 BUILD_DEPENDS_arm="" |
al@20481 | 15 BUILD_DEPENDS="fpc-bootstrap" |
al@20491 | 16 SPLIT="fpc-src fpc" |
al@20491 | 17 |
pankso@16194 | 18 CROSS_BUGS="arm-slitaz-gnueabi-as: Command not found" |
pankso@16194 | 19 |
al@20481 | 20 compile_rules() { |
al@20491 | 21 sed -i 's|/man$|/share/man|' $src/install/man/Makefile # fix man install path |
al@20491 | 22 |
al@20491 | 23 case $ARCH in |
al@20491 | 24 arm*) Arch='arm';; |
al@20491 | 25 i?86) Arch='386';; |
al@20491 | 26 x86_64) Arch='x64';; |
al@20491 | 27 esac |
al@20491 | 28 |
pankso@16194 | 29 case "$ARCH" in |
al@20481 | 30 arm*) |
al@20481 | 31 make crossinstall \ |
al@20481 | 32 NOGDB=1 \ |
al@20481 | 33 CPU_TARGET=arm \ |
al@20481 | 34 OS_TARGET=linux \ |
al@20481 | 35 OPT=-dFPC_ARMEL \ |
al@20481 | 36 CROSSBINDIR=/cross/$ARCH/tools/bin \ |
al@20481 | 37 BINUTILSPREFIX=arm-slitaz-gnueabi- \ |
al@20491 | 38 INSTALL_PREFIX=$install/usr |
al@20481 | 39 ;; |
al@20481 | 40 *) |
al@20491 | 41 make NOGDB=1 FPC=/usr/bin/ppc$Arch build && |
al@20491 | 42 make -j1 NOGDB=1 FPC=/usr/bin/ppc$Arch PREFIX=$install/usr install |
al@20481 | 43 ;; |
al@20481 | 44 esac || return 1 |
al@18734 | 45 |
slaxemulator@9411 | 46 # install package license |
al@20481 | 47 install -Dm 644 $src/fpcsrc/rtl/COPYING.FPC \ |
al@20491 | 48 $install/usr/share/licenses/fpc/COPYING.FPC |
al@20491 | 49 |
al@20491 | 50 # create symlink for compiler |
al@20491 | 51 ln -s ../lib/fpc/$VERSION/ppc$Arch $install/usr/bin |
al@20491 | 52 |
al@20491 | 53 # config file |
al@20491 | 54 # mkdir -p $install/etc |
al@20491 | 55 # cp -a $install/usr/lib/fpc/$VERSION/samplecfg $install/etc/fpc.cfg |
al@20491 | 56 |
al@20491 | 57 # FPC sources |
al@20491 | 58 mkdir -p $install/usr/lib/fpc |
al@20491 | 59 cp -a $src/fpcsrc $install/usr/lib/fpc/src |
slaxemulator@9411 | 60 } |
slaxemulator@9411 | 61 |
al@20481 | 62 genpkg_rules() { |
al@20491 | 63 case $PACKAGE in |
al@20491 | 64 fpc-src) |
al@20491 | 65 copy /usr/lib/fpc/src/ |
al@20491 | 66 CAT="development|sources requierd by the Lazarus IDE" |
al@20491 | 67 ;; |
al@20491 | 68 fpc) |
al@20491 | 69 copy @std @rm |
al@20491 | 70 DEPENDS="ncurses" |
al@20491 | 71 CONFIG_FILE="/etc/fpc.cfg" |
al@20491 | 72 TAGS="compiler pascal" |
al@20491 | 73 ;; |
al@20491 | 74 esac |
slaxemulator@9411 | 75 } |
slaxemulator@9411 | 76 |
al@20481 | 77 post_install() { |
al@20491 | 78 if [ ! -s "$1/etc/fpc.cfg" ]; then |
al@20481 | 79 chroot "$1/" fpcmkcfg > /etc/fpc.cfg |
erjo@16709 | 80 fi |
al@18734 | 81 |
erjo@16709 | 82 # Fix units search path |
al@20491 | 83 sed -i \ |
al@20491 | 84 -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget!' \ |
pascal@18730 | 85 -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/*!' \ |
al@20491 | 86 -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/rtl!' \ |
al@20491 | 87 "$1/etc/fpc.cfg" |
erjo@16709 | 88 } |