Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

multiterm: Preliminary Waf build and configure scripts

  • Loading branch information...
commit a1cb96353fa830e8bc219fea8b3b03391c1a20aa 1 parent 9e40f16
@codebrainz codebrainz authored
Showing with 99 additions and 0 deletions.
  1. +66 −0 multiterm/wscript_build
  2. +33 −0 multiterm/wscript_configure
View
66 multiterm/wscript_build
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+#
+# WAF build script for geany-plugins - MultiTerm
+#
+# Copyright 2011 Matthew Brush <matt(at)geany(dot)org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+from build.wafutils import target_is_win32, install_docs
+
+def build_vala_plugin(ctx, name, sources, vapi_dirs=None, packages=None,
+ libraries=None, features=None):
+ """
+ Similar to build.wafutils.build_plugin() except it's for Vala.
+ TODO: move this function to that module and make the
+ geany.vapi/deps available for other plugins.
+ """
+ log_domain = name
+ plugin_name = name.lower()
+ vapi_dirs = vapi_dirs or []
+ packages = packages or []
+ libraries = libraries or []
+ features = features or []
+
+ libraries.extend(['GTK', 'GEANY'])
+ features.extend(['c', 'cshlib'])
+
+ install_path = '${G_PREFIX}/lib' if target_is_win32(ctx) else '${LIBDIR}/geany/'
+
+ task = ctx.shlib(packages = packages,
+ features = features,
+ target = plugin_name,
+ source = sources,
+ vapi_dirs = vapi_dirs,
+ use = libraries,
+ vala_defines = [ 'G_LOG_DOMAIN="%s"' % log_domain ],
+ install_path = install_path)
+
+ install_docs(ctx, plugin_name,
+ 'AUTHORS ChangeLog COPYING NEWS README THANKS TODO'.split())
+
+ return task
+
+
+name = 'MultiTerm'
+sources = [ 'src/config.vala', 'src/context-menu.vala', 'src/defconf.vala',
+ 'src/notebook.vala', 'src/plugin.vala', 'src/shell-config.vala',
+ 'src/tab-label.vala', 'src/terminal.vala']
+packages = [ 'gtk+-2.0', 'glib-2.0', 'vte', 'geany' ]
+libraries = [ 'GTK', 'GLIB', 'VTE', 'GEANY' ]
+vapi_dirs = [ 'src/vapi' ]
+
+build_vala_plugin(bld, name, sources, vapi_dirs, packages, libraries)
View
33 multiterm/wscript_configure
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+#
+# WAF configure script for geany-plugins - MultiTerm
+#
+# Copyright 2011 Matthew Brush <matt(at)geany(dot)org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+from build.wafutils import check_cfg_cached
+
+conf.load('vala', funs='')
+conf.check_vala(min_version=(0,12,0))
+
+packages = [('gtk+-2.0', 'GTK'),
+ ('glib-2.0', 'GLIB'),
+ ('vte', 'VTE'),
+ ('geany', 'GEANY')]
+
+for pkg, var in packages:
+ check_cfg_cached(conf, package=pkg, uselib_store=var, args='--cflags --libs')
Please sign in to comment.
Something went wrong with that request. Please try again.