preparation for being able to build xquartz

This commit is contained in:
Jude Taylor 2015-09-17 14:42:54 -07:00
parent 1bc98b2e36
commit d78936131a
6 changed files with 61 additions and 44 deletions

View File

@ -2,6 +2,7 @@
, python, libxml2Python, file, expat, makedepend, xorg, llvm, libffi, libvdpau
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
, enableExtraFeatures ? false # not maintained
, darwin
}:
let
@ -22,12 +23,20 @@ let
presentproto
libX11 libXext libxcb libXt libxshmfence
libffi libvdpau
] ++ stdenv.lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.OpenGL
darwin.apple_sdk.sdk
darwin.apple_sdk.libs.Xplugin
];
postUnpack = ''
ln -s darwin $sourceRoot/configs/current
'';
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace bin/mklib --replace g++ clang++
'';
patches = [
./patches/0003-mesa-fix-per-level-max-texture-size-error-checking.patch
./patches/0008-glsl-initialise-const-force-glsl-extension-warning-i.patch

View File

@ -120,7 +120,7 @@ in rec {
__propagatedImpureHostDeps = [ "/usr/lib/libXplugin.1.dylib" ];
propagatedBuildInputs = with frameworks; [
OpenGL ApplicationServices Carbon IOKit CoreFoundation CoreGraphics CoreServices CoreText
OpenGL ApplicationServices Carbon IOKit CF CoreGraphics CoreServices CoreText
];
installPhase = ''
@ -144,9 +144,7 @@ in rec {
};
};
frameworks = (stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs; })) // {
CoreFoundation = CF;
};
frameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { inherit frameworks libs CF; });
inherit sdk;
}

View File

@ -2,76 +2,76 @@
# Epic weird knot-tying happening here.
# TODO: clean up the process for generating this and include it
{ frameworks, libs }:
{ frameworks, libs, CF }:
with frameworks; with libs; {
AGL = [ Carbon OpenGL ];
AVFoundation = [ ApplicationServices CoreGraphics ];
AVKit = [];
Accounts = [];
AddressBook = [ Carbon CoreFoundation ];
AddressBook = [ Carbon CF ];
AppKit = [ AudioToolbox QuartzCore ];
AppKitScripting = [];
AppleScriptKit = [];
AppleScriptObjC = [];
AppleShareClientCore = [ CoreServices ];
AudioToolbox = [ AudioUnit CoreAudio CoreFoundation CoreMIDI ];
AudioUnit = [ Carbon CoreAudio CoreFoundation ];
AudioToolbox = [ AudioUnit CoreAudio CF CoreMIDI ];
AudioUnit = [ Carbon CoreAudio CF ];
AudioVideoBridging = [ Foundation ];
Automator = [];
CFNetwork = [ CoreFoundation ];
CFNetwork = [ CF ];
CalendarStore = [];
Cocoa = [];
Collaboration = [];
CoreAudio = [ CoreFoundation IOKit ];
CoreAudio = [ CF IOKit ];
CoreAudioKit = [ AudioUnit ];
CoreData = [];
CoreGraphics = [ Accelerate CoreFoundation IOKit IOSurface SystemConfiguration ];
CoreGraphics = [ Accelerate CF IOKit IOSurface SystemConfiguration ];
CoreLocation = [];
CoreMIDI = [ CoreFoundation ];
CoreMIDI = [ CF ];
CoreMIDIServer = [];
CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CoreFoundation CoreGraphics CoreVideo ];
CoreMediaIO = [ CoreFoundation CoreMedia ];
CoreText = [ CoreFoundation CoreGraphics ];
CoreVideo = [ ApplicationServices CoreFoundation CoreGraphics IOSurface OpenGL ];
CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ];
CoreMediaIO = [ CF CoreMedia ];
CoreText = [ CF CoreGraphics ];
CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ];
CoreWLAN = [ SecurityFoundation ];
DVComponentGlue = [ CoreServices QuickTime ];
DVDPlayback = [];
DirectoryService = [ CoreFoundation ];
DiscRecording = [ CoreFoundation CoreServices IOKit ];
DirectoryService = [ CF ];
DiscRecording = [ CF CoreServices IOKit ];
DiscRecordingUI = [];
DiskArbitration = [ CoreFoundation IOKit ];
DiskArbitration = [ CF IOKit ];
DrawSprocket = [ Carbon ];
EventKit = [];
ExceptionHandling = [];
FWAUserLib = [];
ForceFeedback = [ CoreFoundation IOKit ];
Foundation = [ CoreFoundation Security ApplicationServices AppKit SystemConfiguration ];
GLKit = [ CoreFoundation ];
ForceFeedback = [ CF IOKit ];
Foundation = [ CF Security ApplicationServices AppKit SystemConfiguration ];
GLKit = [ CF ];
GLUT = [ GL OpenGL ];
GSS = [];
GameController = [];
GameKit = [ Foundation ];
ICADevices = [ Carbon CoreFoundation IOBluetooth ];
ICADevices = [ Carbon CF IOBluetooth ];
IMServicePlugIn = [];
IOBluetoothUI = [ IOBluetooth ];
IOKit = [ CoreFoundation ];
IOSurface = [ CoreFoundation IOKit xpc ];
IOKit = [ CF ];
IOSurface = [ CF IOKit xpc ];
ImageCaptureCore = [];
ImageIO = [ CoreFoundation CoreGraphics ];
ImageIO = [ CF CoreGraphics ];
InputMethodKit = [ Carbon ];
InstallerPlugins = [];
InstantMessage = [];
JavaFrameEmbedding = [];
JavaScriptCore = [ CoreFoundation ];
JavaScriptCore = [ CF ];
Kerberos = [];
Kernel = [ CoreFoundation IOKit ];
Kernel = [ CF IOKit ];
LDAP = [];
LatentSemanticMapping = [ Carbon CoreFoundation ];
LatentSemanticMapping = [ Carbon CF ];
MapKit = [];
MediaAccessibility = [ CoreFoundation CoreGraphics CoreText QuartzCore ];
MediaToolbox = [ AudioToolbox CoreFoundation CoreMedia ];
NetFS = [ CoreFoundation ];
MediaAccessibility = [ CF CoreGraphics CoreText QuartzCore ];
MediaToolbox = [ AudioToolbox CF CoreMedia ];
NetFS = [ CF ];
OSAKit = [ Carbon ];
OpenAL = [];
OpenCL = [ IOSurface OpenGL ];
@ -81,7 +81,7 @@ with frameworks; with libs; {
PubSub = [];
Python = [ ApplicationServices ];
QTKit = [ QuickTime ];
QuickLook = [ ApplicationServices CoreFoundation ];
QuickLook = [ ApplicationServices CF ];
QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ];
Ruby = [];
RubyCocoa = [];
@ -89,31 +89,31 @@ with frameworks; with libs; {
ScreenSaver = [];
Scripting = [];
ScriptingBridge = [];
Security = [ CoreFoundation IOKit ];
Security = [ CF IOKit ];
SecurityFoundation = [];
SecurityInterface = [ Security ];
ServiceManagement = [ CoreFoundation Security ];
ServiceManagement = [ CF Security ];
Social = [];
SpriteKit = [];
StoreKit = [];
SyncServices = [];
SystemConfiguration = [ CoreFoundation Security ];
SystemConfiguration = [ CF Security ];
TWAIN = [ Carbon ];
Tcl = [];
Tk = [ ApplicationServices Carbon X11 ];
VideoDecodeAcceleration = [ CoreFoundation CoreVideo ];
VideoToolbox = [ CoreFoundation CoreMedia CoreVideo ];
VideoDecodeAcceleration = [ CF CoreVideo ];
VideoToolbox = [ CF CoreMedia CoreVideo ];
WebKit = [ ApplicationServices Carbon JavaScriptCore OpenGL X11 ];
# Umbrellas
Accelerate = [ CoreWLAN IOBluetooth ];
ApplicationServices = [ CoreFoundation CoreServices CoreText ImageIO ];
Carbon = [ ApplicationServices CoreFoundation CoreServices IOKit Security QuartzCore ];
ApplicationServices = [ CF CoreServices CoreText ImageIO ];
Carbon = [ ApplicationServices CF CoreServices IOKit Security QuartzCore ];
CoreBluetooth = [];
CoreServices = [ CFNetwork CoreAudio CoreData CoreFoundation DiskArbitration Security NetFS OpenDirectory ServiceManagement ];
CoreServices = [ CFNetwork CoreAudio CoreData CF DiskArbitration Security NetFS OpenDirectory ServiceManagement ];
IOBluetooth = [ IOKit ];
JavaVM = [];
OpenDirectory = [];
Quartz = [ QuickLook ];
QuartzCore = [ ApplicationServices CoreFoundation CoreVideo OpenCL ];
QuartzCore = [ ApplicationServices CF CoreVideo OpenCL ];
}

View File

@ -47,8 +47,9 @@ appleDerivation {
'';
postInstall = ''
# gross! convince apple to release this as part of CF
cp /System/Library/Frameworks/CoreFoundation.framework/Headers/CFAttributedString.h "$out/System/Library/Frameworks/CoreFoundation.framework/Headers"
# gross! convince apple to release these as part of CF
cp /System/Library/Frameworks/CoreFoundation.framework/Headers/{CFAttributedString,CFNotificationCenter}.h \
"$out/System/Library/Frameworks/CoreFoundation.framework/Headers"
mv $out/System/* $out
rmdir $out/System

View File

@ -93,6 +93,10 @@ in
outputs = [ "out" "man" ];
};
libAppleWM = attrs: attrs // {
propagatedBuildInputs = [ args.apple_sdk.frameworks.ApplicationServices ];
};
libXfont = attrs: attrs // {
propagatedBuildInputs = [ args.freetype ]; # propagate link reqs. like bzip2
# prevents "misaligned_stack_error_entering_dyld_stub_binder"

View File

@ -9225,6 +9225,11 @@ let
quartz-wm = callPackage ../servers/x11/quartz-wm { stdenv = clangStdenv; };
xorg = recurseIntoAttrs (lib.callPackagesWith pkgs ../servers/x11/xorg/default.nix {
inherit clangStdenv fetchurl fetchgit fetchpatch stdenv pkgconfig intltool freetype fontconfig
libxslt expat libpng zlib perl mesa_drivers spice_protocol
dbus libuuid openssl gperf m4 libevdev tradcpp libinput mcpp makeWrapper autoreconfHook
autoconf automake libtool xmlto asciidoc flex bison python mtdev pixman;
inherit (darwin) apple_sdk;
bootstrap_cmds = if stdenv.isDarwin then darwin.bootstrap_cmds else null;
mesa = mesa_noglu;
udev = if stdenv.isLinux then udev else null;