[109929] users/mojca/wxports/graphics/wxWidgets-2.8
mojca at macports.org
mojca at macports.org
Thu Aug 22 02:07:56 PDT 2013
Revision: 109929
https://trac.macports.org/changeset/109929
Author: mojca at macports.org
Date: 2013-08-22 02:07:56 -0700 (Thu, 22 Aug 2013)
Log Message:
-----------
mojca/wxWidgets-2.8: allow gtk apps to be bundled (remove -psn_* from command-line arguments)
Modified Paths:
--------------
users/mojca/wxports/graphics/wxWidgets-2.8/Portfile
Added Paths:
-----------
users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-src-gtk-app.cpp.diff
Modified: users/mojca/wxports/graphics/wxWidgets-2.8/Portfile
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-2.8/Portfile 2013-08-22 07:07:21 UTC (rev 109928)
+++ users/mojca/wxports/graphics/wxWidgets-2.8/Portfile 2013-08-22 09:07:56 UTC (rev 109929)
@@ -81,7 +81,8 @@
patchfiles patch-chkconf.diff \
patch-configure.diff \
- patch-sdl.diff
+ patch-sdl.diff \
+ patch-src-gtk-app.cpp.diff
patch.dir ${workpath}/${distname}-${version}
post-patch {
Added: users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-src-gtk-app.cpp.diff
===================================================================
--- users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-src-gtk-app.cpp.diff (rev 0)
+++ users/mojca/wxports/graphics/wxWidgets-2.8/files/patch-src-gtk-app.cpp.diff 2013-08-22 09:07:56 UTC (rev 109929)
@@ -0,0 +1,25 @@
+allows also the gtk-based wxWidgets apps to be bundled
+--- src/gtk/app.cpp.orig
++++ src/gtk/app.cpp
+@@ -415,6 +415,21 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
+ {
+ bool init_result;
+
++ // 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 = _T("-psn_");
++ if ( wxStrncmp(argv[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 )
++ {
++ // remove this argument
++ --argc;
++ memmove(argv + 1, argv + 2, argc * sizeof(char *));
++ }
++ }
++
+ #if wxUSE_THREADS
+ if (!g_thread_supported())
+ g_thread_init(NULL);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130822/f2343777/attachment.html>
More information about the macports-changes
mailing list