summaryrefslogtreecommitdiff
path: root/extra/nx-common
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/nx-common
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/nx-common')
-rw-r--r--extra/nx-common/NXproto.h.64bit.diff66
-rw-r--r--extra/nx-common/PKGBUILD58
-rw-r--r--extra/nx-common/nx-gcc44.patch12
3 files changed, 136 insertions, 0 deletions
diff --git a/extra/nx-common/NXproto.h.64bit.diff b/extra/nx-common/NXproto.h.64bit.diff
new file mode 100644
index 000000000..ac326ebcd
--- /dev/null
+++ b/extra/nx-common/NXproto.h.64bit.diff
@@ -0,0 +1,66 @@
+--- nxcomp.old/NXproto.h 2006-06-19 19:55:56.000000000 +0200
++++ nxcomp/NXproto.h 2007-02-12 18:17:41.000000000 +0100
+@@ -26,6 +26,30 @@
+ #include <X11/Xmd.h>
+ #include <X11/Xproto.h>
+
++/*
++ Copied from Xproto.h
++ */
++
++/* For the purpose of the structure definitions in this file,
++we must redefine the following types in terms of Xmd.h's types, which may
++include bit fields. All of these are #undef'd at the end of this file,
++restoring the definitions in X.h. */
++
++#define Window CARD32
++#define Drawable CARD32
++#define Font CARD32
++#define Pixmap CARD32
++#define Cursor CARD32
++#define Colormap CARD32
++#define GContext CARD32
++#define Atom CARD32
++#define VisualID CARD32
++#define Time CARD32
++#define KeyCode CARD8
++#define KeySym CARD32
++
++/* End copied from Xproto.h */
++
+ #define sz_xNXGetControlParametersReq 4
+ #define sz_xNXGetCleanupParametersReq 4
+ #define sz_xNXGetImageParametersReq 4
+@@ -343,9 +367,9 @@
+ CARD8 dstDepth;
+ CARD32 srcLength B32;
+ CARD32 dstLength B32;
+- INT16 srcX B16, srcY B16;
++ CARD16 srcX B16, srcY B16;
+ CARD16 srcWidth B16, srcHeight B16;
+- INT16 dstX B16, dstY B16;
++ CARD16 dstX B16, dstY B16;
+ CARD16 dstWidth B16, dstHeight B16;
+ } xNXPutPackedImageReq;
+
+@@ -463,4 +487,20 @@
+ }
+ #endif
+
++/* Copied from Xproto.h */
++
++/* restore these definitions back to the typedefs in X.h */
++#undef Window
++#undef Drawable
++#undef Font
++#undef Pixmap
++#undef Cursor
++#undef Colormap
++#undef GContext
++#undef Atom
++#undef VisualID
++#undef Time
++#undef KeyCode
++#undef KeySym
++
+ #endif /* NXproto_H */
diff --git a/extra/nx-common/PKGBUILD b/extra/nx-common/PKGBUILD
new file mode 100644
index 000000000..ae282c3c4
--- /dev/null
+++ b/extra/nx-common/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD 75689 2010-04-02 17:16:35Z andyrtr $
+# Maintainer Tobias Powalowski <tpowa@archlinux.org>
+# Contributed: eliott <eliott@solarblue.net>, Andre Naumann <anaumann@SPARCed.org>
+pkgname=nx-common
+pkgver=3.4.0
+pkgrel=4
+pkgdesc="NoMachine NX common package for client and server"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://nomachine.com/"
+depends=('libjpeg>=8' 'libpng>=1.4.0' 'openssl>=1.0.0' 'gcc-libs' 'audiofile' 'alsa-lib' 'bash')
+source=(\
+#Compression libs and proxy sources
+http://64.34.161.181/download/$pkgver/sources/nxcomp-$pkgver-7.tar.gz \
+http://64.34.161.181/download/$pkgver/sources/nxssh-$pkgver-2.tar.gz \
+# ESD Support
+http://64.34.161.181/download/$pkgver/sources/nxesd-$pkgver-2.tar.gz
+# 64bit fixes
+NXproto.h.64bit.diff
+nx-gcc44.patch)
+options=(!libtool)
+md5sums=('cba926f2b855231a8fc3e0dabff52855'
+ '18b81d850223ea84de244f8a9509c4b1'
+ '65d55f2a86baa59343432261cabd52ec'
+ '58341ba70dfab92ff38570071fbbf88a'
+ 'c805442f1500d8d6de15ec224f63277e')
+
+build() {
+ cd ${srcdir}
+# patch -Np1 -i ${srcdir}/nx-gcc44.patch
+
+ mkdir -p ${pkgdir}/opt/NX/bin
+ mkdir -p ${pkgdir}/opt/NX/lib
+
+ cd ${srcdir}/nxcomp
+ if [ "$CARCH" = "x86_64" ]; then
+ patch -Np1 -i ../NXproto.h.64bit.diff || return 1
+ fi
+
+ ./configure --prefix=/opt/NX
+ make || return 1
+ cp -a libXcomp.so.* ${pkgdir}/opt/NX/lib
+ cd ${pkgdir}/opt/NX/lib
+ ln -s libXcomp.so.1 libXcomp.so
+
+ cd ${srcdir}/nxssh
+ ./configure --prefix=/opt/NX
+ make || return 1
+ install -D -m755 nxssh ${pkgdir}/opt/NX/bin/nxssh
+
+ cd ${srcdir}/nxesd
+ ./configure --prefix=/opt/NX
+ make || return 1
+ make DESTDIR=${pkgdir} install || return 1
+ # fix libxcomp linking
+ cd ${pkgdir}/opt/NX/lib
+ ln -s libXcomp.so.3 libXcomp.so.1
+}
diff --git a/extra/nx-common/nx-gcc44.patch b/extra/nx-common/nx-gcc44.patch
new file mode 100644
index 000000000..5b7b7e1f6
--- /dev/null
+++ b/extra/nx-common/nx-gcc44.patch
@@ -0,0 +1,12 @@
+--- nx-3.3.0/nxcomp/Loop.cpp.orig 2009-05-17 12:22:19.000000000 +0200
++++ nx-3.3.0/nxcomp/Loop.cpp 2009-05-17 12:22:43.000000000 +0200
+@@ -10979,7 +10979,7 @@
+ packMethod == PACK_LOSSLESS ||
+ packMethod == PACK_ADAPTIVE)
+ {
+- char *dash = rindex(opt, '-');
++ const char *dash = rindex(opt, '-');
+
+ if (dash != NULL && strlen(dash) == 2 &&
+ *(dash + 1) >= '0' && *(dash + 1) <= '9')
+