At least someone searching the ports mailing list archives can find something, 
since it's not a priority for anyone with commit access.
 
Are you patching against OPENBSD_4_2 tagged ports?  It might not patch cleanly 
against current.
 

________________________________

From: Nikns Siankin [mailto:[EMAIL PROTECTED]
Sent: Wed 11/7/2007 9:37 AM
To: Karle, Christopher P
Cc: ports@openbsd.org
Subject: Re: OpenBSD 4.2 AMD64 x86_64 TightVNC



Yes, vnc on amd64 is broken for years,
however noone of commiters seems interested in vnc.

btw, patch desn't apply cleanly.

On Wed, Nov 07, 2007 at 08:09:58AM -0600, Karle, Christopher P wrote:
>I created a patch for the OPENBSD_4_2 tagged version of TightVNC found in 
>ports.  This patch allows TightVNC to work for AMD64 (or x86_64 if you prefer) 
>platforms.
>
>I am not subscribed to the list, so you'll have to respond to me directly if 
>you have any comments.
>
>
>--- Makefile Tue Nov 21 04:23:47 2006
>+++ Makefile Tue Nov  6 20:03:14 2007
>@@ -3,8 +3,8 @@
> COMMENT-main= "cross-platform remote desktop access"
> COMMENT-viewer= "client for cross-platform remote desktop access"
>
>-VERSION= 1.2.9
>-PKGNAME-main= tightvnc-${VERSION}p0
>+VERSION= 1.3.9
>+PKGNAME-main= tightvnc-${VERSION}
> PKGNAME-viewer= tightvnc-viewer-${VERSION}
> DISTNAME= tightvnc-${VERSION}_unixsrc
> CATEGORIES= net
>--- distinfo Thu Apr  5 11:20:16 2007
>+++ distinfo Tue Nov  6 11:28:44 2007
>@@ -1,5 +1,5 @@
>-MD5 (tightvnc-1.2.9_unixsrc.tar.gz) = uid9xWoM/tLk+6d48hnNCA==
>-RMD160 (tightvnc-1.2.9_unixsrc.tar.gz) = 6IlBVQHtWeWBsbzbaZKaUxWl9rY=
>-SHA1 (tightvnc-1.2.9_unixsrc.tar.gz) = THEZji0/OuiUroAWGeKdtO6mHak=
>-SHA256 (tightvnc-1.2.9_unixsrc.tar.gz) = 
>w+b7o1P2rdaBtdSpz8vZRbT+wURoS7+vGS44lmQg0nI=
>-SIZE (tightvnc-1.2.9_unixsrc.tar.gz) = 2154893
>+MD5 (tightvnc-1.3.9_unixsrc.tar.gz) = gLkE1KEPzO6QRdD+6qZd+A==
>+RMD160 (tightvnc-1.3.9_unixsrc.tar.gz) = nGPsmZGv8cINCw/QfbNt2nNAYo8=
>+SHA1 (tightvnc-1.3.9_unixsrc.tar.gz) = CyGmDgYGAuIlsXZpXB3deH8AftI=
>+SHA256 (tightvnc-1.3.9_unixsrc.tar.gz) = 
>VgYnCLtUdCX46PD5xXHU+gb8yJoRFGpbFcYI/Y3r24A=
>+SIZE (tightvnc-1.3.9_unixsrc.tar.gz) = 2246697
>--- patches/patch-Xvnc_config_cf_Image_cf Wed Dec 31 18:00:00 1969
>+++ patches/patch-Xvnc_config_cf_Image_cf Tue Nov  6 19:47:05 2007
>@@ -0,0 +1,16 @@
>+--- Xvnc/config/cf/Imake.cf Sat Dec 23 06:07:55 2006
>++++ Xvnc/config/cf/Imake.cf Tue Nov  6 19:36:15 2007
>+@@ -106,6 +106,13 @@
>+ #  define i386Architecture
>+ #  undef i386
>+ # endif
>++# ifdef __amd64__
>++#  define x86_64BsdArchitecture
>++#  define x86_64Architecture
>++#  define i386BsdArchitecture
>++#  define i386Architecture
>++#  undef amd64
>++# endif
>+ # if defined(__sparc__) || defined(sparc)
>+ #  define SparcArchitecture
>+ #  undef sparc
>--- patches/patch-Xvnc_config_cf_OpenBSD_cf Fri May 27 18:17:06 2005
>+++ patches/patch-Xvnc_config_cf_OpenBSD_cf Tue Nov  6 19:50:03 2007
>@@ -1,7 +1,6 @@
>-$OpenBSD: patch-Xvnc_config_cf_OpenBSD_cf,v 1.3 2005/05/27 23:17:06 millert 
>Exp $
>---- Xvnc/config/cf/OpenBSD.cf.orig Sun Jun 11 06:00:51 2000
>-+++ Xvnc/config/cf/OpenBSD.cf Fri May 27 15:48:16 2005
>-@@ -67,7 +67,7 @@ XCOMM operating system:  OSName (OSMajor
>+--- Xvnc/config/cf/OpenBSD.cf Sun Jun 11 07:00:51 2000
>++++ Xvnc/config/cf/OpenBSD.cf Tue Nov  6 19:36:15 2007
>+@@ -67,7 +67,7 @@
>  #if defined(UseInstalled) && (!defined(XF86LinkKit) || !XF86LinkKit)
>  #define DefaultCCOptions  /**/
>  #else
>@@ -10,9 +9,38 @@
>  #endif
> 
>  #define GccGasOption   -DGCCUSESGAS
>-@@ -105,6 +105,25 @@ XCOMM operating system:  OSName (OSMajor
>+@@ -75,9 +75,14 @@
>+
>+
>+ #ifdef i386Architecture
>++# ifdef x86_64Architecture
>++#  undef DefaultCCOptions
>++#  define DefaultCCOptions -Dasm=__asm -D__x86_64__
>++# else
>++#  define ServerExtraSysLibs -li386
>++# endif
>+ # define OptimizedCDebugFlags  DefaultGcc2i386Opt
>+ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
>+-# define ServerExtraSysLibs -li386
>+ #else
>+ # define OptimizedCDebugFlags  -O2
>+ # if defined(SparcArchitecture) || defined(AlphaArchitecture) || 
>defined(AmigaArchitecture) || defined(Sun3Architecture)
>+@@ -87,7 +92,11 @@
>  # endif
>  #endif
>+ #if defined(i386Architecture) || defined(ArcArchitecture)
>+-# define ServerExtraDefines GccGasOption XFree86ServerDefines
>++# ifdef x86_64Architecture
>++#  define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
>++# else
>++#  define ServerExtraDefines GccGasOption XFree86ServerDefines
>++# endif
>+ # ifndef XFree86ConsoleDefines
>+ #  if defined(ArcArchitecture)
>+ #   define XFree86ConsoleDefines -DPCCONS_SUPPORT
>+@@ -105,6 +114,25 @@
>+ # endif
>+ #endif
> 
> +#if defined(SparcArchitecture)
> +# define ServerOSDefines       -DDDXOSINIT
>@@ -36,7 +64,7 @@
>  #define StandardDefines -DCSRG_BASED
>  #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
> 
>-@@ -227,7 +246,7 @@ install.man::         @@\
>+@@ -227,7 +255,7 @@
> 
>  # define XF86Contrib
>  # include <xf86.rules>
>--- patches/patch-Xvnc_config_cf_vnclibs_def Sun Jan 12 15:37:49 2003
>+++ patches/patch-Xvnc_config_cf_vnclibs_def Tue Nov  6 19:54:45 2007
>@@ -1,5 +1,5 @@
>---- Xvnc/config/cf/vnclibs.def.orig Thu Jun 27 23:53:19 2002
>-+++ Xvnc/config/cf/vnclibs.def Sat Jan  4 13:13:24 2003
>+--- Xvnc/config/cf/vnclibs.def Sat May  3 04:31:55 2003
>++++ Xvnc/config/cf/vnclibs.def Tue Nov  6 19:36:15 2007
> @@ -5,13 +5,5 @@
>   * and programs/Xserver/hw/vnc whenever you change this file.
>   */
>@@ -8,9 +8,9 @@
> -
> -#ifdef OSF1Architecture
> -/* Avoid linking with different libjpeg in /usr/shlib under Tru64. */
>--VNCSYSLIBS = /usr/local/lib/libjpeg.a /usr/local/lib/libz.a
>+-VNCSYSLIBS = /usr/local/lib/libjpeg.a /usr/local/lib/libz.a -lcrypt
> -#else
>--VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz
>+-VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz -lcrypt
> -#endif
> -
> -VNCCPPFLAGS = -I$(TOP)/../include -I/usr/local/include
>--- patches/patch-Xvnc_programs_Xserver_include_servermd_h Wed Oct 12 20:37:26 
>2005
>+++ patches/patch-Xvnc_programs_Xserver_include_servermd_h Tue Nov  6 20:09:56 
>2007
>@@ -1,7 +1,6 @@
>-$OpenBSD: patch-Xvnc_programs_Xserver_include_servermd_h,v 1.4 2005/10/13 
>01:37:26 pvalchev Exp $
>---- Xvnc/programs/Xserver/include/servermd.h.orig Wed Feb 19 09:39:54 2003
>-+++ Xvnc/programs/Xserver/include/servermd.h Wed Oct 12 16:24:00 2005
>-@@ -132,7 +132,7 @@ SOFTWARE.
>+--- Xvnc/programs/Xserver/include/servermd.h Sat Dec 23 06:07:55 2006
>++++ Xvnc/programs/Xserver/include/servermd.h Tue Nov  6 20:07:48 2007
>+@@ -132,7 +132,7 @@
> 
>  #endif /* vax */
> 
>@@ -10,7 +9,7 @@
> 
>  /* For now this is for Xvfb only */
>  #define IMAGE_BYTE_ORDER        MSBFirst
>-@@ -147,10 +147,43 @@ SOFTWARE.
>+@@ -147,10 +147,43 @@
> 
>  #define FAST_MEMCPY
> 
>@@ -56,7 +55,7 @@
>      (defined(__uxp__) && (defined(sparc) || defined(mc68000))) || \
>      (defined(Lynx) && defined(__sparc__)) || \
>      ((defined(__NetBSD__) || defined(__OpenBSD__)) && \
>-@@ -214,20 +247,6 @@ SOFTWARE.
>+@@ -214,20 +247,6 @@
> 
>  #endif /* ibm */
> 
>@@ -77,31 +76,66 @@
>  #if defined (M4310) || defined(M4315) || defined(M4317) || defined(M4319) || 
> defined(M4330)
> 
>  #define IMAGE_BYTE_ORDER MSBFirst        /* Values for Pegasus only */
>-@@ -305,6 +324,27 @@ SOFTWARE.
>- #define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2
>+@@ -306,6 +325,36 @@
> 
>  #endif /* alpha */
>+
>++#if defined(__amd64__) || defined(__x86_64__)
>++# define IMAGE_BYTE_ORDER   LSBFirst
> +
>-+#if defined(__AMD64__) || defined(AMD64) || defined(__amd64__)
>-+# define IMAGE_BYTE_ORDER LSBFirst
>-+
> +# if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
>-+#  define BITMAP_BIT_ORDER      MSBFirst
>++#  define BITMAP_BIT_ORDER        MSBFirst
> +# else
>-+#  define BITMAP_BIT_ORDER      LSBFirst
>++#  define BITMAP_BIT_ORDER        LSBFirst
> +# endif
> +
> +# if defined(XF86MONOVGA) || defined(XF86VGA16)
>-+#  define BITMAP_SCANLINE_UNIT  8
>++#  define BITMAP_SCANLINE_UNIT    8
>++# else
>++#  define BITMAP_SCANLINE_UNIT    64
> +# endif
> +
>-+# define GLYPHPADBYTES  4
>-+# define GETLEFTBITS_ALIGNMENT 1
>++# define GLYPHPADBYTES    4
>++# define BITMAP_SCANLINE_PAD    64
>++# define BITMAP_SCANLINE_PAD_PROTO  32
>++# define BITMAP_SCANLINE_UNIT_PROTO   32
>++# define LOG2_BITMAP_PAD    6
>++# define LOG2_BITMAP_PAD_PROTO   5
>++# define LOG2_BYTES_PER_SCANLINE_PAD  3
>++# define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2
>++# define GETLEFTBITS_ALIGNMENT   1
>++# define INTERNAL_VS_EXTERNAL_PADDING
> +# define LARGE_INSTRUCTION_CACHE
> +# define FAST_CONSTANT_OFFSET_MODE
>-+/* ???? */
> +# define FAST_UNALIGNED_READS
>-+#endif /* AMD64 */
>-
>++#endif /* __x64_64__ */
>++
>  #ifdef stellar
> 
>+ #define IMAGE_BYTE_ORDER MSBFirst       /* Values for the stellar only*/
>+@@ -372,25 +421,6 @@
>+ #define FAST_CONSTANT_OFFSET_MODE
>+ #define FAST_MEMCPY
>+ #define NO_ONE_RECT
>+-#endif
>+-
>+-/* Values for AMD Opteron and Intel 64 bit extensions. Copied from Alpha.
>+- */
>+-#ifdef __x86_64__
>+-#  define BITMAP_SCANLINE_UNIT   64
>+-# define BITMAP_SCANLINE_PAD    64
>+-# define LOG2_BITMAP_PAD   6
>+-# define LOG2_BYTES_PER_SCANLINE_PAD  3
>+-
>+-/* Add for handling protocol XPutImage and XGetImage; see comment in
>+- * Alpha section.
>+- */
>+-#define INTERNAL_VS_EXTERNAL_PADDING
>+-#define BITMAP_SCANLINE_UNIT_PROTO  32
>+-
>+-#define BITMAP_SCANLINE_PAD_PROTO    32
>+-#define LOG2_BITMAP_PAD_PROTO   5
>+-#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2
>+ #endif
>+
>+ #endif /* SVR4 / BSD / i386 */
>--- patches/patch-Xvnc_programs_Xserver_os_access_c Wed Dec 31 18:00:00 1969
>+++ patches/patch-Xvnc_programs_Xserver_os_access_c Tue Nov  6 20:01:53 2007
>@@ -0,0 +1,29 @@
>+--- Xvnc/programs/Xserver/os/access.c Sun Jun 11 07:00:51 2000
>++++ Xvnc/programs/Xserver/os/access.c Tue Nov  6 19:36:15 2007
>+@@ -387,7 +387,7 @@
>+  str.ic_len = sizeof (struct ipb);
>+  str.ic_dp = (char *) &ifnet;
>+
>+- if (ioctl (fd, (int) I_STR, (char *) &str) < 0)
>++ if (ioctl (fd, I_STR, (char *) &str) < 0)
>+  {
>+      close (fd);
>+      Error ("Getting interface configuration (2)");
>+@@ -399,7 +399,7 @@
>+  str.ic_len = sizeof (struct in_ifaddr);
>+  str.ic_dp = (char *) &ifaddr;
>+
>+- if (ioctl (fd, (int) I_STR, (char *) &str) < 0)
>++ if (ioctl (fd, I_STR, (char *) &str) < 0)
>+  {
>+      close (fd);
>+      Error ("Getting interface configuration (3)");
>+@@ -634,7 +634,7 @@
>+ #endif
>+     ifc.ifc_len = sizeof (buf);
>+     ifc.ifc_buf = buf;
>+-    if (ifioctl (fd, (int) SIOCGIFCONF, (pointer) &ifc) < 0)
>++    if (ifioctl (fd, SIOCGIFCONF, (pointer) &ifc) < 0)
>+         Error ("Getting interface configuration (4)");
>+
>+ #ifdef ISC
>--- pkg/PLIST-main Tue Nov 21 04:23:48 2006
>+++ pkg/PLIST-main Tue Nov  6 12:49:32 2007
>@@ -12,10 +12,12 @@
> share/vnc/classes/
> share/vnc/classes/AuthPanel.class
> share/vnc/classes/ButtonPanel.class
>+share/vnc/classes/CapabilityInfo.class
>+share/vnc/classes/CapsContainer.class
> share/vnc/classes/ClipboardFrame.class
> share/vnc/classes/DesCipher.class
>-share/vnc/classes/HTTPConnectSocket.class
>-share/vnc/classes/HTTPConnectSocketFactory.class
>+share/vnc/classes/InStream.class
>+share/vnc/classes/MemInStream.class
> share/vnc/classes/OptionsFrame.class
> share/vnc/classes/RecordingFrame.class
> share/vnc/classes/ReloginPanel.class
>@@ -23,6 +25,9 @@
> share/vnc/classes/SessionRecorder.class
> share/vnc/classes/SocketFactory.class
> share/vnc/classes/VncCanvas.class
>+share/vnc/classes/VncCanvas2.class
> share/vnc/classes/VncViewer.class
> share/vnc/classes/VncViewer.jar
>+share/vnc/classes/ZlibInStream.class
> share/vnc/classes/index.vnc
>+
>
>
>


Reply via email to