Revision: 1735 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1735&view=re... Author: eht16 Date: 2010-11-09 17:03:40 +0000 (Tue, 09 Nov 2010)
Log Message: ----------- Rewrite Waf-based build system.
Changes: - update Waf to version 1.6.1svn - Python 2/3 compatibility - more modular and flexible system by using per-plugin build/configure scripts
Modified Paths: -------------- trunk/geany-plugins/waf trunk/geany-plugins/wscript
Added Paths: ----------- trunk/geany-plugins/addons/wscript_build trunk/geany-plugins/build/__init__.py trunk/geany-plugins/build/wafcache.py trunk/geany-plugins/build/wafutils.py trunk/geany-plugins/codenav/wscript_build trunk/geany-plugins/geanydoc/wscript_build trunk/geany-plugins/geanyextrasel/wscript_build trunk/geany-plugins/geanygdb/wscript_build trunk/geany-plugins/geanygdb/wscript_configure trunk/geany-plugins/geanygendoc/wscript_build trunk/geany-plugins/geanygendoc/wscript_configure trunk/geany-plugins/geanyinsertnum/wscript_build trunk/geany-plugins/geanylatex/wscript_build trunk/geany-plugins/geanylipsum/wscript_build trunk/geany-plugins/geanylua/wscript_build trunk/geany-plugins/geanylua/wscript_configure trunk/geany-plugins/geanyprj/wscript_build trunk/geany-plugins/geanysendmail/wscript_build trunk/geany-plugins/geanyvc/wscript_build trunk/geany-plugins/geanyvc/wscript_configure trunk/geany-plugins/pretty-printer/wscript_build trunk/geany-plugins/pretty-printer/wscript_configure trunk/geany-plugins/shiftcolumn/wscript_build trunk/geany-plugins/spellcheck/wscript_build trunk/geany-plugins/spellcheck/wscript_configure trunk/geany-plugins/treebrowser/wscript_build trunk/geany-plugins/treebrowser/wscript_configure trunk/geany-plugins/updatechecker/wscript_build trunk/geany-plugins/updatechecker/wscript_configure
Added: trunk/geany-plugins/addons/wscript_build =================================================================== --- trunk/geany-plugins/addons/wscript_build (rev 0) +++ trunk/geany-plugins/addons/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Addons +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'Addons' +includes = ['addons/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/addons/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/build/__init__.py =================================================================== --- trunk/geany-plugins/build/__init__.py (rev 0) +++ trunk/geany-plugins/build/__init__.py 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,5 @@ + +from build.wafcache import Cache + +# here the Cache is instantiated only once +cache = Cache()
Property changes on: trunk/geany-plugins/build/__init__.py ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/x-python Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/build/wafcache.py =================================================================== --- trunk/geany-plugins/build/wafcache.py (rev 0) +++ trunk/geany-plugins/build/wafcache.py 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# +# WAF build script utilities for geany-plugins +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +""" +A simple cache +""" + +class Cache(): + def __init__(self): + self._cache = dict() + + def __contains__(self, item): + return item in self._cache + + def __getitem__(self, item): + return self._cache[item] + + def __setitem__(self, item, value): + self._cache[item] = value + + def __str__(self): + return str(self._cache)
Property changes on: trunk/geany-plugins/build/wafcache.py ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/x-python Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/build/wafutils.py =================================================================== --- trunk/geany-plugins/build/wafutils.py (rev 0) +++ trunk/geany-plugins/build/wafutils.py 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,324 @@ +# -*- coding: utf-8 -*- +# +# WAF build script utilities for geany-plugins +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +""" +Misc utility functions +""" + +import os +import sys +from waflib.Errors import ConfigurationError, WafError +from waflib import Logs +from build import cache + + + +makefile_template = '''#!/usr/bin/make -f +# Waf Makefile wrapper + +all: + @./waf build + +update-po: + @./waf --update-po + +install: + @if test -n "$(DESTDIR)"; then \ + ./waf install --destdir="$(DESTDIR)"; \ + else \ + ./waf install; \ + fi; + +uninstall: + @if test -n "$(DESTDIR)"; then \ + ./waf uninstall --destdir="$(DESTDIR)"; \ + else \ + ./waf uninstall; \ + fi; + +clean: + @./waf clean + +distclean: + @./waf distclean + +.PHONY: clean uninstall install all +''' + + +def add_define_to_env(conf, key): + value = conf.get_define(key) + # strip quotes + value = value.replace('"', '') + conf.env[key] = value + + +def add_to_env_and_define(conf, key, value, quote=False): + conf.define(key, value, quote) + conf.env[key] = value + + +def build_plugin(ctx, name, sources=None, includes=None, defines=None, libraries=None, features=None): + """ + Common build task for plugins, every plugin should call this in its wscript_build module + + Argument sources might be None or an empty string to use all + source files in the plugin directory. + + @param ctx (waflib.Build.BuildContext) + @param name (str) + @param sources (list) + @param includes (list) + @param defines (list) + @param libraries (list) + @param features (list) + """ + log_domain = name + plugin_name = name.lower() + includes = includes or [] + defines = defines or [] + libraries = libraries or [] + features = features or [] + + is_win32 = target_is_win32(ctx) + + if not sources: + sources = [] + for directory in includes: + bld = ctx.srcnode + files = bld.ant_glob('%s/*.c' % directory, src=True, dir=False) + sources.extend(files) + + includes.append(ctx.out_dir) + defines.append('G_LOG_DOMAIN="%s"' % log_domain) + libraries.append('GTK') + libraries.append('GEANY') + features.append('c') + features.append('cshlib') + task = ctx.new_task_gen( + features = features, + source = sources, + includes = includes, + defines = defines, + target = plugin_name, + use = libraries, + install_path = '${G_PREFIX}/lib' if is_win32 else '${LIBDIR}/geany/') + + install_docs(ctx, plugin_name, 'AUTHORS ChangeLog COPYING NEWS README THANKS TODO'.split()) + return task + + +def check_c_header_cached(conf, **kw): + # Works as conf.check_cc(header_name=...) but tries to cache already checked headers + header_name = kw.get('header_name') + mandatory = kw.get('mandatory') + key = (header_name, mandatory) + if key in cache: + return cache[key] + + result = conf.check_cc(**kw) + cache[key] = result + return result + + +def check_cfg_cached(conf, **kw): + # Works as conf.check_cfg() but tries to cache already checked packages + package = kw.get('package') + uselib_store = kw.get('uselib_store') + args = kw.get('args') + atleast_version = kw.get('atleast_version') + mandatory = kw.get('mandatory') + key = (package, uselib_store, args, atleast_version, mandatory) + if key in cache: + return cache[key] + + result = conf.check_cfg(**kw) + cache[key] = result + return result + + +def get_enabled_plugins(conf): + plugins = get_plugins() + enabled_plugins = [] + if conf.options.enable_plugins: + for plugin_name in conf.options.enable_plugins.split(','): + enabled_plugins.append(plugin_name.strip()) + else: + skipped_plugins = conf.options.skip_plugins.split(',') + for plugin_name in plugins: + if not plugin_name in skipped_plugins: + enabled_plugins.append(plugin_name) + if not enabled_plugins: + raise ConfigurationError('No plugins to compile found') + return enabled_plugins + + +def get_plugins(): + plugins = [] + for path in os.listdir('.'): + plugin_wscript = os.path.join(path, 'wscript_build') + if os.path.exists(plugin_wscript): + plugins.append(path) + + return sorted(plugins) + + +def get_svn_rev(conf): + def in_git(): + cmd = 'git ls-files >/dev/null 2>&1' + return (conf.exec_command(cmd) == 0) + + def in_svn(): + return os.path.exists('.svn') + + # try GIT + if in_git(): + cmds = [ 'git svn find-rev HEAD 2>/dev/null', + 'git svn find-rev origin/trunk 2>/dev/null', + 'git svn find-rev trunk 2>/dev/null', + 'git svn find-rev master 2>/dev/null' + ] + for cmd in cmds: + try: + stdout = conf.cmd_and_log(cmd) + if stdout: + return int(stdout.strip()) + except WafError: + pass + except ValueError: + Logs.pprint('RED', 'Unparseable revision number') + # try SVN + elif in_svn(): + try: + _env = None if target_is_win32(conf) else dict(LANG='C') + stdout = conf.cmd_and_log(cmd='svn info --non-interactive', env=_env) + lines = stdout.splitlines(True) + for line in lines: + if line.startswith('Last Changed Rev'): + value = line.split(': ', 1)[1] + return int(value.strip()) + except WafError: + pass + except (IndexError, ValueError): + Logs.pprint('RED', 'Unparseable revision number') + return 0 + + +def install_docs(ctx, name, files): + is_win32 = target_is_win32(ctx) + ext = '.txt' if is_win32 else '' + docdir = '${G_PREFIX}/doc/plugins/%s' % name if is_win32 else '${DOCDIR}/%s' % name + for filename in files: + if os.path.exists(os.path.join(name, filename)): + basename = uc_first(filename, ctx) + destination_filename = '%s%s' % (basename, ext) + destination = os.path.join(docdir, destination_filename) + ctx.install_as(destination, filename) + + +# Simple function to execute a command and print its exit status +def launch(ctx, command, status, success_color='GREEN'): + ret = 0 + error_message = '' + Logs.pprint(success_color, status) + ret = ctx.exec_command(command) + if ret == -1: + _, e, _ = sys.exc_info() + ret = 1 + error_message = ' (%s: %s)' % (str(e), command) + + if ret != 0: + Logs.pprint('RED', '%s failed%s' % (status, error_message)) + + return ret + + +def load_intltool_if_available(conf): + try: + conf.check_tool('intltool') + if 'LINGUAS' in os.environ: + conf.env['LINGUAS'] = os.environ['LINGUAS'] + except WafError: + # on Windows, we don't hard depend on intltool, on all other platforms raise an error + if not target_is_win32(conf): + raise + + +def set_lib_dir(conf): + if target_is_win32(conf): + # nothing to do + return + # use the libdir specified on command line + if conf.options.libdir: + add_to_env_and_define(conf, 'LIBDIR', conf.options.libdir, True) + else: + # get Geany's libdir (this should be the default case for most users) + libdir = conf.check_cfg(package='geany', args='--variable=libdir') + if libdir: + add_to_env_and_define(conf, 'LIBDIR', libdir.strip(), True) + else: + add_to_env_and_define(conf, 'LIBDIR', conf.env['PREFIX'] + '/lib', True) + # libexec (e.g. for geanygdb) + if conf.options.libexecdir: + add_to_env_and_define(conf, 'LIBEXECDIR', conf.options.libexecdir, True) + + else: + add_to_env_and_define(conf, 'LIBEXECDIR', conf.env['PREFIX'] + '/libexec', True) + + +def setup_makefile(ctx): + # convenience script (script content copied from the original waf.bat) + if target_is_win32(ctx): + file_h = open('waf.bat', 'wb') + file_h.write('@python -x %~dp0waf %* & exit /b') + file_h.close() + # write a simple Makefile + else: + file_h = open('Makefile', 'w') + file_h.write(makefile_template) + file_h.close() + + +def target_is_win32(ctx): + if 'is_win32' in ctx.env: + # cached + return ctx.env['is_win32'] + is_win32 = None + if sys.platform == 'win32': + is_win32 = True + if is_win32 is None: + if ctx.env and 'CC' in ctx.env: + env_cc = ctx.env['CC'] + if not isinstance(env_cc, str): + env_cc = ''.join(env_cc) + is_win32 = (env_cc.find('mingw') != -1) + if is_win32 is None: + is_win32 = False + # cache for future checks + ctx.env['is_win32'] = is_win32 + return is_win32 + + +def uc_first(string, ctx): + if target_is_win32(ctx): + return string.title() + return string
Property changes on: trunk/geany-plugins/build/wafutils.py ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/x-python Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/codenav/wscript_build =================================================================== --- trunk/geany-plugins/codenav/wscript_build (rev 0) +++ trunk/geany-plugins/codenav/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - CodeNav +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + +name = 'CodeNav' +includes = ['codenav/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/codenav/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanydoc/wscript_build =================================================================== --- trunk/geany-plugins/geanydoc/wscript_build (rev 0) +++ trunk/geany-plugins/geanydoc/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyDoc +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyDoc' +includes = ['geanydoc/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/geanydoc/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanyextrasel/wscript_build =================================================================== --- trunk/geany-plugins/geanyextrasel/wscript_build (rev 0) +++ trunk/geany-plugins/geanyextrasel/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyExtraSel +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyExtraSel' +includes = ['geanyextrasel/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/geanyextrasel/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanygdb/wscript_build =================================================================== --- trunk/geany-plugins/geanygdb/wscript_build (rev 0) +++ trunk/geany-plugins/geanygdb/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyGDB +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyGDB' +includes = ['src', bld.out_dir] +sources = ['gdb-io-break.c', + 'gdb-io-envir.c', 'gdb-io-frame.c', 'gdb-io-read.c', 'gdb-io-run.c', + 'gdb-io-stack.c', 'gdb-lex.c', 'gdb-ui-break.c', 'gdb-ui-envir.c', + 'gdb-ui-frame.c', 'gdb-ui-locn.c', 'gdb-ui-main.c', + 'geanygdb.c'] +sources = ['src/%s' % source_file for source_file in sources] + + +build_plugin(bld, name, sources=sources, includes=includes) + +bld.new_task_gen( + features = 'c cprogram', + source = 'src/ttyhelper.c', + includes = includes, + defines = 'G_LOG_DOMAIN="%s"' % name, + target = 'ttyhelper', + install_path = '${TTYHELPERDIR}')
Property changes on: trunk/geany-plugins/geanygdb/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanygdb/wscript_configure =================================================================== --- trunk/geany-plugins/geanygdb/wscript_configure (rev 0) +++ trunk/geany-plugins/geanygdb/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyGDB +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from waflib.Errors import ConfigurationError +from build.wafutils import add_to_env_and_define, check_c_header_cached + + +check_c_header_cached(conf, header_name='elf.h', mandatory=False) + +if not conf.env['HAVE_ELF_H'] == 1: + # either elf.h or elf_abi.h is needed, so make this last check mandatory to bail out if it fails + check_c_header_cached(conf, header_name='elf_abi.h', mandatory=True) + +ttyhelperdir = conf.env['LIBEXECDIR'] + '/geany-plugins/geanygdb' +add_to_env_and_define(conf, 'TTYHELPERDIR', ttyhelperdir, quote=True)
Property changes on: trunk/geany-plugins/geanygdb/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanygendoc/wscript_build =================================================================== --- trunk/geany-plugins/geanygendoc/wscript_build (rev 0) +++ trunk/geany-plugins/geanygendoc/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyGenDoc +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin, target_is_win32 + + +name = 'GeanyGenDoc' +includes = ['geanygendoc/src'] +libraries = ['CTPL'] + +build_plugin(bld, name, includes=includes, libraries=libraries) + +is_win32 = target_is_win32(bld) + +# install docs +datadir = '${G_PREFIX}/${GEANYPLUGINS_DATADIR}' if is_win32 else '${GEANYPLUGINS_DATADIR}' +docdir = '${G_PREFIX}/doc/plugins/geanygendoc' if is_win32 else '${DOCDIR}/geanygendoc' +htmldocdir = '%s/html' % docdir +bld.install_files(docdir, 'docs/manual.rst') +bld.install_files(htmldocdir, 'docs/manual.html') + +start_dir = bld.path.find_dir('data/filetypes') +filetype_data_dir = '%s/geany-plugins/geanygendoc/filetypes' % datadir +bld.install_files(filetype_data_dir, start_dir.ant_glob('*.conf'), cwd=start_dir)
Property changes on: trunk/geany-plugins/geanygendoc/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanygendoc/wscript_configure =================================================================== --- trunk/geany-plugins/geanygendoc/wscript_configure (rev 0) +++ trunk/geany-plugins/geanygendoc/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyGenDoc +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import check_cfg_cached + + +check_cfg_cached(conf, + package='ctpl', + atleast_version='0.3', + mandatory=True, + args='--cflags --libs')
Property changes on: trunk/geany-plugins/geanygendoc/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanyinsertnum/wscript_build =================================================================== --- trunk/geany-plugins/geanyinsertnum/wscript_build (rev 0) +++ trunk/geany-plugins/geanyinsertnum/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyInsertNum +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyInsertNum' +includes = ['geanyinsertnum/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/geanyinsertnum/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanylatex/wscript_build =================================================================== --- trunk/geany-plugins/geanylatex/wscript_build (rev 0) +++ trunk/geany-plugins/geanylatex/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyLaTeX +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin, target_is_win32 + + +name = 'GeanyLaTeX' +includes = ['geanylatex/src'] + +build_plugin(bld, name, includes=includes) + +# install docs +is_win32 = target_is_win32(bld) +docdir = '${G_PREFIX}/doc/plugins/geanylatex' if is_win32 else '${DOCDIR}/geanylatex' +start_dir = bld.path.find_dir('doc') +bld.install_files(docdir, start_dir.ant_glob('geanylatex.*'), cwd=start_dir) +bld.install_files(docdir, start_dir.ant_glob('**/*.png'), cwd=start_dir, relative_trick=True)
Property changes on: trunk/geany-plugins/geanylatex/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanylipsum/wscript_build =================================================================== --- trunk/geany-plugins/geanylipsum/wscript_build (rev 0) +++ trunk/geany-plugins/geanylipsum/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyLipsum +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyLipsum' +includes = ['geanylipsum/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/geanylipsum/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanylua/wscript_build =================================================================== --- trunk/geany-plugins/geanylua/wscript_build (rev 0) +++ trunk/geany-plugins/geanylua/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyLUA +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin, target_is_win32 + + +name = 'GeanyLUA' +sources = ['geanylua.c'] +lua_sources = [ 'glspi_init.c', 'glspi_app.c', 'glspi_dlg.c', + 'glspi_doc.c', 'glspi_kfile.c', 'glspi_run.c', + 'glspi_sci.c', 'gsdlg_lua.c' ] +libraries = ['LUA'] + +build_plugin(bld, name, sources=sources, libraries=libraries) + + +is_win32 = target_is_win32(bld) +if is_win32: + install_path = '${G_PREFIX}/lib/geany-plugins/geanylua' +else: + install_path = '${LIBDIR}/geany-plugins/geanylua' + +# build helper library +bld.new_task_gen( + features = 'c cshlib', + source = lua_sources, + defines = 'G_LOG_DOMAIN="%s"' % name, + includes = bld.out_dir, + target = 'libgeanylua', + uselib = libraries, + install_path = install_path) + + +# prepare installation of docs/examples +if is_win32: + geanylua_datadir = '${G_PREFIX}/${GEANYPLUGINS_DATADIR}/geany-plugins/geanylua' + docdir = '${G_PREFIX}/doc/plugins/geanylua' +else: + geanylua_datadir = '${GEANYPLUGINS_DATADIR}/geany-plugins/geanylua' + docdir = '${DOCDIR}/geanylua' + +# install docs +start_dir = bld.path.find_dir('docs') +bld.install_files(docdir, start_dir.ant_glob('*.html'), cwd=start_dir) +# install examples +start_dir = bld.path.find_dir('examples') +bld.install_files( + geanylua_datadir, + start_dir.ant_glob('**/*.lua'), + cwd=start_dir, + relative_trick=True)
Property changes on: trunk/geany-plugins/geanylua/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanylua/wscript_configure =================================================================== --- trunk/geany-plugins/geanylua/wscript_configure (rev 0) +++ trunk/geany-plugins/geanylua/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyLUA +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from waflib.Errors import ConfigurationError +from build.wafutils import check_cfg_cached + +package_names = ['lua', 'lua5.1', 'lua51', 'lua-5.1'] + +def try_to_find_lua_package(): + # try various package names as distributions like to use different ones + for package_name in package_names: + check_cfg_cached(conf, + package=package_name, + atleast_version='5.1', + mandatory=False, + uselib_store='LUA', + args='--cflags --libs') + if conf.env['HAVE_LUA'] == 1: + return True + return False + + +found_lua_package = try_to_find_lua_package() +if not found_lua_package: + raise ConfigurationError('You need Lua 5.1 for the GeanyLua plugin')
Property changes on: trunk/geany-plugins/geanylua/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanyprj/wscript_build =================================================================== --- trunk/geany-plugins/geanyprj/wscript_build (rev 0) +++ trunk/geany-plugins/geanyprj/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyPrj +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyPrj' +includes = ['geanyprj/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/geanyprj/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanysendmail/wscript_build =================================================================== --- trunk/geany-plugins/geanysendmail/wscript_build (rev 0) +++ trunk/geany-plugins/geanysendmail/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanySendMail +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanySendMail' +includes = ['geanysendmail/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/geanysendmail/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanyvc/wscript_build =================================================================== --- trunk/geany-plugins/geanyvc/wscript_build (rev 0) +++ trunk/geany-plugins/geanyvc/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyVC +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'GeanyVC' +includes = ['geanyvc/src'] +libraries = ['GTKSPELL'] + +build_plugin(bld, name, includes=includes, libraries=libraries)
Property changes on: trunk/geany-plugins/geanyvc/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/geanyvc/wscript_configure =================================================================== --- trunk/geany-plugins/geanyvc/wscript_configure (rev 0) +++ trunk/geany-plugins/geanyvc/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - GeanyVC +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import check_cfg_cached + + +check_cfg_cached(conf, + package='gtkspell-2.0', + atleast_version='2.0', + mandatory=False, + uselib_store='GTKSPELL', + args='--cflags --libs') + +if conf.env['HAVE_GTKSPELL']: + conf.define('USE_GTKSPELL', 1);
Property changes on: trunk/geany-plugins/geanyvc/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/pretty-printer/wscript_build =================================================================== --- trunk/geany-plugins/pretty-printer/wscript_build (rev 0) +++ trunk/geany-plugins/pretty-printer/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Pretty Printer +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'Pretty-Printer' +includes = ['pretty-printer/src'] +libraries = ['LIBXML_2_0'] + +build_plugin(bld, name, includes=includes, libraries=libraries)
Property changes on: trunk/geany-plugins/pretty-printer/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/pretty-printer/wscript_configure =================================================================== --- trunk/geany-plugins/pretty-printer/wscript_configure (rev 0) +++ trunk/geany-plugins/pretty-printer/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Pretty Printer +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import check_cfg_cached + + +check_cfg_cached(conf, + package='libxml-2.0', + atleast_version='2.6.27', + mandatory=True, + uselib_store='LIBXML_2_0', + args='--cflags --libs') +
Property changes on: trunk/geany-plugins/pretty-printer/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/shiftcolumn/wscript_build =================================================================== --- trunk/geany-plugins/shiftcolumn/wscript_build (rev 0) +++ trunk/geany-plugins/shiftcolumn/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - ShiftColumn +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'ShiftColumn' +includes = ['shiftcolumn/src'] + +build_plugin(bld, name, includes=includes)
Property changes on: trunk/geany-plugins/shiftcolumn/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/spellcheck/wscript_build =================================================================== --- trunk/geany-plugins/spellcheck/wscript_build (rev 0) +++ trunk/geany-plugins/spellcheck/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Spell Check +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'SpellCheck' +includes = ['spellcheck/src'] +libraries = ['ENCHANT'] + +build_plugin(bld, name, includes=includes, libraries=libraries)
Property changes on: trunk/geany-plugins/spellcheck/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/spellcheck/wscript_configure =================================================================== --- trunk/geany-plugins/spellcheck/wscript_configure (rev 0) +++ trunk/geany-plugins/spellcheck/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Spell Check +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import check_cfg_cached +from distutils import version + + +check_cfg_cached(conf, + package='enchant', + atleast_version='1.3', + mandatory=True, + args='--cflags --libs') + +if conf.env['HAVE_ENCHANT']: + enchant_version = conf.check_cfg(modversion='enchant') + if version.LooseVersion(enchant_version) >= version.LooseVersion('1.5.0'): + conf.define('HAVE_ENCHANT_1_5', 1);
Property changes on: trunk/geany-plugins/spellcheck/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/treebrowser/wscript_build =================================================================== --- trunk/geany-plugins/treebrowser/wscript_build (rev 0) +++ trunk/geany-plugins/treebrowser/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - TreeBrowser +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'TreeBrowser' +includes = ['treebrowser/src'] +libraries = ['GIO'] + +build_plugin(bld, name, includes=includes, libraries=libraries)
Property changes on: trunk/geany-plugins/treebrowser/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/treebrowser/wscript_configure =================================================================== --- trunk/geany-plugins/treebrowser/wscript_configure (rev 0) +++ trunk/geany-plugins/treebrowser/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - TreeBrowser +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import check_cfg_cached, check_c_header_cached + + +check_cfg_cached(conf, + package='gio-2.0', + atleast_version='2.16', + mandatory=False, + uselib_store='GIO', + args='--cflags --libs') + +check_c_header_cached(conf, header_name='sys/types.h', mandatory=True) +check_c_header_cached(conf, header_name='sys/stat.h', mandatory=True) +check_c_header_cached(conf, header_name='fcntl.h', mandatory=True)
Property changes on: trunk/geany-plugins/treebrowser/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/updatechecker/wscript_build =================================================================== --- trunk/geany-plugins/updatechecker/wscript_build (rev 0) +++ trunk/geany-plugins/updatechecker/wscript_build 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Update Checker +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import build_plugin + + +name = 'Updatechecker' +includes = ['updatechecker/src'] +libraries = ['LIBSOUP'] + +build_plugin(bld, name, includes=includes, libraries=libraries) +
Property changes on: trunk/geany-plugins/updatechecker/wscript_build ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Added: trunk/geany-plugins/updatechecker/wscript_configure =================================================================== --- trunk/geany-plugins/updatechecker/wscript_configure (rev 0) +++ trunk/geany-plugins/updatechecker/wscript_configure 2010-11-09 17:03:40 UTC (rev 1735) @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# +# WAF build script for geany-plugins - Update Checker +# +# Copyright 2010 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> +# +# 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. +# +# $Id$ + +from build.wafutils import check_cfg_cached + + +check_cfg_cached(conf, + package='libsoup-2.4', + atleast_version='2.4.0', + mandatory=True, + uselib_store='LIBSOUP', + args='--cflags --libs')
Property changes on: trunk/geany-plugins/updatechecker/wscript_configure ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native
Modified: trunk/geany-plugins/waf =================================================================== --- trunk/geany-plugins/waf 2010-11-08 21:51:57 UTC (rev 1734) +++ trunk/geany-plugins/waf 2010-11-09 17:03:40 UTC (rev 1735) @@ -1,6 +1,6 @@ #!/usr/bin/env python -# encoding: utf-8 -# Thomas Nagy, 2005-2009 +# encoding: ISO8859-1 +# Thomas Nagy, 2005-2010
""" Redistribution and use in source and binary forms, with or without @@ -31,24 +31,19 @@ """
import os, sys -if sys.hexversion<0x203000f: raise ImportError("Waf requires Python >= 2.3")
-if 'PSYCOWAF' in os.environ: - try:import psyco;psyco.full() - except:pass - -VERSION="1.5.7" -REVISION="8edda22ed216daab7aed3d430dc291cf" +VERSION="1.6.1" +REVISION="feb3e2618520cd418b5bd3642e8e4316" INSTALL='' -C1='#+' -C2='#)' +C1='#.' +C2='#%' cwd = os.getcwd() join = os.path.join
+ WAF='waf' def b(x): return x - if sys.hexversion>0x300000f: WAF='waf3' def b(x): @@ -60,14 +55,14 @@
def unpack_wafdir(dir): f = open(sys.argv[0],'rb') - c = "corrupted waf (%d)" + c = 'corrupt archive (%d)' while 1: line = f.readline() - if not line: err("run waf-light from a folder containing wafadmin") + if not line: err('run waf-light from a folder containing waflib') if line == b('#==>\n'): txt = f.readline() if not txt: err(c % 1) - if f.readline()!=b('#<==\n'): err(c % 2) + if f.readline() != b('#<==\n'): err(c % 2) break if not txt: err(c % 3) txt = txt[1:-1].replace(b(C1), b('\n')).replace(b(C2), b('\r')) @@ -75,39 +70,59 @@ import shutil, tarfile try: shutil.rmtree(dir) except OSError: pass - try: os.makedirs(join(dir, 'wafadmin', 'Tools')) - except OSError: err("Cannot unpack waf lib into %s\nMove waf into a writeable directory" % dir) + try: + for x in ['Tools', 'extras']: + os.makedirs(join(dir, 'waflib', x)) + except OSError: + err("Cannot unpack waf lib into %s\nMove waf into a writeable directory" % dir)
os.chdir(dir) - tmp = 't.tbz2' + tmp = 't.bz2' t = open(tmp,'wb') t.write(txt) t.close()
try: t = tarfile.open(tmp) - for x in t: t.extract(x) - t.close() except: - os.chdir(cwd) - try: shutil.rmtree(dir) - except OSError: pass - err("Waf cannot be unpacked, check that bzip2 support is present") + try: + os.system('bunzip2 t.bz2') + t = tarfile.open('t') + tmp = 't' + except: + os.chdir(cwd) + try: shutil.rmtree(dir) + except OSError: pass + err("Waf cannot be unpacked, check that bzip2 support is present")
- os.chmod(join('wafadmin','Tools'), 493) + for x in t: t.extract(x) + t.close()
- os.unlink(tmp) + for x in ['Tools', 'extras']: + os.chmod(join('waflib',x), 493)
- if sys.hexversion>0x300000f: - sys.path = [join(dir, 'wafadmin')] + sys.path - import py3kfixes - py3kfixes.fixdir(dir) + if sys.hexversion<0x300000f: + sys.path = [join(dir, 'waflib')] + sys.path + import fixpy2 + fixpy2.fixdir(dir)
+ os.unlink(tmp) os.chdir(cwd)
+ try: dir = unicode(dir, 'mbcs') + except: pass + try: + from ctypes import windll + windll.kernel32.SetFileAttributesW(dir, 2) + except: + pass + def test(dir): - try: os.stat(join(dir, 'wafadmin')); return os.path.abspath(dir) - except OSError: pass + try: + os.stat(join(dir, 'waflib')) + return os.path.abspath(dir) + except OSError: + pass
def find_lib(): name = sys.argv[0] @@ -121,17 +136,15 @@ if name.endswith('waf-light'): w = test(base) if w: return w - err("waf-light requires wafadmin -> export WAFDIR=/folder") + err('waf-light requires waflib -> export WAFDIR=/folder')
- dir = "/lib/%s-%s-%s/" % (WAF, VERSION, REVISION) + dirname = '%s-%s-%s' % (WAF, VERSION, REVISION) for i in [INSTALL,'/usr','/usr/local','/opt']: - w = test(i+dir) + w = test(i + '/lib/' + dirname) if w: return w
#waf-local - s = '.%s-%s-%s' - if sys.platform == 'win32': s = s[1:] - dir = join(base, s % (WAF, VERSION, REVISION)) + dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname) w = test(dir) if w: return w
@@ -140,14 +153,13 @@ return dir
wafdir = find_lib() -w = join(wafdir, 'wafadmin') -t = join(w, 'Tools') -sys.path = [w, t] + sys.path +sys.path.insert(0, wafdir)
-import Scripting -Scripting.prepare(t, cwd, VERSION, wafdir) -sys.exit(0) +if __name__ == '__main__': + import waflib.extras.compat15 + from waflib import Scripting + Scripting.waf_entry_point(cwd, VERSION, wafdir)
#==>
@@ Diff output truncated at 100000 characters. @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.