Browse Source

Remove individual extension pkg-config files and build scripts.

zrythm_meson
David Robillard 11 years ago
parent
commit
baed7d9386
  1. 4
      COPYING
  2. 6
      ext.pc.in
  3. 199
      ext.wscript
  4. 1
      lv2/lv2plug.in/ns/ext/atom/ext.pc.in
  5. 1
      lv2/lv2plug.in/ns/ext/atom/waf
  6. 1
      lv2/lv2plug.in/ns/ext/cv-port/ext.pc.in
  7. 1
      lv2/lv2plug.in/ns/ext/cv-port/waf
  8. 1
      lv2/lv2plug.in/ns/ext/data-access/ext.pc.in
  9. 1
      lv2/lv2plug.in/ns/ext/data-access/waf
  10. 1
      lv2/lv2plug.in/ns/ext/dynmanifest/ext.pc.in
  11. 1
      lv2/lv2plug.in/ns/ext/dynmanifest/waf
  12. 1
      lv2/lv2plug.in/ns/ext/event/ext.pc.in
  13. 1
      lv2/lv2plug.in/ns/ext/event/waf
  14. 1
      lv2/lv2plug.in/ns/ext/host-info/ext.pc.in
  15. 1
      lv2/lv2plug.in/ns/ext/host-info/waf
  16. 1
      lv2/lv2plug.in/ns/ext/instance-access/ext.pc.in
  17. 1
      lv2/lv2plug.in/ns/ext/instance-access/waf
  18. 1
      lv2/lv2plug.in/ns/ext/log/ext.pc.in
  19. 1
      lv2/lv2plug.in/ns/ext/log/waf
  20. 1
      lv2/lv2plug.in/ns/ext/midi/ext.pc.in
  21. 1
      lv2/lv2plug.in/ns/ext/midi/waf
  22. 1
      lv2/lv2plug.in/ns/ext/parameters/ext.pc.in
  23. 1
      lv2/lv2plug.in/ns/ext/parameters/waf
  24. 1
      lv2/lv2plug.in/ns/ext/patch/ext.pc.in
  25. 1
      lv2/lv2plug.in/ns/ext/patch/waf
  26. 1
      lv2/lv2plug.in/ns/ext/port-groups/ext.pc.in
  27. 1
      lv2/lv2plug.in/ns/ext/port-groups/waf
  28. 1
      lv2/lv2plug.in/ns/ext/port-props/ext.pc.in
  29. 1
      lv2/lv2plug.in/ns/ext/port-props/waf
  30. 1
      lv2/lv2plug.in/ns/ext/presets/ext.pc.in
  31. 1
      lv2/lv2plug.in/ns/ext/presets/waf
  32. 1
      lv2/lv2plug.in/ns/ext/resize-port/ext.pc.in
  33. 1
      lv2/lv2plug.in/ns/ext/resize-port/waf
  34. 1
      lv2/lv2plug.in/ns/ext/state/ext.pc.in
  35. 1
      lv2/lv2plug.in/ns/ext/state/waf
  36. 1
      lv2/lv2plug.in/ns/ext/time/ext.pc.in
  37. 1
      lv2/lv2plug.in/ns/ext/time/waf
  38. 1
      lv2/lv2plug.in/ns/ext/uri-map/ext.pc.in
  39. 1
      lv2/lv2plug.in/ns/ext/uri-map/waf
  40. 1
      lv2/lv2plug.in/ns/ext/urid/ext.pc.in
  41. 1
      lv2/lv2plug.in/ns/ext/urid/waf
  42. 1
      lv2/lv2plug.in/ns/ext/worker/ext.pc.in
  43. 1
      lv2/lv2plug.in/ns/ext/worker/waf
  44. 1
      lv2/lv2plug.in/ns/extensions/ui/ext.pc.in
  45. 1
      lv2/lv2plug.in/ns/extensions/ui/waf
  46. 1
      lv2/lv2plug.in/ns/extensions/units/ext.pc.in
  47. 1
      lv2/lv2plug.in/ns/extensions/units/waf
  48. 13
      lv2/lv2plug.in/ns/lv2core/AUTHORS
  49. 41
      lv2/lv2plug.in/ns/lv2core/INSTALL
  50. 1
      lv2/lv2plug.in/ns/people/ext.pc.in
  51. 1
      lv2/lv2plug.in/ns/people/waf
  52. BIN
      waf
  53. 57
      wscript

4
lv2/lv2plug.in/ns/lv2core/COPYING → COPYING

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
Copyright 2006-2011 Steve Harris, David Robillard.
Copyright 2006-2012 Steve Harris, David Robillard.
Based on LADSPA, Copyright 2000-2002 Richard W.E. Furse,
Paul Barton-Davis, Stefan Westerfeld.
@ -13,4 +13,4 @@ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR @@ -13,4 +13,4 @@ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

6
ext.pc.in

@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
includedir=@INCLUDEDIR@
Name: LV2 @NAME@
Version: @VERSION@
Description: @DESCRIPTION@
Cflags: -I${includedir}

199
ext.wscript

@ -2,16 +2,8 @@ @@ -2,16 +2,8 @@
import glob
import os
import shutil
import sys
from waflib.extras import autowaf as autowaf
from waflib.TaskGen import feature, before
import waflib.Scripting as Scripting
import waflib.Logs as Logs
import waflib.Options as Options
import waflib.Context as Context
import waflib.Utils as Utils
info = None
from waflib.extras import autowaf as autowaf
# A rule for making a link in the build directory to a source file
def link(task):
@ -26,50 +18,8 @@ def link(task): @@ -26,50 +18,8 @@ def link(task):
func(task.inputs[0].abspath(), task.outputs[0].abspath())
try:
# Read version information from lv2extinfo.py (in a release tarball)
import lv2extinfo
info = lv2extinfo
except:
# Read version information from RDF files
try:
import rdflib
doap = rdflib.Namespace('http://usefulinc.com/ns/doap#')
rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#')
lv2 = rdflib.Namespace('http://lv2plug.in/ns/lv2core#')
dir = sys.path[0]
m = rdflib.ConjunctiveGraph()
for i in glob.glob(os.path.join(dir, '*.ttl')):
m.parse(i, format='n3')
spec = m.value(None, rdf.type, lv2.Specification)
name = os.path.basename(spec.replace('http://', ''))
info = type('lv2extinfo', (object,), {
'NAME' : str(name),
'MINOR' : int(m.value(spec, lv2.minorVersion, None)),
'MICRO' : int(m.value(spec, lv2.microVersion, None)),
'URI' : str(spec),
'PKGNAME' : str('lv2-' + spec.replace('http://', '').replace('/', '-')),
'SHORTDESC' : str(m.value(spec, doap.shortdesc, None))})
except:
e = sys.exc_info()[1]
Logs.error('Error reading version information: ' + str(e))
if not info:
Logs.error("Failed to find version information from lv2extinfo.py or RDF")
sys.exit(1)
# Variables for 'waf dist'
APPNAME = 'lv2-' + info.NAME
VERSION = '%d.%d' % (info.MINOR, info.MICRO)
# Mandatory variables
top = '.'
out = 'build'
def configure(conf):
pass
def options(opt):
opt.load('compiler_c')
@ -80,143 +30,68 @@ def options(opt): @@ -80,143 +30,68 @@ def options(opt):
dest='copy_headers',
help='Copy headers instead of linking to bundle')
def configure(conf):
try:
conf.load('compiler_c')
except:
Options.options.build_tests = False
conf.env['BUILD_TESTS'] = Options.options.build_tests
conf.env['COPY_HEADERS'] = Options.options.copy_headers
if not hasattr(os.path, 'relpath') and not Options.options.copy_headers:
conf.fatal(
'os.path.relpath missing, get Python 2.6 or use --copy-headers')
# Check for gcov library (for test coverage)
if conf.env['BUILD_TESTS'] and not conf.is_defined('HAVE_GCOV'):
if conf.env['MSVC_COMPILER']:
conf.env.append_unique('CFLAGS', ['-TP', '-MD'])
else:
conf.env.append_unique('CFLAGS', '-std=c99')
conf.check_cc(lib='gcov', define_name='HAVE_GCOV', mandatory=False)
autowaf.configure(conf)
autowaf.display_header('LV2 %s Configuration' % info.NAME)
autowaf.display_msg(conf, 'LV2 bundle directory', conf.env['LV2DIR'])
autowaf.display_msg(conf, 'URI', info.URI)
autowaf.display_msg(conf, 'Version', VERSION)
autowaf.display_msg(conf, 'Pkgconfig name', info.PKGNAME)
print('')
def build(bld):
uri = info.URI
include_base = os.path.dirname(uri[uri.find('://') + 3:])
bundle_dir = os.path.join(bld.env['LV2DIR'], info.NAME + '.lv2')
include_dir = os.path.join(bld.env['INCLUDEDIR'], 'lv2', include_base)
# Pkgconfig file
obj = bld(features = 'subst',
source = 'ext.pc.in',
target = info.PKGNAME + '.pc',
install_path = '${LIBDIR}/pkgconfig',
INCLUDEDIR = bld.env['INCLUDEDIR'],
INCLUDE_PATH = uri.replace('http://', 'lv2/'),
NAME = info.NAME,
VERSION = VERSION,
DESCRIPTION = info.SHORTDESC)
if bld.env['BUILD_TESTS'] and bld.path.find_node('%s-test.c' % info.NAME):
path = bld.path.srcpath()[len('lv2/'):]
name = os.path.basename(path)
bundle_dir = os.path.join(bld.env['LV2DIR'], name + '.lv2')
include_dir = os.path.join(bld.env['INCLUDEDIR'], 'lv2', path)
# Copy headers to URI-style include paths in build directory
for i in bld.path.ant_glob('*.h'):
obj = bld(rule = link,
name = 'link',
cwd = 'build/lv2/%s' % path,
source = '%s' % i,
target = 'lv2/%s/%s' % (path, i))
if bld.env['BUILD_TESTS'] and bld.path.find_node('%s-test.c' % name):
test_lib = []
test_cflags = ['']
if bld.is_defined('HAVE_GCOV'):
test_lib += ['gcov']
test_cflags += ['-fprofile-arcs', '-ftest-coverage']
# Copy headers to URI-style include paths in build directory
for i in bld.path.ant_glob('*.h'):
obj = bld(rule = link,
name = 'link',
cwd = 'build/lv2/%s/%s' % (include_base, info.NAME),
source = '%s' % i,
target = 'lv2/%s/%s/%s' % (include_base, info.NAME, i))
# Unit test program
obj = bld(features = 'c cprogram',
source = '%s-test.c' % info.NAME,
source = '%s-test.c' % name,
lib = test_lib,
target = '%s-test' % info.NAME,
target = '%s-test' % name,
install_path = '',
cflags = test_cflags)
# Install bundle
bld.install_files(bundle_dir,
bld.path.ant_glob('?*.*', excl='*.pc.in lv2extinfo.*'))
bld.path.ant_glob('?*.*', excl='*.in'))
# Install URI-like includes
if bld.env['COPY_HEADERS']:
bld.install_files(os.path.join(include_dir, info.NAME),
bld.path.ant_glob('*.h'))
else:
bld.symlink_as(os.path.join(include_dir, info.NAME),
os.path.relpath(bundle_dir, include_dir))
if bld.path.ant_glob('*.h'):
if bld.env['COPY_HEADERS']:
bld.install_files(include_dir, bld.path.ant_glob('*.h'))
else:
bld.symlink_as(include_dir,
os.path.relpath(bundle_dir,
os.path.dirname(include_dir)))
def test(ctx):
autowaf.pre_test(ctx, APPNAME, dirs=['.'])
name = os.path.basename(ctx.path.srcpath()[len('lv2/'):])
autowaf.pre_test(ctx, name, dirs=['.'])
os.environ['PATH'] = '.' + os.pathsep + os.getenv('PATH')
autowaf.run_tests(ctx, APPNAME, ['%s-test' % info.NAME], dirs=['.'])
autowaf.post_test(ctx, APPNAME, dirs=['.'])
autowaf.run_tests(ctx, name, ['%s-test' % name], dirs=['.'])
autowaf.post_test(ctx, name, dirs=['.'])
def news(ctx):
path = ctx.path.abspath()
autowaf.write_news(APPNAME,
autowaf.write_news(os.path.basename(path),
glob.glob(os.path.join(path, '*.ttl')),
os.path.join(path, 'NEWS'))
class Dist(Scripting.Dist):
def execute(self):
"Execute but do not call archive() since dist() has already done so."
self.recurse([os.path.dirname(Context.g_module.root_path)])
def get_tar_path(self, node):
"Resolve symbolic links to avoid broken links in tarball."
return os.path.realpath(node.abspath())
class DistCheck(Dist, Scripting.DistCheck):
def execute(self):
Dist.execute(self)
self.check()
def archive(self):
Dist.archive(self)
def pre_dist(ctx):
# Write lv2extinfo.py in source directory
path = ctx.path.abspath()
lv2extinfo_py = open(os.path.join(path, 'lv2extinfo.py'), 'w')
for i in info.__dict__:
if i.isupper():
lv2extinfo_py.write("%s = %s\n" % (i, repr(info.__dict__[i])))
lv2extinfo_py.close()
# Write NEWS file in source directory
news(ctx)
def dist(ctx):
pre_dist(ctx)
ctx.archive()
post_dist(ctx)
def distcheck(ctx):
dist(ctx)
def post_dist(ctx):
# Delete generated files from source tree
path = ctx.path.abspath()
for i in [os.path.join(path, 'NEWS'),
os.path.join(path, 'lv2extinfo.py'),
os.path.join(path, 'lv2extinfo.pyc')]:
try:
os.remove(i)
except:
pass
# Delete generated NEWS file from source directory
try:
os.remove(os.path.join(ctx.path.abspath(), 'NEWS'))
except:
pass

1
lv2/lv2plug.in/ns/ext/atom/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/atom/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/cv-port/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/cv-port/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/data-access/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/data-access/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/dynmanifest/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/dynmanifest/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/event/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/event/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/host-info/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/host-info/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/instance-access/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/instance-access/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/log/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/log/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/midi/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/midi/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/parameters/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/parameters/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/patch/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/patch/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/port-groups/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/port-groups/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/port-props/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/port-props/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/presets/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/presets/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/resize-port/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/resize-port/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/state/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/state/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/time/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/time/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/uri-map/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/uri-map/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/urid/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/urid/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/ext/worker/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/ext/worker/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/extensions/ui/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/extensions/ui/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

1
lv2/lv2plug.in/ns/extensions/units/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../ext.pc.in

1
lv2/lv2plug.in/ns/extensions/units/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../../waf

13
lv2/lv2plug.in/ns/lv2core/AUTHORS

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
LV2 is written and maintained by:
David Robillard <d@drobilla.net>
Steve Harris <steve@plugin.org.uk>
with the input and help of many others.
LV2 is based on LADSPA, which was by:
Paul Barton-Davis
Richard W.E. Furse
Stefan Westerfeld
Thanks to all members of the free software community who made LV2 possible.

41
lv2/lv2plug.in/ns/lv2core/INSTALL

@ -1,41 +0,0 @@ @@ -1,41 +0,0 @@
This software requires only Python to build. The build system, based on waf,
is included in this source distribution.
LV2Core
=======
This package contains everything necessary to compile against and/or use LV2
plugins and extensions: a header file, pkg-config file, and LV2 bundle (with
Turtle files).
The configure option --bundle-only can be used to install only the lv2core.lv2
bundle. This is useful for installing the bundle to a project-specific or
user-specific location (e.g. ~/.lv2).
See README for details on how to correctly package LV2, and how to depend on
LV2 in other projects.
Generic Waf Instructions
========================
As with most build systems, building and installing a project with waf is done
in three separate stages:
1. ./waf configure [OPTIONS]
2. ./waf build
3. ./waf install
The default command is build. For example:
./waf configure --prefix=/some/where
./waf -j2
sudo ./waf install
The environment variable DESTDIR can be used to add a prefix to all install
paths (useful for packaging), for example:
DESTDIR=./lv2core.pkg ./waf install
Run './waf --help' for detailed option information.

1
lv2/lv2plug.in/ns/people/ext.pc.in

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../ext.pc.in

1
lv2/lv2plug.in/ns/people/waf vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
../../../../waf

BIN
waf vendored

Binary file not shown.

57
wscript

@ -12,12 +12,9 @@ import waflib.Logs as Logs @@ -12,12 +12,9 @@ import waflib.Logs as Logs
import waflib.Options as Options
import waflib.Scripting as Scripting
# Version of this package (even if built as a child)
LV2EXT_VERSION = datetime.date.isoformat(datetime.datetime.now()).replace('-', '.')
# Variables for 'waf dist'
APPNAME = 'lv2'
VERSION = LV2EXT_VERSION
VERSION = '0.1.0'
# Mandatory variables
top = '.'
@ -27,8 +24,13 @@ def options(opt): @@ -27,8 +24,13 @@ def options(opt):
opt.load('compiler_cc')
opt.load('compiler_cxx')
autowaf.set_options(opt)
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
help="Build unit tests")
opt.add_option('--test', action='store_true', default=False,
dest='build_tests', help="Build unit tests")
opt.add_option('--plugins', action='store_true', default=True,
dest='build_plugins', help="Build example plugins")
opt.add_option('--copy-headers', action='store_true', default=False,
dest='copy_headers',
help='Copy headers instead of linking to bundle')
for i in ['lv2/lv2plug.in/ns/lv2core']:
opt.recurse(i)
@ -42,13 +44,33 @@ def get_subdirs(with_plugins=True): @@ -42,13 +44,33 @@ def get_subdirs(with_plugins=True):
return subdirs
def configure(conf):
conf.load('compiler_cc')
conf.load('compiler_cxx')
try:
conf.load('compiler_c')
conf.load('compiler_cxx')
except:
Options.options.build_tests = False
Options.options.build_plugins = False
autowaf.configure(conf)
autowaf.set_recursive()
conf.env.append_unique('CFLAGS', '-std=c99')
conf.env['BUILD_TESTS'] = Options.options.build_tests
conf.env['COPY_HEADERS'] = Options.options.copy_headers
if not hasattr(os.path, 'relpath') and not Options.options.copy_headers:
conf.fatal(
'os.path.relpath missing, get Python 2.6 or use --copy-headers')
# Check for gcov library (for test coverage)
if conf.env['BUILD_TESTS'] and not conf.is_defined('HAVE_GCOV'):
if conf.env['MSVC_COMPILER']:
conf.env.append_unique('CFLAGS', ['-TP', '-MD'])
else:
conf.env.append_unique('CFLAGS', '-std=c99')
conf.check_cc(lib='gcov', define_name='HAVE_GCOV', mandatory=False)
subdirs = get_subdirs()
for i in subdirs:
@ -56,6 +78,11 @@ def configure(conf): @@ -56,6 +78,11 @@ def configure(conf):
conf.env['LV2_SUBDIRS'] = subdirs
autowaf.configure(conf)
autowaf.display_header('LV2 Configuration')
autowaf.display_msg(conf, 'Bundle directory', conf.env['LV2DIR'])
autowaf.display_msg(conf, 'Version', VERSION)
# Rule for copying a file to the build directory
def copy(task):
shutil.copy(task.inputs[0].abspath(), task.outputs[0].abspath())
@ -232,7 +259,7 @@ def build(bld): @@ -232,7 +259,7 @@ def build(bld):
index_files = []
# Generate .htaccess files (and directory skeleton)
# Prepare spec output directories
for i in bld.env['LV2_SUBDIRS']:
if i.startswith('lv2/lv2plug.in'):
# Copy spec files to build dir
@ -244,8 +271,6 @@ def build(bld): @@ -244,8 +271,6 @@ def build(bld):
base = i[len('lv2/lv2plug.in'):]
name = os.path.basename(i[:len(i)-1])
index_file = os.path.join('index_rows', name)
index_files += [index_file]
# Generate .htaccess file
obj = bld(features = 'subst',
@ -255,7 +280,14 @@ def build(bld): @@ -255,7 +280,14 @@ def build(bld):
NAME = name,
BASE = base)
bld.add_group()
# Call lv2specgen for each spec
for i in bld.env['LV2_SUBDIRS']:
if i.startswith('lv2/lv2plug.in'):
name = os.path.basename(i[:len(i)-1])
index_file = os.path.join('index_rows', name)
index_files += [index_file]
bld.add_group() # Barrier (don't call lv2specgen in parallel)
# Call lv2specgen to generate spec docs
obj = bld(rule = specgen,
@ -265,6 +297,7 @@ def build(bld): @@ -265,6 +297,7 @@ def build(bld):
index_file])
index_files.sort()
bld.add_group() # Barrier (wait for lv2specgen to build index)
# Build extension index
obj = bld(rule = build_index,

Loading…
Cancel
Save