Last active
August 29, 2015 14:23
-
-
Save LnL7/e50648aa30f396677bb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_xrc-3.0.a ut/lib | |
mkdir -p ut/lib | |
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_aui-3.0.a ut/lib | |
mkdir -p ut/lib | |
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_ribbon-3.0.a ut/lib | |
mkdir -p ut/lib | |
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_propgrid-3.0.a ut/lib | |
mkdir -p ut/lib | |
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_richtext-3.0.a ut/lib | |
mkdir -p ut/lib | |
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_stc-3.0.a ut/lib | |
mkdir -p ut/lib | |
cp -fp /private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/lib/libwx_osx_cocoau_gl-3.0.a ut/lib | |
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make all ; fi) | |
make[1]: Entering directory '/private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/utils/wxrc' | |
make[1]: Nothing to be done for 'all'. | |
make[1]: Leaving directory '/private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/utils/wxrc' | |
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make install ; fi) | |
make[1]: Entering directory '/private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/utils/wxrc' | |
mkdir -p ut/bin | |
cp -fp wxrc ut/bin | |
rm -f ut/bin/wxrc ut/bin/wxrc-3.0 | |
cp -fp wxrc ut/bin | |
mv -f ut/bin/wxrc ut/bin/wxrc-3.0 | |
(cd ut/bin && ln -s wxrc-3.0 wxrc) | |
make[1]: Leaving directory '/private/var/folders/z_/3kjylr891qs4zsm32ydx4ydc0000gn/T/nix-build-wxmac-3.0.2.drv-0/wxWidgets-3.0.2/utils/wxrc' | |
mkdir -p ut/bin | |
mkdir -p ut/lib/wx/config | |
cp -fp lib/wx/config/osx_cocoa-unicode-static-3.0 ut/lib/wx/config | |
(cd ut/bin && rm -f wx-config && ln -s ut/lib/wx/config/osx_cocoa-unicode-static-3.0 wx-config || cp -p ut/lib/wx/config/osx_cocoa-unicode-static-3.0 wx-config) | |
mkdir -p ut/share/locale | |
for l in ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk zh zh_CN zh_TW ; do \ | |
mkdir -p ut/share/locale/$l ; \ | |
mkdir -p ut/share/locale/$l/LC_MESSAGES ; \ | |
if test -f ./locale/$l.mo ; then \ | |
cp -fp ./locale/$l.mo ut/share/locale/$l/LC_MESSAGES/wxstd.mo ; \ | |
fi ; \ | |
done | |
mkdir -p ut/share/locale | |
for l in it ; do \ | |
mkdir -p ut/share/locale/$l ; \ | |
mkdir -p ut/share/locale/$l/LC_MESSAGES ; \ | |
if test -f ./locale/msw/$l.mo ; then \ | |
cp -fp ./locale/msw/$l.mo ut/share/locale/$l/LC_MESSAGES/wxmsw.mo ; \ | |
fi ; \ | |
done | |
mkdir -p ut/share/aclocal | |
(cd . ; cp -fp wxwin.m4 ut/share/aclocal) | |
mkdir -p ut/share/bakefile/presets | |
(cd ./build/bakefiles/wxpresets/presets ; cp -fp wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py ut/share/bakefile/presets) | |
cp: target 'ut/share/bakefile/presets' is not a directory | |
Makefile:15260: recipe for target 'install' failed | |
make: *** [install] Error 1 | |
builder for ‘/nix/store/ylw0xplcggc65rl3gsg40zwgsfplnhhf-wxmac-3.0.2.drv’ failed with exit code 2 | |
error: build of ‘/nix/store/ylw0xplcggc65rl3gsg40zwgsfplnhhf-wxmac-3.0.2.drv’ failed on ‘mango.daiderd.me’ | |
error: build of ‘/nix/store/ylw0xplcggc65rl3gsg40zwgsfplnhhf-wxmac-3.0.2.drv’ failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, setfile, rez, derez | |
}: | |
with stdenv.lib; | |
stdenv.mkDerivation rec { | |
version = "3.0.2"; | |
name = "wxmac-${version}"; | |
src = fetchurl { | |
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.bz2"; | |
sha256 = "346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d"; | |
}; | |
patches = [ ./wx.patch ]; | |
buildInputs = [ setfile rez derez ]; | |
configureFlags = [ | |
"--prefix=$out" | |
"--disable-shared" | |
"--enable-unicode" | |
"--with-osx_cocoa" | |
"--with-macosx-version-min=10.10" | |
"--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk" | |
"--disable-mediactrl" | |
]; | |
checkPhase = "wx-config --libs"; | |
enableParallelBuilding = true; | |
meta = { | |
platforms = platforms.darwin; | |
maintainers = [ maintainers.lnl7 ]; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wxmac < Formula | |
desc "wxWidgets, a cross-platform C++ GUI toolkit (for OS X)" | |
homepage "https://www.wxwidgets.org" | |
url "https://downloads.sourceforge.net/project/wxwindows/3.0.2/wxWidgets-3.0.2.tar.bz2" | |
sha256 "346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d" | |
bottle do | |
revision 10 | |
sha256 "477e8d5fccd025ec8c30a72b3d201eedb1d1f73f784bdeb1bb0e6d8c7df68e77" => :yosemite | |
sha256 "21bff32ebe73902c152b03c8ba16a54df97f82c068827c85360db5e9413c929a" => :mavericks | |
sha256 "6e5b9d09d115f105648039423baa48227f0df4a65abd8fca852092452a40a067" => :mountain_lion | |
end | |
depends_on "jpeg" | |
depends_on "libpng" | |
depends_on "libtiff" | |
option "with-stl", "use standard C++ classes for everything" | |
option "with-static", "build static libraries" | |
# 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. | |
patch :DATA | |
def install | |
# need to set with-macosx-version-min to avoid configure defaulting to 10.5 | |
# need to enable universal binary build in order to build all x86_64 | |
# Jack - I don't believe this is the whole story, surely this can be fixed | |
# without building universal for users who don't need it. | |
# headers need to specify x86_64 and i386 or will try to build for ppc arch | |
# and fail on newer OSes | |
# DomT4 - MacPorts seems to have stopped building universal by default? Can we do the same? | |
# https://trac.macports.org/browser/trunk/dports/graphics/wxWidgets-3.0/Portfile#L210 | |
ENV.universal_binary | |
args = [ | |
"--disable-debug", | |
"--prefix=#{prefix}", | |
"--enable-unicode", | |
"--enable-std_string", | |
"--enable-display", | |
"--with-opengl", | |
"--with-osx_cocoa", | |
"--with-libjpeg", | |
"--with-libtiff", | |
# Otherwise, even in superenv, the internal libtiff can pick | |
# up on a nonuniversal xz and fail | |
# https://github.com/Homebrew/homebrew/issues/22732 | |
"--without-liblzma", | |
"--with-libpng", | |
"--with-zlib", | |
"--enable-dnd", | |
"--enable-clipboard", | |
"--enable-webkit", | |
"--enable-svg", | |
# On 64-bit, enabling mediactrl leads to wxconfig trying to pull | |
# in a non-existent 64 bit QuickTime framework. This is submitted | |
# upstream and will eventually be fixed, but for now... | |
MacOS.prefer_64_bit? ? "--disable-mediactrl" : "--enable-mediactrl", | |
"--enable-graphics_ctx", | |
"--enable-controls", | |
"--enable-dataviewctrl", | |
"--with-expat", | |
"--with-macosx-version-min=#{MacOS.version}", | |
"--enable-universal_binary=#{Hardware::CPU.universal_archs.join(",")}", | |
"--disable-precomp-headers", | |
# This is the default option, but be explicit | |
"--disable-monolithic" | |
] | |
args << "--enable-stl" if build.with? "stl" | |
if build.with? "static" | |
args << "--disable-shared" | |
else | |
args << "--enable-shared" | |
end | |
system "./configure", *args | |
system "make", "install" | |
end | |
test do | |
system "wx-config", "--libs" | |
end | |
end | |
__END__ | |
diff --git a/include/wx/defs.h b/include/wx/defs.h | |
index 397ddd7..d128083 100644 | |
--- a/include/wx/defs.h | |
+++ b/include/wx/defs.h | |
@@ -3169,12 +3169,20 @@ DECLARE_WXCOCOA_OBJC_CLASS(UIImage); | |
DECLARE_WXCOCOA_OBJC_CLASS(UIEvent); | |
DECLARE_WXCOCOA_OBJC_CLASS(NSSet); | |
DECLARE_WXCOCOA_OBJC_CLASS(EAGLContext); | |
+DECLARE_WXCOCOA_OBJC_CLASS(UIWebView); | |
typedef WX_UIWindow WXWindow; | |
typedef WX_UIView WXWidget; | |
typedef WX_EAGLContext WXGLContext; | |
typedef WX_NSString* WXGLPixelFormat; | |
+typedef WX_UIWebView OSXWebViewPtr; | |
+ | |
+#endif | |
+ | |
+#if wxOSX_USE_COCOA_OR_CARBON | |
+DECLARE_WXCOCOA_OBJC_CLASS(WebView); | |
+typedef WX_WebView OSXWebViewPtr; | |
#endif | |
#endif /* __WXMAC__ */ | |
diff --git a/include/wx/html/webkit.h b/include/wx/html/webkit.h | |
index 8700367..f805099 100644 | |
--- a/include/wx/html/webkit.h | |
+++ b/include/wx/html/webkit.h | |
@@ -18,7 +18,6 @@ | |
#endif | |
#include "wx/control.h" | |
-DECLARE_WXCOCOA_OBJC_CLASS(WebView); | |
// ---------------------------------------------------------------------------- | |
// Web Kit Control | |
@@ -107,7 +106,7 @@ private: | |
wxString m_currentURL; | |
wxString m_pageTitle; | |
- WX_WebView m_webView; | |
+ OSXWebViewPtr m_webView; | |
// we may use this later to setup our own mouse events, | |
// so leave it in for now. | |
diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h | |
index 803f8b0..438e532 100644 | |
--- a/include/wx/osx/webview_webkit.h | |
+++ b/include/wx/osx/webview_webkit.h | |
@@ -158,7 +158,7 @@ private: | |
wxWindowID m_windowID; | |
wxString m_pageTitle; | |
- wxObjCID m_webView; | |
+ OSXWebViewPtr m_webView; | |
// we may use this later to setup our own mouse events, | |
// so leave it in for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment