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
|
- -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so
|
||||||
|
|
||||||
qt:
|
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:
|
build-environment:
|
||||||
- LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
|
- LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s
|
||||||
build-packages:
|
build-packages:
|
||||||
|
@ -404,28 +414,22 @@ parts:
|
||||||
- zlib1g
|
- zlib1g
|
||||||
- mesa-vulkan-drivers
|
- mesa-vulkan-drivers
|
||||||
- xkb-data
|
- 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: |
|
override-pull: |
|
||||||
QT=6.9.1
|
craftctl default
|
||||||
|
QT="$(grep 'set(QT_REPO_MODULE_VERSION' qtbase/.cmake.conf | sed -r 's/.*"(.*)".*/\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
|
|
||||||
|
|
||||||
cd qtbase
|
cd qtbase
|
||||||
find $CRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
find $CRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
||||||
cd ../qtwayland
|
cd ../qtwayland
|
||||||
find $CRAFT_STAGE/patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
find $CRAFT_STAGE/patches/qtwayland_${QT} -type f -print0 | sort -z | xargs -r0 git apply
|
||||||
cd ..
|
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:
|
prime:
|
||||||
- -./usr/bin
|
- -./usr/bin
|
||||||
- -./usr/doc
|
- -./usr/doc
|
||||||
|
|
Loading…
Add table
Reference in a new issue