53 lines
1.4 KiB
Bash
53 lines
1.4 KiB
Bash
# Template file for 'drawterm'
|
|
pkgname=drawterm
|
|
version=0.0.20170121
|
|
revision=1
|
|
_hghash=a5098deb5e1c
|
|
makedepends="libX11-devel libXt-devel"
|
|
short_desc="Connect to Plan 9 CPU servers from other operating systems"
|
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
|
license="LPL-1.02"
|
|
homepage="https://bitbucket.org/rsc/drawterm/overview"
|
|
distfiles="http://distfiles.voidlinux.de/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
|
|
checksum=34cf3f54670d801ca649134d06b09d1c75178af9a785f0fb49203bee560e5199
|
|
|
|
CFLAGS="-fno-strict-aliasing"
|
|
|
|
if [ "${XBPS_TARGET_MACHINE}" = armv5tel ]; then
|
|
CFLAGS+=" -DARMv5"
|
|
fi
|
|
|
|
post_extract() {
|
|
# Copy support for aarch64
|
|
mkdir ${wrksrc}/posix-aarch64
|
|
cp ${wrksrc}/posix-arm/* ${wrksrc}/posix-aarch64/
|
|
# test-and-set implementation using GCC builtin
|
|
cp ${FILESDIR}/tas.c ${wrksrc}/posix-aarch64/
|
|
}
|
|
|
|
do_configure() {
|
|
local _arch;
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
aarch64*) _arch=aarch64 ;;
|
|
arm*) _arch=arm ;;
|
|
i686*) _arch=386 ;;
|
|
mips*) _arch=mips ;;
|
|
x86_64*) _arch=amd64 ;;
|
|
esac
|
|
|
|
sed -i Make* */Makefile \
|
|
-e 's%$(CFLAGS)%$(_CFLAGS)%' \
|
|
-e 's%$(LDFLAGS)%$(_LDFLAGS)%'
|
|
sed -i -e 's%^CFLAGS=%_CFLAGS=$(CFLAGS) %' \
|
|
-e 's%^LDFLAGS=%_LDFLAGS=$(LDFLAGS) %' \
|
|
-e "s%arch=.*%arch=$_arch; \\\\%" Make.unix
|
|
}
|
|
do_build() {
|
|
make AR=$AR RANLIB=$RANLIB CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CONF=unix ${makejobs}
|
|
}
|
|
do_install() {
|
|
vbin drawterm
|
|
vlicense LICENSE
|
|
vman $FILESDIR/drawterm.1
|
|
}
|