mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
fltk: fix on darwin
Compiling Fl_cocoa.mm... Fl_cocoa.mm:4079:30: error: use of undeclared identifier 'version'; did you mean 'Fl::version'? NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; ^~~~~~~ Fl::version ../FL/Fl.H:262:17: note: 'Fl::version' declared here static double version(); ^ Fl_cocoa.mm:4079:5: error: use of undeclared identifier 'NSOperatingSystemVersion' NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; ^ Fl_cocoa.mm:4080:9: error: use of undeclared identifier 'version' M = version.majorVersion; ^ Fl_cocoa.mm:4081:9: error: use of undeclared identifier 'version' m = version.minorVersion; ^ Fl_cocoa.mm:4082:9: error: use of undeclared identifier 'version' b = version.patchVersion; ^ 5 errors generated.
This commit is contained in:
parent
a4e43841a2
commit
e35ddbec13
|
@ -21,6 +21,8 @@ composableDerivation.composableDerivation {} {
|
|||
--replace 'class Fl_XFont_On_Demand' 'class FL_EXPORT Fl_XFont_On_Demand'
|
||||
'';
|
||||
|
||||
patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
propagatedBuildInputs = [ inputproto ]
|
||||
++ (if stdenv.isDarwin
|
||||
|
|
20
pkgs/development/libraries/fltk/nsosv.patch
Normal file
20
pkgs/development/libraries/fltk/nsosv.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
|
||||
index 6f5b8b1..2c7763d 100644
|
||||
--- a/src/Fl_cocoa.mm
|
||||
+++ b/src/Fl_cocoa.mm
|
||||
@@ -4074,15 +4074,6 @@ Window fl_xid(const Fl_Window* w)
|
||||
static int calc_mac_os_version() {
|
||||
int M, m, b = 0;
|
||||
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
|
||||
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||
- if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) {
|
||||
- NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
- M = version.majorVersion;
|
||||
- m = version.minorVersion;
|
||||
- b = version.patchVersion;
|
||||
- }
|
||||
- else
|
||||
-#endif
|
||||
{
|
||||
NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
|
||||
const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
|
Loading…
Reference in a new issue