[135417] users/devans/GNOME-3/stable/dports/devel/glade

devans at macports.org devans at macports.org
Thu Apr 23 09:43:20 PDT 2015


Revision: 135417
          https://trac.macports.org/changeset/135417
Author:   devans at macports.org
Date:     2015-04-23 09:43:20 -0700 (Thu, 23 Apr 2015)
Log Message:
-----------
GNOME-3/stable: glade, apply recent upstream patches, reconfigure using upstream autogen.sh for intltool 0.51 compatibility, increment revision to rebuild.

Modified Paths:
--------------
    users/devans/GNOME-3/stable/dports/devel/glade/Portfile

Added Paths:
-----------
    users/devans/GNOME-3/stable/dports/devel/glade/files/
    users/devans/GNOME-3/stable/dports/devel/glade/files/patch-upstream-fixes-thru-20141205.diff

Modified: users/devans/GNOME-3/stable/dports/devel/glade/Portfile
===================================================================
--- users/devans/GNOME-3/stable/dports/devel/glade/Portfile	2015-04-23 15:59:40 UTC (rev 135416)
+++ users/devans/GNOME-3/stable/dports/devel/glade/Portfile	2015-04-23 16:43:20 UTC (rev 135417)
@@ -6,7 +6,7 @@
 
 name                glade
 version             3.18.3
-revision            1
+revision            2
 license             LGPL-2+ GPL-2+
 set branch          [join [lrange [split ${version} .] 0 1] .]
 description         Glade is a RAD tool to enable quick & easy development of user interfaces \
@@ -30,7 +30,10 @@
                     port:itstool \
                     port:gnome-common \
                     port:yelp-tools \
-                    port:gtk-doc
+                    port:gtk-doc \
+                    port:autoconf \
+                    port:automake \
+                    port:libtool
 
 depends_lib         port:gtk3 \
                     port:libxml2
@@ -40,14 +43,11 @@
 
 gobject_introspection yes
 
-# update m4/intltool.m4 and autoreconf
+patchfiles          patch-upstream-fixes-thru-20141205.diff
 
-pre-configure {
-    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
-}
+# reconfigure using upstream autogen.sh for intltool 0.51 compatibility
 
-use_autoreconf      yes
-autoreconf.args     -fvi
+configure.cmd       ./autogen.sh
 
 #
 # disable optimization which (at least with clang)

Added: users/devans/GNOME-3/stable/dports/devel/glade/files/patch-upstream-fixes-thru-20141205.diff
===================================================================
--- users/devans/GNOME-3/stable/dports/devel/glade/files/patch-upstream-fixes-thru-20141205.diff	                        (rev 0)
+++ users/devans/GNOME-3/stable/dports/devel/glade/files/patch-upstream-fixes-thru-20141205.diff	2015-04-23 16:43:20 UTC (rev 135417)
@@ -0,0 +1,283 @@
+From f7152fc8c76ce30310b488adb110000cadab4291 Mon Sep 17 00:00:00 2001
+From: Juan Pablo Ugarte <juanpablougarte at gmail.com>
+Date: Sat, 17 May 2014 20:12:15 -0300
+Subject: GladeBaseEditor->build_child() use correct type for paramenters Fixes
+ bug 704600 "Cannot add items to menu hierarchy - assertion
+ `GLADE_IS_WIDGET_ADAPTOR (adaptor)' failed"
+
+  GladeWidget * (*build_child)      (GladeBaseEditor *, GladeWidget *, GType);
+
+glin-genmarshal does not have a specific type for GType thus back in the day UINT was used instead.
+But this is not correct in systems where GType is bigger than UINT
+
+diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
+index 2a28875..faa344f 100644
+--- gladeui/glade-base-editor.c
++++ gladeui/glade-base-editor.c
+@@ -1560,9 +1560,8 @@ glade_base_editor_class_init (GladeBaseEditorClass *klass)
+                     G_TYPE_FROM_CLASS (object_class),
+                     G_SIGNAL_RUN_LAST,
+                     G_STRUCT_OFFSET (GladeBaseEditorClass, build_child),
+-                    _glade_stop_emission_accumulator, NULL,
+-                    _glade_marshal_OBJECT__OBJECT_UINT,
+-                    G_TYPE_OBJECT, 2, G_TYPE_OBJECT, G_TYPE_UINT);
++                    _glade_stop_emission_accumulator, NULL, NULL,
++                    G_TYPE_OBJECT, 2, G_TYPE_OBJECT, G_TYPE_GTYPE);
+ 
+   /**
+    * GladeBaseEditor::delete-child:
+-- 
+cgit v0.10.2
+
+From d00ece8aa71332930e4a2d0d490d175567dbde36 Mon Sep 17 00:00:00 2001
+From: David Shea <dshea at redhat.com>
+Date: Wed, 23 Jul 2014 17:34:02 -0400
+Subject: Avoid reading freed data in glade_project_read_requires
+
+Ensure that required_lib is NULL at the start of each iteration through
+the loop.
+
+diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
+index eecdb86..e91b0cb 100644
+--- gladeui/glade-project.c
++++ gladeui/glade-project.c
+@@ -1435,7 +1435,6 @@ glade_project_read_requires (GladeProject *project,
+ 
+   GString *string = g_string_new (NULL);
+   GladeXmlNode *node;
+-  gchar *required_lib = NULL;
+   gboolean loadable = TRUE;
+   guint16 major, minor;
+   gint position = 0;
+@@ -1443,6 +1442,8 @@ glade_project_read_requires (GladeProject *project,
+   for (node = glade_xml_node_get_children_with_comments (root_node);
+        node; node = glade_xml_node_next_with_comments (node))
+     {
++      gchar *required_lib = NULL;
++
+       /* Skip non "requires" tags */
+       if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_REQUIRES) ||
+             (required_lib =
+-- 
+cgit v0.10.2
+
+From 779f60a38020779445abb7a52ba5b1d2603a6bc4 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento at gmail.com>
+Date: Fri, 10 Oct 2014 22:32:06 -0700
+Subject: style: Fix indentation of #ifdef block for OS X
+
+There are no tabs in the rest of the file, so this matches the
+surrounding indentation.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=738339
+
+diff --git a/src/glade-window.c b/src/glade-window.c
+index 702e79f..2e36cfa 100644
+--- src/glade-window.c
++++ src/glade-window.c
+@@ -3272,36 +3272,36 @@ glade_window_constructed (GObject *object)
+                     G_CALLBACK (clipboard_notify_handler_cb), window);
+   
+ #ifdef MAC_INTEGRATION
+-	{
+-	  /* Fix up the menubar for MacOSX Quartz builds */
+-	  GtkWidget *menubar = GET_OBJECT (builder, GTK_WIDGET, "menubar");
+-	  GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+-          GtkWidget *sep, *widget;
+-
+-	  gtk_widget_hide (menubar);
+-	  gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+-	  widget = GET_OBJECT (builder, GTK_WIDGET, "quit_menuitem");
+-	  gtk_widget_hide (widget);
+-	  widget = GET_OBJECT (builder, GTK_WIDGET, "about_menuitem");
+-	  gtk_osxapplication_insert_app_menu_item (theApp, widget, 0);
+-	  sep = gtk_separator_menu_item_new();
+-	  g_object_ref(sep);
+-	  gtk_osxapplication_insert_app_menu_item (theApp, sep, 1);
+-
+-	  widget = GET_OBJECT (builder, GTK_WIDGET, "properties_menuitem");
+-	  gtk_osxapplication_insert_app_menu_item  (theApp, widget, 2);
+-	  sep = gtk_separator_menu_item_new();
+-	  g_object_ref(sep);
+-	  gtk_osxapplication_insert_app_menu_item (theApp, sep, 3);
+-
+-	  widget = GET_OBJECT (builder, GTK_WIDGET, "help_menuitem");
+-	  gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(widget));
+-
+-	  g_signal_connect(theApp, "NSApplicationWillTerminate",
+-	                   G_CALLBACK(on_quit_action_activate), window);
+-
+-	  gtk_osxapplication_ready(theApp);
+-	}
++  {
++    /* Fix up the menubar for MacOSX Quartz builds */
++    GtkWidget *menubar = GET_OBJECT (builder, GTK_WIDGET, "menubar");
++    GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
++    GtkWidget *sep, *widget;
++
++    gtk_widget_hide (menubar);
++    gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
++    widget = GET_OBJECT (builder, GTK_WIDGET, "quit_menuitem");
++    gtk_widget_hide (widget);
++    widget = GET_OBJECT (builder, GTK_WIDGET, "about_menuitem");
++    gtk_osxapplication_insert_app_menu_item (theApp, widget, 0);
++    sep = gtk_separator_menu_item_new();
++    g_object_ref(sep);
++    gtk_osxapplication_insert_app_menu_item (theApp, sep, 1);
++
++    widget = GET_OBJECT (builder, GTK_WIDGET, "properties_menuitem");
++    gtk_osxapplication_insert_app_menu_item  (theApp, widget, 2);
++    sep = gtk_separator_menu_item_new();
++    g_object_ref(sep);
++    gtk_osxapplication_insert_app_menu_item (theApp, sep, 3);
++
++    widget = GET_OBJECT (builder, GTK_WIDGET, "help_menuitem");
++    gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(widget));
++
++    g_signal_connect(theApp, "NSApplicationWillTerminate",
++                     G_CALLBACK(on_quit_action_activate), window);
++
++    gtk_osxapplication_ready(theApp);
++  }
+ #endif
+ 
+   show_dock_first_time (window, DOCK_PALETTE, priv->dock_palette_action);
+-- 
+cgit v0.10.2
+
+From 62a115d0231f5fd0f47b8110251738ab14371524 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento at gmail.com>
+Date: Fri, 10 Oct 2014 22:35:24 -0700
+Subject: osx: Use current gtk-mac-integration API
+
+The #ifdef'd block did not compile at all because it used the old API
+from gtk-mac-integration, and because it used GtkBuilder when the
+surrounding code had been ported to use widget templates.
+
+This fixes up the use of the API and adds a few widget variables to
+GladeWindowPrivate which have to be bound to the template.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=738339
+
+diff --git a/configure.ac b/configure.ac
+index 0c19bdd..377ce3a 100644
+--- configure.ac
++++ configure.ac
+@@ -263,7 +263,7 @@ dnl ================================================================
+ _gdk_tgt=`$PKG_CONFIG --variable=targets gdk-3.0`
+ AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
+ if test "x$_gdk_tgt" = xquartz; then 
+-   PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration)
++   PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration-gtk3)
+ 
+    GTK_MAC_BUNDLE_FLAG=
+ 
+diff --git a/src/glade-window.c b/src/glade-window.c
+index 2e36cfa..c397909 100644
+--- src/glade-window.c
++++ src/glade-window.c
+@@ -136,11 +136,17 @@ struct _GladeWindowPrivate
+   GtkActionGroup *static_actiongroup;
+   GtkActionGroup *view_actiongroup;
+ 
++  GtkMenuShell *menubar;
+   GtkMenuShell *project_menu;
+   
+   GtkRecentManager *recent_manager;
+   GtkWidget *recent_menu;
+ 
++  GtkWidget *quit_menuitem;
++  GtkWidget *about_menuitem;
++  GtkWidget *properties_menuitem;
++  GtkMenuItem *help_menuitem;
++
+   gchar *default_path;          /* the default path for open/save operations */
+ 
+   GtkToolItem *undo_toolbutton; /* customized buttons for undo/redo with history */
+@@ -3274,33 +3280,29 @@ glade_window_constructed (GObject *object)
+ #ifdef MAC_INTEGRATION
+   {
+     /* Fix up the menubar for MacOSX Quartz builds */
+-    GtkWidget *menubar = GET_OBJECT (builder, GTK_WIDGET, "menubar");
+-    GtkOSXApplication *theApp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
+-    GtkWidget *sep, *widget;
+-
+-    gtk_widget_hide (menubar);
+-    gtk_osxapplication_set_menu_bar(theApp, GTK_MENU_SHELL(menubar));
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "quit_menuitem");
+-    gtk_widget_hide (widget);
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "about_menuitem");
+-    gtk_osxapplication_insert_app_menu_item (theApp, widget, 0);
++    GtkosxApplication *theApp = gtkosx_application_get ();
++    GtkWidget *sep;
++
++    gtk_widget_hide (priv->menubar);
++    gtkosx_application_set_menu_bar (theApp, priv->menubar);
++    gtk_widget_hide (priv->quit_menuitem);
++    gtkosx_application_insert_app_menu_item (theApp, priv->about_menuitem, 0);
+     sep = gtk_separator_menu_item_new();
+     g_object_ref(sep);
+-    gtk_osxapplication_insert_app_menu_item (theApp, sep, 1);
++    gtkosx_application_insert_app_menu_item (theApp, sep, 1);
+ 
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "properties_menuitem");
+-    gtk_osxapplication_insert_app_menu_item  (theApp, widget, 2);
++    gtkosx_application_insert_app_menu_item (theApp, priv->properties_menuitem,
++                                             2);
+     sep = gtk_separator_menu_item_new();
+     g_object_ref(sep);
+-    gtk_osxapplication_insert_app_menu_item (theApp, sep, 3);
++    gtkosx_application_insert_app_menu_item (theApp, sep, 3);
+ 
+-    widget = GET_OBJECT (builder, GTK_WIDGET, "help_menuitem");
+-    gtk_osxapplication_set_help_menu(theApp, GTK_MENU_ITEM(widget));
++    gtkosx_application_set_help_menu (theApp, priv->help_menuitem);
+ 
+     g_signal_connect(theApp, "NSApplicationWillTerminate",
+                      G_CALLBACK(on_quit_action_activate), window);
+ 
+-    gtk_osxapplication_ready(theApp);
++    gtkosx_application_ready (theApp);
+   }
+ #endif
+ 
+@@ -3393,7 +3395,12 @@ glade_window_class_init (GladeWindowClass *klass)
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, pointer_mode_actiongroup);
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, static_actiongroup);
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, view_actiongroup);
+-  
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, menubar);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, quit_menuitem);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, properties_menuitem);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, about_menuitem);
++  gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, help_menuitem);
++
+   /* Actions */
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, save_action);
+   gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, quit_action);
+-- 
+cgit v0.10.2
+
+From 1a47c6b15a0297dee5c65f4eb6c1bd1bfeb36946 Mon Sep 17 00:00:00 2001
+From: Juan Pablo Ugarte <juanpablougarte at gmail.com>
+Date: Fri, 5 Dec 2014 14:17:59 -0300
+Subject: glade_preview_window_screenshot() fixed segfault when saving to png
+ file. Bug #741165 "Previewer crashes when taking PNG screenshot"
+
+
+diff --git a/gladeui/glade-preview-window.c b/gladeui/glade-preview-window.c
+index cb2bfd6..388ba2d 100644
+--- gladeui/glade-preview-window.c
++++ gladeui/glade-preview-window.c
+@@ -481,7 +481,7 @@ glade_preview_window_screenshot (GladePreviewWindow *window,
+       const gchar *ext = glade_preview_get_extension (filename);
+       GError *error = NULL;
+       
+-      if (gdk_pixbuf_save (pix, filename, ext ? ext : "png", &error, NULL))
++      if (!gdk_pixbuf_save (pix, filename, ext ? ext : "png", &error, NULL))
+         {
+           g_warning ("Could not save screenshot to %s because %s", filename, error->message);
+           g_error_free (error);
+-- 
+cgit v0.10.2
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150423/4c236c9f/attachment.html>


More information about the macports-changes mailing list