mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge branch 'master' of git://openelec.git.sourceforge.net/gitroot/openelec/openelec into testing
This commit is contained in:
commit
8bf4d12b74
34
config/path
34
config/path
@ -150,6 +150,23 @@ if [ -z "$PATH" -o "$PATH" = "${PATH#$ROOT/$TOOLCHAIN/bin:}" ]; then
|
||||
export PATH="$ROOT/$TOOLCHAIN/bin:$PATH"
|
||||
fi
|
||||
|
||||
if [ -f $ROOT/$TOOLCHAIN/bin/libtool ]; then
|
||||
export LIBTOOL=$ROOT/$TOOLCHAIN/bin/libtool
|
||||
export LIBTOOLIZE=$ROOT/$TOOLCHAIN/bin/libtoolize
|
||||
fi
|
||||
|
||||
if [ -f $ROOT/$TOOLCHAIN/bin/automake ]; then
|
||||
export AUTOMAKE=$ROOT/$TOOLCHAIN/bin/automake
|
||||
export ACLOCAL_DIR=$SYSROOT_PREFIX/usr/share/aclocal
|
||||
export ACLOCAL="$ROOT/$TOOLCHAIN/bin/aclocal -I $ACLOCAL_DIR"
|
||||
fi
|
||||
|
||||
if [ -f $ROOT/$TOOLCHAIN/bin/autoconf ]; then
|
||||
export AUTOCONF=$ROOT/$TOOLCHAIN/bin/autoconf
|
||||
export AUTOHEADER=$ROOT/$TOOLCHAIN/bin/autoheader
|
||||
export AUTORECONF="$ROOT/$TOOLCHAIN/bin/autoreconf -v -f -i -I $ACLOCAL_DIR"
|
||||
fi
|
||||
|
||||
setup_toolchain() {
|
||||
if [ "$1" = "--optimize" ]; then
|
||||
OPTIMIZE=yes
|
||||
@ -172,23 +189,6 @@ setup_toolchain() {
|
||||
export LDFLAGS="$TARGET_LDFLAGS"
|
||||
export PKG_CONFIG_PATH="$TARGET_PKG_CONFIG_PATH"
|
||||
|
||||
if [ -f $ROOT/$TOOLCHAIN/bin/libtool ]; then
|
||||
export LIBTOOL=$ROOT/$TOOLCHAIN/bin/libtool
|
||||
export LIBTOOLIZE=$ROOT/$TOOLCHAIN/bin/libtoolize
|
||||
fi
|
||||
|
||||
if [ -f $ROOT/$TOOLCHAIN/bin/automake ]; then
|
||||
export AUTOMAKE=$ROOT/$TOOLCHAIN/bin/automake
|
||||
export ACLOCAL_DIR=$SYSROOT_PREFIX/usr/share/aclocal
|
||||
export ACLOCAL="$ROOT/$TOOLCHAIN/bin/aclocal -I $ACLOCAL_DIR"
|
||||
fi
|
||||
|
||||
if [ -f $ROOT/$TOOLCHAIN/bin/autoconf ]; then
|
||||
export AUTOCONF=$ROOT/$TOOLCHAIN/bin/autoconf
|
||||
export AUTOHEADER=$ROOT/$TOOLCHAIN/bin/autoheader
|
||||
export AUTORECONF="$ROOT/$TOOLCHAIN/bin/autoreconf -v -f -i -I $ACLOCAL_DIR"
|
||||
fi
|
||||
|
||||
# set CMAKE configfile for target
|
||||
export CMAKE_CONF=$ROOT/$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf
|
||||
|
||||
|
@ -1 +1 @@
|
||||
http://downloads.sourceforge.net/libpng/libpng-1.4.1.tar.bz2
|
||||
http://downloads.sourceforge.net/libpng/libpng-1.4.3.tar.bz2
|
||||
|
@ -112,8 +112,8 @@ else
|
||||
fi
|
||||
|
||||
# ensure we dont use size optimization.
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Os|-O3|"`
|
||||
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-Os|-O3|"`
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Os|-O2|"`
|
||||
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-Os|-O2|"`
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
|
@ -8,15 +8,11 @@ $SCRIPTS/install make
|
||||
$SCRIPTS/install sed
|
||||
$SCRIPTS/install pkg-config
|
||||
|
||||
$SCRIPTS/build autotools
|
||||
|
||||
$SCRIPTS/build intltool
|
||||
$SCRIPTS/build gcc-final
|
||||
$SCRIPTS/install ccache toolchain
|
||||
|
||||
$SCRIPTS/build cmake
|
||||
$SCRIPTS/build yasm
|
||||
|
||||
# Tools needed to complete the toolchain
|
||||
|
||||
$SCRIPTS/build automake
|
||||
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build m4
|
||||
$SCRIPTS/build libtool
|
||||
|
||||
# build for host
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-host
|
||||
cd .objdir-host
|
||||
|
||||
EMACS="no" \
|
||||
ac_cv_path_M4=$ROOT/$TOOLCHAIN/bin/m4 \
|
||||
ac_cv_prog_gnu_m4_gnu=no \
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
cd $ROOT
|
||||
|
||||
# build for target
|
||||
setup_toolchain target
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-target
|
||||
cd .objdir-target
|
||||
|
||||
EMACS="no" \
|
||||
ac_cv_path_M4=$ROOT/$TOOLCHAIN/bin/m4 \
|
||||
ac_cv_prog_gnu_m4_gnu=no \
|
||||
../configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=$SYSROOT_PREFIX/usr \
|
||||
|
||||
make
|
||||
make install
|
@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build autoconf
|
||||
|
||||
PKG_DIR=`find $ROOT/$PACKAGES -type d -name $1`
|
||||
|
||||
# build for host
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-host
|
||||
cd .objdir-host
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
cd $ROOT
|
||||
|
||||
# build for target
|
||||
setup_toolchain target
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-target
|
||||
cd .objdir-target
|
||||
../configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=$SYSROOT_PREFIX/usr \
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
mkdir -p $SYSROOT_PREFIX/usr/share/aclocal
|
||||
cp $PKG_DIR/files/gtk-doc.m4 $SYSROOT_PREFIX/usr/share/aclocal
|
27
packages/toolchain/devel/autotools/autoconf-2.64/build
vendored
Executable file
27
packages/toolchain/devel/autotools/autoconf-2.64/build
vendored
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build m4
|
||||
$SCRIPTS/build libtool
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/$1
|
||||
EMACS="no" \
|
||||
ac_cv_path_M4=$ROOT/$TOOLCHAIN/bin/m4 \
|
||||
ac_cv_prog_gnu_m4_gnu=no \
|
||||
./configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--program-suffix="-2.64" \
|
||||
|
||||
make install \
|
||||
prefix=$ROOT/$TOOLCHAIN \
|
||||
pkgdatadir=$ROOT/$TOOLCHAIN/share/autoconf-2.64 install
|
||||
|
||||
make clean
|
||||
make install \
|
||||
prefix=$SYSROOT_PREFIX/usr \
|
||||
pkgdatadir=$SYSROOT_PREFIX/usr/share/autoconf-2.64 install
|
1
packages/toolchain/devel/autotools/autoconf-2.64/url
vendored
Normal file
1
packages/toolchain/devel/autotools/autoconf-2.64/url
vendored
Normal file
@ -0,0 +1 @@
|
||||
http://ftp.gnu.org/gnu/autoconf/autoconf-2.64.tar.bz2
|
21
packages/toolchain/devel/autotools/autoconf/build
Executable file
21
packages/toolchain/devel/autotools/autoconf/build
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build m4
|
||||
$SCRIPTS/build libtool
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/autoconf-2.65
|
||||
EMACS="no" \
|
||||
ac_cv_path_M4=$ROOT/$TOOLCHAIN/bin/m4 \
|
||||
ac_cv_prog_gnu_m4_gnu=no \
|
||||
./configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
|
||||
make
|
||||
make install
|
||||
make prefix=$SYSROOT_PREFIX/usr install
|
17
packages/toolchain/devel/autotools/automake/build
Executable file
17
packages/toolchain/devel/autotools/automake/build
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build autoconf
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
|
||||
make
|
||||
make install
|
||||
make prefix=$SYSROOT_PREFIX/usr install
|
6
packages/toolchain/devel/autotools/build
Executable file
6
packages/toolchain/devel/autotools/build
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/build autoconf-2.64
|
||||
$SCRIPTS/build automake
|
17
packages/toolchain/devel/autotools/libtool/build
Executable file
17
packages/toolchain/devel/autotools/libtool/build
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
|
||||
make
|
||||
make install
|
||||
make prefix=$SYSROOT_PREFIX/usr install
|
16
packages/toolchain/devel/autotools/m4/build
Executable file
16
packages/toolchain/devel/autotools/m4/build
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
cd $PKG_BUILD
|
||||
gl_cv_func_gettimeofday_clobber=no \
|
||||
./configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
|
||||
make
|
||||
make install
|
||||
make prefix=$SYSROOT_PREFIX/usr install
|
@ -8,6 +8,7 @@ rm -rf "$SYSROOT_PREFIX/lib"
|
||||
rm -rf "$SYSROOT_PREFIX/usr/lib"
|
||||
rm -rf "$SYSROOT_PREFIX/usr/include"
|
||||
|
||||
$SCRIPTS/build autotools
|
||||
$SCRIPTS/install linux-headers
|
||||
$SCRIPTS/build gcc-core
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
# build for host
|
||||
setup_toolchain host
|
||||
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-host
|
||||
cd .objdir-host
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
cd $ROOT
|
||||
|
||||
# build for target
|
||||
setup_toolchain target
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-target
|
||||
cd .objdir-target
|
||||
../configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=$SYSROOT_PREFIX/usr \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
|
||||
make
|
||||
make install
|
@ -1,36 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. config/options
|
||||
|
||||
# build for host
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-host
|
||||
cd .objdir-host
|
||||
|
||||
gl_cv_func_gettimeofday_clobber=no \
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
cd $ROOT
|
||||
|
||||
# build for target
|
||||
setup_toolchain target
|
||||
|
||||
cd $BUILD/$1*
|
||||
mkdir -p .objdir-target
|
||||
cd .objdir-target
|
||||
|
||||
gl_cv_func_gettimeofday_clobber=no \
|
||||
../configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=$SYSROOT_PREFIX/usr \
|
||||
|
||||
make
|
||||
make install
|
@ -12,17 +12,25 @@ $SCRIPTS/build cloog-ppl
|
||||
$SCRIPTS/build libelf
|
||||
$SCRIPTS/unpack gcc
|
||||
|
||||
$SCRIPTS/build autoconf-2.64
|
||||
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/gcc*
|
||||
|
||||
autoconf-2.64
|
||||
|
||||
mkdir -p objdir-$1
|
||||
cd objdir-$1
|
||||
|
||||
LDFLAGS="-Wl,-rpath,$ROOT/$TOOLCHAIN/lib" \
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--with-sysroot=$SYSROOT_PREFIX \
|
||||
--with-as=$TARGET_AS \
|
||||
--with-ld=$TARGET_LD \
|
||||
--with-gmp=$ROOT/$TOOLCHAIN \
|
||||
--with-mpfr=$ROOT/$TOOLCHAIN \
|
||||
--with-mpc=$ROOT/$TOOLCHAIN \
|
||||
|
@ -15,14 +15,18 @@ $SCRIPTS/unpack gcc
|
||||
setup_toolchain host
|
||||
|
||||
cd $BUILD/gcc*
|
||||
|
||||
mkdir -p objdir-$1
|
||||
cd objdir-$1
|
||||
|
||||
LDFLAGS="-Wl,-rpath,$ROOT/$TOOLCHAIN/lib" \
|
||||
../configure --host=$HOST_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--target=$TARGET_NAME \
|
||||
--prefix=$ROOT/$TOOLCHAIN \
|
||||
--with-sysroot=$SYSROOT_PREFIX \
|
||||
--with-as=$TARGET_AS \
|
||||
--with-ld=$TARGET_LD \
|
||||
--with-gmp=$ROOT/$TOOLCHAIN \
|
||||
--with-mpfr=$ROOT/$TOOLCHAIN \
|
||||
--with-mpc=$ROOT/$TOOLCHAIN \
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/4.5-20100610/gcc-4.5-20100610.tar.bz2
|
||||
ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/4.5-20100624/gcc-4.5-20100624.tar.bz2
|
||||
|
@ -5,6 +5,7 @@
|
||||
$SCRIPTS/build toolchain
|
||||
$SCRIPTS/build util-macros
|
||||
$SCRIPTS/build fontsproto
|
||||
$SCRIPTS/build udev
|
||||
$SCRIPTS/build xorg-server
|
||||
|
||||
xorg_drv_configure_prepend
|
||||
@ -14,6 +15,9 @@ xorg_drv_configure_prepend
|
||||
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-Os|-O3|"`
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
$AUTORECONF
|
||||
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
|
@ -2,5 +2,7 @@
|
||||
|
||||
. config/options
|
||||
|
||||
$SCRIPTS/install udev
|
||||
|
||||
mkdir -p $INSTALL/$XORG_PATH_MODULES/drivers
|
||||
cp -P $PKG_BUILD/src/.libs/intel_drv.so $INSTALL/$XORG_PATH_MODULES/drivers
|
||||
|
146
packages/x11/driver/xf86-video-intel/patches/uevent.diff
Normal file
146
packages/x11/driver/xf86-video-intel/patches/uevent.diff
Normal file
@ -0,0 +1,146 @@
|
||||
diff -up xf86-video-intel-2.10.0/src/i830_driver.c.dave xf86-video-intel-2.10.0/src/i830_driver.c
|
||||
--- xf86-video-intel-2.10.0/src/i830_driver.c.dave 2010-01-13 18:48:49.000000000 +1000
|
||||
+++ xf86-video-intel-2.10.0/src/i830_driver.c 2010-01-13 18:51:09.000000000 +1000
|
||||
@@ -83,6 +83,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include "i915_drm.h"
|
||||
#include <xf86drmMode.h>
|
||||
|
||||
+#include "libudev.h"
|
||||
+
|
||||
#define BIT(x) (1 << (x))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define NB_OF(x) (sizeof (x) / sizeof (*x))
|
||||
@@ -1167,6 +1169,80 @@ int i830_crtc_to_pipe(xf86CrtcPtr crtc)
|
||||
return drmmode_get_pipe_from_crtc_id(intel->bufmgr, crtc);
|
||||
}
|
||||
|
||||
+static void
|
||||
+I830HandleUEvents(int fd, void *closure)
|
||||
+{
|
||||
+ ScrnInfoPtr scrn = closure;
|
||||
+ intel_screen_private *intel = intel_get_screen_private(scrn);
|
||||
+ struct udev_device *dev;
|
||||
+
|
||||
+ dev = udev_monitor_receive_device(intel->uevent_monitor);
|
||||
+ if (!dev)
|
||||
+ return;
|
||||
+
|
||||
+ /*
|
||||
+ * technically we should inspect the event to see that it's a hotplug.
|
||||
+ * but we know it's a hotplug, we don't get events for anything else.
|
||||
+ * XXX but we should definitely trim by drm node
|
||||
+ */
|
||||
+
|
||||
+ RRGetInfo(screenInfo.screens[scrn->scrnIndex], TRUE);
|
||||
+
|
||||
+ udev_device_unref(dev);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+I830UeventInit(ScrnInfoPtr scrn)
|
||||
+{
|
||||
+ intel_screen_private *intel = intel_get_screen_private(scrn);
|
||||
+ struct udev *u;
|
||||
+ struct udev_monitor *mon;
|
||||
+
|
||||
+ u = udev_new();
|
||||
+ if (!u)
|
||||
+ return;
|
||||
+
|
||||
+ mon = udev_monitor_new_from_netlink(u, "udev");
|
||||
+
|
||||
+ if (!mon) {
|
||||
+ udev_unref(u);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (udev_monitor_filter_add_match_subsystem_devtype(mon,
|
||||
+ "drm",
|
||||
+ "drm_minor") < 0 ||
|
||||
+ udev_monitor_enable_receiving(mon) < 0)
|
||||
+ {
|
||||
+ udev_monitor_unref(mon);
|
||||
+ udev_unref(u);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ intel->uevent_handler =
|
||||
+ xf86AddGeneralHandler(udev_monitor_get_fd(mon),
|
||||
+ I830HandleUEvents,
|
||||
+ scrn);
|
||||
+
|
||||
+ intel->uevent_monitor = mon;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+I830UeventFini(ScrnInfoPtr scrn)
|
||||
+{
|
||||
+ intel_screen_private *intel = intel_get_screen_private(scrn);
|
||||
+
|
||||
+ if (intel->uevent_handler)
|
||||
+ {
|
||||
+ struct udev *u = udev_monitor_get_udev(intel->uevent_monitor);
|
||||
+
|
||||
+ xf86RemoveGeneralHandler(intel->uevent_handler);
|
||||
+
|
||||
+ udev_monitor_unref(intel->uevent_monitor);
|
||||
+ udev_unref(u);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static Bool
|
||||
I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv)
|
||||
{
|
||||
@@ -1425,6 +1501,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr
|
||||
|
||||
intel->suspended = FALSE;
|
||||
|
||||
+ I830UeventInit(scrn);
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -1529,7 +1607,8 @@ static Bool I830CloseScreen(int scrnInde
|
||||
{
|
||||
ScrnInfoPtr scrn = xf86Screens[scrnIndex];
|
||||
intel_screen_private *intel = intel_get_screen_private(scrn);
|
||||
-
|
||||
+
|
||||
+ I830UeventFini(scrn);
|
||||
if (scrn->vtSema == TRUE) {
|
||||
I830LeaveVT(scrnIndex, 0);
|
||||
}
|
||||
diff -up xf86-video-intel-2.10.0/src/i830.h.dave xf86-video-intel-2.10.0/src/i830.h
|
||||
--- xf86-video-intel-2.10.0/src/i830.h.dave 2010-01-13 18:48:50.000000000 +1000
|
||||
+++ xf86-video-intel-2.10.0/src/i830.h 2010-01-13 18:50:01.000000000 +1000
|
||||
@@ -47,6 +47,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
#ifndef _I830_H_
|
||||
#define _I830_H_
|
||||
|
||||
+#include "libudev.h"
|
||||
+
|
||||
#include "xf86_OSproc.h"
|
||||
#include "compiler.h"
|
||||
#include "xf86PciInfo.h"
|
||||
@@ -385,6 +387,9 @@ typedef struct intel_screen_private {
|
||||
*/
|
||||
Bool fallback_debug;
|
||||
unsigned debug_flush;
|
||||
+
|
||||
+ struct udev_monitor *uevent_monitor;
|
||||
+ InputHandlerProc uevent_handler;
|
||||
} intel_screen_private;
|
||||
|
||||
enum {
|
||||
diff -up xf86-video-intel-2.10.0/src/Makefile.am.dave xf86-video-intel-2.10.0/src/Makefile.am
|
||||
--- xf86-video-intel-2.10.0/src/Makefile.am.dave 2010-01-05 08:09:52.000000000 +1000
|
||||
+++ xf86-video-intel-2.10.0/src/Makefile.am 2010-01-13 18:49:14.000000000 +1000
|
||||
@@ -32,7 +32,7 @@ AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @
|
||||
intel_drv_la_LTLIBRARIES = intel_drv.la
|
||||
intel_drv_la_LDFLAGS = -module -avoid-version
|
||||
intel_drv_ladir = @moduledir@/drivers
|
||||
-intel_drv_la_LIBADD = -lm @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la
|
||||
+intel_drv_la_LIBADD = -lm @DRM_LIBS@ -ldrm_intel ../uxa/libuxa.la -ludev
|
||||
intel_drv_la_LIBADD += @PCIACCESS_LIBS@
|
||||
|
||||
INTEL_DRI_SRCS = \
|
@ -7,10 +7,10 @@ $SCRIPTS/install freetype
|
||||
$SCRIPTS/install libxml2
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -PR $PKG_BUILD/src/.libs/libfontconfig.so* $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/src/.libs/libfontconfig.so* $INSTALL/usr/lib
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -PR $PKG_BUILD/fc-cache/.libs/fc-cache $INSTALL/usr/bin
|
||||
cp $PKG_BUILD/fc-cache/.libs/fc-cache $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/etc/fonts
|
||||
cp -R $SYSROOT_PREFIX/etc/fonts/* $INSTALL/etc/fonts
|
||||
|
@ -19,7 +19,6 @@ $SCRIPTS/build inputproto
|
||||
$SCRIPTS/build xf86dgaproto
|
||||
$SCRIPTS/build xf86driproto
|
||||
$SCRIPTS/build xf86miscproto
|
||||
$SCRIPTS/build libfontenc
|
||||
$SCRIPTS/build libpciaccess
|
||||
$SCRIPTS/build libX11
|
||||
$SCRIPTS/build libXfont
|
||||
@ -39,6 +38,10 @@ else
|
||||
XORG_XINERAMA="--disable-xinerama"
|
||||
fi
|
||||
|
||||
# ensure we dont use size optimization.
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s|-Os|-O3|"`
|
||||
CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-Os|-O3|"`
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
$AUTORECONF
|
||||
@ -53,7 +56,10 @@ $AUTORECONF
|
||||
--enable-shared \
|
||||
--disable-debug \
|
||||
--disable-builddocs \
|
||||
--disable-strict-compilation \
|
||||
--enable-largefile \
|
||||
--enable-visibility \
|
||||
--enable-pc98=auto \
|
||||
--enable-install-libxf86config \
|
||||
--disable-xselinux \
|
||||
--with-pic \
|
||||
@ -88,6 +94,7 @@ $AUTORECONF
|
||||
--disable-config-hal \
|
||||
--enable-xfree86-utils \
|
||||
--enable-xorg \
|
||||
--disable-windowswm \
|
||||
--disable-dmx \
|
||||
--disable-xvfb \
|
||||
--disable-xnest \
|
||||
|
@ -50,10 +50,10 @@ mkdir -p $XORG_DST/multimedia
|
||||
cp -P $XORG_SRC/i2c/.libs/*_drv.so $XORG_DST/multimedia
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/xorg
|
||||
cp -P $PKG_BUILD/dix/protocol.txt $INSTALL/usr/lib/xorg
|
||||
cp $PKG_BUILD/dix/protocol.txt $INSTALL/usr/lib/xorg
|
||||
|
||||
mkdir -p $INSTALL/usr/share/X11/xorg.conf.d
|
||||
cp -P $PKG_BUILD/config/10-evdev.conf $INSTALL/usr/share/X11/xorg.conf.d
|
||||
cp $PKG_BUILD/config/10-evdev.conf $INSTALL/usr/share/X11/xorg.conf.d
|
||||
|
||||
#Fonts
|
||||
$SCRIPTS/install encodings
|
||||
@ -68,7 +68,7 @@ mkdir -p $INSTALL/usr/share/X11/xorg.conf.d
|
||||
#Drivers
|
||||
$SCRIPTS/install xf86-input-evdev
|
||||
$SCRIPTS/install xf86-input-synaptics
|
||||
$SCRIPTS/install xf86-input-wacom
|
||||
# $SCRIPTS/install xf86-input-wacom
|
||||
|
||||
for drv in $XORG_DRIVERS; do
|
||||
$SCRIPTS/install xf86-video-$drv
|
||||
@ -79,4 +79,4 @@ mkdir -p $INSTALL/usr/share/X11/xorg.conf.d
|
||||
|
||||
if [ "$DEVTOOLS" = yes ]; then
|
||||
$SCRIPTS/install xrandr
|
||||
fi
|
||||
fi
|
||||
|
@ -1,12 +1,12 @@
|
||||
diff -Naur xorg-server-1.7.99.1/hw/xfree86/common/xf86AutoConfig.c xorg-server-1.7.99.1.patch/hw/xfree86/common/xf86AutoConfig.c
|
||||
--- xorg-server-1.7.99.1/hw/xfree86/common/xf86AutoConfig.c 2009-10-13 19:04:27.000000000 +0200
|
||||
+++ xorg-server-1.7.99.1.patch/hw/xfree86/common/xf86AutoConfig.c 2009-12-04 21:39:57.414303608 +0100
|
||||
@@ -192,7 +192,7 @@
|
||||
diff -Naur xorg-server-1.8.99.903/hw/xfree86/common/xf86pciBus.c xorg-server-1.8.99.903.patch/hw/xfree86/common/xf86pciBus.c
|
||||
--- xorg-server-1.8.99.903/hw/xfree86/common/xf86pciBus.c 2010-06-10 16:07:55.000000000 +0200
|
||||
+++ xorg-server-1.8.99.903.patch/hw/xfree86/common/xf86pciBus.c 2010-06-27 01:06:57.977808296 +0200
|
||||
@@ -1129,7 +1129,7 @@
|
||||
break;
|
||||
case 0x102b: driverList[0] = "mga"; break;
|
||||
case 0x10c8: driverList[0] = "neomagic"; break;
|
||||
- case 0x10de: case 0x12d2: driverList[0] = "nv"; break;
|
||||
+ case 0x10de: case 0x12d2: driverList[0] = "nvidia"; break;
|
||||
case 0x1106: driverList[0] = "openchrome"; break;
|
||||
case 0x1b36: driverList[0] = "qxl"; break;
|
||||
case 0x1163: driverList[0] = "rendition"; break;
|
||||
case 0x5333:
|
||||
|
@ -1,358 +0,0 @@
|
||||
From d2d3bcc9e23b9a4bea9f67a06cd23aa3ce7f4b59 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d2d3bcc9e23b9a4bea9f67a06cd23aa3ce7f4b59.1268201183.git.yan.i.li@intel.com>
|
||||
From: Yan Li <yan.i.li@intel.com>
|
||||
Date: Wed, 10 Mar 2010 14:06:17 +0800
|
||||
Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v6 for 1.7.99.901
|
||||
|
||||
xkbcomp outputs will be cached in files with hashed keymap as
|
||||
names. This saves boot time for around 1s on commodity netbooks.
|
||||
|
||||
v6: rebased to v1.7.99.901
|
||||
|
||||
v5: now using a much bigger xkbKeyMapBuf (100k) since the XKB to be
|
||||
complied may be very large (as seen with
|
||||
gnome-keyboard-properties), rebased to v1.6.1
|
||||
|
||||
Signed-off-by: Yan Li <yan.i.li@intel.com>
|
||||
---
|
||||
configure.ac | 6 +-
|
||||
xkb/README.compiled | 8 +-
|
||||
xkb/ddxLoad.c | 187 +++++++++++++++++++++++++++++++++++++++++----------
|
||||
3 files changed, 159 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index de252f3..54a0327 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -527,9 +527,9 @@ AC_MSG_RESULT([$FONTPATH])
|
||||
AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
|
||||
[ XKBPATH="$withval" ],
|
||||
[ XKBPATH="${datadir}/X11/xkb" ])
|
||||
-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
|
||||
+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
|
||||
[ XKBOUTPUT="$withval" ],
|
||||
- [ XKBOUTPUT="compiled" ])
|
||||
+ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
|
||||
AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
|
||||
[Keyboard ruleset (default: base/evdev)]),
|
||||
[ XKB_DFLT_RULES="$withval" ],
|
||||
@@ -1148,7 +1148,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir])
|
||||
dnl Make sure XKM_OUTPUT_DIR is an absolute path
|
||||
XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
|
||||
if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
|
||||
- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
|
||||
+ AC_MSG_ERROR([xkb-output must be an absolute path.])
|
||||
fi
|
||||
|
||||
dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
|
||||
diff --git a/xkb/README.compiled b/xkb/README.compiled
|
||||
index 71caa2f..a4a2ae0 100644
|
||||
--- a/xkb/README.compiled
|
||||
+++ b/xkb/README.compiled
|
||||
@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients. The X server
|
||||
or some other tool might destroy or replace the files in this directory,
|
||||
so it is not a safe place to store compiled keymaps for long periods of
|
||||
time. The default keymap for any server is usually stored in:
|
||||
- X<num>-default.xkm
|
||||
-where <num> is the display number of the server in question, which makes
|
||||
-it possible for several servers *on the same host* to share the same
|
||||
-directory.
|
||||
+ server-<SHA1>.xkm
|
||||
+
|
||||
+where <SHA1> is the SHA1 hash of keymap source, so that compiled
|
||||
+keymap of different keymap sources are stored in different files.
|
||||
|
||||
Unless the X server is modified, sharing this directory between servers on
|
||||
different hosts could cause problems.
|
||||
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
|
||||
index 4ccddda..63b9f97 100644
|
||||
--- a/xkb/ddxLoad.c
|
||||
+++ b/xkb/ddxLoad.c
|
||||
@@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
#include <xkb-config.h>
|
||||
|
||||
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
|
||||
+# include <sha1.h>
|
||||
+#else /* Use OpenSSL's libcrypto */
|
||||
+# include <stddef.h> /* buggy openssl/sha.h wants size_t */
|
||||
+# include <openssl/sha.h>
|
||||
+#endif
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <X11/X.h>
|
||||
@@ -43,24 +49,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#define XKBSRV_NEED_FILE_FUNCS
|
||||
#include <xkbsrv.h>
|
||||
#include <X11/extensions/XI.h>
|
||||
+#include <errno.h>
|
||||
#include "xkb.h"
|
||||
|
||||
#if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
|
||||
#include <paths.h>
|
||||
#endif
|
||||
|
||||
- /*
|
||||
- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
|
||||
- * relative to the top-level XKB configuration directory.
|
||||
- * Making the server write to a subdirectory of that directory
|
||||
- * requires some work in the general case (install procedure
|
||||
- * has to create links to /var or somesuch on many machines),
|
||||
- * so we just compile into /usr/tmp for now.
|
||||
- */
|
||||
-#ifndef XKM_OUTPUT_DIR
|
||||
-#define XKM_OUTPUT_DIR "compiled/"
|
||||
-#endif
|
||||
-
|
||||
#define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
|
||||
#define ERROR_PREFIX "\"> \""
|
||||
#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
|
||||
@@ -175,6 +170,45 @@ OutputDirectory(
|
||||
}
|
||||
|
||||
static Bool
|
||||
+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
|
||||
+{
|
||||
+ int i;
|
||||
+ unsigned char sha1[SHA_DIGEST_LENGTH];
|
||||
+
|
||||
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
|
||||
+ SHA1_CTX ctx;
|
||||
+
|
||||
+ SHA1Init (&ctx);
|
||||
+ SHA1Update (&ctx, input, strlen(input));
|
||||
+ SHA1Final (sha1, &ctx);
|
||||
+#else /* Use OpenSSL's libcrypto */
|
||||
+ SHA_CTX ctx;
|
||||
+ int success;
|
||||
+
|
||||
+ success = SHA1_Init (&ctx);
|
||||
+ if (! success)
|
||||
+ return BadAlloc;
|
||||
+
|
||||
+ success = SHA1_Update (&ctx, input, strlen(input));
|
||||
+ if (! success)
|
||||
+ return BadAlloc;
|
||||
+
|
||||
+ success = SHA1_Final (sha1, &ctx);
|
||||
+ if (! success)
|
||||
+ return BadAlloc;
|
||||
+#endif
|
||||
+
|
||||
+ /* convert sha1 to sha1_asc */
|
||||
+ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
|
||||
+ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
|
||||
+ }
|
||||
+
|
||||
+ return Success;
|
||||
+}
|
||||
+
|
||||
+/* call xkbcomp and compile XKB keymap, return xkm file name in
|
||||
+ nameRtrn */
|
||||
+static Bool
|
||||
XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||
XkbComponentNamesPtr names,
|
||||
unsigned want,
|
||||
@@ -183,7 +217,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||
int nameRtrnLen)
|
||||
{
|
||||
FILE * out;
|
||||
- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
|
||||
+ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
|
||||
+ char * tmpXkmFile = NULL;
|
||||
+ char * canonicalXkmFileName = NULL;
|
||||
+ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
|
||||
+ int ret, result;
|
||||
|
||||
const char *emptystring = "";
|
||||
const char *xkbbasedirflag = emptystring;
|
||||
@@ -194,15 +232,67 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||
/* WIN32 has no popen. The input must be stored in a file which is
|
||||
used as input for xkbcomp. xkbcomp does not read from stdin. */
|
||||
char tmpname[PATH_MAX];
|
||||
- const char *xkmfile = tmpname;
|
||||
+ const char *xkbfile = tmpname;
|
||||
#else
|
||||
- const char *xkmfile = "-";
|
||||
+ const char *xkbfile = "-";
|
||||
+#endif
|
||||
+
|
||||
+ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
|
||||
+ of which SHA1 is generated and used as result xkm file name */
|
||||
+ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
|
||||
+ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
|
||||
+ if (NULL == out) {
|
||||
+ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
|
||||
+ if (fclose(out) !=0) {
|
||||
+ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+#ifdef DEBUG
|
||||
+ if (xkbDebugFlags) {
|
||||
+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
|
||||
+ fputs(xkbKeyMapBuf, stderr);
|
||||
+ }
|
||||
#endif
|
||||
+ if (!ret) {
|
||||
+ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
|
||||
- snprintf(keymap, sizeof(keymap), "server-%s", display);
|
||||
+ DebugF("[xkb] computing SHA1 of keymap\n");
|
||||
+ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
|
||||
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
|
||||
+ } else {
|
||||
+ ErrorF("[xkb] Computing SHA1 of keymap failed, "
|
||||
+ "using display name instead as xkm file name\n");
|
||||
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
|
||||
+ }
|
||||
|
||||
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
|
||||
|
||||
+ /* set nameRtrn, fail if it's too small */
|
||||
+ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
|
||||
+ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ strncpy(nameRtrn, xkmfile, nameRtrnLen);
|
||||
+
|
||||
+ /* if the xkm file already exists, reuse it */
|
||||
+ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
|
||||
+ if (access(canonicalXkmFileName, R_OK) == 0) {
|
||||
+ /* yes, we can reuse the old xkm file */
|
||||
+ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
|
||||
+ result = TRUE;
|
||||
+ goto _ret;
|
||||
+ }
|
||||
+ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
|
||||
+
|
||||
+ /* continue to call xkbcomp to compile the keymap. to avoid race
|
||||
+ condition, we compile it to a tmpfile then rename it to
|
||||
+ xkmfile */
|
||||
+
|
||||
#ifdef WIN32
|
||||
strcpy(tmpname, Win32TempDir());
|
||||
strcat(tmpname, "\\xkb_XXXXXX");
|
||||
@@ -225,19 +315,30 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||
}
|
||||
}
|
||||
|
||||
+ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
|
||||
+ ErrorF("[xkb] Can't generate temp xkm file name");
|
||||
+ result = FALSE;
|
||||
+ goto _ret;
|
||||
+ }
|
||||
+
|
||||
buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
|
||||
- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
|
||||
+ "-em1 %s -emp %s -eml %s \"%s\"",
|
||||
xkbbindir, xkbbindirsep,
|
||||
( (xkbDebugFlags < 2) ? 1 :
|
||||
((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
|
||||
- xkbbasedirflag, xkmfile,
|
||||
+ xkbbasedirflag, xkbfile,
|
||||
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
|
||||
- xkm_output_dir, keymap);
|
||||
+ tmpXkmFile);
|
||||
|
||||
if (xkbbasedirflag != emptystring) {
|
||||
xfree(xkbbasedirflag);
|
||||
}
|
||||
|
||||
+ /* there's a potential race condition between calling tempnam()
|
||||
+ and invoking xkbcomp to write the result file (potential temp
|
||||
+ file name conflicts), but since xkbcomp is a standalone
|
||||
+ program, we have to live with this */
|
||||
+
|
||||
#ifndef WIN32
|
||||
out= Popen(buf,"w");
|
||||
#else
|
||||
@@ -245,31 +346,41 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||
#endif
|
||||
|
||||
if (out!=NULL) {
|
||||
-#ifdef DEBUG
|
||||
- if (xkbDebugFlags) {
|
||||
- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
|
||||
- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
|
||||
- }
|
||||
-#endif
|
||||
- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
|
||||
+ /* write XKBKeyMapBuf to xkbcomp */
|
||||
+ if (EOF==fputs(xkbKeyMapBuf, out))
|
||||
+ {
|
||||
+ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
|
||||
+ result = FALSE;
|
||||
+ goto _ret;
|
||||
+ }
|
||||
#ifndef WIN32
|
||||
if (Pclose(out)==0)
|
||||
#else
|
||||
if (fclose(out)==0 && System(buf) >= 0)
|
||||
#endif
|
||||
{
|
||||
+ /* xkbcomp success */
|
||||
if (xkbDebugFlags)
|
||||
DebugF("[xkb] xkb executes: %s\n",buf);
|
||||
- if (nameRtrn) {
|
||||
- strncpy(nameRtrn,keymap,nameRtrnLen);
|
||||
- nameRtrn[nameRtrnLen-1]= '\0';
|
||||
+ /* if canonicalXkmFileName already exists now, we simply
|
||||
+ overwrite it, this is OK */
|
||||
+ ret = rename(tmpXkmFile, canonicalXkmFileName);
|
||||
+ if (0 != ret) {
|
||||
+ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
|
||||
+ tmpXkmFile, canonicalXkmFileName,
|
||||
+ strerror(errno));
|
||||
+
|
||||
+ /* in case of error, don't unlink tmpXkmFile, leave it
|
||||
+ for debugging */
|
||||
+
|
||||
+ result = FALSE;
|
||||
+ goto _ret;
|
||||
}
|
||||
- if (buf != NULL)
|
||||
- xfree (buf);
|
||||
- return TRUE;
|
||||
+ result = TRUE;
|
||||
+ goto _ret;
|
||||
}
|
||||
else
|
||||
- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
|
||||
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
|
||||
#ifdef WIN32
|
||||
/* remove the temporary file */
|
||||
unlink(tmpname);
|
||||
@@ -284,9 +395,16 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
|
||||
}
|
||||
if (nameRtrn)
|
||||
nameRtrn[0]= '\0';
|
||||
+ result = FALSE;
|
||||
+
|
||||
+_ret:
|
||||
+ if (tmpXkmFile)
|
||||
+ free(tmpXkmFile);
|
||||
+ if (canonicalXkmFileName)
|
||||
+ xfree(canonicalXkmFileName);
|
||||
if (buf != NULL)
|
||||
xfree (buf);
|
||||
- return FALSE;
|
||||
+ return result;
|
||||
}
|
||||
|
||||
static FILE *
|
||||
@@ -370,7 +488,6 @@ unsigned missing;
|
||||
DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
|
||||
}
|
||||
fclose(file);
|
||||
- (void) unlink (fileName);
|
||||
return (need|want)&(~missing);
|
||||
}
|
||||
|
||||
--
|
||||
1.5.6.5
|
||||
|
@ -1,17 +1,16 @@
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 84d3cac..673612f 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -2248,10 +2248,10 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
|
||||
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
|
||||
else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height))
|
||||
xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
|
||||
- else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
|
||||
- xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
|
||||
else if (xf86TargetFallback(scrn, config, modes, enabled, width, height))
|
||||
xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n");
|
||||
+ else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
|
||||
+ xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
|
||||
else
|
||||
xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n");
|
||||
|
||||
diff -Naur xorg-server-1.8.99.903/hw/xfree86/modes/xf86Crtc.c xorg-server-1.8.99.903.patch/hw/xfree86/modes/xf86Crtc.c
|
||||
--- xorg-server-1.8.99.903/hw/xfree86/modes/xf86Crtc.c 2010-06-15 23:39:25.000000000 +0200
|
||||
+++ xorg-server-1.8.99.903.patch/hw/xfree86/modes/xf86Crtc.c 2010-06-27 00:53:28.722808399 +0200
|
||||
@@ -2379,10 +2379,10 @@
|
||||
xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n");
|
||||
else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height))
|
||||
xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n");
|
||||
- else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
|
||||
- xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
|
||||
else if (xf86TargetFallback(scrn, config, modes, enabled, width, height))
|
||||
xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n");
|
||||
+ else if (xf86TargetAspect(scrn, config, modes, enabled, width, height))
|
||||
+ xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n");
|
||||
else
|
||||
xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n");
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.8.1.902.tar.bz2
|
||||
http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.8.99.903.tar.bz2
|
Loading…
x
Reference in New Issue
Block a user