Adrian Ulrich wrote:
Hups.. the packages included in Slackintosh 12.0 are stolen from Slackware 12.0 Looks like that wasn't such a good idea :-)
I have been porting Slackware 12.0 to SPARC over the past two weeks and it looks like we're in the same boat :-). Apart from keeping binaries separate (and some architectures such as MIPS, ARM and older PPC can be of either endianness), we need to keep "noarch" files for both. I have been seeing the strange phenomenon with TightVNC 1.3.9 in that all letters are horizontally mirrored in TWM and when running KDE and Windowmaker Xvnc immediately crashes. I would like to know if this is the same on PPC. I have attached my SlackBuild scripts for TightVNC. It would be helpful if you could reproduce it on your systems. It works fine on little-endian MIPS (Loongson). Regards, Sunil
# HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| tightvnc: tightvnc (VNC remote control application) tightvnc: tightvnc: TightVNC is a free remote control software package derived from tightvnc: the popular VNC software. tightvnc: tightvnc: With TightVNC, you can see the desktop of a remote machine and tightvnc: control it with your local mouse and keyboard, just like you tightvnc: would do it sitting in the front of that computer. tightvnc: tightvnc:
#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} if [ ! -d $TMP ]; then mkdir -p $TMP fi PROGRAM=tightvnc PROGRAMSHORT=vnc PKG=$TMP/package-$PROGRAM rm -rf $PKG mkdir -p $PKG VERSION=1.3.9 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} cd $TMP rm -rf ${PROGRAMSHORT}_unixsrc # tar xvzf $CWD/$PROGRAM-${VERSION}_unixsrc.tar.gz tar xvjf $CWD/$PROGRAM-${VERSION}_unixsrc.tar.bz2 cd ${PROGRAMSHORT}_unixsrc chown -R root:root . zcat $CWD/$PROGRAM-$VERSION.vncserver.diff.gz | patch -p1 --verbose zcat $CWD/$PROGRAM-$VERSION.$ARCH.diff.gz | patch -p1 --verbose xmkmf make World mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/man/man1 mkdir -p $PKG/usr/share/$PROGRAM cp -a vncserver $PKG/usr/bin cp -a vncserver.man $PKG/usr/man/man1/vncserver.1 cd vncconnect cp -a vncconnect $PKG/usr/bin cp -a vncconnect.man $PKG/usr/man/man1/vncconnect.1 cd .. cd vncpasswd cp -a vncpasswd $PKG/usr/bin cp -a vncpasswd.man $PKG/usr/man/man1/vncpasswd.1 cd .. cd vncviewer cp -a vncviewer $PKG/usr/bin cp -a vncviewer.man $PKG/usr/man/man1/vncviewer.1 cd .. cd Xvnc # CFLAGS="$SLKCFLAGS" \ ./configure make cd programs/Xserver cp -a Xvnc $PKG/usr/bin cp -a Xvnc.man $PKG/usr/man/man1/Xvnc.1 cd ../../.. mkdir -p $PKG/usr/doc/$PROGRAM-$VERSION cp -a \ ChangeLog LICENCE.TXT README WhatsNew \ $PKG/usr/doc/$PROGRAM-$VERSION cp -a \ vncviewer/README \ $PKG/usr/doc/$PROGRAM-$VERSION/README-vncviewer cd classes cp -a index.vnc $PKG/usr/share/$PROGRAM cp -a VncViewer.jar $PKG/usr/share/$PROGRAM mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) # chown -R root:bin $PKG/usr/bin # Compress all manpages: gzip -9 $PKG/usr/man/man?/*.? gzip -9 $PKG/usr/man/cat?/*.? # Clean up and compress info pages rm $PKG/usr/info/dir gzip -9 $PKG/usr/info/* cd $PKG makepkg -l y -c n $TMP/$PROGRAM-${VERSION}-$ARCH-$BUILD.tgz
--- vnc_unixsrc.org/Xvnc/config/cf/Imake.cf 2003-02-06 19:11:28.000000000 +0100 +++ vnc_unixsrc/Xvnc/config/cf/Imake.cf 2006-09-14 21:37:48.000000000 +0200 @@ -801,6 +801,10 @@ # ifdef PpcArchitecture # define PowerPCArchitecture # endif +# ifdef __x86_64__ +# define x86_64Architecture +# undef __x86_64__ +# endif #endif /* linux */ #if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc)) --- vnc_unixsrc.org/Xvnc/config/cf/linux.cf 2002-03-20 11:49:23.000000000 +0100 +++ vnc_unixsrc/Xvnc/config/cf/linux.cf 2006-09-14 21:37:48.000000000 +0200 @@ -43,7 +43,7 @@ #if defined(AlphaArchitecture) || defined(PowerPCArchitecture) || \ defined(SparcArchitecture) || defined(ArmArchitecure) || \ defined(i386Architecture) || defined(s390Architecture) || \ - defined(s390xArchitecture) + defined(s390xArchitecture) || defined(x86_64Architecture) #define DefaultLinuxCLibMajorVersion 6 #else #define DefaultLinuxCLibMajorVersion 5 @@ -290,6 +290,14 @@ #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* PowerPCArchitecture */ +#ifdef x86_64Architecture +#define DefaultCCOptions -fsigned-char +#define OptimizedCDebugFlags -O2 +#define LinuxMachineDefines -D__x86_64__ +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET +#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#endif /* x86_64PCArchitecture */ + #ifdef ArmArchitecture #define DefaultCCOptions -fsigned-char #define OptimizedCDebugFlags -O2 --- vnc_unixsrc.org/Xvnc/include/Xmd.h 2000-06-11 14:00:52.000000000 +0200 +++ vnc_unixsrc/Xvnc/include/Xmd.h 2006-09-14 21:29:47.000000000 +0200 @@ -59,7 +59,7 @@ #ifdef CRAY #define WORD64 /* 64-bit architecture */ #endif -#if defined(__alpha) || defined(__alpha__) +#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) #define LONG64 /* 32/64-bit architecture */ #endif #ifdef __sgi --- vnc_unixsrc.org/Xvnc/lib/font/bitmap/bdfread.c 2000-06-11 14:00:52.000000000 +0200 +++ vnc_unixsrc/Xvnc/lib/font/bitmap/bdfread.c 2006-09-14 21:29:47.000000000 +0200 @@ -79,7 +79,7 @@ byte, glyph, scan; - int sizes[GLYPHPADOPTIONS]; + CARD32 sizes[GLYPHPADOPTIONS]; { int widthBits, widthBytes, --- vnc_unixsrc.org/Xvnc/programs/Xserver/dix/dixutils.c 2000-06-11 14:00:51.000000000 +0200 +++ vnc_unixsrc/Xvnc/programs/Xserver/dix/dixutils.c 2006-09-14 21:29:47.000000000 +0200 @@ -404,6 +404,7 @@ */ void NoopDDA( +#undef NeedVarargsPrototypes #if NeedVarargsPrototypes void* f, ... #endif --- vnc_unixsrc.org/Xvnc/programs/Xserver/hw/vnc/httpd.c 2003-04-09 00:18:33.000000000 +0200 +++ vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc/httpd.c 2006-09-14 21:29:47.000000000 +0200 @@ -39,6 +39,7 @@ #endif #if USE_LIBWRAP #include <tcpd.h> +#include <arpa/inet.h> #endif #include "rfb.h" --- vnc_unixsrc.org/Xvnc/programs/Xserver/hw/vnc/init.c 2006-08-15 09:05:07.000000000 +0200 +++ vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc/init.c 2006-09-14 21:29:47.000000000 +0200 @@ -80,6 +80,7 @@ #include <sys/param.h> #include "dix.h" #include "rfb.h" +#include <time.h> #ifdef CORBA #include <vncserverctrl.h> --- vnc_unixsrc.org/Xvnc/programs/Xserver/hw/vnc/rfb.h 2004-02-27 13:22:47.000000000 +0100 +++ vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc/rfb.h 2006-09-14 21:29:47.000000000 +0200 @@ -30,6 +30,7 @@ #include <rfbproto.h> #include <vncauth.h> #include <zlib.h> +#include <stdarg.h> /* It's a good idea to keep these values a bit greater than required. */ #define MAX_ENCODINGS 10 --- vnc_unixsrc.org/Xvnc/programs/Xserver/hw/vnc/sockets.c 2002-10-27 13:36:02.000000000 +0100 +++ vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc/sockets.c 2006-09-14 21:29:47.000000000 +0200 @@ -42,6 +42,7 @@ #include <sys/time.h> #include <sys/socket.h> #include <netinet/in.h> +#include <arpa/inet.h> #include <netinet/tcp.h> #include <netdb.h> #include <fcntl.h> --- vnc_unixsrc.org/Xvnc/programs/Xserver/include/dix.h 2000-06-11 14:00:52.000000000 +0200 +++ vnc_unixsrc/Xvnc/programs/Xserver/include/dix.h 2006-09-14 21:29:47.000000000 +0200 @@ -479,6 +479,7 @@ ); extern void NoopDDA( +#undef NeedVarargsPrototypes #if NeedVarargsPrototypes void *, ... --- vnc_unixsrc.org/Xvnc/programs/Xserver/include/servermd.h 2003-02-19 17:39:54.000000000 +0100 +++ vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h 2006-09-14 21:29:47.000000000 +0200 @@ -374,6 +374,25 @@ #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 */ #if defined (linux) && defined (__mc68000__)