Build gladish
|
@ -1,14 +0,0 @@
|
||||||
patchage (0.4.2) unstable; urgency=low
|
|
||||||
|
|
||||||
* LASH support via D-BUS from ladi-patchage branch
|
|
||||||
* Remove old LASH support via liblash
|
|
||||||
|
|
||||||
-- Dave Robillard <dave@drobilla.net> Tue, 09 Sep 2008 15:41:04 -0400
|
|
||||||
|
|
||||||
|
|
||||||
patchage (0.4.1) unstable; urgency=low
|
|
||||||
|
|
||||||
* Initial Debian release
|
|
||||||
|
|
||||||
-- Dave Robillard <dave@drobilla.net> Sun, 06 Jul 2008 17:19:55 -0400
|
|
||||||
|
|
1153
gladish/Doxyfile
|
@ -1,35 +0,0 @@
|
||||||
This software requires only Python to build.
|
|
||||||
|
|
||||||
Like an auto* project, building has three phases:
|
|
||||||
|
|
||||||
|
|
||||||
* Configure: ./waf configure [OPTIONS]
|
|
||||||
|
|
||||||
Example:
|
|
||||||
./waf configure --prefix=/some/where --debug --strict
|
|
||||||
|
|
||||||
If --debug is not given, the flags from the environment variables
|
|
||||||
CFLAGS and CXXFLAGS will be used.
|
|
||||||
|
|
||||||
The default prefix is /usr/local
|
|
||||||
|
|
||||||
|
|
||||||
* Build: ./waf [OPTIONS]
|
|
||||||
|
|
||||||
Example:
|
|
||||||
./waf -j4
|
|
||||||
|
|
||||||
|
|
||||||
* Install: ./waf install [OPTIONS]
|
|
||||||
|
|
||||||
The environment variable DESTDIR can be used to add any prefix to
|
|
||||||
the install paths (useful for packaging). Example:
|
|
||||||
|
|
||||||
DESTDIR=/home/drobilla/packages ./waf install
|
|
||||||
|
|
||||||
|
|
||||||
*** IMPORTANT: You must use absolute paths everywhere
|
|
||||||
|
|
||||||
|
|
||||||
Run './waf --help' for detailed option information.
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
Patchage
|
|
||||||
----
|
|
||||||
|
|
||||||
Patchage is a modular patch bay for audio and MIDI systems
|
|
||||||
based on JACK, LASH, and ALSA.
|
|
||||||
|
|
||||||
For more information, see <http://drobilla.net/software/patchage>.
|
|
||||||
|
|
||||||
-- Dave Robillard <dave@drobilla.net>
|
|
|
@ -1,338 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Waf utilities for easily building standard unixey packages/libraries
|
|
||||||
# Licensed under the GNU GPL v2 or later, see COPYING file for details.
|
|
||||||
# Copyright (C) 2008 Dave Robillard
|
|
||||||
# Copyright (C) 2008 Nedko Arnaudov <nedko@arnaudov.name>
|
|
||||||
|
|
||||||
import os
|
|
||||||
import misc
|
|
||||||
import Params
|
|
||||||
import Configure
|
|
||||||
import Utils
|
|
||||||
import sys
|
|
||||||
|
|
||||||
Configure.g_maxlen = 55
|
|
||||||
g_is_child = False
|
|
||||||
|
|
||||||
# Only run autowaf hooks once (even if sub projects call several times)
|
|
||||||
global g_step
|
|
||||||
g_step = 0
|
|
||||||
|
|
||||||
global g_features
|
|
||||||
|
|
||||||
def set_options(opt, docs_available = True, dev_available = True, lv2_available = True):
|
|
||||||
"Add standard autowaf options if they havn't been added yet"
|
|
||||||
global g_step
|
|
||||||
global g_features
|
|
||||||
if g_step > 0:
|
|
||||||
return
|
|
||||||
|
|
||||||
g_features = {}
|
|
||||||
g_features['docs'] = docs_available
|
|
||||||
g_features['dev'] = dev_available
|
|
||||||
g_features['lv2'] = lv2_available
|
|
||||||
|
|
||||||
opt.tool_options('compiler_cc')
|
|
||||||
opt.tool_options('compiler_cxx')
|
|
||||||
opt.add_option('--debug', action='store_true', default=False, dest='debug',
|
|
||||||
help="Build debuggable binaries [Default: False]")
|
|
||||||
opt.add_option('--strict', action='store_true', default=False, dest='strict',
|
|
||||||
help="Use strict compiler flags and show all warnings [Default: False]")
|
|
||||||
if g_features['docs']:
|
|
||||||
opt.add_option('--build-docs', action='store_true', default=False, dest='build_docs',
|
|
||||||
help="Build documentation - requires doxygen [Default: False]")
|
|
||||||
opt.add_option('--bundle', action='store_true', default=False,
|
|
||||||
help="Build a self-contained bundle [Default: False]")
|
|
||||||
opt.add_option('--bindir', type='string', help="Executable programs [Default: PREFIX/bin]")
|
|
||||||
if g_features['dev']:
|
|
||||||
opt.add_option('--libdir', type='string', help="Libraries [Default: PREFIX/lib]")
|
|
||||||
opt.add_option('--includedir', type='string', help="Header files [Default: PREFIX/include]")
|
|
||||||
opt.add_option('--datadir', type='string', help="Shared data [Default: PREFIX/share]")
|
|
||||||
if g_features['docs']:
|
|
||||||
opt.add_option('--mandir', type='string', help="Manual pages [Default: DATADIR/man]")
|
|
||||||
opt.add_option('--htmldir', type='string', help="HTML documentation [Default: DATADIR/doc/PACKAGE]")
|
|
||||||
if g_features['lv2']:
|
|
||||||
if sys.platform == "darwin":
|
|
||||||
opt.add_option('--lv2dir', type='string', help="LV2 bundles [Default: /Library/Audio/Plug-Ins/LV2]")
|
|
||||||
else:
|
|
||||||
opt.add_option('--lv2dir', type='string', help="LV2 bundles [Default: LIBDIR/lv2]")
|
|
||||||
opt.add_option('--lv2-user', action='store_true', default=False, dest='lv2_user',
|
|
||||||
help="Install LV2 bundles to user-local location [Default: False]")
|
|
||||||
g_step = 1
|
|
||||||
|
|
||||||
def check_header(conf, name, define='', **args):
|
|
||||||
"Check for a header iff it hasn't been checked for yet"
|
|
||||||
if type(conf.env['AUTOWAF_HEADERS']) != dict:
|
|
||||||
conf.env['AUTOWAF_HEADERS'] = {}
|
|
||||||
|
|
||||||
checked = conf.env['AUTOWAF_HEADERS']
|
|
||||||
if not name in checked:
|
|
||||||
conf.check_header(name, define, **args)
|
|
||||||
checked[name] = True
|
|
||||||
|
|
||||||
def check_tool(conf, name):
|
|
||||||
"Check for a tool iff it hasn't been checked for yet"
|
|
||||||
if type(conf.env['AUTOWAF_TOOLS']) != dict:
|
|
||||||
conf.env['AUTOWAF_TOOLS'] = {}
|
|
||||||
|
|
||||||
checked = conf.env['AUTOWAF_TOOLS']
|
|
||||||
if not name in checked:
|
|
||||||
conf.check_tool(name)
|
|
||||||
checked[name] = True
|
|
||||||
|
|
||||||
def check_pkg(conf, name, **args):
|
|
||||||
"Check for a package iff it hasn't been checked for yet"
|
|
||||||
if not 'HAVE_' + args['destvar'] in conf.env:
|
|
||||||
if not conf.check_pkg(name, **args):
|
|
||||||
conf.env['HAVE_' + args['destvar']] = False
|
|
||||||
else:
|
|
||||||
conf.env['HAVE_' + args['destvar']] = 1
|
|
||||||
|
|
||||||
def chop_prefix(conf, var):
|
|
||||||
name = conf.env[var][len(conf.env['PREFIX']):]
|
|
||||||
if len(name) > 0 and name[0] == '/':
|
|
||||||
name = name[1:]
|
|
||||||
if name == "":
|
|
||||||
name = "/"
|
|
||||||
return name;
|
|
||||||
|
|
||||||
def configure(conf):
|
|
||||||
global g_step
|
|
||||||
global g_features
|
|
||||||
if g_step > 1:
|
|
||||||
return
|
|
||||||
def append_cxx_flags(val):
|
|
||||||
conf.env.append_value('CCFLAGS', val)
|
|
||||||
conf.env.append_value('CXXFLAGS', val)
|
|
||||||
check_tool(conf, 'misc')
|
|
||||||
if g_features['docs']:
|
|
||||||
conf.env['BUILD_DOCS'] = Params.g_options.build_docs
|
|
||||||
else:
|
|
||||||
conf.env['BUILD_DOCS'] = False
|
|
||||||
conf.env['DEBUG'] = Params.g_options.debug
|
|
||||||
conf.env['PREFIX'] = os.path.abspath(os.path.expanduser(os.path.normpath(conf.env['PREFIX'])))
|
|
||||||
if Params.g_options.bundle:
|
|
||||||
conf.env['BUNDLE'] = True
|
|
||||||
conf.define('BUNDLE', 1)
|
|
||||||
conf.env['BINDIR'] = conf.env['PREFIX']
|
|
||||||
if g_features['dev']:
|
|
||||||
conf.env['INCLUDEDIR'] = conf.env['PREFIX'] + '/Headers/'
|
|
||||||
conf.env['LIBDIR'] = conf.env['PREFIX'] + '/Libraries/'
|
|
||||||
conf.env['DATADIR'] = conf.env['PREFIX'] + '/Resources/'
|
|
||||||
if g_features['docs']:
|
|
||||||
conf.env['HTMLDIR'] = conf.env['PREFIX'] + '/Resources/Documenation/'
|
|
||||||
conf.env['MANDIR'] = conf.env['PREFIX'] + '/Resources/Man/'
|
|
||||||
if g_features['lv2']:
|
|
||||||
conf.env['LV2DIR'] = conf.env['PREFIX'] + '/PlugIns/'
|
|
||||||
else:
|
|
||||||
conf.env['BUNDLE'] = False
|
|
||||||
if Params.g_options.bindir:
|
|
||||||
conf.env['BINDIR'] = Params.g_options.bindir
|
|
||||||
else:
|
|
||||||
conf.env['BINDIR'] = conf.env['PREFIX'] + '/bin/'
|
|
||||||
if g_features['dev']:
|
|
||||||
if Params.g_options.includedir:
|
|
||||||
conf.env['INCLUDEDIR'] = Params.g_options.includedir
|
|
||||||
else:
|
|
||||||
conf.env['INCLUDEDIR'] = conf.env['PREFIX'] + '/include/'
|
|
||||||
if Params.g_options.libdir:
|
|
||||||
conf.env['LIBDIR'] = Params.g_options.libdir
|
|
||||||
else:
|
|
||||||
conf.env['LIBDIR'] = conf.env['PREFIX'] + '/lib/'
|
|
||||||
else:
|
|
||||||
conf.env['LIBDIR'] = conf.env['PREFIX'] + '/lib/'
|
|
||||||
if Params.g_options.datadir:
|
|
||||||
conf.env['DATADIR'] = Params.g_options.datadir
|
|
||||||
else:
|
|
||||||
conf.env['DATADIR'] = conf.env['PREFIX'] + '/share/'
|
|
||||||
if g_features['docs']:
|
|
||||||
if Params.g_options.htmldir:
|
|
||||||
conf.env['HTMLDIR'] = Params.g_options.htmldir
|
|
||||||
else:
|
|
||||||
conf.env['HTMLDIR'] = conf.env['DATADIR'] + 'doc/' + Utils.g_module.APPNAME + '/'
|
|
||||||
if Params.g_options.mandir:
|
|
||||||
conf.env['MANDIR'] = Params.g_options.mandir
|
|
||||||
else:
|
|
||||||
conf.env['MANDIR'] = conf.env['DATADIR'] + 'man/'
|
|
||||||
if g_features['lv2']:
|
|
||||||
if Params.g_options.lv2dir:
|
|
||||||
conf.env['LV2DIR'] = Params.g_options.lv2dir
|
|
||||||
else:
|
|
||||||
if Params.g_options.lv2_user:
|
|
||||||
if sys.platform == "darwin":
|
|
||||||
conf.env['LV2DIR'] = os.getenv('HOME') + '/Library/Audio/Plug-Ins/LV2'
|
|
||||||
else:
|
|
||||||
conf.env['LV2DIR'] = os.getenv('HOME') + '/.lv2'
|
|
||||||
else:
|
|
||||||
if sys.platform == "darwin":
|
|
||||||
conf.env['LV2DIR'] = '/Library/Audio/Plug-Ins/LV2'
|
|
||||||
else:
|
|
||||||
conf.env['LV2DIR'] = conf.env['LIBDIR'] + 'lv2/'
|
|
||||||
|
|
||||||
conf.env['BINDIRNAME'] = chop_prefix(conf, 'BINDIR')
|
|
||||||
conf.env['LIBDIRNAME'] = chop_prefix(conf, 'LIBDIR')
|
|
||||||
conf.env['DATADIRNAME'] = chop_prefix(conf, 'DATADIR')
|
|
||||||
if g_features['lv2']:
|
|
||||||
conf.env['LV2DIRNAME'] = chop_prefix(conf, 'LV2DIR')
|
|
||||||
|
|
||||||
if Params.g_options.debug:
|
|
||||||
conf.env['CCFLAGS'] = '-O0 -g -std=c99'
|
|
||||||
conf.env['CXXFLAGS'] = '-O0 -g -ansi'
|
|
||||||
if Params.g_options.strict:
|
|
||||||
conf.env['CCFLAGS'] = '-O0 -g -std=c99 -pedantic'
|
|
||||||
append_cxx_flags('-Wall -Wextra -Wno-unused-parameter')
|
|
||||||
append_cxx_flags('-fPIC -DPIC')
|
|
||||||
g_step = 2
|
|
||||||
|
|
||||||
def set_local_lib(conf, name, has_objects):
|
|
||||||
conf.define('HAVE_' + name.upper(), True)
|
|
||||||
if has_objects:
|
|
||||||
if type(conf.env['AUTOWAF_LOCAL_LIBS']) != dict:
|
|
||||||
conf.env['AUTOWAF_LOCAL_LIBS'] = {}
|
|
||||||
conf.env['AUTOWAF_LOCAL_LIBS'][name.lower()] = True
|
|
||||||
else:
|
|
||||||
if type(conf.env['AUTOWAF_LOCAL_HEADERS']) != dict:
|
|
||||||
conf.env['AUTOWAF_LOCAL_HEADERS'] = {}
|
|
||||||
conf.env['AUTOWAF_LOCAL_HEADERS'][name.lower()] = True
|
|
||||||
|
|
||||||
def use_lib(bld, obj, libs):
|
|
||||||
abssrcdir = os.path.abspath('.')
|
|
||||||
libs_list = libs.split()
|
|
||||||
for l in libs_list:
|
|
||||||
in_headers = l.lower() in bld.env()['AUTOWAF_LOCAL_HEADERS']
|
|
||||||
in_libs = l.lower() in bld.env()['AUTOWAF_LOCAL_LIBS']
|
|
||||||
if in_libs:
|
|
||||||
obj.uselib_local += ' lib' + l.lower() + ' '
|
|
||||||
|
|
||||||
if in_headers or in_libs:
|
|
||||||
inc_flag = '-iquote ' + abssrcdir + '/' + l.lower()
|
|
||||||
for f in ['CCFLAGS', 'CXXFLAGS']:
|
|
||||||
if not inc_flag in bld.env()[f]:
|
|
||||||
bld.env().prepend_value(f, inc_flag)
|
|
||||||
else:
|
|
||||||
obj.uselib += ' ' + l
|
|
||||||
|
|
||||||
|
|
||||||
def display_header(title):
|
|
||||||
Params.pprint('BOLD', title)
|
|
||||||
|
|
||||||
def display_msg(msg, status = None, color = None):
|
|
||||||
Configure.g_maxlen = max(Configure.g_maxlen, len(msg))
|
|
||||||
if status:
|
|
||||||
print "%s :" % msg.ljust(Configure.g_maxlen),
|
|
||||||
Params.pprint(color, status)
|
|
||||||
else:
|
|
||||||
print "%s" % msg.ljust(Configure.g_maxlen)
|
|
||||||
|
|
||||||
def display_feature(msg, build):
|
|
||||||
if build:
|
|
||||||
display_msg(msg, "yes", 'GREEN')
|
|
||||||
else:
|
|
||||||
display_msg(msg, "no", 'YELLOW')
|
|
||||||
|
|
||||||
def print_summary(conf):
|
|
||||||
global g_step
|
|
||||||
global g_features
|
|
||||||
if g_step > 2:
|
|
||||||
print
|
|
||||||
return
|
|
||||||
e = conf.env
|
|
||||||
print
|
|
||||||
display_header('Global configuration')
|
|
||||||
display_msg("Install prefix", conf.env['PREFIX'], 'CYAN')
|
|
||||||
display_msg("Debuggable build", str(conf.env['DEBUG']), 'YELLOW')
|
|
||||||
if g_features['docs']:
|
|
||||||
display_msg("Build documentation", str(conf.env['BUILD_DOCS']), 'YELLOW')
|
|
||||||
print
|
|
||||||
g_step = 3
|
|
||||||
|
|
||||||
def link_flags(env, lib):
|
|
||||||
return ' '.join(map(lambda x: env['LIB_ST'] % x, env['LIB_' + lib]))
|
|
||||||
|
|
||||||
def compile_flags(env, lib):
|
|
||||||
return ' '.join(map(lambda x: env['CPPPATH_ST'] % x, env['CPPPATH_' + lib]))
|
|
||||||
|
|
||||||
def set_recursive():
|
|
||||||
global g_is_child
|
|
||||||
g_is_child = True
|
|
||||||
|
|
||||||
def is_child():
|
|
||||||
global g_is_child
|
|
||||||
return g_is_child
|
|
||||||
|
|
||||||
# Pkg-config file
|
|
||||||
def build_pc(bld, name, version, libs):
|
|
||||||
'''Build a pkg-config file for a library.
|
|
||||||
name -- uppercase variable name (e.g. 'SOMENAME')
|
|
||||||
version -- version string (e.g. '1.2.3')
|
|
||||||
libs -- string/list of dependencies (e.g. 'LIBFOO GLIB')
|
|
||||||
'''
|
|
||||||
|
|
||||||
obj = bld.create_obj('subst')
|
|
||||||
obj.source = name.lower() + '.pc.in'
|
|
||||||
obj.target = name.lower() + '.pc'
|
|
||||||
obj.inst_var = 'PREFIX'
|
|
||||||
obj.inst_dir = bld.env()['LIBDIRNAME'] + 'pkgconfig'
|
|
||||||
pkg_prefix = bld.env()['PREFIX']
|
|
||||||
if pkg_prefix[-1] == '/':
|
|
||||||
pkg_prefix = pkg_prefix[:-1]
|
|
||||||
obj.dict = {
|
|
||||||
'prefix' : pkg_prefix,
|
|
||||||
'exec_prefix' : '${prefix}',
|
|
||||||
'libdir' : '${exec_prefix}/lib',
|
|
||||||
'includedir' : '${prefix}/include',
|
|
||||||
name + '_VERSION' : version,
|
|
||||||
}
|
|
||||||
if type(libs) != list:
|
|
||||||
libs = libs.split()
|
|
||||||
for i in libs:
|
|
||||||
obj.dict[i + '_LIBS'] = link_flags(bld.env(), i)
|
|
||||||
obj.dict[i + '_CFLAGS'] = compile_flags(bld.env(), i)
|
|
||||||
|
|
||||||
# Wrapper script (for bundle)
|
|
||||||
def build_wrapper(bld, template, prog):
|
|
||||||
if not bld.env()['BUNDLE']:
|
|
||||||
return
|
|
||||||
obj = bld.create_obj('subst')
|
|
||||||
obj.chmod = 0755
|
|
||||||
obj.source = template
|
|
||||||
obj.inst_var = 'PREFIX'
|
|
||||||
obj.inst_dir = '/'
|
|
||||||
obj.dict = {
|
|
||||||
'EXECUTABLE' : prog.target + ".bin",
|
|
||||||
'LIB_DIR_NAME' : bld.env()['LIBDIRNAME']
|
|
||||||
}
|
|
||||||
prog.target = prog.target + '.bin'
|
|
||||||
|
|
||||||
# Doxygen API documentation
|
|
||||||
def build_dox(bld, name, version, srcdir, blddir):
|
|
||||||
if not bld.env()['BUILD_DOCS']:
|
|
||||||
return
|
|
||||||
obj = bld.create_obj('subst')
|
|
||||||
obj.source = 'doc/reference.doxygen.in'
|
|
||||||
obj.target = 'doc/reference.doxygen'
|
|
||||||
if is_child():
|
|
||||||
src_dir = srcdir + '/' + name.lower()
|
|
||||||
doc_dir = blddir + '/default/' + name.lower() + '/doc'
|
|
||||||
else:
|
|
||||||
src_dir = srcdir
|
|
||||||
doc_dir = blddir + '/default/doc'
|
|
||||||
obj.dict = {
|
|
||||||
name + '_VERSION' : version,
|
|
||||||
name + '_SRCDIR' : os.path.abspath(src_dir),
|
|
||||||
name + '_DOC_DIR' : os.path.abspath(doc_dir)
|
|
||||||
}
|
|
||||||
obj.inst_var = 0
|
|
||||||
out1 = bld.create_obj('command-output')
|
|
||||||
out1.stdout = '/doc/doxygen.out'
|
|
||||||
out1.stdin = '/doc/reference.doxygen' # whatever..
|
|
||||||
out1.command = 'doxygen'
|
|
||||||
out1.argv = [os.path.abspath(doc_dir) + '/reference.doxygen']
|
|
||||||
out1.command_is_external = True
|
|
||||||
|
|
||||||
def shutdown():
|
|
||||||
# This isn't really correct (for packaging), but people asking is annoying
|
|
||||||
if Params.g_commands['install']:
|
|
||||||
try: os.popen("/sbin/ldconfig")
|
|
||||||
except: pass
|
|
||||||
|
|
131
gladish/wscript
|
@ -1,131 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# Licensed under the GNU GPL v2 or later, see COPYING file for details.
|
|
||||||
# Copyright (C) 2008 Dave Robillard
|
|
||||||
# Copyright (C) 2008 Nedko Arnaudov <nedko@arnaudov.name>
|
|
||||||
import os
|
|
||||||
import Params
|
|
||||||
import autowaf
|
|
||||||
|
|
||||||
# Version of this package (even if built as a child)
|
|
||||||
PATCHAGE_VERSION = '5'
|
|
||||||
|
|
||||||
# Variables for 'waf dist'
|
|
||||||
APPNAME = 'lpatchage'
|
|
||||||
VERSION = PATCHAGE_VERSION
|
|
||||||
APP_HUMAN_NAME = 'LADI Patchage'
|
|
||||||
|
|
||||||
# Mandatory variables
|
|
||||||
srcdir = '.'
|
|
||||||
blddir = 'build'
|
|
||||||
|
|
||||||
def set_options(opt):
|
|
||||||
autowaf.set_options(opt, False, False, False)
|
|
||||||
opt.add_option('--install-name', type='string', default=APPNAME, dest='app_install_name', help="Install name. [Default: '" + APPNAME + "']")
|
|
||||||
opt.add_option('--app-human-name', type='string', default=APP_HUMAN_NAME, dest='app_human_name', help="Human name for app. [Default: '" + APP_HUMAN_NAME + "']")
|
|
||||||
|
|
||||||
def configure(conf):
|
|
||||||
autowaf.configure(conf)
|
|
||||||
autowaf.check_tool(conf, 'compiler_cxx')
|
|
||||||
autowaf.check_tool(conf, 'compiler_cc')
|
|
||||||
|
|
||||||
conf.check_tool('misc') # subst tool
|
|
||||||
|
|
||||||
conf.check_pkg('dbus-1', mandatory=True)
|
|
||||||
conf.check_pkg('dbus-glib-1', mandatory=True)
|
|
||||||
conf.check_pkg('glibmm-2.4', mandatory=True)
|
|
||||||
conf.check_pkg('gtkmm-2.4', mandatory=True, vnum='2.11.12')
|
|
||||||
conf.check_pkg('libgnomecanvasmm-2.6', mandatory=True)
|
|
||||||
conf.check_pkg('libglademm-2.4', mandatory=True)
|
|
||||||
|
|
||||||
# You need the boost headers package (e.g. libboost-dev)
|
|
||||||
conf.check_header('boost/shared_ptr.hpp', mandatory=True)
|
|
||||||
conf.check_header('boost/weak_ptr.hpp', mandatory=True)
|
|
||||||
|
|
||||||
conf.check_pkg('flowcanvas', mandatory=True, vnum='0.4.0')
|
|
||||||
|
|
||||||
conf.define('PATCHAGE_APPNAME', APPNAME)
|
|
||||||
conf.env['PATCHAGE_VERSION'] = PATCHAGE_VERSION
|
|
||||||
conf.env['APP_INSTALL_NAME'] = Params.g_options.app_install_name
|
|
||||||
conf.env['APP_HUMAN_NAME'] = Params.g_options.app_human_name
|
|
||||||
if conf.env['BUNDLE']:
|
|
||||||
conf.define('PATCHAGE_DATA_DIR', os.path.normpath(
|
|
||||||
conf.env['DATADIRNAME'] + conf.env['APP_INSTALL_NAME']))
|
|
||||||
else:
|
|
||||||
conf.define('PATCHAGE_DATA_DIR', os.path.normpath(
|
|
||||||
conf.env['DATADIR'] + conf.env['APP_INSTALL_NAME']))
|
|
||||||
|
|
||||||
conf.write_config_header('config.h')
|
|
||||||
|
|
||||||
print
|
|
||||||
autowaf.display_msg("Install prefix", conf.env['PREFIX'], 'CYAN')
|
|
||||||
autowaf.display_msg("Install name", "'" + conf.env['APP_INSTALL_NAME'] + "'", 'CYAN')
|
|
||||||
autowaf.display_msg("App human name", "'" + conf.env['APP_HUMAN_NAME'] + "'", 'CYAN')
|
|
||||||
print
|
|
||||||
|
|
||||||
def build(bld):
|
|
||||||
# Program
|
|
||||||
prog = bld.create_obj('cpp', 'program')
|
|
||||||
prog.includes = 'src' # make waf dependency tracking work
|
|
||||||
prog.target = bld.env()['APP_INSTALL_NAME']
|
|
||||||
prog.inst_dir = bld.env()['BINDIRNAME']
|
|
||||||
prog.uselib = 'DBUS-1 LIBGNOMECANVASMM-2.6 LIBGLADEMM-2.4 FLOWCANVAS DBUS-GLIB-1'
|
|
||||||
prog.source = [
|
|
||||||
'src/main.cpp',
|
|
||||||
'src/Patchage.cpp',
|
|
||||||
'src/PatchageCanvas.cpp',
|
|
||||||
'src/StateManager.cpp',
|
|
||||||
'src/jack_proxy.cpp',
|
|
||||||
'src/lash_client.cpp',
|
|
||||||
'src/lash_proxy.cpp',
|
|
||||||
'src/load_projects_dialog.cpp',
|
|
||||||
'src/project.cpp',
|
|
||||||
'src/project_list.cpp',
|
|
||||||
'src/project_properties.cpp',
|
|
||||||
'src/session.cpp',
|
|
||||||
'src/a2j_proxy.cpp',
|
|
||||||
'src/dbus_helpers.c'
|
|
||||||
]
|
|
||||||
|
|
||||||
# Executable wrapper script (if building a bundle)
|
|
||||||
autowaf.build_wrapper(bld, 'patchage.in', prog)
|
|
||||||
|
|
||||||
# Glade UI definitions (XML)
|
|
||||||
install_files('DATADIR', bld.env()['APP_INSTALL_NAME'], 'src/patchage.glade')
|
|
||||||
|
|
||||||
# 'Desktop' file (menu entry, icon, etc)
|
|
||||||
obj = bld.create_obj('subst')
|
|
||||||
obj.source = 'patchage.desktop.in'
|
|
||||||
obj.target = 'patchage.desktop'
|
|
||||||
obj.dict = {
|
|
||||||
'BINDIR' : bld.env()['BINDIR'],
|
|
||||||
'APP_INSTALL_NAME' : bld.env()['APP_INSTALL_NAME'],
|
|
||||||
'APP_HUMAN_NAME' : bld.env()['APP_HUMAN_NAME'],
|
|
||||||
}
|
|
||||||
install_as(os.path.normpath(bld.env()['DATADIR'] + 'applications/'), bld.env()['APP_INSTALL_NAME'] + '.desktop', 'build/default/patchage.desktop')
|
|
||||||
|
|
||||||
# Icons
|
|
||||||
#
|
|
||||||
# Installation layout (with /usr prefix)
|
|
||||||
# /usr/bin/patchage
|
|
||||||
# /usr/share/applications/patchage.desktop
|
|
||||||
# /usr/share/icons/hicolor/16x16/apps/patchage.png
|
|
||||||
# /usr/share/icons/hicolor/22x22/apps/patchage.png
|
|
||||||
# /usr/share/icons/hicolor/24x24/apps/patchage.png
|
|
||||||
# /usr/share/icons/hicolor/32x32/apps/patchage.png
|
|
||||||
# /usr/share/icons/hicolor/48x48/apps/patchage.png
|
|
||||||
# /usr/share/icons/hicolor/scalable/apps/patchage.svg
|
|
||||||
# /usr/share/patchage/patchage.glade
|
|
||||||
#
|
|
||||||
# icon cache is updated using:
|
|
||||||
# gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
|
||||||
|
|
||||||
# Dave disabled this, ask why before removing this
|
|
||||||
#install_as(os.path.normpath(bld.env()['PREFIX'] + '/share/icons/hicolor/scalable/apps/'), bld.env()['APP_INSTALL_NAME'] + '.svg', 'icons/scalable/patchage.svg')
|
|
||||||
|
|
||||||
icon_sizes = ['16x16', '22x22', '24x24', '32x32', '48x48']
|
|
||||||
for icon_size in icon_sizes:
|
|
||||||
install_as(os.path.normpath(bld.env()['DATADIR'] + '/icons/hicolor/' + icon_size + '/apps/'), bld.env()['APP_INSTALL_NAME'] + '.png', 'icons/' + icon_size + '/patchage.png')
|
|
||||||
|
|
||||||
def shutdown():
|
|
||||||
autowaf.shutdown()
|
|
||||||
|
|
Before Width: | Height: | Size: 811 B After Width: | Height: | Size: 811 B |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
117
wscript
|
@ -28,17 +28,19 @@ def display_line(conf, text, color = 'NORMAL'):
|
||||||
|
|
||||||
def set_options(opt):
|
def set_options(opt):
|
||||||
opt.tool_options('compiler_cc')
|
opt.tool_options('compiler_cc')
|
||||||
|
opt.tool_options('compiler_cxx')
|
||||||
opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
|
opt.add_option('--enable-pkg-config-dbus-service-dir', action='store_true', default=False, help='force D-Bus service install dir to be one returned by pkg-config')
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.check_tool('compiler_cc')
|
conf.check_tool('compiler_cc')
|
||||||
|
conf.check_tool('compiler_cxx')
|
||||||
|
|
||||||
conf.check_cfg(
|
conf.check_cfg(
|
||||||
package = 'dbus-1',
|
package = 'dbus-1',
|
||||||
atleast_version = '1.0.0',
|
atleast_version = '1.0.0',
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
errmsg = "not installed, see http://dbus.freedesktop.org/",
|
errmsg = "not installed, see http://dbus.freedesktop.org/",
|
||||||
args='--cflags --libs')
|
args = '--cflags --libs')
|
||||||
|
|
||||||
dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir', msg="Retrieving D-Bus services dir")
|
dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir', msg="Retrieving D-Bus services dir")
|
||||||
if not dbus_dir:
|
if not dbus_dir:
|
||||||
|
@ -56,14 +58,61 @@ def configure(conf):
|
||||||
package = 'uuid',
|
package = 'uuid',
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
errmsg = "not installed, see http://e2fsprogs.sourceforge.net/",
|
errmsg = "not installed, see http://e2fsprogs.sourceforge.net/",
|
||||||
args='--cflags --libs')
|
args = '--cflags --libs')
|
||||||
|
|
||||||
conf.check_cfg(
|
conf.check_cfg(
|
||||||
package = 'libxml-2.0',
|
package = 'libxml-2.0',
|
||||||
atleast_version = '2.0.0',
|
atleast_version = '2.0.0',
|
||||||
mandatory = True,
|
mandatory = True,
|
||||||
errmsg = "not installed, see http://xmlsoft.org/",
|
errmsg = "not installed, see http://xmlsoft.org/",
|
||||||
args='--cflags --libs')
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
conf.check_cfg(
|
||||||
|
package = 'dbus-glib-1',
|
||||||
|
mandatory = True,
|
||||||
|
errmsg = "not installed, see http://dbus.freedesktop.org/",
|
||||||
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
conf.check_cfg(
|
||||||
|
package = 'glibmm-2.4',
|
||||||
|
mandatory = True,
|
||||||
|
errmsg = "not installed, see http://www.gtkmm.org/",
|
||||||
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
conf.check_cfg(
|
||||||
|
package = 'gtkmm-2.4',
|
||||||
|
mandatory = True,
|
||||||
|
atleast_version = '2.11.12',
|
||||||
|
errmsg = "not installed, see http://www.gtkmm.org/",
|
||||||
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
conf.check_cfg(
|
||||||
|
package = 'libgnomecanvasmm-2.6',
|
||||||
|
mandatory = True,
|
||||||
|
errmsg = "not installed, see http://www.gtkmm.org/",
|
||||||
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
conf.check_cfg(
|
||||||
|
package = 'libglademm-2.4',
|
||||||
|
mandatory = True,
|
||||||
|
errmsg = "not installed, see http://www.gtkmm.org/",
|
||||||
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
conf.check_cfg(
|
||||||
|
package = 'flowcanvas',
|
||||||
|
mandatory = True,
|
||||||
|
atleast_version = '0.4.0',
|
||||||
|
errmsg = "not installed, see http://drobilla.net/software/flowcanvas/",
|
||||||
|
args = '--cflags --libs')
|
||||||
|
|
||||||
|
# We need the boost headers package (e.g. libboost-dev)
|
||||||
|
# shared_ptr.hpp and weak_ptr.hpp
|
||||||
|
conf.check_tool('boost')
|
||||||
|
conf.check_boost()
|
||||||
|
|
||||||
|
conf.define('PATCHAGE_APPNAME', "gladish")
|
||||||
|
conf.env['PATCHAGE_VERSION'] = VERSION
|
||||||
|
conf.define('PATCHAGE_DATA_DIR', os.path.normpath(os.path.join(conf.env['PREFIX'], 'share', "gladish")))
|
||||||
|
|
||||||
conf.define('DEFAULT_PROJECT_DIR', "audio-projects")
|
conf.define('DEFAULT_PROJECT_DIR', "audio-projects")
|
||||||
conf.define('PACKAGE_VERSION', VERSION)
|
conf.define('PACKAGE_VERSION', VERSION)
|
||||||
|
@ -200,6 +249,68 @@ def build(bld):
|
||||||
# lash_wrap.c lash.py: lash.i lash.h
|
# lash_wrap.c lash.py: lash.i lash.h
|
||||||
# swig -o lash_wrap.c -I$(top_srcdir) -python $(top_srcdir)/$(subdir)/lash.i
|
# swig -o lash_wrap.c -I$(top_srcdir) -python $(top_srcdir)/$(subdir)/lash.i
|
||||||
|
|
||||||
|
#####################################################
|
||||||
|
# gladish
|
||||||
|
gladish = bld.new_task_gen('cxx', 'program')
|
||||||
|
gladish.target = 'gladish'
|
||||||
|
gladish.includes = "build/default" # XXX config.h version.h and other generated files
|
||||||
|
gladish.uselib = 'DBUS-1 LIBGNOMECANVASMM-2.6 LIBGLADEMM-2.4 FLOWCANVAS DBUS-GLIB-1'
|
||||||
|
gladish.source = []
|
||||||
|
for source in [
|
||||||
|
'main.cpp',
|
||||||
|
'Patchage.cpp',
|
||||||
|
'PatchageCanvas.cpp',
|
||||||
|
'StateManager.cpp',
|
||||||
|
'jack_proxy.cpp',
|
||||||
|
'lash_client.cpp',
|
||||||
|
'lash_proxy.cpp',
|
||||||
|
'load_projects_dialog.cpp',
|
||||||
|
'project.cpp',
|
||||||
|
'project_list.cpp',
|
||||||
|
'project_properties.cpp',
|
||||||
|
'session.cpp',
|
||||||
|
'a2j_proxy.cpp',
|
||||||
|
'dbus_helpers.c',
|
||||||
|
]:
|
||||||
|
gladish.source.append(os.path.join("gui", source))
|
||||||
|
|
||||||
|
# Glade UI definitions (XML)
|
||||||
|
#install_files('DATADIR', bld.env()['APP_INSTALL_NAME'], 'src/patchage.glade')
|
||||||
|
|
||||||
|
# 'Desktop' file (menu entry, icon, etc)
|
||||||
|
#obj = bld.create_obj('subst')
|
||||||
|
#obj.source = 'patchage.desktop.in'
|
||||||
|
#obj.target = 'patchage.desktop'
|
||||||
|
#obj.dict = {
|
||||||
|
# 'BINDIR' : bld.env()['BINDIR'],
|
||||||
|
# 'APP_INSTALL_NAME' : bld.env()['APP_INSTALL_NAME'],
|
||||||
|
# 'APP_HUMAN_NAME' : bld.env()['APP_HUMAN_NAME'],
|
||||||
|
#}
|
||||||
|
#install_as(os.path.normpath(bld.env()['DATADIR'] + 'applications/'), bld.env()['APP_INSTALL_NAME'] + '.desktop', 'build/default/patchage.desktop')
|
||||||
|
|
||||||
|
# Icons
|
||||||
|
#
|
||||||
|
# Installation layout (with /usr prefix)
|
||||||
|
# /usr/bin/patchage
|
||||||
|
# /usr/share/applications/patchage.desktop
|
||||||
|
# /usr/share/icons/hicolor/16x16/apps/patchage.png
|
||||||
|
# /usr/share/icons/hicolor/22x22/apps/patchage.png
|
||||||
|
# /usr/share/icons/hicolor/24x24/apps/patchage.png
|
||||||
|
# /usr/share/icons/hicolor/32x32/apps/patchage.png
|
||||||
|
# /usr/share/icons/hicolor/48x48/apps/patchage.png
|
||||||
|
# /usr/share/icons/hicolor/scalable/apps/patchage.svg
|
||||||
|
# /usr/share/patchage/patchage.glade
|
||||||
|
#
|
||||||
|
# icon cache is updated using:
|
||||||
|
# gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
|
||||||
|
|
||||||
|
# Dave disabled this, ask why before removing this
|
||||||
|
#install_as(os.path.normpath(bld.env()['PREFIX'] + '/share/icons/hicolor/scalable/apps/'), bld.env()['APP_INSTALL_NAME'] + '.svg', 'icons/scalable/patchage.svg')
|
||||||
|
|
||||||
|
#icon_sizes = ['16x16', '22x22', '24x24', '32x32', '48x48']
|
||||||
|
#for icon_size in icon_sizes:
|
||||||
|
# install_as(os.path.normpath(bld.env()['DATADIR'] + '/icons/hicolor/' + icon_size + '/apps/'), bld.env()['APP_INSTALL_NAME'] + '.png', 'icons/' + icon_size + '/patchage.png')
|
||||||
|
|
||||||
def dist_hook():
|
def dist_hook():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|