1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#! /usr/bin/env python
# encoding: utf-8
VERSION = '0.0.1'
APPNAME = 'editkit'
srcdir = '.'
blddir = 'build'
def set_options(opt):
opt.tool_options('compiler_cc')
def configure(conf):
conf.check_tool('compiler_cc cc vala')
conf.check_cfg(package='glib-2.0', uselib_store='GLIB', atleast_version='2.12.0', mandatory=1, args='--cflags --libs')
conf.check_cfg(package='gtk+-2.0', uselib_store='GTK', atleast_version='2.12.0', mandatory=1, args='--cflags --libs')
conf.check_cfg(package='webkit-1.0', uselib_store='WEBKIT', mandatory=1, args='--cflags --libs')
def build(bld):
obj = bld.new_task_gen(
features = 'cc cprogram',
packages = 'gtk+-2.0 webkit-1.0',
source='editkit.vala',
target = 'editkit',
uselib = 'GTK GLIB WEBKIT',
threading=True,
)
def run(ctx):
'''run editkit from build directory'''
import os, subprocess
subprocess.call(os.path.join(blddir,'default/editkit'))
|