2012-11-14 10:54:03 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
import subprocess
|
|
|
|
import waflib.Options as Options
|
|
|
|
import string
|
|
|
|
import os;
|
|
|
|
|
|
|
|
# Version of this package (even if built as a child)
|
|
|
|
PACKAGE_VERSION = '1.2.0'
|
|
|
|
|
|
|
|
# Variables for 'waf dist'
|
|
|
|
APPNAME = 'non-daw'
|
|
|
|
VERSION = PACKAGE_VERSION
|
|
|
|
|
|
|
|
# Mandatory variables
|
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
opt.load('compiler_c')
|
|
|
|
opt.load('compiler_cxx')
|
|
|
|
opt.load('gnu_dirs')
|
|
|
|
|
|
|
|
def configure(conf):
|
|
|
|
conf.load('compiler_c')
|
|
|
|
conf.load('compiler_cxx')
|
|
|
|
conf.load('gnu_dirs')
|
|
|
|
|
2012-12-10 07:08:51 +01:00
|
|
|
# conf.env.append_value('CFLAGS', '-D_LARGEFILE64_SOURCE')
|
|
|
|
# conf.env.append_value('CFLAGS', '-D_FILE_OFFSET_BITS=64')
|
|
|
|
# conf.env.append_value('CXXFLAGS', '-D_LARGEFILE64_SOURCE')
|
|
|
|
# conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64')
|
2012-11-14 10:54:03 +01:00
|
|
|
|
|
|
|
conf.check_cfg(package='sndfile', uselib_store='SNDFILE',args="--cflags --libs",
|
|
|
|
atleast_version='1.0.17', mandatory=True)
|
|
|
|
|
|
|
|
conf.define('VERSION', PACKAGE_VERSION)
|
2012-11-17 02:20:20 +01:00
|
|
|
conf.define('SYSTEM_PATH', '/'.join( [ conf.env.DATADIR, APPNAME ] ) )
|
|
|
|
conf.define('DOCUMENT_PATH', '/'.join( [ conf.env.DATADIR, 'doc' ] ) )
|
|
|
|
conf.define('PIXMAP_PATH', '/'.join( [ conf.env.DATADIR, 'pixmaps' ] ) )
|
2012-11-14 10:54:03 +01:00
|
|
|
|
|
|
|
conf.write_config_header('config.h', remove=False)
|
2012-11-17 02:20:20 +01:00
|
|
|
|
2012-11-14 10:54:03 +01:00
|
|
|
print('')
|
|
|
|
|
|
|
|
def build(bld):
|
|
|
|
# libs = 'LILV SUIL JACK SERD SRATOM LV2'
|
|
|
|
|
|
|
|
libs = ''
|
|
|
|
|
|
|
|
obj = bld(features = 'cxx cxxprogram',
|
|
|
|
source = '''
|
|
|
|
src/Annotation_Region.C
|
|
|
|
src/Audio_Region.C
|
|
|
|
src/Audio_Sequence.C
|
|
|
|
src/Control_Point.C
|
|
|
|
src/Control_Sequence.C
|
|
|
|
src/Cursor_Point.C
|
|
|
|
src/Cursor_Region.C
|
|
|
|
src/Cursor_Sequence.C
|
|
|
|
src/Engine/Audio_File.C
|
|
|
|
src/Engine/Audio_File_Dummy.C
|
|
|
|
src/Engine/Audio_File_SF.C
|
|
|
|
src/Engine/Audio_Region.C
|
|
|
|
src/Engine/Audio_Sequence.C
|
|
|
|
src/Engine/Control_Sequence.C
|
|
|
|
src/Engine/Disk_Stream.C
|
|
|
|
src/Engine/Engine.C
|
|
|
|
src/Engine/Peaks.C
|
|
|
|
src/Engine/Playback_DS.C
|
|
|
|
src/Engine/Record_DS.C
|
|
|
|
src/Engine/Timeline.C
|
|
|
|
src/Engine/Track.C
|
|
|
|
src/NSM.C
|
|
|
|
src/OSC_Thread.C
|
|
|
|
src/Project.C
|
|
|
|
src/Sequence.C
|
|
|
|
src/Sequence_Point.C
|
|
|
|
src/Sequence_Region.C
|
|
|
|
src/Sequence_Widget.C
|
|
|
|
src/TLE.fl
|
2012-12-02 01:14:01 +01:00
|
|
|
src/Track_Header.fl
|
2012-11-14 10:54:03 +01:00
|
|
|
src/Tempo_Point.C
|
|
|
|
src/Tempo_Sequence.C
|
|
|
|
src/Time_Point.C
|
|
|
|
src/Time_Sequence.C
|
|
|
|
src/Timeline.C
|
|
|
|
src/Track.C
|
|
|
|
src/Transport.C
|
|
|
|
src/Waveform.C
|
|
|
|
src/main.C
|
|
|
|
''',
|
|
|
|
target = 'non-daw',
|
|
|
|
includes = ['.', 'src', '../FL', '../nonlib'],
|
2012-12-10 07:08:51 +01:00
|
|
|
uselib = [ 'JACK', 'LIBLO', 'SNDFILE', 'XPM', 'NTK', 'NTK_IMAGES', 'PTHREAD'],
|
2012-11-14 10:54:03 +01:00
|
|
|
use = [ 'fl_widgets', 'nonlib'],
|
|
|
|
install_path = '${BINDIR}')
|
|
|
|
|
2012-11-21 03:01:35 +01:00
|
|
|
bld( features = 'subst',
|
|
|
|
source = 'non-daw.desktop.in',
|
|
|
|
target = 'non-daw.desktop',
|
|
|
|
encoding = 'utf8',
|
|
|
|
install_path = "${DATADIR}" + '/applications',
|
|
|
|
BIN_PATH = bld.env.BINDIR )
|
|
|
|
|
2012-11-14 10:54:03 +01:00
|
|
|
start_dir = bld.path.find_dir( 'icons/hicolor' )
|
|
|
|
|
|
|
|
bld.install_files('${DATADIR}/icons/hicolor', start_dir.ant_glob('**/*.png'),
|
|
|
|
cwd=start_dir, relative_trick=True)
|
|
|
|
|
|
|
|
bld.install_as('${DATADIR}/pixmaps/' + APPNAME + '/icon-256x256.png', 'icons/hicolor/256x256/apps/' + APPNAME + '.png')
|
|
|
|
|
2012-11-17 02:20:20 +01:00
|
|
|
bld.install_files( '/'.join( [ '${DATADIR}/doc', APPNAME ] ), bld.path.ant_glob( 'doc/*.html doc/*.png' ) )
|
|
|
|
|