13
0
livetrax/libs/fluidsynth/wscript
Mads Kiilerich 7737c17d52 wscript: drop unused imports, scripted
Done with ad hoc scripting hacks processing unused imports found by pyflakes:

for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Logs.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^import waflib.Logs as Logs,/import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/import waflib.Options as Options, /import /g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^from waflib import Options,/from waflib import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep ' imported but unused$' | sed "s/^\([^:]*\):[0-9]*:[0-9]* '\(.*\)'.*/\1 \2/g" | while read f lib; do sed -i "/^import $lib$/d" $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import Options$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.TaskGen.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import TaskGen$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Task.Task.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Task import Task$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Tools.winres.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Tools import winres$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Utils.* but unused' | cut -d: -f1 | while read f; do sed -i '/^import waflib.Utils as Utils$/d' $f; done
2023-09-17 07:34:55 -06:00

72 lines
2.0 KiB
Python

#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
# Version of this package (even if built as a child)
MAJOR = '2'
MINOR = '0'
MICRO = '1'
LIBFLUIDSYNTH_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
# Variables for 'waf dist'
APPNAME = 'libltc'
VERSION = LIBFLUIDSYNTH_VERSION
I18N_PACKAGE = 'libfluidsynth'
# Mandatory variables
top = '.'
out = 'build'
def options(opt):
autowaf.set_options(opt)
def configure(conf):
if conf.is_defined('USE_EXTERNAL_LIBS'):
autowaf.check_pkg(conf, 'fluidsynth', uselib_store='LIBFLUIDSYNTH', atleast_version=LIBFLUIDSYNTH_VERSION, mandatory=True)
def build(bld):
if bld.is_defined('USE_EXTERNAL_LIBS'):
return
bld (export_includes = ['fluidsynth'],
name = 'libfluidsynth_includes'
)
obj = bld.stlib (source = [
'src/fluid_midi.c',
'src/fluid_adsr_env.c',
'src/fluid_chorus.c',
'src/fluid_iir_filter.c',
'src/fluid_lfo.c',
'src/fluid_rev.c',
'src/fluid_rvoice.c',
'src/fluid_rvoice_dsp.c',
'src/fluid_rvoice_event.c',
'src/fluid_rvoice_mixer.c',
'src/fluid_defsfont.c',
'src/fluid_chan.c',
'src/fluid_event.c',
'src/fluid_gen.c',
'src/fluid_mod.c',
'src/fluid_synth.c',
'src/fluid_tuning.c',
'src/fluid_voice.c',
'src/fluid_conv.c',
'src/fluid_hash.c',
'src/fluid_list.c',
'src/fluid_ringbuffer.c',
'src/fluid_samplecache.c',
'src/fluid_settings.c',
'src/fluid_sffile.c',
'src/fluid_sfont.c',
'src/fluid_synth_monopoly.c',
'src/fluid_sys.c'
],
cflags = [ bld.env['compiler_flags_dict']['pic'], '-fvisibility=hidden', '-std=gnu99', '-Wno-unused-function' ],
includes = ['.', 'src/' ],
target = 'libfluidsynth',
use = 'libfluidsynth_includes',
uselib = 'GLIB',
defines = [ 'HAVE_CONFIG_H', 'DEFAULT_SOUNDFONT=""' ]
)
def shutdown():
autowaf.shutdown()