[110216] users/mojca/wxports
mojca at macports.org
mojca at macports.org
Wed Aug 28 14:31:59 PDT 2013
Revision: 110216
https://trac.macports.org/changeset/110216
Author: mojca at macports.org
Date: 2013-08-28 14:31:59 -0700 (Wed, 28 Aug 2013)
Log Message:
-----------
mojca/wxWidgets-3.0: testing wxgtk-3.0 and wxPython as part of wxWidgets
Modified Paths:
--------------
users/mojca/wxports/_resources/port1.0/group/wxWidgets-1.0.tcl
users/mojca/wxports/graphics/wxWidgets-3.0/Portfile
Added Paths:
-----------
users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-sdl.diff
users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff
users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-upstream-psn.diff
users/mojca/wxports/graphics/wxWidgets-3.0/files/wxPython-3.0
users/mojca/wxports/graphics/wxWidgets-3.0/files/wxgtk-3.0
Modified: users/mojca/wxports/_resources/port1.0/group/wxWidgets-1.0.tcl
===================================================================
--- users/mojca/wxports/_resources/port1.0/group/wxWidgets-1.0.tcl 2013-08-28 21:26:41 UTC (rev 110215)
+++ users/mojca/wxports/_resources/port1.0/group/wxWidgets-1.0.tcl 2013-08-28 21:31:59 UTC (rev 110216)
@@ -89,6 +89,10 @@
wxWidgets.name "wxGTK"
wxWidgets.version "2.8"
wxWidgets.port "wxgtk-2.8"
+ } elseif {${args} == "wxGTK-3.0"} {
+ wxWidgets.name "wxGTK"
+ wxWidgets.version "2.9"
+ wxWidgets.port "wxgtk-3.0"
} elseif {${args} == "wxWidgets-3.0"} {
wxWidgets.name "wxWidgets"
wxWidgets.version "2.9"
@@ -102,7 +106,7 @@
} elseif {${args} == "wxPython-3.0"} {
wxWidgets.name "wxPython"
wxWidgets.version "2.9"
- wxWidgets.port "wxWidgets-from-wxPython-3.0"
+ wxWidgets.port "wxPython-3.0"
if {${os.major} < 9} {
pre-fetch {
ui_error "${wxWidgets.port} requires Mac OS X 10.5 or later."
Modified: users/mojca/wxports/graphics/wxWidgets-3.0/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/Portfile 2013-08-28 21:26:41 UTC (rev 110215)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/Portfile 2013-08-28 21:31:59 UTC (rev 110216)
@@ -2,16 +2,38 @@
# $Id$
PortSystem 1.0
+PortGroup active_variants 1.1
PortGroup select 1.0
PortGroup wxWidgets 1.0
# temporary conflict to prevent wrong linking
PortGroup conflicts_build 1.0
-wxWidgets.use wxWidgets-3.0
-name ${wxWidgets.port}
+name wxWidgets-3.0
+subport wxPython-3.0 {}
+subport wxgtk-3.0 {}
+version 2.9.5
+
# (temporary)
conflicts_build wxgtk wxWidgets wxWidgets-python wxWidgets30 wxWidgets-devel
-version 2.9.5
+
+set installname wxWidgets
+set wxtype osx_cocoa
+
+if {$subport == $name} {
+ wxWidgets.use wxWidgets-3.0
+} elseif {$subport == "wxPython-3.0"} {
+ wxWidgets.use wxPython-3.0
+ version 2.9.4
+} elseif {$subport == "wxgtk-3.0"} {
+ # with satisfactory Cocoa support there is no real need for GTK-based wxWidgets any more
+ # wxgtk-3.0 is here mainly for testing purposes
+ # it might be useful to report GTK-related bugs upstream
+ # and play with quartz-based GTK
+ # (and maybe backport changes to 2.8)
+ wxWidgets.use wxGTK-3.0
+ set installname wxGTK
+ set wxtype gtk3
+}
set branch [join [lrange [split ${version} .] 0 1] .]
categories graphics devel
@@ -46,15 +68,20 @@
depends_run port:wxWidgets_select
select.group wxWidgets
-select.file ${filespath}/${name}
+select.file ${filespath}/${subport}
-set worksrcdir ${distname}-${version}/build
+worksrcdir ${distname}-${version}/build
extract.only ${distname}-${version}${extract.suffix}
patch.dir ${worksrcpath}/..
+
+# without this patch wxrc-2.9 ends up linking to libraries in workdir
patchfiles patch-configure-change_install_names.diff
+# TODO: is this still needed?
+# configure.ccache no
+
configure.cmd ../configure
configure.args --prefix=${wxWidgets.prefix} \
--with-libiconv-prefix=${prefix} \
@@ -73,19 +100,85 @@
--with-macosx-sdk=no \
--with-macosx-version-min=no
-variant universal {
- set archs [join ${configure.universal_archs} ,]
- configure.args-append --enable-universal_binary=${archs}
+if {$subport == "wxPython-3.0"} {
+ # patch-src-osx-cocoa-window.mm.diff: http://trac.wxwidgets.org/changeset/72195 (only needed for 2.9.4)
+ patchfiles patch-src-osx-cocoa-window.mm.diff
+
+ description wxWidgets ${branch} for the wxPython distribution
+ long_description The port installs wxWidgets ${branch} for wxPython \
+ to guarantee compatibility even when upstream versions \
+ of wxWidgets and wxPython differ.
+
+ checksums rmd160 62301f8ce39a8aa96e65318f9d1e947c9dc09c50 \
+ sha256 6c530c35f40c3b1a5f9a4577c3ee8a9982e745081f23e3fbb9951d6d17514d12
+
+ livecheck.type none
+} elseif {$subport == "wxgtk-3.0"} {
+ # both patches could be added to wxWidgets-3.0, but they are not needed for Cocoa
+ # and might need changes for wxWidgets 2.9.4
+ #
+ # patch-sdl.diff: the patch allows using --wxth-sdl
+ # patch-upstream-psn.diff: http://trac.wxwidgets.org/changeset/74703
+ patchfiles patch-sdl.diff \
+ patch-upstream-psn.diff
+
+ depends_lib-append port:cairo \
+ path:lib/pkgconfig/sdl.pc:libsdl \
+ port:libsdl_mixer
+
+ configure.args-delete --with-cocoa \
+ --without-sdl
+ configure.args-append --with-sdl
+
+ #variant gtk2 conflicts gtk3 description {} {
+ # depends_lib-append port:gtk2
+ # configure.args-append --with-gtk=2
+ # set wxtype gtk2
+ #}
+ #variant gtk3 conflicts gtk2 description {} {
+ depends_lib-append port:gtk3
+ configure.args-append --with-gtk=3
+ #}
+ #variant quartz conflicts x11 {
+ # require_active_variants cairo quartz
+ # require_active_variants gtk3 quartz
+ #}
+ #variant x11 conflicts quartz {
+ depends_lib-append port:mesa
+ require_active_variants cairo x11
+ require_active_variants gtk3 x11
+ #}
+ #if{![variant_isset gtk2] && ![variant_isset gtk3]} {
+ # default_variants-append +gtk3
+ #}
+ #if{![variant_isset quartz] && ![variant_isset x11]} {
+ # default_variants-append +quartz
+ #}
+ #if{[variant_isset gtk2]} {
+ # if{[variant_isset quartz]} {
+ # require_active_variants gtk2 quartz
+ # } else {
+ # require_active_variants gtk2 x11
+ # }
+ #} else {
+ # if{[variant_isset quartz]} {
+ # require_active_variants gtk3 quartz
+ # } else {
+ # require_active_variants gtk3 x11
+ # }
+ #}
}
-# TODO: what is this?
-configure.ccache no
-
post-destroot {
- set confscript ${wxWidgets.prefix}/lib/wx/config/osx_cocoa-unicode-${branch}
+ set confscript ${wxWidgets.prefix}/lib/wx/config/${wxtype}-unicode-${branch}
ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config
}
+variant universal {
+ set archs [join ${configure.universal_archs} ,]
+ configure.args-append --enable-universal_binary=${archs}
+}
+
variant monolithic description {build only one library} {
configure.args-append --enable-monolithic
}
Added: users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-sdl.diff
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-sdl.diff (rev 0)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-sdl.diff 2013-08-28 21:31:59 UTC (rev 110216)
@@ -0,0 +1,46 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -6719,8 +6719,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_1 = \
+ @COND_TOOLKIT_MSW at __WEBVIEW_SRC_PLATFORM_OBJECTS = monodll_webview_ie.o
+ @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2 at __AUI_GTK_SRC_OBJECTS \
+ @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = monodll_tabartgtk.o
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS \
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@ = monodll_sound_sdl.o
++ at COND_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS \
++ at COND_USE_PLUGINS_0@ = monodll_sound_sdl.o
+ @COND_PLATFORM_WIN32_1 at __monodll___win32rc = monodll_version_rc.o
+ @COND_USE_STC_1 at __wxscintilla_library_link_DEP = $(__wxscintilla___depname)
+ @COND_USE_STC_1 at __wxscintilla_library_link_LIBR = -L$(LIBDIRNAME)
+@@ -8970,8 +8970,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_3 = \
+ @COND_TOOLKIT_MSW at __WEBVIEW_SRC_PLATFORM_OBJECTS_1 = monolib_webview_ie.o
+ @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2 at __AUI_GTK_SRC_OBJECTS_1 \
+ @COND_TOOLKIT_GTK_TOOLKIT_VERSION_2@ = monolib_tabartgtk.o
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_1 \
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@ = monolib_sound_sdl.o
++ at COND_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_1 \
++ at COND_USE_PLUGINS_0@ = monolib_sound_sdl.o
+ COND_MONOLITHIC_0_SHARED_1___basedll___depname = \
+ $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3)
+ @COND_MONOLITHIC_0_SHARED_1 at __basedll___depname = $(COND_MONOLITHIC_0_SHARED_1___basedll___depname)
+@@ -13111,8 +13111,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_5 = \
+ @COND_TOOLKIT_MSW at __ADVANCED_UNIV_SRC_OBJECTS_2 = advdll_animateg.o
+ @COND_TOOLKIT_WINCE at __ADVANCED_UNIV_SRC_OBJECTS_2 = advdll_animateg.o
+ @COND_TOOLKIT_X11 at __ADVANCED_UNIV_SRC_OBJECTS_2 = advdll_animateg.o
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_2 \
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@ = advdll_sound_sdl.o
++ at COND_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_2 \
++ at COND_USE_PLUGINS_0@ = advdll_sound_sdl.o
+ COND_MONOLITHIC_0_SHARED_0_USE_GUI_1___advlib___depname = \
+ $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv-$(WX_RELEASE)$(HOST_SUFFIX)$(LIBEXT)
+ @COND_MONOLITHIC_0_SHARED_0_USE_GUI_1 at __advlib___depname = $(COND_MONOLITHIC_0_SHARED_0_USE_GUI_1___advlib___depname)
+@@ -13424,8 +13424,8 @@ COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_7 = \
+ @COND_TOOLKIT_MSW at __ADVANCED_UNIV_SRC_OBJECTS_3 = advlib_animateg.o
+ @COND_TOOLKIT_WINCE at __ADVANCED_UNIV_SRC_OBJECTS_3 = advlib_animateg.o
+ @COND_TOOLKIT_X11 at __ADVANCED_UNIV_SRC_OBJECTS_3 = advlib_animateg.o
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_3 \
+- at COND_PLATFORM_UNIX_1_USE_PLUGINS_0@ = advlib_sound_sdl.o
++ at USE_PLUGINS_0@__PLUGIN_ADV_SRC_OBJECTS_3 \
++ at USE_PLUGINS_0@ = advlib_sound_sdl.o
+ @COND_SHARED_1 at ____wxadv_namedll_DEP = $(__advdll___depname)
+ @COND_SHARED_0 at ____wxadv_namelib_DEP = $(__advlib___depname)
+ COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1___mediadll___depname = \
Copied: users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff (from rev 97060, trunk/dports/graphics/wxWidgets-devel/files/patch-src-osx-cocoa-window.mm.diff)
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff (rev 0)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff 2013-08-28 21:31:59 UTC (rev 110216)
@@ -0,0 +1,64 @@
+Upstream: http://trac.wxwidgets.org/changeset/72195
+--- src/osx/cocoa/window.mm (revision 72169)
++++ src/osx/cocoa/window.mm (revision 72195)
+@@ -456,4 +456,9 @@
+ - (CGFloat)deviceDeltaX;
+ - (CGFloat)deviceDeltaY;
++
++// 10.7+
++- (BOOL)hasPreciseScrollingDeltas;
++- (CGFloat)scrollingDeltaX;
++- (CGFloat)scrollingDeltaY;
+ @end
+
+@@ -610,21 +615,37 @@
+ wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ;
+
+- // see http://developer.apple.com/qa/qa2005/qa1453.html
+- // for more details on why we have to look for the exact type
+-
+- const EventRef cEvent = (EventRef) [nsEvent eventRef];
+- bool isMouseScrollEvent = false;
+- if ( cEvent )
+- isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
+-
+- if ( isMouseScrollEvent )
++ if ( UMAGetSystemVersion() >= 0x1070 )
+ {
+- deltaX = [nsEvent deviceDeltaX];
+- deltaY = [nsEvent deviceDeltaY];
++ if ( [nsEvent hasPreciseScrollingDeltas] )
++ {
++ deltaX = [nsEvent scrollingDeltaX];
++ deltaY = [nsEvent scrollingDeltaY];
++ }
++ else
++ {
++ deltaX = [nsEvent scrollingDeltaX] * 10;
++ deltaY = [nsEvent scrollingDeltaY] * 10;
++ }
+ }
+ else
+ {
+- deltaX = ([nsEvent deltaX] * 10);
+- deltaY = ([nsEvent deltaY] * 10);
++ const EventRef cEvent = (EventRef) [nsEvent eventRef];
++ // see http://developer.apple.com/qa/qa2005/qa1453.html
++ // for more details on why we have to look for the exact type
++
++ bool isMouseScrollEvent = false;
++ if ( cEvent )
++ isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
++
++ if ( isMouseScrollEvent )
++ {
++ deltaX = [nsEvent deviceDeltaX];
++ deltaY = [nsEvent deviceDeltaY];
++ }
++ else
++ {
++ deltaX = ([nsEvent deltaX] * 10);
++ deltaY = ([nsEvent deltaY] * 10);
++ }
+ }
+
Property changes on: users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/mld-qt-481/dports/graphics/wxWidgets-devel/files/patch-src-osx-cocoa-window.mm.diff:92720,92813,92891,92963,93522,93556,93699,93743,93771-93773,93806,93817-93818,93856
Added: users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-upstream-psn.diff
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-upstream-psn.diff (rev 0)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/files/patch-upstream-psn.diff 2013-08-28 21:31:59 UTC (rev 110216)
@@ -0,0 +1,55 @@
+http://trac.wxwidgets.org/changeset/74703
+--- src/common/appcmn.cpp.orig
++++ src/common/appcmn.cpp
+@@ -84,6 +84,27 @@ wxAppBase::wxAppBase()
+
+ bool wxAppBase::Initialize(int& argcOrig, wxChar **argvOrig)
+ {
++#ifdef __WXOSX__
++ // Mac OS X passes a process serial number command line argument when
++ // the application is launched from the Finder. This argument must be
++ // removed from the command line arguments before being handled by the
++ // application (otherwise applications would need to handle it)
++ //
++ // Notice that this has to be done for all ports that can be used under OS
++ // X (e.g. wxGTK) and not just wxOSX itself, hence this code is here and
++ // not in a port-specific file.
++ if ( argcOrig > 1 )
++ {
++ static const wxChar *ARG_PSN = wxT("-psn_");
++ if ( wxStrncmp(argvOrig[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 )
++ {
++ // remove this argument
++ --argcOrig;
++ memmove(argvOrig + 1, argvOrig + 2, argcOrig * sizeof(wxChar*));
++ }
++ }
++#endif // __WXOSX__
++
+ if ( !wxAppConsole::Initialize(argcOrig, argvOrig) )
+ return false;
+
+--- src/osx/carbon/app.cpp.orig
++++ src/osx/carbon/app.cpp
+@@ -795,21 +795,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
+ InstallDebugAssertOutputHandler( NewDebugAssertOutputHandlerUPP( wxMacAssertOutputHandler ) );
+ #endif
+
+- // Mac OS X passes a process serial number command line argument when
+- // the application is launched from the Finder. This argument must be
+- // removed from the command line arguments before being handled by the
+- // application (otherwise applications would need to handle it)
+- if ( argc > 1 )
+- {
+- static const wxChar *ARG_PSN = wxT("-psn_");
+- if ( wxStrncmp(argv[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 )
+- {
+- // remove this argument
+- --argc;
+- memmove(argv + 1, argv + 2, argc * sizeof(wxChar*));
+- }
+- }
+-
+ /*
+ Cocoa supports -Key value options which set the user defaults key "Key"
+ to the value "value" Some of them are very handy for debugging like
Copied: users/mojca/wxports/graphics/wxWidgets-3.0/files/wxPython-3.0 (from rev 110213, users/mojca/wxports/graphics/wxWidgets-from-wxPython-3.0/files/wxWidgets-from-wxPython-3.0)
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/files/wxPython-3.0 (rev 0)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/files/wxPython-3.0 2013-08-28 21:31:59 UTC (rev 110216)
@@ -0,0 +1,8 @@
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/bin/wx-config
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/bin/wxrc-2.9
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/share/aclocal/wxwin.m4
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/share/bakefile/presets/wx.bkl
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/share/bakefile/presets/wx_presets.py
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/share/bakefile/presets/wx_unix.bkl
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/share/bakefile/presets/wx_win32.bkl
+${frameworks_dir}/wxWidgets.framework/Versions/wxPython/2.9/share/bakefile/presets/wx_xrc.bkl
Added: users/mojca/wxports/graphics/wxWidgets-3.0/files/wxgtk-3.0
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-3.0/files/wxgtk-3.0 (rev 0)
+++ users/mojca/wxports/graphics/wxWidgets-3.0/files/wxgtk-3.0 2013-08-28 21:31:59 UTC (rev 110216)
@@ -0,0 +1,8 @@
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/bin/wx-config
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/bin/wxrc-2.9
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/share/aclocal/wxwin.m4
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/share/bakefile/presets/wx.bkl
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/share/bakefile/presets/wx_presets.py
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/share/bakefile/presets/wx_unix.bkl
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/share/bakefile/presets/wx_win32.bkl
+${frameworks_dir}/wxWidgets.framework/Versions/wxGTK/2.9/share/bakefile/presets/wx_xrc.bkl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130828/018bc399/attachment-0001.html>
More information about the macports-changes
mailing list