aboutsummaryrefslogtreecommitdiff
path: root/net/nxserver
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2008-04-10 10:22:19 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2008-04-10 10:22:19 +0000
commitb86a05ab734949eb985d2a62267f2039c042d19d (patch)
treeda7f8649fa5f4a4aeb3981d6d77c8f0472c93bc3 /net/nxserver
parentfad058f05dcdbaa24d6afa9e59fcccf0f7d2e67e (diff)
downloadports-b86a05ab734949eb985d2a62267f2039c042d19d.tar.gz
ports-b86a05ab734949eb985d2a62267f2039c042d19d.zip
- update to 2.1.0
- make portlint happier - fix missing USE_LDCONFIG PR: 112887 Obtained from: http://www.deweyonline.com/nx/freebsd.html
Notes
Notes: svn path=/head/; revision=211000
Diffstat (limited to 'net/nxserver')
-rw-r--r--net/nxserver/Makefile141
-rw-r--r--net/nxserver/distinfo54
-rw-r--r--net/nxserver/files/extra-patch-nx-X11-programs-Xserver-hw-nxagent-Reconnect.c11
-rw-r--r--net/nxserver/files/extra-patch-nxcomp-types.h57
-rw-r--r--net/nxserver/files/patch-lib-xtrans-Xtranssock.c17
-rw-r--r--net/nxserver/files/patch-nx-X11-config-cf-NX-FreeBSD.def20
-rw-r--r--net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Atoms.c11
-rw-r--r--net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-NXdixfonts.c11
-rw-r--r--net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Pixmap.c100
-rw-r--r--net/nxserver/files/patch-nx-X11-programs-Xserver-xkb-ddxLoad.c12
-rw-r--r--net/nxserver/files/patch-nx-x11-lib-x11-imakefile11
-rw-r--r--net/nxserver/files/patch-nx-x11-programs-xserver-hw-nxagent-imakefile11
-rw-r--r--net/nxserver/files/patch-nxcomp-makefile.in21
-rw-r--r--net/nxserver/files/patch-nxcompext-Clean.c11
-rw-r--r--net/nxserver/files/patch-nxdesktop-Makeconf10
-rw-r--r--net/nxserver/files/patch-nxdesktop-configure11
-rw-r--r--net/nxserver/files/patch-nxdesktop-proto.h11
-rw-r--r--net/nxserver/files/patch-nxdesktop-rdesktop.h10
-rw-r--r--net/nxserver/files/patch-nxesd-audio_oss.c14
-rw-r--r--net/nxserver/files/patch-nxesd-esddsp.c11
-rw-r--r--net/nxserver/files/patch-nxviewer-include-vncauth.h11
-rw-r--r--net/nxserver/files/patch-nxviewer-libvncauth-vncauth.c11
-rw-r--r--net/nxserver/files/patch-nxviewer-nxviewer-Imakefile30
-rw-r--r--net/nxserver/files/patch-nxviewer-nxviewer-misc.c10
-rw-r--r--net/nxserver/files/patch-nxviewer-nxviewer-vncviewer.h10
-rw-r--r--net/nxserver/pkg-plist84
26 files changed, 433 insertions, 278 deletions
diff --git a/net/nxserver/Makefile b/net/nxserver/Makefile
index 1ed23df462ca..23ba0125980f 100644
--- a/net/nxserver/Makefile
+++ b/net/nxserver/Makefile
@@ -6,83 +6,122 @@
#
PORTNAME= nxserver
-PORTVERSION= 1.4.0
-PORTREVISION= 1
+PORTVERSION= 2.1.0
CATEGORIES= net
-MASTER_SITES= ${URL}/:X11 \
- ${URL}/:agent \
- ${URL}/:comp \
- ${URL}/:compext \
- ${URL}/:proxy \
- ${URL}/:auth \
- ${URL}/:viewer \
- ${URL}/:desktop
-DISTFILES= nx-X11-1.4.0-10.tar.gz:X11 \
- nxagent-1.4.0-65.tar.gz:agent \
- nxcomp-1.4.0-31.tar.gz:comp \
- nxcompext-1.4.0-3.tar.gz:compext \
- nxproxy-1.4.0-2.tar.gz:proxy \
- nxauth-1.4.0-2.tar.gz:auth \
- nxviewer-1.4.0-4.tar.gz:viewer \
- nxdesktop-1.4.0-61.tar.gz:desktop
+MASTER_SITES= http://web04.nomachine.com/download/${PORTVERSION}/sources/
+DISTFILES= nx-X11-${PORTVERSION}-3.tar.gz \
+ nxagent-${PORTVERSION}-18.tar.gz \
+ nxauth-${PORTVERSION}-2.tar.gz \
+ nxcomp-${PORTVERSION}-7.tar.gz \
+ nxcompext-${PORTVERSION}-5.tar.gz \
+ nxdesktop-${PORTVERSION}-10.tar.gz \
+ nxesd-${PORTVERSION}-3.tar.gz \
+ nxkill-${PORTVERSION}-2.tar.gz \
+ nxproxy-${PORTVERSION}-3.tar.gz \
+ nxviewer-${PORTVERSION}-12.tar.gz
+DIST_SUBDIR= NX
MAINTAINER= freenx@deweyonline.com
COMMENT= Low-bandwidth X network server
-LIB_DEPENDS= png:${PORTSDIR}/graphics/png \
- jpeg:${PORTSDIR}/graphics/jpeg
-RUN_DEPENDS= nc:${PORTSDIR}/net/netcat
+LIB_DEPENDS= audiofile.0:${PORTSDIR}/audio/libaudiofile \
+ jpeg.9:${PORTSDIR}/graphics/jpeg \
+ png.5:${PORTSDIR}/graphics/png
-URL= http://www.nomachine.com/download/nxsources/1.4.0
+USE_GMAKE= yes
+USE_GETOPT_LONG= yes
+USE_GETTEXT= yes
WRKSRC= ${WRKDIR}
+GNU_CONFIGURE= yes
ALL_TARGET= World
+PLIST_SUB+= NX_MAJOR=${PORTVERSION:R:R} NX_VERSION=${PORTVERSION}
NXPREFIX?= ${PREFIX}/NX
-USE_GMAKE= yes
-USE_IMAKE= yes
-ONLY_FOR_ARCHS= i386
-
-BROKEN= this port fails to build with xorg-7.2
+USE_LDCONFIG= ${NXPREFIX}
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 500014
-EXTRA_PATCHES= ${PATCHDIR}/extra-patch-nx-X11-programs-Xserver-hw-nxagent-Reconnect.c
-.endif
-
-.if ${OSVERSION} > 502126
-EXTRA_PATCHES= ${PATCHDIR}/extra-patch-nxcomp-types.h
-.endif
+post-patch:
+ @${REINPLACE_CMD} -e \
+ "s|/usr/NX/bin:/opt/NX/bin:/usr/local/NX|${NXPREFIX}|" \
+ ${WRKSRC}/nxcomp/Children.cpp
+ @${REINPLACE_CMD} -e "s|/usr/NX|${NXPREFIX}|" \
+ ${WRKSRC}/nxcomp/Loop.cpp \
+ ${WRKSRC}/nxcomp/Misc.cpp \
+ ${WRKSRC}/nxdesktop/xwin.c \
+ ${WRKSRC}/nxesd/nxesddsp.in \
+ ${WRKSRC}/nxviewer/nxviewer/desktop.c \
+ ${WRKSRC}/nx-X11/programs/Xserver/hw/nxagent/Display.c
+ @${REINPLACE_CMD} -e "s|-I\.\./nxesd|-I${PREFIX}/include &|" \
+ ${WRKSRC}/nxdesktop/Makefile
+ @${REINPLACE_CMD} -e "s|/usr/local/|${PREFIX}/|" \
+ ${WRKSRC}/nxviewer/nxviewer/Imakefile
do-configure:
- cd ${WRKSRC} && \
- for i in nx[cp]* ; do ( cd $$i ; ./configure "$$*" ); done && \
- (cd nxviewer ; ${XMKMF} -a)
+.if defined(TEMPLATES) && exists(${TEMPLATES}/config.guess) && exists(${TEMPLATES}/config.sub)
+ @CONFIG_GUESS_DIRS=$$(${FIND} ${WRKDIR} -name config.guess \
+ -o -name config.sub | ${XARGS} -n 1 ${DIRNAME}); \
+ for _D in $${CONFIG_GUESS_DIRS}; do \
+ ${CP} -f ${TEMPLATES}/config.guess $${_D}/config.guess; \
+ ${CHMOD} a+rx $${_D}/config.guess; \
+ ${CP} -f ${TEMPLATES}/config.sub $${_D}/config.sub; \
+ ${CHMOD} a+rx $${_D}/config.sub; \
+ done
+.endif
do-build:
cd ${WRKSRC}/nx-X11 && ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
- cd ${WRKSRC}/nxcomp && ${SETENV} ${MAKE_ENV} \
- ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
- cd ${WRKSRC}/nxcompext && ${SETENV} ${MAKE_ENV} \
+.for i in nxproxy nxkill nxesd
+ cd ${WRKSRC}/${i} && \
+ ${CONFIGURE_ENV} ./configure --prefix=${NXPREFIX} && \
+ ${SETENV} ${MAKE_ENV} \
${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
- cd ${WRKSRC}/nxproxy && ${SETENV} ${MAKE_ENV} \
- ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
- cd ${WRKSRC}/nxdesktop && \
- ${GMAKE}
- cd ${WRKSRC}/nxviewer && ${SETENV} ${MAKE_ENV} \
+.endfor
+ cd ${WRKSRC}/nxdesktop && ${CONFIGURE_ENV} ./configure \
+ --with-sound --prefix=${NXPREFIX} && \
+ ${SETENV} ${MAKE_ENV} \
${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS}
+ cd ${WRKSRC}/nxviewer && \
+ PATH=${WRKSRC}/nx-X11/config/imake:$${PATH} \
+ ../nx-X11/config/util/xmkmf -a ${WRKSRC}/nx-X11 && \
+ ${SETENV} ${MAKE_ENV} \
+ ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}
do-install:
- ${MKDIR} ${NXPREFIX}/lib ${NXPREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/X11/libX11.so* ${NXPREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/Xext/libXext.so* ${NXPREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/Xrender/libXrender.so* ${NXPREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/nxcomp/libXcomp.so* ${NXPREFIX}/lib
- ${INSTALL_DATA} ${WRKSRC}/nxcompext/libXcompext.so* ${NXPREFIX}/lib
+ ${MKDIR} ${NXPREFIX}/lib ${NXPREFIX}/bin ${NXPREFIX}/share/keymaps-windows
+ ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/X11/libX11.so.6.2 ${NXPREFIX}/lib
+ cd ${NXPREFIX}/lib && \
+ ${LN} -s libX11.so.6.2 libX11.so.6 && \
+ ${LN} -s libX11.so.6.2 libX11.so
+ ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/Xext/libXext.so.6.4 ${NXPREFIX}/lib
+ cd ${NXPREFIX}/lib && \
+ ${LN} -s libXext.so.6.4 libXext.so.6 && \
+ ${LN} -s libXext.so.6.4 libXext.so
+ ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/Xrender/libXrender.so.1.2 ${NXPREFIX}/lib
+ cd ${NXPREFIX}/lib && \
+ ${LN} -s libXrender.so.1.2 libXrender.so.1 && \
+ ${LN} -s libXrender.so.1.2 libXrender.so
+ ${INSTALL_DATA} ${WRKSRC}/nx-X11/lib/Xpm/libXpm.so.4.11 ${NXPREFIX}/lib
+ cd ${NXPREFIX}/lib && \
+ ${LN} -s libXpm.so.4.11 libXpm.so.4 && \
+ ${LN} -s libXpm.so.4.11 libXpm.so
+ ${INSTALL_DATA} ${WRKSRC}/nxcomp/libXcomp.so.${PORTVERSION} ${NXPREFIX}/lib
+ cd ${NXPREFIX}/lib && \
+ ${LN} -s libXcomp.so.${PORTVERSION} libXcomp.so.${PORTVERSION:R:R} && \
+ ${LN} -s libXcomp.so.${PORTVERSION} libXcomp.so
+ ${INSTALL_DATA} ${WRKSRC}/nxcompext/libXcompext.so.${PORTVERSION} ${NXPREFIX}/lib
+ cd ${NXPREFIX}/lib && \
+ ${LN} -s libXcompext.so.${PORTVERSION} libXcompext.so.${PORTVERSION:R:R} && \
+ ${LN} -s libXcompext.so.${PORTVERSION} libXcompext.so
${INSTALL_PROGRAM} ${WRKSRC}/nx-X11/programs/Xserver/nxagent ${NXPREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/nxdesktop/nxdesktop ${NXPREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/nxesd/nxesd ${NXPREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/nxkill/nxkill ${NXPREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/nxproxy/nxproxy ${NXPREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/nxviewer/nxpasswd/nxpasswd ${NXPREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/nxviewer/nxviewer/nxviewer ${NXPREFIX}/bin
+.for i in modifiers common ar cs da de de-ch en-dv en-gb en-us es et fi fo fr fr-be fr-ca fr-ch he hr hu is it ja ko lt lv mk nl nl-be no pl pt pt-br ru sl sv th tr
+ ${INSTALL_DATA} ${WRKSRC}/nxdesktop/keymaps/${i} ${NXPREFIX}/share/keymaps-windows
+.endfor
.include <bsd.port.post.mk>
diff --git a/net/nxserver/distinfo b/net/nxserver/distinfo
index 0ec3c8534123..e26110a59de3 100644
--- a/net/nxserver/distinfo
+++ b/net/nxserver/distinfo
@@ -1,24 +1,30 @@
-MD5 (nx-X11-1.4.0-10.tar.gz) = a8c6ab48021c91e55b902cd25097f33d
-SHA256 (nx-X11-1.4.0-10.tar.gz) = b459d1be33741bfd9a238847b5e09f048f15f8e1089b79556106f6783aeda74b
-SIZE (nx-X11-1.4.0-10.tar.gz) = 32329453
-MD5 (nxagent-1.4.0-65.tar.gz) = e39f2a3384edc9e33d8b68405fb91228
-SHA256 (nxagent-1.4.0-65.tar.gz) = 41b1720654ed682998f3a8cf52e2120f1c3b143fed2fd9397987e1ff7dce3fb4
-SIZE (nxagent-1.4.0-65.tar.gz) = 305264
-MD5 (nxcomp-1.4.0-31.tar.gz) = c2eb354e141e9f0e81f4cd1673b2a3ae
-SHA256 (nxcomp-1.4.0-31.tar.gz) = a2d6309af7e0dd7275d0d7a014ca793e7274d9daee0f3dbdda2b918597c8bd9c
-SIZE (nxcomp-1.4.0-31.tar.gz) = 455621
-MD5 (nxcompext-1.4.0-3.tar.gz) = ab12f1f32329f5da0f53dd0969fe897e
-SHA256 (nxcompext-1.4.0-3.tar.gz) = 31c1612f31e7677aaadc933db2d3a3eba803e4f1eedec2ad1000d26ef739f9f9
-SIZE (nxcompext-1.4.0-3.tar.gz) = 111409
-MD5 (nxproxy-1.4.0-2.tar.gz) = 15d89810730c7ed0e669b5525e5f3620
-SHA256 (nxproxy-1.4.0-2.tar.gz) = 5e32b4684bf5342704d2785925ce47a47d8de98c7742ca63fdb070b1393ea825
-SIZE (nxproxy-1.4.0-2.tar.gz) = 75223
-MD5 (nxauth-1.4.0-2.tar.gz) = 274319eb06fbab8bbd486836668e1e0a
-SHA256 (nxauth-1.4.0-2.tar.gz) = cb57df60bea37bf1affa7f4d6db53c5191ec72c2f0c4006e9805e4fe16666744
-SIZE (nxauth-1.4.0-2.tar.gz) = 23070
-MD5 (nxviewer-1.4.0-4.tar.gz) = 629f90c1f8ef50517e8b1de2c30adcb4
-SHA256 (nxviewer-1.4.0-4.tar.gz) = 9ea708e2ece68e8dadcc04901052c1c436dcccdaba86f732a4c1695910d8bfad
-SIZE (nxviewer-1.4.0-4.tar.gz) = 84538
-MD5 (nxdesktop-1.4.0-61.tar.gz) = 9399fa94c59fbde2a158618e507635d7
-SHA256 (nxdesktop-1.4.0-61.tar.gz) = 6b177127ca4c566e35f05a7a1fc000bb68c8727a75532977ee225b45f0de018e
-SIZE (nxdesktop-1.4.0-61.tar.gz) = 235550
+MD5 (NX/nx-X11-2.1.0-3.tar.gz) = 9c6e9e4c35c4ec3a7664fcdd397eb7f0
+SHA256 (NX/nx-X11-2.1.0-3.tar.gz) = dabec82696c23d0c9da0d1a66fee12fd6ffe232e7aecf10f0929e968fe0703f4
+SIZE (NX/nx-X11-2.1.0-3.tar.gz) = 32532518
+MD5 (NX/nxagent-2.1.0-18.tar.gz) = cae6005f50bab78aa7abba448fca4ed9
+SHA256 (NX/nxagent-2.1.0-18.tar.gz) = fc9836702039690ca94e44cefb5ec0edce1f968f55666b8afc66ec15456eae33
+SIZE (NX/nxagent-2.1.0-18.tar.gz) = 950859
+MD5 (NX/nxauth-2.1.0-2.tar.gz) = 74811bc9ef86f2d97b3b2ba2ba53f9d3
+SHA256 (NX/nxauth-2.1.0-2.tar.gz) = a3231b42daf1e5add3aaa876f5f99dae0dcf196c2122ad0db11c317851e75799
+SIZE (NX/nxauth-2.1.0-2.tar.gz) = 30296
+MD5 (NX/nxcomp-2.1.0-7.tar.gz) = 52b0e108004ec14c51b44b61b66f70e8
+SHA256 (NX/nxcomp-2.1.0-7.tar.gz) = 5a735a24e58175ae08b8035d7b761fbaec0fa3fc38b5f228025e02b28cbe6b78
+SIZE (NX/nxcomp-2.1.0-7.tar.gz) = 554713
+MD5 (NX/nxcompext-2.1.0-5.tar.gz) = d3347382860670cfd4471d228fb1b730
+SHA256 (NX/nxcompext-2.1.0-5.tar.gz) = acd81ab9f0ab74317a9d34902d77f5978432d3488664c501a42378577b81f06c
+SIZE (NX/nxcompext-2.1.0-5.tar.gz) = 102588
+MD5 (NX/nxdesktop-2.1.0-10.tar.gz) = f96395297324ffe249fdec3065d754be
+SHA256 (NX/nxdesktop-2.1.0-10.tar.gz) = 320b5eda1df461228ba6a45a4edf31dd1a10ac1e44abe14ff7fef207b346bc0c
+SIZE (NX/nxdesktop-2.1.0-10.tar.gz) = 570224
+MD5 (NX/nxesd-2.1.0-3.tar.gz) = 2d3dcec588042b73be6b941db008ddc3
+SHA256 (NX/nxesd-2.1.0-3.tar.gz) = 5c7f6e5037862c3116cc035483398116e0f95350936cc2a595307f728ee39a41
+SIZE (NX/nxesd-2.1.0-3.tar.gz) = 701795
+MD5 (NX/nxkill-2.1.0-2.tar.gz) = 5216e4949d3bce50b2e63aa905d6d594
+SHA256 (NX/nxkill-2.1.0-2.tar.gz) = 4474bb9113c7019bc158fec65a704b0b6d52a7a66f632c64fc1cadc543a4052d
+SIZE (NX/nxkill-2.1.0-2.tar.gz) = 51501
+MD5 (NX/nxproxy-2.1.0-3.tar.gz) = 29b0e8be069a8258f5b8774362fc7464
+SHA256 (NX/nxproxy-2.1.0-3.tar.gz) = 3c2db68cb0fa931db1b2ef74c76c848357d332ada8397c511719215bd8eeabac
+SIZE (NX/nxproxy-2.1.0-3.tar.gz) = 82753
+MD5 (NX/nxviewer-2.1.0-12.tar.gz) = e9f5b692278025856b09bd71d0966100
+SHA256 (NX/nxviewer-2.1.0-12.tar.gz) = dc41c4f3cc6f6e4e7985a37d5b3cddf9c9571b8e9752fbb056a4d6e4c9b59178
+SIZE (NX/nxviewer-2.1.0-12.tar.gz) = 228158
diff --git a/net/nxserver/files/extra-patch-nx-X11-programs-Xserver-hw-nxagent-Reconnect.c b/net/nxserver/files/extra-patch-nx-X11-programs-Xserver-hw-nxagent-Reconnect.c
deleted file mode 100644
index 6ab1d83c6aa1..000000000000
--- a/net/nxserver/files/extra-patch-nx-X11-programs-Xserver-hw-nxagent-Reconnect.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c.orig Sat Sep 11 16:04:08 2004
-+++ nx-X11/programs/Xserver/hw/nxagent/Reconnect.c Sat Sep 11 16:04:23 2004
-@@ -308,7 +308,7 @@
- while (sessionState == SESSION_SLEEPING)
- {
- /* Blocking SIG_ALRM. */
-- pselect(0, NULL, NULL, NULL, NULL, &sleep_set);
-+ select(0, NULL, NULL, NULL, &sleep_set);
- }
-
- if (sessionState == SESSION_TERM)
diff --git a/net/nxserver/files/extra-patch-nxcomp-types.h b/net/nxserver/files/extra-patch-nxcomp-types.h
deleted file mode 100644
index 280c2c0ce86b..000000000000
--- a/net/nxserver/files/extra-patch-nxcomp-types.h
+++ /dev/null
@@ -1,57 +0,0 @@
---- nxcomp/Types.h.orig Sat Feb 5 15:56:14 2005
-+++ nxcomp/Types.h Tue Mar 29 09:52:13 2005
-@@ -74,11 +74,11 @@
-
- void clear()
- {
-- #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H)
-+ #if defined(__STL_USE_STD_ALLOCATORS) || defined(_VECTOR_H)
-
-- #if defined(__GLIBCPP_INTERNAL_VECTOR_H)
-+ #if defined(_VECTOR_H)
-
-- _Destroy(_M_start, _M_finish);
-+ _Destroy(_M_impl._M_start, _M_impl._M_finish);
-
- #else /* #if defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-
-@@ -86,9 +86,9 @@
-
- #endif /* #if defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-
-- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
-+ _M_deallocate(_M_impl._M_start, _M_impl._M_end_of_storage - _M_impl._M_start);
-
-- _M_start = _M_finish = _M_end_of_storage = 0;
-+ _M_impl._M_start = _M_impl._M_finish = _M_impl._M_end_of_storage = 0;
-
- #else /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-
-@@ -120,21 +120,21 @@
-
- void clear()
- {
-- #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H)
-+ #if defined(__STL_USE_STD_ALLOCATORS) || defined(_VECTOR_H)
-
-- #if defined(__GLIBCPP_INTERNAL_VECTOR_H)
-+ #if defined(_VECTOR_H)
-
-- _Destroy(_M_start, _M_finish);
-+ _Destroy(_M_impl._M_start, _M_impl._M_finish);
-
- #else /* #if defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-
-- destroy(_M_start, _M_finish);
-+ destroy(_M_impl._M_start, _M_impl._M_finish);
-
- #endif /* #if defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-
-- _M_deallocate(_M_start, _M_end_of_storage - _M_start);
-+ _M_deallocate(_M_impl._M_start, _M_impl._M_end_of_storage - _M_impl._M_start);
-
-- _M_start = _M_finish = _M_end_of_storage = 0;
-+ _M_impl._M_start = _M_impl._M_finish = _M_impl._M_end_of_storage = 0;
-
- #else /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-
diff --git a/net/nxserver/files/patch-lib-xtrans-Xtranssock.c b/net/nxserver/files/patch-lib-xtrans-Xtranssock.c
deleted file mode 100644
index 151f507a02d7..000000000000
--- a/net/nxserver/files/patch-lib-xtrans-Xtranssock.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- nx-X11/lib/xtrans/Xtranssock.c.orig Wed Mar 3 19:47:29 2004
-+++ nx-X11/lib/xtrans/Xtranssock.c Wed Sep 1 22:39:47 2004
-@@ -2118,11 +2118,11 @@
- * platforms as well.
- */
-
-- #ifndef __sun
-+ /* #ifndef __sun */
-
-- sa.sa_restorer = NULL;
-+ /* sa.sa_restorer = NULL; */
-
-- #endif
-+ /* #endif */
-
- sigemptyset(&(sa.sa_mask));
-
diff --git a/net/nxserver/files/patch-nx-X11-config-cf-NX-FreeBSD.def b/net/nxserver/files/patch-nx-X11-config-cf-NX-FreeBSD.def
new file mode 100644
index 000000000000..b392a0a281f0
--- /dev/null
+++ b/net/nxserver/files/patch-nx-X11-config-cf-NX-FreeBSD.def
@@ -0,0 +1,20 @@
+--- nx-X11/config/cf/NX-FreeBSD.def.orig Thu Feb 1 07:43:43 2007
++++ nx-X11/config/cf/NX-FreeBSD.def
+@@ -622,7 +622,7 @@
+ *
+ #define BuildGlxExt NO
+ */
+-#define BuildGlxExt NO
++#define BuildGlxExt YES
+
+ /*
+ * If you want to build support for the old dlopen style external GLX
+@@ -918,3 +918,8 @@
+ */
+
+
++/*
++ * Avoid the warning due to "SharedLibGLw" being not defined.
++ */
++
++#define SharedLibGLw NO
diff --git a/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Atoms.c b/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Atoms.c
new file mode 100644
index 000000000000..03dd02e7ffce
--- /dev/null
+++ b/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Atoms.c
@@ -0,0 +1,11 @@
+--- nx-X11/programs/Xserver/hw/nxagent/Atoms.c.orig 2006-04-18 11:40:18.000000000 -0355
++++ nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+@@ -785,6 +785,8 @@
+
+ nxagentWriteAtom(local, remote, string, True);
+
++ XFree(string);
++
+ return local;
+ }
+
diff --git a/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-NXdixfonts.c b/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-NXdixfonts.c
new file mode 100644
index 000000000000..5c770baea5e7
--- /dev/null
+++ b/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-NXdixfonts.c
@@ -0,0 +1,11 @@
+--- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c.orig 2006-11-09 12:22:35.000000000 -0455
++++ nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+@@ -2521,7 +2521,7 @@
+ err = (*fpe_functions[fpe->type].start_list_fonts_and_aliases)
+ ((pointer) c->client, fpe, c->current.pattern,
+ c->current.patlen, c->current.max_names - c->names->nnames,
+- &c->current.private);
++ &c->current.private); /* FIXME: returned mem c->current.private (needed by list_next_font_or_alias) may never be freed */
+ if (err == Suspended) {
+ if (!c->slept) {
+ ClientSleep(client,
diff --git a/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Pixmap.c b/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Pixmap.c
new file mode 100644
index 000000000000..ad00e8098bbd
--- /dev/null
+++ b/net/nxserver/files/patch-nx-X11-programs-Xserver-nxagent-Pixmap.c
@@ -0,0 +1,100 @@
+--- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c.orig 2006-11-09 12:18:00.000000000 -0455
++++ nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+@@ -1115,6 +1115,7 @@
+ {
+ FatalError("XGetImage: Failed.\n");
+
++ free(data);
+ return False;
+ }
+
+@@ -1600,6 +1601,7 @@
+ fprintf(stderr, "nxagentSynchronizeDrawableData: WARNING! Failed to create the temporary GC.\n");
+ #endif
+
++ xfree(data);
+ return 0;
+ }
+
+@@ -1661,6 +1663,7 @@
+ fprintf(stderr, "nxagentSynchronizeDrawableData: WARNING! Failed to create the temporary GC.\n");
+ #endif
+
++ xfree(data);
+ return 0;
+ }
+
+@@ -1772,6 +1775,7 @@
+ int useExtents;
+ int imageLength, corruptedLength;
+ int corruptedWidth, corruptedHeight;
++ int ret = 0; /* Used by error handling. 0 is error(?, based on previous code) */
+
+ #ifdef TEST
+ static int totalLength;
+@@ -1812,7 +1816,7 @@
+ (void *) pDrawable);
+ #endif
+
+- return 0;
++ goto SR_FREE_CLIP;
+ }
+
+ /*
+@@ -1836,7 +1840,7 @@
+ (void *) pDrawable);
+ #endif
+
+- return 0;
++ goto SR_FREE_CLIP;
+ }
+ }
+
+@@ -1861,7 +1865,7 @@
+ fprintf(stderr, "nxagentSynchronizeRegion: WARNING! Failed to allocate memory for the operation.\n");
+ #endif
+
+- return 0;
++ goto SR_FREE_CLIP;
+ }
+
+ pSrcDrawable = (pDrawable -> type == DRAWABLE_PIXMAP ?
+@@ -1876,7 +1880,7 @@
+ fprintf(stderr, "nxagentSynchronizeRegion: WARNING! Failed to create the temporary GC.\n");
+ #endif
+
+- return 0;
++ goto SR_FREE_XALLOC;
+ }
+
+ ValidateGC(pDrawable, pGC);
+@@ -1935,7 +1939,7 @@
+
+ #endif
+
+- return 1;
++ goto SR_FREE_GC;
+ }
+
+ /*
+@@ -2029,13 +2033,17 @@
+
+ nxagentGCTrap = saveTrap;
+
+- nxagentFreeRegion(pDrawable, clipRegion);
++SR_FREE_GC:
++ ret = 1;
++ FreeScratchGC(pGC);
+
++SR_FREE_XALLOC:
+ xfree(data);
+
+- FreeScratchGC(pGC);
++SR_FREE_CLIP:
++ nxagentFreeRegion(pDrawable, clipRegion);
+
+- return 1;
++ return ret;
+ }
+
+ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox)
diff --git a/net/nxserver/files/patch-nx-X11-programs-Xserver-xkb-ddxLoad.c b/net/nxserver/files/patch-nx-X11-programs-Xserver-xkb-ddxLoad.c
new file mode 100644
index 000000000000..c69c31a521bf
--- /dev/null
+++ b/net/nxserver/files/patch-nx-X11-programs-Xserver-xkb-ddxLoad.c
@@ -0,0 +1,12 @@
+--- nx-X11/programs/Xserver/xkb/ddxLoad.c.orig Thu May 18 14:14:35 2006
++++ nx-X11/programs/Xserver/xkb/ddxLoad.c
+@@ -74,6 +74,9 @@
+
+ #ifdef NXAGENT_SERVER
+
++#include <sys/types.h>
++#include <sys/stat.h>
++
+ #define NX_XKB_BASE_DIRECTORY "/usr/lib/X11/xkb"
+ #define NX_XKB_ALTERNATE_BASE_DIRECTORY "/usr/share/X11/xkb"
+ #define NX_KEYMAP_DIR_FILE "keymap.dir"
diff --git a/net/nxserver/files/patch-nx-x11-lib-x11-imakefile b/net/nxserver/files/patch-nx-x11-lib-x11-imakefile
deleted file mode 100644
index 0c594f3e3cae..000000000000
--- a/net/nxserver/files/patch-nx-x11-lib-x11-imakefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- nx-X11/lib/X11/Imakefile.orig Thu Sep 2 00:22:34 2004
-+++ nx-X11/lib/X11/Imakefile Thu Sep 2 00:22:46 2004
-@@ -22,7 +22,7 @@
- #ifdef SunArchitecture
- NX_INCLUDES = -I../../../nxcomp -I../../../nxcompext -I/usr/sfw/include
- #else
--NX_INCLUDES = -I../../../nxcomp -I../../../nxcompext
-+NX_INCLUDES = -I../../../nxcomp -I../../../nxcompext -I/usr/local/include
- #endif
-
- NX_DEFINES = -DNX_CLEAN_ALLOC \
diff --git a/net/nxserver/files/patch-nx-x11-programs-xserver-hw-nxagent-imakefile b/net/nxserver/files/patch-nx-x11-programs-xserver-hw-nxagent-imakefile
deleted file mode 100644
index 5f545848a7c2..000000000000
--- a/net/nxserver/files/patch-nx-x11-programs-xserver-hw-nxagent-imakefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- nx-X11/programs/Xserver/hw/nxagent/Imakefile.orig Sun Apr 18 11:57:27 2004
-+++ nx-X11/programs/Xserver/hw/nxagent/Imakefile Thu Sep 2 01:46:12 2004
-@@ -102,7 +102,7 @@
- -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
- -I../../mi -I../../include -I../../os \
- -I$(EXTINCSRC) -I$(XINCLUDESRC) \
-- $(VFBINCLUDES) $(NXFONTINCLUDES)
-+ $(VFBINCLUDES) $(NXFONTINCLUDES) -I/usr/local/include
- #ifdef SunArchitecture
- INCLUDES = -I../../../../../nxcomp -I../../../../../nxcompext \
- -I. -I$(XBUILDINCDIR) -I$(FONTINCSRC) \
diff --git a/net/nxserver/files/patch-nxcomp-makefile.in b/net/nxserver/files/patch-nxcomp-makefile.in
deleted file mode 100644
index 31bbb48a329f..000000000000
--- a/net/nxserver/files/patch-nxcomp-makefile.in
+++ /dev/null
@@ -1,21 +0,0 @@
---- nxcomp/Makefile.in.orig Sun Nov 9 06:30:58 2003
-+++ nxcomp/Makefile.in Thu Sep 2 00:41:27 2004
-@@ -11,14 +11,14 @@
- #
-
- CXX = @CXX@
--CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \
-- -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
--CXXINCLUDES =
-+CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ -fpermissive -fPIC
-+# -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
-+CXXINCLUDES = -I/usr/local/include
- CXXDEFINES =
-
- CC = @CC@
- CCFLAGS = $(CXXFLAGS)
--CCINCLUDES =
-+CCINCLUDES = -I/usr/local/include
- CCDEFINES =
-
- LDFLAGS = @LDFLAGS@
diff --git a/net/nxserver/files/patch-nxcompext-Clean.c b/net/nxserver/files/patch-nxcompext-Clean.c
deleted file mode 100644
index 17ef115d17da..000000000000
--- a/net/nxserver/files/patch-nxcompext-Clean.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- nxcompext/Clean.c Thu Apr 29 03:00:45 2004
-+++ nxcompext/Clean.c.new Sun Sep 5 17:41:01 2004
-@@ -672,7 +672,7 @@
-
- sig_act.sa_handler = &SignalHandler;
-
-- #ifdef __sun
-+ #if defined(__sun) || defined(__FreeBSD__)
-
- sig_act.sa_flags = SA_SIGINFO | SA_NODEFER;
-
diff --git a/net/nxserver/files/patch-nxdesktop-Makeconf b/net/nxserver/files/patch-nxdesktop-Makeconf
deleted file mode 100644
index 30b755d4b3a8..000000000000
--- a/net/nxserver/files/patch-nxdesktop-Makeconf
+++ /dev/null
@@ -1,10 +0,0 @@
---- nxdesktop/Makeconf.orig Sat Sep 11 14:23:17 2004
-+++ nxdesktop/Makeconf Sat Sep 11 14:23:53 2004
-@@ -3,6 +3,6 @@
- INSTALL = install
- CRYPTOBJ =
- SOUNDOBJ = rdpsnd.o rdpsnd_oss.o
--CFLAGS = -DKEYMAP_PATH=\"$(KEYMAP_PATH)\" -Wall -O2 -I../nx-X11/exports/include -DWITH_OPENSSL -DWITH_RDPSND -DL_ENDIAN
-+CFLAGS = -DKEYMAP_PATH=\"$(KEYMAP_PATH)\" -O2 -I../nx-X11/exports/include -I/usr/local/include -DWITH_OPENSSL -DWITH_RDPSND -DL_ENDIAN
- LDFLAGS = -L../nx-X11/exports/lib -lcrypto
- TARGETS = nxdesktop
diff --git a/net/nxserver/files/patch-nxdesktop-configure b/net/nxserver/files/patch-nxdesktop-configure
new file mode 100644
index 000000000000..791e0718ba7d
--- /dev/null
+++ b/net/nxserver/files/patch-nxdesktop-configure
@@ -0,0 +1,11 @@
+--- nxdesktop/configure.orig Mon Sep 18 03:22:22 2006
++++ nxdesktop/configure
+@@ -405,7 +405,7 @@
+ HP-UX)
+ cflags="$cflags -D_XOPEN_SOURCE_EXTENDED"
+ ;;
+- Linux)
++ Linux|FreeBSD)
+ cflags="$cflags -DHAVE_DECL_DIRFD=1"
+ ;;
+ esac
diff --git a/net/nxserver/files/patch-nxdesktop-proto.h b/net/nxserver/files/patch-nxdesktop-proto.h
deleted file mode 100644
index d4861ca74772..000000000000
--- a/net/nxserver/files/patch-nxdesktop-proto.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- nxdesktop/proto.h.orig Wed Sep 15 18:29:24 2004
-+++ nxdesktop/proto.h Wed Apr 6 12:02:30 2005
-@@ -133,7 +133,7 @@
- int get_device_index(HANDLE handle);
- void convert_to_unix_filename(char *filename);
- BOOL rdpdr_init(void);
--void rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout);
-+/* void rdpdr_add_fds(int *n, fd_set * rfds, fd_set * wfds, struct timeval *tv, BOOL * timeout); */
- struct async_iorequest *rdpdr_remove_iorequest(struct async_iorequest *prev,
- struct async_iorequest *iorq);
- void rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out);
diff --git a/net/nxserver/files/patch-nxdesktop-rdesktop.h b/net/nxserver/files/patch-nxdesktop-rdesktop.h
deleted file mode 100644
index faf56776ab61..000000000000
--- a/net/nxserver/files/patch-nxdesktop-rdesktop.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- nxdesktop/rdesktop.h.orig Sat Sep 11 00:16:52 2004
-+++ nxdesktop/rdesktop.h Sat Sep 11 00:17:06 2004
-@@ -39,6 +39,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <dirent.h>
-+#include <sys/types.h>
-
- #define VERSION "1.3.1"
-
diff --git a/net/nxserver/files/patch-nxesd-audio_oss.c b/net/nxserver/files/patch-nxesd-audio_oss.c
new file mode 100644
index 000000000000..880000354cd3
--- /dev/null
+++ b/net/nxserver/files/patch-nxesd-audio_oss.c
@@ -0,0 +1,14 @@
+--- nxesd/audio_oss.c.orig Wed Aug 18 12:01:41 2004
++++ nxesd/audio_oss.c
+@@ -11,11 +11,6 @@
+ #endif
+
+
+-/* FreeBSD uses a different identifier? what other BSDs? */
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+-#define SNDCTL_DSP_SETDUPLEX DSP_CAP_DUPLEX
+-#endif
+-
+ #define ARCH_esd_audio_devices
+ const char *esd_audio_devices()
+ {
diff --git a/net/nxserver/files/patch-nxesd-esddsp.c b/net/nxserver/files/patch-nxesd-esddsp.c
new file mode 100644
index 000000000000..130205b8194e
--- /dev/null
+++ b/net/nxserver/files/patch-nxesd-esddsp.c
@@ -0,0 +1,11 @@
+--- nxesd/esddsp.c.orig Wed May 25 17:40:19 2005
++++ nxesd/esddsp.c
+@@ -227,7 +227,7 @@
+ dsp_init ();
+
+ va_start (args, flags);
+- mode = va_arg (args, mode_t);
++ mode = va_arg (args, int);
+ va_end (args);
+
+ if (!strcmp (pathname, "/dev/dsp"))
diff --git a/net/nxserver/files/patch-nxviewer-include-vncauth.h b/net/nxserver/files/patch-nxviewer-include-vncauth.h
new file mode 100644
index 000000000000..a2a2dc1bae18
--- /dev/null
+++ b/net/nxserver/files/patch-nxviewer-include-vncauth.h
@@ -0,0 +1,11 @@
+--- nxviewer/include/vncauth.h.orig Tue Oct 24 03:22:20 2006
++++ nxviewer/include/vncauth.h
+@@ -42,6 +42,8 @@
+ #define CHALLENGESIZE 16
+
+ extern int vncEncryptAndStorePasswd(char *passwd, char *fname);
++extern int vncEncryptAndStorePasswd2(char *passwd, char *passwdViewOnly,
++ char *fname);
+ extern char *vncDecryptPasswdFromFile(char *fname);
+ extern void vncRandomBytes(unsigned char *bytes);
+ extern void vncEncryptBytes(unsigned char *bytes, char *passwd);
diff --git a/net/nxserver/files/patch-nxviewer-libvncauth-vncauth.c b/net/nxserver/files/patch-nxviewer-libvncauth-vncauth.c
new file mode 100644
index 000000000000..ecf03de482ba
--- /dev/null
+++ b/net/nxserver/files/patch-nxviewer-libvncauth-vncauth.c
@@ -0,0 +1,11 @@
+--- nxviewer/libvncauth/vncauth.c.orig Fri Dec 1 09:01:41 2006
++++ nxviewer/libvncauth/vncauth.c
+@@ -140,6 +140,8 @@
+ char *
+ vncDecryptPasswdFromFile(char *fname)
+ {
++ int vncDecryptPasswdFromFile2(char *fname,
++ char *passwdFullControl, char *passwdViewOnly);
+ char *passwd;
+
+ passwd = malloc(9);
diff --git a/net/nxserver/files/patch-nxviewer-nxviewer-Imakefile b/net/nxserver/files/patch-nxviewer-nxviewer-Imakefile
index 177a4eace7e5..0d13d258dc49 100644
--- a/net/nxserver/files/patch-nxviewer-nxviewer-Imakefile
+++ b/net/nxserver/files/patch-nxviewer-nxviewer-Imakefile
@@ -1,21 +1,23 @@
---- nxviewer/nxviewer/Imakefile.orig Thu Jun 17 11:44:40 2004
-+++ nxviewer/nxviewer/Imakefile Mon Feb 7 02:22:45 2005
-@@ -37,7 +37,7 @@
+--- nxviewer/nxviewer/Imakefile.orig Fri Dec 1 08:54:17 2006
++++ nxviewer/nxviewer/Imakefile
+@@ -26,6 +26,11 @@
+ DEFINES = -DMITSHM
#endif
++#if defined(i386Architecture) && defined(FreeBSDArchitecture)
++DEFINES = -DMITSHM
++JPEG_INC = -I/usr/local/include
++#endif
++
+ NX_INC = -I../../nxcomp -I../../nxcompext -I../../nx-X11/exports/include
+ NX_LIB = -L../../nxcomp -lXcomp -L../../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/usr/local/include -I$(X11BASE)/include/X11 $(NX_INC)
- VNCAUTH_LIB = ./libvncauth.a
- ZLIB_LIB = -L/usr/local/lib -lz
- JPEG_LIB = -L/usr/local/lib -ljpeg
-@@ -50,6 +50,9 @@
+@@ -37,7 +42,7 @@
#endif
- DEPLIBS = XawClientDepLibs $(VNCAUTH_LIB)
-+XPLIBSRC =
-+XPLIB =
-+
- LOCAL_LIBRARIES = XawClientLibs $(VNCAUTH_LIB) $(ZLIB_LIB) $(JPEG_LIB) $(NX_LIB)
+-INCLUDES = -I../include -I. $(ZLIB_INC) $(JPEG_INC) -I/usr/include/X11 $(NX_INC)
++INCLUDES = -I../include -I. $(ZLIB_INC) $(JPEG_INC) -I../../nx-X11/exports/include/X11 $(NX_INC)
+ VNCAUTH_LIB = ../libvncauth/libvncauth.a
+ ZLIB_LIB = -L/usr/local/lib -lz
diff --git a/net/nxserver/files/patch-nxviewer-nxviewer-misc.c b/net/nxserver/files/patch-nxviewer-nxviewer-misc.c
new file mode 100644
index 000000000000..7aa2e2651839
--- /dev/null
+++ b/net/nxserver/files/patch-nxviewer-nxviewer-misc.c
@@ -0,0 +1,10 @@
+--- nxviewer/nxviewer/misc.c.orig Wed Nov 15 10:32:49 2006
++++ nxviewer/nxviewer/misc.c
+@@ -337,6 +337,7 @@
+ return (*defaultXErrorHandler)(dpy, error);
+ }
+ nxviewerEnableSharedMemory = FALSE;
++ return 0;
+ }
+
+ static int
diff --git a/net/nxserver/files/patch-nxviewer-nxviewer-vncviewer.h b/net/nxserver/files/patch-nxviewer-nxviewer-vncviewer.h
new file mode 100644
index 000000000000..97d742c4e71f
--- /dev/null
+++ b/net/nxserver/files/patch-nxviewer-nxviewer-vncviewer.h
@@ -0,0 +1,10 @@
+--- nxviewer/nxviewer/vncviewer.h.orig Thu Nov 16 02:42:11 2006
++++ nxviewer/nxviewer/vncviewer.h
+@@ -44,6 +44,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/time.h>
++#include <sys/wait.h>
+ #include <unistd.h>
+ #include <X11/IntrinsicP.h>
+ #include <X11/StringDefs.h>
diff --git a/net/nxserver/pkg-plist b/net/nxserver/pkg-plist
index 0a56956af189..15da5d913a8b 100644
--- a/net/nxserver/pkg-plist
+++ b/net/nxserver/pkg-plist
@@ -1,23 +1,69 @@
-NX/lib/libXrender.so.1.2
-NX/lib/libXrender.so.1
-NX/lib/libXrender.so
-NX/lib/libXext.so.6.4
-NX/lib/libXext.so.6
-NX/lib/libXext.so
-NX/lib/libXcompext.so.1.4.0
-NX/lib/libXcompext.so.1
-NX/lib/libXcompext.so
-NX/lib/libXcomp.so.1.4.0
-NX/lib/libXcomp.so.1
-NX/lib/libXcomp.so
-NX/lib/libX11.so.6.2
-NX/lib/libX11.so.6
-NX/lib/libX11.so
-NX/bin/nxviewer
-NX/bin/nxproxy
-NX/bin/nxpasswd
-NX/bin/nxdesktop
NX/bin/nxagent
+NX/bin/nxdesktop
+NX/bin/nxesd
+NX/bin/nxkill
+NX/bin/nxpasswd
+NX/bin/nxproxy
+NX/bin/nxviewer
+NX/lib/libX11.so
+NX/lib/libX11.so.6
+NX/lib/libX11.so.6.2
+NX/lib/libXcomp.so
+NX/lib/libXcomp.so.%%NX_MAJOR%%
+NX/lib/libXcomp.so.%%NX_VERSION%%
+NX/lib/libXcompext.so
+NX/lib/libXcompext.so.%%NX_MAJOR%%
+NX/lib/libXcompext.so.%%NX_VERSION%%
+NX/lib/libXext.so
+NX/lib/libXext.so.6
+NX/lib/libXext.so.6.4
+NX/lib/libXpm.so
+NX/lib/libXpm.so.4
+NX/lib/libXpm.so.4.11
+NX/lib/libXrender.so
+NX/lib/libXrender.so.1
+NX/lib/libXrender.so.1.2
+NX/share/keymaps-windows/ar
+NX/share/keymaps-windows/common
+NX/share/keymaps-windows/cs
+NX/share/keymaps-windows/da
+NX/share/keymaps-windows/de
+NX/share/keymaps-windows/de-ch
+NX/share/keymaps-windows/en-dv
+NX/share/keymaps-windows/en-gb
+NX/share/keymaps-windows/en-us
+NX/share/keymaps-windows/es
+NX/share/keymaps-windows/et
+NX/share/keymaps-windows/fi
+NX/share/keymaps-windows/fo
+NX/share/keymaps-windows/fr
+NX/share/keymaps-windows/fr-be
+NX/share/keymaps-windows/fr-ca
+NX/share/keymaps-windows/fr-ch
+NX/share/keymaps-windows/he
+NX/share/keymaps-windows/hr
+NX/share/keymaps-windows/hu
+NX/share/keymaps-windows/is
+NX/share/keymaps-windows/it
+NX/share/keymaps-windows/ja
+NX/share/keymaps-windows/ko
+NX/share/keymaps-windows/lt
+NX/share/keymaps-windows/lv
+NX/share/keymaps-windows/mk
+NX/share/keymaps-windows/modifiers
+NX/share/keymaps-windows/nl
+NX/share/keymaps-windows/nl-be
+NX/share/keymaps-windows/no
+NX/share/keymaps-windows/pl
+NX/share/keymaps-windows/pt
+NX/share/keymaps-windows/pt-br
+NX/share/keymaps-windows/ru
+NX/share/keymaps-windows/sl
+NX/share/keymaps-windows/sv
+NX/share/keymaps-windows/th
+NX/share/keymaps-windows/tr
+@dirrm NX/share/keymaps-windows
+@dirrm NX/share
@dirrm NX/lib
@dirrm NX/bin
@dirrm NX