mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 22:27:20 +02:00
Build Qt in snap to get newer version than in Ubuntu
This commit is contained in:
parent
7947af665c
commit
30468746ad
1 changed files with 186 additions and 32 deletions
|
@ -68,17 +68,16 @@ parts:
|
|||
source: .
|
||||
source-type: git
|
||||
parse-info: [usr/share/metainfo/telegram-desktop_telegram-desktop.appdata.xml]
|
||||
build-environment:
|
||||
- LD_LIBRARY_PATH: $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET:$LD_LIBRARY_PATH
|
||||
build-packages:
|
||||
- python
|
||||
- qtbase5-private-dev
|
||||
- libasound2-dev
|
||||
- libglib2.0-dev
|
||||
- libgtk-3-dev
|
||||
- libkf5wayland-dev
|
||||
- liblzma-dev
|
||||
- libopus-dev
|
||||
- libpulse-dev
|
||||
- libqt5waylandclient5-dev
|
||||
- libssl-dev
|
||||
- libxcb1-dev
|
||||
- libxcb-keysyms1-dev
|
||||
|
@ -86,16 +85,12 @@ parts:
|
|||
- libxcb-screensaver0-dev
|
||||
- zlib1g-dev
|
||||
stage-packages:
|
||||
- qt5-image-formats-plugins
|
||||
- qtwayland5
|
||||
- libasound2
|
||||
- libglib2.0-0
|
||||
- libgtk-3-0
|
||||
- libkf5waylandclient5
|
||||
- liblzma5
|
||||
- libopus0
|
||||
- libpulse0
|
||||
- libqt5waylandclient5
|
||||
- libssl1.1
|
||||
- libxcb1
|
||||
- libxcb-keysyms1
|
||||
|
@ -108,7 +103,7 @@ parts:
|
|||
- -DTDESKTOP_API_ID=611335
|
||||
- -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
|
||||
- -DDESKTOP_APP_USE_PACKAGED_LAZY=ON
|
||||
- -DDESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS=$SNAPCRAFT_STAGE/usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5/QtWaylandClient/5.12.8
|
||||
- -DDESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES=OFF
|
||||
- -DTDESKTOP_LAUNCHER_BASENAME=telegram-desktop_telegram-desktop
|
||||
override-pull: |
|
||||
snapcraftctl pull
|
||||
|
@ -134,11 +129,19 @@ parts:
|
|||
after:
|
||||
- desktop-qt5
|
||||
- ffmpeg
|
||||
- kwayland
|
||||
- mozjpeg
|
||||
- openal
|
||||
- qtwayland
|
||||
- webrtc
|
||||
|
||||
patches:
|
||||
source: https://github.com/desktop-app/patches.git
|
||||
source-depth: 1
|
||||
plugin: dump
|
||||
organize:
|
||||
"*": patches/
|
||||
prime: [-./*]
|
||||
|
||||
desktop-qt5:
|
||||
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
|
||||
source-subdir: qt
|
||||
|
@ -146,7 +149,6 @@ parts:
|
|||
make-parameters: ["FLAVOR=qt5"]
|
||||
build-packages:
|
||||
- build-essential
|
||||
- qtbase5-dev
|
||||
- dpkg-dev
|
||||
stage-packages:
|
||||
- libxkbcommon0
|
||||
|
@ -156,26 +158,25 @@ parts:
|
|||
- adwaita-icon-theme
|
||||
- gnome-themes-standard
|
||||
- shared-mime-info
|
||||
- libqt5gui5
|
||||
- libgdk-pixbuf2.0-0
|
||||
- libqt5svg5 # for loading icon themes which are svg
|
||||
- try: [appmenu-qt5] # not available on core18
|
||||
- locales-all
|
||||
- xdg-user-dirs
|
||||
- fcitx-frontend-qt5
|
||||
stage:
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2
|
||||
after:
|
||||
- mozjpeg
|
||||
- qt5
|
||||
|
||||
qt5-xdgdesktopportal-platform:
|
||||
plugin: nil
|
||||
stage-packages:
|
||||
- qt5-xdgdesktopportal-platformtheme
|
||||
stage:
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2
|
||||
after:
|
||||
- mozjpeg
|
||||
extra-cmake-modules:
|
||||
source: https://github.com/KDE/extra-cmake-modules.git
|
||||
source-depth: 1
|
||||
source-tag: v5.77.0
|
||||
plugin: cmake
|
||||
cmake-parameters:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DBUILD_TESTING=OFF
|
||||
prime: [-./*]
|
||||
|
||||
ffmpeg:
|
||||
plugin: nil
|
||||
|
@ -196,6 +197,32 @@ parts:
|
|||
after:
|
||||
- mozjpeg
|
||||
|
||||
kwayland:
|
||||
source: https://github.com/KDE/kwayland.git
|
||||
source-depth: 1
|
||||
source-tag: v5.77.0
|
||||
plugin: cmake
|
||||
build-packages:
|
||||
- libwayland-dev
|
||||
- wayland-protocols
|
||||
stage-packages:
|
||||
- libwayland-client0
|
||||
- libwayland-server0
|
||||
cmake-parameters:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DBUILD_TESTING=OFF
|
||||
prime:
|
||||
- -./usr/include
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libexec
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig
|
||||
- -./usr/mkspecs
|
||||
- -./usr/share
|
||||
after:
|
||||
- extra-cmake-modules
|
||||
- desktop-qt5
|
||||
- plasma-wayland-protocols
|
||||
|
||||
mozjpeg:
|
||||
source: https://github.com/mozilla/mozjpeg.git
|
||||
source-depth: 1
|
||||
|
@ -236,19 +263,146 @@ parts:
|
|||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig
|
||||
|
||||
qtwayland:
|
||||
source: https://github.com/qt/qtwayland.git
|
||||
plasma-wayland-protocols:
|
||||
source: https://github.com/KDE/plasma-wayland-protocols.git
|
||||
source-depth: 1
|
||||
source-tag: v5.12.8
|
||||
plugin: dump
|
||||
override-build: |
|
||||
qmake
|
||||
make -j$(nproc)
|
||||
make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install
|
||||
stage: [-./usr/lib]
|
||||
source-tag: v1.1.1
|
||||
plugin: cmake
|
||||
cmake-parameters:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
prime: [-./*]
|
||||
after:
|
||||
- desktop-qt5
|
||||
- extra-cmake-modules
|
||||
|
||||
qt5:
|
||||
plugin: nil
|
||||
build-packages:
|
||||
- libdbus-1-dev
|
||||
- libegl-dev
|
||||
- libfontconfig1-dev
|
||||
- libfreetype-dev
|
||||
- libgl-dev
|
||||
- libglib2.0-dev
|
||||
- libharfbuzz-dev
|
||||
- libicu-dev
|
||||
- libpcre2-dev
|
||||
- libpng-dev
|
||||
- libssl-dev
|
||||
- libwayland-dev
|
||||
- libx11-dev
|
||||
- libx11-xcb-dev
|
||||
- libxcb1-dev
|
||||
- libxcb-glx0-dev
|
||||
- libxcb-icccm4-dev
|
||||
- libxcb-image0-dev
|
||||
- libxcb-keysyms1-dev
|
||||
- libxcb-randr0-dev
|
||||
- libxcb-render0-dev
|
||||
- libxcb-render-util0-dev
|
||||
- libxcb-shape0-dev
|
||||
- libxcb-shm0-dev
|
||||
- libxcb-sync-dev
|
||||
- libxcb-util-dev
|
||||
- libxcb-xfixes0-dev
|
||||
- libxcb-xinerama0-dev
|
||||
- libxcb-xinput-dev
|
||||
- libxcb-xkb-dev
|
||||
- libxcursor-dev
|
||||
- libxkbcommon-dev
|
||||
- libxkbcommon-x11-dev
|
||||
- zlib1g-dev
|
||||
stage-packages:
|
||||
- libdbus-1-3
|
||||
- libegl1
|
||||
- libfontconfig1
|
||||
- libfreetype6
|
||||
- libgl1
|
||||
- libglib2.0-0
|
||||
- libharfbuzz0b
|
||||
- libicu66
|
||||
- libpcre2-16-0
|
||||
- libpng16-16
|
||||
- libssl1.1
|
||||
- libwayland-client0
|
||||
- libwayland-egl1
|
||||
- libx11-6
|
||||
- libx11-xcb1
|
||||
- libxcb1
|
||||
- libxcb-glx0
|
||||
- libxcb-icccm4
|
||||
- libxcb-image0
|
||||
- libxcb-keysyms1
|
||||
- libxcb-randr0
|
||||
- libxcb-render0
|
||||
- libxcb-render-util0
|
||||
- libxcb-shape0
|
||||
- libxcb-shm0
|
||||
- libxcb-sync1
|
||||
- libxcb-util1
|
||||
- libxcb-xfixes0
|
||||
- libxcb-xinerama0
|
||||
- libxcb-xinput0
|
||||
- libxcb-xkb1
|
||||
- libxcursor1
|
||||
- libxkbcommon0
|
||||
- libxkbcommon-x11-0
|
||||
- zlib1g
|
||||
override-pull: |
|
||||
QT=5_15_2
|
||||
|
||||
git clone -b v5.15.2 --depth=1 git://code.qt.io/qt/qt5.git .
|
||||
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg
|
||||
git submodule update qtbase qtwayland qtimageformats qtsvg
|
||||
|
||||
cd qtbase
|
||||
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 ..
|
||||
override-build: |
|
||||
./configure \
|
||||
-prefix /usr \
|
||||
-bindir /usr/lib/qt5/bin \
|
||||
-libdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET \
|
||||
-docdir /usr/share/qt5/doc \
|
||||
-headerdir /usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5 \
|
||||
-datadir /usr/share/qt5 \
|
||||
-archdatadir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5 \
|
||||
-plugindir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/plugins \
|
||||
-importdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/imports \
|
||||
-translationdir /usr/share/qt5/translations \
|
||||
-hostdatadir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5 \
|
||||
-sysconfdir /etc/xdg \
|
||||
-examplesdir /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples \
|
||||
-release \
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-no-gtk \
|
||||
-no-feature-xcb-sm \
|
||||
-no-feature-wayland-server \
|
||||
-openssl-linked \
|
||||
-nomake examples \
|
||||
-nomake tests \
|
||||
-I $SNAPCRAFT_STAGE/usr/include \
|
||||
-L $SNAPCRAFT_STAGE/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
|
||||
|
||||
make -j$(nproc)
|
||||
make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install
|
||||
stage:
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/libjpeg.so.8.2.2
|
||||
prime:
|
||||
- -./usr/include
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/cmake
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pkgconfig
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/bin
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/mkspecs
|
||||
- -./usr/lib/$SNAPCRAFT_ARCH_TRIPLET/qt5/examples
|
||||
- -./usr/lib/qt5
|
||||
- -./usr/share
|
||||
after:
|
||||
- mozjpeg
|
||||
- patches
|
||||
|
||||
webrtc:
|
||||
source: https://github.com/desktop-app/tg_owt.git
|
||||
|
|
Loading…
Add table
Reference in a new issue