From 246a4f3018db6a7650ff60dda9562b7cb9891331 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 9 Dec 2014 08:19:11 -0500 Subject: [PATCH] correct install location for .mo files (i18n) and cleanup LOCALEDIR use a bit --- gtk2_ardour/wscript | 7 +++---- libs/ardour/wscript | 17 ++++++----------- libs/gtkmm2ext/wscript | 7 +++---- libs/pbd/wscript | 2 +- wscript | 1 + 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index f6d38a92e0..c38c8509ab 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -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, diff --git a/libs/ardour/wscript b/libs/ardour/wscript index d19f66c0f6..bce1b127f4 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -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(): diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index c385ce01f8..0c06c5f68f 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -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') diff --git a/libs/pbd/wscript b/libs/pbd/wscript index b12b7bdb44..ba0b265b99 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -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() diff --git a/wscript b/wscript index 9ed5059975..1568e0a3b1 100644 --- a/wscript +++ b/wscript @@ -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()