wok-current view fpc/receipt @ rev 24270
updated perl-xml-writer (0.625 -> 0.900)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jan 02 10:39:58 2022 +0100 (2022-01-02) |
parents | 6e8b1bcb30e2 |
children | 8f37db468deb |
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 current_version()
23 {
24 wget -O - https://gitlab.com/freepascal.org/fpc/source/-/tags 2>/dev/null | \
25 sed '/source-/!d;s|.*/source-\([\.0-9]*\)\..*|\1|;q'
26 }
28 # Handle cross compilation. ARM: fpc-bootstrap build host must be installed
29 case "$ARCH" in
30 arm*) BUILD_DEPENDS="" ;;
31 esac
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 case "$ARCH" in
37 i?86)
38 make ${ARCH_ARGS} NOGDB=1 build
39 make -j1 NOGDB=1 PREFIX=$DESTDIR/usr install ;;
40 arm*)
41 make crossinstall \
42 NOGDB=1 \
43 CPU_TARGET=arm \
44 OS_TARGET=linux \
45 OPT=-dFPC_ARMEL \
46 CROSSBINDIR=/cross/$ARCH/tools/bin \
47 BINUTILSPREFIX=arm-slitaz-gnueabi- \
48 INSTALL_PREFIX=$DESTDIR/usr ;;
49 esac &&
51 # install package license
52 install -m 755 -d $DESTDIR/usr/share/licenses/fpc &&
53 install -m 644 $src/fpcsrc/rtl/COPYING.FPC \
54 $DESTDIR/usr/share/licenses/fpc/
56 # move man pages to the right place
57 mv $install/usr/man $install/usr/share
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 genpkg_rules()
62 {
63 mkdir -p $fs/usr $fs/etc
64 cp -a $install/usr/bin $fs/usr
65 cp -a $install/usr/lib $fs/usr
67 # create symlink for compiler
68 ln -s /usr/lib/$PACKAGE/$VERSION/ppc386 $fs/usr/bin
70 # config file
71 #mkdir -p $fs/etc
72 #cp -a $fs/usr/lib/fpc/$VERSION/samplecfg $fs/etc/fpc.cfg
73 }
75 post_install()
76 {
77 if [ ! -s "$1/etc/fpc.cfg" ]; then
78 chroot "$1/" fpcmkcfg > /etc/fpc.cfg
79 fi
81 # Fix units search path
82 sed -i -e 's!^-Fu/units/$fpctarget!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget!' \
83 -e 's!^-Fu/units/$fpctarget/*!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/*!' \
84 -e 's!^-Fu/units/$fpctarget/rtl!-Fu/usr/lib/fpc/'$VERSION'/units/$fpctarget/rtl!' "$1/etc/fpc.cfg"
85 }