Merge pull request #49081 from LnL7/darwin-wxmac
wxmac: 3.0.2 -> 3.0.4 (darwin)
This commit is contained in:
commit
450d33fc5b
@ -1,60 +1,26 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, expat, libiconv, libjpeg, libpng, libtiff, zlib
|
{ stdenv, fetchzip, fetchpatch, expat, libiconv, libjpeg, libpng, libtiff, zlib
|
||||||
# darwin only attributes
|
# darwin only attributes
|
||||||
, derez, rez, setfile
|
, cf-private, derez, rez, setfile
|
||||||
, AGL, Cocoa, Kernel
|
, AGL, Cocoa, Kernel
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "3.0.2";
|
version = "3.0.4";
|
||||||
name = "wxmac-${version}";
|
name = "wxmac-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchzip {
|
||||||
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2";
|
url = "https://github.com/wxWidgets/wxWidgets/archive/v${version}.tar.gz";
|
||||||
sha256 = "346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d";
|
sha256 = "19mqglghjjqjgz4rbybn3qdgn2cz9xc511nq1pvvli9wx2k8syl1";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches =
|
|
||||||
[ # Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems
|
|
||||||
# with abiguous overloads for clang-3.8 and gcc6.
|
|
||||||
(fetchpatch {
|
|
||||||
name = "patch-stc-abs.diff";
|
|
||||||
url = https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02.patch;
|
|
||||||
sha256 = "0w5whmfzm8waw62jmippming0zffa9064m5b3aw5nixph21rlcvq";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Various fixes related to Yosemite. Revisit in next stable release.
|
|
||||||
# Please keep an eye on http://trac.wxwidgets.org/ticket/16329 as well
|
|
||||||
# Theoretically the above linked patch should still be needed, but it isn't.
|
|
||||||
# Try to find out why.
|
|
||||||
(fetchpatch {
|
|
||||||
name = "patch-yosemite.diff";
|
|
||||||
url = https://raw.githubusercontent.com/Homebrew/formula-patches/bbf4995/wxmac/patch-yosemite.diff;
|
|
||||||
sha256 = "0ss66z2a79v976mvlrskyj1zmkyaz8hbwm98p29bscfvcx5845jb";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Remove uncenessary <QuickTime/QuickTime.h> includes
|
|
||||||
# http://trac.wxwidgets.org/changeset/f6a2d1caef5c6d412c84aa900cb0d3990b350938/git-wxWidgets
|
|
||||||
(fetchpatch {
|
|
||||||
name = "patch-quicktime-removal.diff";
|
|
||||||
url = https://raw.githubusercontent.com/Homebrew/formula-patches/bbf4995/wxmac/patch-quicktime-removal.diff;
|
|
||||||
sha256 = "0mzvdk8r70p9s1wj7qzdsqmdrlxlf2dalh9gqs8xjkqq2666yp0y";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Patch for wxOSXPrintData, custom paper not applied
|
|
||||||
# http://trac.wxwidgets.org/ticket/16959
|
|
||||||
(fetchpatch {
|
|
||||||
name = "wxPaperCustomPatch.patch";
|
|
||||||
url = http://trac.wxwidgets.org/raw-attachment/ticket/16959/wxPaperCustomPatch.patch;
|
|
||||||
sha256 = "0xgscv86f8dhggn9n8bhlq9wlj3ydsicgy9v35sraxyma18cbjvl";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
expat libiconv libjpeg libpng libtiff zlib
|
expat libiconv libjpeg libpng libtiff zlib
|
||||||
derez rez setfile
|
derez rez setfile
|
||||||
Cocoa Kernel
|
Cocoa Kernel
|
||||||
|
|
||||||
|
# Needed for CFURLGetFSRef, etc. which have deen deprecated
|
||||||
|
# since 10.9 and are not part of swift-corelibs CoreFoundation.
|
||||||
|
cf-private
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ AGL ];
|
propagatedBuildInputs = [ AGL ];
|
||||||
@ -98,7 +64,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
platforms = platforms.darwin;
|
platforms = platforms.darwin;
|
||||||
license = licenses.wxWindows;
|
license = licenses.wxWindows;
|
||||||
maintainers = [ maintainers.lnl7 ];
|
maintainers = [ maintainers.lnl7 ];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ CF, apple_sdk }:
|
{ CF, apple_sdk, osx_private_sdk }:
|
||||||
|
|
||||||
# cf-private is a bit weird, but boils down to CF with a weird setup-hook that
|
# cf-private is a bit weird, but boils down to CF with a weird setup-hook that
|
||||||
# makes a build link against the system CoreFoundation rather than our pure one.
|
# makes a build link against the system CoreFoundation rather than our pure one.
|
||||||
@ -13,10 +13,10 @@
|
|||||||
# because of their magic "toll-free bridging" support, the symbols for those types
|
# because of their magic "toll-free bridging" support, the symbols for those types
|
||||||
# live in CoreFoundation with an ObjC runtime. And because that isn't public, we have
|
# live in CoreFoundation with an ObjC runtime. And because that isn't public, we have
|
||||||
# this hack in place to let people link properly anyway. Phew!
|
# this hack in place to let people link properly anyway. Phew!
|
||||||
#
|
#
|
||||||
# This can be revisited if Apple ever decide to release the ObjC backend in a publicly
|
# This can be revisited if Apple ever decide to release the ObjC backend in a publicly
|
||||||
# buildable form.
|
# buildable form.
|
||||||
#
|
#
|
||||||
# This doesn't really need to rebuild CF, but it's cheap, and adding a setup hook to
|
# This doesn't really need to rebuild CF, but it's cheap, and adding a setup hook to
|
||||||
# an existing package was annoying. We need a buildEnv that knows how to add those
|
# an existing package was annoying. We need a buildEnv that knows how to add those
|
||||||
CF.overrideAttrs (orig: {
|
CF.overrideAttrs (orig: {
|
||||||
@ -38,22 +38,24 @@ CF.overrideAttrs (orig: {
|
|||||||
# this is watchman, who can almost certainly switch to the pure CF once the header
|
# this is watchman, who can almost certainly switch to the pure CF once the header
|
||||||
# and functionality is merged in.
|
# and functionality is merged in.
|
||||||
installPhase = orig.installPhase + ''
|
installPhase = orig.installPhase + ''
|
||||||
|
# Copy or overwrite private headers, some of these might already
|
||||||
|
# exist in CF but the private versions have more information.
|
||||||
basepath="Library/Frameworks/CoreFoundation.framework/Headers"
|
basepath="Library/Frameworks/CoreFoundation.framework/Headers"
|
||||||
path="$basepath/CFFileDescriptor.h"
|
cp -Lfv --no-preserve mode ${osx_private_sdk}/include/CoreFoundationPrivateHeaders/* "$out/$basepath"
|
||||||
|
|
||||||
# Append the include at top level or nobody will notice the header we're about to add
|
# Append the include at top level or nobody will notice the header we're about to add
|
||||||
sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFFileDescriptor.h>' \
|
sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFFileDescriptor.h>' \
|
||||||
"$out/$basepath/CoreFoundation.h"
|
"$out/$basepath/CoreFoundation.h"
|
||||||
|
|
||||||
cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
|
cp ${apple_sdk.frameworks.CoreFoundation}/$basepath/CFFileDescriptor.h $out/$basepath/CFFileDescriptor.h
|
||||||
'' +
|
'' +
|
||||||
# This one is less likely to go away, but I'll mention it anyway. The issue is at
|
# This one is less likely to go away, but I'll mention it anyway. The issue is at
|
||||||
# https://bugs.swift.org/browse/SR-8744, and the main user I know of is qtbase
|
# https://bugs.swift.org/browse/SR-8744, and the main user I know of is qtbase
|
||||||
''
|
''
|
||||||
path="$basepath/CFURLEnumerator.h"
|
path="$basepath/CFURLEnumerator.h"
|
||||||
sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFURLEnumerator.h>' \
|
sed -i '/CFNotificationCenter.h/a #include <CoreFoundation/CFURLEnumerator.h>' \
|
||||||
"$out/$basepath/CoreFoundation.h"
|
"$out/$basepath/CoreFoundation.h"
|
||||||
|
|
||||||
cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
|
cp ${apple_sdk.frameworks.CoreFoundation}/$path $out/$path
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
@ -12714,6 +12714,7 @@ with pkgs;
|
|||||||
wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
|
wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
|
||||||
inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel;
|
inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel;
|
||||||
inherit (darwin.stubs) setfile rez derez;
|
inherit (darwin.stubs) setfile rez derez;
|
||||||
|
inherit (darwin) cf-private;
|
||||||
};
|
};
|
||||||
|
|
||||||
wxSVG = callPackage ../development/libraries/wxSVG {
|
wxSVG = callPackage ../development/libraries/wxSVG {
|
||||||
|
@ -31,7 +31,9 @@ in
|
|||||||
libcxxabi = pkgs.libcxxabi;
|
libcxxabi = pkgs.libcxxabi;
|
||||||
};
|
};
|
||||||
|
|
||||||
cf-private = callPackage ../os-specific/darwin/cf-private { inherit (darwin) CF apple_sdk; };
|
cf-private = callPackage ../os-specific/darwin/cf-private {
|
||||||
|
inherit (darwin) CF apple_sdk osx_private_sdk;
|
||||||
|
};
|
||||||
|
|
||||||
DarwinTools = callPackage ../os-specific/darwin/DarwinTools { };
|
DarwinTools = callPackage ../os-specific/darwin/DarwinTools { };
|
||||||
|
|
||||||
@ -74,7 +76,7 @@ in
|
|||||||
CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication { };
|
CoreSymbolication = callPackage ../os-specific/darwin/CoreSymbolication { };
|
||||||
|
|
||||||
CF = callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix { inherit (darwin) objc4 ICU; };
|
CF = callPackage ../os-specific/darwin/swift-corelibs/corefoundation.nix { inherit (darwin) objc4 ICU; };
|
||||||
|
|
||||||
# As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in
|
# As the name says, this is broken, but I don't want to lose it since it's a direction we want to go in
|
||||||
# libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { inherit (darwin) apple_sdk_sierra xnu; };
|
# libdispatch-broken = callPackage ../os-specific/darwin/swift-corelibs/libdispatch.nix { inherit (darwin) apple_sdk_sierra xnu; };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user