wok-current annotate fpc/receipt @ rev 25268
xorg-cf-files/Imake.tmpl: update ArCmd
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 17 14:59:20 2022 +0000 (2022-07-17) |
parents | 8f37db468deb |
children |
rev | line source |
---|---|
slaxemulator@9411 | 1 # SliTaz package receipt. |
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 SOURCE="fpcbuild" |
slaxemulator@9411 | 10 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@20671 | 11 WEB_SITE="https://www.freepascal.org/" |
slaxemulator@9411 | 12 WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/source/$TARBALL" |
pascal@20475 | 13 CONFIG_FILES="/etc/fpc.cfg" |
pascal@13034 | 14 TAGS="compiler pascal" |
slaxemulator@9411 | 15 |
pankso@16194 | 16 CROSS_BUGS="arm-slitaz-gnueabi-as: Command not found" |
pankso@16194 | 17 #HOST_ARCH="i486 arm" |
pankso@16194 | 18 |
pascal@15215 | 19 DEPENDS="ncurses" |
pascal@15215 | 20 BUILD_DEPENDS="fpc-bootstrap" |
pascal@15215 | 21 |
pascal@24506 | 22 # What is the latest version available today? |
pascal@24095 | 23 current_version() |
pascal@24095 | 24 { |
pascal@24626 | 25 wget -O - 'https://gitlab.com/freepascal.org/fpc/source/-/tags?sort=updated_desc' 2>/dev/null | \ |
pascal@24626 | 26 sed '/source-/!d;/tar.gz/!d;/quot;/d;/_rc[0-9]/d;/macos/d;s|.*/source-||;s|.*release.||;s|.tar.*||;/^[0-9]/!d;s|_|.|g' | sort -Vr | sed q |
pascal@24095 | 27 } |
pascal@24095 | 28 |
pankso@16194 | 29 # Handle cross compilation. ARM: fpc-bootstrap build host must be installed |
pankso@16194 | 30 case "$ARCH" in |
pankso@16194 | 31 arm*) BUILD_DEPENDS="" ;; |
pankso@16194 | 32 esac |
pankso@16194 | 33 |
slaxemulator@9411 | 34 # Rules to configure and make the package. |
slaxemulator@9411 | 35 compile_rules() |
slaxemulator@9411 | 36 { |
pankso@16194 | 37 case "$ARCH" in |
pankso@16194 | 38 i?86) |
pankso@16194 | 39 make ${ARCH_ARGS} NOGDB=1 build |
pankso@16194 | 40 make -j1 NOGDB=1 PREFIX=$DESTDIR/usr install ;; |
pankso@16194 | 41 arm*) |
pankso@16194 | 42 make crossinstall \ |
pankso@16194 | 43 NOGDB=1 \ |
pankso@16194 | 44 CPU_TARGET=arm \ |
pankso@16194 | 45 OS_TARGET=linux \ |
pankso@16194 | 46 OPT=-dFPC_ARMEL \ |
pankso@16194 | 47 CROSSBINDIR=/cross/$ARCH/tools/bin \ |
pankso@16194 | 48 BINUTILSPREFIX=arm-slitaz-gnueabi- \ |
pankso@16194 | 49 INSTALL_PREFIX=$DESTDIR/usr ;; |
pankso@16194 | 50 esac && |
al@18734 | 51 |
slaxemulator@9411 | 52 # install package license |
pankso@16194 | 53 install -m 755 -d $DESTDIR/usr/share/licenses/fpc && |
pankso@16194 | 54 install -m 644 $src/fpcsrc/rtl/COPYING.FPC \ |
pankso@16194 | 55 $DESTDIR/usr/share/licenses/fpc/ |
al@18803 | 56 |
al@18803 | 57 # move man pages to the right place |
al@18803 | 58 mv $install/usr/man $install/usr/share |
slaxemulator@9411 | 59 } |
slaxemulator@9411 | 60 |
slaxemulator@9411 | 61 # Rules to gen a SliTaz package suitable for Tazpkg. |
slaxemulator@9411 | 62 genpkg_rules() |
slaxemulator@9411 | 63 { |
slaxemulator@9411 | 64 mkdir -p $fs/usr $fs/etc |
pascal@15215 | 65 cp -a $install/usr/bin $fs/usr |
pascal@15215 | 66 cp -a $install/usr/lib $fs/usr |
al@18734 | 67 |
slaxemulator@9411 | 68 # create symlink for compiler |
slaxemulator@9411 | 69 ln -s /usr/lib/$PACKAGE/$VERSION/ppc386 $fs/usr/bin |
al@18734 | 70 |
pankso@16194 | 71 # config file |
erjo@16709 | 72 #mkdir -p $fs/etc |
erjo@16709 | 73 #cp -a $fs/usr/lib/fpc/$VERSION/samplecfg $fs/etc/fpc.cfg |
slaxemulator@9411 | 74 } |
slaxemulator@9411 | 75 |
erjo@16709 | 76 post_install() |
erjo@16709 | 77 { |
pascal@20624 | 78 if [ ! -s "$1/etc/fpc.cfg" ]; then |
pascal@18730 | 79 chroot "$1/" fpcmkcfg > /etc/fpc.cfg |
erjo@16709 | 80 fi |
al@18734 | 81 |
erjo@16709 | 82 # Fix units search path |
pascal@18730 | 83 sed -i -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget!' \ |
pascal@18730 | 84 -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/*!' \ |
pascal@18730 | 85 -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/rtl!' "$1/etc/fpc.cfg" |
erjo@16709 | 86 } |