diff options
author | Koen Kooi <koen@openembedded.org> | 2007-08-02 07:15:30 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2007-08-02 07:15:30 +0000 |
commit | b3e110eff605bd2361ea92bd748f59e48d508f33 (patch) | |
tree | 585a741d28885236452581e718ba458c6fd02c3d /packages/xorg-xserver | |
parent | 81ded5cd087778af9e1a13e7a207b55b5448e07b (diff) |
xorg mega commit: merge in change from poky
Diffstat (limited to 'packages/xorg-xserver')
15 files changed, 870 insertions, 62 deletions
diff --git a/packages/xorg-xserver/xorg-xserver-common.inc b/packages/xorg-xserver/xorg-xserver-common.inc index 7bcd483c24..b45f3eeac6 100644 --- a/packages/xorg-xserver/xorg-xserver-common.inc +++ b/packages/xorg-xserver/xorg-xserver-common.inc @@ -2,54 +2,34 @@ HOMEPAGE = "http://www.x.org" SECTION = "x11/base" LICENSE = "MIT-X" -RPROVIDES_${PN} = "virtual/xserver" PROVIDES = "virtual/xserver" -MESA_VER ?= "6.5" - -DEPENDS = "fontconfig freetype flex-native lbxutil kbproto \ -xf86driproto libdrm glproto randrproto renderproto fixesproto damageproto \ +DEPENDS = "fontconfig freetype flex-native lbxutil kbproto \ +xf86driproto drm glproto randrproto renderproto fixesproto damageproto \ xcmiscproto xextproto xproto xf86miscproto xf86vidmodeproto xf86bigfontproto \ scrnsaverproto bigreqsproto resourceproto fontsproto inputproto \ xf86dgaproto videoproto compositeproto trapproto recordproto dmxproto \ resourceproto xineramaproto xtrans evieext libxkbfile libxfont libxau \ libfontenc libxdmcp libxxf86vm libxaw libxmu libxt libxpm libxext libx11 \ -libxkbui libxxf86misc libxi libdmx libxtst libxres mesa mkfontscale-native" +libxkbui libxxf86misc libxi libdmx libxtst libxres mesa" -RDEPENDS_${PN} = "rgb" +REPENDS="rgb" XORG_PN = "xorg-server" -XORG_RELEASE = "${@["individual",bb.data.getVar('PV', d, 1)[0:7]+"/src"][bb.data.getVar('PV', d, 1)[0:4] == "X11R"]}" -SRC_URI = "${XORG_MIRROR}/${XORG_RELEASE}/xserver/${XORG_PN}-${PV}.tar.bz2 \ - ${SOURCEFORGE_MIRROR}/mesa3d/MesaLib-${MESA_VER}.tar.bz2 \ +SRC_URI = "${XORG_MIRROR}/${@bb.data.getVar('PV', d, 1)[0:7]}/src/xserver/${XORG_PN}-${PV}.tar.gz \ file://xorg.conf" S = "${WORKDIR}/${XORG_PN}-${PV}" inherit autotools pkgconfig -EXTRA_OECONF = "--disable-builddocs --with-mesa-source=${WORKDIR}/Mesa-${MESA_VER}" - -PACKAGES =+ "${PN}-xprint ${PN}-xvfb ${PN}-utils ${PN}-xnest ${PN}-dmx" +PACKAGES =+ "${PN}-xprint ${PN}-xvfb ${PN}-utils" -FILES_${PN}-xprint = "${libdir}/X11/xserver/*/print ${bindir}/Xprt" +FILES_${PN}-xprint = "${libdir}/X11/xserver/*/print" FILES_${PN}-xvfb = "${bindir}/Xvfb" -FILES_${PN}-xnest = "${bindir}/Xnest" -FILES_${PN}-dmx = "${bindir}/Xdmx ${bindir}/dmx* ${bindir}/xdmxconfig ${bindir}/xdmx ${bindir}/vdltodmx" FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl" -FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/xserver/SecurityPolicy ${libdir}/xorg/modules/*.so ${libdir}/xorg/modules/*/*.so /etc/X11" +FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/xserver/SecurityPolicy ${libdir}/modules ${libdir}/xorg/modules /etc/X11 " FILES_${PN}-doc += "${libdir}/X11/doc /usr/share/X11/xkb/compiled/README.compiled" -FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug ${libdir}/xorg/modules/*/.debug" -FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la" - -PACKAGES =+ "${PN}-multimedia ${PN}-configtools" - -FILES_${PN}-multimedia = "${libdir}/xorg/modules/multimedia/*.so" -FILES_${PN}-configtools = "${bindir}/xorgconfig ${bindir}/xorgcfg" - -do_configure_prepend() { - sed -i -e s:/usr/include/drm:${STAGING_INCDIR}/drm:g hw/xfree86/os-support/linux/Makefile.am -} do_stage() { autotools_stage_all @@ -57,5 +37,5 @@ do_stage() { do_install_append () { install -d ${D}/etc/X11 - install -m 0644 ${WORKDIR}/xorg.conf ${D}/etc/X11/ + install -m0644 ${WORKDIR}/xorg.conf ${D}/etc/X11/ } diff --git a/packages/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch new file mode 100644 index 0000000000..e0cca5428b --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/xcalibrate_coords.patch @@ -0,0 +1,122 @@ +--- + Xext/xcalibrate.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- + hw/kdrive/src/kdrive.h | 3 +++ + hw/kdrive/src/kinput.c | 12 ++++++++++++ + 3 files changed, 61 insertions(+), 1 deletion(-) + +Index: xorg-server-1.3.0.0/Xext/xcalibrate.c +=================================================================== +--- xorg-server-1.3.0.0.orig/Xext/xcalibrate.c 2007-06-29 17:30:03.000000000 +0100 ++++ xorg-server-1.3.0.0/Xext/xcalibrate.c 2007-06-30 14:04:40.000000000 +0100 +@@ -166,7 +166,6 @@ ProcXCalibrateSetRawMode (ClientPtr clie + return (client->noClientException); + } + +- + static int + SProcXCalibrateSetRawMode (ClientPtr client) + { +@@ -180,6 +179,47 @@ SProcXCalibrateSetRawMode (ClientPtr cli + return ProcXCalibrateSetRawMode(client); + } + ++static int ++ProcXCalibrateScreenToCoord (ClientPtr client) ++{ ++ REQUEST(xXCalibrateScreenToCoordReq); ++ xXCalibrateScreenToCoordReply rep; ++ ++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); ++ ++ memset (&rep, 0, sizeof (rep)); ++ rep.type = X_Reply; ++ rep.sequenceNumber = client->sequence; ++ rep.x = stuff->x; ++ rep.y = stuff->y; ++ ++ KdScreenToMouseCoords(&rep.x, &rep.y); ++ ++ if (client->swapped) ++ { ++ int n; ++ ++ swaps (&rep.x, n); ++ swaps (&rep.y, n); ++ } ++ WriteToClient(client, sizeof (rep), (char *) &rep); ++ return (client->noClientException); ++} ++ ++static int ++SProcXCalibrateScreenToCoord (ClientPtr client) ++{ ++ REQUEST(xXCalibrateScreenToCoordReq); ++ int n; ++ ++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); ++ ++ swaps(&stuff->x, n); ++ swaps(&stuff->y, n); ++ ++ return ProcXCalibrateScreenToCoord(client); ++} ++ + static void + XCalibrateResetProc (ExtensionEntry *extEntry) + { +@@ -194,6 +234,9 @@ ProcXCalibrateDispatch (ClientPtr client + return ProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return ProcXCalibrateSetRawMode(client); ++ case X_XCalibrateScreenToCoord: ++ return ProcXCalibrateScreenToCoord(client); ++ + default: break; + } + +@@ -213,6 +256,8 @@ SProcXCalibrateDispatch (ClientPtr clien + return SProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return SProcXCalibrateSetRawMode(client); ++ case X_XCalibrateScreenToCoord: ++ return SProcXCalibrateScreenToCoord(client); + + default: break; + } +Index: xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h +=================================================================== +--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kdrive.h 2007-06-30 13:43:45.000000000 +0100 ++++ xorg-server-1.3.0.0/hw/kdrive/src/kdrive.h 2007-06-30 13:45:03.000000000 +0100 +@@ -746,6 +746,9 @@ void + KdSetMouseMatrix (KdMouseMatrix *matrix); + + void ++KdScreenToMouseCoords (int *x, int *y); ++ ++void + KdComputeMouseMatrix (KdMouseMatrix *matrix, Rotation randr, int width, int height); + + void +Index: xorg-server-1.3.0.0/hw/kdrive/src/kinput.c +=================================================================== +--- xorg-server-1.3.0.0.orig/hw/kdrive/src/kinput.c 2007-06-29 17:30:16.000000000 +0100 ++++ xorg-server-1.3.0.0/hw/kdrive/src/kinput.c 2007-06-30 15:52:16.000000000 +0100 +@@ -381,6 +381,18 @@ KdSetMouseMatrix (KdMouseMatrix *matrix) + } + + void ++KdScreenToMouseCoords (int *x, int *y) ++{ ++ int (*m)[3] = kdMouseMatrix.matrix; ++ int div = m[0][1] * m[1][0] - m[1][1] * m[0][0]; ++ int sx = *x; ++ int sy = *y; ++ ++ *x = (m[0][1] * sy - m[0][1] * m[1][2] + m[1][1] * m[0][2] - m[1][1] * sx) / div; ++ *y = (m[1][0] * sx + m[0][0] * m[1][2] - m[1][0] * m[0][2] - m[0][0] * sy) / div; ++} ++ ++void + KdComputeMouseMatrix (KdMouseMatrix *m, Rotation randr, int width, int height) + { + int x_dir = 1, y_dir = 1; diff --git a/packages/xorg-xserver/xserver-kdrive-common.inc b/packages/xorg-xserver/xserver-kdrive-common.inc index 02df9d2d4e..e46abe3fe8 100644 --- a/packages/xorg-xserver/xserver-kdrive-common.inc +++ b/packages/xorg-xserver/xserver-kdrive-common.inc @@ -1,9 +1,8 @@ LICENSE = "MIT" -DEPENDS = "compositeproto damageproto fixesproto recordproto resourceproto scrnsaverproto videoproto xextproto xproto \ - libxau libxext libxdmcp libxfont libxrandr tslib virtual/libsdl virtual/libx11 xtrans" +DEPENDS = "compositeproto damageproto fixesproto recordproto resourceproto scrnsaverproto xineramaproto videoproto xextproto xproto \ + libxau libxext libxdmcp libxfont libxrandr tslib virtual/libx11 xtrans" PROVIDES = "virtual/xserver" -RPROVIDES = "virtual/xserver" PACKAGES =+ "xserver-kdrive-fbdev \ xserver-kdrive-sdl \ xserver-kdrive-fake \ @@ -106,7 +105,9 @@ KDRIVE_COMMON_PATCHES = " \ SRC_URI_append_mnci = " file://onlyfb.patch;patch=1" SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1" -PACKAGE_ARCH_poodle = "poodle" +SRC_URI_append_qemux86 = " file://xserver-kdrive-poodle.patch;patch=1" +PACKAGE_ARCH_poodle = "${MACHINE_ARCH}" +PACKAGE_ARCH_qemux86 = "${MACHINE_ARCH}" inherit autotools pkgconfig @@ -118,7 +119,11 @@ EXTRA_OECONF = "--enable-composite --enable-kdrive \ --disable-xorg --disable-xorgcfg \ --disable-xkb --disable-xnest --disable-xvfb \ --disable-xevie --disable-xprint --disable-xtrap \ - --disable-dmx ${W100_OECONF} ${IMAGEON_OECONF} \ + --disable-dmx \ --with-default-font-path=built-ins \ --enable-tslib --enable-xcalibrate \ ac_cv_file__usr_share_X11_sgml_defs_ent=no" + +do_configure_prepend() { + sed -i -e 's/tslib-0.0/tslib-1.0/' ${S}/configure.ac +} diff --git a/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch b/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch index df5bbe2abf..c5997c2ffa 100644 --- a/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch +++ b/packages/xorg-xserver/xserver-kdrive-xomap/calibrateext.patch @@ -5,19 +5,6 @@ 2 files changed, 39 insertions(+), 31 deletions(-) -Index: xorg-server-1.1.99.3/configure.ac -=================================================================== ---- xorg-server-1.1.99.3.orig/configure.ac 2007-01-30 00:22:41.000000000 +0000 -+++ xorg-server-1.1.99.3/configure.ac 2007-01-30 00:22:41.000000000 +0000 -@@ -717,7 +717,7 @@ fi - - if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then - AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) -- REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" -+ REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateext" - else - XCALIBRATE=no - fi Index: xorg-server-1.1.99.3/hw/kdrive/linux/tslib.c =================================================================== --- xorg-server-1.1.99.3.orig/hw/kdrive/linux/tslib.c 2007-01-30 00:44:13.000000000 +0000 diff --git a/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch b/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch new file mode 100644 index 0000000000..fbe89b16b1 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-xomap/xcalibrate_coords.patch @@ -0,0 +1,122 @@ +--- + Xext/xcalibrate.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- + hw/kdrive/src/kdrive.h | 3 +++ + hw/kdrive/src/kinput.c | 12 ++++++++++++ + 3 files changed, 61 insertions(+), 1 deletion(-) + +Index: xorg-server-1.1.99.3/Xext/xcalibrate.c +=================================================================== +--- xorg-server-1.1.99.3.orig/Xext/xcalibrate.c 2007-06-30 16:27:13.000000000 +0100 ++++ xorg-server-1.1.99.3/Xext/xcalibrate.c 2007-06-30 16:27:15.000000000 +0100 +@@ -166,7 +166,6 @@ ProcXCalibrateSetRawMode (ClientPtr clie + return (client->noClientException); + } + +- + static int + SProcXCalibrateSetRawMode (ClientPtr client) + { +@@ -180,6 +179,47 @@ SProcXCalibrateSetRawMode (ClientPtr cli + return ProcXCalibrateSetRawMode(client); + } + ++static int ++ProcXCalibrateScreenToCoord (ClientPtr client) ++{ ++ REQUEST(xXCalibrateScreenToCoordReq); ++ xXCalibrateScreenToCoordReply rep; ++ ++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); ++ ++ memset (&rep, 0, sizeof (rep)); ++ rep.type = X_Reply; ++ rep.sequenceNumber = client->sequence; ++ rep.x = stuff->x; ++ rep.y = stuff->y; ++ ++ KdScreenToMouseCoords(&rep.x, &rep.y); ++ ++ if (client->swapped) ++ { ++ int n; ++ ++ swaps (&rep.x, n); ++ swaps (&rep.y, n); ++ } ++ WriteToClient(client, sizeof (rep), (char *) &rep); ++ return (client->noClientException); ++} ++ ++static int ++SProcXCalibrateScreenToCoord (ClientPtr client) ++{ ++ REQUEST(xXCalibrateScreenToCoordReq); ++ int n; ++ ++ REQUEST_SIZE_MATCH (xXCalibrateScreenToCoordReq); ++ ++ swaps(&stuff->x, n); ++ swaps(&stuff->y, n); ++ ++ return ProcXCalibrateScreenToCoord(client); ++} ++ + static void + XCalibrateResetProc (ExtensionEntry *extEntry) + { +@@ -194,6 +234,9 @@ ProcXCalibrateDispatch (ClientPtr client + return ProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return ProcXCalibrateSetRawMode(client); ++ case X_XCalibrateScreenToCoord: ++ return ProcXCalibrateScreenToCoord(client); ++ + default: break; + } + +@@ -213,6 +256,8 @@ SProcXCalibrateDispatch (ClientPtr clien + return SProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return SProcXCalibrateSetRawMode(client); ++ case X_XCalibrateScreenToCoord: ++ return SProcXCalibrateScreenToCoord(client); + + default: break; + } +Index: xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h +=================================================================== +--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kdrive.h 2007-06-30 16:27:13.000000000 +0100 ++++ xorg-server-1.1.99.3/hw/kdrive/src/kdrive.h 2007-06-30 16:30:40.000000000 +0100 +@@ -851,6 +851,9 @@ void + KdSetPointerMatrix (KdPointerMatrix *pointer); + + void ++KdScreenToMouseCoords (int *x, int *y); ++ ++void + KdComputePointerMatrix (KdPointerMatrix *pointer, Rotation randr, int width, int height); + + void +Index: xorg-server-1.1.99.3/hw/kdrive/src/kinput.c +=================================================================== +--- xorg-server-1.1.99.3.orig/hw/kdrive/src/kinput.c 2007-06-30 16:27:14.000000000 +0100 ++++ xorg-server-1.1.99.3/hw/kdrive/src/kinput.c 2007-06-30 16:30:16.000000000 +0100 +@@ -570,6 +570,18 @@ KdSetPointerMatrix (KdPointerMatrix *mat + } + + void ++KdScreenToMouseCoords (int *x, int *y) ++{ ++ int (*m)[3] = kdPointerMatrix.matrix; ++ int div = m[0][1] * m[1][0] - m[1][1] * m[0][0]; ++ int sx = *x; ++ int sy = *y; ++ ++ *x = (m[0][1] * sy - m[0][1] * m[1][2] + m[1][1] * m[0][2] - m[1][1] * sx) / div; ++ *y = (m[1][0] * sx + m[0][0] * m[1][2] - m[1][0] * m[0][2] - m[0][0] * sy) / div; ++} ++ ++void + KdComputePointerMatrix (KdPointerMatrix *m, Rotation randr, int width, + int height) + { diff --git a/packages/xorg-xserver/xserver-kdrive-xomap_1.1.99.3.bb b/packages/xorg-xserver/xserver-kdrive-xomap_1.1.99.3.bb new file mode 100644 index 0000000000..372971e2ed --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive-xomap_1.1.99.3.bb @@ -0,0 +1,51 @@ +LICENSE = "MIT" +DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto xpext xsp libxkbfile dbus" + +PROVIDES = "virtual/xserver" +PACKAGES =+ "xserver-kdrive-xomap" +SECTION = "x11/base" +DESCRIPTION = "X server from freedesktop.org" +DESCRIPTION_xserver-kdrive-xomap = "X server for the OMAP in the Nokia 800" + +PE = "1" + +COMPATIBLE_MACHINE = "nokia(800|770)" + +FILES_${PN} = "${libdir}/xserver /etc/dbus-1/* ${bindir}/Xomap" + +SRC_URI = "http://repository.maemo.org/pool/maemo3.1/free/source/xorg-server_1.1.99.3-0osso31.tar.gz \ + file://kmode.patch;patch=1 \ + file://disable-apm.patch;patch=1 \ + file://no-serial-probing.patch;patch=1 \ + file://fbdev-not-fix.patch;patch=1 \ + file://enable-builtin-fonts.patch;patch=1 \ + file://xcalibrate.patch;patch=1 \ + file://fixups.patch;patch=1 \ + file://button_only.patch;patch=1 \ + file://calibrateext.patch;patch=1 \ + file://xcalibrate_coords.patch;patch=1" +# file://kdrive-evdev.patch;patch=1 \ +# file://kdrive-use-evdev.patch;patch=1 \ +# file://optional-xkb.patch;patch=1 \ +# file://disable-xf86-dga-xorgcfg.patch;patch=1 \ +# file://enable-tslib.patch;patch=1 \ +# file://xfbdev-fb-opt.patch;patch=1" + +S = "${WORKDIR}/xorg-server-1.1.99.3" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-composite --enable-kdrive --enable-builtin-fonts \ + --disable-dga --disable-dri --disable-xinerama \ + --disable-xf86misc --disable-xf86vidmode \ + --disable-xorg --disable-xorgcfg \ + --disable-dmx --enable-xcalibrate \ + --disable-xkb --disable-xnest --disable-xvfb \ + --disable-xevie --disable-xprint --disable-xtrap \ + --with-default-font-path=built-ins \ + ac_cv_file__usr_share_X11_sgml_defs_ent=no \ + --enable-xomap" + +do_configure_prepend() { + sed -i -e 's/tslib-0.0/tslib-1.0/' ${S}/configure.ac +} diff --git a/packages/xorg-xserver/xserver-kdrive/devfs.patch b/packages/xorg-xserver/xserver-kdrive/devfs.patch new file mode 100644 index 0000000000..a6238126c0 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive/devfs.patch @@ -0,0 +1,47 @@ + +# +# Patch managed by http://www.holgerschurig.de/patcher.html +# + +--- xserver/hw/kdrive/linux/linux.c~devfs ++++ xserver/hw/kdrive/linux/linux.c +@@ -82,10 +82,10 @@ + vtno = kdVirtualTerminal; + else + { +- if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0) ++ if ((fd = open("/dev/vc/0",O_WRONLY,0)) < 0) + { + FatalError( +- "LinuxInit: Cannot open /dev/tty0 (%s)\n", ++ "LinuxInit: Cannot open /dev/tty/0 (%s)\n", + strerror(errno)); + } + if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) || +@@ -96,7 +96,7 @@ + } + close(fd); + +- sprintf(vtname,"/dev/tty%d",vtno); /* /dev/tty1-64 */ ++ sprintf(vtname,"/dev/vc/%d",vtno); /* /dev/tty1-64 */ + + if ((LinuxConsoleFd = open(vtname, O_RDWR|O_NDELAY, 0)) < 0) + { +@@ -113,7 +113,7 @@ + * + * Why is this needed? + */ +- LinuxCheckChown ("/dev/tty0"); ++ LinuxCheckChown ("/dev/vc/0"); + /* + * Linux doesn't switch to an active vt after the last close of a vt, + * so we do this ourselves by remembering which is active now. +@@ -453,7 +453,7 @@ + activeVT = -1; + } + close(LinuxConsoleFd); /* make the vt-manager happy */ +- fd = open ("/dev/tty0", O_RDWR|O_NDELAY, 0); ++ fd = open ("/dev/vc/0", O_RDWR|O_NDELAY, 0); + if (fd >= 0) + { + memset (&vts, '\0', sizeof (vts)); /* valgrind */ diff --git a/packages/xorg-xserver/xserver-kdrive/hide-cursor-and-ppm-root.patch b/packages/xorg-xserver/xserver-kdrive/hide-cursor-and-ppm-root.patch new file mode 100644 index 0000000000..c160cd41dc --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive/hide-cursor-and-ppm-root.patch @@ -0,0 +1,307 @@ +diff -u -r xorg-server-X11R7.1-1.1.0.orig/dix/window.c xorg-server-X11R7.1-1.1.0/dix/window.c +--- xorg-server-X11R7.1-1.1.0.orig/dix/window.c 2007-01-08 14:30:38.000000000 +0000 ++++ xorg-server-X11R7.1-1.1.0/dix/window.c 2007-01-16 17:16:19.000000000 +0000 +@@ -185,6 +185,8 @@ + _X_EXPORT int numSaveUndersViewable = 0; + _X_EXPORT int deltaSaveUndersViewable = 0; + ++char* RootPPM = NULL; ++ + #ifdef DEBUG + /****** + * PrintWindowTree +@@ -311,6 +313,115 @@ + #endif + } + ++static int ++get_int(FILE *fp) ++{ ++ int c = 0; ++ ++ while ((c = getc(fp)) != EOF) ++ { ++ if (isspace(c)) ++ continue; ++ ++ if (c == '#') ++ while (c = getc(fp)) ++ if (c == EOF) ++ return 0; ++ else if (c == '\n') ++ break; ++ ++ if (isdigit(c)) ++ { ++ int val = c - '0'; ++ while ((c = getc(fp)) && isdigit(c)) ++ val = (val * 10) + (c - '0'); ++ return val; ++ } ++ } ++ ++ return 0; ++} ++ ++static unsigned char* ++ppm_load (const char* path, int depth, int *width, int *height) ++{ ++ FILE *fp; ++ int max, n = 0, w, h, i, j, bytes_per_line; ++ unsigned char *data, *res, h1, h2; ++ ++ if (depth < 16 || depth > 32) ++ return NULL; ++ ++ if (depth > 16) ++ depth = 32; ++ ++ fp = fopen (path, "r"); ++ if (fp == NULL) ++ return FALSE; ++ ++ h1 = getc(fp); ++ h2 = getc(fp); ++ ++ /* magic is 'P6' for raw ppm */ ++ if (h1 != 'P' && h2 != '6') ++ goto fail; ++ ++ w = get_int(fp); ++ h = get_int(fp); ++ ++ if (w == 0 || h == 0) ++ goto fail; ++ ++ max = get_int(fp); ++ ++ if (max != 255) ++ goto fail; ++ ++ bytes_per_line = ((w * depth + 31) >> 5) << 2; ++ ++ res = data = malloc(bytes_per_line * h); ++ ++ for (i=0; i<h; i++) ++ { ++ for (j=0; j<w; j++) ++ { ++ unsigned char buf[3]; ++ fread(buf, 1, 3, fp); ++ ++ switch (depth) ++ { ++ case 24: ++ case 32: ++ *data = buf[2]; ++ *(data+1) = buf[1]; ++ *(data+2) = buf[0]; ++ data += 4; ++ break; ++ case 16: ++ default: ++ *(unsigned short*)data ++ = ((buf[0] >> 3) << 11) | ((buf[1] >> 2) << 5) | (buf[2] >> 3); ++ data += 2; ++ break; ++ } ++ } ++ data += (bytes_per_line - (w*(depth>>3))); ++ } ++ ++ data = res; ++ ++ *width = w; ++ *height = h; ++ ++ fclose(fp); ++ ++ return res; ++ ++ fail: ++ fclose(fp); ++ return NULL; ++} ++ + static void + MakeRootTile(WindowPtr pWin) + { +@@ -321,6 +432,36 @@ + register unsigned char *from, *to; + register int i, j; + ++ if (RootPPM != NULL) ++ { ++ int w, h; ++ unsigned char *data; ++ ++ if ((data = ppm_load (RootPPM, pScreen->rootDepth, &w, &h)) != NULL) ++ { ++ pWin->background.pixmap ++ = (*pScreen->CreatePixmap)(pScreen, w, h, pScreen->rootDepth); ++ ++ pWin->backgroundState = BackgroundPixmap; ++ pGC = GetScratchGC(pScreen->rootDepth, pScreen); ++ if (!pWin->background.pixmap || !pGC) ++ FatalError("could not create root tile"); ++ ++ ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); ++ ++ (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, ++ pGC, ++ pScreen->rootDepth, ++ 0, 0, w, h, 0, ZPixmap, (char *)data); ++ FreeScratchGC(pGC); ++ ++ free(data); ++ return; ++ } ++ else ++ ErrorF("Unable to load root window image."); ++ } ++ + pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, + pScreen->rootDepth); + +@@ -357,6 +498,7 @@ + + } + ++ + WindowPtr + AllocateWindow(ScreenPtr pScreen) + { +diff -u -r xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c +--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/src/kdrive.c 2007-01-08 14:30:38.000000000 +0000 ++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/src/kdrive.c 2007-01-15 17:53:06.000000000 +0000 +@@ -58,6 +58,9 @@ + { 32, 32 } + }; + ++int ++ProcXFixesHideCursor (ClientPtr client) ; ++ + #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0])) + + int kdScreenPrivateIndex; +@@ -84,6 +87,9 @@ + KdOsFuncs *kdOsFuncs; + extern WindowPtr *WindowTable; + ++extern Bool CursorInitiallyHidden; /* See Xfixes cursor.c */ ++extern char* RootPPM; /* dix/window.c */ ++ + void + KdSetRootClip (ScreenPtr pScreen, BOOL enable) + { +@@ -312,6 +318,7 @@ + KdSetRootClip (pScreen, TRUE); + if (pScreenPriv->card->cfuncs->dpms) + (*pScreenPriv->card->cfuncs->dpms) (pScreen, pScreenPriv->dpmsState); ++ + return TRUE; + } + +@@ -686,10 +693,14 @@ + ErrorF("-mouse path[,n] Filename of mouse device, n is number of buttons\n"); + ErrorF("-switchCmd Command to execute on vt switch\n"); + ErrorF("-nozap Don't terminate server on Ctrl+Alt+Backspace\n"); ++ ErrorF("-hide-cursor Start with cursor hidden\n"); ++ ErrorF("-root-ppm [path] Specify ppm file to use as root window background.\n"); + ErrorF("vtxx Use virtual terminal xx instead of the next available\n"); + #ifdef PSEUDO8 + p8UseMsg (); + #endif ++ ++ + } + + int +@@ -761,6 +772,19 @@ + kdSoftCursor = TRUE; + return 1; + } ++ if (!strcmp (argv[i], "-hide-cursor")) ++ { ++ CursorInitiallyHidden = TRUE; ++ return 1; ++ } ++ if (!strcmp (argv[i], "-root-ppm")) ++ { ++ if ((i+1) < argc) ++ RootPPM = argv[i+1]; ++ else ++ UseMsg (); ++ return 2; ++ } + if (!strcmp (argv[i], "-videoTest")) + { + kdVideoTest = TRUE; +diff -u -r xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c xorg-server-X11R7.1-1.1.0/xfixes/cursor.c +--- xorg-server-X11R7.1-1.1.0.orig/xfixes/cursor.c 2007-01-08 14:30:38.000000000 +0000 ++++ xorg-server-X11R7.1-1.1.0/xfixes/cursor.c 2007-01-11 16:33:00.000000000 +0000 +@@ -59,9 +59,12 @@ + static RESTYPE CursorWindowType; + static int CursorScreenPrivateIndex = -1; + static int CursorGeneration; ++static Bool CursorGloballyHidden; + static CursorPtr CursorCurrent; + static CursorPtr pInvisibleCursor = NULL; + ++Bool CursorInitiallyHidden = FALSE; ++ + static void deleteCursorHideCountsForScreen (ScreenPtr pScreen); + + #define VERIFY_CURSOR(pCursor, cursor, client, access) { \ +@@ -130,7 +133,7 @@ + + Unwrap (cs, pScreen, DisplayCursor); + +- if (cs->pCursorHideCounts != NULL) { ++ if (cs->pCursorHideCounts != NULL || CursorGloballyHidden) { + ret = (*pScreen->DisplayCursor) (pScreen, pInvisibleCursor); + } else { + ret = (*pScreen->DisplayCursor) (pScreen, pCursor); +@@ -848,6 +851,12 @@ + return BadWindow; + } + ++ /* Is cursor set to be initially hidden ?, if so reset this ++ * flag as now visibility assumed under control of client. ++ */ ++ if (CursorGloballyHidden) ++ CursorGloballyHidden = FALSE; ++ + /* + * Has client hidden the cursor before on this screen? + * If so, just increment the count. +@@ -899,9 +908,19 @@ + return BadWindow; + } + ++ /* X was started with cursor hidden, therefore just reset our flag ++ * (returning to normal client control) and cause cursor to now be ++ * shown. ++ */ ++ if (CursorGloballyHidden == TRUE) ++ { ++ CursorGloballyHidden = FALSE; ++ return (client->noClientException); ++ } ++ + /* + * Has client hidden the cursor on this screen? +- * If not, generate an error. ++ * If so, generate an error. + */ + pChc = findCursorHideCount(client, pWin->drawable.pScreen); + if (pChc == NULL) { +@@ -1009,6 +1028,8 @@ + XFixesCursorInit (void) + { + int i; ++ ++ CursorGloballyHidden = CursorInitiallyHidden; + + if (CursorGeneration != serverGeneration) + { diff --git a/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch b/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch new file mode 100644 index 0000000000..a8f002ea2a --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive/xfbdev-fb-opt.patch @@ -0,0 +1,82 @@ +--- + hw/kdrive/fbdev/fbdev.c | 17 ++++++++++++----- + hw/kdrive/fbdev/fbdev.h | 1 + + hw/kdrive/fbdev/fbinit.c | 20 ++++++++++++++++---- + 3 files changed, 29 insertions(+), 9 deletions(-) + +--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.c ++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.c +@@ -33,16 +33,23 @@ + + extern int KdTsPhyScreen; + ++char *fbdevDevicePath = NULL; + Bool + fbdevInitialize (KdCardInfo *card, FbdevPriv *priv) + { + int k; + unsigned long off; +- if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \ +- (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) { +- perror("Error opening /dev/fb0"); +- return FALSE; +- } ++ ++ if (fbdevDevicePath == NULL) ++ fbdevDevicePath = "/dev/fb0"; ++ ++ if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0) ++ { ++ ErrorF("Error opening framebuffer %s: %s\n", ++ fbdevDevicePath, strerror(errno)); ++ return FALSE; ++ } ++ + /* quiet valgrind */ + memset (&priv->fix, '\0', sizeof (priv->fix)); + if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) { +--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbdev.h ++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbdev.h +@@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv { + } FbdevScrPriv; + + extern KdCardFuncs fbdevFuncs; ++extern char* fbdevDevicePath; + + Bool + fbdevInitialize (KdCardInfo *card, FbdevPriv *priv); +--- xorg-server-X11R7.1-1.1.0.orig/hw/kdrive/fbdev/fbinit.c ++++ xorg-server-X11R7.1-1.1.0/hw/kdrive/fbdev/fbinit.c +@@ -59,16 +59,28 @@ InitInput (int argc, char **argv) + void + ddxUseMsg (void) + { +- KdUseMsg(); ++ KdUseMsg(); ++ ErrorF("\nXfbdev Device Usage:\n"); ++ ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n"); ++ ErrorF("\n"); + } + + int + ddxProcessArgument (int argc, char **argv, int i) + { +- return KdProcessArgument (argc, argv, i); +-} +- ++ if (!strcmp (argv[i], "-fb")) ++ { ++ if (i+1 < argc) ++ { ++ fbdevDevicePath = argv[i+1]; ++ return 2; ++ } ++ UseMsg(); ++ exit(1); ++ } + ++ return KdProcessArgument (argc, argv, i); ++} + + KdCardFuncs fbdevFuncs = { + fbdevCardInit, /* cardinit */ diff --git a/packages/xorg-xserver/xserver-kdrive_1.1.0.bb b/packages/xorg-xserver/xserver-kdrive_1.1.0.bb new file mode 100644 index 0000000000..bd54518105 --- /dev/null +++ b/packages/xorg-xserver/xserver-kdrive_1.1.0.bb @@ -0,0 +1,60 @@ +LICENSE = "MIT" +DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto" + +PROVIDES = "virtual/xserver" +# RPROVIDES = "virtual/xserver" +PACKAGES =+ "xserver-kdrive-fbdev xserver-kdrive-fake xserver-kdrive-xephyr" +SECTION = "x11/base" +DESCRIPTION = "X server from freedesktop.org" +DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices" +DESCRIPTION_xserver-kdrive-fake = "Fake X server" +DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window" + +PE = "1" + +FILES_${PN} = "${libdir}/xserver" +FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev" +FILES_xserver-kdrive-fake = "${bindir}/Xfake" +FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr" + +RDEPENDS_xserver-kdrive-fbdev = "${PN}" +RDEPENDS_xserver-kdrive-fake = "${PN}" +RDEPENDS_xserver-kdrive-xephyr = "${PN}" + +SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-1.1.0.tar.bz2 \ + file://kmode.patch;patch=1 \ + file://disable-apm.patch;patch=1 \ + file://no-serial-probing.patch;patch=1 \ + file://kdrive-evdev.patch;patch=1 \ + file://kdrive-use-evdev.patch;patch=1 \ + file://fbdev-not-fix.patch;patch=1 \ + file://enable-builtin-fonts.patch;patch=1 \ + file://optional-xkb.patch;patch=1 \ + file://disable-xf86-dga-xorgcfg.patch;patch=1 \ + file://enable-tslib.patch;patch=1 \ + file://xcalibrate.patch;patch=1 \ + file://xfbdev-fb-opt.patch;patch=1 \ + file://hide-cursor-and-ppm-root.patch;patch=1" + +SRC_URI_append_mnci = " file://onlyfb.patch;patch=1" +SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1" +SRC_URI_append_qemux86 = " file://xserver-kdrive-poodle.patch;patch=1" +PACKAGE_ARCH_poodle = "poodle" + +S = "${WORKDIR}/xorg-server-1.1.0" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-composite --enable-kdrive \ + --disable-dga --disable-dri --disable-xinerama \ + --disable-xf86misc --disable-xf86vidmode \ + --disable-xorg --disable-xorgcfg \ + --disable-dmx \ + --disable-xkb --disable-xnest --disable-xvfb \ + --disable-xevie --disable-xprint --disable-xtrap \ + --with-default-font-path=built-ins \ + ac_cv_file__usr_share_X11_sgml_defs_ent=no" + +do_configure_prepend() { + sed -i -e 's/tslib-0.0/tslib-1.0/' ${S}/configure.ac +} diff --git a/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb b/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb index 8c6db70987..f1be1420dc 100644 --- a/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb +++ b/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb @@ -1,17 +1,15 @@ require xserver-kdrive-common.inc -# it's missing the xw100 patch -DEFAULT_PREFERENCE = "-1" - DEPENDS += "libxkbfile libxcalibrate" PE = "1" -PR = "r0" +PR = "r15" SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \ ${KDRIVE_COMMON_PATCHES} \ file://fix_default_mode.patch;patch=1 \ file://enable-xcalibrate.patch;patch=1 \ - file://hide-cursor-and-ppm-root.patch;patch=1" + file://hide-cursor-and-ppm-root.patch;patch=1 \ + file://xcalibrate_coords.patch;patch=1" S = "${WORKDIR}/xorg-server-${PV}" diff --git a/packages/xorg-xserver/xserver-kdrive_git.bb b/packages/xorg-xserver/xserver-kdrive_git.bb index 74d0aed432..74323cd320 100644 --- a/packages/xorg-xserver/xserver-kdrive_git.bb +++ b/packages/xorg-xserver/xserver-kdrive_git.bb @@ -1,18 +1,48 @@ +PV = "1.1.0+git${SRCDATE}" DEFAULT_PREFERENCE = "-2" -require xserver-kdrive-common.inc +LICENSE = "MIT" +DEPENDS = "tslib xproto libxdmcp xextproto xtrans libxau virtual/libx11 libxext libxrandr fixesproto damageproto libxfont resourceproto compositeproto calibrateproto recordproto videoproto scrnsaverproto" -DEPENDS += "libxkbfile libxcalibrate" +PROVIDES = "virtual/xserver" +RPROVIDES = "virtual/xserver" +PACKAGES = "xserver-kdrive-fbdev xserver-kdrive-fake xserver-kdrive-xephyr ${PN}-doc ${PN}-dev ${PN}-locale" +SECTION = "x11/base" +DESCRIPTION = "X server from freedesktop.org" +DESCRIPTION_xserver-kdrive-fbdev = "X server from freedesktop.org, supporting generic framebuffer devices" +DESCRIPTION_xserver-kdrive-fake = "Fake X server" +DESCRIPTION_xserver-kdrive-xephyr = "X server in an X window" -PE = "1" -PV = "1.2.0+git${SRCDATE}" -PR = "r8" +FILES_xserver-kdrive-fbdev = "${bindir}/Xfbdev" +FILES_xserver-kdrive-fake = "${bindir}/Xfake" +FILES_xserver-kdrive-xephyr = "${bindir}/Xephyr" SRC_URI = "git://anongit.freedesktop.org/xorg/xserver;protocol=git \ - ${KDRIVE_COMMON_PATCHES} \ - file://disable-xf86-dga-xorgcfg-1.2.patch;patch=1 \ - file://enable-epson.patch;patch=1 \ - file://build-fix-panoramix.patch;patch=1 \ - " + file://kmode.patch;patch=1 \ + file://disable-apm.patch;patch=1 \ + file://no-serial-probing.patch;patch=1 \ + file://kdrive-evdev.patch;patch=1 \ + file://kdrive-use-evdev.patch;patch=1 \ + file://fbdev-not-fix.patch;patch=1 \ + file://enable-builtin-fonts.patch;patch=1 \ + file://optional-xkb.patch;patch=1 \ +# file://disable-xf86-dga-xorgcfg.patch;patch=1 \ + file://enable-tslib.patch;patch=1" + +SRC_URI_append_mnci = " file://onlyfb.patch;patch=1" +SRC_URI_append_poodle = " file://xserver-kdrive-poodle.patch;patch=1" +PACKAGE_ARCH_poodle = "poodle" S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-composite --enable-kdrive \ + --disable-dga --disable-dri --disable-xinerama \ + --disable-xf86misc --disable-xf86vidmode \ + --disable-xorg --disable-xorgcfg \ + --disable-xkb --disable-xnest --disable-xvfb \ + --disable-xevie --disable-xprint --disable-xtrap \ + --disable-dmx \ + --with-default-font-path=built-ins \ + ac_cv_file__usr_share_X11_sgml_defs_ent=no" diff --git a/packages/xorg-xserver/xserver-xorg/no-screen-blanking.patch b/packages/xorg-xserver/xserver-xorg/no-screen-blanking.patch new file mode 100644 index 0000000000..021ba6cded --- /dev/null +++ b/packages/xorg-xserver/xserver-xorg/no-screen-blanking.patch @@ -0,0 +1,13 @@ +--- xserver/include/site.h-orig 2006-11-02 10:37:14.000000000 +0000 ++++ xserver/include/site.h 2006-11-02 10:37:14.000000000 +0000 +@@ -117,8 +117,8 @@ + #define DEFAULT_PTR_DENOMINATOR 1 + #define DEFAULT_PTR_THRESHOLD 4 + +-#define DEFAULT_SCREEN_SAVER_TIME (10 * (60 * 1000)) +-#define DEFAULT_SCREEN_SAVER_INTERVAL (10 * (60 * 1000)) ++#define DEFAULT_SCREEN_SAVER_TIME 0 ++#define DEFAULT_SCREEN_SAVER_INTERVAL 0 + #define DEFAULT_SCREEN_SAVER_BLANKING PreferBlanking + #define DEFAULT_SCREEN_SAVER_EXPOSURES AllowExposures + #ifndef NOLOGOHACK diff --git a/packages/xorg-xserver/xserver-xorg_1.2.0.bb b/packages/xorg-xserver/xserver-xorg_1.2.0.bb index 08b965bb75..78fdc01b46 100644 --- a/packages/xorg-xserver/xserver-xorg_1.2.0.bb +++ b/packages/xorg-xserver/xserver-xorg_1.2.0.bb @@ -5,6 +5,8 @@ PE = "1" EXTRA_OECONF += " ac_cv_file__usr_share_X11_sgml_defs_ent=no " +export LDFLAGS += " -ldl " + #DESCRIPTION = "" #DEPENDS += " " diff --git a/packages/xorg-xserver/xserver-xorg_1.3.0.0.bb b/packages/xorg-xserver/xserver-xorg_1.3.0.0.bb index 08b965bb75..78fdc01b46 100644 --- a/packages/xorg-xserver/xserver-xorg_1.3.0.0.bb +++ b/packages/xorg-xserver/xserver-xorg_1.3.0.0.bb @@ -5,6 +5,8 @@ PE = "1" EXTRA_OECONF += " ac_cv_file__usr_share_X11_sgml_defs_ent=no " +export LDFLAGS += " -ldl " + #DESCRIPTION = "" #DEPENDS += " " |