13
0

correct install location for .mo files (i18n) and cleanup LOCALEDIR use a bit

This commit is contained in:
Paul Davis 2014-12-09 08:19:11 -05:00
parent 1648b94905
commit 246a4f3018
5 changed files with 14 additions and 20 deletions

View File

@ -430,7 +430,7 @@ def build(bld):
'PACKAGE="' + I18N_PACKAGE + '"',
'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') + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]
obj.install_path = bld.env['DLLDIR']
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL'
@ -674,9 +674,8 @@ 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['PREFIX'], 'share', 'locale',
lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
bld.install_as (os.path.join(os.path.normpath(bld.env['LOCALEDIR']), lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
def i18n(bld):
autowaf.build_i18n(bld, top, 'gtk2_ardour', I18N_PACKAGE, gtk2_ardour_sources,

View File

@ -369,7 +369,7 @@ def build(bld):
'PACKAGE="' + I18N_PACKAGE + '"',
'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') + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
'EVORAL_MIDI_XML=1',
]
@ -416,8 +416,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['PREFIX'], 'share', 'locale',
lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
bld.install_as(os.path.join(bld.env['LOCALEDIR'], lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
@ -439,8 +438,7 @@ def build(bld):
'PACKAGE="libardour3test"',
'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') + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]
testcommon.name = 'testcommon'
@ -519,8 +517,7 @@ def build(bld):
'PACKAGE="libardour3profile"',
'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') + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]
if bld.env['FPU_OPTIMIZATION']:
session_load_tester.source += [ 'sse_functions_xmm.cc' ]
@ -552,8 +549,7 @@ def build(bld):
'PACKAGE="libardour3profile"',
'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') + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]
if bld.env['FPU_OPTIMIZATION']:
profilingobj.source += [ 'sse_functions_xmm.cc' ]
@ -584,8 +580,7 @@ def create_ardour_test_program(bld, includes, name, target, sources):
'PACKAGE="libardour3test"',
'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') + '"',
'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
]
def shutdown():

View File

@ -118,10 +118,9 @@ 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['PREFIX'], 'share', 'locale',
lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
bld.install_as (os.path.join(os.path.normpath(bld.env['LOCALEDIR']), lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
mo)
def i18n(bld):
autowaf.build_i18n(bld, top, 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
'Paul Davis')

View File

@ -173,6 +173,6 @@ def build(bld):
testobj.defines = [ 'PACKAGE="' + I18N_PACKAGE + '"' ]
if sys.platform != 'darwin' and bld.env['build_target'] != 'mingw':
testobj.linkflags = ['-lrt']
def shutdown():
autowaf.shutdown()

View File

@ -918,6 +918,7 @@ def build(bld):
# shared objects loaded at runtime go here (two aliases)
bld.env['DLLDIR'] = os.path.join(bld.env['LIBDIR'], lwrcase_dirname)
bld.env['LIBDIR'] = bld.env['DLLDIR']
bld.env['LOCALEDIR'] = os.path.join(bld.env['DATADIR'], 'locale')
autowaf.set_recursive()