From a293018a87893c60fa34268d2afd3d644ee73e3d Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 6 Nov 2019 15:24:06 +0300 Subject: [PATCH] Fix travis build. --- .travis/build.sh | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.travis/build.sh b/.travis/build.sh index 4b6d05ff8b..e9665847b2 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -11,21 +11,21 @@ CACHE="$HOME/travisCacheDir" QT_WAS_BUILT="0" -QT_VERSION=5.6.2 +QT_VERSION=5.12.5 XKB_PATH="$BUILD/libxkbcommon" XKB_CACHE_VERSION="3" QT_PATH="$BUILD/qt" QT_CACHE_VERSION="4" -QT_PATCH="$UPSTREAM/Telegram/Patches/qtbase_${QT_VERSION//\./_}.diff" +QT_PATCH="$EXTERNAL/patches/qtbase_${QT_VERSION//\./_}.diff" BREAKPAD_PATH="$BUILD/breakpad" BREAKPAD_CACHE_VERSION="3" GYP_PATH="$BUILD/gyp" GYP_CACHE_VERSION="3" -GYP_PATCH="$UPSTREAM/Telegram/Patches/gyp.diff" +GYP_PATCH="$EXTERNAL/patches/gyp.diff" RANGE_PATH="$BUILD/range-v3" RANGE_CACHE_VERSION="3" @@ -64,6 +64,8 @@ build() { BUILD_VERSION_DATA=$(echo $BUILD_VERSION | cut -d'-' -f 1) + getPatches + # libxkbcommon getXkbCommon @@ -127,6 +129,11 @@ build() { travisEndFold } +getPatches() { + cd "$EXTERNAL" + git clone --depth 1 https://github.com/desktop-app/patches +} + getXkbCommon() { travisStartFold "Getting xkbcommon" @@ -580,8 +587,8 @@ buildCustomQt() { QT_WAS_BUILT="1" info_msg "Downloading and building patched qt" - if [ -d "$EXTERNAL/qt${QT_VERSION}" ]; then - sudo rm -rf "$EXTERNAL/qt${QT_VERSION}" + if [ -d "$EXTERNAL/qt_${QT_VERSION}" ]; then + sudo rm -rf "$EXTERNAL/qt_${QT_VERSION}" fi cd $QT_PATH sudo rm -rf * @@ -592,8 +599,8 @@ buildCustomQt() { cd "$EXTERNAL/qt${QT_VERSION}" perl init-repository --branch --module-subset=qtbase,qtimageformats git checkout v${QT_VERSION} - cd qtbase && git checkout v${QT_VERSION} && cd .. - cd qtimageformats && git checkout v${QT_VERSION} && cd .. + git submodule update qtbase + git submodule update qtimageformats cd "$EXTERNAL/qt${QT_VERSION}/qtbase" git apply "$QT_PATCH" @@ -606,10 +613,10 @@ buildCustomQt() { cd ../../../.. ./configure -prefix $QT_PATH -release -opensource -confirm-license -qt-zlib \ - -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \ - -qt-xkbcommon-x11 -no-opengl -no-gtkstyle -static \ + -qt-libpng -qt-libjpeg -qt-harfbuzz -qt-pcre -qt-xcb \ + -system-freetype -fontconfig -no-opengl -no-gtk -static \ -nomake examples -nomake tests -no-mirclient \ - -dbus-runtime -no-gstreamer -no-mtdev # <- Not sure about these + -dbus-runtime -no-mtdev # <- Not sure about these make $MAKE_ARGS sudo make install } @@ -664,7 +671,7 @@ buildGYP() { git clone https://chromium.googlesource.com/external/gyp cd "$EXTERNAL/gyp" - git checkout 702ac58e47 + git checkout 9f2a7bb1 git apply "$GYP_PATCH" cp -r * "$GYP_PATH/" } @@ -676,6 +683,7 @@ buildTelegram() { "$GYP_PATH/gyp" \ -Dapi_id=17349 \ -Dapi_hash=344583e45741c457fe1862106095a5eb \ + -Dspecial_build_target= \ -Dbuild_defines=${GYP_DEFINES:1} \ -Dlinux_path_xkbcommon=$XKB_PATH \ -Dlinux_path_va=$VA_PATH \