From 5907f3eb036bb0252e61f332c155eddd706465aa Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 8 Mar 2013 03:39:58 +0000 Subject: [PATCH] potential fix, part two, for Tiger-based font issues. this also switches things so that building on Lion or Mountain Lion sets MAC_OS_VERSION_MIN_REQUIRED to 1070, to avoid legacy stuff git-svn-id: svn://localhost/ardour2/branches/3.0@14179 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/main.cc | 4 ++++ wscript | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 850b1141d1..a5973b03b3 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -222,6 +222,7 @@ fixup_bundle_environment (int, char* []) } static void load_custom_fonts() { +#if MAC_OS_X_VERSION_MIN_REQUIRED > 1060 std::string ardour_mono_file; if (!find_file_in_search_path (ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) { @@ -239,6 +240,9 @@ static void load_custom_fonts() { if (CTFontManagerRegisterFontsForURL(fontURL, kCTFontManagerScopeProcess, &error) != true) { cerr << _("Cannot load ArdourMono TrueType font.") << endl; } +#else + /* no real usable API for this on OS X 10.5 or below */ +#endif } #else diff --git a/wscript b/wscript index ee6b7214f9..d830a646fc 100644 --- a/wscript +++ b/wscript @@ -164,8 +164,10 @@ def set_compiler_flags (conf,opt): conf.env['build_target'] = 'leopard' elif re.search ("^10[.]", version) != None: conf.env['build_target'] = 'snowleopard' - else: + elif re.search ("^11[.]", version) != None: conf.env['build_target'] = 'lion' + else: + conf.env['build_target'] = 'mountainlion' else: if re.search ("x86_64", cpu) != None: conf.env['build_target'] = 'x86_64' @@ -281,12 +283,16 @@ def set_compiler_flags (conf,opt): # a single way to test if we're on OS X # - if conf.env['build_target'] in ['panther', 'tiger', 'leopard', 'snowleopard', 'lion', 'mountainlion' ]: + if conf.env['build_target'] in ['panther', 'tiger', 'leopard', 'snowleopard' ]: conf.define ('IS_OSX', 1) # force tiger or later, to avoid issues on PPC which defaults # back to 10.1 if we don't tell it otherwise. + conf.env.append_value('CFLAGS', "-DMAC_OS_X_VERSION_MIN_REQUIRED=1040") + else if conf.env['build_target'] in [ 'lion', 'mountainlion' ]: + conf.env.append_value('CFLAGS', "-DMAC_OS_X_VERSION_MIN_REQUIRED=1070") + else: conf.define ('IS_OSX', 0)