Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wscript: Cleanup around 'ardour' + MAJOR #907

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions gtk2_ardour/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def configure(conf):
conf.env['define_key'] = bak

def build(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']

# Tool to dump lua-bindings (of gtk2ardour + libs)
if re.search ("linux", sys.platform) != None and bld.env['LUABINDINGDOC']:
Expand Down Expand Up @@ -754,7 +754,7 @@ def build(bld):

obj = bld(features = 'subst')
obj.source = 'ardour.sh.in'
obj.target = 'ardour' + bld.env['MAJOR']
obj.target = bld.env['INTERNAL_NAME']
obj.chmod = Utils.O755
obj.dict = wrapper_subst_dict
obj.install_path = bld.env['BINDIR']
Expand Down Expand Up @@ -881,16 +881,16 @@ def build(bld):

# Freedesktop
freedesktop_subst_dict = {
'ARDOUR_EXEC' : bld.env['lwrcase_dirname'],
'ARDOUR_ICON' : bld.env['lwrcase_dirname'],
'ARDOUR_EXEC' : bld.env['INTERNAL_NAME'],
'ARDOUR_ICON' : bld.env['INTERNAL_NAME'],
'VERSION': bld.env['VERSION'],
'DATE': bld.env['DATE'],
}

if bld.env['FREEDESKTOP']:
obj = bld(features = 'subst')
obj.source = 'ardour.desktop.in'
obj.target = bld.env['lwrcase_dirname'] + '.desktop'
obj.target = bld.env['INTERNAL_NAME'] + '.desktop'
obj.chmod = Utils.O644
obj.dict = freedesktop_subst_dict
set_subst_dict(obj, freedesktop_subst_dict)
Expand All @@ -907,14 +907,14 @@ def build(bld):
appdata_i18n_xmlin(bld)
obj = bld(features = 'subst')
obj.source = 'ardour.appdata.xml.in'
obj.target = bld.env['lwrcase_dirname'] + '.appdata.xml'
obj.target = bld.env['INTERNAL_NAME'] + '.appdata.xml'
obj.chmod = Utils.O644
obj.dict = freedesktop_subst_dict
set_subst_dict(obj, freedesktop_subst_dict)
bld.install_files (os.path.join (bld.env['PREFIX'], 'share/appdata'), obj.target)

# install desktop icon files
icon_file_name = bld.env['lwrcase_dirname'] + '.png'
icon_file_name = bld.env['INTERNAL_NAME'] + '.png'
bld.install_as('${PREFIX}/share/icons/hicolor/16x16/apps/' + icon_file_name, 'resources/Ardour-icon_16px.png')
bld.install_as('${PREFIX}/share/icons/hicolor/22x22/apps/'+ icon_file_name, 'resources/Ardour-icon_22px.png')
bld.install_as('${PREFIX}/share/icons/hicolor/32x32/apps/'+ icon_file_name, 'resources/Ardour-icon_32px.png')
Expand Down Expand Up @@ -969,27 +969,27 @@ def build(bld):
mo)

def i18n_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_pot(bld)
appdata_i18n_po(bld)
appdata_i18n_mo(bld)

def i18n_pot_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n_pot(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_pot(bld)

def i18n_po_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n_po(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')
appdata_i18n_po(bld)

def i18n_mo_func(bld):
I18N_PACKAGE = 'gtk2_ardour' + bld.env['MAJOR']
I18N_PACKAGE = 'gtk2_' + bld.env['INTERNAL_NAME']
autowaf.build_i18n_mo(bld, '.', 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,
'Paul Davis')

Expand Down
1 change: 0 additions & 1 deletion libs/aaf/wscript
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os

# Version of this package (even if built as a child)
LIBAAF_VERSION = '0.0.0'
Expand Down
1 change: 0 additions & 1 deletion libs/appleutility/wscript
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
from waflib import Options
import os

libappleutility_sources = [
Expand Down
24 changes: 11 additions & 13 deletions libs/ardour/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import re
# default state file version for this build
CURRENT_SESSION_FILE_VERSION = 7003

I18N_PACKAGE = 'ardour'

libardour_sources = [
'amp.cc',
'analyser.cc',
Expand Down Expand Up @@ -421,11 +419,11 @@ def build(bld):
obj.vnum = LIBARDOUR_LIB_VERSION
obj.install_path = bld.env['LIBDIR']
obj.defines += [
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
'PACKAGE="' + bld.env['INTERNAL_NAME'] + '"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"'
'LIBARDOUR="' + bld.env['INTERNAL_NAME'] + '"'
]

if bld.is_defined('HAVE_SOUNDTOUCH'):
Expand Down Expand Up @@ -592,7 +590,7 @@ def build(bld):
mo_files = bld.path.ant_glob('po/*.mo')
for mo in mo_files:
lang = os.path.basename(mo.srcpath()).replace('.mo', '')
bld.install_as(os.path.join(bld.env['LOCALEDIR'], lang, 'LC_MESSAGES', I18N_PACKAGE + bld.env['MAJOR'] + '.mo'),
bld.install_as(os.path.join(bld.env['LOCALEDIR'], lang, 'LC_MESSAGES', bld.env['INTERNAL_NAME'] + '.mo'),
mo)

if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
Expand All @@ -610,7 +608,7 @@ def build(bld):
else:
testcommon.use.extend(['libltc', 'librubberband', 'libfluidsynth'])
testcommon.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'test"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
Expand Down Expand Up @@ -686,7 +684,7 @@ def build(bld):
load_save_session.target = 'load-save-session'
load_save_session.install_path = ''
load_save_session.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'profile"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
Expand All @@ -712,7 +710,7 @@ def build(bld):
profilingobj.target = p
profilingobj.install_path = ''
profilingobj.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'profile"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'profile"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
Expand All @@ -730,24 +728,24 @@ def create_ardour_test_program(bld, includes, name, target, sources):
# not sure about install path
testobj.install_path = bld.env['LIBDIR']
testobj.defines = [
'PACKAGE="libardour' + bld.env['MAJOR'] + 'test"',
'PACKAGE="lib' + bld.env['INTERNAL_NAME'] + 'test"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]

def i18n_func(bld):
autowaf.build_i18n(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')

def i18n_pot_func(bld):
autowaf.build_i18n_pot(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n_pot(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')

def i18n_po_func(bld):
autowaf.build_i18n_po(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n_po(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')

def i18n_mo_func(bld):
autowaf.build_i18n_mo(bld, '.', 'libs/ardour', I18N_PACKAGE + bld.env['MAJOR'], libardour_sources,
autowaf.build_i18n_mo(bld, '.', 'libs/ardour', bld.env['INTERNAL_NAME'], libardour_sources,
'Paul Davis')
7 changes: 2 additions & 5 deletions libs/auscan/wscript
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env python
import os

# needed for code used from libardour
I18N_PACKAGE = 'ardour'

def options(opt):
pass

Expand All @@ -19,8 +16,8 @@ def build(bld):
obj.defines = [
'AU_SCANNER_APP',
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
'PACKAGE="' + bld.env['INTERNAL_NAME'] + '"',
'LIBARDOUR="' + bld.env['INTERNAL_NAME'] + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
]
obj.use = [ 'libpbd', 'libappleutility', 'libtemporal', 'libevoral' ]
Expand Down
11 changes: 4 additions & 7 deletions libs/fst/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import os
import sys
import re

# needed for code used from libardour
I18N_PACKAGE = 'ardour'

def options(opt):
pass

Expand All @@ -22,8 +19,8 @@ def build(bld):
obj.defines = [
'VST3_SCANNER_APP',
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
'PACKAGE="' + bld.env['INTERNAL_NAME'] + '"',
'LIBARDOUR="' + bld.env['INTERNAL_NAME'] + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
]
obj.use = [ 'libpbd' ]
Expand Down Expand Up @@ -64,8 +61,8 @@ def build(bld):
'_POSIX_SOURCE',
'USE_WS_PREFIX',
'VST_SCANNER_APP',
'PACKAGE="' + I18N_PACKAGE + bld.env['MAJOR'] + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
'PACKAGE="' + bld.env['INTERNAL_NAME'] + '"',
'LIBARDOUR="' + bld.env['INTERNAL_NAME'] + '"',
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
]
if re.search ("bsd", sys.platform) != None:
Expand Down
1 change: 0 additions & 1 deletion libs/surfaces/console1/wscript
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os

def options(opt):
Expand Down
4 changes: 2 additions & 2 deletions luasession/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def build(bld):
if bld.env['build_target'] != 'mingw':
obj = bld(features = 'subst')
obj.source = 'ardour-lua.sh.in'
obj.target = 'ardour' + bld.env['MAJOR'] + '-lua'
obj.target = bld.env['INTERNAL_NAME'] + '-lua'
obj.chmod = Utils.O755
obj.install_path = bld.env['BINDIR']
obj.LIBDIR = os.path.normpath(bld.env['DLLDIR'])
Expand Down Expand Up @@ -75,6 +75,6 @@ def build(bld):

if bld.env['build_target'] == 'mingw':
obj.install_path = bld.env['BINDIR']
obj.target = 'ardour' + bld.env['MAJOR'] + '-lua'
obj.target = bld.env['INTERNAL_NAME'] + '-lua'
else:
obj.install_path = bld.env['DLLDIR']
10 changes: 3 additions & 7 deletions session_utils/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ def configure(conf):
autowaf.display_msg(conf, 'build session-utils', 'yes')

def build_ardour_util(bld, util):
pgmprefix = bld.env['PROGRAM_NAME'].lower() + bld.env['MAJOR']

# just the normal executable version of the GTK GUI
obj = bld (features = 'cxx c cxxprogram')
# this program does not do the whole hidden symbols thing
obj.cxxflags = [ '-fvisibility=default' ]
obj.source = ['common.cc', util + '.cc' ]
obj.target = pgmprefix + '-' + util
obj.target = bld.env['INTERNAL_NAME'] + '-' + util
obj.includes = ['.']
obj.use = [ 'libpbd',
'libardour',
Expand All @@ -33,7 +31,7 @@ def build_ardour_util(bld, util):
]
obj.defines = [
'VERSIONSTRING="' + bld.env['VERSION'] + '"',
'UTILNAME="' + str(pgmprefix + '-' + util) + '"',
'UTILNAME="' + bld.env['INTERNAL_NAME'] + '-' + util + '"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
Expand Down Expand Up @@ -69,15 +67,13 @@ def build(bld):
if not "dummy" in bld.env['BACKENDS']:
return

pgmprefix = bld.env['PROGRAM_NAME'].lower() + bld.env['MAJOR']

utils = bld.path.ant_glob('[a-z]*.cc', excl=['example.cc', 'common.cc'])

for util in utils:
fn = os.path.splitext(os.path.basename(str(util)))[0]
build_ardour_util(bld, fn)
if bld.env['build_target'] != 'mingw':
bld.symlink_as(bld.env['BINDIR'] + '/' + pgmprefix + "-" + fn, bld.env['LIBDIR'] + '/utils/ardour-util.sh')
bld.symlink_as(bld.env['BINDIR'] + '/' + bld.env['INTERNAL_NAME'] + "-" + fn, bld.env['LIBDIR'] + '/utils/ardour-util.sh')

if bld.env['build_target'] == 'mingw':
return
Expand Down
13 changes: 5 additions & 8 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ def configure(conf):
conf.env['MAJOR'] = MAJOR
conf.env['MINOR'] = MINOR
conf.env['MICRO'] = MICRO
conf.env['INTERNAL_NAME'] = 'ardour' + MAJOR
conf.line_just = 52
autowaf.set_recursive()
autowaf.configure(conf)
Expand Down Expand Up @@ -1031,7 +1032,7 @@ def configure(conf):
if Options.options.lv2dir:
conf.env['LV2DIR'] = Options.options.lv2dir
else:
conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], 'ardour' + conf.env['MAJOR'], 'LV2')
conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], conf.env['INTERNAL_NAME'], 'LV2')

conf.env['LV2DIR'] = os.path.normpath(conf.env['LV2DIR'])

Expand Down Expand Up @@ -1590,18 +1591,14 @@ def build(bld):
#if bld.is_defined('YTK'):
# bld.path.find_dir ('libs/tk/ztkmm')

# set up target directories
lwrcase_dirname = 'ardour' + bld.env['MAJOR']

# configuration files go here
bld.env['CONFDIR'] = os.path.join(bld.env['SYSCONFDIR'], lwrcase_dirname)
bld.env['CONFDIR'] = os.path.join(bld.env['SYSCONFDIR'], bld.env['INTERNAL_NAME'])
# data files loaded at run time go here
bld.env['DATADIR'] = os.path.join(bld.env['DATADIR'], lwrcase_dirname)
bld.env['DATADIR'] = os.path.join(bld.env['DATADIR'], bld.env['INTERNAL_NAME'])
# shared objects loaded at runtime go here (two aliases)
bld.env['DLLDIR'] = os.path.join(bld.env['LIBDIR'], lwrcase_dirname)
bld.env['DLLDIR'] = os.path.join(bld.env['LIBDIR'], bld.env['INTERNAL_NAME'])
bld.env['LIBDIR'] = bld.env['DLLDIR']
bld.env['LOCALEDIR'] = os.path.join(bld.env['DATADIR'], 'locale')
bld.env['lwrcase_dirname'] = lwrcase_dirname

autowaf.set_recursive()

Expand Down