Commit 7e30340d authored by Jesse van den Kieboom's avatar Jesse van den Kieboom

[osx] Remove unused patches

parent da84cfea
From 728824c69252e2531419d7c75b8351243d488610 Mon Sep 17 00:00:00 2001
From: Simon Feltman <sfeltman@src.gnome.org>
Date: Tue, 19 Aug 2014 14:57:31 -0700
Subject: [PATCH] configure.ac: Merge multiple platform case statements
Merge platform_win32 and os_win32 variables and define "link_python_libs"
for win32 as well as darwin.
https://bugzilla.gnome.org/show_bug.cgi?id=735068
---
configure.ac | 30 +++++++++++-------------------
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index ece639c..60de010 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,38 +51,30 @@ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
-AC_MSG_CHECKING([for some Win32 platform])
+AC_MSG_CHECKING([for Darwin and Win32 platforms])
case "$host" in
*-*-mingw*|*-*-cygwin*)
- platform_win32=yes
+ os_win32=yes
+ link_python_libs=yes
OS_EXT=dll
;;
*-*-darwin*)
+ os_win32=no
+ link_python_libs=yes
OS_EXT=dylib
;;
*)
- platform_win32=no
+ os_win32=no
+ link_python_libs=yes
OS_EXT=so
;;
esac
-AC_MSG_RESULT([$platform_win32])
-AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
AC_SUBST(OS_EXT)
AC_DEFINE_UNQUOTED(OS_EXT, "$OS_EXT", [Define shared library extension])
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
- *-*-mingw*)
- os_win32=yes
- ;;
- *)
- os_win32=no
- ;;
-esac
-AC_MSG_RESULT([$os_win32])
-AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
-
LT_PREREQ([2.2.6])
LT_INIT([dlopen win32-dll disable-static])
@@ -126,8 +118,8 @@ PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfi
AC_SUBST(PYTHON_SO)
AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
-if test "x$os_win32" = "xyes"; then
- AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
+if test "x$link_python_libs" = "xyes"; then
+ AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows and Darwin require Python modules to be explicitly linked to libpython.]))
fi
AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
--
1.8.5.2 (Apple Git-48)
--- a/dbus/dbus-sysdeps-unix.c 2010-12-16 14:53:48.000000000 +0100
+++ b/dbus/dbus-sysdeps-unix.c 2012-01-17 13:24:13.000000000 +0100
@@ -55,6 +55,7 @@
#include <netinet/in.h>
#include <netdb.h>
#include <grp.h>
+#include <limits.h>
#ifdef HAVE_ERRNO_H
#include <errno.h>
@@ -3828,7 +3829,25 @@
const char *
_dbus_replace_install_prefix (const char *configure_time_path)
{
- return configure_time_path;
+ const char *runtime_prefix;
+ static char retval[PATH_MAX];
+
+ if (!configure_time_path)
+ return NULL;
+
+ runtime_prefix = getenv ("DBUS_REPLACE_INSTALL_PREFIX");
+
+ if (!runtime_prefix ||
+ strncmp (configure_time_path, DBUS_PREFIX "/",
+ strlen (DBUS_PREFIX) + 1)) {
+ strcat (retval, configure_time_path);
+ return retval;
+ }
+
+ strncpy (retval, runtime_prefix, PATH_MAX - 1);
+ strncat (retval, configure_time_path + strlen (DBUS_PREFIX) + 1, PATH_MAX - 1 - strlen (runtime_prefix));
+
+ return retval;
}
/* tests in dbus-sysdeps-util.c */
diff -ud pkgs/gtk-mac-integration-1.0.1/src/GtkApplicationDelegate.c gtk-mac-integration-1.0.1/src/GtkApplicationDelegate.c
--- a/src/GtkApplicationDelegate.c 2011-05-01 07:20:54.000000000 +0200
+++ b/GtkApplicationDelegate.c 2012-01-10 21:27:16.000000000 +0100
@@ -25,19 +25,43 @@
#include "gtkosxapplication.h"
@implementation GtkApplicationDelegate
--(BOOL) application:(NSApplication*) theApplication openFile:(NSString*) file
+-(void) application:(NSApplication*) theApplication openFiles:(NSArray*) files
{
- const gchar *utf8_path = [file UTF8String];
- GtkOSXApplication *app = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
- guint sig = g_signal_lookup("NSApplicationOpenFile",
- GTK_TYPE_OSX_APPLICATION);
- gboolean result = FALSE;
- if (sig)
- g_signal_emit(app, sig, 0, utf8_path, &result);
- g_object_unref(app);
- return result;
-}
+ guint i;
+ gchar **paths;
+
+ paths = g_new0 (gchar *, [files count] + 1);
+ for (i = 0; i < [files count]; ++i)
+ {
+ const gchar *path = [[files objectAtIndex:i] UTF8String];
+ paths[i] = g_strdup (path);
+ }
+
+ GtkOSXApplication *app = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL);
+
+ guint sig = g_signal_lookup ("NSApplicationOpenFiles",
+ GTK_TYPE_OSX_APPLICATION);
+ gboolean result = FALSE;
+
+ if (sig)
+ {
+ g_signal_emit (app, sig, 0, paths, &result);
+ }
+
+ g_strfreev (paths);
+
+ if (result)
+ {
+ [theApplication replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
+ }
+ else
+ {
+ [theApplication replyToOpenOrPrint:NSApplicationDelegateReplyFailure];
+ }
+
+ g_object_unref (app);
+}
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender
{
Only in gtk-mac-integration-1.0.1/src/: Makefile
diff -ud pkgs/gtk-mac-integration-1.0.1/src/cocoa_menu_item.c gtk-mac-integration-1.0.1/src/cocoa_menu_item.c
--- a/src/cocoa_menu_item.c 2011-05-01 07:20:54.000000000 +0200
+++ b/src/cocoa_menu_item.c 2012-01-06 17:07:50.000000000 +0100
@@ -274,7 +274,7 @@
modifiers |= NSControlKeyMask;
}
- /* gdk/quartz maps Alt/Option to Mod5 */
- if (key->accel_mods & (GDK_MOD5_MASK)) {
+ /* gdk/quartz maps Alt/Option to Mod1 */
+ if (key->accel_mods & GDK_MOD1_MASK) {
modifiers |= NSAlternateKeyMask;
}
--- a/src/gtkosxapplication_quartz.c 2011-10-03 21:41:14.000000000 +0200
+++ b/src/gtkosxapplication_quartz.c 2012-01-12 07:53:32.000000000 +0100
@@ -38,6 +38,8 @@
#include "getlabel.h"
#include "gtk-mac-image-utils.h"
+#include <gdk/gdkquartz.h>
+
/* This is a private function in libgdk; we need to have is so that we
can force new windows onto the Window menu */
extern NSWindow* gdk_quartz_window_get_nswindow(GdkWindow*);
@@ -338,23 +340,23 @@
/*
- * g_cclosure_marshal_BOOLEAN__STRING:
+ * g_cclosure_marshal_BOOLEAN__STRV:
*
- * A private marshaller for handlers which take a string parameter and
+ * A private marshaller for handlers which take a stringv parameter and
* return a boolean.
*/
static void
-g_cclosure_marshal_BOOLEAN__STRING (GClosure *closure,
+g_cclosure_marshal_BOOLEAN__STRV (GClosure *closure,
GValue *return_value G_GNUC_UNUSED,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint G_GNUC_UNUSED,
gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer data1,
+ typedef gboolean (*GMarshalFunc_BOOLEAN__STRV) (gpointer data1,
const char *arg1,
gpointer data2);
- register GMarshalFunc_BOOLEAN__STRING callback;
+ register GMarshalFunc_BOOLEAN__STRV callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gboolean v_return;
@@ -371,10 +373,10 @@
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
- callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback);
+ callback = (GMarshalFunc_BOOLEAN__STRV) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
- g_value_get_string (param_values + 1),
+ g_value_get_boxed (param_values + 1),
data2);
g_value_set_boolean (return_value, v_return);
}
@@ -448,7 +450,7 @@
WillResignActive,
BlockTermination,
WillTerminate,
- OpenFile,
+ OpenFiles,
LastSignal
};
@@ -561,9 +563,9 @@
G_TYPE_NONE, 0);
/**
- * GtkOSXApplication::NSApplicationOpenFile:
+ * GtkOSXApplication::NSApplicationOpenFiles:
* @app: The application object
- * @path: A UTF8-encoded file path to open.
+ * @paths: UTF8-encoded file paths to open.
* @user_data: Data attached at connection
*
* Emitted when a OpenFile, OpenFiles, or OpenEmptyFile event is
@@ -573,13 +575,13 @@
*
* Returns: Boolean indicating success at opening the file.
*/
-gtk_osxapplication_signals[OpenFile] =
- g_signal_new("NSApplicationOpenFile",
+gtk_osxapplication_signals[OpenFiles] =
+ g_signal_new("NSApplicationOpenFiles",
GTK_TYPE_OSX_APPLICATION,
G_SIGNAL_NO_RECURSE | G_SIGNAL_ACTION,
0, NULL, NULL,
- g_cclosure_marshal_BOOLEAN__STRING,
- G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
+ g_cclosure_marshal_BOOLEAN__STRV,
+ G_TYPE_BOOLEAN, 1, G_TYPE_STRV);
}
@@ -661,6 +663,7 @@
[cocoa_menubar setAutoenablesItems:NO];
}
+
if (cocoa_menubar != [NSApp mainMenu])
[NSApp setMainMenu: cocoa_menubar];
@@ -684,10 +687,9 @@
cocoa_menu_item_add_submenu (menu_shell, cocoa_menubar, TRUE, FALSE);
/* Stupid hack to force the menubar to look right when a window is
opened after starting the main loop. */
- if (old_menubar != NULL) {
+
[NSApp setMainMenu: old_menubar];
[NSApp setMainMenu: cocoa_menubar];
- }
}
/**
From 728824c69252e2531419d7c75b8351243d488610 Mon Sep 17 00:00:00 2001
From: Simon Feltman <sfeltman@src.gnome.org>
Date: Tue, 19 Aug 2014 14:57:31 -0700
Subject: [PATCH] configure.ac: Merge multiple platform case statements
Merge platform_win32 and os_win32 variables and define "link_python_libs"
for win32 as well as darwin.
https://bugzilla.gnome.org/show_bug.cgi?id=735068
---
configure.ac | 30 +++++++++++-------------------
1 file changed, 11 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index ece639c..60de010 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,38 +51,30 @@ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
-AC_MSG_CHECKING([for some Win32 platform])
+AC_MSG_CHECKING([for Darwin and Win32 platforms])
case "$host" in
*-*-mingw*|*-*-cygwin*)
- platform_win32=yes
+ os_win32=yes
+ link_python_libs=yes
OS_EXT=dll
;;
*-*-darwin*)
+ os_win32=no
+ link_python_libs=yes
OS_EXT=dylib
;;
*)
- platform_win32=no
+ os_win32=no
+ link_python_libs=yes
OS_EXT=so
;;
esac
-AC_MSG_RESULT([$platform_win32])
-AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
+AC_MSG_RESULT([$os_win32])
+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
AC_SUBST(OS_EXT)
AC_DEFINE_UNQUOTED(OS_EXT, "$OS_EXT", [Define shared library extension])
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
- *-*-mingw*)
- os_win32=yes
- ;;
- *)
- os_win32=no
- ;;
-esac
-AC_MSG_RESULT([$os_win32])
-AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
-
LT_PREREQ([2.2.6])
LT_INIT([dlopen win32-dll disable-static])
@@ -126,8 +118,8 @@ PYTHON_SO=`$PYTHON -c "import distutils.sysconfig, sys; get = distutils.sysconfi
AC_SUBST(PYTHON_SO)
AM_CHECK_PYTHON_HEADERS(, AC_MSG_ERROR([Python headers not found]))
-if test "x$os_win32" = "xyes"; then
- AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows requires Python modules to be explicitly linked to libpython.]))
+if test "x$link_python_libs" = "xyes"; then
+ AM_CHECK_PYTHON_LIBS(, AC_MSG_ERROR([Python libs not found. Windows and Darwin require Python modules to be explicitly linked to libpython.]))
fi
AC_MSG_CHECKING([for PySignal_SetWakeupFd in Python.h])
--
1.8.5.2 (Apple Git-48)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment