Merge pull request #56744 from matthewbauer/macos-10-12
Update macOS to 10.12
This commit is contained in:
commit
87944c3125
@ -44,5 +44,6 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ goibhniu lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||
"--enable-mac-app=$$out/Applications"
|
||||
];
|
||||
|
||||
CFLAGS = "-O3 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10";
|
||||
CFLAGS = "-O3";
|
||||
LDFLAGS = "-O3 -L${ncurses.out}/lib";
|
||||
|
||||
postInstall = ''
|
||||
|
@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0m83c33rzxvs0w214njql2c7q3fg06wnyijch3l2s88i7frl121f";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "It's like cat, but for images";
|
||||
homepage = https://github.com/eddieantonio/imgcat;
|
||||
|
@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
|
||||
cp obj-unix/tthsum $out/bin
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "An md5sum-alike program that works with Tiger/THEX hashes";
|
||||
longDescription = ''
|
||||
|
@ -153,15 +153,9 @@ stdenv.mkDerivation rec {
|
||||
]
|
||||
++ lib.optionals (!isTorBrowserLike) [
|
||||
"-I${nss.dev}/include/nss"
|
||||
]
|
||||
++ lib.optional stdenv.isDarwin [
|
||||
"-isystem ${llvmPackages.libcxx}/include/c++/v1"
|
||||
"-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10"
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace js/src/jsmath.cpp --replace 'defined(HAVE___SINCOS)' 0
|
||||
'' + lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) ''
|
||||
postPatch = lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) ''
|
||||
substituteInPlace third_party/prio/prio/rand.c --replace 'nspr/prinit.h' 'prinit.h'
|
||||
'';
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
# Not mentioned but seems needed
|
||||
, qtgraphicaleffects
|
||||
, qtdeclarative
|
||||
, qtmacextras
|
||||
}:
|
||||
|
||||
let
|
||||
@ -37,7 +38,8 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ pkgconfig qmake makeWrapper ];
|
||||
buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ]
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio;
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A glossy client for Matrix, written in QtQuick Controls 2 and C++";
|
||||
|
@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
|
||||
./gcc6.patch
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
|
||||
|
||||
meta = {
|
||||
description = "Renders an image of the earth or other planets into the X root window";
|
||||
homepage = http://xplanet.sourceforge.net;
|
||||
|
@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [cmake];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Computational Morphometry Toolkit ";
|
||||
longDescription = ''A software toolkit for computational morphometry of
|
||||
|
@ -5,10 +5,32 @@
|
||||
# rewritten to /nix/store/<hash>/bin/python. Interpreters that are
|
||||
# already in the store are left untouched.
|
||||
|
||||
fixupOutputHooks+=('if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then patchShebangs "$prefix"; fi')
|
||||
fixupOutputHooks+=(patchShebangsAuto)
|
||||
|
||||
# Run patch shebangs on a directory.
|
||||
# patchShebangs [--build | --host] directory
|
||||
|
||||
# Flags:
|
||||
# --build : Lookup commands available at build-time
|
||||
# --host : Lookup commands available at runtime
|
||||
|
||||
# Example use cases,
|
||||
# $ patchShebangs --host /nix/store/...-hello-1.0/bin
|
||||
# $ patchShebangs --build configure
|
||||
|
||||
patchShebangs() {
|
||||
local pathName
|
||||
|
||||
if [ "$1" = "--host" ]; then
|
||||
pathName=HOST_PATH
|
||||
shift
|
||||
elif [ "$1" = "--build" ]; then
|
||||
pathName=PATH
|
||||
shift
|
||||
fi
|
||||
|
||||
local dir="$1"
|
||||
|
||||
header "patching script interpreter paths in $dir"
|
||||
local f
|
||||
local oldPath
|
||||
@ -27,6 +49,14 @@ patchShebangs() {
|
||||
oldInterpreterLine=$(head -1 "$f" | tail -c+3)
|
||||
read -r oldPath arg0 args <<< "$oldInterpreterLine"
|
||||
|
||||
if [ -z "$pathName" ]; then
|
||||
if [ -n "$strictDeps" ] && [[ "$f" = "$NIX_STORE"* ]]; then
|
||||
pathName=HOST_PATH
|
||||
else
|
||||
pathName=PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if $(echo "$oldPath" | grep -q "/bin/env$"); then
|
||||
# Check for unsupported 'env' functionality:
|
||||
# - options: something starting with a '-'
|
||||
@ -35,14 +65,17 @@ patchShebangs() {
|
||||
echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)"
|
||||
exit 1
|
||||
fi
|
||||
newPath="$(command -v "$arg0" || true)"
|
||||
|
||||
newPath="$(PATH="${!pathName}" command -v "$arg0" || true)"
|
||||
else
|
||||
if [ "$oldPath" = "" ]; then
|
||||
# If no interpreter is specified linux will use /bin/sh. Set
|
||||
# oldpath="/bin/sh" so that we get /nix/store/.../sh.
|
||||
oldPath="/bin/sh"
|
||||
fi
|
||||
newPath="$(command -v "$(basename "$oldPath")" || true)"
|
||||
|
||||
newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)"
|
||||
|
||||
args="$arg0 $args"
|
||||
fi
|
||||
|
||||
@ -66,3 +99,17 @@ patchShebangs() {
|
||||
|
||||
stopNest
|
||||
}
|
||||
|
||||
patchShebangsAuto () {
|
||||
if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then
|
||||
|
||||
# Dev output will end up being run on the build platform. An
|
||||
# example case of this is sdl2-config. Otherwise, we can just
|
||||
# use the runtime path (--host).
|
||||
if [ "$output" != out ] && [ "$output" = "$outputDev" ]; then
|
||||
patchShebangs --build "$prefix"
|
||||
else
|
||||
patchShebangs --host "$prefix"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
@ -86,9 +86,6 @@ expandResponseParams() {
|
||||
#shellcheck disable=SC2034
|
||||
readarray -d '' params < <("@expandResponseParams@" "$@")
|
||||
return 0
|
||||
else
|
||||
echo "Response files aren't supported during bootstrapping" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
"-Dgtk_doc=true"
|
||||
];
|
||||
|
||||
doCheck = !stdenv.isAarch64;
|
||||
doCheck = !stdenv.isAarch64 && !stdenv.isDarwin;
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome3.updateScript {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, newScope }:
|
||||
{ pkgs, newScope, stdenv, llvmPackages_6 }:
|
||||
|
||||
let
|
||||
callPackage = newScope self;
|
||||
@ -10,7 +10,9 @@ let
|
||||
gorm = callPackage ./gorm {};
|
||||
projectcenter = callPackage ./projectcenter {};
|
||||
system_preferences = callPackage ./systempreferences {};
|
||||
libobjc = callPackage ./libobjc2 {};
|
||||
libobjc = callPackage ./libobjc2 {
|
||||
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
|
||||
};
|
||||
make = callPackage ./make {};
|
||||
back = callPackage ./back {};
|
||||
base = callPackage ./base { giflib = pkgs.giflib_4_1; };
|
||||
|
@ -418,6 +418,7 @@ stdenv.mkDerivation ({
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -430,6 +430,7 @@ stdenv.mkDerivation ({
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -435,6 +435,7 @@ stdenv.mkDerivation ({
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -131,11 +131,6 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = optionalString stdenv.isDarwin ''
|
||||
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
|
||||
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
|
||||
'';
|
||||
|
||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||
GOARCH = if stdenv.isDarwin then "amd64"
|
||||
else if stdenv.hostPlatform.system == "i686-linux" then "386"
|
||||
@ -187,5 +182,6 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cstrahan orivej velovix mic92 ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -136,11 +136,6 @@ stdenv.mkDerivation rec {
|
||||
./skip-test-extra-files-on-386.patch
|
||||
];
|
||||
|
||||
postPatch = optionalString stdenv.isDarwin ''
|
||||
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
|
||||
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
|
||||
'';
|
||||
|
||||
GOOS = stdenv.targetPlatform.parsed.kernel.name;
|
||||
GOARCH = goarch stdenv.targetPlatform;
|
||||
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
|
||||
@ -188,7 +183,7 @@ stdenv.mkDerivation rec {
|
||||
(cd src && ./make.bash)
|
||||
'';
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
|
||||
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
@ -141,9 +141,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
find . -name '*.orig' -exec rm {} ';'
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
|
||||
substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil
|
||||
'';
|
||||
|
||||
GOOS = stdenv.targetPlatform.parsed.kernel.name;
|
||||
@ -193,7 +190,7 @@ stdenv.mkDerivation rec {
|
||||
(cd src && ./make.bash)
|
||||
'';
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.targetPlatform;
|
||||
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
@ -150,7 +150,7 @@ stdenv.mkDerivation rec {
|
||||
else
|
||||
"";
|
||||
|
||||
doCheck = !bootstrapVersion;
|
||||
doCheck = !bootstrapVersion && !stdenv.isDarwin;
|
||||
|
||||
checkPhase = stdenv.lib.optionalString doCheck ''
|
||||
# Build default lib test runners
|
||||
|
@ -43,5 +43,6 @@ stdenv.mkDerivation rec {
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with stdenv.lib.licenses; [ ncsa mit ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -27,5 +27,6 @@ stdenv.mkDerivation {
|
||||
homepage = http://lld.llvm.org/;
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -27,5 +27,6 @@ stdenv.mkDerivation {
|
||||
homepage = http://lld.llvm.org/;
|
||||
license = stdenv.lib.licenses.ncsa;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -1,74 +0,0 @@
|
||||
commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d
|
||||
Author: Tobias Mayer <tobim@fastmail.fm>
|
||||
Date: Wed Feb 13 12:44:17 2019 +0100
|
||||
|
||||
Provide clock_gettime for xray on macos < 10.12
|
||||
|
||||
diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc
|
||||
index a46c151af..38aea6932 100644
|
||||
--- a/lib/xray/xray_basic_logging.cc
|
||||
+++ b/lib/xray/xray_basic_logging.cc
|
||||
@@ -36,6 +36,29 @@
|
||||
#include "xray_tsc.h"
|
||||
#include "xray_utils.h"
|
||||
|
||||
+#if __MACH__
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+enum clockid_t {
|
||||
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
|
||||
+ CLOCK_REALTIME = REALTIME_CLOCK
|
||||
+};
|
||||
+
|
||||
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
|
||||
+ if (ts != NULL) {
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), clock_id, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ ts->tv_sec = mts.tv_sec;
|
||||
+ ts->tv_nsec = mts.tv_nsec;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace __xray {
|
||||
|
||||
SpinMutex LogMutex;
|
||||
diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc
|
||||
index 4b308b27f..1d044c8fd 100644
|
||||
--- a/lib/xray/xray_fdr_logging.cc
|
||||
+++ b/lib/xray/xray_fdr_logging.cc
|
||||
@@ -38,6 +38,29 @@
|
||||
#include "xray_tsc.h"
|
||||
#include "xray_utils.h"
|
||||
|
||||
+#if __MACH__
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+enum clockid_t {
|
||||
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
|
||||
+ CLOCK_REALTIME = REALTIME_CLOCK
|
||||
+};
|
||||
+
|
||||
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
|
||||
+ if (ts != NULL) {
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), clock_id, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ ts->tv_sec = mts.tv_sec;
|
||||
+ ts->tv_nsec = mts.tv_nsec;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace __xray {
|
||||
|
||||
atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED};
|
@ -26,9 +26,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch;
|
||||
|
||||
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
|
||||
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
|
||||
|
@ -1,74 +0,0 @@
|
||||
commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d
|
||||
Author: Tobias Mayer <tobim@fastmail.fm>
|
||||
Date: Wed Feb 13 12:44:17 2019 +0100
|
||||
|
||||
Provide clock_gettime for xray on macos < 10.12
|
||||
|
||||
diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc
|
||||
index a46c151af..38aea6932 100644
|
||||
--- a/lib/xray/xray_basic_logging.cc
|
||||
+++ b/lib/xray/xray_basic_logging.cc
|
||||
@@ -36,6 +36,29 @@
|
||||
#include "xray_tsc.h"
|
||||
#include "xray_utils.h"
|
||||
|
||||
+#if __MACH__
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+enum clockid_t {
|
||||
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
|
||||
+ CLOCK_REALTIME = REALTIME_CLOCK
|
||||
+};
|
||||
+
|
||||
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
|
||||
+ if (ts != NULL) {
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), clock_id, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ ts->tv_sec = mts.tv_sec;
|
||||
+ ts->tv_nsec = mts.tv_nsec;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace __xray {
|
||||
|
||||
SpinMutex LogMutex;
|
||||
diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc
|
||||
index 4b308b27f..1d044c8fd 100644
|
||||
--- a/lib/xray/xray_fdr_logging.cc
|
||||
+++ b/lib/xray/xray_fdr_logging.cc
|
||||
@@ -38,6 +38,29 @@
|
||||
#include "xray_tsc.h"
|
||||
#include "xray_utils.h"
|
||||
|
||||
+#if __MACH__
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+enum clockid_t {
|
||||
+ CLOCK_MONOTONIC = REALTIME_CLOCK,
|
||||
+ CLOCK_REALTIME = REALTIME_CLOCK
|
||||
+};
|
||||
+
|
||||
+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
|
||||
+ if (ts != NULL) {
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), clock_id, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ ts->tv_sec = mts.tv_sec;
|
||||
+ ts->tv_nsec = mts.tv_nsec;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return -1;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace __xray {
|
||||
|
||||
atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED};
|
@ -34,8 +34,7 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch;
|
||||
|
||||
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
|
||||
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
|
||||
|
@ -2,6 +2,8 @@
|
||||
, buildPackages
|
||||
, newScope, callPackage
|
||||
, CoreFoundation, Security
|
||||
, llvmPackages_5
|
||||
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
|
||||
}: rec {
|
||||
makeRustPlatform = { rustc, cargo, ... }: {
|
||||
rust = {
|
||||
@ -48,10 +50,15 @@
|
||||
buildRustPackages = buildPackages.rust.packages.stable;
|
||||
# Analogous to stdenv
|
||||
rustPlatform = makeRustPlatform self.buildRustPackages;
|
||||
rustc = self.callPackage ./rustc.nix {
|
||||
rustc = self.callPackage ./rustc.nix ({
|
||||
# Use boot package set to break cycle
|
||||
rustPlatform = bootRustPlatform;
|
||||
};
|
||||
} // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) {
|
||||
stdenv = llvmPackages_5.stdenv;
|
||||
pkgsBuildBuild = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
|
||||
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
|
||||
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages_5.stdenv; };
|
||||
});
|
||||
cargo = self.callPackage ./cargo.nix {
|
||||
# Use boot package set to break cycle
|
||||
rustPlatform = bootRustPlatform;
|
||||
|
@ -128,25 +128,6 @@ self: super: builtins.intersectAttrs super {
|
||||
# the system-fileio tests use canonicalizePath, which fails in the sandbox
|
||||
system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio;
|
||||
|
||||
# Prevents needing to add `security_tool` as a run-time dependency for
|
||||
# everything using x509-system to give access to the `security` executable.
|
||||
x509-system = if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc
|
||||
then let inherit (pkgs.darwin) security_tool;
|
||||
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
|
||||
# darwin.security_tool is broken in Mojave (#45042)
|
||||
|
||||
# We will use the system provided security for now.
|
||||
# Beware this WILL break in sandboxes!
|
||||
|
||||
# TODO(matthewbauer): If someone really needs this to work in sandboxes,
|
||||
# I think we can add a propagatedImpureHost dep here, but I’m hoping to
|
||||
# get a proper fix available soonish.
|
||||
postPatch = (drv.postPatch or "") + ''
|
||||
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
|
||||
'';
|
||||
})
|
||||
else super.x509-system;
|
||||
|
||||
# https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216
|
||||
gio = disableHardening (addPkgconfigDepend (addBuildTool super.gio self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"];
|
||||
glib = disableHardening (addPkgconfigDepend (addBuildTool super.glib self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"];
|
||||
|
@ -46,7 +46,14 @@
|
||||
})
|
||||
./riscv.patch
|
||||
] ++
|
||||
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
|
||||
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch)
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
|
||||
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
|
||||
})
|
||||
./filter-mkostemp-darwin.patch
|
||||
];
|
||||
|
||||
# Explicitly link against libgcc_s, to work around the infamous
|
||||
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
|
||||
|
@ -2,6 +2,7 @@
|
||||
, fetchurl, makeWrapper, gawk, pkgconfig
|
||||
, libffi, libtool, readline, gmp, boehmgc, libunistring
|
||||
, coverageAnalysis ? null
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
# Do either a coverage analysis build or a standard build.
|
||||
@ -42,8 +43,11 @@
|
||||
patches = [
|
||||
./eai_system.patch
|
||||
./riscv.patch
|
||||
] ++
|
||||
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
|
||||
] ++ stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch
|
||||
++ stdenv.lib.optional stdenv.isDarwin (fetchpatch {
|
||||
url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch";
|
||||
sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207";
|
||||
});
|
||||
|
||||
# Explicitly link against libgcc_s, to work around the infamous
|
||||
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
|
||||
|
@ -0,0 +1,28 @@
|
||||
Filter incompat. mkostemp(3) flags on macOS 10.12
|
||||
|
||||
macOS Sierra introduces a mkostemp(3) function which is used when
|
||||
present. Contrary to the GNUlib version of mkostemp(3) that was used
|
||||
previously, this version fails with 'invalid argument' when flags other
|
||||
than from a specified set are passed. From mktemp(3):
|
||||
|
||||
| The mkostemp() function is like mkstemp() but allows specifying
|
||||
| additional open(2) flags (defined in <fcntl.h>). The permitted flags
|
||||
| are O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC.
|
||||
|
||||
Signed-off-by: Clemens Lang <cal@macports.org>
|
||||
Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23]
|
||||
--- a/libguile/filesys.c.orig 2017-01-09 00:53:27.000000000 +0100
|
||||
+++ b/libguile/filesys.c 2017-01-09 00:54:48.000000000 +0100
|
||||
@@ -1486,6 +1486,12 @@
|
||||
mode_bits = scm_i_mode_bits (mode);
|
||||
}
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+ /* macOS starting with 10.12 defines mkostemp(2) which is used if defined,
|
||||
+ * but only accepts some flags according to its manpage. It fails with
|
||||
+ * invalid argument when other flags are passed. */
|
||||
+ open_flags &= O_APPEND | O_SHLOCK | O_EXLOCK | O_CLOEXEC;
|
||||
+#endif
|
||||
SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags));
|
||||
if (rv == -1)
|
||||
SCM_SYSERROR;
|
@ -3,11 +3,33 @@
|
||||
callPackage ./generic.nix (args // rec {
|
||||
version = "1.67.0";
|
||||
|
||||
patches = [ (fetchpatch {
|
||||
url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch";
|
||||
sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h";
|
||||
stripLen = 1;
|
||||
})];
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch";
|
||||
sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h";
|
||||
stripLen = 1;
|
||||
})
|
||||
] ++ stdenv.lib.optionals stdenv.cc.isClang [
|
||||
# Fixes https://github.com/boostorg/atomic/issues/15
|
||||
(fetchpatch {
|
||||
url = https://github.com/boostorg/atomic/commit/6e14ca24dab50ad4c1fa8c27c7dd6f1cb791b534.patch;
|
||||
sha256 = "102g35ygvv8cxagp9651284xk4vybk93q2fm577y4mdxf5k46b7a";
|
||||
stripLen = 1;
|
||||
})
|
||||
|
||||
# Needed for the next patch
|
||||
(fetchpatch {
|
||||
url = https://github.com/boostorg/asio/commit/38cb19719748ad56b14d73ca1fff5828f36e5894.patch;
|
||||
sha256 = "0cj9cxz9rfbsx8p8f5alxx00dq3r7g0vh23j68bbxbs9gq1arq2n";
|
||||
stripLen = 1;
|
||||
})
|
||||
# Fixes https://github.com/boostorg/asio/pull/91
|
||||
(fetchpatch {
|
||||
url = https://github.com/boostorg/asio/commit/43874d5497414c67655d901e48c939ef01337edb.patch;
|
||||
sha256 = "1c2ds164s2ygvpb4785p4ncv8ywbpm08cphirb99xp4mqvb693is";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/boost/boost_1_67_0.tar.bz2";
|
||||
|
@ -114,8 +114,9 @@ stdenv.mkDerivation {
|
||||
description = "Collection of C++ libraries";
|
||||
license = stdenv.lib.licenses.boost;
|
||||
|
||||
platforms = (platforms.unix ++ platforms.windows);
|
||||
badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux";
|
||||
platforms = platforms.unix ++ platforms.windows;
|
||||
badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux"
|
||||
++ stdenv.lib.optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin";
|
||||
maintainers = with maintainers; [ peti ];
|
||||
};
|
||||
|
||||
|
@ -40,6 +40,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=argument-outside-range";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A professional free 3D Game Multiphysics Library";
|
||||
longDescription = ''
|
||||
|
@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
|
||||
# /build/clucene-core-2.3.3.4/build/bin/cl_test"
|
||||
doCheck = false;
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Core library for full-featured text search engine";
|
||||
longDescription = ''
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, libpulseaudio, alsaLib, libcap
|
||||
, CoreAudio, CoreServices, AudioUnit
|
||||
, CoreAudio, CoreServices, AudioUnit, AudioToolbox
|
||||
, usePulseAudio }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ libcddb ncurses help2man ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Carbon IOKit ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A library for OS-independent CD-ROM and CD image access";
|
||||
|
@ -14,17 +14,12 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [ libpthreadstubs libpciaccess valgrind-light ];
|
||||
# libdrm as of 2.4.70 does not actually do anything with udev.
|
||||
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
|
||||
|
||||
postPatch = ''
|
||||
for a in */*-symbol-check ; do
|
||||
patchShebangs $a
|
||||
done
|
||||
'';
|
||||
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
|
||||
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
|
||||
|
||||
configureFlags = [ "--enable-install-test-programs" ]
|
||||
++ stdenv.lib.optionals (stdenv.isAarch32 || stdenv.isAarch64)
|
||||
[ "--enable-tegra-experimental-api" "--enable-etnaviv-experimental-api" ]
|
||||
|
@ -1,88 +0,0 @@
|
||||
diff -Naur libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c libdrm-2.4.26/intel/intel_bufmgr_gem.c
|
||||
--- libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c 2011-04-01 10:30:51.000000000 -0400
|
||||
+++ libdrm-2.4.26/intel/intel_bufmgr_gem.c 2011-08-29 02:17:20.000000000 -0400
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdbool.h>
|
||||
+#include <sys/time.h>
|
||||
|
||||
#include "errno.h"
|
||||
#include "libdrm_lists.h"
|
||||
@@ -987,9 +988,9 @@
|
||||
if (atomic_dec_and_test(&bo_gem->refcount)) {
|
||||
drm_intel_bufmgr_gem *bufmgr_gem =
|
||||
(drm_intel_bufmgr_gem *) bo->bufmgr;
|
||||
- struct timespec time;
|
||||
+ struct timeval time;
|
||||
|
||||
- clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
+ gettimeofday(&time, NULL);
|
||||
|
||||
pthread_mutex_lock(&bufmgr_gem->lock);
|
||||
drm_intel_gem_bo_unreference_final(bo, time.tv_sec);
|
||||
diff -Naur libdrm-2.4.26-orig/xf86drm.c libdrm-2.4.26/xf86drm.c
|
||||
--- libdrm-2.4.26-orig/xf86drm.c 2011-03-21 09:39:24.000000000 -0400
|
||||
+++ libdrm-2.4.26/xf86drm.c 2011-08-29 02:17:49.000000000 -0400
|
||||
@@ -51,6 +51,9 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdarg.h>
|
||||
+#if defined(__APPLE__) && defined(__MACH__)
|
||||
+#include <mach/mach_time.h>
|
||||
+#endif
|
||||
|
||||
/* Not all systems have MAP_FAILED defined */
|
||||
#ifndef MAP_FAILED
|
||||
@@ -1941,20 +1944,43 @@
|
||||
*/
|
||||
int drmWaitVBlank(int fd, drmVBlankPtr vbl)
|
||||
{
|
||||
+#if defined(__APPLE__) && defined(__MACH__)
|
||||
+ uint64_t start, end, elapsed, elapsedNano;
|
||||
+ static const uint64_t maxElapsed = 2000000000;
|
||||
+ static mach_timebase_info_data_t timebaseInfo;
|
||||
+ if ( timebaseInfo.denom == 0 ) {
|
||||
+ (void) mach_timebase_info(&timebaseInfo);
|
||||
+ }
|
||||
+#else
|
||||
struct timespec timeout, cur;
|
||||
+#endif
|
||||
int ret;
|
||||
|
||||
+#if defined(__APPLE__) && defined(__MACH__)
|
||||
+ start = mach_absolute_time();
|
||||
+#else
|
||||
ret = clock_gettime(CLOCK_MONOTONIC, &timeout);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "clock_gettime failed: %s\n", strerror(ret));
|
||||
goto out;
|
||||
}
|
||||
timeout.tv_sec++;
|
||||
+#endif
|
||||
|
||||
do {
|
||||
ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
|
||||
vbl->request.type &= ~DRM_VBLANK_RELATIVE;
|
||||
if (ret && errno == EINTR) {
|
||||
+#if defined(__APPLE__) && defined(__MACH__)
|
||||
+ end = mach_absolute_time();
|
||||
+ elapsed = end - start;
|
||||
+ elapsedNano = elapsed * timebaseInfo.numer / timebaseInfo.denom;
|
||||
+ if (elapsedNano > maxElapsed) {
|
||||
+ errno = EBUSY;
|
||||
+ ret = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+#else
|
||||
clock_gettime(CLOCK_MONOTONIC, &cur);
|
||||
/* Timeout after 1s */
|
||||
if (cur.tv_sec > timeout.tv_sec + 1 ||
|
||||
@@ -1964,6 +1990,7 @@
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
} while (ret && errno == EINTR);
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, fetchpatch
|
||||
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3
|
||||
, SystemConfiguration, CoreFoundation, JavaScriptCore }:
|
||||
|
||||
@ -30,6 +30,12 @@ stdenv.mkDerivation rec {
|
||||
)
|
||||
'';
|
||||
|
||||
patches = stdenv.lib.optional stdenv.isDarwin
|
||||
(fetchpatch {
|
||||
url = "https://github.com/libproxy/libproxy/commit/44158f03f8522116758d335688ed840dfcb50ac8.patch";
|
||||
sha256 = "0axfvb6j7gcys6fkwi9dkn006imhvm3kqr83gpwban8419n0q5v1";
|
||||
});
|
||||
|
||||
doCheck = false; # fails 1 out of 10 tests
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,41 +0,0 @@
|
||||
Adapted from https://github.com/zcash/libsnark/pull/10
|
||||
|
||||
diff --git a/depends/libff/libff/common/profiling.cpp b/depends/libff/libff/common/profiling.cpp
|
||||
index f2a1985..319149c 100755
|
||||
--- a/depends/libff/libff/common/profiling.cpp
|
||||
+++ b/depends/libff/libff/common/profiling.cpp
|
||||
@@ -27,6 +27,13 @@
|
||||
#include <proc/readproc.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __MACH__
|
||||
+#include <time.h>
|
||||
+#include <sys/time.h>
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+#endif
|
||||
+
|
||||
namespace libff {
|
||||
|
||||
long long get_nsec_time()
|
||||
@@ -42,10 +49,20 @@ long long get_nsec_cpu_time()
|
||||
return 0;
|
||||
#else
|
||||
::timespec ts;
|
||||
+#ifdef __MACH__
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ ts.tv_sec = mts.tv_sec;
|
||||
+ ts.tv_nsec = mts.tv_nsec;
|
||||
+#else
|
||||
if ( ::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) )
|
||||
throw ::std::runtime_error("clock_gettime(CLOCK_PROCESS_CPUTIME_ID) failed");
|
||||
// If we expected this to work, don't silently ignore failures, because that would hide the problem and incur an unnecessarily system-call overhead. So if we ever observe this exception, we should probably add a suitable #ifdef .
|
||||
//TODO: clock_gettime(CLOCK_PROCESS_CPUTIME_ID) is not supported by native Windows. What about Cygwin? Should we #ifdef on CLOCK_PROCESS_CPUTIME_ID or on __linux__?
|
||||
+#endif
|
||||
return ts.tv_sec * 1000000000ll + ts.tv_nsec;
|
||||
#endif
|
||||
}
|
@ -19,8 +19,6 @@ in stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [ ./darwin-fix-clock-gettime.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -31,7 +31,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
doCheck = true;
|
||||
checkPhase = "make tests && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib make test";
|
||||
preCheck = ''
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
|
||||
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/lib
|
||||
'';
|
||||
checkTarget = "tests test";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "High-level, multiplatform C++ network packet sniffing and crafting library";
|
||||
|
@ -1,76 +0,0 @@
|
||||
diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
|
||||
index 45cb6075e6..62937311b9 100644
|
||||
--- a/include/c11/threads_posix.h
|
||||
+++ b/include/c11/threads_posix.h
|
||||
@@ -36,6 +36,11 @@
|
||||
#include <sched.h>
|
||||
#include <stdint.h> /* for intptr_t */
|
||||
|
||||
+#ifdef __MACH__
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
Configuration macro:
|
||||
|
||||
@@ -383,12 +388,25 @@ tss_set(tss_t key, void *val)
|
||||
/*-------------------- 7.25.7 Time functions --------------------*/
|
||||
// 7.25.6.1
|
||||
#ifndef HAVE_TIMESPEC_GET
|
||||
+
|
||||
static inline int
|
||||
timespec_get(struct timespec *ts, int base)
|
||||
{
|
||||
if (!ts) return 0;
|
||||
if (base == TIME_UTC) {
|
||||
+#ifdef __MACH__
|
||||
+ if (ts != NULL) {
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ ts->tv_sec = mts.tv_sec;
|
||||
+ ts->tv_nsec = mts.tv_nsec;
|
||||
+ }
|
||||
+#else
|
||||
clock_gettime(CLOCK_REALTIME, ts);
|
||||
+#endif
|
||||
return base;
|
||||
}
|
||||
return 0;
|
||||
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
|
||||
index 1208ebb315..e1378fb1f0 100644
|
||||
--- a/src/egl/drivers/dri2/egl_dri2.c
|
||||
+++ b/src/egl/drivers/dri2/egl_dri2.c
|
||||
@@ -65,6 +65,11 @@
|
||||
#include "util/u_vector.h"
|
||||
#include "mapi/glapi/glapi.h"
|
||||
|
||||
+#ifdef __MACH__
|
||||
+#include <mach/clock.h>
|
||||
+#include <mach/mach.h>
|
||||
+#endif
|
||||
+
|
||||
#define NUM_ATTRIBS 12
|
||||
|
||||
static void
|
||||
@@ -3092,7 +3097,17 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
|
||||
|
||||
/* We override the clock to monotonic when creating the condition
|
||||
* variable. */
|
||||
+#ifdef __MACH__
|
||||
+ clock_serv_t cclock;
|
||||
+ mach_timespec_t mts;
|
||||
+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||
+ clock_get_time(cclock, &mts);
|
||||
+ mach_port_deallocate(mach_task_self(), cclock);
|
||||
+ current.tv_sec = mts.tv_sec;
|
||||
+ current.tv_nsec = mts.tv_nsec;
|
||||
+#else
|
||||
clock_gettime(CLOCK_MONOTONIC, ¤t);
|
||||
+#endif
|
||||
|
||||
/* calculating when to expire */
|
||||
expire.tv_nsec = timeout % 1000000000L;
|
@ -93,7 +93,7 @@ let self = stdenv.mkDerivation {
|
||||
./symlink-drivers.patch
|
||||
./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl
|
||||
./disk_cache-include-dri-driver-path-in-cache-key.patch
|
||||
] ++ lib.optional stdenv.isDarwin ./darwin-clock-gettime.patch;
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" "drivers" ]
|
||||
++ lib.optional (elem "swrast" galliumDrivers) "osmesa";
|
||||
|
@ -231,5 +231,6 @@ stdenv.mkDerivation rec {
|
||||
license = lib.licenses.lgpl21Plus; # or gpl3
|
||||
maintainers = with lib.maintainers; [ orivej lovek323 phreedom sander ];
|
||||
platforms = lib.platforms.unix;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`.
|
||||
stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
|
||||
bison, cups ? null, harfbuzz, libGL, perl,
|
||||
gstreamer, gst-plugins-base, gtk3, dconf,
|
||||
cf-private,
|
||||
cf-private, llvmPackages_5,
|
||||
|
||||
# options
|
||||
developerBuild ? false,
|
||||
@ -51,34 +51,24 @@ let
|
||||
patches = {
|
||||
qtbase = [
|
||||
./qtbase.patch
|
||||
./qtbase-darwin.patch
|
||||
./qtbase-revert-no-macos10.10.patch
|
||||
./qtbase-fixguicmake.patch
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
./qtbase-darwin-nseventtype.patch
|
||||
./qtbase-darwin-revert-69221.patch
|
||||
];
|
||||
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
qtserialport = [ ./qtserialport.patch ];
|
||||
qttools = [ ./qttools.patch ];
|
||||
qtwebengine = [ ./qtwebengine-no-build-skip.patch ]
|
||||
++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch
|
||||
++ optionals stdenv.isDarwin [
|
||||
./qtwebengine-darwin-no-platform-check.patch
|
||||
./qtwebengine-darwin-sdk-10.10.patch
|
||||
./qtwebengine-darwin-old-sdk.patch
|
||||
];
|
||||
qtwebkit = [ ./qtwebkit.patch ]
|
||||
++ optionals stdenv.isDarwin [
|
||||
./qtwebkit-darwin-no-readline.patch
|
||||
./qtwebkit-darwin-no-qos-classes.patch
|
||||
];
|
||||
qtwebengine = [
|
||||
./qtwebengine-no-build-skip.patch
|
||||
./qtwebengine-darwin-no-platform-check.patch
|
||||
];
|
||||
qtwebkit = [ ./qtwebkit.patch ];
|
||||
};
|
||||
|
||||
mkDerivation =
|
||||
import ../mkDerivation.nix
|
||||
{ inherit stdenv; inherit (stdenv) lib; }
|
||||
import ../mkDerivation.nix {
|
||||
inherit (stdenv) lib;
|
||||
stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
|
||||
}
|
||||
{ inherit debug; };
|
||||
|
||||
qtModule =
|
||||
@ -109,7 +99,7 @@ let
|
||||
qtdoc = callPackage ../modules/qtdoc.nix {};
|
||||
qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {};
|
||||
qtimageformats = callPackage ../modules/qtimageformats.nix {};
|
||||
qtlocation = callPackage ../modules/qtlocation.nix {};
|
||||
qtlocation = callPackage ../modules/qtlocation.nix { };
|
||||
qtmacextras = callPackage ../modules/qtmacextras.nix {
|
||||
inherit cf-private;
|
||||
};
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible)
|
||||
removeMonitor();
|
||||
monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
|
||||
QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
|
||||
- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
|
||||
- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
|
||||
+ const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
|
||||
+ const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
|
||||
QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
|
||||
Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
|
||||
}];
|
@ -1,73 +0,0 @@
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
index 00c3f7c22c..94d35f59d6 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -1355,15 +1355,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
|
||||
{
|
||||
QMacAutoReleasePool pool;
|
||||
|
||||
- Qt::WindowType type = window()->type();
|
||||
- Qt::WindowFlags flags = window()->flags();
|
||||
-
|
||||
- // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
|
||||
- // a window to be created within the area of the screen that has a Y coordinate (I quadrant)
|
||||
- // higher than the height of the screen in its non-rotated state, unless the window is
|
||||
- // created with the NSWindowStyleMaskBorderless style mask.
|
||||
- NSWindowStyleMask styleMask = windowStyleMask(flags);
|
||||
-
|
||||
QRect rect = geometry();
|
||||
|
||||
QScreen *targetScreen = nullptr;
|
||||
@@ -1375,22 +1366,26 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
|
||||
}
|
||||
|
||||
if (!targetScreen) {
|
||||
- qCWarning(lcQpaCocoaWindow) << "Window position" << rect << "outside any known screen, using primary screen";
|
||||
+ qCWarning(lcQpaCocoaWindow) << "Window position outside any known screen, using primary screen";
|
||||
targetScreen = QGuiApplication::primaryScreen();
|
||||
- // AppKit will only reposition a window that's outside the target screen area if
|
||||
- // the window has a title bar. If left out, the window ends up with no screen.
|
||||
- // The style mask will be corrected to the original style mask in setWindowFlags.
|
||||
- styleMask |= NSWindowStyleMaskTitled;
|
||||
}
|
||||
|
||||
rect.translate(-targetScreen->geometry().topLeft());
|
||||
QCocoaScreen *cocoaScreen = static_cast<QCocoaScreen *>(targetScreen->handle());
|
||||
NSRect frame = QCocoaScreen::mapToNative(rect, cocoaScreen);
|
||||
|
||||
+ // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow
|
||||
+ // a window to be created within the area of the screen that has a Y coordinate (I quadrant)
|
||||
+ // higher than the height of the screen in its non-rotated state, unless the window is
|
||||
+ // created with the NSWindowStyleMaskBorderless style mask.
|
||||
+
|
||||
+ Qt::WindowType type = window()->type();
|
||||
+ Qt::WindowFlags flags = window()->flags();
|
||||
+
|
||||
// Create NSWindow
|
||||
Class windowClass = shouldBePanel ? [QNSPanel class] : [QNSWindow class];
|
||||
QCocoaNSWindow *nsWindow = [[windowClass alloc] initWithContentRect:frame
|
||||
- styleMask:styleMask
|
||||
+ styleMask:windowStyleMask(flags)
|
||||
// Deferring window creation breaks OpenGL (the GL context is
|
||||
// set up before the window is shown and needs a proper window)
|
||||
backing:NSBackingStoreBuffered defer:NO
|
||||
@@ -1399,9 +1394,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
|
||||
Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow",
|
||||
"Resulting NSScreen should match the requested NSScreen");
|
||||
|
||||
- if (targetScreen != window()->screen())
|
||||
- QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
|
||||
-
|
||||
nsWindow.delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this];
|
||||
|
||||
// Prevent Cocoa from releasing the window on close. Qt
|
||||
@@ -1421,6 +1413,9 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
|
||||
});
|
||||
}
|
||||
|
||||
+ if (targetScreen != window()->screen())
|
||||
+ QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen);
|
||||
+
|
||||
nsWindow.restorable = NO;
|
||||
nsWindow.level = windowLevel(flags);
|
||||
|
@ -1,70 +0,0 @@
|
||||
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
index 341d3bccf2..3368234c26 100644
|
||||
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
|
||||
QMacAutoReleasePool pool;
|
||||
userProfiles.clear();
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
|
||||
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
|
||||
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
|
||||
|
||||
QMacAutoReleasePool pool;
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
scanThread->interfaceName = QString::fromNSString(ifName);
|
||||
scanThread->start();
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
|
||||
index a17a02b629..d76c42fa03 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
|
||||
@@ -114,7 +114,7 @@ void QCocoaScreen::updateGeometry()
|
||||
return;
|
||||
|
||||
// The reference screen for the geometry is always the primary screen
|
||||
- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
|
||||
+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
|
||||
m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
|
||||
m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
|
||||
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
index 72f3bc0075..a9c058a850 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -1676,7 +1676,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
||||
|
||||
if (!m_drawContentBorderGradient) {
|
||||
window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask;
|
||||
- [window.contentView.superview setNeedsDisplay:YES];
|
||||
+ [[window.contentView superview] setNeedsDisplay:YES];
|
||||
window.titlebarAppearsTransparent = NO;
|
||||
return;
|
||||
}
|
||||
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
index cb13b7d184..0159d68dca 100644
|
||||
--- a/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
@@ -231,7 +231,7 @@ static bool isMouseEvent(NSEvent *ev)
|
||||
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
|
||||
NSPoint loc = [theEvent locationInWindow];
|
||||
NSRect windowFrame = [self convertRectFromScreen:self.frame];
|
||||
- NSRect contentFrame = self.contentView.frame;
|
||||
+ NSRect contentFrame = [self.contentView frame];
|
||||
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
|
||||
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
|
||||
}
|
||||
@@ -260,7 +260,7 @@ static bool isMouseEvent(NSEvent *ev)
|
||||
+ (void)applicationActivationChanged:(NSNotification*)notification
|
||||
{
|
||||
const id sender = self;
|
||||
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
|
||||
+ NSEnumerator *windowEnumerator = nullptr;
|
||||
NSApplication *application = [NSApplication sharedApplication];
|
||||
|
||||
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
|
@ -1,102 +0,0 @@
|
||||
Revert "Remove code paths for macOS < 10.11"
|
||||
|
||||
This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3.
|
||||
|
||||
From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Petroules <jake.petroules@qt.io>
|
||||
Date: Thu, 8 Feb 2018 11:05:42 -0800
|
||||
Subject: [PATCH] Remove code paths for macOS < 10.11
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
|
||||
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
||||
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
|
||||
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
|
||||
---
|
||||
.../fontdatabases/mac/qfontengine_coretext.mm | 16 +++-------------
|
||||
src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 +-----
|
||||
src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 ----------------
|
||||
3 files changed, 4 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
index 98b753eff9..489d9cd031 100644
|
||||
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
@@ -47,18 +47,28 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
-#if defined(Q_OS_MACOS)
|
||||
+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
-#if defined(QT_PLATFORM_UIKIT)
|
||||
+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2)
|
||||
#import <UIKit/UIKit.h>
|
||||
#endif
|
||||
|
||||
// These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework,
|
||||
// but they are not documented and are not in public headers so are private API and exposed
|
||||
// only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857)
|
||||
-#if defined(Q_OS_MACOS)
|
||||
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2)
|
||||
+#define kCTFontWeightUltraLight -0.8
|
||||
+#define kCTFontWeightThin -0.6
|
||||
+#define kCTFontWeightLight -0.4
|
||||
+#define kCTFontWeightRegular 0
|
||||
+#define kCTFontWeightMedium 0.23
|
||||
+#define kCTFontWeightSemibold 0.3
|
||||
+#define kCTFontWeightBold 0.4
|
||||
+#define kCTFontWeightHeavy 0.56
|
||||
+#define kCTFontWeightBlack 0.62
|
||||
+#elif defined(Q_OS_OSX)
|
||||
#define kCTFontWeightUltraLight NSFontWeightUltraLight
|
||||
#define kCTFontWeightThin NSFontWeightThin
|
||||
#define kCTFontWeightLight NSFontWeightLight
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
|
||||
index 94f2125bad..272cd9f3dc 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
|
||||
@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
|
||||
// resetting our mCurrentDir, set the delegate
|
||||
// here to make sure it gets the correct value.
|
||||
[mSavePanel setDelegate:self];
|
||||
- mOpenPanel.accessoryViewDisclosed = YES;
|
||||
+
|
||||
+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
|
||||
+ if (__builtin_available(macOS 10.11, *))
|
||||
+ mOpenPanel.accessoryViewDisclosed = YES;
|
||||
+#endif
|
||||
|
||||
if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
|
||||
[mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
|
||||
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
|
||||
index 057a4c2943..eb55e50622 100644
|
||||
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
|
||||
@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
|
||||
return QCocoaScreen::mapToNative(maximizedFrame);
|
||||
}
|
||||
|
||||
+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
|
||||
+/*
|
||||
+ AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame
|
||||
+ from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting
|
||||
+ in black bars on top and bottom of the window. By implementing the following
|
||||
+ method, AppKit will choose that instead, and resolve the right fullscreen
|
||||
+ geometry.
|
||||
+*/
|
||||
+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
|
||||
+{
|
||||
+ Q_UNUSED(proposedSize);
|
||||
+ Q_ASSERT(window == m_cocoaWindow->nativeWindow());
|
||||
+ return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize());
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
|
||||
{
|
||||
Q_UNUSED(window);
|
@ -1,30 +0,0 @@
|
||||
Fix a following build error:
|
||||
|
||||
In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7:
|
||||
../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|."
|
||||
static_assert(
|
||||
^
|
||||
../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here
|
||||
: AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... {
|
||||
^
|
||||
../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity<std::__1::integer_sequence<unsigned long, 0, 1>, base::internal::TypeList<base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, const long &>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, NSError *> >' requested here
|
||||
static_assert(internal::AssertBindArgsValidity<
|
||||
^
|
||||
../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
|
||||
return base::BindRepeating(std::forward<Functor>(functor),
|
||||
^
|
||||
../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
|
||||
base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
|
||||
^
|
||||
|
||||
--- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
|
||||
+++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
|
||||
@@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic(
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
|
||||
- weak_ptr_factory_.GetWeakPtr(), nil));
|
||||
+ weak_ptr_factory_.GetWeakPtr(), nullptr));
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
|
||||
--- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
|
||||
+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm
|
||||
@@ -45,7 +45,7 @@ NSString *RTCFieldTrialTrendlineFilterValue(
|
||||
return [NSString stringWithFormat:format, windowSize, smoothingCoeff, thresholdGain];
|
||||
}
|
||||
|
||||
-void RTCInitFieldTrialDictionary(NSDictionary<NSString *, NSString *> *fieldTrials) {
|
||||
+void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials) {
|
||||
if (!fieldTrials) {
|
||||
RTCLogWarning(@"No fieldTrials provided.");
|
||||
return;
|
||||
diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
|
||||
--- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
|
||||
+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h
|
||||
@@ -40,4 +40,4 @@ RTC_EXTERN NSString *RTCFieldTrialTrendlineFilterValue(
|
||||
* Must be called before any other call into WebRTC. See:
|
||||
* webrtc/system_wrappers/include/field_trial_default.h
|
||||
*/
|
||||
-RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary<NSString *, NSString *> *fieldTrials);
|
||||
+RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials);
|
@ -1,160 +0,0 @@
|
||||
Fix build against 10.10 SDK
|
||||
|
||||
The SecKey part perhaps could be fixed by implementing a revert to
|
||||
https://chromium.googlesource.com/chromium/src.git/+/8418e098b9cbedf884878b61dcd3292c515845cf%5E%21/#F0
|
||||
|
||||
--- a/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
|
||||
+++ b/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm
|
||||
@@ -1,3 +1,4 @@
|
||||
+#define NSEventTypeScrollWheel 22
|
||||
// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
--- a/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
|
||||
+++ b/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc
|
||||
@@ -48,21 +48,6 @@ namespace net {
|
||||
|
||||
namespace {
|
||||
|
||||
-// TODO(davidben): Remove this when we switch to building to the 10.13
|
||||
-// SDK. https://crbug.com/780980
|
||||
-#if !defined(MAC_OS_X_VERSION_10_13) || \
|
||||
- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13
|
||||
-API_AVAILABLE(macosx(10.13))
|
||||
-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA256 =
|
||||
- CFSTR("algid:sign:RSA:digest-PSS:SHA256:SHA256:32");
|
||||
-API_AVAILABLE(macosx(10.13))
|
||||
-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA384 =
|
||||
- CFSTR("algid:sign:RSA:digest-PSS:SHA384:SHA384:48");
|
||||
-API_AVAILABLE(macosx(10.13))
|
||||
-const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA512 =
|
||||
- CFSTR("algid:sign:RSA:digest-PSS:SHA512:SHA512:64");
|
||||
-#endif
|
||||
-
|
||||
class ScopedCSSM_CC_HANDLE {
|
||||
public:
|
||||
ScopedCSSM_CC_HANDLE() : handle_(0) {}
|
||||
@@ -187,109 +172,6 @@ class SSLPlatformKeyCSSM : public ThreadedSSLPrivateKey::Delegate {
|
||||
DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCSSM);
|
||||
};
|
||||
|
||||
-// Returns the corresponding SecKeyAlgorithm or nullptr if unrecognized.
|
||||
-API_AVAILABLE(macosx(10.12))
|
||||
-SecKeyAlgorithm GetSecKeyAlgorithm(uint16_t algorithm) {
|
||||
- switch (algorithm) {
|
||||
- case SSL_SIGN_RSA_PKCS1_SHA512:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA512;
|
||||
- case SSL_SIGN_RSA_PKCS1_SHA384:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA384;
|
||||
- case SSL_SIGN_RSA_PKCS1_SHA256:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA256;
|
||||
- case SSL_SIGN_RSA_PKCS1_SHA1:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA1;
|
||||
- case SSL_SIGN_RSA_PKCS1_MD5_SHA1:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15Raw;
|
||||
- case SSL_SIGN_ECDSA_SECP521R1_SHA512:
|
||||
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA512;
|
||||
- case SSL_SIGN_ECDSA_SECP384R1_SHA384:
|
||||
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA384;
|
||||
- case SSL_SIGN_ECDSA_SECP256R1_SHA256:
|
||||
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA256;
|
||||
- case SSL_SIGN_ECDSA_SHA1:
|
||||
- return kSecKeyAlgorithmECDSASignatureDigestX962SHA1;
|
||||
- }
|
||||
-
|
||||
- if (base::mac::IsAtLeastOS10_13()) {
|
||||
- switch (algorithm) {
|
||||
- case SSL_SIGN_RSA_PSS_SHA512:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPSSSHA512;
|
||||
- case SSL_SIGN_RSA_PSS_SHA384:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPSSSHA384;
|
||||
- case SSL_SIGN_RSA_PSS_SHA256:
|
||||
- return kSecKeyAlgorithmRSASignatureDigestPSSSHA256;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return nullptr;
|
||||
-}
|
||||
-
|
||||
-class API_AVAILABLE(macosx(10.12)) SSLPlatformKeySecKey
|
||||
- : public ThreadedSSLPrivateKey::Delegate {
|
||||
- public:
|
||||
- SSLPlatformKeySecKey(int type, size_t max_length, SecKeyRef key)
|
||||
- : key_(key, base::scoped_policy::RETAIN) {
|
||||
- // Determine the algorithms supported by the key.
|
||||
- for (uint16_t algorithm : SSLPrivateKey::DefaultAlgorithmPreferences(
|
||||
- type, true /* include PSS */)) {
|
||||
- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
|
||||
- if (sec_algorithm &&
|
||||
- SecKeyIsAlgorithmSupported(key_.get(), kSecKeyOperationTypeSign,
|
||||
- sec_algorithm)) {
|
||||
- preferences_.push_back(algorithm);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- ~SSLPlatformKeySecKey() override {}
|
||||
-
|
||||
- std::vector<uint16_t> GetAlgorithmPreferences() override {
|
||||
- return preferences_;
|
||||
- }
|
||||
-
|
||||
- Error Sign(uint16_t algorithm,
|
||||
- base::span<const uint8_t> input,
|
||||
- std::vector<uint8_t>* signature) override {
|
||||
- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm);
|
||||
- if (!sec_algorithm) {
|
||||
- NOTREACHED();
|
||||
- return ERR_FAILED;
|
||||
- }
|
||||
-
|
||||
- const EVP_MD* md = SSL_get_signature_algorithm_digest(algorithm);
|
||||
- uint8_t digest[EVP_MAX_MD_SIZE];
|
||||
- unsigned digest_len;
|
||||
- if (!md || !EVP_Digest(input.data(), input.size(), digest, &digest_len, md,
|
||||
- nullptr)) {
|
||||
- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
|
||||
- }
|
||||
-
|
||||
- base::ScopedCFTypeRef<CFDataRef> digest_ref(CFDataCreateWithBytesNoCopy(
|
||||
- kCFAllocatorDefault, digest, base::checked_cast<CFIndex>(digest_len),
|
||||
- kCFAllocatorNull));
|
||||
-
|
||||
- base::ScopedCFTypeRef<CFErrorRef> error;
|
||||
- base::ScopedCFTypeRef<CFDataRef> signature_ref(SecKeyCreateSignature(
|
||||
- key_, sec_algorithm, digest_ref, error.InitializeInto()));
|
||||
- if (!signature_ref) {
|
||||
- LOG(ERROR) << error;
|
||||
- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
|
||||
- }
|
||||
-
|
||||
- signature->assign(
|
||||
- CFDataGetBytePtr(signature_ref),
|
||||
- CFDataGetBytePtr(signature_ref) + CFDataGetLength(signature_ref));
|
||||
- return OK;
|
||||
- }
|
||||
-
|
||||
- private:
|
||||
- std::vector<uint16_t> preferences_;
|
||||
- base::ScopedCFTypeRef<SecKeyRef> key_;
|
||||
-
|
||||
- DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeySecKey);
|
||||
-};
|
||||
-
|
||||
scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
|
||||
const X509Certificate* certificate,
|
||||
SecKeyRef private_key) {
|
||||
@@ -298,13 +180,6 @@ scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
|
||||
if (!GetClientCertInfo(certificate, &key_type, &max_length))
|
||||
return nullptr;
|
||||
|
||||
- if (base::mac::IsAtLeastOS10_12()) {
|
||||
- return base::MakeRefCounted<ThreadedSSLPrivateKey>(
|
||||
- std::make_unique<SSLPlatformKeySecKey>(key_type, max_length,
|
||||
- private_key),
|
||||
- GetSSLPlatformKeyTaskRunner());
|
||||
- }
|
||||
-
|
||||
const CSSM_KEY* cssm_key;
|
||||
OSStatus status = SecKeyGetCSSMKey(private_key, &cssm_key);
|
||||
if (status != noErr) {
|
@ -1,11 +0,0 @@
|
||||
diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
|
||||
--- a/Source/cmake/OptionsQt.cmake
|
||||
+++ b/Source/cmake/OptionsQt.cmake
|
||||
@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG)
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
- SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_MATHML)
|
@ -1,45 +0,0 @@
|
||||
diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt
|
||||
--- a/Source/JavaScriptCore/shell/CMakeLists.txt
|
||||
+++ b/Source/JavaScriptCore/shell/CMakeLists.txt
|
||||
@@ -9,7 +9,6 @@ set(JSC_LIBRARIES
|
||||
)
|
||||
|
||||
if (WTF_OS_MAC_OS_X)
|
||||
- list(APPEND JSC_LIBRARIES edit)
|
||||
endif ()
|
||||
|
||||
if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
|
||||
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
|
||||
--- a/Source/WTF/wtf/Platform.h
|
||||
+++ b/Source/WTF/wtf/Platform.h
|
||||
@@ -563,7 +563,6 @@
|
||||
#if PLATFORM(IOS)
|
||||
|
||||
#define HAVE_NETWORK_EXTENSION 1
|
||||
-#define HAVE_READLINE 1
|
||||
#if USE(APPLE_INTERNAL_SDK)
|
||||
#define USE_CFNETWORK 1
|
||||
#endif
|
||||
@@ -650,7 +649,6 @@
|
||||
#define HAVE_MADV_DONTNEED 1
|
||||
#define HAVE_MERGESORT 1
|
||||
#define HAVE_PTHREAD_SETNAME_NP 1
|
||||
-#define HAVE_READLINE 1
|
||||
#define HAVE_SYS_TIMEB_H 1
|
||||
|
||||
#if !PLATFORM(GTK) && !PLATFORM(QT)
|
||||
diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake
|
||||
--- a/Source/WTF/wtf/PlatformMac.cmake
|
||||
+++ b/Source/WTF/wtf/PlatformMac.cmake
|
||||
@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED)
|
||||
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
|
||||
-find_library(READLINE_LIBRARY Readline)
|
||||
list(APPEND WTF_LIBRARIES
|
||||
${COREFOUNDATION_LIBRARY}
|
||||
${COCOA_LIBRARY}
|
||||
- ${READLINE_LIBRARY}
|
||||
libicucore.dylib
|
||||
)
|
||||
|
@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`.
|
||||
stdenv, fetchurl, fetchFromGitHub, makeSetupHook,
|
||||
bison, cups ? null, harfbuzz, libGL, perl,
|
||||
gstreamer, gst-plugins-base, gtk3, dconf,
|
||||
cf-private,
|
||||
cf-private, llvmPackages_5,
|
||||
|
||||
# options
|
||||
developerBuild ? false,
|
||||
@ -51,11 +51,7 @@ let
|
||||
patches = {
|
||||
qtbase = [
|
||||
./qtbase.patch
|
||||
./qtbase-darwin.patch
|
||||
./qtbase-revert-no-macos10.10.patch
|
||||
./qtbase-fixguicmake.patch
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
./qtbase-darwin-nseventtype.patch
|
||||
];
|
||||
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
@ -73,8 +69,10 @@ let
|
||||
};
|
||||
|
||||
mkDerivation =
|
||||
import ../mkDerivation.nix
|
||||
{ inherit stdenv; inherit (stdenv) lib; }
|
||||
import ../mkDerivation.nix {
|
||||
inherit (stdenv) lib;
|
||||
stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv;
|
||||
}
|
||||
{ inherit debug; };
|
||||
|
||||
qtModule =
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible)
|
||||
removeMonitor();
|
||||
monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) {
|
||||
QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]);
|
||||
- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
|
||||
- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
|
||||
+ const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]);
|
||||
+ const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress;
|
||||
QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint,
|
||||
Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType);
|
||||
}];
|
@ -1,70 +0,0 @@
|
||||
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
index c3dd49ff3e..6871399817 100644
|
||||
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
@@ -283,7 +283,7 @@ void QScanThread::getUserConfigurations()
|
||||
QMacAutoReleasePool pool;
|
||||
userProfiles.clear();
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
|
||||
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
|
||||
@@ -598,7 +598,7 @@ void QCoreWlanEngine::doRequestUpdate()
|
||||
|
||||
QMacAutoReleasePool pool;
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
scanThread->interfaceName = QString::fromNSString(ifName);
|
||||
scanThread->start();
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
|
||||
index afe14e623c..74d69c2fa1 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
|
||||
@@ -127,7 +127,7 @@ void QCocoaScreen::updateProperties()
|
||||
const qreal previousRefreshRate = m_refreshRate;
|
||||
|
||||
// The reference screen for the geometry is always the primary screen
|
||||
- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame);
|
||||
+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]);
|
||||
m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect();
|
||||
m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect();
|
||||
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
index df1ad82592..0318a4ff96 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -1704,7 +1704,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
||||
|
||||
if (!m_drawContentBorderGradient) {
|
||||
window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground;
|
||||
- [window.contentView.superview setNeedsDisplay:YES];
|
||||
+ [[window.contentView superview] setNeedsDisplay:YES];
|
||||
window.titlebarAppearsTransparent = NO;
|
||||
return;
|
||||
}
|
||||
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
index c17ad47aba..a0f1dd38fb 100644
|
||||
--- a/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
|
||||
@@ -230,7 +230,7 @@ static bool isMouseEvent(NSEvent *ev)
|
||||
if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) {
|
||||
NSPoint loc = [theEvent locationInWindow];
|
||||
NSRect windowFrame = [self convertRectFromScreen:self.frame];
|
||||
- NSRect contentFrame = self.contentView.frame;
|
||||
+ NSRect contentFrame = [self.contentView frame];
|
||||
if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO))
|
||||
[qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent];
|
||||
}
|
||||
@@ -257,7 +257,7 @@ static bool isMouseEvent(NSEvent *ev)
|
||||
+ (void)applicationActivationChanged:(NSNotification*)notification
|
||||
{
|
||||
const id sender = self;
|
||||
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
|
||||
+ NSEnumerator *windowEnumerator = nullptr;
|
||||
NSApplication *application = [NSApplication sharedApplication];
|
||||
|
||||
// Unfortunately there's no NSWindowListOrderedBackToFront,
|
@ -1,102 +0,0 @@
|
||||
Revert "Remove code paths for macOS < 10.11"
|
||||
|
||||
This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3.
|
||||
|
||||
From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Petroules <jake.petroules@qt.io>
|
||||
Date: Thu, 8 Feb 2018 11:05:42 -0800
|
||||
Subject: [PATCH] Remove code paths for macOS < 10.11
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa
|
||||
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
||||
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
|
||||
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
|
||||
---
|
||||
.../fontdatabases/mac/qfontengine_coretext.mm | 16 +++-------------
|
||||
src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 +-----
|
||||
src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 ----------------
|
||||
3 files changed, 4 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
index 98b753eff9..489d9cd031 100644
|
||||
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
|
||||
@@ -47,18 +47,28 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
-#if defined(Q_OS_MACOS)
|
||||
+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
-#if defined(QT_PLATFORM_UIKIT)
|
||||
+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2)
|
||||
#import <UIKit/UIKit.h>
|
||||
#endif
|
||||
|
||||
// These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework,
|
||||
// but they are not documented and are not in public headers so are private API and exposed
|
||||
// only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857)
|
||||
-#if defined(Q_OS_MACOS)
|
||||
+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2)
|
||||
+#define kCTFontWeightUltraLight -0.8
|
||||
+#define kCTFontWeightThin -0.6
|
||||
+#define kCTFontWeightLight -0.4
|
||||
+#define kCTFontWeightRegular 0
|
||||
+#define kCTFontWeightMedium 0.23
|
||||
+#define kCTFontWeightSemibold 0.3
|
||||
+#define kCTFontWeightBold 0.4
|
||||
+#define kCTFontWeightHeavy 0.56
|
||||
+#define kCTFontWeightBlack 0.62
|
||||
+#elif defined(Q_OS_OSX)
|
||||
#define kCTFontWeightUltraLight NSFontWeightUltraLight
|
||||
#define kCTFontWeightThin NSFontWeightThin
|
||||
#define kCTFontWeightLight NSFontWeightLight
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
|
||||
index 94f2125bad..272cd9f3dc 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
|
||||
@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate);
|
||||
// resetting our mCurrentDir, set the delegate
|
||||
// here to make sure it gets the correct value.
|
||||
[mSavePanel setDelegate:self];
|
||||
- mOpenPanel.accessoryViewDisclosed = YES;
|
||||
+
|
||||
+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11)
|
||||
+ if (__builtin_available(macOS 10.11, *))
|
||||
+ mOpenPanel.accessoryViewDisclosed = YES;
|
||||
+#endif
|
||||
|
||||
if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept))
|
||||
[mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]];
|
||||
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
|
||||
index 057a4c2943..eb55e50622 100644
|
||||
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
|
||||
@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*"));
|
||||
return QCocoaScreen::mapToNative(maximizedFrame);
|
||||
}
|
||||
|
||||
+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11)
|
||||
+/*
|
||||
+ AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame
|
||||
+ from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting
|
||||
+ in black bars on top and bottom of the window. By implementing the following
|
||||
+ method, AppKit will choose that instead, and resolve the right fullscreen
|
||||
+ geometry.
|
||||
+*/
|
||||
+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize
|
||||
+{
|
||||
+ Q_UNUSED(proposedSize);
|
||||
+ Q_ASSERT(window == m_cocoaWindow->nativeWindow());
|
||||
+ return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize());
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
|
||||
{
|
||||
Q_UNUSED(window);
|
@ -38,7 +38,7 @@ let
|
||||
srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; };
|
||||
|
||||
patches = {
|
||||
qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch;
|
||||
qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ];
|
||||
qtdeclarative = [ ./qtdeclarative.patch ];
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
qtserialport = [ ./qtserialport.patch ];
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
index 341d3bc..3368234 100644
|
||||
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
|
||||
@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations()
|
||||
QMacAutoReleasePool pool;
|
||||
userProfiles.clear();
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
|
||||
CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName];
|
||||
@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate()
|
||||
|
||||
QMacAutoReleasePool pool;
|
||||
|
||||
- NSArray<NSString *> *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames];
|
||||
for (NSString *ifName in wifiInterfaces) {
|
||||
scanThread->interfaceName = QString::fromNSString(ifName);
|
||||
scanThread->start();
|
||||
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
index 5cd4beb..84919e6 100644
|
||||
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
|
||||
@@ -320,7 +320,7 @@ static void qt_closePopups()
|
||||
+ (void)applicationActivationChanged:(NSNotification*)notification
|
||||
{
|
||||
const id sender = self;
|
||||
- NSEnumerator<NSWindow*> *windowEnumerator = nullptr;
|
||||
+ NSEnumerator *windowEnumerator = nullptr;
|
||||
NSApplication *application = [NSApplication sharedApplication];
|
||||
|
||||
#if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)
|
@ -2,7 +2,7 @@
|
||||
stdenv, lib,
|
||||
src, patches, version, qtCompatVersion,
|
||||
|
||||
coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2,
|
||||
coreutils, bison, flex, gdb, gperf, lndir, perl, pkgconfig, python2,
|
||||
which,
|
||||
# darwin support
|
||||
darwin, libiconv,
|
||||
@ -78,17 +78,15 @@ stdenv.mkDerivation {
|
||||
[ libinput ]
|
||||
++ lib.optional withGtk3 gtk3
|
||||
)
|
||||
++ lib.optional stdenv.isDarwin
|
||||
# Needed for OBJC_CLASS_$_NSDate symbols.
|
||||
[ darwin.cf-private ]
|
||||
# Needed for OBJC_CLASS_$_NSDate symbols.
|
||||
++ lib.optional stdenv.isDarwin darwin.cf-private
|
||||
++ lib.optional developerBuild gdb
|
||||
++ lib.optional (cups != null) cups
|
||||
++ lib.optional (mysql != null) mysql.connector-c
|
||||
++ lib.optional (postgresql != null) postgresql;
|
||||
|
||||
nativeBuildInputs =
|
||||
[ bison flex gperf lndir perl pkgconfig python2 which ]
|
||||
++ lib.optional (!stdenv.isDarwin) patchelf;
|
||||
[ bison flex gperf lndir perl pkgconfig python2 which ];
|
||||
|
||||
propagatedNativeBuildInputs = [ lndir ];
|
||||
|
||||
@ -199,26 +197,11 @@ stdenv.mkDerivation {
|
||||
''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"''
|
||||
]
|
||||
|
||||
++ (
|
||||
if stdenv.isDarwin
|
||||
then
|
||||
[
|
||||
"-Wno-missing-sysroot"
|
||||
"-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090"
|
||||
"-D__AVAILABILITY_INTERNAL__MAC_10_10=__attribute__((availability(macosx,introduced=10.10)))"
|
||||
# Note that nixpkgs's objc4 is from macOS 10.11 while the SDK is
|
||||
# 10.9 which necessitates the above macro definition that mentions
|
||||
# 10.10
|
||||
]
|
||||
else
|
||||
lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
|
||||
++ lib.optionals withGtk3
|
||||
[
|
||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
||||
]
|
||||
)
|
||||
|
||||
++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"''
|
||||
++ lib.optionals withGtk3 [
|
||||
''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"''
|
||||
''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"''
|
||||
]
|
||||
++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC";
|
||||
|
||||
prefixKey = "-prefix ";
|
||||
@ -392,6 +375,7 @@ stdenv.mkDerivation {
|
||||
license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ];
|
||||
maintainers = with maintainers; [ qknight ttuegel periklis bkchr ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isDarwin && (compareVersion "5.9.0" < 0);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ qtModule {
|
||||
cat <<EOF > src/3rdparty/chromium/build/mac/find_sdk.py
|
||||
#!/usr/bin/env python
|
||||
print("${darwin.apple_sdk.sdk}")
|
||||
print("10.10.0")
|
||||
print("10.12.0")
|
||||
EOF
|
||||
|
||||
cat <<EOF > src/3rdparty/chromium/build/config/mac/sdk_info.py
|
||||
@ -102,22 +102,6 @@ EOF
|
||||
--replace 'libs = [ "sandbox" ]' 'libs = [ "/usr/lib/libsandbox.1.dylib" ]'
|
||||
'');
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
lib.optionalString stdenv.isDarwin [
|
||||
"-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10"
|
||||
"-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"
|
||||
|
||||
#
|
||||
# Prevent errors like
|
||||
# /nix/store/xxx-apple-framework-CoreData/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h:51:7:
|
||||
# error: pointer to non-const type 'id' with no explicit ownership
|
||||
# id** _kvcPropertyAccessors;
|
||||
#
|
||||
# TODO remove when new Apple SDK is in
|
||||
#
|
||||
"-fno-objc-arc"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
export NINJAFLAGS=-j$NIX_BUILD_CORES
|
||||
|
||||
|
@ -35,10 +35,15 @@ let
|
||||
url = "https://bitbucket.org/fenics-project/dijitso/downloads/dijitso-${version}.tar.gz";
|
||||
sha256 = "0mw6mynjmg6yl3l2k33yra2x84s4r6mh44ylhk9znjfk74jra8zg";
|
||||
};
|
||||
buildInputs = [ numpy pytest six ];
|
||||
checkPhase = ''
|
||||
buildInputs = [ numpy six ];
|
||||
nativeBuildInputs = [ pytest ];
|
||||
preCheck = ''
|
||||
export HOME=$PWD
|
||||
'';
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
py.test test/
|
||||
runHook postCheck
|
||||
'';
|
||||
meta = {
|
||||
description = "Distributed just-in-time shared library building";
|
||||
|
@ -27,8 +27,8 @@ stdenv.mkDerivation {
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
propagatedBuildInputs = [ tcl libXft ];
|
||||
buildInputs = lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
|
||||
propagatedBuildInputs = [ tcl libXft ]
|
||||
++ lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [
|
||||
Cocoa cf-private
|
||||
]);
|
||||
|
||||
|
@ -74,12 +74,13 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
||||
meta = {
|
||||
platforms = with platforms; darwin ++ linux;
|
||||
license = licenses.wxWindows;
|
||||
homepage = https://www.wxwidgets.org/;
|
||||
description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
|
||||
longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -89,5 +89,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://www.wxwidgets.org/;
|
||||
description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
|
||||
longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -71,5 +71,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://www.wxwidgets.org/;
|
||||
description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base";
|
||||
longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more.";
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ if isPyPy then null else buildPythonPackage rec {
|
||||
# The tests use -Werror but with python3.6 clang detects some unreachable code.
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ];
|
||||
|
||||
doCheck = !stdenv.hostPlatform.isMusl; # TODO: Investigate
|
||||
doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate
|
||||
checkPhase = ''
|
||||
py.test -k "not test_char_pointer_conversion"
|
||||
'';
|
||||
|
@ -53,14 +53,6 @@ buildPythonPackage rec {
|
||||
py.test --disable-pytest-warnings tests
|
||||
'';
|
||||
|
||||
# The test assumes that if we're on Sierra or higher, that we use `getentropy`, but for binary
|
||||
# compatibility with pre-Sierra for binary caches, we hide that symbol so the library doesn't
|
||||
# use it. This boils down to them checking compatibility with `getentropy` in two different places,
|
||||
# so let's neuter the second test.
|
||||
postPatch = ''
|
||||
substituteInPlace ./tests/hazmat/backends/test_openssl.py --replace '"16.0"' '"99.0"'
|
||||
'';
|
||||
|
||||
# IOKit's dependencies are inconsistent between OSX versions, so this is the best we
|
||||
# can do until nix 1.11's release
|
||||
__impureHostDeps = [ "/usr/lib" ];
|
||||
|
@ -60,7 +60,7 @@ buildPythonPackage rec {
|
||||
url = "https://github.com/matplotlib/matplotlib/commit/2980184d092382a40ab21f95b79582ffae6e19d6.patch";
|
||||
sha256 = "1c0wj28zy8s5h6qiavx9zzbhlmhjwpzbc3fyyw9039mbnqk0spg2";
|
||||
})
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.patch ];
|
||||
];
|
||||
|
||||
# Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the
|
||||
# corresponding interpreter object for its library paths. This fails if
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- a/src/_macosx.m 2015-10-30 00:46:20.000000000 +0200
|
||||
+++ b/src/_macosx.m 2015-11-01 14:52:25.000000000 +0200
|
||||
@@ -6264,6 +6264,7 @@
|
||||
|
||||
static bool verify_framework(void)
|
||||
{
|
||||
+ return true; /* nixpkgs darwin stdenv */
|
||||
#ifdef COMPILING_FOR_10_6
|
||||
NSRunningApplication* app = [NSRunningApplication currentApplication];
|
||||
NSApplicationActivationPolicy activationPolicy = [app activationPolicy];
|
@ -1,12 +0,0 @@
|
||||
diff -ruN matplotlib-3.0.0/src/_macosx.m matplotlib-3.0.0.patched/src/_macosx.m
|
||||
--- matplotlib-3.0.0/src/_macosx.m 2018-09-16 00:35:21.000000000 +0200
|
||||
+++ matplotlib-3.0.0.patched/src/_macosx.m 2018-11-03 13:14:33.000000000 +0100
|
||||
@@ -2577,6 +2577,7 @@
|
||||
|
||||
static bool verify_framework(void)
|
||||
{
|
||||
+ return true; /* nixpkgs darwin stdenv */
|
||||
ProcessSerialNumber psn;
|
||||
/* These methods are deprecated, but they don't require the app to
|
||||
have started */
|
||||
|
@ -52,8 +52,7 @@ buildPythonPackage rec {
|
||||
++ stdenv.lib.optionals enableQt [ pyqt4 ];
|
||||
|
||||
patches =
|
||||
[ ./basedirlist.patch ] ++
|
||||
stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv.patch ];
|
||||
[ ./basedirlist.patch ];
|
||||
|
||||
# Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the
|
||||
# corresponding interpreter object for its library paths. This fails if
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k
|
||||
, pytestrunner, pytest, mock }:
|
||||
, stdenv, pytestrunner, pytest, mock }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "paho-mqtt";
|
||||
@ -20,6 +20,8 @@ buildPythonPackage rec {
|
||||
|
||||
checkInputs = [ pytestrunner pytest ] ++ lib.optional (!isPy3k) mock;
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = https://eclipse.org/paho;
|
||||
description = "MQTT version 3.1.1 client class";
|
||||
|
@ -5,6 +5,7 @@
|
||||
, prompt_toolkit, pygments
|
||||
#, optional, dependencies
|
||||
, jinja2, whoosh, pytest
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -28,6 +29,8 @@ buildPythonPackage rec {
|
||||
jinja2 whoosh
|
||||
];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
checkInputs = ([
|
||||
pytest
|
||||
]) ++ [
|
||||
|
@ -21,6 +21,8 @@ buildPythonPackage rec {
|
||||
checkInputs = [ unittest2 scripttest pytz mock testtools testrepository ];
|
||||
propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
prePatch = ''
|
||||
sed -i -e /tempest-lib/d \
|
||||
-e /testtools/d \
|
||||
|
@ -30,6 +30,8 @@ buildPythonPackage rec {
|
||||
buildInputs = [ xorg.libX11 ];
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fully functional X client library for Python programs";
|
||||
homepage = http://python-xlib.sourceforge.net/;
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ lib, fetchPypi, buildPythonPackage, intervaltree, pyflakes, requests, lxml, google-i18n-address
|
||||
, pycountry, html5lib, six
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -26,6 +27,8 @@ buildPythonPackage rec {
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool generating IETF RFCs and drafts from XML sources";
|
||||
homepage = https://tools.ietf.org/tools/xml2rfc/trac/;
|
||||
|
@ -19,6 +19,8 @@ buildPythonPackage rec {
|
||||
|
||||
propagatedBuildInputs = [ zope_interface zope_exceptions zope_testing six ];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A flexible test runner with layer support";
|
||||
homepage = https://pypi.python.org/pypi/zope.testrunner;
|
||||
|
@ -44,14 +44,8 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace coregrind/Makefile.in \
|
||||
--replace /usr/include/mach ${xnu}/include/mach
|
||||
|
||||
echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil"
|
||||
find -name "Makefile.in" | while read file; do
|
||||
substituteInPlace "$file" \
|
||||
--replace dsymutil ${llvm}/bin/llvm-dsymutil
|
||||
done
|
||||
|
||||
substituteInPlace coregrind/m_debuginfo/readmacho.c \
|
||||
--replace /usr/bin/dsymutil ${llvm}/bin/llvm-dsymutil
|
||||
--replace /usr/bin/dsymutil ${stdenv.cc.bintools.bintools}/bin/dsymutil
|
||||
|
||||
echo "substitute hardcoded /usr/bin/ld with ${cctools}/bin/ld"
|
||||
substituteInPlace coregrind/link_tool_exe_darwin.in \
|
||||
|
@ -2,16 +2,16 @@ diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
|
||||
index 8aff8f6..af1852d 100644
|
||||
--- a/Source/CMakeLists.txt
|
||||
+++ b/Source/CMakeLists.txt
|
||||
@@ -791,12 +791,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc"
|
||||
@@ -791,12 +791,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc"
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-# On Apple we need CoreFoundation and CoreServices
|
||||
-if(APPLE)
|
||||
- target_link_libraries(CMakeLib "-framework CoreFoundation")
|
||||
# On Apple we need CoreFoundation and CoreServices
|
||||
if(APPLE)
|
||||
target_link_libraries(CMakeLib "-framework CoreFoundation")
|
||||
- target_link_libraries(CMakeLib "-framework CoreServices")
|
||||
-endif()
|
||||
-
|
||||
endif()
|
||||
|
||||
if(WIN32 AND NOT UNIX)
|
||||
# We need the rpcrt4 library on Windows.
|
||||
# We need the crypt32 library on Windows for crypto/cert APIs.
|
||||
|
@ -2,7 +2,7 @@
|
||||
, bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash
|
||||
, buildPackages
|
||||
# darwin attributes
|
||||
, cf-private, ps
|
||||
, ps
|
||||
, isBootstrap ? false
|
||||
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
|
||||
, useNcurses ? false, ncurses
|
||||
@ -52,7 +52,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs =
|
||||
[ setupHook pkgconfig ]
|
||||
++ optional stdenv.isDarwin cf-private # needed for CFBundleCopyExecutableURL
|
||||
++ optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ]
|
||||
++ optional useNcurses ncurses
|
||||
++ optional useQt4 qt4
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
./build.sh
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
checkPhase = ''
|
||||
export DUB=$NIX_BUILD_TOP/source/bin/dub
|
||||
|
@ -13,7 +13,8 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ];
|
||||
|
||||
# Upstream is aware of it; it may be in the next release.
|
||||
patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch;
|
||||
patches = [ ./s_isdir.patch ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin ./darwin-secure-format.patch;
|
||||
|
||||
meta = {
|
||||
homepage = https://www.gnu.org/software/m4/;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, rustPlatform }:
|
||||
{ stdenv, fetchFromGitHub, rustPlatform, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "tokei";
|
||||
@ -13,6 +13,8 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
cargoSha256 = "1xai3jxvs8r3s3v5d5w40miw6nihnj9gzlzzdrwphmgrkywr88c4";
|
||||
|
||||
buildInputs = [ libiconv ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Program that displays statistics about your code";
|
||||
homepage = https://github.com/XAMPPRocky/tokei;
|
||||
|
@ -67,6 +67,7 @@ runCommand "Toolchains" {} (''
|
||||
done
|
||||
|
||||
ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $toolchain/bin
|
||||
mkdir -p $toolchain/libexec
|
||||
ln -s ${buildPackages.darwin.bootstrap_cmds}/libexec/migcom $toolchain/libexec
|
||||
ln -s ${mkdep-darwin-src} $toolchain/bin/mkdep
|
||||
'')
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, lib, buildPackages, makeWrapper, writeText, runCommand
|
||||
, CoreServices, ImageIO, CoreGraphics
|
||||
, runtimeShell
|
||||
, runtimeShell, callPackage
|
||||
, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX"
|
||||
, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1"
|
||||
, sdkVer ? stdenv.targetPlatform.sdkVer or "10.10" }:
|
||||
@ -14,20 +14,20 @@ let
|
||||
sdkBuildVersion = "17E189";
|
||||
xcodeSelectVersion = "2349";
|
||||
|
||||
xcbuild = buildPackages.callPackage ./default.nix {
|
||||
inherit CoreServices ImageIO CoreGraphics;
|
||||
xcbuild = callPackage ./default.nix {
|
||||
inherit CoreServices ImageIO CoreGraphics stdenv;
|
||||
};
|
||||
|
||||
toolchains = buildPackages.callPackage ./toolchains.nix {
|
||||
inherit toolchainName;
|
||||
toolchains = callPackage ./toolchains.nix {
|
||||
inherit toolchainName stdenv;
|
||||
};
|
||||
|
||||
sdks = buildPackages.callPackage ./sdks.nix {
|
||||
sdks = callPackage ./sdks.nix {
|
||||
inherit toolchainName sdkName xcodePlatform;
|
||||
version = sdkVer;
|
||||
};
|
||||
|
||||
platforms = buildPackages.callPackage ./platforms.nix {
|
||||
platforms = callPackage ./platforms.nix {
|
||||
inherit sdks xcodePlatform;
|
||||
};
|
||||
|
||||
|
@ -1,64 +0,0 @@
|
||||
--- a/garglk/fontmac.m
|
||||
+++ b/garglk/fontmac.m
|
||||
@@ -167,7 +167,7 @@ static void propfont(char *file, int style)
|
||||
}
|
||||
}
|
||||
|
||||
-static NSMutableArray<NSURL *> * gli_registered_fonts = nil;
|
||||
+static NSMutableArray * gli_registered_fonts = nil;
|
||||
static NSDistributedLock * gli_font_lock = nil;
|
||||
|
||||
void fontreplace(char *font, int type)
|
||||
@@ -181,7 +181,7 @@ void fontreplace(char *font, int type)
|
||||
NSFontDescriptor * fontFamilyDescriptor =
|
||||
[[NSFontDescriptor fontDescriptorWithFontAttributes: nil] fontDescriptorWithFamily: fontFamily];
|
||||
|
||||
- NSArray<NSFontDescriptor *> * fontMatches =
|
||||
+ NSArray * fontMatches =
|
||||
[fontFamilyDescriptor matchingFontDescriptorsWithMandatoryKeys: nil];
|
||||
|
||||
for (NSFontDescriptor * sysfont in fontMatches)
|
||||
@@ -259,7 +259,7 @@ void fontload(void)
|
||||
|
||||
// obtain a list of all files in the Fonts directory
|
||||
NSString * fontFolder = [[NSString stringWithUTF8String: env] stringByAppendingPathComponent: @"Fonts"];
|
||||
- NSArray<NSString *> * fontFiles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: fontFolder error: nil];
|
||||
+ NSArray * fontFiles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: fontFolder error: nil];
|
||||
|
||||
// create a collection to hold the registered font URLs
|
||||
gli_registered_fonts = [NSMutableArray new];
|
||||
--- a/garglk/launchmac.m
|
||||
+++ b/garglk/launchmac.m
|
||||
@@ -556,7 +556,7 @@ static BOOL isTextbufferEvent(NSEvent * evt)
|
||||
<GargoyleApp, NSApplicationDelegate, NSWindowDelegate>
|
||||
{
|
||||
BOOL openedFirstGame;
|
||||
- NSMutableDictionary<NSNumber *, GargoyleWindow *> * windows;
|
||||
+ NSMutableDictionary * windows;
|
||||
NSConnection * link;
|
||||
}
|
||||
- (BOOL) launchFile: (NSString *) file;
|
||||
--- a/garglk/ttsmac.m
|
||||
+++ b/garglk/ttsmac.m
|
||||
@@ -30,7 +30,7 @@
|
||||
#import "sysmac.h"
|
||||
|
||||
// a queue of phrases to feed to the speech synthesizer
|
||||
-static NSMutableArray<NSString *> * phraseQueue = nil;
|
||||
+static NSMutableArray * phraseQueue = nil;
|
||||
static NSRange purgeRange;
|
||||
|
||||
@interface SpeechDelegate : NSObject <NSSpeechSynthesizerDelegate>
|
||||
@@ -96,10 +96,10 @@ void gli_initialize_tts(void)
|
||||
NSString * lang = [NSString stringWithCString: gli_conf_speak_language
|
||||
encoding: NSUTF8StringEncoding];
|
||||
|
||||
- NSArray<NSString *> * voices = [NSSpeechSynthesizer availableVoices];
|
||||
+ NSArray * voices = [NSSpeechSynthesizer availableVoices];
|
||||
for (NSString * voice in voices)
|
||||
{
|
||||
- NSDictionary<NSString *, id> * attr = [NSSpeechSynthesizer attributesForVoice: voice];
|
||||
+ NSDictionary * attr = [NSSpeechSynthesizer attributesForVoice: voice];
|
||||
if ([lang isEqualToString: [attr objectForKey: NSVoiceLocaleIdentifier]])
|
||||
{
|
||||
[synth setVoice: voice];
|
@ -34,8 +34,6 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
|
||||
|
||||
patches = [ ./darwin.patch ];
|
||||
|
||||
buildPhase = jamenv + "jam -j$NIX_BUILD_CORES";
|
||||
|
||||
installPhase =
|
||||
|
@ -3,6 +3,7 @@
|
||||
, oggSupport ? true, libogg, libvorbis
|
||||
, openalSupport ? true, openal
|
||||
, zipSupport ? true, zlib
|
||||
, Cocoa, OpenAL
|
||||
}:
|
||||
|
||||
let
|
||||
@ -28,6 +29,7 @@ let
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ SDL2 libGL ]
|
||||
++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ]
|
||||
++ lib.optionals oggSupport [ libogg libvorbis ]
|
||||
++ lib.optional openalSupport openal
|
||||
++ lib.optional zipSupport zlib;
|
||||
|
@ -76,5 +76,6 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ goibhniu ];
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
@ -1,30 +1,22 @@
|
||||
{ stdenv, fetchurl, xar, xz, cpio, pkgs, python, lib }:
|
||||
{ stdenv, fetchurl, xar, cpio, pkgs, python, pbzx, lib }:
|
||||
|
||||
let
|
||||
# TODO: make this available to other packages and generalize the unpacking a bit
|
||||
# from https://gist.github.com/pudquick/ff412bcb29c9c1fa4b8d
|
||||
# This isn't needed until we get to SDK 10.11, but that presents other challenges
|
||||
# unpbzx = fetchurl {
|
||||
# url = "https://gist.githubusercontent.com/pudquick/ff412bcb29c9c1fa4b8d/raw/24b25538ea8df8d0634a2a6189aa581ccc6a5b4b/parse_pbzx2.py";
|
||||
# sha256 = "0jgp6qbfl36i0jlz7as5zk2w20z4ca8wlrhdw49lwsld6wi3rfhc";
|
||||
# };
|
||||
|
||||
# sadly needs to be exported because security_tool needs it
|
||||
sdk = stdenv.mkDerivation rec {
|
||||
version = "10.10";
|
||||
version = "10.12";
|
||||
name = "MacOS_SDK-${version}";
|
||||
|
||||
# This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.10.merged-1.sucatalog, which we found by:
|
||||
# This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.12.merged-1.sucatalog, which we found by:
|
||||
# 1. Google: site:swscan.apple.com and look for a name that seems appropriate for your version
|
||||
# 2. In the resulting file, search for a file called DevSDK ending in .pkg
|
||||
# 3. ???
|
||||
# 4. Profit
|
||||
src = fetchurl {
|
||||
url = "http://swcdn.apple.com/content/downloads/22/52/031-45139/hcjjv7cm4n6yqk56ict73qqw15ikm5iaql/DevSDK_OSX1010.pkg";
|
||||
sha256 = "08bxa93zw7r4vzs28j9giq2qyk3b68ky6jx1bb9850gflr3nvgq1";
|
||||
url = "http://swcdn.apple.com/content/downloads/28/09/091-29862/pafhn2u002b9slnrxzy9p86rpedycnjhb5/DevSDK_OSX1012.pkg";
|
||||
sha256 = "1sggc70rypqwcjwr7ciavw8sczwll16cwqxdxrbw7r2qvy3b0nhx";
|
||||
};
|
||||
|
||||
buildInputs = [ xar xz cpio python ];
|
||||
buildInputs = [ xar cpio python pbzx ];
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
@ -37,7 +29,7 @@ let
|
||||
start="$(pwd)"
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
cat $start/Payload | gzip -d | cpio -idm
|
||||
pbzx -n $start/Payload | cpio -idm
|
||||
|
||||
mv usr/* .
|
||||
rmdir usr
|
||||
@ -48,12 +40,6 @@ let
|
||||
pushd lib
|
||||
ln -s -L /usr/lib/libcups*.dylib .
|
||||
popd
|
||||
|
||||
cd Library/Frameworks/QuartzCore.framework/Versions/A/Headers
|
||||
for file in CI*.h; do
|
||||
rm $file
|
||||
ln -s ../Frameworks/CoreImage.framework/Headers/$file
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
@ -88,13 +74,12 @@ let
|
||||
|
||||
# Keep track of if this is a child or a child rescue as with
|
||||
# ApplicationServices in the 10.9 SDK
|
||||
local isChild
|
||||
local isChild=0
|
||||
|
||||
if [ -d "${sdk.out}/Library/Frameworks/$path/Versions/$current/Headers" ]; then
|
||||
isChild=1
|
||||
cp -R "${sdk.out}/Library/Frameworks/$path/Versions/$current/Headers" .
|
||||
else
|
||||
isChild=0
|
||||
elif [ -d "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" ]; then
|
||||
current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")"
|
||||
cp -R "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" .
|
||||
fi
|
||||
@ -111,11 +96,6 @@ let
|
||||
pushd "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current" >/dev/null
|
||||
fi
|
||||
local children=$(echo Frameworks/*.framework)
|
||||
if [ "$name" == "ApplicationServices" ]; then
|
||||
# Fixing up ApplicationServices which is missing
|
||||
# CoreGraphics in the 10.9 SDK
|
||||
children="$children Frameworks/CoreGraphics.framework"
|
||||
fi
|
||||
popd >/dev/null
|
||||
|
||||
for child in $children; do
|
||||
|
@ -10,12 +10,12 @@ with frameworks; with libs; {
|
||||
AVKit = [];
|
||||
Accounts = [];
|
||||
AddressBook = [ Carbon CF ];
|
||||
AppKit = [ AudioToolbox Foundation QuartzCore ];
|
||||
AppKit = [ AudioToolbox AudioUnit Foundation QuartzCore ];
|
||||
AppKitScripting = [];
|
||||
AppleScriptKit = [];
|
||||
AppleScriptObjC = [];
|
||||
AudioToolbox = [ AudioUnit CoreAudio CF CoreMIDI ];
|
||||
AudioUnit = [ Carbon CoreAudio CF ];
|
||||
AudioToolbox = [ CoreAudio CF CoreMIDI ];
|
||||
AudioUnit = [ AudioToolbox Carbon CoreAudio CF ];
|
||||
AudioVideoBridging = [ Foundation ];
|
||||
Automator = [];
|
||||
CFNetwork = [ CF ];
|
||||
@ -29,26 +29,25 @@ with frameworks; with libs; {
|
||||
CoreAudioKit = [ AudioUnit ];
|
||||
CoreData = [];
|
||||
CoreGraphics = [ Accelerate CF IOKit IOSurface SystemConfiguration ];
|
||||
CoreImage = [ ];
|
||||
CoreLocation = [];
|
||||
CoreMIDI = [ CF ];
|
||||
CoreMIDIServer = [];
|
||||
CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ];
|
||||
CoreMedia = [ ApplicationServices AudioToolbox AudioUnit CoreAudio CF CoreGraphics CoreVideo ];
|
||||
CoreMediaIO = [ CF CoreMedia ];
|
||||
CoreText = [ CF CoreGraphics ];
|
||||
CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ];
|
||||
CoreWLAN = [ SecurityFoundation ];
|
||||
DVComponentGlue = [ CoreServices QuickTime ];
|
||||
DVDPlayback = [];
|
||||
DirectoryService = [ CF ];
|
||||
DiscRecording = [ CF CoreServices IOKit ];
|
||||
DiscRecordingUI = [];
|
||||
DiskArbitration = [ CF IOKit ];
|
||||
DrawSprocket = [ Carbon ];
|
||||
EventKit = [];
|
||||
ExceptionHandling = [];
|
||||
FWAUserLib = [];
|
||||
ForceFeedback = [ CF IOKit ];
|
||||
Foundation = [ CF libobjc Security ApplicationServices SystemConfiguration ];
|
||||
Foundation = [ cf-private libobjc Security ApplicationServices SystemConfiguration ];
|
||||
GLKit = [ CF ];
|
||||
GLUT = [ OpenGL ];
|
||||
GSS = [];
|
||||
@ -73,7 +72,8 @@ with frameworks; with libs; {
|
||||
LatentSemanticMapping = [ Carbon CF ];
|
||||
MapKit = [];
|
||||
MediaAccessibility = [ CF CoreGraphics CoreText QuartzCore ];
|
||||
MediaToolbox = [ AudioToolbox CF CoreMedia ];
|
||||
MediaToolbox = [ AudioToolbox AudioUnit CF CoreMedia ];
|
||||
Metal = [];
|
||||
NetFS = [ CF ];
|
||||
OSAKit = [ Carbon ];
|
||||
OpenAL = [];
|
||||
@ -84,7 +84,6 @@ with frameworks; with libs; {
|
||||
PubSub = [];
|
||||
QTKit = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ];
|
||||
QuickLook = [ ApplicationServices CF ];
|
||||
QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ];
|
||||
SceneKit = [];
|
||||
ScreenSaver = [];
|
||||
Scripting = [];
|
||||
@ -114,7 +113,8 @@ with frameworks; with libs; {
|
||||
JavaVM = [];
|
||||
OpenDirectory = [];
|
||||
Quartz = [ QuickLook QTKit ];
|
||||
QuartzCore = [ ApplicationServices CF CoreVideo OpenCL ];
|
||||
QuartzCore = [ ApplicationServices CF CoreVideo OpenCL CoreImage Metal ];
|
||||
QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ];
|
||||
|
||||
vmnet = [];
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2010 Apple Inc. All rights reserved.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_START@
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original Code
|
||||
* as defined in and that are subject to the Apple Public Source License
|
||||
* Version 2.0 (the 'License'). You may not use this file except in
|
||||
* compliance with the License. Please obtain a copy of the License at
|
||||
* http://www.opensource.apple.com/apsl/ and read it before using this
|
||||
* file.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
* Please see the License for the specific language governing rights and
|
||||
* limitations under the License.
|
||||
*
|
||||
* @APPLE_LICENSE_HEADER_END@
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Not to be installed in /usr/local/include
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _LIBC_CRASHREPORTERCLIENT_H
|
||||
#define _LIBC_CRASHREPORTERCLIENT_H
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
/* Fake the CrashReporterClient API */
|
||||
#define CRGetCrashLogMessage() 0
|
||||
#define CRSetCrashLogMessage(m) true
|
||||
|
||||
#define CRASH_REPORTER_CLIENT_HIDDEN __attribute__((visibility("hidden")))
|
||||
#define CRASHREPORTER_ANNOTATIONS_VERSION 4
|
||||
#define CRASHREPORTER_ANNOTATIONS_SECTION "__crash_info"
|
||||
|
||||
struct crashreporter_annotations_t {
|
||||
uint64_t version; // unsigned long
|
||||
uint64_t message; // char *
|
||||
uint64_t signature_string; // char *
|
||||
uint64_t backtrace; // char *
|
||||
uint64_t message2; // char *
|
||||
uint64_t thread; // uint64_t
|
||||
uint64_t dialog_mode; // unsigned int
|
||||
};
|
||||
|
||||
#endif
|
@ -11,6 +11,8 @@ appleDerivation {
|
||||
export PRIVATE_HEADERS_FOLDER_PATH=include
|
||||
bash xcodescripts/headers.sh
|
||||
|
||||
cp ${./CrashReporterClient.h} $out/include/CrashReporterClient.h
|
||||
|
||||
cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include
|
||||
|
||||
# Ugh Apple stopped releasing this stuff so we need an older one...
|
||||
|
@ -1,9 +1,11 @@
|
||||
{ stdenv, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo,
|
||||
dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto, copyfile,
|
||||
removefile, libresolv, Libnotify, libplatform, libpthread, mDNSResponder, launchd, libutil }:
|
||||
{ stdenv, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo
|
||||
, dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto
|
||||
, copyfile, removefile, libresolv, Libnotify, libplatform, libpthread
|
||||
, mDNSResponder, launchd, libutil, hfs, darling }:
|
||||
|
||||
appleDerivation rec {
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
nativeBuildInputs = [ cpio ];
|
||||
|
||||
@ -17,19 +19,48 @@ appleDerivation rec {
|
||||
cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/Availability*.h $out/include
|
||||
cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdarg.h $out/include
|
||||
|
||||
for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \
|
||||
${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
|
||||
${Libnotify} ${libplatform} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do
|
||||
for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} \
|
||||
${libclosure} ${CarbonHeaders} ${libdispatch} ${ncurses.dev} \
|
||||
${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \
|
||||
${Libnotify} ${libplatform} ${mDNSResponder} ${launchd} \
|
||||
${libutil} ${libpthread} ${hfs}; do
|
||||
(cd $dep/include && find . -name '*.h' | cpio -pdm $out/include)
|
||||
done
|
||||
|
||||
|
||||
(cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o)
|
||||
|
||||
mkdir -p $out/include/os
|
||||
|
||||
cp ${darling.src}/src/libc/os/activity.h $out/include/os
|
||||
cp ${darling.src}/src/libc/os/log.h $out/include/os
|
||||
cp ${darling.src}/src/duct/include/os/trace.h $out/include/os
|
||||
|
||||
cat <<EOF > $out/include/os/availability.h
|
||||
#ifndef __OS_AVAILABILITY__
|
||||
#define __OS_AVAILABILITY__
|
||||
#include <AvailabilityInternal.h>
|
||||
|
||||
#if defined(__has_feature) && defined(__has_attribute) && __has_attribute(availability)
|
||||
#define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1)(__VA_ARGS__)
|
||||
#define API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO(__VA_ARGS__, __API_DEPRECATED_MSG5, __API_DEPRECATED_MSG4, __API_DEPRECATED_MSG3, __API_DEPRECATED_MSG2, __API_DEPRECATED_MSG1)(__VA_ARGS__)
|
||||
#define API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO(__VA_ARGS__, __API_DEPRECATED_REP5, __API_DEPRECATED_REP4, __API_DEPRECATED_REP3, __API_DEPRECATED_REP2, __API_DEPRECATED_REP1)(__VA_ARGS__)
|
||||
#define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__, __API_UNAVAILABLE3, __API_UNAVAILABLE2, __API_UNAVAILABLE1)(__VA_ARGS__)
|
||||
#else
|
||||
|
||||
#define API_AVAILABLE(...)
|
||||
#define API_DEPRECATED(...)
|
||||
#define API_DEPRECATED_WITH_REPLACEMENT(...)
|
||||
#define API_UNAVAILABLE(...)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
|
||||
cat <<EOF > $out/include/TargetConditionals.h
|
||||
#ifndef __TARGETCONDITIONALS__
|
||||
#define __TARGETCONDITIONALS__
|
||||
#define TARGET_OS_MAC 1
|
||||
#define TARGET_OS_OSX 1
|
||||
#define TARGET_OS_WIN32 0
|
||||
#define TARGET_OS_UNIX 0
|
||||
#define TARGET_OS_EMBEDDED 0
|
||||
|
@ -232,6 +232,8 @@ __os_assert_log_ctx
|
||||
__os_assumes_log
|
||||
__os_assumes_log_ctx
|
||||
__os_avoid_tail_call
|
||||
__os_crash
|
||||
__os_crash_callback
|
||||
__os_debug_log
|
||||
__os_debug_log_error_str
|
||||
__putenvp
|
||||
@ -263,6 +265,7 @@ __unsetenvp
|
||||
__utmpxname
|
||||
_a64l
|
||||
_abort
|
||||
_abort_report_np
|
||||
_abs
|
||||
_acl_add_flag_np
|
||||
_acl_add_perm
|
||||
@ -345,6 +348,7 @@ _backtrace
|
||||
_backtrace_symbols
|
||||
_backtrace_symbols_fd
|
||||
_basename
|
||||
_basename_r
|
||||
_bcmp
|
||||
_bcopy
|
||||
_brk
|
||||
@ -377,8 +381,12 @@ _chmodx_np
|
||||
_clearerr
|
||||
_clearerr_unlocked
|
||||
_clock
|
||||
_clock_getres
|
||||
_clock_gettime
|
||||
_clock_gettime_nsec_np
|
||||
_clock_port
|
||||
_clock_sem
|
||||
_clock_settime
|
||||
_closedir
|
||||
_compat_mode
|
||||
_confstr
|
||||
@ -411,6 +419,7 @@ _digittoint
|
||||
_digittoint_l
|
||||
_dirfd
|
||||
_dirname
|
||||
_dirname_r
|
||||
_div
|
||||
_dprintf
|
||||
_dprintf_l
|
||||
@ -771,8 +780,12 @@ _mergesort_b
|
||||
_mkdirx_np
|
||||
_mkdtemp
|
||||
_mkfifox_np
|
||||
_mkostemp
|
||||
_mkostemps
|
||||
_mkpath_np
|
||||
_mkpathat_np
|
||||
_mkstemp
|
||||
_mkstemp_dprotected_np
|
||||
_mkstemps
|
||||
_mktemp
|
||||
_mktime
|
||||
@ -805,6 +818,7 @@ _nice
|
||||
_nl_langinfo
|
||||
_nl_langinfo_l
|
||||
_nrand48
|
||||
_nvis
|
||||
_off32
|
||||
_off64
|
||||
_offtime
|
||||
@ -959,6 +973,7 @@ _sleep
|
||||
_sleep$NOCANCEL
|
||||
_snprintf
|
||||
_snprintf_l
|
||||
_snvis
|
||||
_sockatmark
|
||||
_sprintf
|
||||
_sprintf_l
|
||||
@ -988,6 +1003,7 @@ _strcoll_l
|
||||
_strcpy
|
||||
_strcspn
|
||||
_strdup
|
||||
_strenvisx
|
||||
_strerror
|
||||
_strerror_r
|
||||
_strfmon
|
||||
@ -1006,14 +1022,23 @@ _strncpy
|
||||
_strndup
|
||||
_strnlen
|
||||
_strnstr
|
||||
_strnunvis
|
||||
_strnunvisx
|
||||
_strnvis
|
||||
_strnvisx
|
||||
_strpbrk
|
||||
_strptime
|
||||
_strptime_l
|
||||
_strrchr
|
||||
_strsenvisx
|
||||
_strsep
|
||||
_strsignal
|
||||
_strsnvis
|
||||
_strsnvisx
|
||||
_strspn
|
||||
_strstr
|
||||
_strsvis
|
||||
_strsvisx
|
||||
_strtod
|
||||
_strtod_l
|
||||
_strtof
|
||||
@ -1046,6 +1071,7 @@ _strvisx
|
||||
_strxfrm
|
||||
_strxfrm_l
|
||||
_suboptarg
|
||||
_svis
|
||||
_swab
|
||||
_swprintf
|
||||
_swprintf_l
|
||||
@ -1087,6 +1113,7 @@ _timelocal
|
||||
_timeoff
|
||||
_times
|
||||
_timezone
|
||||
_timingsafe_bcmp
|
||||
_tmpfile
|
||||
_tmpnam
|
||||
_toascii
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user