summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Jarjoura <eklipse@gentoo.org>2004-09-27 18:23:38 +0000
committerMatt Jarjoura <eklipse@gentoo.org>2004-09-27 18:23:38 +0000
commitdb0ae0bd6dfbcc9ac0fc50d9943dc94ab2a14215 (patch)
treea324d32fb187a0f029e20247d0caca62112b004e /x11-misc
parentStable on sparc (Manifest recommit) (diff)
downloadgentoo-2-db0ae0bd6dfbcc9ac0fc50d9943dc94ab2a14215.tar.gz
gentoo-2-db0ae0bd6dfbcc9ac0fc50d9943dc94ab2a14215.tar.bz2
gentoo-2-db0ae0bd6dfbcc9ac0fc50d9943dc94ab2a14215.zip
Added patch to support xorg.conf and removed version 0.15
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/Xautoconfig/files/XF4text.h155
-rw-r--r--x11-misc/Xautoconfig/files/XF4text.h.diff39
-rw-r--r--x11-misc/Xautoconfig/files/Xautoconfig-0.15.diff82
-rw-r--r--x11-misc/Xautoconfig/files/Xautoconfig.patch217
-rw-r--r--x11-misc/Xautoconfig/files/digest-Xautoconfig-0.151
5 files changed, 256 insertions, 238 deletions
diff --git a/x11-misc/Xautoconfig/files/XF4text.h b/x11-misc/Xautoconfig/files/XF4text.h
deleted file mode 100644
index 43e7700bc8ee..000000000000
--- a/x11-misc/Xautoconfig/files/XF4text.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* This file hold the various bits of the config file for XFree86 4.0.0+ */
-
-static char *MainChunk_text =
-"# File generated by Xautoconfig4.\n"
-"Section \"ServerLayout\"\n"
-" Identifier \"XFree86 Configured\"\n"
-" Screen 0 \"Screen0\" 0 0\n"
-" InputDevice \"Mouse0\" \"CorePointer\"\n"
-" InputDevice \"Keyboard0\" \"CoreKeyboard\"\n"
-"EndSection\n"
-"\n"
-"Section \"Files\"\n"
-"# The location of the RGB database. Note, this is the name of the\n"
-"# file minus the extension (like \".txt\" or \".db\"). There is normally\n"
-"# no need to change the default.\n"
-"\n"
-" RgbPath \"/usr/X11R6/lib/X11/rgb\"\n"
-"\n"
-"# Multiple FontPath entries are allowed (which are concatenated together),\n"
-"# as well as specifying multiple comma-separated entries in one FontPath\n"
-"# command (or a combination of both methods)\n"
-"\n"
-" FontPath \"unix/:7100\"\n"
-" FontPath \"unix/:-1\"\n"
-" # If X can't find it's default font, try uncommenting these:\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/local/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/misc/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/truetype/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/75dpi/:unscaled\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/100dpi/:unscaled\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/Type1/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/CID/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/Speedo/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/75dpi/\"\n"
-" FontPath \"/usr/X11R6/lib/X11/fonts/100dpi/\"\n"
-"\n"
-"# ModulePath can be used to set a search path for the X server modules.\n"
-"# The default path is shown here.\n"
-"\n"
-"# ModulePath \"/usr/X11R6/lib/modules\"\n"
-"\n"
-"EndSection\n"
-"\n"
-"Section \"Module\"\n"
-" Load \"GLcore\"\n"
-" Load \"dbe\"\n"
-" Load \"extmod\"\n"
-" Load \"glx\"\n"
-" Load \"pex5\"\n"
-" Load \"record\"\n"
-" Load \"xie\"\n"
-" Load \"bitmap\"\n"
-" Load \"type1\"\n"
-" Load \"speedo\"\n"
-" Load \"freetype\"\n"
-" # Uncomment for Video4Linux support\n"
-" #Load \"v4l\"\n"
-"EndSection\n"
-"\n"
-"Section \"InputDevice\"\n"
-" Identifier \"Keyboard0\"\n"
-" Driver \"keyboard\"\n";
-
-static char *keyboard_adb =
-" Option \"CustomKeycodes\"\n"
-" Option \"XkbModel\" \"macintosh\"\n"
-" Option \"XkbRules\" \"xfree\"\n"
-" Option \"XkbLayout\" \"us\"\n";
-
-static char *keyboard_adbcom =
-"# Uncomment this if your keyboard no longer works in X and you belive you are\n"
-"# using the depreciated adb keycodes\n"
-" #Option \"CustomKeycodes\"\n"
-" #Option \"XkbModel\" \"macintosh\"\n"
-" Option \"XkbRules\" \"xfree\"\n"
-" #Option \"XkbLayout\" \"us\"\n";
-
-/* Uncomment/fix this for APUS support
-static char *keyboardsection_powerpc_amiga =
-" XkbKeycodes \"amiga\"\n"
-" XkbTypes \"default\"\n"
-" XkbCompat \"default\"\n"
-" XkbSymbols \"amiga\"\n"
-" XkbGeometry \"amiga\"\n"
-" XkbRules \"xfree86\"\n"
-" XkbModel \"pc101\"\n"
-"EndSection\n\n"
-"";
-*/
-
-static char *mouse_section =
-"Section \"InputDevice\"\n"
-" Identifier \"Mouse0\"\n"
-" Driver \"mouse\"\n"
-" Option \"ZAxisMapping\" \"4 5\"\n"
-" Option \"Protocol\" \"";
-
-static char *monitor_section =
-"EndSection\n"
-"\n"
-"Section \"Monitor\"\n"
-" Identifier \"Monitor0\"\n"
-" UseModes \"Modes0\"\n"
-" ModelName \"Monitor Model\"\n"
-" Option \"DPMS\"\n";
-
-static char *modes_section =
-"EndSection\n\n"
-"Section \"Modes\"\n"
-" Identifier \"Modes0\"\n"
-"\n"
-" # Apple iMac modes\n"
-" Modeline \"1024x768\" 78.525 1024 1049 1145 1312 768 769 772 800 +hsync +vsync\n"
-" Modeline \"800x600\" 62.357 800 821 901 1040 600 601 604 632 +hsync +vsync\n"
-" Modeline \"640x480\" 49.886 640 661 725 832 480 481 484 514 +hsync +vsync\n"
-" # Apple monitors tend to do 832x624\n"
-" Modeline \"832x624\" 57 832 876 940 1152 624 625 628 667 -hsync -vsync\n"
-" # Apple PowerBook G3\n"
-" Modeline \"800x600\" 100 800 816 824 840 600 616 624 640 -hsync -vsync\n"
-" # Generated\n";
-
-static char *device_start =
-"\n"
-"EndSection\n"
-"Section \"Device\"\n"
-" Identifier \"Card0\"\n";
-
-static char *driver_on_opts =
-" ### Available Driver options are:-\n"
-" #Option \"SWcursor\"\n"
-" Option \"HWcursor\"\n"
-" #Option \"PciRetry\"\n"
-" #Option \"NoAccel\"\n"
-" #Option \"ShadowFB\" \"true\"\n"
-" Option \"UseFBDev\"\n";
-
-
-
-static char *driver_off_opts =
-" ### Available Driver options are:-\n"
-" #Option \"SWcursor\"\n"
-" #Option \"HWcursor\"\n"
-" #Option \"PciRetry\"\n"
-" #Option \"NoAccel\"\n"
-" #Option \"ShadowFB\" \"true\"\n"
-" #Option \"UseFBDev\"\n";
-
-static char *screen_section =
-"EndSection\n"
-"\n"
-"Section \"Screen\"\n"
-" Identifier \"Screen0\"\n"
-" Device \"Card0\"\n"
-" Monitor \"Monitor0\"\n"
-" DefaultDepth ";
diff --git a/x11-misc/Xautoconfig/files/XF4text.h.diff b/x11-misc/Xautoconfig/files/XF4text.h.diff
new file mode 100644
index 000000000000..99864e192bc0
--- /dev/null
+++ b/x11-misc/Xautoconfig/files/XF4text.h.diff
@@ -0,0 +1,39 @@
+--- XF4text.h.old 2004-06-07 17:42:13.000000000 -0400
++++ XF4text.h 2004-06-07 17:49:33.000000000 -0400
+@@ -1,5 +1,7 @@
+ /* This file hold the various bits of the config file for XFree86 4.2+ */
+
++/* Modified for Gentoo PPC Distribution by Matt Jarjoura */
++
+ static char *header =
+ "# File generated by Xautoconfig.\n"
+ "Section \"ServerLayout\"\n"
+@@ -20,10 +22,26 @@
+ "\n"
+ " RgbPath \"/usr/X11R6/lib/X11/rgb\"\n";
+
+-static char *fontpath =
+-" FontPath \"unix/:7100\"\n"
++static char *fontpath_gentoo =
++" # For XFS, uncomment this and comment the others\n"
++" # FontPath \"unix/:-1\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/local/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/misc/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/75dpi/:unscaled\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/100dpi/:unscaled\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/Type1/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/TTF/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/CID/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/Speedo/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/75dpi/\"\n"
++" FontPath \"/usr/X11R6/lib/X11/fonts/100dpi/\"\n"
+ "EndSection\n\n";
+
++/* static char *fontpath =
++" FontPath \"unix/:7100\"\n"
++"EndSection\n\n";
++*/
++
+ static char *fontpath_anaconda =
+ " FontPath \"/usr/X11R6/lib/X11/fonts/misc:unscaled\"\n"
+ " FontPath \"/usr/X11R6/lib/X11/fonts/Type1/\"\n"
diff --git a/x11-misc/Xautoconfig/files/Xautoconfig-0.15.diff b/x11-misc/Xautoconfig/files/Xautoconfig-0.15.diff
deleted file mode 100644
index be52a201a7e3..000000000000
--- a/x11-misc/Xautoconfig/files/Xautoconfig-0.15.diff
+++ /dev/null
@@ -1,82 +0,0 @@
-diff -uNr Xautoconfig-0.15.orig/Xautoconfig4.c Xautoconfig-0.15/Xautoconfig4.c
---- Xautoconfig-0.15.orig/Xautoconfig4.c Mon Feb 25 06:10:18 2002
-+++ Xautoconfig-0.15/Xautoconfig4.c Tue May 7 11:19:14 2002
-@@ -13,12 +13,12 @@
-
- extern int bus, dev, func;
- extern void findVideoDevice(void);
--extern int checkKernelVer(), checkRedHat();
-+extern int checkKernelVer(), checkRedHat(), checkMouseType();
- extern int readMouseConfigFile(), readKBDConfigFile();
-
- int main() {
- FILE * f;
-- int i, depth, fh, r, rc = 0;
-+ int i, depth, fh, r, rc = 0, m;
- unsigned int xsstart, xsend, xtotal = 0;
- unsigned int ysstart, ysend, ytotal = 0;
- double drate, vrate, hrate;
-@@ -81,7 +81,7 @@
- depth = var.red.length+var.green.length+var.blue.length;
-
- r = checkRedHat(); /* See if we're on a RedHat-like system */
-- if(inputMess <= 3)
-+ if(inputMess <= 3 && r == 1)
- (int) mouse = readMouseConfigFile(&mouse);
- else if (!r) {
- fprintf(stdout, "You don't seem to be running on a RedHat");
-@@ -97,7 +97,11 @@
-
- /* Let's be nice and backup an existing XF86Config */
- if ((f = fopen("/etc/X11/XF86Config-4", "r"))) {
-- system("mv /etc/X11/XF86Config /etc/X11/XF86Config-4.xautoconfig");
-+ system("mv /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.xautoconfig");
-+ }
-+
-+ if ((f = fopen("/etc/X11/XF86Config", "r"))) {
-+ system("mv /etc/X11/XF86Config /etc/X11/XF86Config.xautoconfig");
- }
-
- if (!(f = fopen("/etc/X11/XF86Config-4", "w"))) {
-@@ -116,8 +120,13 @@
- fprintf(f, "%s\"\n", mouse);
- else
- fprintf(f, "IMPS/2\"\n");
-- fprintf(f, " Option \"Device\" \"/dev/mouse\"\n");
--
-+
-+ m = checkMouseType(); /* check for input layer, if none fallback to std mouse */
-+ if (!m)
-+ fprintf(f, " Option \"Device\" \"/dev/mouse\"\n");
-+ else
-+ fprintf(f, " Option \"Device\" \"/dev/input/mice\"\n");
-+
- /* Begin monitor */
- fprintf(f, "%s", monitor_section);
- /* Set a sane HorizSync / VertRefresh. This is borred from dexter */
-diff -uNr Xautoconfig-0.15.orig/misc.c Xautoconfig-0.15/misc.c
---- Xautoconfig-0.15.orig/misc.c Wed Dec 27 23:40:21 2000
-+++ Xautoconfig-0.15/misc.c Tue May 7 11:18:25 2002
-@@ -27,7 +27,7 @@
- /* to promote the sale, use or other dealings in this Software without prior */
- /* written authorization from the XFree86 Project.*/
-
--/* This file contains the routines needed for reasing /etc/sysconfig/{mouse,keyboard}
-+/* This file contains the routines needed for reading /etc/sysconfig/{mouse,keyboard}
- * and are taken from Xconfigurator 4.2.4, or so.
- * It also contains functions to check the running kernel version. */
-
-@@ -203,3 +203,13 @@
- }
- return (int) *keyboardtype;
- }
-+
-+int checkMouseType() {
-+ FILE * m;
-+ int result = 0;
-+ /* check to see if /dev/input/mice exists */
-+ if ((m = fopen("/dev/input/mice", "r")))
-+ result = 1;
-+
-+ return result;
-+}
diff --git a/x11-misc/Xautoconfig/files/Xautoconfig.patch b/x11-misc/Xautoconfig/files/Xautoconfig.patch
new file mode 100644
index 000000000000..9b682c95ab11
--- /dev/null
+++ b/x11-misc/Xautoconfig/files/Xautoconfig.patch
@@ -0,0 +1,217 @@
+*** Xautoconfig.c.old Mon Jun 7 17:27:37 2004
+--- Xautoconfig.c Mon Jun 7 19:00:54 2004
+***************
+*** 1,7 ****
+! /* Xautoconfig: versatile XF86Config creation tool for powerpc
+ *
+ * Copyright (C) 2002-2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
+ * Copyright (C) 1999-2001 Tom Rini <trini@kernel.crashing.org>
+ *
+ */
+
+--- 1,8 ----
+! /* Xautoconfig: versatile XF86Config/xorg.conf creation tool for powerpc
+ *
++ * Copyright (C) 2004 Matt Jarjoura <matt@tasonline.com>
+ * Copyright (C) 2002-2003 Dan Burcaw <dburcaw@terrasoftsolutions.com>
+ * Copyright (C) 1999-2001 Tom Rini <trini@kernel.crashing.org>
+ *
+ */
+
+***************
+*** 31,58 ****
+--- 32,78 ----
+ extern void findVideoDevice(void);
+ extern void help();
+ extern void usage();
+ extern char * macMachineType(void);
+
++ char XorgTest(void);
++
+ struct monitor_sync
+ {
+ int h_min;
+ int h_max;
+ int v_min;
+ int v_max;
+ };
+
++ /* Gentoo Likes Color, so I decided to add some to this tiny utility
++ since this is a gentoo specific application */
++
++ #define GENTOO_COLOR
++
++ #ifdef GENTOO_COLOR
++ #define GENTOO_BOLD "\x1b[01m"
++ #define GENTOO_RESET "\x1b[0m"
++ #define GENTOO_RED "\x1b[31;06m"
++ #else
++ #define GENTOO_BOLD ""
++ #define GENTOO_RESET ""
++ #define GENTOO_RED ""
++ #endif
++
+ int main(int argc, char **argv) {
+ FILE * f;
+ int i, depth, fd;
+ int anaconda = 0, rc = 0, offb = 0, fbdepth = 0, fbdev = 0, nv = 0;
+ unsigned int xsstart, xsend, xtotal = 0;
+ unsigned int ysstart, ysend, ytotal = 0;
+ double drate, vrate, hrate;
+ unsigned int htotal, vtotal;
+ char manufacturer[4];
+
++ char xorg = 0;
++
+ struct monitor_sync sync;
+ struct fb_fix_screeninfo fix;
+ struct fb_var_screeninfo var;
+ struct edid1_info *edid_info = NULL;
+
+***************
+*** 70,81 ****
+ if (!rc && ioctl(fd, FBIOGET_VSCREENINFO, &var))
+ rc = 2; /* Failure */
+
+ close(fd);
+
+ if (rc) {
+! fprintf(stderr, "Can't access %s. Exiting.\n", name);
+ return -1;
+ }
+
+ if (argc == 2)
+ {
+--- 90,104 ----
+ if (!rc && ioctl(fd, FBIOGET_VSCREENINFO, &var))
+ rc = 2; /* Failure */
+
+ close(fd);
+
++ printf("%sXautoconfig: Release 0.22.[Gentoo] %s\n\n", GENTOO_BOLD, GENTOO_RESET);
++
+ if (rc) {
+! fprintf(stderr, "%sCan't access %s. Exiting.%s\n",
+! GENTOO_RED, name, GENTOO_RESET);
+ return -1;
+ }
+
+ if (argc == 2)
+ {
+***************
+*** 187,208 ****
+ if (!(f = fopen("/tmp/XF86Config.test", "w"))) {
+ fprintf(stderr, "Can't write to /tmp/XF86Config.test. Exiting.\n");
+ return -1;;
+ }
+ } else {
+! /* Let's be nice and backup an existing XF86Config */
+! if ((f = fopen("/etc/X11/XF86Config", "r"))) {
+! system("mv /etc/X11/XF86Config /etc/X11/XF86Config.xautoconfig");
+ }
+
+! if (!(f = fopen("/etc/X11/XF86Config", "w"))) {
+! fprintf(stderr, "Can't write to /etc/X11/XF86Config. Exiting.\n");
+! return -1;;
+ }
+ }
+
+-
+ /*** BEGIN XF86Config ***/
+ fprintf(f, "%s", header);
+
+ /* fontpath */
+ if (anaconda)
+--- 210,261 ----
+ if (!(f = fopen("/tmp/XF86Config.test", "w"))) {
+ fprintf(stderr, "Can't write to /tmp/XF86Config.test. Exiting.\n");
+ return -1;;
+ }
+ } else {
+!
+! /* Test to see if it's xorg or XFree86 */
+! if (XorgTest())
+! {
+! xorg = 0; /* false, using XF86Config */
+!
+! /* Let's be nice and backup an existing XF86Config */
+! if ((f = fopen("/etc/X11/XF86Config", "r")))
+! {
+! fclose(f);
+! printf("XF86Config found, moving to XF86Config.orig...\n");
+! system("mv /etc/X11/XF86Config /etc/X11/XF86Config.orig");
+! }
+!
+! if (!(f = fopen("/etc/X11/XF86Config", "w")))
+! {
+! fprintf(stderr, "%sCan't write to /etc/X11/XF86Config. Exiting.%s\n",
+! GENTOO_RED, GENTOO_RESET);
+! return -1;
+! }
+ }
++ else
++ {
++ xorg = 1; /* true, using xorg.conf */
++
++ /* Let's be nice and backup an existing XF86Config */
++ if ((f = fopen("/etc/X11/xorg.conf", "r")))
++ {
++ fclose(f);
++ printf("xorg.conf found, moving to xorg.conf.orig...\n");
++ system("mv /etc/X11/xorg.conf /etc/X11/xorg.conf.orig");
++ }
+
+! if (!(f = fopen("/etc/X11/xorg.conf", "w")))
+! {
+! fprintf(stderr, "%sCan't write to /etc/X11/xorg.conf. Exiting.%s\n",
+! GENTOO_RED, GENTOO_RESET);
+! return -1;
+! }
+ }
+ }
+
+ /*** BEGIN XF86Config ***/
+ fprintf(f, "%s", header);
+
+ /* fontpath */
+ if (anaconda)
+***************
+*** 400,408 ****
+ fclose(f);
+
+ if (anaconda)
+ fprintf(stdout, "Wrote /tmp/XF86Config.test\n");
+ else
+! fprintf(stdout, "Wrote /etc/X11/XF86Config\n");
+!
+ return 0;
+ }
+--- 453,480 ----
+ fclose(f);
+
+ if (anaconda)
+ fprintf(stdout, "Wrote /tmp/XF86Config.test\n");
+ else
+! {
+! if (xorg)
+! fprintf(stdout, "Wrote /etc/X11/xorg.conf %s\n", GENTOO_RESET);
+! else
+! fprintf(stdout, "Wrote /etc/X11/XF86Config %s\n", GENTOO_RESET);
+! }
+!
+ return 0;
+ }
++
++ /**
++ * @return char true if running X.org, false XFree86
++ */
++ char XorgTest(void)
++ {
++ FILE *f;
++
++ if (!(f = fopen("/usr/X11R6/bin/Xorg", "r")))
++ return -1;
++ else
++ return 0;
++ }
++
diff --git a/x11-misc/Xautoconfig/files/digest-Xautoconfig-0.15 b/x11-misc/Xautoconfig/files/digest-Xautoconfig-0.15
deleted file mode 100644
index c58eade43fbc..000000000000
--- a/x11-misc/Xautoconfig/files/digest-Xautoconfig-0.15
+++ /dev/null
@@ -1 +0,0 @@
-MD5 6daf5bb2fc1d7bc378e9686399b1c259 Xautoconfig-0.15.tar.gz 18739