Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shoutcast_internal always 0 bug in master #2438

Merged
merged 5 commits into from
Jan 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions build/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ def sources(self, build):


class LiveBroadcasting(Feature):
INTERNAL_LINK = False

def description(self):
return "Live Broadcasting Support"

Expand All @@ -825,42 +827,35 @@ 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):
return

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()
Expand Down