2009-02-25 18:48:10 -05:00
|
|
|
#!/usr/bin/env python
|
2011-09-29 15:17:54 -04:00
|
|
|
from waflib.extras import autowaf as autowaf
|
2009-02-25 18:48:10 -05:00
|
|
|
import os
|
|
|
|
|
|
|
|
# Version of this package (even if built as a child)
|
2009-02-25 21:24:16 -05:00
|
|
|
MAJOR = '0'
|
|
|
|
MINOR = '8'
|
|
|
|
MICRO = '3'
|
|
|
|
GTKMM2EXT_VERSION = "%s.%s.%s" % (MAJOR, MINOR, MICRO)
|
2009-02-25 18:48:10 -05:00
|
|
|
|
|
|
|
# Library version (UNIX style major, minor, micro)
|
|
|
|
# major increment <=> incompatible changes
|
|
|
|
# minor increment <=> compatible changes (additions)
|
|
|
|
# micro increment <=> no interface changes
|
|
|
|
GTKMM2EXT_LIB_VERSION = '0.8.3'
|
|
|
|
|
|
|
|
# Variables for 'waf dist'
|
|
|
|
APPNAME = 'gtkmm2ext'
|
|
|
|
VERSION = GTKMM2EXT_VERSION
|
2011-11-21 16:27:30 -05:00
|
|
|
I18N_PACKAGE = 'gtkmm2ext3'
|
2009-02-25 18:48:10 -05:00
|
|
|
|
2009-08-08 18:36:32 -04:00
|
|
|
gtkmm2ext_sources = [
|
2011-03-16 12:32:56 -04:00
|
|
|
'actions.cc',
|
2010-08-16 22:48:24 -04:00
|
|
|
'application.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'auto_spin.cc',
|
|
|
|
'barcontroller.cc',
|
|
|
|
'binding_proxy.cc',
|
|
|
|
'bindable_button.cc',
|
2010-08-06 15:02:21 -04:00
|
|
|
'bindings.cc',
|
2011-06-01 07:51:32 -04:00
|
|
|
'cairocell.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'cell_renderer_pixbuf_multi.cc',
|
|
|
|
'cell_renderer_pixbuf_toggle.cc',
|
|
|
|
'choice.cc',
|
|
|
|
'click_box.cc',
|
|
|
|
'debug.cc',
|
|
|
|
'dndtreeview.cc',
|
|
|
|
'fastmeter.cc',
|
|
|
|
'focus_entry.cc',
|
|
|
|
'grouped_buttons.cc',
|
|
|
|
'gtk_ui.cc',
|
2010-03-16 11:33:04 -04:00
|
|
|
'gtkapplication.c',
|
2011-03-16 12:32:56 -04:00
|
|
|
'idle_adjustment.cc',
|
|
|
|
'keyboard.cc',
|
2010-03-10 12:31:16 -05:00
|
|
|
'motionfeedback.cc',
|
2010-05-06 17:02:08 -04:00
|
|
|
'prolooks_helpers.c',
|
2011-03-16 12:32:56 -04:00
|
|
|
'pixfader.cc',
|
|
|
|
'pixscroller.cc',
|
|
|
|
'popup.cc',
|
|
|
|
'prompter.cc',
|
|
|
|
'scroomer.cc',
|
|
|
|
'selector.cc',
|
|
|
|
'slider_controller.cc',
|
|
|
|
'stateful_button.cc',
|
|
|
|
'tearoff.cc',
|
|
|
|
'textviewer.cc',
|
2010-09-28 13:26:05 -04:00
|
|
|
'treeutils.cc',
|
2011-03-16 12:32:56 -04:00
|
|
|
'utils.cc',
|
|
|
|
'version.cc',
|
|
|
|
'window_title.cc'
|
2009-08-08 18:36:32 -04:00
|
|
|
]
|
|
|
|
|
2009-02-25 18:48:10 -05:00
|
|
|
# Mandatory variables
|
2011-09-29 15:17:54 -04:00
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
2009-02-25 18:48:10 -05:00
|
|
|
|
2009-02-25 21:24:16 -05:00
|
|
|
path_prefix = 'libs/gtkmm2ext/'
|
|
|
|
|
2011-09-29 15:17:54 -04:00
|
|
|
def options(opt):
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.set_options(opt)
|
2009-02-25 18:48:10 -05:00
|
|
|
|
|
|
|
def configure(conf):
|
2011-09-29 15:58:05 -04:00
|
|
|
conf.load('compiler_cxx')
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc',
|
|
|
|
'libgtkmm2ext', MAJOR, MINOR, MICRO)
|
|
|
|
autowaf.configure(conf)
|
|
|
|
autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8')
|
|
|
|
autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1')
|
2009-08-08 18:36:32 -04:00
|
|
|
|
2009-02-25 18:48:10 -05:00
|
|
|
|
|
|
|
def build(bld):
|
2011-09-29 15:17:54 -04:00
|
|
|
obj = bld(features = 'c cxx cxxshlib cshlib')
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source = gtkmm2ext_sources
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.export_includes = ['.']
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.includes = ['.']
|
|
|
|
obj.name = 'libgtkmm2ext'
|
|
|
|
obj.target = 'gtkmm2ext'
|
|
|
|
obj.uselib = 'GTKMM GTK GTKOSX OSX GDK'
|
2011-09-29 15:17:54 -04:00
|
|
|
obj.use = 'libpbd'
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.vnum = GTKMM2EXT_LIB_VERSION
|
|
|
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
2011-11-21 17:24:56 -05:00
|
|
|
obj.defines = [
|
|
|
|
'PACKAGE="' + I18N_PACKAGE + '"',
|
|
|
|
'LOCALEDIR="' + os.path.join(
|
2011-09-29 15:17:54 -04:00
|
|
|
os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('GTKOSX'):
|
2011-04-22 18:15:21 -04:00
|
|
|
obj.source += ['gtkapplication_quartz.mm']
|
|
|
|
else:
|
|
|
|
obj.source += ['gtkapplication_x11.c']
|
2009-02-25 18:48:10 -05:00
|
|
|
|
2011-06-12 18:05:55 -04:00
|
|
|
# i18n
|
2011-09-30 12:22:04 -04:00
|
|
|
if bld.is_defined('ENABLE_NLS'):
|
2011-11-05 12:35:24 -04:00
|
|
|
mo_files = bld.path.ant_glob('po/*.mo')
|
2011-06-12 18:05:55 -04:00
|
|
|
for mo in mo_files:
|
2011-11-05 12:35:24 -04:00
|
|
|
lang = os.path.basename(mo.srcpath()).replace('.mo', '')
|
|
|
|
bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
|
|
|
|
lang, 'LC_MESSAGES', 'libgtkmm2ext.mo'),
|
|
|
|
mo)
|
2011-06-12 18:05:55 -04:00
|
|
|
|
|
|
|
def i18n(bld):
|
2011-11-21 16:27:30 -05:00
|
|
|
autowaf.build_i18n(bld, top, 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
|
|
|
def i18n_pot(bld):
|
|
|
|
autowaf.build_i18n_pot(bld, top, 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
|
|
|
def i18n_po(bld):
|
|
|
|
autowaf.build_i18n_po(bld, top, 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
|
|
|
|
'Paul Davis')
|
|
|
|
|
|
|
|
def i18n_mo(bld):
|
|
|
|
autowaf.build_i18n_mo(bld, top, 'libs/gtkmm2ext', I18N_PACKAGE, gtkmm2ext_sources,
|
2011-11-05 12:35:24 -04:00
|
|
|
'Paul Davis')
|
2011-06-12 18:05:55 -04:00
|
|
|
|
2009-02-25 18:48:10 -05:00
|
|
|
def shutdown():
|
2011-04-22 18:15:21 -04:00
|
|
|
autowaf.shutdown()
|