mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 07:52:57 +02:00
Switch qt snapcraft part to cmake plugin
This commit is contained in:
parent
02dd0dbbef
commit
e6ebc19b4f
1 changed files with 21 additions and 17 deletions
|
@ -318,7 +318,17 @@ parts:
|
|||
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
|
||||
|
||||
qt:
|
||||
plugin: nil
|
||||
source: https://github.com/qt/qt5.git
|
||||
source-depth: 1
|
||||
source-tag: v6.9.1
|
||||
source-submodules:
|
||||
- qtbase
|
||||
- qtdeclarative
|
||||
- qtimageformats
|
||||
- qtshadertools
|
||||
- qtsvg
|
||||
- qtwayland
|
||||
plugin: cmake
|
||||
build-environment:
|
||||
- LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
|
||||
build-packages:
|
||||
|
@ -404,28 +414,22 @@ parts:
|
|||
- zlib1g
|
||||
- mesa-vulkan-drivers
|
||||
- xkb-data
|
||||
cmake-generator: Ninja
|
||||
cmake-parameters:
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX=/usr
|
||||
- -DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr
|
||||
- -DINSTALL_LIBDIR=/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
|
||||
- -DQT_GENERATE_SBOM=OFF
|
||||
- -DINPUT_openssl=linked
|
||||
override-pull: |
|
||||
QT=6.9.1
|
||||
|
||||
git clone -b v${QT} --depth=1 https://github.com/qt/qt5.git .
|
||||
git submodule update --init --recursive --depth=1 qtbase qtdeclarative qtwayland qtimageformats qtsvg qtshadertools
|
||||
|
||||
craftctl default
|
||||
QT="$(grep 'set(QT_REPO_MODULE_VERSION' qtbase/.cmake.conf | sed -r 's/.*"(.*)".*/\1/')"
|
||||
cd qtbase
|
||||
find $CRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
||||
cd ../qtwayland
|
||||
find $CRAFT_STAGE/patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
||||
cd ..
|
||||
override-build: |
|
||||
cmake -GNinja -B $CRAFT_PART_BUILD \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_PREFIX_PATH=$CRAFT_STAGE/usr \
|
||||
-DINSTALL_LIBDIR=/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR \
|
||||
-DQT_GENERATE_SBOM=OFF \
|
||||
-DINPUT_openssl=linked
|
||||
|
||||
cmake --build . -j$CRAFT_PARALLEL_BUILD_COUNT
|
||||
DESTDIR="$CRAFT_PART_INSTALL" cmake --install .
|
||||
prime:
|
||||
- -./usr/bin
|
||||
- -./usr/doc
|
||||
|
|
Loading…
Add table
Reference in a new issue