Revision
149602
Author
devans@macports.org
Date
2016-06-27 14:41:21 -0700 (Mon, 27 Jun 2016)

Log Message

GNOME-3/stable: anjuta, add dependency on gnutls, blacklist compilers that do not support C11 redefinition of typedef, patch python loader plugin to fix python3 runtime issue.

Modified Paths

Added Paths

Property Changed

Diff

Property changes: users/devans/GNOME-3/stable/dports/gnome/anjuta


Modified: svn:mergeinfo

/trunk/dports/gnome/anjuta:108265-142782 /users/devans/GNOME-3/unstable/dports/gnome/anjuta:116619-118151,119539-125908,132270-134577 /users/devans/dports/gnome/anjuta:117797-117811 /users/rmstonecipher/gnome/anjuta:102363-103172 + /branches/mld-qt-481/dports/gnome/anjuta:92720,92813,92891,92963,93522,93556,93699,93743,93771-93773,93806,93817-93818,93856 /trunk/dports/gnome/anjuta:108265-148492 /users/devans/GNOME-3/unstable/dports/gnome/anjuta:116619-118151,119539-125908,132270-134577 /users/devans/dports/gnome/anjuta:117797-117811 /users/rmstonecipher/gnome/anjuta:102363-103172

Modified: users/devans/GNOME-3/stable/dports/gnome/anjuta/Portfile (149601 => 149602)


--- users/devans/GNOME-3/stable/dports/gnome/anjuta/Portfile	2016-06-27 21:29:45 UTC (rev 149601)
+++ users/devans/GNOME-3/stable/dports/gnome/anjuta/Portfile	2016-06-27 21:41:21 UTC (rev 149602)
@@ -2,6 +2,7 @@
 # $Id$
 
 PortSystem          1.0
+PortGroup           compiler_blacklist_versions 1.0
 PortGroup           gobject_introspection 1.0
 PortGroup           muniversal 1.0
 
@@ -38,6 +39,7 @@
                     port:gtk3 \
                     port:gdl3 \
                     port:gjs \
+                    port:gnutls \
                     port:gtksourceview3 \
                     port:libgda5 \
                     port:libxml2 \
@@ -51,10 +53,14 @@
 patchfiles          patch-configure.ac.diff \
                     patch-python-cflags.diff \
                     python-ldflags.patch \
-                    patch-ltmain.sh.diff
+                    patch-ltmain.sh.diff \
+                    patch-plugins-python-loader-plugin.c.diff
 
 gobject_introspection yes
 
+# blacklist compilers that do not support C11 (redefinition of typedef ‘GtkSourceTag’ at gtksourceview/gtksourcetag.h:35)
+compiler.blacklist  *gcc* {clang < 300}
+
 # reconfigure using upstream autogen.sh for intltool 0.51 compatibility
 
 configure.cmd       ./autogen.sh

Added: users/devans/GNOME-3/stable/dports/gnome/anjuta/files/patch-plugins-python-loader-plugin.c.diff (0 => 149602)


--- users/devans/GNOME-3/stable/dports/gnome/anjuta/files/patch-plugins-python-loader-plugin.c.diff	                        (rev 0)
+++ users/devans/GNOME-3/stable/dports/gnome/anjuta/files/patch-plugins-python-loader-plugin.c.diff	2016-06-27 21:41:21 UTC (rev 149602)
@@ -0,0 +1,42 @@
+--- plugins/python-loader/plugin.c.orig	2016-06-13 21:39:50.000000000 -0700
++++ plugins/python-loader/plugin.c	2016-06-13 22:11:53.000000000 -0700
+@@ -93,6 +93,12 @@
+ /* AnjutaPlugin functions
+  *---------------------------------------------------------------------------*/
+ 
++#if PY_MAJOR_VERSION >= 3
++#include <stdlib.h>
++
++static wchar_t *wargv;
++#endif
++
+ static gboolean
+ pyl_plugin_activate (AnjutaPlugin *plugin)
+ {
+@@ -112,7 +118,15 @@
+ 		return FALSE;
+ 	}
+ 
++#if PY_MAJOR_VERSION >= 3
++	char *s = argv[0];
++	size_t slen = sizeof (s);
++	wargv = (wchar_t *) calloc (slen + 1, sizeof (wchar_t));
++	mbstowcs (wargv, s, slen);
++	PySys_SetArgv (1, &wargv);
++#else
+ 	PySys_SetArgv (1, argv);
++#endif
+ 
+ 	/* Retrieve the Python type for anjuta plugin */
+ 	m = PyImport_ImportModule ("gi.repository.Anjuta");
+@@ -136,6 +150,10 @@
+ 		while (PyGC_Collect ())
+ 			;
+ 
++#if PY_MAJOR_VERSION >= 3
++		free (wargv);
++#endif
++
+ 		Py_Finalize ();
+ 	}
+