Skip to content

Commit

Permalink
Merge branch 'master' into clone-deck-opt-out
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 authored Jun 26, 2019
2 parents 9693de5 + 9b3c301 commit d2634d7
Show file tree
Hide file tree
Showing 409 changed files with 16,460 additions and 57,756 deletions.
34 changes: 34 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
BasedOnStyle: Google
IndentWidth: 4
TabWidth: 8
UseTab: Never
# NOTE(2019-02-23, uklotzde) The column limit has been set to 0
# to avoid eagerly reformatting of the existing code base. This
# may later be changed to 80-100 characters per line if desired.
ColumnLimit: 0
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: DontAlign
AlignOperands: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
IndentCaseLabels: false
ReflowComments: false
SpaceAfterTemplateKeyword: false
SpacesBeforeTrailingComments: 1
---
Language: JavaScript
# Don't format .js files yet
DisableFormat: true
---
Language: Proto
# Don't format .proto files yet
DisableFormat: true
...
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ install:
# Build flags common to OS X and Linux.
# Parallel builds are important for avoiding OSX build timeouts.
# We turn off verbose output to avoid going over the 4MB output limit.
- export COMMON="-j4 qt5=1 test=1 mad=1 faad=1 ffmpeg=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0"
- export COMMON="-j4 test=1 mad=1 faad=1 ffmpeg=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0"

#####
# Ubuntu Trusty Build
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Remove VAMP plugin support. vamp-plugin-sdk and vamp-hostsdk are no longer required dependencies.
* Remove SoundSource plugin support. [lp:1792747](https://bugs.launchpad.net/mixxx/+bug/1792747)
* Add Opus streaming and recording support. [lp:1338413](https://bugs.launchpad.net/mixxx/+bug/1338413)
* Add mapping for Roland DJ-505

## [2.2.1](https://launchpad.net/mixxx/+milestone/2.2.1) (2019-04-22)

Expand Down
7 changes: 2 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,12 @@ available_features = [features.Mad,
features.LocaleCompare,
features.Lilv,
features.Battery,
features.QtKeychain,

# "Features" of dubious quality
features.PerfTools,
features.AsmLib,
features.FFMPEG,

# Experimental features
features.OpenGLES,
features.QtKeychain
features.FFMPEG
]

build = mixxx.MixxxBuild(target, machine, build_type,
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for:

install:
- sudo apt-get update
- sudo apt-get -y install gdb libavformat-dev libchromaprint-dev libfaad-dev libflac-dev libid3tag0-dev libmad0-dev libmodplug-dev libmp3lame-dev libmp4v2-dev libopus-dev libopusfile-dev libportmidi-dev libprotobuf-dev libqt5opengl5-dev libqt5sql5-sqlite libqt5svg5-dev librubberband-dev libshout3-dev libsndfile1-dev libsqlite3-dev libtag1-dev libupower-glib-dev libusb-1.0-0-dev libwavpack-dev portaudio19-dev protobuf-compiler qt5-default qtscript5-dev libqt5x11extras5-dev scons qtkeychain-dev liblilv-dev libsoundtouch-dev
- sudo apt-get -y install gdb libavformat-dev libchromaprint-dev libfaad-dev libflac-dev libid3tag0-dev libmad0-dev libmodplug-dev libmp3lame-dev libmp4v2-dev libopus-dev libopusfile-dev libportmidi-dev libprotobuf-dev libqt5opengl5-dev libqt5sql5-sqlite libqt5svg5-dev librubberband-dev libshout3-dev libsndfile1-dev libsqlite3-dev libtag1-dev libupower-glib-dev libusb-1.0-0-dev libwavpack-dev portaudio19-dev protobuf-compiler qt5-default qtscript5-dev libqt5x11extras5-dev scons qt5keychain-dev liblilv-dev libsoundtouch-dev

build_script:
- scons -j4 test=1 mad=1 faad=1 ffmpeg=1 opus=1 modplug=1 wv=1 hss1394=0 virtualize=0 debug_assertions_fatal=1 verbose=0 localecompare=1
Expand Down
48 changes: 28 additions & 20 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ def configure(self, build, conf):
build.env.Append(LINKFLAGS='-framework IOKit')

class UPower(Dependence):
"""UPower is used to get battery measurements on Linux."""
"""UPower is used to get battery measurements on Linux and BSD."""
def configure(self, build, conf):
if not build.platform_is_linux:
if not build.platform_is_linux and not build.platform_is_bsd:
return
build.env.ParseConfig(
'pkg-config upower-glib --silence-errors --cflags --libs')
Expand Down Expand Up @@ -192,10 +192,12 @@ def sources(self, build):

class Qt(Dependence):
DEFAULT_QT5DIRS64 = {'linux': '/usr/lib/x86_64-linux-gnu/qt5',
'bsd': '/usr/local/lib/qt5',
'osx': '/Library/Frameworks',
'windows': 'C:\\qt\\5.11.1'}

DEFAULT_QT5DIRS32 = {'linux': '/usr/lib/i386-linux-gnu/qt5',
'bsd': '/usr/local/lib/qt5',
'osx': '/Library/Frameworks',
'windows': 'C:\\qt\\5.11.1'}

Expand All @@ -207,7 +209,7 @@ def uic(build):
def find_framework_libdir(qtdir):
# Try pkg-config on Linux
import sys
if sys.platform.startswith('linux'):
if sys.platform.startswith('linux') or sys.platform.find('bsd') >= 0:
if any(os.access(os.path.join(path, 'pkg-config'), os.X_OK) for path in os.environ["PATH"].split(os.pathsep)):
import subprocess
try:
Expand Down Expand Up @@ -293,7 +295,7 @@ def configure(self, build, conf):
conf.CheckLib('sqlite3');

# Enable Qt include paths
if build.platform_is_linux:
if build.platform_is_linux or build.platform_is_bsd:
if not conf.CheckForPKG('Qt5Core', '5.0'):
raise Exception('Qt >= 5.0 not found')

Expand All @@ -315,11 +317,6 @@ def configure(self, build, conf):
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65886#c30
build.env.Append(CCFLAGS='-fPIC')

elif build.platform_is_bsd:
build.env.Append(LIBS=qt_modules)
include_paths = ['$QTDIR/include/%s' % module
for module in qt_modules]
build.env.Append(CPPPATH=include_paths)
elif build.platform_is_osx:
qtdir = build.env['QTDIR']
build.env.Append(
Expand Down Expand Up @@ -446,10 +443,13 @@ def configure(self, build, conf):
build.env.Append(LINKFLAGS=['-Wl,-rpath,%s' % libdir_path])
build.env.Append(LINKFLAGS="-L" + libdir_path)

# Mixxx requires C++11 support. Windows enables C++11 features by
# default but Clang/GCC require a flag.
if not build.platform_is_windows:
build.env.Append(CXXFLAGS='-std=c++11')
# Mixxx requires C++14 support
if build.platform_is_windows:
# MSVC
build.env.Append(CXXFLAGS='/std:c++14')
else:
# GCC/Clang
build.env.Append(CXXFLAGS='-std=c++14')


class TestHeaders(Dependence):
Expand Down Expand Up @@ -525,7 +525,7 @@ def configure(self, build, conf, env=None):
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', '2.0.0'):
# System Lib found
Expand Down Expand Up @@ -566,7 +566,6 @@ def sources(self, build):
#"#lib/qm-dsp/base/KaiserWindow.cpp",
"#lib/qm-dsp/base/Pitch.cpp",
#"#lib/qm-dsp/base/SincWindow.cpp",
"#lib/qm-dsp/dsp/chromagram/CQprecalc.cpp",
"#lib/qm-dsp/dsp/chromagram/Chromagram.cpp",
"#lib/qm-dsp/dsp/chromagram/ConstantQ.cpp",
"#lib/qm-dsp/dsp/keydetection/GetKeyMode.cpp",
Expand Down Expand Up @@ -595,7 +594,7 @@ def sources(self, build):
"#lib/qm-dsp/dsp/transforms/FFT.cpp",
#"#lib/qm-dsp/dsp/wavelet/Wavelet.cpp",
"#lib/qm-dsp/ext/kissfft/kiss_fft.c",
"#lib/qm-dsp/ext/kissfft/kiss_fftr.c",
"#lib/qm-dsp/ext/kissfft/tools/kiss_fftr.c",
#"#lib/qm-dsp/hmm/hmm.c",
"#lib/qm-dsp/maths/Correlation.cpp",
#"#lib/qm-dsp/maths/CosineDistance.cpp",
Expand Down Expand Up @@ -862,6 +861,7 @@ def sources(self, build):
"src/analyzer/plugins/analyzersoundtouchbeats.cpp",
"src/analyzer/plugins/analyzerqueenmarybeats.cpp",
"src/analyzer/plugins/analyzerqueenmarykey.cpp",
"src/analyzer/plugins/buffering_utils.cpp",

"src/controllers/controller.cpp",
"src/controllers/controllerdebug.cpp",
Expand Down Expand Up @@ -1103,6 +1103,7 @@ def sources(self, build):
"src/waveform/renderers/waveformrendererrgb.cpp",
"src/waveform/renderers/qtwaveformrendererfilteredsignal.cpp",
"src/waveform/renderers/qtwaveformrenderersimplesignal.cpp",
"src/waveform/renderers/qtvsynctestrenderer.cpp",

"src/waveform/renderers/waveformsignalcolors.cpp",

Expand All @@ -1122,8 +1123,11 @@ def sources(self, build):
"src/waveform/widgets/softwarewaveformwidget.cpp",
"src/waveform/widgets/hsvwaveformwidget.cpp",
"src/waveform/widgets/rgbwaveformwidget.cpp",
"src/waveform/widgets/qthsvwaveformwidget.cpp",
"src/waveform/widgets/qtrgbwaveformwidget.cpp",
"src/waveform/widgets/qtwaveformwidget.cpp",
"src/waveform/widgets/qtsimplewaveformwidget.cpp",
"src/waveform/widgets/qtvsynctestwidget.cpp",
"src/waveform/widgets/glwaveformwidget.cpp",
"src/waveform/widgets/glsimplewaveformwidget.cpp",
"src/waveform/widgets/glvsynctestwidget.cpp",
Expand Down Expand Up @@ -1356,6 +1360,14 @@ def configure(self, build, conf):
# Default GNU Options
build.env.Append(CCFLAGS='-pipe')
build.env.Append(CCFLAGS='-Wall')
build.env.Append(CCFLAGS='-Wextra')

if build.compiler_is_gcc and build.gcc_major_version >= 9:
# Avoid many warnings from GCC 9 about implicitly defined copy assignment
# operators that are deprecated for classes with a user-provided copy
# constructor. This affects both Qt 5.12 and Mixxx.
build.env.Append(CXXFLAGS='-Wno-deprecated-copy')

if build.compiler_is_clang:
# Quiet down Clang warnings about inconsistent use of override
# keyword until Qt fixes qt_metacall.
Expand All @@ -1371,7 +1383,6 @@ def configure(self, build, conf):
# Enable thread-safety analysis.
# http://clang.llvm.org/docs/ThreadSafetyAnalysis.html
build.env.Append(CCFLAGS='-Wthread-safety')
build.env.Append(CCFLAGS='-Wextra')

# Always generate debugging info.
build.env.Append(CCFLAGS='-g')
Expand Down Expand Up @@ -1481,9 +1492,6 @@ def configure(self, build, conf):
'/usr/local/lib',
'/usr/X11R6/lib'])
build.env.Append(LIBS='pthread')
# why do we need to do this on OpenBSD and not on Linux? if we
# don't then CheckLib("vorbisfile") fails
build.env.Append(LIBS=['ogg', 'vorbis'])

# Define for things that would like to special case UNIX (Linux or BSD)
if build.platform_is_bsd or build.platform_is_linux:
Expand Down
24 changes: 2 additions & 22 deletions build/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,6 @@
import SCons.Script as SCons
from . import depends

class OpenGLES(Feature):
def description(self):
return "OpenGL-ES >= 2.0 support [Experimental]"

def enabled(self, build):
build.flags['opengles'] = util.get_flags(build.env, 'opengles', 0)
return int(build.flags['opengles'])

def add_options(self, build, vars):
vars.Add('opengles', 'Set to 1 to enable OpenGL-ES >= 2.0 support [Experimental]', 0)

def configure(self, build, conf):
if not self.enabled(build):
return
if build.flags['opengles']:
build.env.Append(CPPDEFINES='__OPENGLES__')

def sources(self, build):
return []

class HSS1394(Feature):
def description(self):
return "HSS1394 MIDI device support"
Expand Down Expand Up @@ -83,7 +63,7 @@ def configure(self, build, conf):
if not self.enabled(build):
return

if build.platform_is_linux:
if build.platform_is_linux or build.platform_is_bsd:
# Try using system lib
if not conf.CheckLib(['hidapi-libusb', 'libhidapi-libusb']):
# No System Lib found
Expand Down Expand Up @@ -1199,7 +1179,7 @@ def sources(self, build):
return ["src/util/battery/batterywindows.cpp"]
elif build.platform_is_osx:
return ["src/util/battery/batterymac.cpp"]
elif build.platform_is_linux:
elif build.platform_is_linux or build.platform_is_bsd:
return ["src/util/battery/batterylinux.cpp"]
else:
raise Exception('Battery support is not implemented for the target platform.')
Expand Down
28 changes: 23 additions & 5 deletions build/mixxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, target, machine, build, toolchain, available_features):
raise Exception("invalid target platform")

if machine.lower() not in ['x86_64', 'x86', 'i686', 'i586',
'alpha', 'hppa', 'mips', 'mipsel', 's390',
'alpha', 'hppa', 's390',
'sparc', 'ia64', 'armel', 'armhf', 'hurd-i386',
'armv5tel', 'armv5tejl', 'armv6l', 'armv6hl',
'armv7l', 'armv7hl', 'armv7hnl',
Expand All @@ -55,8 +55,11 @@ def __init__(self, target, machine, build, toolchain, available_features):
'i486', 'i386', 'ppc', 'ppc64', 'powerpc',
'powerpc64', 'powerpcspe', 's390x',
'amd64', 'em64t', 'intel64', 'arm64',
'ppc64el', 'ppc64le', 'm68k', 'mips64',
'mips64el', 'mipsn32', 'mipsn32el',
'ppc64el', 'ppc64le', 'm68k',
'mips', 'mipsel', 'mipsr6', 'mipsr6el',
'mips64', 'mips64r6', 'mips64el', 'mips64r6el',
'mipsn32', 'mipsn32el', 'mipsn32r6', 'mipsn32r6el',
'mipsisa32r6', 'mipsisa32r6el', 'mipsisa64r6', 'mipsisa64r6el',
'aarch64']:
raise Exception("invalid machine type")

Expand Down Expand Up @@ -208,8 +211,23 @@ def __init__(self, target, machine, build, toolchain, available_features):
self.read_environment_variables()

# Now that environment variables have been read, we can detect the compiler.
self.compiler_is_gcc = 'gcc' in self.env['CC']
self.compiler_is_clang = 'clang' in self.env['CC']
import subprocess
process = subprocess.Popen("%s %s" %(self.env['CC'], '--version'), stdout=subprocess.PIPE, shell=True) # nosec
(stdout, stderr) = process.communicate()
self.compiler_is_gcc = 'gcc' in stdout.lower()
self.compiler_is_clang = 'clang' in stdout.lower()

# Determine the major compiler version (only GCC)
if self.compiler_is_gcc:
self.gcc_major_version = None
process = subprocess.Popen("%s %s" %(self.env['CC'], '-dumpversion'), stdout=subprocess.PIPE, shell=True) # nosec
(stdout, stderr) = process.communicate()
gcc_version = stdout
# If match is None we don't know the version.
if not gcc_version is None:
version_split = gcc_version.split('.')
if version_split:
self.gcc_major_version = int(version_split[0])

self.virtualize_build_dir()

Expand Down
2 changes: 1 addition & 1 deletion build/osx/golden_environment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3-j00002-e5dbf6e0-osx10.11-x86_64-release
2.3-j00004-497fe02e-osx10.11-x86_64-release
3 changes: 2 additions & 1 deletion build/qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,8 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, staticdeps=
try : self.AppendUnique(CPPDEFINES=moduleDefines[module])
except: pass
debugSuffix = ''
if (sys.platform.startswith("linux") or sys.platform.startswith("darwin")) and not crosscompiling :
if (sys.platform.startswith("linux") or sys.platform.startswith("darwin") or
sys.platform.find("bsd") >= 0) and not crosscompiling :
if debug : debugSuffix = '_debug'
# Call _find_qtdirs with QtCore to get at least one initialized for later usage with RPATH
qt_dirs = _find_qtdirs("$QT5DIR","QtCore")
Expand Down
2 changes: 1 addition & 1 deletion build/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def get_build_dir(platformString, bitwidth):
def get_mixxx_version():
"""Get Mixxx version number from defs_version.h"""
# have to handle out-of-tree building, that's why the '#' :(
defs = Script.File('#src/defs_version.h')
defs = Script.File('#src/_version.h')
version = ""

for line in open(str(defs)).readlines():
Expand Down
Loading

0 comments on commit d2634d7

Please sign in to comment.