new package: fpc
This commit is contained in:
parent
ec84a831fc
commit
3904630861
1 changed files with 61 additions and 0 deletions
61
srcpkgs/fpc/template
Normal file
61
srcpkgs/fpc/template
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Template file for 'fpc'
|
||||
pkgname=fpc
|
||||
version=2.6.4
|
||||
revision=1
|
||||
create_wrksrc=yes
|
||||
build_wrksrc="${pkgname}build-${version}"
|
||||
conf_files="/etc/fpc.cfg /etc/fppkg.cfg"
|
||||
hostmakedepends="rpmextract"
|
||||
makedepends="ncurses-devel zlib-devel expat-devel"
|
||||
short_desc="Free Pascal Compiler"
|
||||
maintainer="Jakub Skrzypnik <jot.skrzyp@gmail.com>"
|
||||
license="GPL-2, LGPL-2.1, FPC-FPR"
|
||||
homepage="http://freepascal.org/"
|
||||
distfiles="http://gd.tuwien.ac.at/languages/pascal/${pkgname}/dist/${version}/source/${pkgname}build-${version}.tar.gz"
|
||||
checksum=8d9c3bcfa469d9b37c05663e2775d179809e4b3443604fac7d21aa64c9a56daa
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64*)
|
||||
distfiles+=" http://gd.tuwien.ac.at/languages/pascal/${pkgname}/dist/${version}/x86_64-linux/rpm/${pkgname}-${version}-1.x86_64.rpm"
|
||||
checksum+=" f91541135c46792fe0b66d953c65041d970713700c04a31f445be52b247cc68f"
|
||||
;;
|
||||
i686)
|
||||
distfiles+=" http://gd.tuwien.ac.at/languages/pascal/${pkgname}/dist/${version}/i386-linux/rpm/${pkgname}-${version}-1.i686.rpm"
|
||||
checksum+=" 57203a5eb764d238531f7d30504624f4cb856e62ce9f8c4525974f8da49fcac6"
|
||||
;;
|
||||
esac
|
||||
# TODO: figure out cross-build and how to unwrap the ARM .tar.
|
||||
nocross=yes
|
||||
only_for_archs="x86_64 x86_64-musl i686 i686-musl"
|
||||
|
||||
post_extract() {
|
||||
# relative links needed
|
||||
ln -sf ../lib64/fpc/${version}/ppcx64 usr/bin
|
||||
ln -sf ../lib/fpc/${version}/ppc386 usr/bin
|
||||
|
||||
# tweak PT_INTERP for musl targets
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64-musl)
|
||||
sed -i s,/lib64/ld-linux-x86-64.so.2,/lib/ld-musl-x86_64.so.1, $build_wrksrc/fpcsrc/compiler/systems/t_linux.pas
|
||||
;;
|
||||
i686-musl)
|
||||
sed -i s,/lib/ld-linux.so.2,/lib/ld-musl-i386.so.1, $build_wrksrc/fpcsrc/compiler/systems/t_linux.pas
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
do_build() {
|
||||
FPC=$wrksrc/usr/bin/fpc make ${makejobs} all NOGDB=1
|
||||
}
|
||||
|
||||
do_install() {
|
||||
FPC=$wrksrc/usr/bin/fpc make install NOGDB=1 \
|
||||
PREFIX=$DESTDIR/usr INSTALL_MANDIR=$DESTDIR/usr/share/man
|
||||
ln -srf $DESTDIR/usr/lib/fpc/${version}/ppc* $DESTDIR/usr/bin
|
||||
vmkdir etc
|
||||
PATH=$DESTDIR/usr/bin:$PATH \
|
||||
$DESTDIR/usr/lib/fpc/${version}/samplecfg \
|
||||
$DESTDIR/usr/lib/fpc/${version} $DESTDIR/etc
|
||||
sed -i "s,${DESTDIR},,g" $DESTDIR/etc/*.cfg $DESTDIR/etc/fppkg/*
|
||||
vlicense fpcsrc/rtl/COPYING.FPC
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue