[DEV] update new lutin 0.8.0

This commit is contained in:
Edouard DUPIN 2015-10-14 21:21:03 +02:00
parent 2a6e785b6d
commit 692a81a635

View File

@ -2,14 +2,35 @@
import lutin.module as module
import lutin.tools as tools
import lutin.debug as debug
import os
def get_type():
return "LIBRARY"
def get_desc():
return "Audio wrapper interface"
def create(target):
myModule = module.Module(__file__, 'portaudio', 'LIBRARY')
def get_licence():
return "BSD-2"
def get_compagny_type():
return "com"
def get_compagny_name():
return "portaudio"
def get_maintainer():
return ["Ross Bencina",
"Phil Burk"]
def get_version():
return [19,0]
def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type())
myModule.add_src_file([
my_module.add_src_file([
'portaudio/src/common/pa_allocation.c',
'portaudio/src/common/pa_converters.c',
'portaudio/src/common/pa_cpuload.c',
@ -23,7 +44,7 @@ def create(target):
'portaudio/src/common/pa_ringbuffer.c'
])
myModule.compile_flags('c', [
my_module.compile_flags('c', [
'-DPA_LITTLE_ENDIAN',
'-DPACKAGE_NAME=\"\"',
'-DPACKAGE_TARNAME=\"\"',
@ -52,13 +73,16 @@ def create(target):
'-DHAVE_NANOSLEEP=1'
])
myModule.compile_version_CC(1999, gnu=True)
myModule.add_export_path(tools.get_current_path(__file__) + '/portaudio/include')
myModule.add_path(tools.get_current_path(__file__)+"/portaudio/src/common")
my_module.compile_version("c", 1999, gnu=True)
my_module.add_path(os.path.join(tools.get_current_path(__file__), 'portaudio/include'))
my_module.add_path(os.path.join(tools.get_current_path(__file__), "portaudio/src/common"))
my_module.add_header_file([
'portaudio/include/portaudio.h'
],
destination_path="portaudio")
if target.name=="Windows":
myModule.add_src_file([
my_module.add_src_file([
'portaudio/src/os/win/pa_win_coinitialize.c',
'portaudio/src/os/win/pa_win_hostapis.c',
'portaudio/src/os/win/pa_win_waveformat.c',
@ -66,28 +90,46 @@ def create(target):
'portaudio/src/os/win/pa_win_wdmks_utils.c',
'portaudio/src/os/win/pa_x86_plain_converters.c'
])
my_module.add_header_file([
'portaudio/include/pa_win_waveformat.h',
'portaudio/include/pa_win_wasapi.h',
'portaudio/include/pa_win_wdmks.h',
'portaudio/include/pa_win_wmme.h'
],
destination_path="portaudio")
elif target.name=="Linux":
myModule.add_optionnal_module_depend('alsa', ["c", "-DPA_USE_ALSA=1"])
myModule.add_optionnal_module_depend('jack', ["c", "-DPA_USE_JACK=1"])
myModule.add_optionnal_module_depend('oss', ["c", "-DPA_USE_OSS=1"])
myModule.add_path(tools.get_current_path(__file__)+"/portaudio/src/os/unix")
myModule.add_src_file([
my_module.add_optionnal_module_depend('alsa', ["c", "-DPA_USE_ALSA=1"])
my_module.add_optionnal_module_depend('jack', ["c", "-DPA_USE_JACK=1"])
my_module.add_optionnal_module_depend('oss', ["c", "-DPA_USE_OSS=1"])
my_module.add_path(os.path.join(tools.get_current_path(__file__), "portaudio/src/os/unix"))
my_module.add_src_file([
'portaudio/src/hostapi/alsa/pa_linux_alsa.c',
'portaudio/src/hostapi/jack/pa_jack.c',
'portaudio/src/hostapi/oss/pa_unix_oss.c',
'portaudio/src/os/unix/pa_unix_hostapis.c',
'portaudio/src/os/unix/pa_unix_util.c'
])
my_module.add_header_file([
'portaudio/include/pa_jack.h',
'portaudio/include/pa_linux_alsa.h',
'portaudio/include/pa_asio.h',
'portaudio/include/pa_win_ds.h',
],
destination_path="portaudio")
elif target.name=="MacOs":
myModule.add_path(tools.get_current_path(__file__)+"/portaudio/src/os/unix")
myModule.add_optionnal_module_depend('oss', ["c", "-DPA_USE_COREAUDIO=1"])
myModule.add_src_file([
my_module.add_path(os.path.join(tools.get_current_path(__file__), "portaudio/src/os/unix"))
my_module.add_optionnal_module_depend('oss', ["c", "-DPA_USE_COREAUDIO=1"])
my_module.add_src_file([
'portaudio/src/hostapi/coreaudio/pa_mac_core.c',
'portaudio/src/hostapi/coreaudio/pa_mac_core_blocking.c',
'portaudio/src/hostapi/coreaudio/pa_mac_core_utilities.c',
'portaudio/src/os/unix/pa_unix_hostapis.c',
'portaudio/src/os/unix/pa_unix_util.c'
])
my_module.add_header_file([
'portaudio/include/pa_mac_core.h'
],
destination_path="portaudio")
elif target.name=="IOs":
debug.warning("target for portaudio: " + target.name + " can not be created ... (not supported)");
return None
@ -96,6 +138,6 @@ def create(target):
return None
else:
debug.warning("unknow target for portaudio: " + target.name);
return myModule
return my_module