summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-01-20 20:47:11 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-01-20 20:47:11 +0100
commit47e459f30397d41a500b4343c96d8ff293bb30a3 (patch)
treee8d223e7b3c439480a880f92e0b3e4d124224ef0 /build
parent8e026d3ae5222055c3c4e69ec45004ffbef69372 (diff)
parentc485466373555d41e926cc67802528f9552ee021 (diff)
Merge remote-tracking branch 'upstream/2.2'
Diffstat (limited to 'build')
-rw-r--r--build/features.py29
1 files changed, 12 insertions, 17 deletions
diff --git a/build/features.py b/build/features.py
index f6292f3afd..993d6a2824 100644
--- a/build/features.py
+++ b/build/features.py
@@ -682,19 +682,19 @@ class TestSuite(Feature):
class LiveBroadcasting(Feature):
+ INTERNAL_LINK = False
+
def description(self):
return "Live Broadcasting Support"
def enabled(self, build):
build.flags['shoutcast'] = util.get_flags(build.env, 'shoutcast', 1)
- build.flags['shoutcast_internal'] = util.get_flags(build.env, 'shoutcast_internal', 0)
if int(build.flags['shoutcast']):
return True
return False
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):
@@ -702,33 +702,28 @@ class LiveBroadcasting(Feature):
build.env.Append(CPPDEFINES='__BROADCAST__')
- 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()