shithub: aubio

Download patch

ref: 6ed0f4ee598ff53b9223e916c5a6e1ba4ec17f31
parent: cbc9765223848233d3235557c10be0066556118f
author: Paul Brossier <piem@piem.org>
date: Sat Feb 9 14:03:21 EST 2013

waf: update to 1.7.9

--- a/examples/wscript_build
+++ b/examples/wscript_build
@@ -1,19 +1,19 @@
 # vim:set syntax=python:
 
 # build examples
-utilsio = ctx.new_task_gen(name = 'utilsio', features = 'c',
-      includes = '../src',
-      source = ['utils.c', 'jackio.c'],
-      uselib = ['LASH', 'JACK'],
-      target = 'utilsio')
+utilsio = bld(
+        name = 'utilsio',
+        features = 'c',
+        includes = '../src',
+        source = ['utils.c', 'jackio.c'],
+        uselib = ['LASH', 'JACK'],
+        target = 'utilsio')
 
 # loop over all *.c filenames in examples to build them all
-for target_name in ctx.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c']):
-  ctx.new_task_gen(features = 'c cprogram',
-      add_objects = 'utilsio',
+for source_file in ctx.path.ant_glob('*.c', excl = ['utils.c', 'jackio.c']):
+  bld.program(features = 'c cprogram',
       includes = '../src',
-      uselib = ['LASH', 'JACK', 'SNDFILE'],
-      use = 'aubio',
-      source = target_name,
-      # program name is filename.c without the .c
-      target = str(target_name).split('.')[0])
+      use = ['aubio', 'LASH', 'JACK', 'SNDFILE', 'utilsio'],
+      source = str(source_file),
+      target = str(source_file).split('.')[0]
+    )
--- a/src/wscript_build
+++ b/src/wscript_build
@@ -24,6 +24,6 @@
 
 # install headers, except _priv.h ones
 ctx.install_files('${PREFIX}/include/aubio/',
-	ctx.path.ant_glob('**/*.h',
-	exclude = ['_priv.h', 'config.h']),
-	relative_trick=True)
+
+    ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']),
+    relative_trick=True)
--- /dev/null
+++ b/tests/wscript_build
@@ -1,0 +1,21 @@
+# vim:set syntax=python:
+
+for target_name in ctx.path.ant_glob('src/**/*.c'):
+  uselib = []
+  includes = ['../src']
+  extra_source = []
+  if str(target_name).endswith('-jack.c') and ctx.env['JACK']:
+    uselib += ['JACK']
+    includes += ['../examples']
+    extra_source += ['../examples/jackio.c']
+
+  bld(features = 'c cprogram test',
+      uselib = uselib,
+      source = [target_name] + extra_source,
+      target = str(target_name).split('.')[0],
+      includes = includes,
+      install_path = None,
+      defines = 'AUBIO_UNSTABLE_API=1',
+      cflags = ['-g'],
+      use = 'aubio')
+
--- a/waf
+++ b/waf
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # encoding: ISO8859-1
-# Thomas Nagy, 2005-2011
+# Thomas Nagy, 2005-2012
 
 """
 Redistribution and use in source and binary forms, with or without
@@ -32,10 +32,10 @@
 
 import os, sys
 
-VERSION="1.6.11"
-REVISION="9ba72a99056a2dfa53f17212aa3b8606"
+VERSION="1.7.9"
+REVISION="b503f38d25464d88953a601c8cd0ace6"
 INSTALL=''
-C1='#2'
+C1='#='
 C2='#+'
 cwd = os.getcwd()
 join = os.path.join
@@ -74,13 +74,13 @@
 		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)
+		err("Cannot unpack waf lib into %s\nMove waf in a writable directory" % dir)
 
 	os.chdir(dir)
 	tmp = 't.bz2'
 	t = open(tmp,'wb')
-	t.write(txt)
-	t.close()
+	try: t.write(txt)
+	finally: t.close()
 
 	try:
 		t = tarfile.open(tmp)
@@ -95,8 +95,10 @@
 			except OSError: pass
 			err("Waf cannot be unpacked, check that bzip2 support is present")
 
-	for x in t: t.extract(x)
-	t.close()
+	try:
+		for x in t: t.extract(x)
+	finally:
+		t.close()
 
 	for x in ['Tools', 'extras']:
 		os.chmod(join('waflib',x), 493)
@@ -156,10 +158,10 @@
 sys.path.insert(0, wafdir)
 
 if __name__ == '__main__':
-	import waflib.extras.compat15
+
 	from waflib import Scripting
 	Scripting.waf_entry_point(cwd, VERSION, wafdir)
 
 #==>
-#BZh91AY&SYJq�D���l��������
\ No newline at end of file
+#BZh91AY&SY�i���$�����t��������
\ No newline at end of file
 �L�����zV�DR[V���t�媃����	՚��}���&�2�̴��a���q�i���EF}#ک�#23wj9��6!��h��jqθ}W�:�'M�a�ɸ�v�*����]�龟g�kbdO<;����ꅈ>�H)a���Y�!���A�*,Y┯��獺��~9'��s��#2a�J�$6�E���Y���M���2(�O�!/w�3�L�WK�S#+u�^!�U��P����%�tٸ�������Q����]�������䔘���ʞ\�3��}�_v��}�[�|fY��{Aݏ�=�u�Z"V���<�cb	��i��s`�b������_k*���!d�{�CTgK���e�QFz���V�<+�u3�i���+J�3�~���/�u��0sṥ�;L”�"��E#�&o�٨,O��ڕS �DD�9��܊?��k���k�o����I���6���&����h��okN�A�OKVO����{�==���?��̴J6�9J/^0�A_�E>���|�ΛΈcdI��,M"$�Bqm�Ww��L�@��D*R�V�q�9�!~����^�'�̔�m�����sѕ�Z�u8PR�3���eo鏬�;�F�!��dv��_j`�"��9�Zg�	,S�~�g���z��#2�a����B�\����;P4�ӓ�ֿ+�KjBѣ�ZG�)i	i�Y��r��_��(}y��լ��f����NR[U})M�T��i-d���6�����%
\ No newline at end of file
--- a/wscript
+++ b/wscript
@@ -52,13 +52,11 @@
   ctx.add_option('--with-target-platform', type='string',
       help='set target platform for cross-compilation', dest='target_platform')
   ctx.load('compiler_c')
-  ctx.load('gnu_dirs')
   ctx.load('waf_unit_test')
 
 def configure(ctx):
-  import Options
-  ctx.check_tool('compiler_c')
-  ctx.check_tool('gnu_dirs') # helpful for autotools transition and .pc generation
+  from waflib import Options
+  ctx.load('compiler_c')
   ctx.load('waf_unit_test')
   ctx.env.CFLAGS = ['-g', '-Wall', '-Wextra']
 
@@ -179,16 +177,14 @@
   except ctx.errors.ConfigurationError:
     ctx.to_log('docbook-to-man was not found (ignoring)')
 
-def build(ctx):
-  ctx.env['VERSION'] = VERSION
-  ctx.env['LIB_VERSION'] = LIB_VERSION
+def build(bld):
+  bld.env['VERSION'] = VERSION
+  bld.env['LIB_VERSION'] = LIB_VERSION
 
   # add sub directories
-  ctx.add_subdirs(['src','examples'])
-  if ctx.env['SWIG']:
-    if ctx.env['PYTHON']:
-      ctx.add_subdirs('python')
+  bld.recurse('src examples tests')
 
+  """
   # create the aubio.pc file for pkg-config
   if ctx.env['TARGET_PLATFORM'] == 'linux':
     aubiopc = ctx.new_task_gen('subst')
@@ -211,33 +207,6 @@
     ctx.install_files('${MANDIR}/man1', ctx.path.ant_glob('doc/*.1'))
 
   # install woodblock sound
-  ctx.install_files('${PREFIX}/share/sounds/aubio/',
+  bld.install_files('${PREFIX}/share/sounds/aubio/',
       'sounds/woodblock.aiff')
-
-  # build and run the unit tests
-  build_tests(ctx)
-
-def shutdown(ctx):
-  pass
-
-# loop over all *.c filenames in tests/src to build them all
-# target name is filename.c without the .c
-def build_tests(ctx):
-  for target_name in ctx.path.ant_glob('tests/src/**/*.c'):
-    uselib = []
-    includes = ['src']
-    extra_source = []
-    if str(target_name).endswith('-jack.c') and ctx.env['JACK']:
-      uselib += ['JACK']
-      includes += ['examples']
-      extra_source += ['examples/jackio.c']
-
-    this_target = ctx.new_task_gen(
-        features = 'c cprogram test',
-        uselib = uselib,
-        source = [target_name] + extra_source,
-        target = str(target_name).split('.')[0],
-        includes = includes,
-        defines = 'AUBIO_UNSTABLE_API=1',
-        cflags = ['-g'],
-        use = 'aubio')
+  """