Merge pull request #6160 from gridaphobe/master

fix xorgserver / xquartz on darwin
This commit is contained in:
Eric Seidel 2015-02-04 15:34:51 -08:00
commit cac8cc8985
3 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,11 @@
--- xorgserver/hw/xfree86/common/compiler.h 2014-10-29 23:43:33.000000000 -0700
+++ xorgserver/hw/xfree86/common/compiler.h.new 2014-10-29 23:47:30.000000000 -0700
@@ -1352,7 +1352,7 @@
#if !defined(__SUNPRO_C)
#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__)
-#ifdef GCCUSESGAS
+#if defined(GCCUSESGAS) || defined(__clang__)
/*
* If gcc uses gas rather than the native assembler, the syntax of these

View File

@ -274,7 +274,8 @@ in
libpciaccess inputproto xextproto randrproto renderproto presentproto libpciaccess inputproto xextproto randrproto renderproto presentproto
dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto dri2proto dri3proto kbproto xineramaproto resourceproto scrnsaverproto videoproto
]; ];
commonPatches = [ ./xorgserver-xkbcomp-path.patch ]; commonPatches = [ ./xorgserver-xkbcomp-path.patch ]
++ lib.optional isDarwin ./fix-clang.patch;
# 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: {
@ -313,7 +314,7 @@ in
url = mirror://xorg/individual/xserver/xorg-server-1.14.6.tar.bz2; url = mirror://xorg/individual/xserver/xorg-server-1.14.6.tar.bz2;
sha256 = "0c57vp1z0p38dj5gfipkmlw6bvbz1mrr0sb3sbghdxxdyq4kzcz8"; sha256 = "0c57vp1z0p38dj5gfipkmlw6bvbz1mrr0sb3sbghdxxdyq4kzcz8";
}; };
buildInputs = commonBuildInputs; buildInputs = commonBuildInputs ++ [ args.bootstrap_cmds ];
propagatedBuildInputs = commonPropagatedBuildInputs ++ [ propagatedBuildInputs = commonPropagatedBuildInputs ++ [
libAppleWM applewmproto libAppleWM applewmproto
]; ];
@ -377,6 +378,7 @@ in
xinit = attrs: attrs // { xinit = attrs: attrs // {
stdenv = if isDarwin then args.clangStdenv else stdenv; stdenv = if isDarwin then args.clangStdenv else stdenv;
buildInputs = if isDarwin then [ args.bootstrap_cmds args.pkgconfig ] else null;
configureFlags = [ configureFlags = [
"--with-xserver=${xorg.xorgserver}/bin/X" "--with-xserver=${xorg.xorgserver}/bin/X"
] ++ lib.optionals isDarwin [ ] ++ lib.optionals isDarwin [
@ -384,7 +386,8 @@ in
"--with-launchdaemons-dir=\${out}/LaunchDaemons" "--with-launchdaemons-dir=\${out}/LaunchDaemons"
"--with-launchagents-dir=\${out}/LaunchAgents" "--with-launchagents-dir=\${out}/LaunchAgents"
]; ];
propagatedBuildInputs = [ xorg.xauth ]; propagatedBuildInputs = [ xorg.xauth ]
++ lib.optionals isDarwin [ xorg.libX11 xorg.xproto ];
prePatch = '' prePatch = ''
sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp
''; '';

View File

@ -8196,6 +8196,7 @@ let
libxslt expat libpng zlib perl mesa_drivers spice_protocol libxslt expat libpng zlib perl mesa_drivers spice_protocol
dbus libuuid openssl gperf m4 libevdev tradcpp dbus libuuid openssl gperf m4 libevdev tradcpp
autoconf automake libtool xmlto asciidoc flex bison python mtdev pixman; autoconf automake libtool xmlto asciidoc flex bison python mtdev pixman;
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null;
mesa = mesa_noglu; mesa = mesa_noglu;
udev = if stdenv.isLinux then udev else null; udev = if stdenv.isLinux then udev else null;
libdrm = if stdenv.isLinux then libdrm else null; libdrm = if stdenv.isLinux then libdrm else null;