Update to Qt 6.3

This commit is contained in:
Ilya Fedin 2022-04-12 18:31:16 +04:00 committed by John Preston
parent d4cb56a73d
commit 2e1f504c11
4 changed files with 27 additions and 67 deletions

View file

@ -3,9 +3,9 @@ FROM centos:7 AS builder
ENV GIT https://github.com ENV GIT https://github.com
ENV GIT_FREEDESKTOP ${GIT}/gitlab-freedesktop-mirrors ENV GIT_FREEDESKTOP ${GIT}/gitlab-freedesktop-mirrors
ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
ENV QT 6_2_4 ENV QT 6_3_0
ENV QT_TAG v6.2.4 ENV QT_TAG v6.3.0
ENV QT_PREFIX /usr/local/desktop-app/Qt-6.2.4 ENV QT_PREFIX /usr/local/desktop-app/Qt-6.3.0
ENV Qt6_DIR ${QT_PREFIX} ENV Qt6_DIR ${QT_PREFIX}
ENV OPENSSL_VER 1_1_1 ENV OPENSSL_VER 1_1_1
ENV OPENSSL_PREFIX /usr/local/desktop-app/openssl-1.1.1 ENV OPENSSL_PREFIX /usr/local/desktop-app/openssl-1.1.1
@ -44,7 +44,7 @@ RUN ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
RUN rm $CMAKE_FILE RUN rm $CMAKE_FILE
FROM builder AS patches FROM builder AS patches
RUN git clone $GIT/desktop-app/patches.git && cd patches && git checkout 43c34f586a RUN git clone $GIT/desktop-app/patches.git && cd patches && git checkout 86187a0437
FROM builder AS libffi FROM builder AS libffi
RUN git clone -b v3.4.2 --depth=1 $GIT/libffi/libffi.git RUN git clone -b v3.4.2 --depth=1 $GIT/libffi/libffi.git
@ -81,22 +81,6 @@ RUN DESTDIR="$LibrariesPath/xz-cache" cmake --install build
WORKDIR .. WORKDIR ..
RUN rm -rf xz RUN rm -rf xz
FROM patches AS libepoxy
RUN git clone -b 1.5.9 --depth=1 $GIT/anholt/libepoxy.git
WORKDIR libepoxy
RUN git apply ../patches/libepoxy.patch
RUN meson build \
--buildtype=release \
--default-library=both \
-Dtests=false
RUN meson compile -C build
RUN DESTDIR="$LibrariesPath/libepoxy-cache" meson install -C build
WORKDIR ..
RUN rm -rf libepoxy
FROM patches AS libproxy FROM patches AS libproxy
RUN git clone -b 0.4.17 --depth=1 $GIT/libproxy/libproxy.git RUN git clone -b 0.4.17 --depth=1 $GIT/libproxy/libproxy.git
@ -585,7 +569,6 @@ FROM patches AS qt
COPY --from=libffi ${LibrariesPath}/libffi-cache / COPY --from=libffi ${LibrariesPath}/libffi-cache /
COPY --from=zlib ${LibrariesPath}/zlib-cache / COPY --from=zlib ${LibrariesPath}/zlib-cache /
COPY --from=libepoxy ${LibrariesPath}/libepoxy-cache /
COPY --from=libproxy ${LibrariesPath}/libproxy-cache / COPY --from=libproxy ${LibrariesPath}/libproxy-cache /
COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache / COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache /
COPY --from=xcb ${LibrariesPath}/xcb-cache / COPY --from=xcb ${LibrariesPath}/xcb-cache /
@ -604,8 +587,6 @@ RUN perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,q
WORKDIR qtbase WORKDIR qtbase
RUN find ../../patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply RUN find ../../patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
WORKDIR ../qtwayland
RUN find ../../patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
WORKDIR .. WORKDIR ..
RUN ./configure -prefix "$QT_PREFIX" \ RUN ./configure -prefix "$QT_PREFIX" \
@ -617,7 +598,6 @@ RUN ./configure -prefix "$QT_PREFIX" \
-qt-libpng \ -qt-libpng \
-qt-harfbuzz \ -qt-harfbuzz \
-qt-pcre \ -qt-pcre \
-no-pch \
-no-icu \ -no-icu \
-no-feature-xcb-sm \ -no-feature-xcb-sm \
-no-feature-highdpiscaling \ -no-feature-highdpiscaling \
@ -625,9 +605,7 @@ RUN ./configure -prefix "$QT_PREFIX" \
-dbus-runtime \ -dbus-runtime \
-openssl-linked \ -openssl-linked \
-nomake examples \ -nomake examples \
-nomake tests \ -nomake tests
-- \
-DINPUT_egl_extension_platform_wayland=no
RUN cmake --build . --parallel RUN cmake --build . --parallel
RUN DESTDIR="$LibrariesPath/qt-cache" cmake --install . RUN DESTDIR="$LibrariesPath/qt-cache" cmake --install .
@ -655,7 +633,6 @@ WORKDIR ..
FROM builder AS webrtc FROM builder AS webrtc
COPY --from=libepoxy ${LibrariesPath}/libepoxy-cache /
COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache / COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache /
COPY --from=opus ${LibrariesPath}/opus-cache / COPY --from=opus ${LibrariesPath}/opus-cache /
COPY --from=libvpx ${LibrariesPath}/libvpx-cache / COPY --from=libvpx ${LibrariesPath}/libvpx-cache /
@ -668,7 +645,7 @@ RUN mkdir tg_owt
WORKDIR tg_owt WORKDIR tg_owt
RUN git init RUN git init
RUN git remote add origin $GIT/desktop-app/tg_owt.git RUN git remote add origin $GIT/desktop-app/tg_owt.git
RUN git fetch --depth=1 origin 347400dc2377b16be702397ff8db44d5739d2650 RUN git fetch --depth=1 origin 60db14acbda90de6d47bc19f59f3c70e9c3e08a3
RUN git reset --hard FETCH_HEAD RUN git reset --hard FETCH_HEAD
RUN git submodule init RUN git submodule init
RUN git submodule update RUN git submodule update
@ -698,7 +675,6 @@ FROM builder
COPY --from=libffi ${LibrariesPath}/libffi-cache / COPY --from=libffi ${LibrariesPath}/libffi-cache /
COPY --from=zlib ${LibrariesPath}/zlib-cache / COPY --from=zlib ${LibrariesPath}/zlib-cache /
COPY --from=xz ${LibrariesPath}/xz-cache / COPY --from=xz ${LibrariesPath}/xz-cache /
COPY --from=libepoxy ${LibrariesPath}/libepoxy-cache /
COPY --from=libproxy ${LibrariesPath}/libproxy-cache / COPY --from=libproxy ${LibrariesPath}/libproxy-cache /
COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache / COPY --from=mozjpeg ${LibrariesPath}/mozjpeg-cache /
COPY --from=opus ${LibrariesPath}/opus-cache / COPY --from=opus ${LibrariesPath}/opus-cache /

View file

@ -400,7 +400,7 @@ if customRunCommand:
stage('patches', """ stage('patches', """
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 292cb42fe1 git checkout 86187a0437
""") """)
stage('depot_tools', """ stage('depot_tools', """
@ -1204,22 +1204,22 @@ mac:
""") """)
if buildQt6: if buildQt6:
stage('qt_6_2_4', """ stage('qt_6_3_0', """
mac: mac:
git clone -b v6.2.4 https://code.qt.io/qt/qt5.git qt_6_2_4 git clone -b v6.3.0 https://code.qt.io/qt/qt5.git qt_6_3_0
cd qt_6_2_4 cd qt_6_3_0
perl init-repository --module-subset=qtbase,qtimageformats,qtsvg,qt5compat perl init-repository --module-subset=qtbase,qtimageformats,qtsvg,qt5compat
depends:patches/qtbase_6_2_4/*.patch depends:patches/qtbase_6_3_0/*.patch
cd qtbase cd qtbase
find ../../patches/qtbase_6_2_4 -type f -print0 | sort -z | xargs -0 git apply find ../../patches/qtbase_6_3_0 -type f -print0 | sort -z | xargs -0 git apply
cd .. cd ..
CONFIGURATIONS=-debug CONFIGURATIONS=-debug
release: release:
CONFIGURATIONS=-debug-and-release CONFIGURATIONS=-debug-and-release
mac: mac:
./configure -prefix "$USED_PREFIX/Qt-6.2.4" \ ./configure -prefix "$USED_PREFIX/Qt-6.3.0" \
$CONFIGURATIONS \ $CONFIGURATIONS \
-force-debug-info \ -force-debug-info \
-opensource \ -opensource \

@ -1 +1 @@
Subproject commit 44fce12aabc7e6e70bee7ae7bc295cc93c69aded Subproject commit 7db371e6b2caf731fddce474394c0a7bd849fbef

View file

@ -93,6 +93,7 @@ parts:
build-packages: build-packages:
- clang - clang
- g++-10 - g++-10
- ninja-build
- python - python
- libasound2-dev - libasound2-dev
- libglib2.0-dev - libglib2.0-dev
@ -195,23 +196,6 @@ parts:
- mozjpeg - mozjpeg
- qt - qt
epoxy:
source: https://github.com/anholt/libepoxy.git
source-depth: 1
source-tag: 1.5.9
plugin: meson
meson-parameters:
- --buildtype=release
- --prefix=/usr
- --default-library=static
- -Dtests=false
override-pull: |
snapcraftctl pull
patch -p1 < $SNAPCRAFT_STAGE/patches/libepoxy.patch
prime: [-./*]
after:
- patches
ffmpeg: ffmpeg:
plugin: nil plugin: nil
build-packages: build-packages:
@ -236,6 +220,8 @@ parts:
source-depth: 1 source-depth: 1
source-tag: v4.0.3 source-tag: v4.0.3
plugin: cmake plugin: cmake
build-packages:
- ninja-build
cmake-parameters: cmake-parameters:
- -GNinja - -GNinja
- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_BUILD_TYPE=Release
@ -256,6 +242,7 @@ parts:
source-branch: fix_pulse_default source-branch: fix_pulse_default
plugin: cmake plugin: cmake
build-packages: build-packages:
- ninja-build
- libasound2-dev - libasound2-dev
- libpulse-dev - libpulse-dev
stage-packages: stage-packages:
@ -309,7 +296,6 @@ parts:
- libxcb-sync-dev - libxcb-sync-dev
- libxcb-util-dev - libxcb-util-dev
- libxcb-xfixes0-dev - libxcb-xfixes0-dev
- libxcb-xinput-dev
- libxcb-xkb-dev - libxcb-xkb-dev
- libxcursor-dev - libxcursor-dev
- libxkbcommon-dev - libxkbcommon-dev
@ -349,22 +335,19 @@ parts:
- libxcb-sync1 - libxcb-sync1
- libxcb-util1 - libxcb-util1
- libxcb-xfixes0 - libxcb-xfixes0
- libxcb-xinput0
- libxcb-xkb1 - libxcb-xkb1
- libxcursor1 - libxcursor1
- libxkbcommon0 - libxkbcommon0
- libxkbcommon-x11-0 - libxkbcommon-x11-0
- zlib1g - zlib1g
override-pull: | override-pull: |
QT=6_2_4 QT=6_3_0
git clone -b v6.2.4 --depth=1 git://code.qt.io/qt/qt5.git . git clone -b v6.3.0 --depth=1 git://code.qt.io/qt/qt5.git .
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qt5compat perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qt5compat
cd qtbase cd qtbase
find $SNAPCRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply find $SNAPCRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
cd ../qtwayland
find $SNAPCRAFT_STAGE/patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
cd .. cd ..
override-build: | override-build: |
./configure \ ./configure \
@ -379,9 +362,7 @@ parts:
-no-feature-highdpiscaling \ -no-feature-highdpiscaling \
-openssl-linked \ -openssl-linked \
-nomake examples \ -nomake examples \
-nomake tests \ -nomake tests
-- \
-DINPUT_egl_extension_platform_wayland=no
cmake --build . -j$SNAPCRAFT_PARALLEL_BUILD_COUNT cmake --build . -j$SNAPCRAFT_PARALLEL_BUILD_COUNT
DESTDIR="$SNAPCRAFT_PART_INSTALL" cmake --install . DESTDIR="$SNAPCRAFT_PART_INSTALL" cmake --install .
@ -403,7 +384,6 @@ parts:
# Allow tdesktop's custom try-portal-and-fallback logic to work # Allow tdesktop's custom try-portal-and-fallback logic to work
- -./usr/plugins/platformthemes/libqxdgdesktopportal.so - -./usr/plugins/platformthemes/libqxdgdesktopportal.so
after: after:
- epoxy
- mozjpeg - mozjpeg
- patches - patches
@ -450,12 +430,15 @@ parts:
webrtc: webrtc:
source: https://github.com/desktop-app/tg_owt.git source: https://github.com/desktop-app/tg_owt.git
source-depth: 1 source-depth: 1
source-commit: 1fe5e68d999e0bf88d0128ad813438726732f6e0 source-commit: 60db14acbda90de6d47bc19f59f3c70e9c3e08a3
plugin: cmake plugin: cmake
build-packages: build-packages:
- ninja-build
- yasm - yasm
#- libdrm-dev #- libdrm-dev
#- libegl-dev
#- libgbm-dev #- libgbm-dev
#- libgl-dev
#- libglib2.0-dev #- libglib2.0-dev
- libopus-dev - libopus-dev
#- libpipewire-0.2-dev #- libpipewire-0.2-dev
@ -470,7 +453,9 @@ parts:
- libxtst-dev - libxtst-dev
stage-packages: stage-packages:
#- libdrm2 #- libdrm2
#- libegl1
#- libgbm1 #- libgbm1
#- libgl1
#- libglib2.0-0 #- libglib2.0-0
- libopus0 - libopus0
#- libpipewire-0.2-1 #- libpipewire-0.2-1
@ -495,7 +480,6 @@ parts:
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/*.a - -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/*.a
after: after:
#- epoxy
- ffmpeg - ffmpeg
- mozjpeg - mozjpeg
- vpx - vpx