Skip to content

Commit 9ff1b06

Browse files
committed
Linux SDK support for building Natron 2.6 with QT5
1 parent 5d74bca commit 9ff1b06

File tree

11 files changed

+127
-25
lines changed

11 files changed

+127
-25
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Dockerfile
2+
build-Linux-installer.sh
3+
build-Linux-sdk.sh
4+
build-OSX-installer.sh
5+
build-Windows-installer.sh
6+
build-natron.sh
7+
build-plugins.sh
8+
checkout-repository.sh
9+
common.sh
10+
compiler-common.sh
11+
createBuildOptionsFile.sh
12+
ensure-ssh-identity.sh
13+
gen-natron-doc.sh
14+
genDllVersions.sh
15+
gitRepositories.sh
16+
launchBuildMain.sh
17+
linuxStartupJenkins.sh
18+
macStartupJenkins.sh
19+
manageBuildOptions.sh
20+
manageLog.sh
21+
msysStartupJenkins.sh
22+
push.sh
23+
runUnitTests.sh
24+
uploadArtifactsMain.sh
25+
zip-python.sh
26+
include
27+
pkg
28+
builds
29+
artifacts
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
cd `dirname "$0"`
3+
cp ../../jenkins/*.sh .
4+
(cd ../../jenkins/; tar cf - include) | tar xf -
5+
export UBUNTU=24.04
6+
LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}"
7+
env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile
8+
docker build -t "${LABEL}:latest" .
9+
#docker build --no-cache -t "${LABEL}:latest" .
10+
echo "please execute:"
11+
#echo "docker-squash ${LABEL}:latest"
12+
echo "docker login"
13+
echo "docker tag ${LABEL}:latest ${LABEL}:$(date -u +%Y%m%d)"
14+
echo "docker push ${LABEL}:latest"
15+
echo "docker push ${LABEL}:$(date -u +%Y%m%d)"

tools/jenkins/common.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,16 @@ elif [ "$PKGOS" = "OSX" ]; then
419419
fi
420420
export LD_LIBRARY_PATH LD_RUN_PATH DYLD_LIBRARY_PATH LIBRARY_PATH CPATH PKG_CONFIG_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH BOOST_ROOT
421421

422-
if [ "${QT_VERSION_MAJOR}" = 4 ]; then
423-
QT_VERSION=$(pkg-config --modversion QtCore)
424-
else
425-
QT_VERSION=$(pkg-config --modversion Qt${QT_VERSION_MAJOR}Core)
426-
fi
427-
QT_VERSION_MINOR=$(echo $QT_VERSION | cut -d. -f2)
422+
# [Troy] This is unnecessary and breaks the linux build because pkg-config
423+
# is used to find the Qt5 version before Qt5 is actually built/installed into
424+
# $SDK_HOME.
425+
#
426+
#if [ "${QT_VERSION_MAJOR}" = 4 ]; then
427+
# QT_VERSION=$(pkg-config --modversion QtCore)
428+
#else
429+
# QT_VERSION=$(pkg-config --modversion Qt${QT_VERSION_MAJOR}Core)
430+
#fi
431+
#QT_VERSION_MINOR=$(echo $QT_VERSION | cut -d. -f2)
428432

429433
# Load compiler related stuff
430434
source $CWD/compiler-common.sh

tools/jenkins/include/scripts/build-Linux-sdk.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ EOF
104104
LD_RUN_PATH=\"\$SDK/lib:\$QTDIR/lib:\$GCC/lib:\$FFMPEG/lib:\$LIBRAW/lib\" \\
105105
CPATH=\"\$SDK/include:\$QTDIR/include:\$GCC/include:\$FFMPEG/include:\$LIBRAW/include:\$OSMESA/include\" \\
106106
PKG_CONFIG_PATH=\"\$SDK/lib/pkgconfig:\$OSMESA/lib/pkgconfig:\$QTDIR/lib/pkgconfig:\$GCC/lib/pkgconfig:\$FFMPEG/lib/pkgconfig:\$LIBRAW/lib/pkgconfig\" \\
107-
PATH=\"\$SDK/bin:\$QTDIR/bin:\$GCC/bin:\$FFMPEG/bin:\$LIBRAW_PATH:\$PATH\" \\
107+
PATH=\"\$SDK/bin:\$QTDIR/bin:\$GCC/bin:\$FFMPEG/bin:\$LIBRAW:\$PATH\" \\
108108
WORKSPACE=/home \\
109109
GIT_URL=https://github.com/NatronGitHub/Natron.git \\
110110
GIT_BRANCH=RB-2.5 \\
@@ -222,7 +222,7 @@ EOF
222222
ARCH=x86_64
223223
fi
224224
SDKPREP="ARG DEBIAN_FRONTEND=noninteractive
225-
RUN apt-get update && apt-get install -y build-essential xorg-dev libgl-dev libegl1-mesa-dev libglu-dev wget git valgrind zip && rm -rf /var/lib/apt/lists/*"
225+
RUN apt-get update && apt-get install -y build-essential xorg-dev libgl-dev libegl1-mesa-dev libglu-dev wget git valgrind zip python3 python3-dev libshiboken2-dev libpyside2-dev && rm -rf /var/lib/apt/lists/*"
226226
cat <<EOF
227227
FROM $DOCKER_BASE as intermediate
228228
MAINTAINER https://github.com/NatronGitHub/Natron
@@ -618,7 +618,10 @@ if dobuild; then
618618
export PKG_CONFIG_PATH LD_LIBRARY_PATH PATH BOOST_ROOT OPENJPEG_HOME THIRD_PARTY_TOOLS_HOME PYTHON_HOME
619619
fi
620620

621-
if [ "${UBUNTU:-0}" = 20.04 ]; then
621+
if [ "${UBUNTU:-0}" = 24.04 ]; then
622+
GCC_VERSION=13.2.0
623+
BOOTSTRAP_GCC_VERSION=$GCC_VERSION
624+
elif [ "${UBUNTU:-0}" = 20.04 ]; then
622625
GCC_VERSION=9.3.0
623626
BOOTSTRAP_GCC_VERSION=$GCC_VERSION
624627
elif [ "${UBUNTU:-0}" = 18.04 ]; then
@@ -783,6 +786,7 @@ build libraw
783786
checkpoint
784787

785788
build ilmbase
789+
build imath
786790
build openexr
787791
build pixman
788792
build cairo

tools/jenkins/include/scripts/pkg/ffmpeg.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
# Install FFmpeg
44
# see http://www.linuxfromscratch.org/blfs/view/svn/multimedia/ffmpeg.html
5-
FFMPEG_VERSION=6.0
5+
#FFMPEG_VERSION=6.0
6+
FFMPEG_VERSION=6.1.3
67
# see https://ffmpeg.org/download.html
7-
FFMPEG_VERSION_LIBAVCODEC=60.3.100
8+
#FFMPEG_VERSION_LIBAVCODEC=60.3.100
9+
FFMPEG_VERSION_LIBAVCODEC=60.31.102
810
FFMPEG_TAR="ffmpeg-${FFMPEG_VERSION}.tar.xz"
911
FFMPEG_SITE="http://www.ffmpeg.org/releases"
1012
if download_step; then

tools/jenkins/include/scripts/pkg/gcc.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# Install gcc
44
# see http://www.linuxfromscratch.org/lfs/view/development/chapter08/gcc.html
55
# Old Natron 2 version is 4.8.5
6-
GCC_VERSION=9.3.0
6+
GCC_VERSION=13.2.0
7+
#GCC_VERSION=9.3.0
78
#GCC_VERSION=8.1.0
89
#GCC_VERSION=7.3.0
910
#GCC_VERSION=5.4.0
@@ -12,24 +13,26 @@ GCC_TAR="gcc-${GCC_VERSION}.tar.gz"
1213
GCC_SITE="http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}"
1314

1415
# Install gcc
15-
MPC_VERSION=1.1.0
16+
MPC_VERSION=1.3.1
1617
MPC_TAR="mpc-${MPC_VERSION}.tar.gz"
1718
MPC_SITE="https://ftp.gnu.org/gnu/mpc"
1819

19-
# MPFR_VERSION=4.0.1 # gcc 8.2.0
20-
MPFR_VERSION=4.0.2 # gcc 9.1.0-9.3.0
20+
#MPFR_VERSION=4.0.1 # gcc 8.2.0
21+
#MPFR_VERSION=4.0.2 # gcc 9.1.0-9.3.0
22+
MPFR_VERSION=4.2.1 # gcc 13.2.0
2123
MPFR_TAR="mpfr-${MPFR_VERSION}.tar.bz2"
2224
MPFR_SITE="http://www.mpfr.org/mpfr-${MPFR_VERSION}"
2325

2426
# see http://www.linuxfromscratch.org/lfs/view/development/chapter08/gmp.html
25-
GMP_VERSION=6.2.0 # 6.2.0 fails when buiding using GCC 4.4.7 (CentOS6): requires -std=gnu99 but adding it to CFLAGS during configure doesn't help
27+
#GMP_VERSION=6.2.0 # 6.2.0 fails when buiding using GCC 4.4.7 (CentOS6): requires -std=gnu99 but adding it to CFLAGS during configure doesn't help
28+
GMP_VERSION=6.3.0
2629
if [ "${DTS:-0}" -le 3 ] && [ "${CENTOS:-7}" -le 7 ]; then
2730
GMP_VERSION=6.1.2 # 6.2.0 fails when buiding gcc: requires -std=gnu99 but adding it to CFLAGS during configure doesn't help
2831
fi
2932
GMP_TAR="gmp-${GMP_VERSION}.tar.bz2"
3033
GMP_SITE="https://gmplib.org/download/gmp"
3134

32-
ISL_VERSION=0.14.1
35+
ISL_VERSION=0.26.1
3336
if version_gt "$GCC_VERSION" 4.8.5; then
3437
ISL_VERSION=0.19
3538
fi
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Install Imath
4+
# see https://github.com/AcademySoftwareFoundation/Imath/releases/
5+
IMATH_VERSION=3.2.1
6+
IMATH_TAR="Imath-${IMATH_VERSION}.tar.gz"
7+
8+
if download_step; then
9+
download_github AcademySoftwareFoundation Imath "${IMATH_VERSION}" v "${IMATH_TAR}"
10+
fi
11+
if build_step && { force_build || { [ ! -s "$SDK_HOME/lib/pkgconfig/Imath.pc" ] || [ "$(pkg-config --modversion Imath)" != "$IMATH_VERSION" ]; }; }; then
12+
start_build
13+
untar "$SRC_PATH/$IMATH_TAR"
14+
pushd "Imath-${IMATH_VERSION}"
15+
mkdir build
16+
pushd build
17+
cmake .. -DCMAKE_C_FLAGS="$BF" -DCMAKE_CXX_FLAGS="$BF" -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" -DCMAKE_INSTALL_PREFIX="$SDK_HOME"
18+
make -j${MKJOBS}
19+
make install
20+
popd # build
21+
popd # Imath-${IMATH_VERSION}
22+
rm -rf "Imath-${IMATH_VERSION}"
23+
end_build
24+
fi

tools/jenkins/include/scripts/pkg/librsvg.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
# Install librsvg (without vala support)
44
# see http://www.linuxfromscratch.org/blfs/view/systemd/general/librsvg.html
5-
LIBRSVG_VERSION=2.40.20 # 2.41 requires rust
5+
#LIBRSVG_VERSION=2.40.20 # 2.41 requires rust
6+
LIBRSVG_VERSION=2.58.0
67
LIBRSVG_VERSION_SHORT=${LIBRSVG_VERSION%.*}
78
LIBRSVG_TAR="librsvg-${LIBRSVG_VERSION}.tar.xz"
89
LIBRSVG_SITE="https://download.gnome.org/sources/librsvg/${LIBRSVG_VERSION_SHORT}"
@@ -17,9 +18,7 @@ if build_step && { force_build || { [ ! -s "$SDK_HOME/lib/pkgconfig/librsvg-2.0.
1718
if version_gt "$LIBRSVG_VERSION_SHORT" 2.40; then
1819
# librsvg 2.41 requires rust
1920
if [ ! -s "$HOME/.cargo/env" ]; then
20-
(>&2 echo "Error: librsvg requires rust. Please install rust by executing:")
21-
(>&2 echo "$SDK_HOME/bin/curl https://sh.rustup.rs -sSf | sh")
22-
exit 1
21+
$SDK_HOME/bin/curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
2322
fi
2423
source "$HOME/.cargo/env"
2524
if [ "$ARCH" = "x86_64" ]; then

tools/jenkins/include/scripts/pkg/poppler-glib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
# see http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html
55
POPPLER_VERSION=23.05.0
66
POPPLER_TAR="poppler-${POPPLER_VERSION}.tar.xz"
7-
POPPLER_SITE="https://poppler.freedesktop.org"
7+
#POPPLER_SITE="https://poppler.freedesktop.org"
8+
POPPLER_SITE="https://web.archive.org/web/20250503140523/https://poppler.freedesktop.org/"
89
if download_step; then
910
download "$POPPLER_SITE" "$POPPLER_TAR"
1011
fi

tools/jenkins/include/scripts/pkg/qt5.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# see https://www.linuxfromscratch.org/blfs/view/svn/x/qt5.html
55
# Note: This is excluding qtwebengine, which is available separately (for security reasons):
66
# https://www.linuxfromscratch.org/blfs/view/svn/x/qtwebengine.html
7-
QT5_VERSION=5.15.9
7+
QT5_VERSION=5.15.14
88
QT5_VERSION_SHORT=${QT5_VERSION%.*}
99
QT5_TAR="qt-everywhere-opensource-src-${QT5_VERSION}.tar.xz"
1010
QT5_SITE="https://download.qt.io/archive/qt/${QT5_VERSION_SHORT}/${QT5_VERSION}/single"
@@ -14,7 +14,7 @@ QT5_SITE="https://download.qt.io/archive/qt/${QT5_VERSION_SHORT}/${QT5_VERSION}/
1414
# Required patch: https://www.linuxfromscratch.org/patches/blfs/svn/qt-everywhere-src-5.15.2-kf5.15-2.patch
1515
# Details of the kde curation can be found at https://dot.kde.org/2021/04/06/announcing-kdes-qt-5-patch-collection
1616
# and https://community.kde.org/Qt5PatchCollection.
17-
QT5_PATCH="qt-everywhere-opensource-src-5.15.9-kf5-1.patch"
17+
QT5_PATCH="qt-everywhere-opensource-src-5.15.14-kf5-1.patch"
1818
QT5_PATCH_SITE="https://www.linuxfromscratch.org/patches/blfs/svn"
1919

2020
if download_step; then
@@ -45,7 +45,8 @@ if build_step && { force_build || { [ ! -s "$QT5PREFIX/lib/pkgconfig/Qt5Core.pc"
4545
-nomake examples \
4646
-no-rpath \
4747
-syslog \
48-
-skip qtwebengine
48+
-skip qtwebengine \
49+
-skip qtlocation
4950
make -j${MKJOBS}
5051
make install
5152
# Remove references to the build directory from installed library dependency (prl) files by running the following command as the root user:

0 commit comments

Comments
 (0)