On Tue, 17 Jun 2014 17:34:22 -0700
Matthew Brush <mbr...@codebrainz.ca> wrote:

> On 14-06-17 09:28 AM, Dimitar Zhekov wrote:
> >
> > 5. The waf build of geany plugins does not currently support gtk+3.
> 
> Not a problem with GTK3, just a matter of those using/responsible for 
> Waf to update the build system. [...]

Attached is a simple diff with gtk+3 support for waf build of plugins.
Apply with -p0, specify --enable-gtk3, and also --enable-plugins=list,
since it does not check which ones support gtk+3.

On Sat, 21 Jun 2014 12:48:40 +0300
Dimitar Zhekov <dimitar.zhe...@gmail.com> wrote:

> I wrote simple gtk+3 support for geany plugins wscript, but have only
> tested it under windows so far, not linux.

Now tested under Win~1 and Linux. If you give me a green light, I can
push it to plugins git.

-- 
E-gards: Jimmy
--- wscript.orig	Sun Apr 27 13:56:40 2014
+++ wscript	Thu Jun 19 13:11:11 2014
@@ -62,6 +62,9 @@
 APPNAME = 'geany-plugins'
 VERSION = '1.25'
 LINGUAS_FILE = 'po/LINGUAS'
+MINIMUM_GTK_VERSION = '2.16.0'
+MINIMUM_GTK3_VERSION = '3.0.0'
+MINIMUM_GLIB_VERSION = '2.20.0'
 
 top = '.'
 out = '_build_'
@@ -79,12 +82,16 @@
     conf.load('compiler_c')
 
     # common for all plugins
-    check_cfg_cached(conf,
-                   package='gtk+-2.0',
-                   atleast_version='2.16.0',
-                   uselib_store='GTK',
-                   mandatory=True,
-                   args='--cflags --libs')
+    # GTK / GLIB version check
+    gtk_package_name = 'gtk+-3.0' if conf.options.use_gtk3 else 'gtk+-2.0'
+    minimum_gtk_version = MINIMUM_GTK3_VERSION if conf.options.use_gtk3 else MINIMUM_GTK_VERSION
+    conf.check_cfg(package=gtk_package_name, atleast_version=minimum_gtk_version, uselib_store='GTK',
+        mandatory=True, args='--cflags --libs')
+    conf.check_cfg(package='glib-2.0', atleast_version=MINIMUM_GLIB_VERSION, uselib_store='GLIB',
+        mandatory=True, args='--cflags --libs')
+    # remember GTK version for the build step
+    conf.env['gtk_package_name'] = gtk_package_name
+
     check_cfg_cached(conf,
                    package='geany',
                    atleast_version='1.24',
@@ -98,7 +105,7 @@
     conf.define('REVISION', revision, 1)
     # GTK/Geany versions
     geany_version = conf.check_cfg(modversion='geany') or 'Unknown'
-    gtk_version = conf.check_cfg(modversion='gtk+-2.0') or 'Unknown'
+    gtk_version = conf.check_cfg(modversion=gtk_package_name, uselib_store='GTK') or 'Unknown'
 
     load_intltool_if_available(conf)
     setup_configuration_env(conf)
@@ -205,6 +212,9 @@
     # Options
     opt.add_option('--no-scm', action='store_true', default=False,
         help='Disable SCM detection [default: No]', dest='no_scm')
+    opt.add_option('--enable-gtk3', action='store_true', default=False,
+        help='compile with GTK3 support (experimental) [[default: No]',
+        dest='use_gtk3')
     # Paths
     opt.add_option('--libdir', type='string', default='',
         help='object code libraries', dest='libdir')
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to