xorg libxcb: patch to disable assert that stops Java GUI apps from
working (the actual bug is in Java). svn path=/nixpkgs/trunk/; revision=8189
This commit is contained in:
@@ -1063,6 +1063,7 @@ rec {
|
|||||||
sha256 = "07fi4yvkni7rlkw9gv7z1fa6y63z34gpj3kklc9ydlqg72nb5mhr";
|
sha256 = "07fi4yvkni7rlkw9gv7z1fa6y63z34gpj3kklc9ydlqg72nb5mhr";
|
||||||
};
|
};
|
||||||
buildInputs = [pkgconfig libxslt libpthreadstubs libXau xcbproto libXdmcp ];
|
buildInputs = [pkgconfig libxslt libpthreadstubs libXau xcbproto libXdmcp ];
|
||||||
|
patches = [ ./xcb_xlib-no-assert-on-lock.patch ];
|
||||||
}) // {inherit libxslt libpthreadstubs libXau xcbproto libXdmcp ;};
|
}) // {inherit libxslt libpthreadstubs libXau xcbproto libXdmcp ;};
|
||||||
|
|
||||||
libxkbfile = (stdenv.mkDerivation {
|
libxkbfile = (stdenv.mkDerivation {
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ $extraAttrs{"xorgserver"} = " mesaSrc = mesa.src; x11BuildHook = ./xorgserver.sh
|
|||||||
|
|
||||||
$extraAttrs{"imake"} = " inherit xorgcffiles; x11BuildHook = ./imake.sh; patches = [./imake.patch]; ";
|
$extraAttrs{"imake"} = " inherit xorgcffiles; x11BuildHook = ./imake.sh; patches = [./imake.patch]; ";
|
||||||
|
|
||||||
|
# Used to avoid the following assertion error:
|
||||||
|
# java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
|
||||||
|
$extraAttrs{"libxcb"} = " patches = [./xcb_xlib-no-assert-on-lock.patch]; ";
|
||||||
|
|
||||||
$extraAttrs{"fontmiscmisc"} = " postInstall = \"ln -s \${fontalias}/lib/X11/fonts/misc/fonts.alias \$out/lib/X11/fonts/misc/fonts.alias\"; ";
|
$extraAttrs{"fontmiscmisc"} = " postInstall = \"ln -s \${fontalias}/lib/X11/fonts/misc/fonts.alias \$out/lib/X11/fonts/misc/fonts.alias\"; ";
|
||||||
|
|
||||||
$extraAttrs{"mkfontdir"} = " preBuild = \"substituteInPlace mkfontdir.cpp --replace BINDIR \${mkfontscale}/bin\"; ";
|
$extraAttrs{"mkfontdir"} = " preBuild = \"substituteInPlace mkfontdir.cpp --replace BINDIR \${mkfontscale}/bin\"; ";
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
--- foo/src/xcb_xlib.c.orig 2006-11-25 22:03:30.000000000 +0000
|
||||||
|
+++ foo/src/xcb_xlib.c 2006-11-25 22:19:28.000000000 +0000
|
||||||
|
@@ -38,18 +38,20 @@
|
||||||
|
void xcb_xlib_lock(xcb_connection_t *c)
|
||||||
|
{
|
||||||
|
_xcb_lock_io(c);
|
||||||
|
- assert(!c->xlib.lock);
|
||||||
|
- c->xlib.lock = 1;
|
||||||
|
- c->xlib.thread = pthread_self();
|
||||||
|
+ if (!c->xlib.lock) {
|
||||||
|
+ c->xlib.lock = 1;
|
||||||
|
+ c->xlib.thread = pthread_self();
|
||||||
|
+ }
|
||||||
|
_xcb_unlock_io(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
void xcb_xlib_unlock(xcb_connection_t *c)
|
||||||
|
{
|
||||||
|
_xcb_lock_io(c);
|
||||||
|
- assert(c->xlib.lock);
|
||||||
|
- assert(pthread_equal(c->xlib.thread, pthread_self()));
|
||||||
|
- c->xlib.lock = 0;
|
||||||
|
- pthread_cond_broadcast(&c->xlib.cond);
|
||||||
|
+ if (c->xlib.lock) {
|
||||||
|
+ assert(pthread_equal(c->xlib.thread, pthread_self()));
|
||||||
|
+ c->xlib.lock = 0;
|
||||||
|
+ pthread_cond_broadcast(&c->xlib.cond);
|
||||||
|
+ }
|
||||||
|
_xcb_unlock_io(c);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user