Commit d4e56ff4 authored by Peter Korsgaard's avatar Peter Korsgaard
Browse files

packages: fix xorg to compile modular and tiny versions

Based on googlecode r558 by John Voltz.
parent af593cbc
Loading
Loading
Loading
Loading
+4 −20
Original line number Diff line number Diff line
@@ -353,24 +353,15 @@ source "package/qtopia4/Config.in"

#source "package/microwin/Config.in"

choice
prompt "X Window System server"
	default BR2_PACKAGE_XSERVER_none
	help
	  Xserver to use.
	  For more information about the X protocol see
	  http://www.x.org
	  You may have to enable LOCALE and WCHAR to build

menu "X Window System server"
config BR2_PACKAGE_XSERVER_none
	bool "none"
config BR2_PACKAGE_XSERVER_x11r7
	bool "x11r7"
config BR2_PACKAGE_XSERVER_xorg
	bool "xorg"
	bool "modular xorg"
config BR2_PACKAGE_XSERVER_tinyx
	bool "tinyx"
endchoice
endmenu

config BR2_X11_PREFIX
	string
@@ -379,16 +370,9 @@ config BR2_X11_PREFIX
	help
	  X11 apps root location

if BR2_PACKAGE_XSERVER_x11r7
if !BR2_PACKAGE_XSERVER_none
source "package/x11r7/Config.in"
endif
if BR2_PACKAGE_XSERVER_xorg
source "package/xorg/Config.in"
endif
if BR2_PACKAGE_XSERVER_tinyx
source "package/tinyx/Config.in"
source "package/tinyx-old/Config.in"
endif

comment "X libraries and helper libraries"
#XXX: maybe some of these should depend on !BR2_PACKAGE_XSERVER_none

package/tinyx-old/Config.in

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
config BR2_PACKAGE_TINYX_OLD
	bool "tinyx (old version. which supposedly builds)"
	default n
	depends on BR2_PACKAGE_TINYX
	help
	  A tiny X server.  Also known as 'Xfbdev' and 'kdrive'.
+0 −195
Original line number Diff line number Diff line
--- xc-011010/config/cf/X11.tmpl.orig	2005-05-12 16:16:17.000000000 -0600
+++ xc-011010/config/cf/X11.tmpl	2005-05-12 16:16:23.000000000 -0600
@@ -3055,7 +3055,7 @@
 	$(RM) index.raw file.nPS file.PS file.txt
 #endif
 
-#ifndef MakeSimpleDoc(file,srcs)
+#ifndef MakeSimpleDoc
 #define MakeSimpleDoc(file,srcs) MakeDepSimpleDoc(file,srcs,srcs)
 #endif
 
--- xc-011010/config/cf/kdrive.cf.orig	2005-05-12 16:14:50.000000000 -0600
+++ xc-011010/config/cf/kdrive.cf	2005-05-12 16:15:03.000000000 -0600
@@ -201,7 +201,7 @@
 #undef ServerOSDefines
 #define ServerOSDefines -DDDXOSINIT
 
-#ifndef Other IConfigFiles
+#ifndef OtherIConfigFiles
 #define OtherIConfigFile $(IRULESRC)/kdrive.cf
 #endif
 
diff -Nur --exclude=CVS xc-011010.src/include/extensions/lbxstr.h xc-011010/include/extensions/lbxstr.h
--- xc-011010.src/include/extensions/lbxstr.h	Tue Jul 31 20:44:35 2001
+++ xc-011010/include/extensions/lbxstr.h	Sun Apr 21 12:35:05 2002
@@ -25,7 +25,7 @@
 #ifndef _LBXSTR_H_
 #define _LBXSTR_H_
 
-#include <X11/extensions/XLbx.h>
+#include "XLbx.h"
 
 #define LBXNAME "LBX"
 
diff -Nur --exclude=CVS xc-011010.src/programs/Xserver/hw/kdrive/fbdev/fbdev.h xc-011010/programs/Xserver/hw/kdrive/fbdev/fbdev.h
--- xc-011010.src/programs/Xserver/hw/kdrive/fbdev/fbdev.h	Sun Jun  3 17:52:45 2001
+++ xc-011010/programs/Xserver/hw/kdrive/fbdev/fbdev.h	Sun Apr 21 12:36:25 2002
@@ -29,6 +29,7 @@
 #include <linux/fb.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <sys/types.h>
 #include "kdrive.h"
 #include "layer.h"

diff -Nur xc-011010.src2/lib/X11/Xlib.h xc-011010/lib/X11/Xlib.h
--- xc-011010.src/programs/Xserver/hw/kdrive/linux/ts.c	Tue Jul 10 22:58:19 2001
+++ xc-011010/programs/Xserver/hw/kdrive/linux/ts.c	Tue Apr 23 20:16:23 2002
@@ -33,65 +33,48 @@
 #include "kdrive.h"
 #include "Xpoll.h"
 #include <sys/ioctl.h>
-#include <linux/h3600_ts.h>	/* touch screen events */
+
+typedef struct {
+  unsigned short          pressure;
+  unsigned short          x;
+  unsigned short          y;
+  unsigned short          pad;
+  struct timeval  stamp;
+} TS_EVENT;
 
 static long lastx = 0, lasty = 0;
 int TsScreen;
 extern int TsFbdev;
 
-void
-TsRead (int tsPort, void *closure)
-{
-    TS_EVENT	    event;
-    long	    buf[3];
-    int		    n;
-    long	    pressure;
-    long	    x, y;
-    unsigned long   flags;
-    unsigned long   buttons;
-
-    n = Ps2ReadBytes (tsPort, (char *) &event, 
-			 sizeof (event), sizeof (event));
-    if (n == sizeof (event))  
-    {
-	if (event.pressure) 
-	{
-	    /* 
-	     * HACK ATTACK.  (static global variables used !)
-	     * Here we test for the touch screen driver actually being on the
-	     * touch screen, if it is we send absolute coordinates. If not,
-	     * then we send delta's so that we can track the entire vga screen.
-	     */
-	    if (TsScreen == TsFbdev) {
-	    	flags = KD_BUTTON_1;
-	    	x = event.x;
-	    	y = event.y;
-	    } else {
-	    	flags = /* KD_BUTTON_1 |*/ KD_MOUSE_DELTA;
-	    	if ((lastx == 0) || (lasty == 0)) {
-	    	    x = 0;
-	    	    y = 0;
-	    	} else {
-	    	    x = event.x - lastx;
-	    	    y = event.y - lasty;
-	    	}
-	    	lastx = event.x;
-	    	lasty = event.y;
-	    }
-	} else {
-	    flags = KD_MOUSE_DELTA;
-	    x = 0;
-	    y = 0;
-	    lastx = 0;
-	    lasty = 0;
-	}
-	KdEnqueueMouseEvent (flags, x, y);
+void TsRead (int tsPort, void *closure) {
+  TS_EVENT        event;
+  long            buf[3];
+  int             n;
+  long            pressure;
+  long            x, y;
+  unsigned long   flags;
+  unsigned long   buttons;
+
+  n = Ps2ReadBytes(tsPort, (char *) &event, sizeof (event), sizeof (event));
+  if (n >= sizeof (event)) {
+    if (event.pressure >= 100) {
+      flags = KD_BUTTON_1;
+      x = (960 - event.x) * 640 / (920);
+      y = (960 - event.y) * 480 / (920);
+      //ErrorF("flags %d x %d y %dn",flags,event.x,event.y);
+    }
+    else {
+      flags = KD_MOUSE_DELTA;
+      x = lastx;
+      y = lasty;
     }
+    KdEnqueueMouseEvent(flags, x, y);
+  }
 }
 
 char	*TsNames[] = {
-  "/dev/ts",	
-  "/dev/h3600_ts" /* temporary name; note this code can try
+  "/dev/ucb1x00-ts",
+  "/dev/ts" /* temporary name; note this code can try
 			   to open more than one device */
 };
 
@@ -99,9 +82,7 @@
 
 int TsInputType;
 
-int
-TsInit (void)
-{
+int TsInit (void) {
     int	    i;
     int	    TsPort;
 
diff -Nur xc-011010.src/startx xc-011010/startx
--- ../../buildroot-tux.Apr25-1/build/xc-011010.src/startx	Thu Apr 25 05:20:35 2002
+++ xc-011010/startx	Sun Apr 28 05:35:35 2002
@@ -0,0 +1,11 @@
+#!/bin/sh
+killall Xfbdev
+sleep 1
+export DISPLAY=":0"
+/usr/X11R6/bin/Xfbdev -ac &
+sleep 4
+/usr/X11R6/bin/matchbox &
+sleep 1
+/usr/X11R6/bin/minisys &
+/usr/X11R6/bin/minitime &
+/usr/X11R6/bin/rxvt &
diff -Nur xc-011010.src/lib/Xft/xftgram.y xc-011010/lib/Xft/xftgram.y
--- ../../buildroot-tux.Apr25-1/build/xc-011010/lib/Xft/xftgram.y	Thu Apr 25 05:20:35 2002
+++ xc-011010/lib/Xft/xftgram.y	Sun Apr 28 05:35:35 2002
@@ -165,6 +165,7 @@
 		    matrix.yx = $4;
 		    matrix.__REALLY_YY__ = $5;
 		}
+	;
 number	:   INTEGER
 		{ $$ = (double) $1; }
 	|   DOUBLE
diff -Nur xc-011010.src/programs/twm/gram.y xc-011010/programs/twm/gram.y
--- ../../buildroot-tux.Apr25-1/build/xc-011010/programs/twm/gram.y	Thu Apr 25 05:20:35 2002
+++ xc-011010/programs/twm/gram.y	Sun Apr 28 05:35:35 2002
@@ -650,6 +650,7 @@
 					  RemoveDQuote(ptr);
 					  $$ = ptr;
 					}
+		;
 number		: NUMBER		{ $$ = $1; }
 		;
 
+0 −11
Original line number Diff line number Diff line
--- xc-011010/programs/xfs/os/config.c.orig	2001-07-31 18:45:05.000000000 -0600
+++ xc-011010/programs/xfs/os/config.c	2005-05-12 15:51:35.000000000 -0600
@@ -661,6 +661,8 @@
     val = config_parse_int (val, &ret, &scan);
     if (ret == -1)
 	return val;
+#ifdef SNFFORMAT
     SnfSetFormat (bit, byte, glyph, scan);
+#endif
     return val;
 }
+0 −112
Original line number Diff line number Diff line
--- xc/config/cf/host.def~	2005-04-02 14:51:31.000000000 -0700
+++ xc/config/cf/host.def	2005-04-26 01:22:00.000000000 -0600
@@ -0,0 +1,36 @@
+#define KDriveXServer		YES
+#define TinyXServer		YES
+#define XfbdevServer		YES
+#define CrossCompiling		YES
+#define ProjectRoot             /usr/X11R6
+#define NothingOutsideProjectRoot	YES
+
+#define HasFreetype2		NO
+#define HasFontconfig		NO
+#define HasLibpng		YES
+#define HasZlib			YES
+
+#define HasExpat		NO
+#define XprtServer		NO
+#define BuildXprintClients	NO
+#define TouchScreen		NO
+#define HasTsLib		NO
+#define BuildDocs		NO
+#define BuildXF86DRI		NO
+#define BuildGlxExt		NO
+#define BuildOSMesaLib		NO
+#define BuildLBX		NO
+#define BuildLowMem		NO
+#define BuildIPv6		NO
+
+/*
+#define XF86CardDrivers		mga glint nv tga s3virge sis rendition \
+				neomagic i740 tdfx savage \
+				cirrus vmware tseng trident chips apm \
+				GlideDriver fbdev i128 \
+				ati AgpGartDrivers DevelDrivers ark \
+				cyrix siliconmotion vesa vga \
+				XF86OSCardDrivers XF86ExtraCardDrivers
+*/
+
+#define XInputDrivers		mouse keyboard
--- xc/config/cf/cross.def.orig	2001-03-29 19:15:17.000000000 -0700
+++ xc/config/cf/cross.def	2005-05-12 16:09:23.000000000 -0600
@@ -5,34 +5,56 @@
  * compiler images.  It will have to be edited to reflect these
  * given your local configuration.
  */
+
+#undef Arm32Architecture
 #undef i386Architecture
+#undef Arm32Architecture
+#undef Arm32Architecture
+
+#if defined(__arm__)
 #define Arm32Architecture
+#endif
+#if defined(__i386__)
+#defined i386Architecture
+#endif
+#if defined(__mc68000__)
+#define Mc68020Architecture
+#endif
+#if defined(__mips__)
+#define MipsArchitecture
+#endif
+#if defined(__powerpc__)
+#define PpcArchitecture
+#endif
 
 #undef OptimizedCDebugFlags
-#define OptimizedCDebugFlags 	-O2
-#define ServerCDebugFlags	-O2
+#define OptimizedCDebugFlags 	-Os
+#define ServerCDebugFlags	-Os
 #undef StandardDefines
-#define StandardDefines 	-Dlinux -D__arm__ -D_POSIX_SOURCE \
-				-D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
-#undef CcCmd
-#define StdIncDir /skiff/local/arm-linux/include
-#define PreIncDir 
+#define StandardDefines 	-Dlinux -D__REPLACE_ARCH__ -D_POSIX_SOURCE \
+  				-D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
+#define StdIncDir REPLACE_STAGING_DIR/include
+#define PreIncDir
 #undef PostIncDir
-#define PostIncDir /skiff/local/lib/gcc-lib/arm-linux/2.95.2/include
-#define CcCmd /skiff/local/bin/arm-linux-gcc
+#define PostIncDir REPLACE_STAGING_DIR/lib/gcc-lib/REPLACE_ARCH-linux-uclibc/3.3.3/include
+#undef CcCmd
+#define CcCmd REPLACE_STAGING_DIR/bin/REPLACE_ARCH-linux-gcc
+#undef HasCplusplus
+#define HasCplusplus NO
 #undef CplusplusCmd
-#define HasCplusplus YES
-#define CplusplusCmd /skiff/local/bin/arm-linux-g++
+#define CplusplusCmd NO
 #define DoRanlibCmd YES
-#define RanlibCmd /skiff/local/bin/arm-linux-ranlib
+#define RanlibCmd REPLACE_STAGING_DIR/bin/REPLACE_ARCH-linux-ranlib
 #undef ExtraLoadFlags
 #define ExtraLoadFlags
 #define FbNoPixelAddrCode
 #undef TermcapLibrary
-#define TermcapLibrary -ltermcap
+#define TermcapLibrary -lncurses
 
 #undef LdPostLib
-#define LdPostLib	-L/skiff/local/arm-linux/lib
+#define LdPostLib	-LREPLACE_STAGING_DIR/REPLACE_ARCH-linux-uclibc/lib
+#undef LdCmd
+#define LdCmd REPLACE_STAGING_DIR/bin/REPLACE_ARCH-linux-ld
 
 #undef ExtensionOSDefines
 #define ExtensionOSDefines
Loading