From 00a140f0f6a6b957f1c24a699c121f882c59c4a7 Mon Sep 17 00:00:00 2001 From: Frederic Devernay Date: Sun, 28 Mar 2021 18:05:21 -0700 Subject: [PATCH] linux sdk update --- tools/docker/natron-sdk/build.sh | 2 +- .../include/scripts/build-Linux-sdk.sh | 1 + .../include/scripts/pkg/mysqlclient.sh | 6 +++--- tools/jenkins/include/scripts/pkg/psycopg2.sh | 4 ++-- .../include/scripts/pkg/shared-mime-info.sh | 7 ++++--- .../include/scripts/pkg/sphinx-rtd-theme.sh | 4 ++-- tools/jenkins/include/scripts/pkg/sphinx.sh | 4 ++-- tools/jenkins/include/scripts/pkg/xmlto.sh | 21 +++++++++++++++++++ 8 files changed, 36 insertions(+), 13 deletions(-) create mode 100644 tools/jenkins/include/scripts/pkg/xmlto.sh diff --git a/tools/docker/natron-sdk/build.sh b/tools/docker/natron-sdk/build.sh index b66404dd64..7406f97153 100755 --- a/tools/docker/natron-sdk/build.sh +++ b/tools/docker/natron-sdk/build.sh @@ -6,7 +6,7 @@ export CENTOS=7 export DTS=8 LABEL="natrongithub/natron-sdk${UBUNTU+-ubuntu}${UBUNTU:-}${CENTOS+-centos}${CENTOS:-}${DTS+-dts}${DTS:-}" env GEN_DOCKERFILE=1 ../../jenkins/include/scripts/build-Linux-sdk.sh > Dockerfile -docker build -t "${LABEL}:latest" . +docker build -t "${LABEL}:latest" . --progress=plain #docker build --no-cache -t "${LABEL}:latest" . echo "please execute:" #echo "docker-squash ${LABEL}:latest" diff --git a/tools/jenkins/include/scripts/build-Linux-sdk.sh b/tools/jenkins/include/scripts/build-Linux-sdk.sh index f148b704a0..14668d83d9 100755 --- a/tools/jenkins/include/scripts/build-Linux-sdk.sh +++ b/tools/jenkins/include/scripts/build-Linux-sdk.sh @@ -779,6 +779,7 @@ build harfbuzz build fribidi # (for libass and ffmpeg) build pango build libcroco # (requires glib and libxml2) +build xmlto # (required by shared-mime-info) build shared-mime-info # (required by gdk-pixbuf) build gdk-pixbuf build librsvg # (without vala support) diff --git a/tools/jenkins/include/scripts/pkg/mysqlclient.sh b/tools/jenkins/include/scripts/pkg/mysqlclient.sh index bd8a391113..ca2cbe18d2 100644 --- a/tools/jenkins/include/scripts/pkg/mysqlclient.sh +++ b/tools/jenkins/include/scripts/pkg/mysqlclient.sh @@ -7,13 +7,13 @@ if $WITH_MARIADB; then MYSQLCLIENT_VERSION_PY3=2.0.3 MYSQLCLIENT_VERSION_PY2=1.4.6 #dobuild && echo "python${PY2_VERSION_SHORT}" -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/MySQLdb" ] || [ $("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import MySQLdb; print(MySQLdb.__version__.split(' ', 1)[0])") != ${MYSQLCLIENT_VERSION_PY2} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/MySQLdb" ] || [ "$("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import MySQLdb; print(MySQLdb.__version__.split(' ', 1)[0])")" != "${MYSQLCLIENT_VERSION_PY2}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY2_VERSION_SHORT} install --no-binary mysqlclient mysqlclient=="${MYSQLCLIENT_VERSION_PY2}" end_build fi -#dobuild && echo "python${PY3_VERSION_SHORT}" -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/MySQLdb" ] || [ $("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import MySQLdb; print(MySQLdb.__version__.split(' ', 1)[0])") != ${MYSQLCLIENT_VERSION_PY3} ]; }; }; then +# in MySQLsb >= 2.0, the version is in MySQLdb.release +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/MySQLdb" ] || [ "$("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import MySQLdb.release; print(MySQLdb.release.__version__.split(' ', 1)[0])")" != "${MYSQLCLIENT_VERSION_PY3}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY3_VERSION_SHORT} install --no-binary mysqlclient mysqlclient=="${MYSQLCLIENT_VERSION_PY3}" end_build diff --git a/tools/jenkins/include/scripts/pkg/psycopg2.sh b/tools/jenkins/include/scripts/pkg/psycopg2.sh index 447dc12b02..31cc463555 100644 --- a/tools/jenkins/include/scripts/pkg/psycopg2.sh +++ b/tools/jenkins/include/scripts/pkg/psycopg2.sh @@ -3,12 +3,12 @@ # install psycopg2 (PostgreSQL connector) # see https://pypi.python.org/pypi/psycopg2 PSYCOPG2_VERSION=2.8.6 -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/psycopg2" ] || [ $("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import psycopg2; print(psycopg2.__version__.split(' ', 1)[0])") != ${PSYCOPG2_VERSION} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/psycopg2" ] || [ "$("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import psycopg2; print(psycopg2.__version__.split(' ', 1)[0])")" != "${PSYCOPG2_VERSION}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY2_VERSION_SHORT} install --no-binary psycopg2 psycopg2=="${PSYCOPG2_VERSION}" end_build fi -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/psycopg2" ] || [ $("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import psycopg2; print(psycopg2.__version__.split(' ', 1)[0])") != ${PSYCOPG2_VERSION} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/psycopg2" ] || [ "$("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import psycopg2; print(psycopg2.__version__.split(' ', 1)[0])")" != "${PSYCOPG2_VERSION}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY3_VERSION_SHORT} install --no-binary psycopg2 psycopg2=="${PSYCOPG2_VERSION}" end_build diff --git a/tools/jenkins/include/scripts/pkg/shared-mime-info.sh b/tools/jenkins/include/scripts/pkg/shared-mime-info.sh index 7270bfec53..34906762af 100644 --- a/tools/jenkins/include/scripts/pkg/shared-mime-info.sh +++ b/tools/jenkins/include/scripts/pkg/shared-mime-info.sh @@ -2,11 +2,12 @@ # Install shared-mime-info (required by gdk-pixbuf) # see http://www.linuxfromscratch.org/blfs/view/svn/general/shared-mime-info.html -#SHAREDMIMEINFO_VERSION=1.15 # last version before meson -SHAREDMIMEINFO_VERSION=2.1 # builds with meson. Warning: SHAREDMIMEINFO_SITE changes with every release +SHAREDMIMEINFO_VERSION=1.15 # last version before meson +#SHAREDMIMEINFO_VERSION=2.1 # builds with meson. Warning: SHAREDMIMEINFO_SITE changes with every release SHAREDMIMEINFO_TAR="shared-mime-info-${SHAREDMIMEINFO_VERSION}.tar.xz" #SHAREDMIMEINFO_SITE="http://freedesktop.org/~hadess" -SHAREDMIMEINFO_SITE="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0ee50652091363ab0d17e335e5e74fbe" +SHAREDMIMEINFO_SITE="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/b27eb88e4155d8fccb8bb3cd12025d5b" # 1.15 +SHAREDMIMEINFO_SITE="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0ee50652091363ab0d17e335e5e74fbe" # 2.1 if download_step; then download "$SHAREDMIMEINFO_SITE" "$SHAREDMIMEINFO_TAR" fi diff --git a/tools/jenkins/include/scripts/pkg/sphinx-rtd-theme.sh b/tools/jenkins/include/scripts/pkg/sphinx-rtd-theme.sh index d845d73672..5c2c88b6fc 100644 --- a/tools/jenkins/include/scripts/pkg/sphinx-rtd-theme.sh +++ b/tools/jenkins/include/scripts/pkg/sphinx-rtd-theme.sh @@ -5,12 +5,12 @@ SPHINXRTDTHEME_VERSION_PYTHON3=0.4.3 # 0.5.1 requires npm to install. # should be fixed in 0.5.2, see https://github.com/readthedocs/sphinx_rtd_theme/commit/e13adedab162910df59f51e53372400b0b5ae368 SPHINXRTDTHEME_VERSION_PYTHON2=0.4.3 # 0.5.0 only supports Python 3 -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/sphinx_rtd_theme" ] || [ $("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import sphinx_rtd_theme; print(sphinx_rtd_theme.__version__.split(' ', 1)[0])") != ${SPHINXRTDTHEME_VERSION_PYTHON2} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/sphinx_rtd_theme" ] || [ "$("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import sphinx_rtd_theme; print(sphinx_rtd_theme.__version__.split(' ', 1)[0])")" != "${SPHINXRTDTHEME_VERSION_PYTHON2}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY2_VERSION_SHORT} install --no-binary sphinx_rtd_theme sphinx_rtd_theme=="${SPHINXRTDTHEME_VERSION_PYTHON2}" end_build fi -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/sphinx_rtd_theme" ] || [ $("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import sphinx_rtd_theme; print(sphinx_rtd_theme.__version__.split(' ', 1)[0])") != ${SPHINXRTDTHEME_VERSION_PYTHON3} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/sphinx_rtd_theme" ] || [ "$("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import sphinx_rtd_theme; print(sphinx_rtd_theme.__version__.split(' ', 1)[0])")" != "${SPHINXRTDTHEME_VERSION_PYTHON3}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY3_VERSION_SHORT} install --no-binary sphinx_rtd_theme sphinx_rtd_theme=="${SPHINXRTDTHEME_VERSION_PYTHON3}" end_build diff --git a/tools/jenkins/include/scripts/pkg/sphinx.sh b/tools/jenkins/include/scripts/pkg/sphinx.sh index 6a9247e512..add8cf870d 100644 --- a/tools/jenkins/include/scripts/pkg/sphinx.sh +++ b/tools/jenkins/include/scripts/pkg/sphinx.sh @@ -4,13 +4,13 @@ # see https://pypi.org/project/sphinx/ SPHINX_VERSION_PYTHON3=3.5.3 SPHINX_VERSION_PYTHON2=1.8.5 # last version that supports Python 2.7 -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/sphinx" ] || [ $("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import sphinx; print(sphinx.__version__.split(' ', 1)[0])") != ${SPHINX_VERSION_PYTHON2} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY2_VERSION_SHORT}/site-packages/sphinx" ] || [ "$("$SDK_HOME/bin/python${PY2_VERSION_SHORT}" -c "import sphinx; print(sphinx.__version__.split(' ', 1)[0])")" != "${SPHINX_VERSION_PYTHON2}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY2_VERSION_SHORT} install --no-binary sphinx sphinx=="${SPHINX_VERSION_PYTHON2}" || true ${SDK_HOME}/bin/python${PY2_VERSION_SHORT} -m sphinx --version end_build fi -if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/sphinx" ] || [ $("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import sphinx; print(sphinx.__version__.split(' ', 1)[0])") != ${SPHINX_VERSION_PYTHON3} ]; }; }; then +if build_step && { force_build || { [ ! -d "$SDK_HOME/lib/python${PY3_VERSION_SHORT}/site-packages/sphinx" ] || [ "$("$SDK_HOME/bin/python${PY3_VERSION_SHORT}" -c "import sphinx; print(sphinx.__version__.split(' ', 1)[0])")" != "${SPHINX_VERSION_PYTHON3}" ]; }; }; then start_build ${SDK_HOME}/bin/pip${PY3_VERSION_SHORT} install --no-binary sphinx sphinx=="${SPHINX_VERSION_PYTHON3}" || true ${SDK_HOME}/bin/python${PY3_VERSION_SHORT} -m sphinx --version diff --git a/tools/jenkins/include/scripts/pkg/xmlto.sh b/tools/jenkins/include/scripts/pkg/xmlto.sh new file mode 100644 index 0000000000..979d59beac --- /dev/null +++ b/tools/jenkins/include/scripts/pkg/xmlto.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Install xmlto +# see hhttp://www.linuxfromscratch.org/blfs/view/svn/pst/xmlto.html +XMLTO_VERSION=0.0.28 +XMLTO_TAR="xmlto-${XMLTO_VERSION}.tar.bz2" +XMLTO_SITE="https://releases.pagure.org/xmlto" +if download_step; then + download "$XMLTO_SITE" "$XMLTO_TAR" +fi +if build_step && { force_build || { [ ! -s "$SDK_HOME/bin/xmlto" ] || [ "$("${SDK_HOME}/bin/xmlto" --version)" != "xmlto version $XMLTO_VERSION" ] ; }; }; then + start_build + untar "$SRC_PATH/$XMLTO_TAR" + pushd "xmlto-${XMLTO_VERSION}" + env CFLAGS="$BF" CXXFLAGS="$BF" ./configure --prefix="$SDK_HOME" --libdir="$SDK_HOME/lib" --enable-shared --disable-static + make -j${MKJOBS} + make install + popd + rm -rf "xmlto-${XMLTO_VERSION}" + end_build +fi