git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #19816 from veprbl/octave_fixes

octave: darwin fix

commit3187b017203d9b2dfa95eb4060d42991ab196dfa authorDaiderd Jordan <daiderd@gmail.com> dateSat 5 Nov 2016, 10:49 (10 years ago) parentcb6a81c5994c12
5 files changed+28−6
pkgs/development/interpreters/octave/default.nix+4−4 pkgs/development/libraries/fltk/default.nix+2 pkgs/development/libraries/fltk/nsosv.patch+20 pkgs/development/libraries/science/math/openblas/default.nix+1−1 pkgs/top-level/all-packages.nix+1−1
pkgs/development/interpreters/octave/default.nix+4−4
@@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
2525 sha256 = "11y2w6jgngj4rxiy136mkcs02l52rxk60kapyfc4rgrxz5hli3ym";
2626 };
2727
28− buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11
29− graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas libsndfile
30− fftw fftwSinglePrec qrupdate arpack libwebp ]
28+ buildInputs = [ gfortran readline ncurses perl flex texinfo qhull
29+ graphicsmagick pcre pkgconfig fltk zlib curl openblas libsndfile fftw
30+ fftwSinglePrec qrupdate arpack libwebp ]
3131 ++ (stdenv.lib.optional (qt != null) qt)
3232 ++ (stdenv.lib.optional (qscintilla != null) qscintilla)
3333 ++ (stdenv.lib.optional (ghostscript != null) ghostscript)
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
3838 ++ (stdenv.lib.optional (jdk != null) jdk)
3939 ++ (stdenv.lib.optional (gnuplot != null) gnuplot)
4040 ++ (stdenv.lib.optional (python != null) python)
41− ++ (stdenv.lib.optionals (!stdenv.isDarwin) [mesa libX11])
41+ ++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ])
4242 ;
4343
4444 doCheck = !stdenv.isDarwin;
pkgs/development/libraries/fltk/default.nix+2
@@ -21,6 +21,8 @@ composableDerivation.composableDerivation {} {
2121 --replace 'class Fl_XFont_On_Demand' 'class FL_EXPORT Fl_XFont_On_Demand'
2222 '';
2323
24+ patches = stdenv.lib.optionals stdenv.isDarwin [ ./nsosv.patch ];
25+
2426 nativeBuildInputs = [ pkgconfig ];
2527 propagatedBuildInputs = [ inputproto ]
2628 ++ (if stdenv.isDarwin
pkgs/development/libraries/fltk/nsosv.patchnew file+20
@@ -0,0 +1,20 @@
1+diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
2+index 6f5b8b1..2c7763d 100644
3+--- a/src/Fl_cocoa.mm
4++++ b/src/Fl_cocoa.mm
5+@@ -4074,15 +4074,6 @@ Window fl_xid(const Fl_Window* w)
6+ static int calc_mac_os_version() {
7+ int M, m, b = 0;
8+ NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
9+-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
10+- if ([NSProcessInfo instancesRespondToSelector:@selector(operatingSystemVersion)]) {
11+- NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
12+- M = version.majorVersion;
13+- m = version.minorVersion;
14+- b = version.patchVersion;
15+- }
16+- else
17+-#endif
18+ {
19+ NSDictionary * sv = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
20+ const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
pkgs/development/libraries/science/math/openblas/default.nix+1−1
@@ -54,7 +54,7 @@ stdenv.mkDerivation {
5454 makeFlags =
5555 (if local then localFlags else genericFlags)
5656 ++
57− optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.9"]
57+ optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.7"]
5858 ++
5959 [
6060 "FC=gfortran"
pkgs/top-level/all-packages.nix+1−1
@@ -5483,7 +5483,7 @@ in
54835483 glpk = null;
54845484 suitesparse = null;
54855485 jdk = null;
5486− openblas = openblas;
5486+ openblas = if stdenv.isDarwin then openblasCompat else openblas;
54875487 };
54885488 octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
54895489 qt = qt4;