summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2009-01-07 09:02:40 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2009-01-07 09:02:40 +0000
commit31353f7f89c24b720357f81c9bf2915ed94b9563 (patch)
tree07c8d8f3cbfafa1c53f708668d8f5b27b843d252 /net-misc/nxserver-2xterminalserver/files
parentAdd ldap depends to x2goserver, some cleanups (diff)
downloadnx-31353f7f89c24b720357f81c9bf2915ed94b9563.tar.gz
nx-31353f7f89c24b720357f81c9bf2915ed94b9563.tar.bz2
nx-31353f7f89c24b720357f81c9bf2915ed94b9563.zip
Add net-misc/nxclient-2xterminalserver and net-misc/nxserver-2xterminalserver, now that they're removed from portage
svn path=/testing/; revision=220
Diffstat (limited to 'net-misc/nxserver-2xterminalserver/files')
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-amd64.patch15
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-plastik-render-fix.patch29
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch11
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-windows-linux-resume.patch37
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-xorg7-font-fix.patch394
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-external-nxcomp.patch97
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-insitu.patch123
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-nxagent-reduced-debugging.patch12
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-perl.patch32
-rw-r--r--net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-setup.patch96
10 files changed, 846 insertions, 0 deletions
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-amd64.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-amd64.patch
new file mode 100644
index 0000000..638fc92
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-amd64.patch
@@ -0,0 +1,15 @@
+diff -ru nx-X11-orig/lib/X11/XlcDL.c nx-X11/lib/X11/XlcDL.c
+--- common/nx-X11-orig/lib/X11/XlcDL.c 2006-10-04 16:51:54.000000000 -0600
++++ common/nx-X11/lib/X11/XlcDL.c 2006-10-04 16:52:55.000000000 -0600
+@@ -58,10 +58,8 @@
+ #ifdef _LP64
+ # if defined(__sparcv9)
+ # define _MACH64_NAME "sparcv9"
+-# elif defined(__ia64__)
+-# undef MACH64_NAME
+ # else
+-# error "Unknown architecture"
++# undef MACH64_NAME
+ # endif /* defined(__sparcv9) */
+ # ifdef _MACH64_NAME
+ # define _MACH64_NAME_LEN (sizeof (_MACH64_NAME) - 1)
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-plastik-render-fix.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-plastik-render-fix.patch
new file mode 100644
index 0000000..d896f97
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-plastik-render-fix.patch
@@ -0,0 +1,29 @@
+--- common/nx-X11/programs/Xserver/hw/nxagent/GCOps.c.orig 2006-11-22 21:59:13.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/nxagent/GCOps.c 2006-11-22 22:03:12.000000000 +0000
+@@ -2399,7 +2399,7 @@
+ {
+ if ((pDrawable)->type == DRAWABLE_PIXMAP)
+ {
+- miPolySegment(nxagentVirtualDrawable(pDrawable), pGC, nSegments, pSegments);
++ fbPolySegment(nxagentVirtualDrawable(pDrawable), pGC, nSegments, pSegments);
+ }
+
+ return;
+@@ -2435,7 +2435,7 @@
+ XDrawSegments(nxagentDisplay, nxagentDrawable(pDrawable), nxagentGC(pGC),
+ (XSegment *)pSegments, nSegments);
+ }
+- miPolySegment(nxagentVirtualDrawable(pDrawable), pGC, nSegments, pSegments);
++ fbPolySegment(nxagentVirtualDrawable(pDrawable), pGC, nSegments, pSegments);
+ return;
+ }
+ else
+@@ -2454,7 +2454,7 @@
+ {
+ if ((pDrawable)->type == DRAWABLE_PIXMAP)
+ {
+- miPolyRectangle(nxagentVirtualDrawable(pDrawable), pGC, nRectangles, pRectangles);
++ fbPolyRectangle(nxagentVirtualDrawable(pDrawable), pGC, nRectangles, pRectangles);
+ }
+
+ return;
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch
new file mode 100644
index 0000000..40f5faa
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-tmp-exec.patch
@@ -0,0 +1,11 @@
+--- common/nx-X11/config/imake/imake.c.orig 2006-11-05 00:10:49.000000000 +0000
++++ common/nx-X11/config/imake/imake.c 2006-11-05 00:11:49.000000000 +0000
+@@ -974,7 +974,7 @@
+ static void
+ get_libc_version(FILE *inFile)
+ {
+- char aout[] = "/tmp/imakeXXXXXX";
++ char aout[] = "./imakeXXXXXX";
+ FILE *fp;
+ const char *format = "%s -o %s -x c -";
+ char *cc;
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-windows-linux-resume.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-windows-linux-resume.patch
new file mode 100644
index 0000000..7f4a6bb
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-windows-linux-resume.patch
@@ -0,0 +1,37 @@
+--- common/nx-X11/programs/Xserver/hw/nxagent/Display.c.orig 2005-07-29 09:01:11.000000000 -0700
++++ common/nx-X11/programs/Xserver/hw/nxagent/Display.c 2005-07-30 07:16:06.000000000 -0700
+@@ -1531,11 +1531,12 @@
+ reconnectDisplayState = NOTHING;
+ }
+
++#define WARNING
+ static Bool reloadVisuals(int flexibility)
+ {
+ int i, nitems;
+ XVisualInfo *newVisuals, *vi;
+- unsigned long mask = VisualAllMask & ~VisualIDMask;
++ unsigned long mask = VisualAllMask & ~VisualIDMask & ~VisualBitsPerRGBMask;
+
+ newVisuals = malloc(sizeof(XVisualInfo) * nxagentNumVisuals);
+
+@@ -1577,6 +1578,10 @@
+ }
+ }
+
++ #ifdef WARNING
++ fprintf(stderr, "matched for %d visuals and found %d matching\n", nxagentNumVisuals,i);
++ #endif
++
+ if (i == nxagentNumVisuals)
+ {
+ nxagentVisuals = newVisuals;
+--- common/nx-X11/programs/Xserver/hw/nxagent/Visual.c.orig 2005-07-30 07:17:40.000000000 -0700
++++ common/nx-X11/programs/Xserver/hw/nxagent/Visual.c 2005-07-30 07:17:44.000000000 -0700
+@@ -48,7 +48,6 @@
+ for (i = 0; i < nxagentNumVisuals; i++)
+ {
+ if (pVisual->class == nxagentVisuals[i].class &&
+- pVisual->bitsPerRGBValue == nxagentVisuals[i].bits_per_rgb &&
+ pVisual->ColormapEntries == nxagentVisuals[i].colormap_size &&
+ pVisual->nplanes == nxagentVisuals[i].depth &&
+ pVisual->redMask == nxagentVisuals[i].red_mask &&
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-xorg7-font-fix.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-xorg7-font-fix.patch
new file mode 100644
index 0000000..77c4887
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nx-x11-1.5.0-xorg7-font-fix.patch
@@ -0,0 +1,394 @@
+diff -uBb --recursive common.orig/nx-X11/lib/fontconfig/fonts.conf.in common/nx-X11/lib/fontconfig/fonts.conf.in
+--- common.orig/nx-X11/lib/fontconfig/fonts.conf.in 2006-11-22 22:13:28.000000000 +0000
++++ common/nx-X11/lib/fontconfig/fonts.conf.in 2006-11-22 22:17:43.000000000 +0000
+@@ -24,7 +24,7 @@
+ Common X11R6 font directories
+ -->
+
+- <dir>/usr/X11R6/lib/X11/fonts</dir>
++ <dir>/usr/share/fonts</dir>
+ <dir>/usr/share/fonts</dir>
+ <dir>~/.fonts</dir>
+
+diff -uBb --recursive common.orig/nx-X11/lib/fontconfig/src/fontconfig.man common/nx-X11/lib/fontconfig/src/fontconfig.man
+--- common.orig/nx-X11/lib/fontconfig/src/fontconfig.man 2006-11-22 22:13:28.000000000 +0000
++++ common/nx-X11/lib/fontconfig/src/fontconfig.man 2006-11-22 22:17:44.000000000 +0000
+@@ -1352,8 +1352,8 @@
+ <!--
+ Find fonts in these directories
+ -->
+-<dir>/usr/X11R6/lib/X11/fonts/truetype</dir>
+-<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
++<dir>/usr/share/fonts/truetype</dir>
++<dir>/usr/share/fonts/Type1</dir>
+
+ <!--
+ Accept deprecated 'mono' alias, replacing it with 'monospace'
+diff -uBb --recursive common.orig/nx-X11/programs/mkcfm/mkcfm.c common/nx-X11/programs/mkcfm/mkcfm.c
+--- common.orig/nx-X11/programs/mkcfm/mkcfm.c 2006-11-22 22:13:27.000000000 +0000
++++ common/nx-X11/programs/mkcfm/mkcfm.c 2006-11-22 22:17:30.000000000 +0000
+@@ -48,7 +48,7 @@
+ static void CIDFillVals(FontScalablePtr);
+ static Bool DoDirectory(char *dirName);
+
+-#define DEFAULTCID "/usr/X11R6/lib/X11/fonts/CID"
++#define DEFAULTCID "/usr/share/fonts/CID"
+ #define DECIPOINTSPERINCH 722.7
+ #define DEFAULTRES 75
+ #define DEFAULTPOINTSIZE 120
+diff -uBb --recursive common.orig/nx-X11/programs/mkcfm/mkcfm.man common/nx-X11/programs/mkcfm/mkcfm.man
+--- common.orig/nx-X11/programs/mkcfm/mkcfm.man 2006-11-22 22:13:27.000000000 +0000
++++ common/nx-X11/programs/mkcfm/mkcfm.man 2006-11-22 22:17:30.000000000 +0000
+@@ -24,7 +24,7 @@
+ [\fICID-font-directory-name\fP]
+ .SH DESCRIPTION
+ There is usually only one CID font directory on the X font path. It is
+-usually called \fI/usr/X11R6/lib/X11/fonts/CID\fP. If you do not specify
++usually called \fI/usr/share/fonts/CID\fP. If you do not specify
+ an argument, \fImkcfm\fP will try to go through the subdirectories of
+ that directory, and create one summary of font metric files for each
+ CIDFont (character descriptions) file and each CMap (Character Maps) file
+diff -uBb --recursive common.orig/nx-X11/programs/xfs/xfs.man common/nx-X11/programs/xfs/xfs.man
+--- common.orig/nx-X11/programs/xfs/xfs.man 2006-11-22 22:13:27.000000000 +0000
++++ common/nx-X11/programs/xfs/xfs.man 2006-11-22 22:17:29.000000000 +0000
+@@ -186,9 +186,9 @@
+ XCOMM the first is a set of Speedo outlines, the second is a set of
+ XCOMM misc bitmaps and the last is a set of 100dpi bitmaps
+ XCOMM
+-catalogue = /usr/X11R6/lib/X11/fonts/speedo,
+- /usr/X11R6/lib/X11/fonts/misc,
+- /usr/X11R6/lib/X11/fonts/100dpi/
++catalogue = /usr/share/fonts/speedo,
++ /usr/share/fonts/misc,
++ /usr/share/fonts/100dpi/
+
+ XCOMM in 12 points, decipoints
+ default-point-size = 120
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/Install common/nx-X11/programs/Xserver/hw/xfree86/doc/Install
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/Install 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/Install 2006-11-22 22:17:13.000000000 +0000
+@@ -318,7 +318,7 @@
+ chmod ug-w /usr/X11R6/lib # Make sure the permissions are OK
+ /sbin/ldconfig /usr/X11R6/lib # For Linux
+ /sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD
+- /usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
++ /usr/X11R6/bin/mkfontdir /usr/share/fonts/misc
+
+ 4.2 Installing over an old installation
+
+@@ -378,7 +378,7 @@
+ chmod ug-w /usr/X11R6/lib # Make sure the permissions are OK
+ /sbin/ldconfig /usr/X11R6/lib # For Linux
+ /sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD
+- /usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
++ /usr/X11R6/bin/mkfontdir /usr/share/fonts/misc
+
+ Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml,v 1.17 2003/02/24 17:09:16 dawes Exp $
+
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/man/XF86Config.man common/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/man/XF86Config.man
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/man/XF86Config.man 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/man/XF86Config.man 2006-11-22 22:17:13.000000000 +0000
+@@ -99,16 +99,16 @@
+ .\" X11R6 allows the X server to request fonts from a font server. A
+ .\" font server is specified by placing a "<trans>/<hostname>:<port_number>"
+ .\" entry into the fontpath. For example, the fontpath
+-.\" "/usr/X11R6/lib/X11/fonts/misc/,tcp/zok:7100" tells the X server
++.\" "/usr/share/fonts/misc/,tcp/zok:7100" tells the X server
+ .\" to first try to locate the font in the local directory
+-.\" /usr/X11R6/lib/X11/fonts/misc. If that fails, then request the
++.\" /usr/share/fonts/misc. If that fails, then request the
+ .\" font from the \fIfont server\fP running on machine zok listening
+ .\" for connections on TCP port number 7100.
+ X11R6 は X サーバがフォントサーバにフォントを要求することが可能
+ になりました。フォントサーバは場所を "<trans>/<hostname>:<port_number>"
+ とフォントパスに指定します。例えば、フォントパス
+-"/usr/X11R6/lib/X11/fonts/misc/,tcp/zok:7100" はまず最初にローカル
+-ディレクトリ /usr/X11R6/lib/X11/fonts/misc を X サーバに伝えます。
++"/usr/share/fonts/misc/,tcp/zok:7100" はまず最初にローカル
++ディレクトリ /usr/share/fonts/misc を X サーバに伝えます。
+ これが失敗したときに、ポート番号 7100 から TCP で接続して聞いて
+ (listening) いる zok というホストで動作している \fIフォントサーバ\fP
+ にフォントを要求します。
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/sgml/RELNOTE.sgml common/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/sgml/RELNOTE.sgml
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/sgml/RELNOTE.sgml 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/Japanese/sgml/RELNOTE.sgml 2006-11-22 22:17:13.000000000 +0000
+@@ -1372,7 +1372,7 @@
+ 3.1.2D (or are not sure if you installed it), you should run the following:
+
+ <tscreen><verb>
+- /usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
++ /usr/X11R6/bin/mkfontdir /usr/share/fonts/misc
+ </verb></tscreen>
+
+ An up-to-date version of the xterm termcap and terminfo entries is
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/README.fonts common/nx-X11/programs/Xserver/hw/xfree86/doc/README.fonts
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/README.fonts 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/README.fonts 2006-11-22 22:17:13.000000000 +0000
+@@ -253,7 +253,7 @@
+
+ The CIDFont code in XFree86 requires a very rigid directory structure. The
+ main directory must be called `CID' (its location defaults to
+-`/usr/X11R6/lib/X11/fonts/CID' but it may be located anywhere), and it should
++`/usr/share/fonts/CID' but it may be located anywhere), and it should
+ contain a subdirectory for every CID collection. Every subdirectory must
+ contain subdirectories called CIDFont (containing the actual CIDFont files),
+ CMap (containing all the needed CMaps), AFM (containing the font metric
+@@ -398,7 +398,7 @@
+
+ For example, the font file
+
+- /usr/X11R6/lib/X11/fonts/misc/6x13.bdf
++ /usr/share/fonts/misc/6x13.bdf
+
+ with XLFD
+
+@@ -442,7 +442,7 @@
+
+ and resides in the font file
+
+- /usr/X11R6/lib/X11/fonts/misc/cu12.pcf.gz
++ /usr/share/fonts/misc/cu12.pcf.gz
+
+ Additional ClearlyU fonts include
+
+@@ -480,7 +480,7 @@
+
+ and reside in the font files
+
+- /usr/X11R6/lib/X11/fonts/Type1/cour*.pfa
++ /usr/share/fonts/Type1/cour*.pfa
+
+ The Adobe Utopia set of fonts only cover ISO 8859-1 as well as Adobe Standard
+ Encoding. These fonts have XLFD
+@@ -489,7 +489,7 @@
+
+ and reside in the font files
+
+- /usr/X11R6/lib/X11/fonts/Type1/UT*.pfa
++ /usr/share/fonts/Type1/UT*.pfa
+
+ Finally, XFree86 also comes with Type 1 versions of Bitstream Courier and
+ Charter. These fonts have XLFD
+@@ -499,7 +499,7 @@
+
+ and reside in the font files
+
+- /usr/X11R6/lib/X11/fonts/Type1/c*bt_.pfb
++ /usr/share/fonts/Type1/c*bt_.pfb
+
+ 3.3.2 Standard Speedo fonts
+
+@@ -515,7 +515,7 @@
+
+ and reside in the font files
+
+- /usr/X11R6/lib/X11/fonts/Speedo/font*.spd
++ /usr/share/fonts/Speedo/font*.spd
+
+ 3.4 The Bigelow & Holmes Luxi family
+
+@@ -699,7 +699,7 @@
+ In order to use a font in an encoding that the font backend does not know
+ about, you need to have an `encodings.dir' file either in the same directory
+ as the font file used or in a system-wide location
+-(`/usr/X11R6/lib/X11/fonts/encodings/' by default).
++(`/usr/share/fonts/encodings/' by default).
+
+ The `encodings.dir' file has a similar format to `fonts.dir'. Its first line
+ specifies the number of encodings, while every successive line has two
+@@ -709,9 +709,9 @@
+ ple,
+
+ 3
+- mulearabic-0 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-0.enc
+- mulearabic-1 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-1.enc
+- mulearabic-2 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-2.enc
++ mulearabic-0 /usr/share/fonts/encodings/mulearabic-0.enc
++ mulearabic-1 /usr/share/fonts/encodings/mulearabic-1.enc
++ mulearabic-2 /usr/share/fonts/encodings/mulearabic-2.enc
+
+ The name of an encoding must be specified in the encoding file's `STARTENCOD-
+ ING' or `ALIAS' line. It is not enough to create an `encodings.dir' entry.
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/README.SVR4 common/nx-X11/programs/Xserver/hw/xfree86/doc/README.SVR4
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/README.SVR4 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/README.SVR4 2006-11-22 22:17:13.000000000 +0000
+@@ -295,9 +295,9 @@
+ for i in *pc???.bdf
+ do
+ /usr/X11R6/bin/bdftopcf $i > \
+- /usr/X11R6/lib/X11/fonts/misc/`basename $i .bdf`.pcf
++ /usr/share/fonts/misc/`basename $i .bdf`.pcf
+ done
+- cd /usr/X11R6/lib/X11/fonts/misc
++ cd /usr/share/fonts/misc
+ /usr/X11R6/bin/mkfontdir
+ # Do this only if the server is already running.
+ /usr/X11R6/bin/xset fp rehash
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/fonts.sgml common/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/fonts.sgml
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/fonts.sgml 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/fonts.sgml 2006-11-22 22:17:14.000000000 +0000
+@@ -296,7 +296,7 @@
+
+ The CIDFont code in XFree86 requires a very rigid directory
+ structure. The main directory must be called `<tt/CID/' (its location
+-defaults to `<tt>/usr/X11R6/lib/X11/fonts/CID</tt>' but it may be
++defaults to `<tt>/usr/share/fonts/CID</tt>' but it may be
+ located anywhere), and it should contain a subdirectory for every CID
+ collection. Every subdirectory <it/must/ contain subdirectories
+ called <tt/CIDFont/ (containing the actual CIDFont files), <tt/CMap/
+@@ -457,7 +457,7 @@
+
+ For example, the font file
+ <tscreen><verb>
+-/usr/X11R6/lib/X11/fonts/misc/6x13.bdf
++/usr/share/fonts/misc/6x13.bdf
+ </verb></tscreen>
+ with XLFD
+ <tscreen><verb>
+@@ -502,7 +502,7 @@
+ </verb></tscreen>
+ and resides in the font file
+ <tscreen><verb>
+-/usr/X11R6/lib/X11/fonts/misc/cu12.pcf.gz
++/usr/share/fonts/misc/cu12.pcf.gz
+ </verb></tscreen>
+ Additional ClearlyU fonts include
+ <tscreen><verb>
+@@ -542,7 +542,7 @@
+ </verb></tscreen>
+ and reside in the font files
+ <tscreen><verb>
+-/usr/X11R6/lib/X11/fonts/Type1/cour*.pfa
++/usr/share/fonts/Type1/cour*.pfa
+ </verb></tscreen>
+
+ The Adobe Utopia set of fonts only cover ISO&nbsp;8859-1 as well as
+@@ -552,7 +552,7 @@
+ </verb></tscreen>
+ and reside in the font files
+ <tscreen><verb>
+-/usr/X11R6/lib/X11/fonts/Type1/UT*.pfa
++/usr/share/fonts/Type1/UT*.pfa
+ </verb></tscreen>
+
+ Finally, XFree86 also comes with Type&nbsp;1 versions of Bitstream
+@@ -563,7 +563,7 @@
+ </verb></tscreen>
+ and reside in the font files
+ <tscreen><verb>
+-/usr/X11R6/lib/X11/fonts/Type1/c*bt_.pfb
++/usr/share/fonts/Type1/c*bt_.pfb
+ </verb></tscreen>
+
+ <sect2>Standard Speedo fonts
+@@ -581,7 +581,7 @@
+ </verb></tscreen>
+ and reside in the font files
+ <tscreen><verb>
+-/usr/X11R6/lib/X11/fonts/Speedo/font*.spd
++/usr/share/fonts/Speedo/font*.spd
+ </verb></tscreen>
+
+ <sect1>The Bigelow &amp; Holmes Luxi family
+@@ -770,7 +770,7 @@
+ <p>In order to use a font in an encoding that the font backend does
+ not know about, you need to have an `<tt/encodings.dir/' file either
+ in the same directory as the font file used or in a system-wide
+-location (`<tt>/usr/X11R6/lib/X11/fonts/encodings/</tt>' by default).
++location (`<tt>/usr/share/fonts/encodings/</tt>' by default).
+
+ The `<tt/encodings.dir/' file has a similar format to
+ `<tt/fonts.dir/'. Its first line specifies the number of encodings,
+@@ -781,9 +781,9 @@
+
+ <tscreen><verb>
+ 3
+-mulearabic-0 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-0.enc
+-mulearabic-1 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-1.enc
+-mulearabic-2 /usr/X11R6/lib/X11/fonts/encodings/mulearabic-2.enc
++mulearabic-0 /usr/share/fonts/encodings/mulearabic-0.enc
++mulearabic-1 /usr/share/fonts/encodings/mulearabic-1.enc
++mulearabic-2 /usr/share/fonts/encodings/mulearabic-2.enc
+ </verb></tscreen>
+
+ The name of an encoding <it/must/ be specified in the encoding file's
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml common/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/Install.sgml 2006-11-22 22:17:13.000000000 +0000
+@@ -432,7 +432,7 @@
+ chmod ug-w /usr/X11R6/lib # Make sure the permissions are OK
+ /sbin/ldconfig /usr/X11R6/lib # For Linux
+ /sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD
+-/usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
++/usr/X11R6/bin/mkfontdir /usr/share/fonts/misc
+ </verb></tscreen>
+
+ <sect1>Installing over an old installation
+@@ -511,7 +511,7 @@
+ chmod ug-w /usr/X11R6/lib # Make sure the permissions are OK
+ /sbin/ldconfig /usr/X11R6/lib # For Linux
+ /sbin/ldconfig -m /usr/X11R6/lib # For FreeBSD, NetBSD, OpenBSD
+-/usr/X11R6/bin/mkfontdir /usr/X11R6/lib/X11/fonts/misc
++/usr/X11R6/bin/mkfontdir /usr/share/fonts/misc
+ </verb></tscreen>
+
+ ]]>
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/SVR4.sgml common/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/SVR4.sgml
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/SVR4.sgml 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/doc/sgml/SVR4.sgml 2006-11-22 22:17:13.000000000 +0000
+@@ -328,9 +328,9 @@
+ for i in *pc???.bdf
+ do
+ /usr/X11R6/bin/bdftopcf $i > \
+- /usr/X11R6/lib/X11/fonts/misc/`basename $i .bdf`.pcf
++ /usr/share/fonts/misc/`basename $i .bdf`.pcf
+ done
+- cd /usr/X11R6/lib/X11/fonts/misc
++ cd /usr/share/fonts/misc
+ /usr/X11R6/bin/mkfontdir
+ # Do this only if the server is already running.
+ /usr/X11R6/bin/xset fp rehash
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/drivers/newport/XF86Config.indy common/nx-X11/programs/Xserver/hw/xfree86/drivers/newport/XF86Config.indy
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/drivers/newport/XF86Config.indy 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/drivers/newport/XF86Config.indy 2006-11-22 22:17:17.000000000 +0000
+@@ -52,15 +52,15 @@
+ # as well as specifying multiple comma-separated entries in one FontPath
+ # command (or a combination of both methods)
+
+- FontPath "/usr/X11R6/lib/X11/fonts/local/"
+- FontPath "/usr/X11R6/lib/X11/fonts/misc/"
+- FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
+- FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
+- FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
+- FontPath "/usr/X11R6/lib/X11/fonts/CID/"
+- FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
+- FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
+- FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
++ FontPath "/usr/share/fonts/local/"
++ FontPath "/usr/share/fonts/misc/"
++ FontPath "/usr/share/fonts/75dpi/:unscaled"
++ FontPath "/usr/share/fonts/100dpi/:unscaled"
++ FontPath "/usr/share/fonts/Type1/"
++ FontPath "/usr/share/fonts/CID/"
++ FontPath "/usr/share/fonts/Speedo/"
++ FontPath "/usr/share/fonts/75dpi/"
++ FontPath "/usr/share/fonts/100dpi/"
+
+ # ModulePath can be used to set a search path for the X server modules.
+ # The default path is shown here.
+diff -uBb --recursive common.orig/nx-X11/programs/Xserver/hw/xfree86/etc/install.sv3 common/nx-X11/programs/Xserver/hw/xfree86/etc/install.sv3
+--- common.orig/nx-X11/programs/Xserver/hw/xfree86/etc/install.sv3 2006-11-22 22:13:24.000000000 +0000
++++ common/nx-X11/programs/Xserver/hw/xfree86/etc/install.sv3 2006-11-22 22:17:22.000000000 +0000
+@@ -549,9 +549,9 @@
+ read answer
+ [ "$answer" = "y" -o "$answer" = "Y" ] && {
+ sed -e 's/FONT 8x16/FONT vga/' </usr/lib/loadfont/vga437.bdf \
+- | bdftopcf -t >/usr/X11R6/lib/X11/fonts/misc/vga.pcf
+- chmod 644 /usr/X11R6/lib/X11/fonts/misc/fonts.dir
+- mkfontdir /usr/X11R6/lib/X11/fonts/misc
++ | bdftopcf -t >/usr/share/fonts/misc/vga.pcf
++ chmod 644 /usr/share/fonts/misc/fonts.dir
++ mkfontdir /usr/share/fonts/misc
+ }
+ fi
+ }
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-external-nxcomp.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-external-nxcomp.patch
new file mode 100644
index 0000000..eb7f9d2
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-external-nxcomp.patch
@@ -0,0 +1,97 @@
+--- common/nx-X11/lib/X11/Imakefile.orig 2007-03-08 16:53:42.000000000 +0100
++++ common/nx-X11/lib/X11/Imakefile 2007-03-08 16:56:58.000000000 +0100
+@@ -58,9 +58,10 @@
+ # -DNX_CLEAN_FLUSH \
+ # -DNX_CLEAN_SEND \
+
+-NX_XCOMPLIBTARGET = ../../../nxcomp/libXcomp.so
++NX_PREFIX = /usr/NX
++NX_XCOMPLIBTARGET = $(NX_PREFIX)/lib/libXcomp.so
+
+-NX_REQUIREDLIBS = -L../../../nxcomp -lXcomp
++NX_REQUIREDLIBS = -L$(NX_PREFIX)/lib -lXcomp
+
+ #endif
+
+@@ -1132,18 +1133,6 @@
+
+ #if NXLibraries
+
+-#ifdef SunArchitecture
+-$(NX_XCOMPLIBTARGET):
+- cd ../../../nxcomp && \
+- ./configure && \
+- gmake
+-#else
+-$(NX_XCOMPLIBTARGET):
+- cd ../../../nxcomp && \
+- ./configure && \
+- make
+-#endif
+-
+ depend:: $(NX_XCOMPLIBTARGET) ks_tables.h
+
+ #else
+--- common/nx-X11/programs/Xserver/Imakefile.orig 2007-03-08 18:57:58.000000000 +0100
++++ common/nx-X11/programs/Xserver/Imakefile 2007-03-08 18:58:20.000000000 +0100
+@@ -1368,11 +1368,7 @@
+ * We need this as the linker will try to locate dependencies of X11 and Xext.
+ */
+
+-#if defined(SunArchitecture)
+-NXAGENTNXLIBS = -L ../../../nxcomp -L ../../../nxcompext -lXcomp -lXcompext -lrt -L/usr/sfw/lib -lXrender
+-#else
+-NXAGENTNXLIBS = -Wl,-rpath-link,../../../nxcomp -Wl,-rpath-link,../../../nxcompext,-lXrender
+-#endif
++NXAGENTNXLIBS = -Wl,-rpath-link,/usr/NX/lib -Wl,-rpath-link,../../../nxcompext,-lXrender
+
+ #endif
+ ServerTarget(nxagent,$(NXAGENTDIRS),$(NXAGENTOBJS), \
+--- common/nx-X11/lib/Xext/Imakefile.orig 2007-03-09 10:26:20.000000000 +0100
++++ common/nx-X11/lib/Xext/Imakefile 2007-03-09 10:26:42.000000000 +0100
+@@ -60,14 +60,7 @@
+ LINTLIBS = $(LINTXLIB)
+
+ #if NXLibraries
+-
+-$(NX_XCOMPLIBEXTTARGET):
+- cd ../../../nxcompext && \
+- ./configure && \
+- make
+-
+ all:: $(NX_XCOMPLIBEXTTARGET)
+-
+ #endif
+
+ #include <Library.tmpl>
+--- client/nxdesktop/configure.orig 2007-03-09 11:16:59.000000000 +0100
++++ client/nxdesktop/configure 2007-03-09 11:23:41.000000000 +0100
+@@ -162,7 +162,7 @@
+
+ # Find X installation
+
+-xdirs="$extraxdir ../nx-X11/exports /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
++xdirs="$extraxdir ../../common/nx-X11/exports /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
+
+ for dir in $xdirs; do
+ if [ -f $dir/include/X11/Xlib.h ]; then
+@@ -195,7 +195,7 @@
+ rpath="$rpath:$xdir/lib"
+ fi
+
+-ldflags="$ldflags"
++ldflags="$ldflags -L/usr/NX/lib"
+ targets="$targets nxdesktop"
+
+ #withoutopenssl not currently supported
+--- server/nxviewer/nxviewer/Imakefile.orig 2007-03-09 11:35:58.000000000 +0100
++++ server/nxviewer/nxviewer/Imakefile 2007-03-09 11:36:50.000000000 +0100
+@@ -54,7 +54,7 @@
+
+ DEPLIBS = XawClientDepLibs $(VNCAUTH_LIB)
+
+-LOCAL_LIBRARIES = XawClientLibs $(VNCAUTH_LIB) $(ZLIB_LIB) $(JPEG_LIB) $(NX_LIB)
++LOCAL_LIBRARIES = XawClientLibs $(VNCAUTH_LIB) $(ZLIB_LIB) $(JPEG_LIB) $(NX_LIB) -L/usr/NX/lib
+
+ #ifdef SunArchitecture
+ LOCAL_LIBRARIES = $(NX_LIB) $(SUN_LIB) XawClientLibs $(VNCAUTH_LIB) $(ZLIB_LIB) $(JPEG_LIB)
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-insitu.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-insitu.patch
new file mode 100644
index 0000000..86ab44d
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-insitu.patch
@@ -0,0 +1,123 @@
+diff -uBb --recursive common.orig/nxcompext/Makefile.in common/nxcompext/Makefile.in
+--- common.orig/nxcompext/Makefile.in 2006-11-22 22:30:10.000000000 +0000
++++ common/nxcompext/Makefile.in 2006-11-22 22:34:08.000000000 +0000
+@@ -19,7 +19,7 @@
+
+ CC = @CC@
+ CCFLAGS = $(CXXFLAGS)
+-CCINCLUDES = -I. -I../nxcomp
++CCINCLUDES = -I. -I../nxcomp -I../nx-X11/lib/X11 -I../nx-X11/include -I../nx-X11/programs/Xserver/include
+ CCDEFINES =
+
+ LDFLAGS = @LDFLAGS@ -L../nx-X11/lib/X11 -L../nxcomp
+diff -uBb --recursive client.orig/nxdesktop/Makefile client/nxdesktop/Makefile
+--- client.orig/nxdesktop/Makefile 2006-11-23 07:49:51.000000000 +0000
++++ client/nxdesktop/Makefile 2006-11-23 07:52:17.000000000 +0000
+@@ -30,8 +30,8 @@
+ mandir = $(prefix)/man
+ datadir = $(prefix)/share
+
+-INCLUDES = -I../nxcomp -I../nxcompext
+-LDLIBS = -lXpm -L../nxcompext -lXcompext -L../nxcomp -lXcomp -lX11 -lXext
++INCLUDES = -I../../common/nxcomp -I../../common/nxcompext
++LDLIBS = -L../../common/nx-X11 -lXpm -L../../common/nxcompext -lXcompext -L../../common/nxcomp -lXcomp -lX11 -lXext
+ VERSION = 1.5.0-2
+ KEYMAP_PATH = $(datadir)/keymaps-windows/
+
+diff -uBb --recursive server.orig/nxnode/src/configure server/nxnode/src/configure
+--- server.orig/nxnode/src/configure 2006-11-23 22:07:58.000000000 +0000
++++ server/nxnode/src/configure 2006-11-23 22:08:43.000000000 +0000
+@@ -78,9 +78,7 @@
+ fi
+
+ echo "Checking perl path"
+-out=`../../perl/bin/perl -V:bin`
+-eval $out
+-perlbin="$bin/perl"
++perlbin="/usr/bin/perl"
+
+ echo "Created Makefile"
+ cp -f Makefile.in Makefile
+diff -uBb --recursive server.orig/nxsensor/server/Makefile server/nxsensor/server/Makefile
+--- server.orig/nxsensor/server/Makefile 2006-11-23 21:46:17.000000000 +0000
++++ server/nxsensor/server/Makefile 2006-11-23 21:48:48.000000000 +0000
+@@ -35,20 +35,20 @@
+ endif
+ PKG_LIB = `$(PKG_CONFIG) --libs glib-2.0 gmodule-2.0 gthread-2.0`
+
+-#GLIB12_INCLUDE = `glib-config --cflags`
+-#GLIB12_LIB = `glib-config --libs glib gmodule`
++GLIB12_INCLUDE = `glib-config --cflags`
++GLIB12_LIB = `glib-config --libs glib gmodule`
+
+-GLIB12_INCLUDE = -I../../glib-1.2.8/ -I../../glib-1.2.8/gmodule/ -I../../glib-1.2.8/gthread/
+-GLIB12_LIB = -L../../glib-1.2.8/.libs -L../../glib-1.2.8/gmodule/.libs -L../../glib-1.2.8/gthread/.libs -lglib -lgmodule -lgthread -ldl
++#GLIB12_INCLUDE = -I../../glib-1.2.8/ -I../../glib-1.2.8/gmodule/ -I../../glib-1.2.8/gthread/
++#GLIB12_LIB = -L../../glib-1.2.8/.libs -L../../glib-1.2.8/gmodule/.libs -L../../glib-1.2.8/gthread/.libs -lglib -lgmodule -lgthread -ldl
+
+ LD_RUN_PATH = /usr/NX/lib
+
+-FLAGS = -O3 -I.. $(PKG_INCLUDE) $(GTOP_INCLUDE)
++FLAGS = $(CFLAGS) -I.. $(PKG_INCLUDE) $(GTOP_INCLUDE)
+ ifeq ($(glib12),1)
+-FLAGS = -O3 -I.. $(GLIB12_INCLUDE) $(GTOP_INCLUDE)
++FLAGS = $(CFLAGS) -I.. $(GLIB12_INCLUDE) $(GTOP_INCLUDE)
+ endif
+ ifeq ($(glib12),yes)
+-FLAGS = -O3 -I.. $(GLIB12_INCLUDE) $(GTOP_INCLUDE)
++FLAGS = $(CFLAGS) -I.. $(GLIB12_INCLUDE) $(GTOP_INCLUDE)
+ endif
+
+ FLAGS+= $(PTHREAD_INC)
+diff -ubB --recursive server.orig/nxviewer/nxviewer/Imakefile server/nxviewer/nxviewer/Imakefile
+--- server.orig/nxviewer/nxviewer/Imakefile 2006-11-23 20:23:37.000000000 +0000
++++ server/nxviewer/nxviewer/Imakefile 2006-11-23 20:25:41.000000000 +0000
+@@ -15,42 +15,24 @@
+ /* */
+ /***************************************************************************/
+
+-#ifdef SunArchitecture
+-EXTRA_DEFINES = -D__EXTENSIONS__
+-#endif
+-
+ XCOMM Shared memory support works OK on x86 linux, not tested elsewhere but
+ XCOMM seems to cause problems on Digital Unix.
+
+ #if defined(i386Architecture) && defined(LinuxArchitecture)
+ DEFINES = -DMITSHM
+-ZLIB_INC = -I../../zlib-1-2.1
+-JPEG_INC = -I../../jpeg-6b
+ #endif
+
+-NX_INC = -I../../nxcomp -I../../nxcompext -I../../nx-X11/exports/include
+-NX_LIB = -L../../nxcomp -lXcomp -L../../nxcompext -lXcompext
+-
+-#ifdef SunArchitecture
+-NX_INC += -I/usr/sfw/include -I/usr/include
+-NX_LIB += ../../nx-X11/exports/lib/libXpm.a -L../../nx-X11/exports/lib
+-ZLIB_INC = -I/usr/local/include
+-JPEG_INC = -I/usr/local/include
+-#endif
++NX_INC = -I../../../common/nxcomp -I../../../common/nxcompext -I../../../common/nx-X11/exports/include
++NX_LIB = -L../../../common/nxcomp -lXcomp -L../../../common/nxcompext -lXcompext
+
+
+-INCLUDES = -I../include -I. $(ZLIB_INC) $(JPEG_INC) -I/usr/include/X11 $(NX_INC)
++INCLUDES = -I../include -I. $(ZLIB_INC) $(JPEG_INC) -I../../../common/nx-X11/lib/X11 -I../../../common/nx-X11/include -I../../../common/nx-X11/programs/Xserver/include $(NX_INC)
+ VNCAUTH_LIB = ./libvncauth.a
+-ZLIB_LIB = -L../../zlib-1.2.1 -lz
+-JPEG_LIB = -L../../jpeg-6b/.libs -ljpeg
++ZLIB_LIB = -lz
++JPEG_LIB = -ljpeg
+
+-USRLIBDIR = ../../nx-X11/exports/lib
++USRLIBDIR = ../../../common/nx-X11/lib/X11
+
+-#ifdef SunArchitecture
+-USRLIBDIR = /usr/NX/lib
+-SUN_LIB = -lX11 -lXext -L/usr/openwin/lib
+-JPEG_LIB = ../../jpeg-6b/.libs/libjpeg.a
+-#endif
+
+ DEPLIBS = XawClientDepLibs $(VNCAUTH_LIB)
+
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-nxagent-reduced-debugging.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-nxagent-reduced-debugging.patch
new file mode 100644
index 0000000..c620df8
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-nxagent-reduced-debugging.patch
@@ -0,0 +1,12 @@
+--- common/nx-X11/programs/Xserver/hw/nxagent/Render.c.orig 2007-04-14 16:17:20.000000000 +0200
++++ common/nx-X11/programs/Xserver/hw/nxagent/Render.c 2007-04-14 16:18:12.000000000 +0200
+@@ -1195,7 +1195,9 @@
+ strncpy(szFilter, filter, name_size);
+ szFilter[name_size] = 0;
+
++ #ifdef TEST
+ fprintf(stderr, "nxagentSetPictureFilter: going to set filter [%s].\n", szFilter);
++ #endif
+
+ XRenderSetPictureFilter (nxagentDisplay,
+ nxagentPicturePriv(pPicture) -> picture,
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-perl.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-perl.patch
new file mode 100644
index 0000000..e16b526
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-perl.patch
@@ -0,0 +1,32 @@
+diff -Naur server/nxnode/src.orig/functions.pl server/nxnode/src/functions.pl
+--- server/nxnode/src.orig/functions.pl 2007-04-18 23:59:08.000000000 +0200
++++ server/nxnode/src/functions.pl 2007-04-19 00:03:28.000000000 +0200
+@@ -423,17 +423,14 @@
+ }
+
+ sub get_unique_id {
+- my $now;
+- $::TIMEVAL_T = "LL";
+- $now = pack($::TIMEVAL_T, ());
++ my $now = gettimeofday;
+
+- if (syscall(&SYS_gettimeofday, $now, 0) == -1) {
++ if ($now == -1) {
+ NXMsg::send_response("internal_server_error", "", ": cannot get time of day");
+ log_msg("cannot get time of day", $::LOG_ERR, 0);
+ handle_command ('exit');
+ }
+
+- my @now2 = unpack($::TIMEVAL_T, $now);
+ my @command = ("ps","-e");
+ my @parameters = ();
+ my ($cmd_err, $cmd_out, $exit_value) = ::run_command (\@command, \@parameters);
+diff -Naur server/nxnode/src.orig/nxshell.pl server/nxnode/src/nxshell.pl
+--- server/nxnode/src.orig/nxshell.pl 2007-04-18 23:59:08.000000000 +0200
++++ server/nxnode/src/nxshell.pl 2007-04-19 00:03:50.000000000 +0200
+@@ -36,4 +36,4 @@
+ use Socket;
+ #undef $ENV{'LANG'};
+
+-require 'sys/syscall.ph';
++use Time::HiRes qw(gettimeofday);
diff --git a/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-setup.patch b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-setup.patch
new file mode 100644
index 0000000..711646a
--- /dev/null
+++ b/net-misc/nxserver-2xterminalserver/files/1.5.0/nxserver-2xterminalserver-1.5.0-setup.patch
@@ -0,0 +1,96 @@
+--- server/nxnode/setup/nxsetup.orig 2007-03-10 16:25:56.000000000 +0100
++++ server/nxnode/setup/nxsetup 2007-03-10 16:26:38.000000000 +0100
+@@ -840,6 +840,10 @@
+
+ removeNXinit () {
+
++ if [ "$system" = "gentoo" ]; then
++ return
++ fi
++
+ runCommand "$RMCOMMAND -f /etc/init.d/nxserver" "Unable to remove '/etc/init.d/nxserver'" "warn"
+
+ if [ "$system" = "solaris" ];
+@@ -896,6 +900,9 @@
+ then
+ runCommand "$RMCOMMAND -f /etc/rc0.d/K99nxserver" "Unable to remove '/etc/rc0.d/K99nxserver'" "warn"
+ fi
++ elif [ "$system" = "gentoo" ]; then
++ # do nothing; this is handled by Gentoo ebuild
++ echo > /dev/null
+ else
+ if [ -f /etc/rc.d/rc3.d/S99nxserver ];
+ then
+@@ -919,6 +926,10 @@
+
+
+ addNXinit () {
++
++ if [ "$system" = "gentoo" ] ; then
++ return;
++ fi
+
+ runCommand "cat /usr/NX/scripts/restricted/nxaddinitd.sh > /etc/init.d/nxserver" "Unable to create: '/etc/init.d/nxserver'" "warn"
+ runCommand "chmod +x /etc/init.d/nxserver" "Cannot set permissions of '/etc/init.d/nxserver' file" "warn"
+@@ -994,6 +1005,11 @@
+ }
+
+ addNXSystemSetup () {
++
++ if [ "$system" = "gentoo" ]; then
++ return
++ fi
++
+ if [ -f "$rcBash" ];
+ then
+ grep "#$NX_SETUP_VERSION" "$rcBash" 1>/dev/null
+@@ -1064,6 +1080,10 @@
+ }
+
+ addNXUserLinux () {
++ # does the NX user already exist?
++ if id nx > /dev/null 2>&1 ; then
++ return
++ fi
+
+ if [ "x$system" = "xmandrake" -o "x$system" = "xfedora" ];
+ then
+@@ -1909,6 +1929,10 @@
+ system=fedora
+ fi
+
++if [ -d /usr/portage ]; then
++ system=gentoo
++fi
++
+ if [ "x$system" = "x" -a -f /etc/release ];
+ then
+ system=solaris
+@@ -1941,6 +1965,7 @@
+ "fedora" ) ;;
+ "debian" ) ;;
+ "solaris" ) ;;
++ "gentoo" ) ;;
+ "" ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;;
+ * ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;;
+ esac
+@@ -2094,18 +2119,7 @@
+ result=$?
+ if [ "$result" = 0 ];
+ then
+- txt=`/bin/bash -c "su - nx < /dev/null 2>&1 | /bin/grep -c 'NXSERVER'" 2>&1`
+- if [ "$?" != 0 ];
+- then
+- if [ "$txt" = "0" ];
+- then
+- echo "$PREFIX $ERROR ERROR: User 'nx' already exist but is not used by nxserver."
+- echo "$PREFIX $ERROR ERROR: Delete user 'nx' and run $NODE_ROOT/bin/nxsetup --install"
+- exit 1
+- else
+- echo "$PREFIX $ERROR ERROR: Error when checking if user nx is used by nx server: '$txt'"
+- fi
+- elif [ -f "$NODE_ROOT/etc/node.conf" -o -f "$NODE_ROOT/etc/node.cfg" ];
++ if [ -f "$NODE_ROOT/etc/node.conf" -o -f "$NODE_ROOT/etc/node.cfg" ];
+ then
+ procedureUpdate
+ return 0