summaryrefslogtreecommitdiff
path: root/manualPorts/fpc/Pkgfile
blob: f1c0b3657770f57e6b0d940fa766ef922fbe2250 (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

name=fpc
version=3.0.4
release=1
source=(ftp://ftp.freepascal.org/pub/fpc/dist/$version/source/fpcbuild-$version.tar.gz
	ftp://ftp.freepascal.org/pub/fpc/contrib/libgdb/v7.2/libgdb_mingw702.zip)

build() {
	
	export LIBGDBDIR=$SRC/libgdb/win64/x86_64/

	cd fpcbuild-$version/fpcsrc/
	
	make -j 1 build

	cp $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
		$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new

	make -j 1 PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new build
	rm $SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64.new

	make -j 1 PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl_clean
	make -j 1 PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 rtl packages_all utils

	set -- PP=$SRC/fpcbuild-$version/fpcsrc/compiler/ppcx64 \
		FPCMAKE=$SRC/fpcbuild-$version/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake \
		INSTALL_PREFIX=$PKG/usr \
		INSTALL_DOCDIR=$PKG/usr/share/doc/fpcbuild \
		INSTALL_MANDIR=$PKG/usr/share/man \
		INSTALL_SOURCEDIR=$PKG/usr/lib/fpc/fpcbuild-$version/source

	make -j 1 "$@" compiler_install rtl_install packages_install utils_install
	ln -sf /usr/lib/fpc/$version/ppcx64 $PKG/usr/bin/ppcx64
}