Merge pull request #19196 from groxxda/xkbbindir

xserver: replace XKB_BINDIR with compile time option
This commit is contained in:
Eelco Dolstra 2016-10-03 17:12:59 +02:00 committed by GitHub
commit 69bb34673e
10 changed files with 3 additions and 30 deletions

View File

@ -520,7 +520,6 @@ in
environment = environment =
{ {
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime. XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
LD_LIBRARY_PATH = concatStringsSep ":" ( LD_LIBRARY_PATH = concatStringsSep ":" (
[ "${xorg.libX11.out}/lib" "${xorg.libXext.out}/lib" "/run/opengl-driver/lib" ] [ "${xorg.libX11.out}/lib" "${xorg.libXext.out}/lib" "/run/opengl-driver/lib" ]

View File

@ -426,7 +426,7 @@ in
dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto
]; ];
# fix_segfault: https://bugs.freedesktop.org/show_bug.cgi?id=91316 # fix_segfault: https://bugs.freedesktop.org/show_bug.cgi?id=91316
commonPatches = [ ./xorgserver-xkbcomp-path.patch ]; commonPatches = [ ];
# XQuartz requires two compilations: the first to get X / XQuartz, # XQuartz requires two compilations: the first to get X / XQuartz,
# and the second to get Xvfb, Xnest, etc. # and the second to get Xvfb, Xnest, etc.
darwinOtherX = overrideDerivation xorgserver (oldAttrs: { darwinOtherX = overrideDerivation xorgserver (oldAttrs: {
@ -454,16 +454,15 @@ in
"--enable-xcsecurity" # enable SECURITY extension "--enable-xcsecurity" # enable SECURITY extension
"--with-default-font-path=" # there were only paths containing "${prefix}", "--with-default-font-path=" # there were only paths containing "${prefix}",
# and there are no fonts in this package anyway # and there are no fonts in this package anyway
"--with-xkb-bin-directory=${xorg.xkbcomp}/bin"
"--enable-glamor" "--enable-glamor"
]; ];
postInstall = '' postInstall = ''
rm -fr $out/share/X11/xkb/compiled rm -fr $out/share/X11/xkb/compiled
ln -s /var/tmp $out/share/X11/xkb/compiled ln -s /var/tmp $out/share/X11/xkb/compiled
wrapProgram $out/bin/Xephyr \ wrapProgram $out/bin/Xephyr \
--set XKB_BINDIR "${xorg.xkbcomp}/bin" \
--add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb" --add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb"
wrapProgram $out/bin/Xvfb \ wrapProgram $out/bin/Xvfb \
--set XKB_BINDIR "${xorg.xkbcomp}/bin" \
--set XORG_DRI_DRIVER_PATH ${args.mesa}/lib/dri \ --set XORG_DRI_DRIVER_PATH ${args.mesa}/lib/dri \
--add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb" --add-flags "-xkbdir ${xorg.xkeyboardconfig}/share/X11/xkb"
( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others ( # assert() keeps runtime reference xorgserver-dev in xf86-video-intel and others

View File

@ -1,15 +0,0 @@
diff --git a/os/utils.c b/os/utils.c
index ed7581e..6593455 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -658,6 +658,10 @@ ProcessCommandLine(int argc, char *argv[])
defaultKeyboardControl.autoRepeat = TRUE;
+ char *xkbBinDir = getenv("XKB_BINDIR");
+ if (xkbBinDir)
+ XkbBinDirectory = Xstrdup(xkbBinDir);
+
#ifdef NO_PART_NET
PartialNetwork = FALSE;
#else

View File

@ -130,8 +130,7 @@ in stdenv.mkDerivation {
--replace "@FONTCONFIG_FILE@" "$fontsConfPath" --replace "@FONTCONFIG_FILE@" "$fontsConfPath"
wrapProgram $out/bin/Xquartz \ wrapProgram $out/bin/Xquartz \
--set XQUARTZ_X11 $out/Applications/XQuartz.app/Contents/MacOS/X11 \ --set XQUARTZ_X11 $out/Applications/XQuartz.app/Contents/MacOS/X11
--set XKB_BINDIR "${xorg.xkbcomp}/bin"
defaultStartX="$out/bin/startx -- $out/bin/Xquartz" defaultStartX="$out/bin/startx -- $out/bin/Xquartz"
@ -141,7 +140,6 @@ in stdenv.mkDerivation {
XQUARTZ_DEFAULT_SHELL = "${shell}"; XQUARTZ_DEFAULT_SHELL = "${shell}";
XQUARTZ_DEFAULT_STARTX = "@STARTX@"; XQUARTZ_DEFAULT_STARTX = "@STARTX@";
FONTCONFIG_FILE = "@FONTCONFIG_FILE@"; FONTCONFIG_FILE = "@FONTCONFIG_FILE@";
XKB_BINDIR = "${xorg.xkbcomp}/bin";
})} \ })} \
$out/Applications/XQuartz.app/Contents/Info.plist $out/Applications/XQuartz.app/Contents/Info.plist
substituteInPlace $out/Applications/XQuartz.app/Contents/Info.plist \ substituteInPlace $out/Applications/XQuartz.app/Contents/Info.plist \

View File

@ -122,7 +122,6 @@ in stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
wrapProgram "$out/sbin/bumblebeed" \ wrapProgram "$out/sbin/bumblebeed" \
--set XKB_BINDIR "${xkbcomp}/bin" \
--prefix PATH : "${bbdPath}" \ --prefix PATH : "${bbdPath}" \
--prefix LD_LIBRARY_PATH : "${bbdLibs}" --prefix LD_LIBRARY_PATH : "${bbdLibs}"

View File

@ -46,7 +46,6 @@ in buildPythonApplication rec {
postInstall = '' postInstall = ''
wrapProgram $out/bin/xpra \ wrapProgram $out/bin/xpra \
--set XKB_BINDIR "${xkbcomp}/bin" \
--set FONTCONFIG_FILE "${fontsConf}" \ --set FONTCONFIG_FILE "${fontsConf}" \
--set XPRA_LOG_DIR "\$HOME/.xpra" \ --set XPRA_LOG_DIR "\$HOME/.xpra" \
--set XPRA_INSTALL_PREFIX "$out" \ --set XPRA_INSTALL_PREFIX "$out" \
@ -58,7 +57,6 @@ in buildPythonApplication rec {
#TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
#postFixup = '' #postFixup = ''
# sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
# sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra # sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra
# sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra # sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra
#''; #'';

View File

@ -51,7 +51,6 @@ buildPythonApplication rec {
postInstall = '' postInstall = ''
wrapProgram $out/bin/xpra \ wrapProgram $out/bin/xpra \
--set XKB_BINDIR "${xkbcomp}/bin" \
--set FONTCONFIG_FILE "${fontsConf}" \ --set FONTCONFIG_FILE "${fontsConf}" \
--prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \ --prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib \
--prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]} --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}
@ -62,7 +61,6 @@ buildPythonApplication rec {
#TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though #TODO: replace postInstall with postFixup to avoid double wrapping of xpra; needs more work though
#postFixup = '' #postFixup = ''
# sed -i '2iexport XKB_BINDIR="${xkbcomp}/bin"' $out/bin/xpra
# sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra # sed -i '3iexport FONTCONFIG_FILE="${fontsConf}"' $out/bin/xpra
# sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra # sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra
#''; #'';

View File

@ -20,7 +20,6 @@ stdenv.mkDerivation rec {
patchPhase = '' patchPhase = ''
sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.crossDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.crossDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am
sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xorg.xkbcomp.crossDrv else xorg.xkbcomp}/bin";' unix/vncserver
sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.crossDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.crossDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver
fontPath= fontPath=
for i in $fontDirectories; do for i in $fontDirectories; do

View File

@ -74,7 +74,6 @@ let
in writeScriptBin "xdummy" '' in writeScriptBin "xdummy" ''
#!${stdenv.shell} #!${stdenv.shell}
export XKB_BINDIR="${xorg.xkbcomp}/bin"
exec ${xorg.xorgserver.out}/bin/Xorg \ exec ${xorg.xorgserver.out}/bin/Xorg \
-noreset \ -noreset \
-logfile /dev/null \ -logfile /dev/null \

View File

@ -16,7 +16,6 @@ stdenv.mkDerivation {
chmod a+x $out/bin/xvfb-run chmod a+x $out/bin/xvfb-run
wrapProgram $out/bin/xvfb-run \ wrapProgram $out/bin/xvfb-run \
--set XKB_BINDIR "${xkbcomp}/bin" \
--set FONTCONFIG_FILE "${fontsConf}" \ --set FONTCONFIG_FILE "${fontsConf}" \
--prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux gawk coreutils ]} --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux gawk coreutils ]}
''; '';