fix xorgserver / xquartz on darwin
This commit is contained in:
parent
b45aa294d4
commit
7f7482b6bd
3 changed files with 18 additions and 3 deletions
11
pkgs/servers/x11/xorg/fix-clang.patch
Normal file
11
pkgs/servers/x11/xorg/fix-clang.patch
Normal 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
|
|
@ -274,7 +274,8 @@ in
|
|||
libpciaccess inputproto xextproto randrproto renderproto presentproto
|
||||
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,
|
||||
# and the second to get Xvfb, Xnest, etc.
|
||||
darwinOtherX = overrideDerivation xorgserver (oldAttrs: {
|
||||
|
@ -313,7 +314,7 @@ in
|
|||
url = mirror://xorg/individual/xserver/xorg-server-1.14.6.tar.bz2;
|
||||
sha256 = "0c57vp1z0p38dj5gfipkmlw6bvbz1mrr0sb3sbghdxxdyq4kzcz8";
|
||||
};
|
||||
buildInputs = commonBuildInputs;
|
||||
buildInputs = commonBuildInputs ++ [ args.bootstrap_cmds ];
|
||||
propagatedBuildInputs = commonPropagatedBuildInputs ++ [
|
||||
libAppleWM applewmproto
|
||||
];
|
||||
|
@ -377,6 +378,7 @@ in
|
|||
|
||||
xinit = attrs: attrs // {
|
||||
stdenv = if isDarwin then args.clangStdenv else stdenv;
|
||||
buildInputs = if isDarwin then [ args.bootstrap_cmds args.pkgconfig ] else null;
|
||||
configureFlags = [
|
||||
"--with-xserver=${xorg.xorgserver}/bin/X"
|
||||
] ++ lib.optionals isDarwin [
|
||||
|
@ -384,7 +386,8 @@ in
|
|||
"--with-launchdaemons-dir=\${out}/LaunchDaemons"
|
||||
"--with-launchagents-dir=\${out}/LaunchAgents"
|
||||
];
|
||||
propagatedBuildInputs = [ xorg.xauth ];
|
||||
propagatedBuildInputs = [ xorg.xauth ]
|
||||
++ lib.optionals isDarwin [ xorg.libX11 xorg.xproto ];
|
||||
prePatch = ''
|
||||
sed -i 's|^defaultserverargs="|&-logfile \"$HOME/.xorg.log\"|p' startx.cpp
|
||||
'';
|
||||
|
|
|
@ -8188,6 +8188,7 @@ let
|
|||
libxslt expat libpng zlib perl mesa_drivers spice_protocol
|
||||
dbus libuuid openssl gperf m4 libevdev tradcpp
|
||||
autoconf automake libtool xmlto asciidoc flex bison python mtdev pixman;
|
||||
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null;
|
||||
mesa = mesa_noglu;
|
||||
udev = if stdenv.isLinux then udev else null;
|
||||
libdrm = if stdenv.isLinux then libdrm else null;
|
||||
|
|
Loading…
Reference in a new issue