### this file is sourced not run
PKGVER=0.16.1
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=xpra-$PKGVER.tar.xz
MD5SUM=b4eac6dc3b8b92720047e0205078fe51
SRC_URL=https://www.xpra.org/src/$TARBALL
BUNDLE=

SLACKREQ='python xorg-server python-pygtk xf86-video-dummy python-lz4' # cython compile-time only
SLACKDESC="xpra2: xpra2 $PKGVER (X Persistent Remote Access)  
xpra2:  
xpra2: Xpra gives you \"persistent remote applications\" for X. That is, unlike 
xpra2: normal X applications, applications run with xpra are \"persistent\" - you 
xpra2: can run them remotely, and they don't die if your connection does. You 
xpra2: can detach them, and reattach them later - even from another computer - 
xpra2: with no loss of state. 
xpra2: 
xpra2: xpra2 (0.11.3 onwards) is not compatible with xpra (pre-0.11.3 versions).
xpra2: 
xpra2: http://www.xpra.org
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	! [ -e /usr/bin/env ] && ln -sf /tools/bin/env /usr/bin
	cd /tmp/xpra*/
	patch -Np1 << "EOF" &&
diff -ur xpra-0.16.1/setup.py xpra-0.16.1-new/setup.py
--- xpra-0.16.1/setup.py	2016-01-10 21:55:56.000000000 +0700
+++ xpra-0.16.1-new/setup.py	2016-02-03 01:45:03.456899934 +0700
@@ -594,6 +594,7 @@
             add_to_keywords(kw, 'extra_compile_args', "/Wall")
         else:
             add_to_keywords(kw, 'extra_compile_args', "-Wall")
+            add_to_keywords(kw, 'extra_compile_args', "-fno-strict-aliasing")
             add_to_keywords(kw, 'extra_link_args', "-Wall")
     if strict_ENABLED:
         if is_msvc():	
EOF
	python setup.py install --without-strict &&
	cd rencode &&
	python setup.py install &&
	rm -f /usr/bin/env &&
	pkg_build_slackdesc &&
	cp /usr/share/icons/xpra.png /usr/share/pixmaps
}
