Changeset View
Changeset View
Standalone View
Standalone View
mixxx/files/patch-build_depends.py
--- build/depends.py.orig 2015-12-29 16:10:41 UTC | --- build/depends.py 2018-04-15 13:30:27.000000000 -0500 | ||||
+++ build/depends.py | +++ build/depends.py 2018-04-23 21:50:54.360625000 -0500 | ||||
@@ -262,7 +262,7 @@ class Qt(Dependence): | @@ -12,7 +12,7 @@ | ||||
if not conf.CheckLib('portaudio'): | |||||
raise Exception( | |||||
'Did not find libportaudio.a, portaudio.lib, or the PortAudio-v19 development header files.') | |||||
- elif build.platform_is_linux: | |||||
+ elif build.platform_is_linux or build.platform_is_bsd: | |||||
build.env.ParseConfig('pkg-config portaudio-2.0 --silence-errors --cflags --libs') | |||||
# Turn on PortAudio support in Mixxx | |||||
@@ -74,7 +74,8 @@ | |||||
if (not conf.CheckLib('GLU') and | |||||
not conf.CheckLib('glu32') and | |||||
- not conf.CheckCHeader('OpenGL/glu.h')): | |||||
+ not conf.CheckCHeader('OpenGL/glu.h') and | |||||
+ not conf.CheckCHeader('GL/glu.h')): | |||||
raise Exception('Did not find GLU development files') | |||||
@@ -106,7 +107,7 @@ | |||||
class UPower(Dependence): | |||||
"""UPower is used to get battery measurements on Linux.""" | |||||
def configure(self, build, conf): | |||||
- if not build.platform_is_linux: | |||||
+ if not build.platform_is_linux or not build.platform_is_bsd: | |||||
return | |||||
build.env.ParseConfig( | |||||
'pkg-config upower-glib --silence-errors --cflags --libs') | |||||
@@ -185,15 +186,17 @@ | |||||
class Qt(Dependence): | |||||
DEFAULT_QT4DIRS = {'linux': '/usr/share/qt4', | |||||
- 'bsd': '/usr/local/lib/qt4', | |||||
+ 'bsd': '%%LOCALBASE%%/share/qt4', | |||||
'osx': '/Library/Frameworks', | |||||
'windows': 'C:\\qt\\4.6.0'} | |||||
DEFAULT_QT5DIRS64 = {'linux': '/usr/lib/x86_64-linux-gnu/qt5', | |||||
+ 'bsd': '%%LOCALBASE%%/lib/qt5', | |||||
'osx': '/Library/Frameworks', | |||||
'windows': 'C:\\qt\\5.0.1'} | |||||
DEFAULT_QT5DIRS32 = {'linux': '/usr/lib/i386-linux-gnu/qt5', | |||||
+ 'bsd': '%%LOCALBASE%%/lib/qt5', | |||||
'osx': '/Library/Frameworks', | |||||
'windows': 'C:\\qt\\5.0.1'} | |||||
@@ -299,9 +302,17 @@ | |||||
build.env.Append(CCFLAGS='-fPIC') | |||||
elif build.platform_is_bsd: | elif build.platform_is_bsd: | ||||
build.env.Append(LIBS=qt_modules) | - build.env.Append(LIBS=qt_modules) | ||||
- include_paths = ['$QTDIR/include/%s' % module | - include_paths = ['$QTDIR/include/%s' % module | ||||
- for module in qt_modules] | |||||
+ qt_modules.extend(['QtDBus']) | |||||
+ if qt5: | |||||
+ qt5_modules = [w.replace('Qt', 'Qt5') for w in qt_modules] | |||||
+ build.env.Append(LIBS = qt5_modules) | |||||
+ build.env.Append(CCFLAGS='-fPIC') | |||||
+ include_paths = ['%%LOCALBASE%%/include/qt5/%s' % module | |||||
+ for module in qt_modules] | |||||
+ else: | |||||
+ build.env.Append(LIBS = qt_modules) | |||||
+ include_paths = ['%%LOCALBASE%%/include/qt4/%s' % module | + include_paths = ['%%LOCALBASE%%/include/qt4/%s' % module | ||||
for module in qt_modules] | + for module in qt_modules] | ||||
build.env.Append(CPPPATH=include_paths) | build.env.Append(CPPPATH=include_paths) | ||||
elif build.platform_is_osx: | elif build.platform_is_osx: | ||||
@@ -358,7 +358,7 @@ class Qt(Dependence): | qtdir = build.env['QTDIR'] | ||||
@@ -426,7 +437,7 @@ | |||||
if not build.platform_is_windows and not (using_104_sdk or compiling_on_104): | if not build.platform_is_windows and not (using_104_sdk or compiling_on_104): | ||||
qtdir = build.env['QTDIR'] | qtdir = build.env['QTDIR'] | ||||
framework_path = Qt.find_framework_libdir(qtdir, qt5) | framework_path = Qt.find_framework_libdir(qtdir, qt5) | ||||
- if os.path.isdir(framework_path): | - if os.path.isdir(framework_path): | ||||
+ if framework_path and os.path.isdir(framework_path): | + if framework_path and os.path.isdir(framework_path): | ||||
build.env.Append(LINKFLAGS="-Wl,-rpath," + framework_path) | |||||
build.env.Append(LINKFLAGS="-L" + framework_path) | build.env.Append(LINKFLAGS="-L" + framework_path) | ||||
@@ -1045,7 +1045,6 @@ class MixxxCore(Feature): | # Mixxx requires C++11 support. Windows enables C++11 features by | ||||
@@ -520,7 +531,7 @@ | |||||
if env is None: | |||||
env = build.env | |||||
- if build.platform_is_linux: | |||||
+ if build.platform_is_linux or build.platform_is_bsd: | |||||
# Try using system lib | |||||
if conf.CheckForPKG('soundtouch', '1.8.0'): | |||||
# System Lib found | |||||
@@ -564,7 +575,7 @@ | |||||
# the files correctly. Adding this folder ot the include path should fix | |||||
# it, though might cause issues. This is safe to remove once we | |||||
# deprecate Karmic support. rryan 2/2011 | |||||
- build.env.Append(CPPPATH='/usr/include/taglib/') | |||||
+ build.env.Append(CPPPATH='%%LOCALBASE%%/include/taglib/') | |||||
if build.platform_is_windows and build.static_dependencies: | |||||
build.env.Append(CPPDEFINES='TAGLIB_STATIC') | |||||
@@ -1267,7 +1278,6 @@ | |||||
if build.toolchain_is_gnu: | if build.toolchain_is_gnu: | ||||
# Default GNU Options | # Default GNU Options | ||||
- build.env.Append(CCFLAGS='-pipe') | - build.env.Append(CCFLAGS='-pipe') | ||||
build.env.Append(CCFLAGS='-Wall') | build.env.Append(CCFLAGS='-Wall') | ||||
build.env.Append(CCFLAGS='-Wextra') | if build.compiler_is_clang: | ||||
# Quiet down Clang warnings about inconsistent use of override | |||||
@@ -1375,9 +1385,9 @@ | |||||
@@ -1146,11 +1145,13 @@ class MixxxCore(Feature): | elif build.platform_is_osx: | ||||
# Stuff you may have compiled by hand | |||||
- if os.path.isdir('/usr/local/include'): | |||||
- build.env.Append(LIBPATH=['/usr/local/lib']) | |||||
- build.env.Append(CPPPATH=['/usr/local/include']) | |||||
+ if os.path.isdir('%%LOCALBASE%%/include'): | |||||
+ build.env.Append(LIBPATH=['%%LOCALBASE%%/lib']) | |||||
+ build.env.Append(CPPPATH=['%%LOCALBASE%%/include']) | |||||
# Non-standard libpaths for fink and certain (most?) darwin ports | |||||
if os.path.isdir('/sw/include'): | |||||
@@ -1392,15 +1402,17 @@ | |||||
elif build.platform_is_bsd: | elif build.platform_is_bsd: | ||||
build.env.Append(CPPDEFINES='__BSD__') | build.env.Append(CPPDEFINES='__BSD__') | ||||
- build.env.Append(CPPPATH=['/usr/include', | build.env.Append(CPPPATH=['/usr/include', | ||||
- '/usr/local/include', | - '/usr/local/include', | ||||
+ build.env.Append(CPPPATH=['%%LOCALBASE%%/include/portaudio2', | - '/usr/X11R6/include/']) | ||||
+ '%%LOCALBASE%%/include/qt4', | |||||
+ '%%LOCALBASE%%/include', | + '%%LOCALBASE%%/include', | ||||
'/usr/X11R6/include/']) | + '%%LOCALBASE%%/include/qt4', | ||||
- build.env.Append(LIBPATH=['/usr/lib/', | + '%%LOCALBASE%%/include/qt5']) | ||||
build.env.Append(LIBPATH=['/usr/lib/', | |||||
- '/usr/local/lib', | - '/usr/local/lib', | ||||
+ build.env.Append(LIBPATH=['%%LOCALBASE%%/lib/portaudio2', | - '/usr/X11R6/lib']) | ||||
+ '%%LOCALBASE%%/lib/qt4', | |||||
+ '%%LOCALBASE%%/lib', | + '%%LOCALBASE%%/lib', | ||||
'/usr/X11R6/lib']) | + '%%LOCALBASE%%/lib/qt4', | ||||
+ '%%LOCALBASE%%/lib/qt5']) | |||||
build.env.Append(LIBS='pthread') | build.env.Append(LIBS='pthread') | ||||
# why do we need to do this on OpenBSD and not on Linux? if we | # why do we need to do this on OpenBSD and not on Linux? if we | ||||
@@ -1188,7 +1189,7 @@ class MixxxCore(Feature): | # don't then CheckLib("vorbisfile") fails | ||||
- build.env.Append(LIBS=['ogg', 'vorbis']) | |||||
+ build.env.Append(LIBS=['ogg', 'vorbis','X11']) | |||||
# Define for things that would like to special case UNIX (Linux or BSD) | |||||
if build.platform_is_bsd or build.platform_is_linux: | |||||
@@ -1433,7 +1445,7 @@ | |||||
# Say where to find resources on Unix. TODO(XXX) replace this with a | # Say where to find resources on Unix. TODO(XXX) replace this with a | ||||
# RESOURCE_PATH that covers Win and OSX too: | # RESOURCE_PATH that covers Win and OSX too: | ||||
if build.platform_is_linux or build.platform_is_bsd: | if build.platform_is_linux or build.platform_is_bsd: | ||||
- prefix = SCons.ARGUMENTS.get('prefix', '/usr/local') | - prefix = SCons.ARGUMENTS.get('prefix', '/usr/local') | ||||
+ prefix = SCons.ARGUMENTS.get('prefix', '%%PREFIX%%') | + prefix = SCons.ARGUMENTS.get('prefix', '%%PREFIX%%') | ||||
share_path = os.path.join (prefix, build.env.get( | share_path = os.path.join (prefix, build.env.get( | ||||
'SHAREDIR', default='share'), 'mixxx') | 'SHAREDIR', default='share'), 'mixxx') | ||||
build.env.Append( | build.env.Append( | ||||
@@ -1199,7 +1200,7 @@ class MixxxCore(Feature): | @@ -1444,7 +1456,7 @@ | ||||
CPPDEFINES=('UNIX_LIB_PATH', r'\"%s\"' % lib_path)) | CPPDEFINES=('UNIX_LIB_PATH', r'\"%s\"' % lib_path)) | ||||
def depends(self, build): | def depends(self, build): | ||||
- return [SoundTouch, ReplayGain, PortAudio, PortMIDI, Qt, TestHeaders, | - return [SoundTouch, ReplayGain, Ebur128Mit, PortAudio, PortMIDI, Qt, TestHeaders, | ||||
+ return [SoundTouch, ReplayGain, PortAudio, Qt, TestHeaders, | + return [SoundTouch, ReplayGain, Ebur128Mit, PortAudio, Qt, TestHeaders, | ||||
FidLib, SndFile, FLAC, OggVorbis, OpenGL, TagLib, ProtoBuf, | FidLib, SndFile, FLAC, OggVorbis, OpenGL, TagLib, ProtoBuf, | ||||
Chromaprint, RubberBand, SecurityFramework, CoreServices, FpClassify] | Chromaprint, RubberBand, SecurityFramework, CoreServices, IOKit, | ||||
QtScriptByteArray, Reverb, FpClassify, PortAudioRingBuffer] |