void-packages/srcpkgs/drawterm/template

54 lines
1.4 KiB
Bash
Raw Normal View History

2015-05-13 15:23:55 +02:00
# Template file for 'drawterm'
pkgname=drawterm
2017-01-22 22:46:55 +01:00
version=0.0.20170121
revision=1
_hghash=a5098deb5e1c
2015-05-13 15:23:55 +02:00
makedepends="libX11-devel libXt-devel"
short_desc="Connect to Plan 9 CPU servers from other operating systems"
maintainer="Enno Boland <gottox@voidlinux.eu>"
2015-09-30 18:14:55 +02:00
license="LPL-1.02"
2015-05-13 15:23:55 +02:00
homepage="https://bitbucket.org/rsc/drawterm/overview"
2017-01-22 22:46:55 +01:00
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/
}
2015-05-13 15:23:55 +02:00
do_configure() {
local _arch;
case "$XBPS_TARGET_MACHINE" in
2017-01-22 22:46:55 +01:00
aarch64*) _arch=aarch64 ;;
arm*) _arch=arm ;;
2015-05-13 15:23:55 +02:00
i686*) _arch=386 ;;
2017-01-22 22:46:55 +01:00
mips*) _arch=mips ;;
2015-05-13 15:23:55 +02:00
x86_64*) _arch=amd64 ;;
esac
2017-01-22 22:46:55 +01:00
sed -i Make* */Makefile \
-e 's%$(CFLAGS)%$(_CFLAGS)%' \
-e 's%$(LDFLAGS)%$(_LDFLAGS)%'
2015-05-13 15:23:55 +02:00
sed -i -e 's%^CFLAGS=%_CFLAGS=$(CFLAGS) %' \
2017-01-22 22:46:55 +01:00
-e 's%^LDFLAGS=%_LDFLAGS=$(LDFLAGS) %' \
2015-05-13 15:23:55 +02:00
-e "s%arch=.*%arch=$_arch; \\\\%" Make.unix
}
do_build() {
2017-01-22 22:46:55 +01:00
make AR=$AR RANLIB=$RANLIB CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CONF=unix ${makejobs}
}
2015-05-13 15:23:55 +02:00
do_install() {
vbin drawterm
vlicense LICENSE
vman $FILESDIR/drawterm.1
}