wok-current view fpc/receipt @ rev 25642

Bump linux to 4.19.305, add linux-pae-ipv6
author Stanislas Leduc <shann@slitaz.org>
date Wed Jan 17 12:05:22 2024 +0000 (9 months ago)
parents 8f37db468deb
children
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="https://www.freepascal.org/"
12 WGET_URL="ftp://ftp.freepascal.org/pub/fpc/dist/$VERSION/source/$TARBALL"
13 CONFIG_FILES="/etc/fpc.cfg"
14 TAGS="compiler pascal"
16 CROSS_BUGS="arm-slitaz-gnueabi-as: Command not found"
17 #HOST_ARCH="i486 arm"
19 DEPENDS="ncurses"
20 BUILD_DEPENDS="fpc-bootstrap"
22 # What is the latest version available today?
23 current_version()
24 {
25 wget -O - 'https://gitlab.com/freepascal.org/fpc/source/-/tags?sort=updated_desc' 2>/dev/null | \
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
27 }
29 # Handle cross compilation. ARM: fpc-bootstrap build host must be installed
30 case "$ARCH" in
31 arm*) BUILD_DEPENDS="" ;;
32 esac
34 # Rules to configure and make the package.
35 compile_rules()
36 {
37 case "$ARCH" in
38 i?86)
39 make ${ARCH_ARGS} NOGDB=1 build
40 make -j1 NOGDB=1 PREFIX=$DESTDIR/usr install ;;
41 arm*)
42 make crossinstall \
43 NOGDB=1 \
44 CPU_TARGET=arm \
45 OS_TARGET=linux \
46 OPT=-dFPC_ARMEL \
47 CROSSBINDIR=/cross/$ARCH/tools/bin \
48 BINUTILSPREFIX=arm-slitaz-gnueabi- \
49 INSTALL_PREFIX=$DESTDIR/usr ;;
50 esac &&
52 # install package license
53 install -m 755 -d $DESTDIR/usr/share/licenses/fpc &&
54 install -m 644 $src/fpcsrc/rtl/COPYING.FPC \
55 $DESTDIR/usr/share/licenses/fpc/
57 # move man pages to the right place
58 mv $install/usr/man $install/usr/share
59 }
61 # Rules to gen a SliTaz package suitable for Tazpkg.
62 genpkg_rules()
63 {
64 mkdir -p $fs/usr $fs/etc
65 cp -a $install/usr/bin $fs/usr
66 cp -a $install/usr/lib $fs/usr
68 # create symlink for compiler
69 ln -s /usr/lib/$PACKAGE/$VERSION/ppc386 $fs/usr/bin
71 # config file
72 #mkdir -p $fs/etc
73 #cp -a $fs/usr/lib/fpc/$VERSION/samplecfg $fs/etc/fpc.cfg
74 }
76 post_install()
77 {
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 -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget!' \
84 -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/*!' \
85 -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/rtl!' "$1/etc/fpc.cfg"
86 }