48 lines
1.4 KiB
Bash
48 lines
1.4 KiB
Bash
# Template file for 'plan9port'
|
|
pkgname=plan9port
|
|
version=20170922
|
|
revision=1
|
|
_githash=3f8ac29339ad67f05d32064fcc810035d55a3985
|
|
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=15b6e943c48bc926c700bf446c4ca1f454d9b56a3987cc7d76b020c92068084b
|
|
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
|
|
}
|
|
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
|
|
}
|