remove hardcoded major version in build scripts
authorRobin Gareus <robin@gareus.org>
Thu, 8 Jan 2015 15:57:46 +0000 (16:57 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 8 Jan 2015 16:59:41 +0000 (17:59 +0100)
libs/ardour/wscript
libs/fst/wscript
libs/timecode/wscript
wscript

index c61da5149ba5411ee7641d9d026d56b91ebec5f4..567439cf4031c1fb357f40941e3f00e5ecbd8b5d 100644 (file)
@@ -10,9 +10,7 @@ import sys
 # default state file version for this build
 CURRENT_SESSION_FILE_VERSION = 3001
 
-# Variables for 'waf dist'
-APPNAME = 'libardour3'
-I18N_PACKAGE = 'ardour3'
+I18N_PACKAGE = 'ardour'
 
 # Mandatory variables
 top = '.'
@@ -246,7 +244,7 @@ def configure(conf):
     autowaf.build_version_files(
         path_prefix + 'ardour/version.h',
         path_prefix + 'version.cc',
-        'libardour3', conf.env['MAJOR'], conf.env['MINOR'], 0,
+        'libardour' + str(conf.env['MAJOR']), conf.env['MAJOR'], conf.env['MINOR'], 0,
         'LIBARDOUR_API', 'ardour/libardour_visibility.h')
     autowaf.configure(conf)
     autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO',
@@ -367,7 +365,7 @@ def build(bld):
     obj.vnum         = LIBARDOUR_LIB_VERSION
     obj.install_path = bld.env['LIBDIR']
     obj.defines      += [
-        'PACKAGE="' + I18N_PACKAGE + '"',
+        'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"',
         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
         'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -418,7 +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['LOCALEDIR'], lang, 'LC_MESSAGES', I18N_PACKAGE + '.mo'),
+            bld.install_as(os.path.join(bld.env['LOCALEDIR'], lang, 'LC_MESSAGES', I18N_PACKAGE + str(bld.env['MAJOR']) + '.mo'),
                            mo)
 
     if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
@@ -437,7 +435,7 @@ def build(bld):
         else:
             testcommon.use.extend(['libltc', 'librubberband'])
         testcommon.defines      = [
-            'PACKAGE="libardour3test"',
+            'PACKAGE="libardour' + str(bld.env['MAJOR']) + 'test"',
             'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
             'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
             'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -516,7 +514,7 @@ def build(bld):
         session_load_tester.target    = 'load-session'
         session_load_tester.install_path = ''
         session_load_tester.defines      = [
-            'PACKAGE="libardour3profile"',
+            'PACKAGE="libardour' + str(bld.env['MAJOR']) + 'profile"',
             'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
             'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
             'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -548,7 +546,7 @@ def build(bld):
             profilingobj.target    = p
             profilingobj.install_path = ''
             profilingobj.defines      = [
-                'PACKAGE="libardour3profile"',
+                'PACKAGE="libardour' + str(bld.env['MAJOR']) + 'profile"',
                 'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
                 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
                 'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -579,7 +577,7 @@ def create_ardour_test_program(bld, includes, name, target, sources):
     # not sure about install path
     testobj.install_path = bld.env['LIBDIR']
     testobj.defines      = [
-        'PACKAGE="libardour3test"',
+        'PACKAGE="libardour' + str(bld.env['MAJOR']) + 'test"',
         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
         'LOCALEDIR="' + os.path.normpath(bld.env['LOCALEDIR']) + '"',
@@ -589,17 +587,17 @@ def shutdown():
     autowaf.shutdown()
 
 def i18n(bld):
-    autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
+    autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE + str(bld.env['MAJOR']), libardour_sources,
                        'Paul Davis')
 
 def i18n_pot(bld):
-    autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
+    autowaf.build_i18n(bld, top, 'libs/ardour', I18N_PACKAGE + str(bld.env['MAJOR']), libardour_sources,
                        'Paul Davis')
 
 def i18n_po(bld):
-    autowaf.build_i18n_po(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
+    autowaf.build_i18n_po(bld, top, 'libs/ardour', I18N_PACKAGE + str(bld.env['MAJOR']), libardour_sources,
                        'Paul Davis')
 
 def i18n_mo(bld):
-    autowaf.build_i18n_mo(bld, top, 'libs/ardour', I18N_PACKAGE, libardour_sources,
+    autowaf.build_i18n_mo(bld, top, 'libs/ardour', I18N_PACKAGE + str(bld.env['MAJOR']), libardour_sources,
                        'Paul Davis')
index 7449d5921d69d4404a0eefd0dd1ca388f94d9527..3e4605837d9382ec7e389ba60ef3c133368d0815 100644 (file)
@@ -18,7 +18,7 @@ scanner_app_src = [
     ]
 
 # needed for code used from libardour
-I18N_PACKAGE = 'ardour3'
+I18N_PACKAGE = 'ardour'
 
 def options(opt):
     autowaf.set_options(opt)
@@ -82,7 +82,7 @@ def build(bld):
         '_POSIX_SOURCE',
         'USE_WS_PREFIX',
         'VST_SCANNER_APP',
-        'PACKAGE="' + I18N_PACKAGE + '"',
+        'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"',
         'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
         ]
     obj.install_path = os.path.join(bld.env['LIBDIR'])
index 77a23da0883081fe67d733637750dc5b28ce8d3c..fadeb0aebdcf19d142c834264eece2087108d40a 100644 (file)
@@ -21,7 +21,8 @@ def build(bld):
                target   = 'timecode',
                includes = ['.'],
                export_includes = ['.'],
-               defines  = [ 'LIBTIMECODE_DLL_EXPORTS' ]
+               defines  = [ 'LIBTIMECODE_DLL_EXPORTS' ],
+               install_path = bld.env['LIBDIR']
                )
 
 def shutdown():
diff --git a/wscript b/wscript
index e722e3da5d3da81113a750704a528dfb11544a99..aecc85a5c2724acb44cf145571ac9031d07630c7 100644 (file)
--- a/wscript
+++ b/wscript
@@ -9,6 +9,24 @@ import sys
 import platform as PLATFORM
 from waflib.Tools import winres
 
+from waflib.Build import BuildContext
+class i18n(BuildContext):
+        cmd = 'i18n'
+        fun = 'i18n'
+
+class i18n_pot(BuildContext):
+        cmd = 'i18n_pot'
+        fun = 'i18n_pot'
+
+class i18n_po(BuildContext):
+        cmd = 'i18n_po'
+        fun = 'i18n_po'
+
+class i18n_mo(BuildContext):
+        cmd = 'i18n_mo'
+        fun = 'i18n_mo'
+
+
 compiler_flags_dictionaries= {
     'gcc' : {
         # Flags required when building a debug build
@@ -1036,7 +1054,7 @@ def build(bld):
     bld.path.find_dir ('libs/pbd/pbd')
 
     # set up target directories
-    lwrcase_dirname = 'ardour3'
+    lwrcase_dirname = 'ardour' + bld.env['MAJOR']
 
     if bld.is_defined ('TRX_BUILD'):
         lwrcase_dirname = 'trx'
@@ -1069,6 +1087,7 @@ def build(bld):
         bld.add_post_fun(test)
 
 def i18n(bld):
+    print(bld.env)
     bld.recurse (i18n_children)
 
 def i18n_pot(bld):