diff --git a/build/features.py b/build/features.py index 3a558e53c38f..f632623e16d3 100644 --- a/build/features.py +++ b/build/features.py @@ -814,6 +814,8 @@ def sources(self, build): class LiveBroadcasting(Feature): + INTERNAL_LINK = False + def description(self): return "Live Broadcasting Support" @@ -825,7 +827,6 @@ def enabled(self, build): def add_options(self, build, vars): vars.Add('shoutcast', 'Set to 1 to enable live broadcasting support', 1) - vars.Add('shoutcast_internal', 'Set to 1 to use internal libshout', 0) def configure(self, build, conf): if not self.enabled(build): @@ -833,34 +834,28 @@ def configure(self, build, conf): build.env.Append(CPPDEFINES='__BROADCAST__') - build.flags['shoutcast_internal'] = util.get_flags(build.env, 'shoutcast_internal', 0) - if build.platform_is_linux and not int(build.flags['shoutcast_internal']): - # Check if system lib is lower 2.4.2 or 2.4.3 and not suffering bug + if build.platform_is_linux: + # Check if system lib is lower at least 2.4.4 and not suffering bug # https://bugs.launchpad.net/mixxx/+bug/1833225 - if not conf.CheckForPKG('shout', '2.4.3'): - if conf.CheckForPKG('shout', '2.4.2'): - print("System's libshout 2.4.2 suffers lp1833225, using internal shout_mixxx") - build.flags['shoutcast_internal'] = 1 - else: - print("(no) here is fine here we just don't want 2.4.2") + if not conf.CheckForPKG('shout', '2.4.4'): + self.INTERNAL_LINK = True + + if not self.INTERNAL_LINK: + self.INTERNAL_LINK = not conf.CheckLib(['libshout', 'shout']) - if int(build.flags['shoutcast_internal']): + if self.INTERNAL_LINK: + print("Using internal shout_mixxx from lib/libshout") build.env.Append(CPPPATH='include') build.env.Append(CPPPATH='src') return - libshout_found = conf.CheckLib(['libshout', 'shout']) - - if not libshout_found: - raise Exception('Could not find libshout or its development headers. Please install it or compile Mixxx without Shoutcast support using the shoutcast=0 flag.') - if build.platform_is_windows and build.static_dependencies: conf.CheckLib('winmm') conf.CheckLib('ws2_32') conf.CheckLib('gdi32') def sources(self, build): - if int(build.flags['shoutcast_internal']): + if self.INTERNAL_LINK: # Clone our main environment so we don't change any settings in the # Mixxx environment libshout_env = build.env.Clone()