Tweaks to build/package scripts for new waf
* Windows: delete waf installed .dll.a files * Windows: override waf's conf.env.LIBDIR = conf.env.BINDIR with explicit --libdir * Windows: fix asm (`x86_64-w64-mingw32-as` -D flag is for debug messages, -D defines are not available) * Mac: override waf adding -install_name (and -Wl,-compatibility_version -Wl,-current_version) by moving -dynamiclib from linkflags to ldflags * Mac: Allow libs with compat version number suffix (not needed anymore, but may help in the future)
This commit is contained in:
parent
06b2eb1c27
commit
5a841ef462
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
from waflib.extras import autowaf as autowaf
|
||||
from waflib import Options
|
||||
from waflib import Options, Task, Tools
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
@ -373,6 +373,11 @@ def build(bld):
|
||||
# micro increment <=> no interface changes
|
||||
LIBARDOUR_LIB_VERSION = "3.0.0"
|
||||
|
||||
# remove '${DEFINES_ST:DEFINES}' from run_str.
|
||||
# x86_64-w64-mingw32-as (mingw) -D flag is for debug messages
|
||||
if bld.env['build_target'] == 'mingw':
|
||||
class asm(Task.classes['asm']): run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
|
||||
|
||||
# operate on copy to avoid adding sources twice
|
||||
sources = list(libardour_sources)
|
||||
|
||||
|
@ -472,7 +472,7 @@ while [ true ] ; do
|
||||
strip -u -r -arch all $file &>/dev/null
|
||||
fi
|
||||
|
||||
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/$STDCPP)" | grep -v 'libjack\.' | grep -v "$(basename $file)"`
|
||||
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/$STDCPP)" | grep -v 'libjack\.' | egrep -v "$(basename $file .dylib).*.dylib"`
|
||||
# echo -n "."
|
||||
for dep in $deps ; do
|
||||
base=`basename $dep`
|
||||
|
@ -81,7 +81,8 @@ DEPSTACK_ROOT="$PREFIX" \
|
||||
--dist-target=mingw \
|
||||
--also-include=${PREFIX}/include \
|
||||
$ARDOURCFG \
|
||||
--prefix=${PREFIX}
|
||||
--prefix=${PREFIX} \
|
||||
--libdir=${PREFIX}/lib
|
||||
|
||||
./waf ${CONCURRENCY}
|
||||
|
||||
|
@ -202,6 +202,7 @@ cp gtk2_ardour/icons/cursor_square/* $DESTDIR/share/${LOWERCASE_DIRNAME}/icons/
|
||||
# clean build-dir after depoyment
|
||||
echo " === bundle completed, cleaning up"
|
||||
./waf uninstall
|
||||
find $DESTDIR -name "*.dll.a" | xargs rm
|
||||
echo " === complete"
|
||||
du -sh $DESTDIR
|
||||
|
||||
|
17
wscript
17
wscript
@ -943,6 +943,12 @@ def configure(conf):
|
||||
conf.env.append_value ('CXXFLAGS', '-DSILENCE_AFTER')
|
||||
conf.define ('FREEBIE', 1)
|
||||
|
||||
# set explicit LIBDIR, otherwise mingw/windows builds use
|
||||
# conf.env.LIBDIR = conf.env.BINDIR and `waf install` fails
|
||||
# because $BINDIR/ardour6 is the main binary, and $LIBDIR/ardour6/ a directory
|
||||
if Options.options.libdir:
|
||||
conf.env.LIBDIR = Options.options.libdir
|
||||
|
||||
if Options.options.lv2dir:
|
||||
conf.env['LV2DIR'] = Options.options.lv2dir
|
||||
else:
|
||||
@ -1299,6 +1305,17 @@ int main () { return 0; }
|
||||
# Fix utterly braindead FLAC include path to not smash assert.h
|
||||
conf.env['INCLUDES_FLAC'] = []
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
# override waf's -install_name added in
|
||||
# waflib/Tools/ccroot.py when -dynamiclib is used
|
||||
if conf.env.LINKFLAGS_cshlib:
|
||||
conf.env.LINKFLAGS_cshlib = [];
|
||||
conf.env.LDFLAGS_cshlib = ['-dynamiclib']
|
||||
|
||||
if conf.env.LINKFLAGS_cxxshlib:
|
||||
conf.env.LINKFLAGS_cxxshlib = [];
|
||||
conf.env.LDFLAGS_cxxshlib = ['-dynamiclib']
|
||||
|
||||
config_text = open('libs/ardour/config_text.cc', "w")
|
||||
config_text.write('''#include "ardour/ardour.h"
|
||||
namespace ARDOUR {
|
||||
|
Loading…
Reference in New Issue
Block a user