49 lines
1.5 KiB
Bash
49 lines
1.5 KiB
Bash
# Template file for 'plan9port'
|
|
pkgname=plan9port
|
|
version=20181112
|
|
revision=1
|
|
_githash=13ed1c423ecbd45d2ca982f2a7a433b785873629
|
|
archs="i686 x86_64 ppc64le" # swapcontext
|
|
wrksrc="${pkgname}-${_githash}"
|
|
hostmakedepends="perl"
|
|
makedepends="libX11-devel libXt-devel libXext-devel freetype-devel fontconfig-devel"
|
|
short_desc="Port of many Plan 9 programs to Unix-like operating systems"
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
license="custom"
|
|
homepage="https://9fans.github.io/plan9port/"
|
|
distfiles="https://github.com/9fans/plan9port/archive/${_githash}.tar.gz"
|
|
checksum=c86467b826331243db7814dcb1223d294c8ffaaaf5d9cb13d397c47a61e2ff39
|
|
nocross=yes
|
|
|
|
post_extract() {
|
|
# add missing LDFLAGS for some rules
|
|
sed -i '/prereq$/s/$/ $LDFLAGS/' \
|
|
src/cmd/auth/factotum/mkfile \
|
|
src/cmd/auth/secstore/mkfile \
|
|
src/cmd/devdraw/mkfile \
|
|
src/cmd/faces/mkfile \
|
|
src/cmd/mkfile
|
|
sed -i 's/-lX11$/& $LDFLAGS/g' src/cmd/rio/mkfile
|
|
sed -i '1i#include <sys/types.h>' lib/linux-isnptl.c
|
|
}
|
|
do_build() {
|
|
CFLAGS+=' -D_DEFAULT_SOURCE'
|
|
echo "CFLAGS='$CFLAGS'" >LOCAL.config
|
|
echo "LDFLAGS='$LDFLAGS'" >>LOCAL.config
|
|
sed -i 's/-O2/$CFLAGS/' bin/9c
|
|
|
|
./INSTALL
|
|
}
|
|
do_install() {
|
|
xargs -a lib/moveplan9.files -d'\n' sed -i "s#$wrksrc#/usr/lib/plan9#"
|
|
|
|
vinstall $FILESDIR/plan9.sh 644 etc/profile.d
|
|
vlicense LICENSE
|
|
|
|
vmkdir usr/lib
|
|
cp -a $wrksrc $DESTDIR/usr/lib/plan9
|
|
cd $DESTDIR/usr/lib/plan9
|
|
rm -f install.{log,sum}
|
|
|
|
sed -i -e "s|\(-specs=.*hardened-ld\)||g" -e "s|\(-specs=.*hardened-cc1\)||g" $DESTDIR/usr/lib/plan9/config $DESTDIR/usr/lib/plan9/LOCAL.config
|
|
}
|