--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/rdesktop/Makefile Tue Jul 26 23:48:03 2011 +0100
@@ -0,0 +1,44 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
+
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME= rdesktop
+COMPONENT_VERSION= 1.7.0
+COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH= sha1:4f21a8fb2379ce05859e7fb13efa60071125d27f
+COMPONENT_ARCHIVE_URL= \
+ http://downloads.sourceforge.net/rdesktop/$(COMPONENT_ARCHIVE)
+
+include ../../make-rules/prep.mk
+include ../../make-rules/configure.mk
+include ../../make-rules/ips.mk
+
+CONFIGURE_OPTIONS += --with-ipv6
+CONFIGURE_OPTIONS += --with-openssl="/usr"
+CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
+
+# common targets
+build: $(BUILD_32)
+
+install: $(INSTALL_32)
+
+test: $(TEST_32)
+
+BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
+
+include ../../make-rules/depend.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/rdesktop/patches/g11n-i18n-title.patch Tue Jul 26 23:48:03 2011 +0100
@@ -0,0 +1,24 @@
+--- rdesktop-1.7.0/ewmhints.c.orig 2008-09-11 13:50:48.793730000 +0900
++++ rdesktop-1.7.0/ewmhints.c 2008-09-11 15:16:52.075814000 +0900
+@@ -401,11 +401,17 @@ ewmh_move_to_desktop(Window wnd, unsigne
+ void
+ ewmh_set_wm_name(Window wnd, const char *title)
+ {
+- int len;
++ int len, res;
++ XTextProperty property;
+
+- len = strlen(title);
+- XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom,
+- 8, PropModeReplace, (unsigned char *) title, len);
++ res = XmbTextListToTextProperty(g_display, (char**)&title, 1, XCompoundTextStyle, &property);
++ if (res == Success) {
++ XSetWMName(g_display, wnd, &property);
++ } else {
++ len = strlen(title);
++ XChangeProperty(g_display, wnd, g_net_wm_name_atom, g_utf8_string_atom,
++ 8, PropModeReplace, (unsigned char *) title, len);
++ }
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/rdesktop/patches/makefile-in.patch Tue Jul 26 23:48:03 2011 +0100
@@ -0,0 +1,47 @@
+--- rdesktop-1.7.0/Makefile.in~ Mon Apr 18 03:46:06 2011
++++ rdesktop-1.7.0/Makefile.in Mon Jul 25 23:45:37 2011
+@@ -10,6 +10,8 @@
+ mandir = @mandir@
+ datarootdir = @datarootdir@
+ datadir = @datadir@
++srcdir = @srcdir@
++VPATH = @srcdir@
+
+ VERSION = @PACKAGE_VERSION@
+ KEYMAP_PATH = $(datadir)/rdesktop/keymaps/
+@@ -65,7 +67,7 @@
+ .PHONY: installman
+ installman: doc/rdesktop.1
+ mkdir -p $(DESTDIR)$(mandir)/man1
+- cp doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
++ cp $(srcdir)/doc/rdesktop.1 $(DESTDIR)$(mandir)/man1
+ chmod 644 $(DESTDIR)$(mandir)/man1/rdesktop.1
+
+ .PHONY: installkeymaps
+@@ -72,9 +74,10 @@
+ installkeymaps:
+ mkdir -p $(DESTDIR)$(KEYMAP_PATH)
+ # Prevent copying the CVS directory
+- cp keymaps/?? keymaps/??-?? $(DESTDIR)$(KEYMAP_PATH)
+- cp keymaps/common $(DESTDIR)$(KEYMAP_PATH)
+- cp keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
++ cp $(srcdir)/keymaps/?? $(DESTDIR)$(KEYMAP_PATH)
++ cp $(srcdir)/keymaps/??-?? $(DESTDIR)$(KEYMAP_PATH)
++ cp $(srcdir)/keymaps/common $(DESTDIR)$(KEYMAP_PATH)
++ cp $(srcdir)/keymaps/modifiers $(DESTDIR)$(KEYMAP_PATH)
+ chmod 644 $(DESTDIR)$(KEYMAP_PATH)/*
+
+ .PHONY: proto
+@@ -147,12 +150,6 @@
+ tar zcvf $@ -C /tmp/rdesktop-make-dist-dir rdesktop
+ rm -rf /tmp/rdesktop-make-dist-dir
+
+-Makefile: Makefile.in configure
+- ./config.status
+-
+-configure: configure.ac
+- ./bootstrap
+-
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/rdesktop/patches/sun-keymap.patch Tue Jul 26 23:48:03 2011 +0100
@@ -0,0 +1,54 @@
+--- rdesktop-1.7.0/keymaps/common.orig 2008-02-18 17:53:38.985920000 +0900
++++ rdesktop-1.7.0/keymaps/common 2008-02-18 19:17:09.696254000 +0900
+@@ -183,8 +183,11 @@ Right 0xcd localstate
+ #
+ Num_Lock 0x45
+ KP_Divide 0xb5 localstate
++F25 0xb5 localstate
+ KP_Multiply 0x37 localstate
++F26 0x37 localstate
+ KP_Subtract 0x4a localstate
++F24 0x4a localstate
+ KP_Add 0x4e localstate
+ KP_Enter 0x9c localstate
+
+@@ -197,30 +200,39 @@ KP_Insert 0x52 localstate
+
+ KP_1 0x4f numlock
+ KP_End 0x4f localstate
++F33 0x4f localstate
+
+ KP_2 0x50 numlock
+ KP_Down 0x50 localstate
++Down 0x50 localstate
+
+ KP_3 0x51 numlock
+ KP_Next 0x51 localstate
++F35 0x51 localstate
+
+ KP_4 0x4b numlock
+ KP_Left 0x4b localstate
++Left 0x4b localstate
+
+ KP_5 0x4c numlock
+ KP_Begin 0x4c localstate
++F31 0x4c localstate
+
+ KP_6 0x4d numlock
+ KP_Right 0x4d localstate
++Right 0x4d localstate
+
+ KP_7 0x47 numlock
+ KP_Home 0x47 localstate
++F27 0x47 localstate
+
+ KP_8 0x48 numlock
+ KP_Up 0x48 localstate
++Up 0x48 localstate
+
+ KP_9 0x49 numlock
+ KP_Prior 0x49 localstate
++F29 0x49 localstate
+
+ #
+ # Inhibited keys
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/rdesktop/rdesktop.p5m Tue Jul 26 23:48:03 2011 +0100
@@ -0,0 +1,85 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
+
+set name=pkg.fmri \
+ value=pkg:/desktop/remote-desktop/rdesktop@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary \
+ value="rdesktop - A Microsoft Remote Desktop Protocol (RDP) client"
+set name=info.classification \
+ value="org.opensolaris.category.2008:Applications/Internet"
+set name=info.source_url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream_url \
+ value=http://sourceforge.net/projects/rdesktop/
+set name=opensolaris.arc_url \
+ value=http://arc.opensolaris.org/caselog/LSARC/2008/083
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+
+license COPYING license=GPLv3
+
+legacy pkg=SUNWrdesktop \
+ desc="RDP, Microsoft Terminal Services client" \
+ name="RDP, Microsoft Terminal Services client"
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
+
+#
+dir path=usr
+dir path=usr/bin
+dir path=usr/share
+dir path=usr/share/man
+dir path=usr/share/man/man1
+dir path=usr/share/rdesktop
+dir path=usr/share/rdesktop/keymaps
+
+file path=usr/bin/rdesktop
+file path=usr/share/man/man1/rdesktop.1
+
+file path=usr/share/rdesktop/keymaps/ar
+file path=usr/share/rdesktop/keymaps/common
+file path=usr/share/rdesktop/keymaps/cs
+file path=usr/share/rdesktop/keymaps/da
+file path=usr/share/rdesktop/keymaps/de
+file path=usr/share/rdesktop/keymaps/de-ch
+file path=usr/share/rdesktop/keymaps/en-dv
+file path=usr/share/rdesktop/keymaps/en-gb
+file path=usr/share/rdesktop/keymaps/en-us
+file path=usr/share/rdesktop/keymaps/es
+file path=usr/share/rdesktop/keymaps/et
+file path=usr/share/rdesktop/keymaps/fi
+file path=usr/share/rdesktop/keymaps/fo
+file path=usr/share/rdesktop/keymaps/fr
+file path=usr/share/rdesktop/keymaps/fr-be
+file path=usr/share/rdesktop/keymaps/fr-ca
+file path=usr/share/rdesktop/keymaps/fr-ch
+file path=usr/share/rdesktop/keymaps/he
+file path=usr/share/rdesktop/keymaps/hr
+file path=usr/share/rdesktop/keymaps/hu
+file path=usr/share/rdesktop/keymaps/is
+file path=usr/share/rdesktop/keymaps/it
+file path=usr/share/rdesktop/keymaps/ja
+file path=usr/share/rdesktop/keymaps/ko
+file path=usr/share/rdesktop/keymaps/lt
+file path=usr/share/rdesktop/keymaps/lv
+file path=usr/share/rdesktop/keymaps/mk
+file path=usr/share/rdesktop/keymaps/modifiers
+file path=usr/share/rdesktop/keymaps/nl
+file path=usr/share/rdesktop/keymaps/nl-be
+file path=usr/share/rdesktop/keymaps/no
+file path=usr/share/rdesktop/keymaps/pl
+file path=usr/share/rdesktop/keymaps/pt
+file path=usr/share/rdesktop/keymaps/pt-br
+file path=usr/share/rdesktop/keymaps/ru
+file path=usr/share/rdesktop/keymaps/sl
+file path=usr/share/rdesktop/keymaps/sv
+file path=usr/share/rdesktop/keymaps/th
+file path=usr/share/rdesktop/keymaps/tr