diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2019-12-17 23:20:27 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2019-12-17 23:20:27 +0100 |
commit | c22307d1b550d2b1c62eb97eaa2269af00dc82a4 (patch) | |
tree | 6ec94be9b2b665b882882638b412d464420d0c35 /build/features.py | |
parent | 4ab24fb9d8824841f7062ca4e5497d9552a115ff (diff) | |
parent | 17b8e321a28dbb31e2dddfa2f04a0772266de4f5 (diff) |
Merge branch '2.2' of git@github.com:mixxxdj/mixxx.git
# Conflicts:
# build/depends.py
# build/features.py
Diffstat (limited to 'build/features.py')
-rw-r--r-- | build/features.py | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/build/features.py b/build/features.py index 31114c39fa..29ddee2932 100644 --- a/build/features.py +++ b/build/features.py @@ -688,14 +688,32 @@ class LiveBroadcasting(Feature): 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 - libshout_found = conf.CheckLib(['libshout', 'shout']) 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 + # 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 int(build.flags['shoutcast_internal']): + 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.') @@ -705,6 +723,26 @@ class LiveBroadcasting(Feature): conf.CheckLib('gdi32') def sources(self, build): + if int(build.flags['shoutcast_internal']): + # Clone our main environment so we don't change any settings in the + # Mixxx environment + libshout_env = build.env.Clone() + + if build.toolchain_is_gnu: + libshout_env.Append(CCFLAGS='-pthread') + libshout_env.Append(LINKFLAGS='-pthread') + + libshout_env.Append(CPPPATH="#lib/libshout") + libshout_dir = libshout_env.Dir("#lib/libshout") + + env = libshout_env + SCons.Export('env') + SCons.Export('build') + env.SConscript(env.File('SConscript', libshout_dir)) + + build.env.Append(LIBPATH=libshout_dir) + build.env.Append(LIBS=['shout_mixxx', 'ogg', 'vorbis', 'theora', 'speex', 'ssl', 'crypto']) + depends.Qt.uic(build)('src/preferences/dialog/dlgprefbroadcastdlg.ui') return ['src/preferences/dialog/dlgprefbroadcast.cpp', 'src/broadcast/broadcastmanager.cpp', |