Skip to content

Commit

Permalink
Update waf to version 1.7.10 and fix wscript to fit new API
Browse files Browse the repository at this point in the history
  • Loading branch information
gentoo90 committed Apr 14, 2013
1 parent 5412a24 commit 666f471
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
deps.mak
.deps/
.libs/
.lock-waf_*
Makefile
Makefile.in

Expand Down
2 changes: 1 addition & 1 deletion data/filetype_extensions.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod;
PHP=*.php;*.php3;*.php4;*.php5;*.phtml;
Po=*.po;*.pot;
Python=*.py;*.pyw;SConstruct;SConscript;
Python=*.py;*.pyw;SConstruct;SConscript;wscript;
reStructuredText=*.rest;*.reST;*.rst;
R=*.R;*.r;
Rust=*.rs
Expand Down
Binary file modified waf
Binary file not shown.
37 changes: 19 additions & 18 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import tempfile
from waflib import Logs, Options, Scripting, Utils
from waflib.Configure import ConfigurationContext
from waflib.Errors import WafError
from waflib.TaskGen import feature
from waflib.TaskGen import feature, before_method


APPNAME = 'geany'
Expand Down Expand Up @@ -302,9 +302,9 @@ def configure(conf):


def options(opt):
opt.tool_options('compiler_cc')
opt.tool_options('compiler_cxx')
opt.tool_options('intltool')
opt.load('compiler_cc')
opt.load('compiler_cxx')
opt.load('intltool')

# Features
opt.add_option('--disable-plugins', action='store_true', default=False,
Expand Down Expand Up @@ -344,7 +344,7 @@ def build(bld):
else:
instpath = None

bld.new_task_gen(
bld(
features = ['c', 'cshlib'],
source = 'plugins/%s.c' % plugin_name,
includes = ['.', 'src/', 'scintilla/include', 'tagmanager/src'],
Expand All @@ -354,7 +354,7 @@ def build(bld):
install_path = instpath)

# CTags
bld.new_task_gen(
bld(
features = ['c', 'cstlib'],
source = ctags_sources,
name = 'ctags',
Expand All @@ -365,7 +365,7 @@ def build(bld):
install_path = None) # do not install this library

# Tagmanager
bld.new_task_gen(
bld(
features = ['c', 'cstlib'],
source = tagmanager_sources,
name = 'tagmanager',
Expand All @@ -376,7 +376,7 @@ def build(bld):
install_path = None) # do not install this library

# MIO
bld.new_task_gen(
bld(
features = ['c', 'cstlib'],
source = mio_sources,
name = 'mio',
Expand All @@ -389,7 +389,7 @@ def build(bld):
# Scintilla
files = bld.srcnode.ant_glob('scintilla/**/*.cxx', src=True, dir=False)
scintilla_sources.update(files)
bld.new_task_gen(
bld(
features = ['c', 'cxx', 'cxxstlib'],
name = 'scintilla',
target = 'scintilla',
Expand All @@ -405,7 +405,7 @@ def build(bld):
geany_sources.add('src/win32.c')
geany_sources.add('geany_private.rc')

bld.new_task_gen(
bld(
features = ['c', 'cxx', 'cprogram'],
name = 'geany',
target = 'geany',
Expand All @@ -416,7 +416,7 @@ def build(bld):
use = ['scintilla', 'ctags', 'tagmanager', 'mio'])

# geanyfunctions.h
bld.new_task_gen(
bld(
source = ['plugins/genapi.py', 'src/plugins.c'],
name = 'geanyfunctions.h',
before = ['c', 'cxx'],
Expand All @@ -435,14 +435,14 @@ def build(bld):

# Translations
if bld.env['INTLTOOL']:
bld.new_task_gen(
bld(
features = ['linguas', 'intltool_po'],
podir = 'po',
install_path = '${LOCALEDIR}',
appname = 'geany')

# geany.pc
bld.new_task_gen(
bld(
source = 'geany.pc.in',
dct = {'VERSION': VERSION,
'DEPENDENCIES': '%s >= %s glib-2.0 >= %s' % \
Expand All @@ -460,14 +460,14 @@ def build(bld):
if not is_win32:
# geany.desktop
if bld.env['INTLTOOL']:
bld.new_task_gen(
bld(
features = 'intltool_in',
source = 'geany.desktop.in',
flags = ['-d', '-q', '-u', '-c'],
install_path = '${DATADIR}/applications')

# geany.1
bld.new_task_gen(
bld(
features = 'subst',
source = 'doc/geany.1.in',
target = 'geany.1',
Expand All @@ -476,15 +476,15 @@ def build(bld):
install_path = '${MANDIR}/man1')

# geany.spec
bld.new_task_gen(
bld(
features = 'subst',
source = 'geany.spec.in',
target = 'geany.spec',
install_path = None,
dct = {'VERSION': VERSION})

# Doxyfile
bld.new_task_gen(
bld(
features = 'subst',
source = 'doc/Doxyfile.in',
target = 'doc/Doxyfile',
Expand Down Expand Up @@ -574,6 +574,7 @@ def _remove_linguas_file():


@feature('linguas')
@before_method('apply_intltool_po')
def write_linguas_file(self):
if os.path.exists(LINGUAS_FILE):
return
Expand Down Expand Up @@ -721,7 +722,7 @@ def _get_git_rev(conf):

def _load_intltool_if_available(conf):
try:
conf.check_tool('intltool')
conf.load('intltool')
if 'LINGUAS' in os.environ:
conf.env['LINGUAS'] = os.environ['LINGUAS']
except WafError:
Expand Down

0 comments on commit 666f471

Please sign in to comment.