blob: a178c1ee773cc65162d16811a73a6704cb5d904e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Description: A Free Pascal compiler.
# URL: http://www.freepascal.org/
# Packager: Danny Rawlins, crux at romster dot me
# Maintainer: Erich Eckner, crux at eckner dot net
# Contributor: Danny Rawlins, crux at romster dot me
# Contributor: arch linux
name=fpc
version=3.2.0
release=1
source=(ftp://ftp.freepascal.org/pub/fpc/dist/$version/source/fpcbuild-$version.tar.gz)
build() {
cd fpcbuild-$version/fpcsrc/compiler
fpcmake -Tall
cd ../..
make build NOGDB=1
export HOME="$SRC"
make -j1 PREFIX="$PKG"/usr install NOGDB=1
export PATH="$PKG"/usr/bin:$PATH
install -Dm0644 fpcsrc/rtl/COPYING.FPC "$PKG"/usr/share/licenses/${name}/COPYING.FPC
ln -s /usr/lib/fpc/$version/ppcx64 "$PKG"/usr/bin/
mkdir -p "$PKG"/etc
"$PKG"/usr/lib/fpc/$version/samplecfg "$PKG"/usr/lib/fpc/$version "$PKG"/etc
# use -fPIC by default
echo -e "#ifdef cpux86_64\n# for x86_64 use -fPIC by default\n-Cg\n#endif" >> "$PKG/etc/fpc.cfg"
rm -rf --one-file-system "$PKG"/usr/man "$PKG"/usr/share/doc
find "$PKG"/etc/ -type f -exec sed -i "s|"$PKG"||g" {} \;
sed -e "s|$PKG||g" -i "$PKG/usr/lib/fpc/$version/ide/text/fp.cfg"
}
|