Skip to content

Commit

Permalink
Merge pull request #358 from NatronGitHub/RB-2.3-sdk-upgrade
Browse files Browse the repository at this point in the history
Rb 2.3 sdk upgrade
  • Loading branch information
devernay committed Jun 3, 2019
2 parents 4fa32a9 + e60ac52 commit 7111cb4
Show file tree
Hide file tree
Showing 116 changed files with 2,124 additions and 682 deletions.
15 changes: 8 additions & 7 deletions Documentation/source/guide/getstarted-installation-linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ This chapter will guide your through the installation and maintenance of Natron
Requirements
------------

Natron will work on any distribution released after 2010, this includes (but not limited to):
Natron will work on any Linux distribution which still receives seccurity updates.
This includes (but not limited to):

* CentOS/RHEL 6.4 and higher
* Fedora 14 and higher
* Ubuntu 10.04 and higher
* Debian 7 and higher
* `CentOS <https://www.centos.org/>`_ / `RHEL <https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux>`_ 6.10 and later
* `Debian <https://www.debian.org/>`_ 8 "Jessie" and later
* `Ubuntu <https://www.ubuntu.com/>`_ 16.04 LTS (Xenial Xerus) and later
* `Fedora <https://getfedora.org>`_ 28 and later

The basic requirements are:
The official binaries are built on CentOS 6.10, thus the basic system requirements are:

* x86 compatible CPU (Core2 x86_64 or higher recommended)
* Linux 2.6.18 and higher
* Linux 2.6.32 and higher
* Glibc 2.12 and higher
* libgcc 4.4 and higher
* OpenGL 2.0 or higher with the following extensions:
Expand Down
8 changes: 7 additions & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ This directory contains various tools to help building and maintaining Natron.
- execute `MSYSTEM=MINGW64 BITS=64 ./include/scripts/build-Windows-sdk.sh` to rebuild and install the Natron-specific packages.
- build the Natron binaries and execute the unit tests on OS X 10.9 (`macStartupJenkins.sh`), Linux CentOS 6.4 32bit and 64bit (`linuxStartupJenkins.sh`) and Windows 10 32bit and 64bit (`winStartupJenkins.bat`). These build scripts are basically updated versions of the scripts from the `buildmaster`directory, but were never tested to produce actual releases. Also note that the OS X script does not produce universal 32/64 bits binaries.


- **docker**

Contains tools to build a docker image that contains the Natron SDK installed on top of CentOS6.

The `natron-sdk` docker image is also available from dockerhub, see https://hub.docker.com/r/natrongithub/natron-sdk

- **MINGW-packages**

This directory contains Natron-specific packages for MSYS2. For example, therer are ffmpeg and libraw versions with different licences, a patched version of Qt4, and a version of OpenImageIO 1.7 (because later versions hang when quitting Natron, see [this OpenImageIO issue](https://github.com/OpenImageIO/oiio/issues/1795)).
Expand Down
3 changes: 3 additions & 0 deletions tools/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
This directory contains tools to build docker images (requires docker).

The `natron-sdk` docker image is available from dockerhub, see https://hub.docker.com/r/natrongithub/natron-sdk

- `natron-sdk/build.sh` builds the natron-sdk docker image
- `natron-sdk/push.sh` pushes the natron-sdk docker image to dockerhub
4 changes: 2 additions & 2 deletions tools/docker/natron-sdk/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfi
cp ../../jenkins/common.sh ../../jenkins/compiler-common.sh .
(cd ../../jenkins/include/scripts; tar cf - build-Linux-sdk.sh pkg) | tar xf -
(cd ../../jenkins; tar cf - include/patches) | tar xf -
docker build -t natronsdk:latest .
#docker build --no-cache -t natronsdk:latest .
docker build -t natrongithub/natron-sdk:latest .
#docker build --no-cache -t natron-sdk:latest .
1 change: 1 addition & 0 deletions tools/docker/natron-sdk/push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker push natrongithub/natron-sdk:latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- oiio-Release-2.0.8/src/libtexture/imagecache_pvt.h.orig 2019-05-03 17:56:26.000000000 -0700
+++ oiio-Release-2.0.8/src/libtexture/imagecache_pvt.h 2019-05-23 20:53:57.000000000 -0700
@@ -337,7 +337,8 @@
void invalidate_spec()
{
m_validspec = false;
- m_subimages.clear();
+ //Do not clear the subimages here because another thread might be using it
+ //m_subimages.clear ();
}

/// Should we print an error message? Keeps track of whether the
63 changes: 63 additions & 0 deletions tools/jenkins/include/patches/Qt/patch-allow_libressl.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -228,13 +228,17 @@
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#else
@@ -822,13 +826,17 @@
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_client_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_client_method)
+#endif
RESOLVEFUNC(SSLv23_client_method)
RESOLVEFUNC(TLSv1_client_method)
#ifndef OPENSSL_NO_SSL2
RESOLVEFUNC(SSLv2_server_method)
#endif
+#ifndef OPENSSL_NO_SSL3
RESOLVEFUNC(SSLv3_server_method)
+#endif
RESOLVEFUNC(SSLv23_server_method)
RESOLVEFUNC(TLSv1_server_method)
RESOLVEFUNC(X509_NAME_entry_count)
--- src/network/ssl/qsslsocket_openssl.cpp.orig
+++ src/network/ssl/qsslsocket_openssl.cpp
@@ -267,15 +267,19 @@
#endif
break;
case QSsl::SslV3:
+#ifndef OPENSSL_NO_SSL3
ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
+#else
+ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
+#endif
break;
- case QSsl::SecureProtocols: // SslV2 will be disabled below
- case QSsl::TlsV1SslV3: // SslV2 will be disabled below
case QSsl::AnyProtocol:
- default:
ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method());
break;
case QSsl::TlsV1:
+ case QSsl::SecureProtocols:
+ case QSsl::TlsV1SslV3:
+ default:
ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method());
break;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- configurel.orig
+++ configure
@@ -1087,6 +1087,7 @@
#-------------------------------------------------------------------------------
# parse command line arguments
#-------------------------------------------------------------------------------
+JOBS=

# parse the arguments, setting things to "yes" or "no"
while [ "$#" -gt 0 ]; do
@@ -2538,6 +2539,9 @@
UNKNOWN_OPT=yes
fi
;;
+ jobs)
+ JOBS=-j$VAL
+ ;;
*)
UNKNOWN_OPT=yes
;;
@@ -5137,7 +5141,7 @@
done

QMAKE_BUILD_ERROR=no
- (cd "$outpath/qmake"; "$MAKE") || QMAKE_BUILD_ERROR=yes
+ (cd "$outpath/qmake"; "$MAKE" $JOBS) || QMAKE_BUILD_ERROR=yes
[ '!' -z "$QCONFIG_H" ] && mv -f "$QCONFIG_H" "$QMAKE_QCONFIG_H" #move qmake's qconfig.h to qconfig.h.qmake
[ '!' -z "$OLD_QCONFIG_H" ] && mv -f "${OLD_QCONFIG_H}.old" "$OLD_QCONFIG_H" #put back qconfig.h
[ "$QMAKE_BUILD_ERROR" = "yes" ] && exit 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- qmake/generators/unix/unixmake.cpp.orig
+++ qmake/generators/unix/unixmake.cpp
@@ -951,7 +951,7 @@
else if(project->first("TEMPLATE") == "app" && !project->isEmpty("QMAKE_STRIPFLAGS_APP"))
ret += " " + var("QMAKE_STRIPFLAGS_APP");
if(bundle)
- ret = " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\"";
+ ret += " \"" + dst_targ + "/Contents/MacOS/$(QMAKE_TARGET)\"";
else
ret += " \"" + dst_targ + "\"";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/corelib/io/qsettings.cpp.orig
+++ src/corelib/io/qsettings.cpp
@@ -122,7 +122,7 @@
Q_GLOBAL_STATIC(ConfFileCache, unusedCacheFunc)
Q_GLOBAL_STATIC(PathHash, pathHashFunc)
Q_GLOBAL_STATIC(CustomFormatVector, customFormatVectorFunc)
-Q_GLOBAL_STATIC(QMutex, globalMutex)
+Q_GLOBAL_STATIC_WITH_ARGS(QMutex, globalMutex, (QMutex::Recursive))
static QSettings::Format globalDefaultFormat = QSettings::NativeFormat;

#ifndef Q_OS_WIN
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/gui/text/qfontengine_coretext.mm.orig
+++ src/gui/text/qfontengine_coretext.mm
@@ -886,7 +886,7 @@

QFixed QCoreTextFontEngine::emSquareSize() const
{
- return QFixed::QFixed(int(CTFontGetUnitsPerEm(ctfont)));
+ return QFixed(int(CTFontGetUnitsPerEm(ctfont)));
}

QFontEngine *QCoreTextFontEngine::cloneWithSize(qreal pixelSize) const
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,128 @@ diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.
#error "Alsa version found too old, require >= 1.0.10"
#endif

diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index 973cbab..0b27e9d 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -63,7 +63,7 @@ QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray dev, QAudio::Mode
device = QLatin1String(dev);
this->mode = mode;

-#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
checkSurround();
#endif
}
@@ -159,13 +159,13 @@ bool QAudioDeviceInfoInternal::open()
QList<QByteArray> devices = availableDevices(mode);

if(dev.compare(QLatin1String("default")) == 0) {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = QLatin1String(devices.first().constData());
#else
dev = QLatin1String("hw:0,0");
#endif
} else {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = device;
#else
int idx = 0;
@@ -212,13 +212,13 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const
QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioOutput);

if(dev.compare(QLatin1String("default")) == 0) {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = QLatin1String(devices.first().constData());
#else
dev = QLatin1String("hw:0,0");
#endif
} else {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = device;
#else
int idx = 0;
@@ -396,7 +396,7 @@ void QAudioDeviceInfoInternal::updateLists()
}
channelz.append(1);
channelz.append(2);
-#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
if (surround40) channelz.append(4);
if (surround51) channelz.append(6);
if (surround71) channelz.append(8);
@@ -419,7 +419,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode)
QList<QByteArray> devices;
QByteArray filter;

-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
// Create a list of all current audio devices that support mode
void **hints, **n;
char *name, *descr, *io;
@@ -498,7 +498,7 @@ QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
return devices.first();
}

-#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
void QAudioDeviceInfoInternal::checkSurround()
{
QList<QByteArray> devices;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
index 96febf4..714bf60 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
@@ -98,7 +98,7 @@ private:
bool open();
void close();

-#if (SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
void checkSurround();
bool surround40;
bool surround51;
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index 339fd9f..abfa4a1 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -284,13 +284,13 @@ bool QAudioInputPrivate::open()
QString dev = QString(QLatin1String(m_device.constData()));
QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioInput);
if(dev.compare(QLatin1String("default")) == 0) {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = QLatin1String(devices.first());
#else
dev = QLatin1String("hw:0,0");
#endif
} else {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = QLatin1String(m_device);
#else
int idx = 0;
diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
index bf85de5..c29a89f 100644
--- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp
@@ -299,13 +299,13 @@ bool QAudioOutputPrivate::open()
QString dev = QString(QLatin1String(m_device.constData()));
QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioOutput);
if(dev.compare(QLatin1String("default")) == 0) {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = QLatin1String(devices.first());
#else
dev = QLatin1String("hw:0,0");
#endif
} else {
-#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14)
+#if(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14))
dev = QLatin1String(m_device);
#else
int idx = 0;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/gui/image/qppmhandler.cpp.me qt-everywhere-opensource-src-4.8.7/src/gui/image/qppmhandler.cpp
--- qt-everywhere-opensource-src-4.8.7/src/gui/image/qppmhandler.cpp.me 2019-03-22 10:22:16.213800109 +0100
+++ qt-everywhere-opensource-src-4.8.7/src/gui/image/qppmhandler.cpp 2019-03-22 10:22:40.721890281 +0100
@@ -108,7 +108,7 @@ static bool read_pbm_header(QIODevice *d
else
mcc = read_pbm_int(device); // get max color component

- if (w <= 0 || w > 32767 || h <= 0 || h > 32767 || mcc <= 0)
+ if (w <= 0 || w > 32767 || h <= 0 || h > 32767 || mcc <= 0 || mcc > 0xffff)
return false; // weird P.M image

return true;
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensou
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
- 5*|4*|3.4*)
+ 8*|7*|6*|5*|4*|3.4*)
+ 9*|8*|7*|6*|5*|4*|3.4*)
;;
3.3*)
canBuildWebKit="no"
Expand All @@ -15,7 +15,7 @@ diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensou
COMPILER_VERSION="3.*"
;;
- 5*|4.*)
+ 8*|7*|6*|5*|4.*)
+ 9*|8*|7*|6*|5*|4.*)
COMPILER_VERSION="4"
;;
*)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 qt-everywhere-opensource-src-4.8.7/src/script/script.pro
--- qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 2015-05-07 09:14:43.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.7/src/script/script.pro 2018-05-19 16:01:24.699926959 -0500
@@ -91,6 +91,9 @@ symbian {
TARGET.UID3=0x2001B2E1
}

+# hack around gcc8 optimization bug with -O2
+QMAKE_CXXFLAGS_RELEASE += -O1
+
symbian {
symbian-abld|symbian-sbsv2 {
MMP_RULES += ALWAYS_BUILD_AS_ARM
Loading

0 comments on commit 7111cb4

Please sign in to comment.