drawterm: update to 0.0.20170121
This commit is contained in:
parent
d591e294f1
commit
377c69ebfb
|
@ -0,0 +1,18 @@
|
|||
#include "u.h"
|
||||
#include "libc.h"
|
||||
|
||||
int
|
||||
tas(int *x)
|
||||
{
|
||||
/* Use the GCC builtin __sync_add_and_fetch() for optimal code */
|
||||
int v = __sync_add_and_fetch(x, 1);
|
||||
switch(v) {
|
||||
case 0:
|
||||
case 1:
|
||||
return v;
|
||||
default:
|
||||
print("canlock: corrupted 0x%lux\n", v);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +1,50 @@
|
|||
# Template file for 'drawterm'
|
||||
pkgname=drawterm
|
||||
version=0.0.20130621
|
||||
revision=4
|
||||
_hghash=b4e2f62f737e
|
||||
wrksrc="rsc-${pkgname}-${_hghash}"
|
||||
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="https://bitbucket.org/rsc/drawterm/get/$_hghash.tar.gz"
|
||||
checksum=6b57577d521a226beaebc5a5a6ee5c9b0aed632daa7126bfd3039dea10c83d99
|
||||
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
|
||||
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 's%$(CFLAGS)%$(_CFLAGS)%' Make* */Makefile
|
||||
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 CC=$CC CFLAGS="$CFLAGS" LDFLAGS="-lpthread $LDFLAGS" CONF=unix ${makejobs}
|
||||
make AR=$AR RANLIB=$RANLIB CC=$CC CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CONF=unix ${makejobs}
|
||||
}
|
||||
do_install() {
|
||||
vbin drawterm
|
||||
|
|
Loading…
Reference in New Issue