1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

Merge pull request #19816 from veprbl/octave_fixes

octave: darwin fix
This commit is contained in:
Daiderd Jordan 2016-11-05 10:49:33 +01:00 committed by GitHub
commit 3187b01720
5 changed files with 28 additions and 6 deletions

View file

@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
sha256 = "11y2w6jgngj4rxiy136mkcs02l52rxk60kapyfc4rgrxz5hli3ym";
};
buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11
graphicsmagick pcre pkgconfig mesa fltk zlib curl openblas libsndfile
fftw fftwSinglePrec qrupdate arpack libwebp ]
buildInputs = [ gfortran readline ncurses perl flex texinfo qhull
graphicsmagick pcre pkgconfig fltk zlib curl openblas libsndfile fftw
fftwSinglePrec qrupdate arpack libwebp ]
++ (stdenv.lib.optional (qt != null) qt)
++ (stdenv.lib.optional (qscintilla != null) qscintilla)
++ (stdenv.lib.optional (ghostscript != null) ghostscript)
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
++ (stdenv.lib.optional (jdk != null) jdk)
++ (stdenv.lib.optional (gnuplot != null) gnuplot)
++ (stdenv.lib.optional (python != null) python)
++ (stdenv.lib.optionals (!stdenv.isDarwin) [mesa libX11])
++ (stdenv.lib.optionals (!stdenv.isDarwin) [ mesa libX11 ])
;
doCheck = !stdenv.isDarwin;

View file

@ -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

View 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];

View file

@ -54,7 +54,7 @@ stdenv.mkDerivation {
makeFlags =
(if local then localFlags else genericFlags)
++
optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.9"]
optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.7"]
++
[
"FC=gfortran"

View file

@ -5483,7 +5483,7 @@ in
glpk = null;
suitesparse = null;
jdk = null;
openblas = openblas;
openblas = if stdenv.isDarwin then openblasCompat else openblas;
};
octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
qt = qt4;