[neon/snap-packaging/kde-qt5-core-sdk] /: Qt5 way of things.

Scarlett Moore null at kde.org
Wed Oct 9 07:58:56 BST 2024


Git commit 192e2f39dc4ea1e1e3cc6170cb56992e3fea31bd by Scarlett Moore.
Committed on 09/10/2024 at 06:58.
Pushed by scarlettmoore into branch 'master'.

Qt5 way of things.

M  +1059 -362  snapcraft.yaml

https://invent.kde.org/neon/snap-packaging/kde-qt5-core-sdk/-/commit/192e2f39dc4ea1e1e3cc6170cb56992e3fea31bd

diff --git a/snapcraft.yaml b/snapcraft.yaml
index eb1b134..73b71b4 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,406 +1,1103 @@
-name: kde-qt5-core22-sdk
+---
+name: qt-5-15-10-sdk
+version: 5.15.10
 base: core22
-version: v5.15.15-lts-lgpl
-summary: KDE fork Qt Framework SDK
+summary: Shared Qt 5.15.10 with the KDE patch set
 description: |
-  Qt is a cross-platform application development framework widely used
-  for developing software with graphical user interfaces (GUIs) and
-  interactive functionality.
+ This snap contains the necessary libraries required by
+ Qt Applications.
+confinement: strict
+grade: stable
 architectures:
   - build-on: amd64
   - build-on: arm64
-  # - build-on: armhf
-  # - build-on: ppc64el
-grade: stable
-confinement: strict
-
-lint:
-  ignore:
-    - classic
-    - library
-
-package-repositories:
-  - type: apt
-    url: https://deb.nodesource.com/node_20.x
-    components: [main]
-    suites: [nodistro]
-    key-id: 6F71F525282841EEDAF851B42F59B5F99B1BE0B4
-  - type: apt
-    components:
-      - main
-    suites:
-      - jammy
-    key-id: 444DABCF3667D0283F894EDDE6D4736255751E5D
-    url: http://origin.archive.neon.kde.org/user
-    key-server: keyserver.ubuntu.com
-
+  - build-on: armhf
+  - build-on: ppc64el
+compression: lzo
 parts:
-  qt5:
-    plugin: cmake
-    source: https://invent.kde.org/qt/qt/qt5.git
-    source-tag: $SNAPCRAFT_PROJECT_VERSION
-    source-depth: 1
-    cmake-generator: Ninja
-    cmake-parameters:
-      - -DCMAKE_BUILD_TYPE=Release
-      - -DCMAKE_INSTALL_PREFIX=/usr
-      - -DINSTALL_BINDIR=/usr/bin/qt5
-      - -DINSTALL_LIBDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR
-      - -DINSTALL_LIBEXECDIR=lib/qt5/libexec
-      - -DINSTALL_ARCHDATADIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt5
-      - -DINSTALL_EXAMPLESDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt5/examples
-      - -DINSTALL_DATADIR=share/qt5
-      - -DINSTALL_HOSTDATADIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt5
-      - -DINSTALL_SYSCONFDIR=/share
-      - -DINSTALL_INCLUDEDIR=include/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt5
-      - -DINSTALL_PLUGINDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt5/plugins
-      - -DINSTALL_TRANSLATIONDIR=share/qt5/translations
-      - -DINSTALL_MKSPECSDIR=lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/qt5/mkspecs
-      - -DINSTALL_PUBLICBINDIR=bin
-      - -DBUILD_EXAMPLES=OFF
-      - -DBUILD_DOCS=OFF
-      - -DFEATURE_mimetype_database=OFF
-      - -DFEATURE_dbus_linked=ON
-      - -DFEATURE_accessibility=ON
-      - -DFEATURE_doubleconversion=ON
-      - -DFEATURE_glib=ON
-      - -DFEATURE_icu=ON
-      - -DFEATURE_pcre2=ON
-      - -DFEATURE_system_pcre2=ON
-      - -DFEATURE_system_zlib=ON
-      - -DFEATURE_ssl=ON
-      - -DFEATURE_libproxy=ON
-      - -DFEATURE_system_proxies=ON
-      - -DFEATURE_cups=ON
-      - -DFEATURE_ffmpeg=ON
-      - -DFEATURE_gstreamer=ON
-      - -DFEATURE_pulseaudio=ON
-      - -DFEATURE_fontconfig=ON
-      - -DFEATURE_freetype=ON
-      - -DFEATURE_harfbuzz=ON
-      - -DFEATURE_gtk=ON
-      - -DFEATURE_directfb=OFF
-      - -DFEATURE_sql_odbc=ON
-      - -DFEATURE_sql_mysql=ON
-      - -DFEATURE_sql_psql=ON
-      - -DFEATURE_sql_sqlite=ON
-      - -DFEATURE_system_sqlite=ON
-      - -DFEATURE_jpeg=ON
-      - -DFEATURE_system_jpeg=ON
-      - -DFEATURE_png=ON
-      - -DFEATURE_system_png=ON
-      - -DFEATURE_system_libb2=ON
-      - -DFEATURE_rpath=OFF
-      - -DFEATURE_relocatable=ON
-      - -DFEATURE_qtpdf_build=ON
-      - -DFEATURE_qtpdf_enable_v8=ON
-      - -DFEATURE_qtpdf_quick_build=ON
-      - -DFEATURE_qtpdf_widgets_build=ON
-      - -DFEATURE_qtwebengine-quick-build=ON
-      - -DFEATURE_qtwebengine-widgets-build=ON
-      - -DFEATURE_webengine_kerberos=ON
-      - -DFEATURE_webengine_proprietary_codecs=ON
-      - -DFEATURE_webengine_system_icu=OFF
-      # - -DFEATURE_webengine_system_libevent=ON
-      - -DFEATURE_webengine-system-libjpeg=on
-      - -DFEATURE_webengine-system-libpng=on
-      - -DFEATURE_webengine_system_zlib=ON
-      - -DFEATURE_webengine_webrtc=ON
-      - -DFEATURE_webengine_webrtc-pipewire=ON
-      - -DQT_FEATURE_alsa=ON
-      - -DFEATURE_use_mold_linker=ON
-      - -DBUILD_SHARED_LIBS=ON
-    build-environment:
-      - PKG_CONFIG_PATH: /snap/ffmpeg-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
-      - CMAKE_PREFIX_PATH: /snap/ffmpeg-2204-sdk/current/usr${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}
-      - CMAKE_FIND_ROOT_PATH: /snap/ffmpeg-2204-sdk/current/usr
-    build-snaps:
-      - ffmpeg-2204-sdk
-      - cmake
+  patches:
+    plugin: dump
+    source: patches
+    source-type: local
+    prime:
+    - -*
+  mesa:
+    after: []
+    plugin: nil
+    build-attributes:
+    - no-patchelf
+    build-packages: []
+    stage-packages:
+    - libgl1-mesa-dri
+    - libglx-mesa0
+    prime:
+    - -lib/udev
+    - -usr/doc
+    - -usr/doc-base
+    - -usr/share/applications
+    - -usr/share/apport
+    - -usr/share/bug
+    - -usr/share/doc
+    - -usr/share/doc-base
+    - -usr/share/icons
+    - -usr/share/libdrm
+    - -usr/share/libwacom
+    - -usr/share/lintian
+    - -usr/share/man
+    - -usr/share/pkgconfig
+  qtbase:
+    after: [ patches, mesa ]
+    plugin: nil
+    source: https://invent.kde.org/qt/qt/qtbase.git
+    source-branch: kde/5.15
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      ./configure \
+          -prefix /usr \
+          -bindir /usr/lib/qt5/bin \
+          -libdir /usr/lib/$CRAFT_ARCH_TRIPLET \
+          -docdir /usr/share/qt5/doc \
+          -headerdir /usr/include/$CRAFT_ARCH_TRIPLET/qt5 \
+          -datadir /usr/share/qt5 \
+          -archdatadir /usr/lib/$CRAFT_ARCH_TRIPLET/qt5 \
+          -plugindir /usr/lib/$CRAFT_ARCH_TRIPLET/qt5/plugins \
+          -importdir /usr/lib/$CRAFT_ARCH_TRIPLET/qt5/imports \
+          -translationdir /usr/share/qt5/translations \
+          -hostdatadir /usr/lib/$CRAFT_ARCH_TRIPLET/qt5 \
+          -sysconfdir /etc/xdg \
+          -examplesdir /usr/lib/$CRAFT_ARCH_TRIPLET/qt5/examples \
+          -release \
+          -opensource \
+          -confirm-license \
+          -nomake examples \
+          -nomake tests \
+          -I $CRAFT_STAGE/usr/include \
+          -L $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET
+
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL" install
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtbase/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtbase/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtbase/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtbase/src/.git
     build-packages:
-      - bison
-      - clang
-      - default-libmysqlclient-dev
-      - firebird-dev
-      - flex
-      - flite1-dev
-      - gettext
-      - gperf
-      - libasound2-dev
-      - libass-dev
       - libatspi2.0-dev
-      - libb2-dev
-      - libclang-dev
+      - libclang-15-dev
       - libcups2-dev
       - libdbus-1-dev
-      - libdouble-conversion-dev
-      - libdrm-dev
-      - libfontconfig-dev
-      - libfontconfig1-dev
-      - libfreetype-dev
-      - libfreetype6-dev
-      - libgbm-dev
-      - libgl-dev
-      - libgl1-mesa-dev
-      - libgles-dev
-      - libgles2-mesa-dev
-      - libglib2.0-dev
-      - libglu-dev
-      - libglu1-mesa-dev
-      - libglx-dev
-      - libgstreamer1.0-dev
-      - libgstreamer-plugins-base1.0-dev
+      - libegl1-mesa-dev
+      - libevdev-dev
+      - libgif-dev
       - libgtk-3-dev
-      - libharfbuzz-dev
-      - libhunspell-dev
-      - libicu-dev
+      - libice-dev
       - libinput-dev
       - libjpeg-dev
-      - libkrb5-dev
-      - liblttng-ust-dev
-      - libmd4c-dev
-      - libmd4c-html0-dev
       - libmtdev-dev
-      - libnss3-dev
-      - libopengl-dev
-      - libpcre2-dev
-      - libpng-dev
+      - libmysqlclient-dev
       - libpq-dev
-      - libproxy-dev
-      - libpulse-dev
-      - libsctp-dev
+      - libsm-dev
       - libsqlite3-dev
       - libssl-dev
-      - libsystemd-dev
-      - libts-dev
       - libudev-dev
-      - libva-dev
+      - libvulkan-dev
       - libwayland-dev
       - libwayland-egl1-mesa
-      - libwayland-server0
-      - libx11-dev
-      - libx11-xcb-dev
-      - libxcb-composite0-dev
-      - libxcb-cursor-dev
-      - libxcb-damage0-dev
-      - libxcb-dpms0-dev
-      - libxcb-dri2-0-dev
-      - libxcb-dri3-dev
-      - libxcb-ewmh-dev
-      - libxcb-glx0-dev
       - libxcb-icccm4-dev
       - libxcb-image0-dev
       - libxcb-keysyms1-dev
-      - libxcb-present-dev
       - libxcb-randr0-dev
-      - libxcb-record0-dev
       - libxcb-render-util0-dev
-      - libxcb-render0-dev
-      - libxcb-res0-dev
-      - libxcb-screensaver0-dev
-      - libxcb-shape0-dev
-      - libxcb-shm0-dev
-      - libxcb-sync-dev
-      - libxcb-sync0-dev
       - libxcb-util-dev
-      - libxcb-xf86dri0-dev
-      - libxcb-xfixes0-dev
       - libxcb-xinerama0-dev
       - libxcb-xinput-dev
-      - libxcb-xkb-dev
-      - libxcb-xrm-dev
-      - libxcb-xtest0-dev
-      - libxcb-xv0-dev
-      - libxcb-xvmc0-dev
-      - libxcb1-dev
       - libxcomposite-dev
       - libxcursor-dev
-      - libxext-dev
-      - libxfixes-dev
       - libxi-dev
-      - libxkbcommon-dev
+      - libxinerama-dev
       - libxkbcommon-x11-dev
-      - libxkbfile-dev
-      - libxrender-dev
-      - libxshmfence-dev
-      - libxtst-dev
-      - libzstd-dev
-      - llvm-dev
-      - ninja-build
-      - nodejs
-      - pkg-config
-      - python-pip
-      - python2-minimal
-      - python3-html5lib
-      - python3-minimal
+      - libxkbcommon-dev
+      - libxrandr-dev
+      - llvm-15-dev
       - unixodbc-dev
-      - zlib1g-dev
     stage-packages:
-      - libpulse0
-    stage-snaps:
-      - ffmpeg-2204
-    # override-pull: |
-    #   craftctl default
-    #   # while read -r PATCHFILE ; do
-    #   #   ls -l
-    #   #   ls -l cmake/
-    #   #   ls -l qtbase/cmake/
-    #   #   pwd
-    #   #   patch -p1 < "$CRAFT_PROJECT_DIR/patches/$PATCHFILE"
-    #   # done < $CRAFT_PROJECT_DIR/patches/series
-    override-build: |
-      craftctl default
-      mkdir -p $CRAFT_PART_INSTALL/etc/$CRAFT_PART_NAME
-      cp $CRAFT_PART_BUILD/config.summary $CRAFT_PART_INSTALL/etc/$CRAFT_PART_NAME
-
-  debs:
-    after: [qt5]
+      - libasn1-8-heimdal
+      - libatk-bridge2.0-0
+      - libatk1.0-0
+      - libatspi2.0-0
+      - libavahi-client3
+      - libavahi-common3
+      - libcups2
+      - libdbus-1-3
+      - libegl1
+      - libepoxy0
+      - libevdev2
+      - libgif7
+      - libglib2.0-0
+      - libgssapi3-heimdal
+      - libgtk-3-0
+      - libhcrypto4-heimdal
+      - libheimbase1-heimdal
+      - libheimntlm0-heimdal
+      - libhx509-5-heimdal
+      - libice6
+      - libinput10
+      - libjpeg-turbo8
+      - libkrb5-26-heimdal
+      - libldap-2.5-0
+      - libltdl7
+      - libmtdev1
+      - libmysqlclient21
+      - libodbc1
+      - libpcre2-16-0
+      - libpixman-1-0
+      - libpq5
+      - libroken18-heimdal
+      - libsasl2-2
+      - libsm6
+      - libsqlite3-0
+      - libssl3
+      - libsybdb5
+      - libudev1
+      - libvulkan1
+      - libwayland-client0
+      - libwayland-cursor0
+      - libwayland-egl1
+      - libwind0-heimdal
+      - libxcb-icccm4
+      - libxcb-image0
+      - libxcb-keysyms1
+      - libxcb-randr0
+      - libxcb-render-util0
+      - libxcb-util1
+      - libxcb-xinerama0
+      - libxcb-xinput0
+      - libxcb-xkb1
+      - libxcomposite1
+      - libxcursor1
+      - libxdamage1
+      - libxi6
+      - libxinerama1
+      - libxkbcommon-x11-0
+      - libxkbcommon0
+      - libxrandr2
+  qtxmlpatterns:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtxmlpatterns.git
+    source-branch: kde/5.15
     plugin: nil
-    stage-packages:
-      - bison
-      - clang
-      - default-libmysqlclient-dev
-      - docbook
-      - docbook-xml
-      - docbook-xsl
-      - doxygen
-      - firebird-dev
-      - flex
-      - flite1-dev
-      - gperf
-      - graphviz
-      - libasound2-dev
-      - libatspi2.0-dev
-      - libb2-dev
-      - libclang-dev
-      - libcups2-dev
-      - libdbus-1-dev
-      - libdouble-conversion-dev
-      - libdrm-dev
-      - libfontconfig-dev
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtxmlpatterns/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtxmlpatterns/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtxmlpatterns/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtxmlpatterns/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtx11extras:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtx11extras.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtx11extras/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtx11extras/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtx11extras/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtx11extras/src/.git
+    build-packages:
       - libfontconfig1-dev
-      - libfreetype-dev
       - libfreetype6-dev
-      - libgbm-dev
-      - libgl-dev
-      - libgl1-mesa-dev
-      - libgles-dev
-      - libgles2-mesa-dev
-      - libglib2.0-dev
-      - libglu-dev
-      - libglu1-mesa-dev
-      - libglx-dev
-      - libgstreamer1.0-dev
-      - libgstreamer-plugins-base1.0-dev
-      - libgtk-3-dev
-      - libharfbuzz-dev
-      - libhunspell-dev
-      - libicu-dev
-      - libinput-dev
-      - libjpeg-dev
-      - libkrb5-dev
-      - liblttng-ust-dev
-      - libmd4c-dev
-      - libmd4c-html0-dev
-      - libmtdev-dev
-      - libnss3-dev
-      - libopengl-dev
-      - libpcre2-dev
-      - libpng-dev
-      - libpq-dev
-      - libproxy-dev
-      - libpulse-dev
-      - libsctp-dev
-      - libsm-dev
-      - libsqlite3-dev
-      - libssl-dev
-      - libsystemd-dev
-      - libts-dev
-      - libudev-dev
-      - libva-dev
-      - libwayland-dev
-      - libwayland-egl1-mesa
-      - libwayland-server0
-      - libx11-dev
       - libx11-xcb-dev
-      - libxcb-composite0-dev
-      - libxcb-cursor-dev
-      - libxcb-damage0-dev
-      - libxcb-dpms0-dev
-      - libxcb-dri2-0-dev
-      - libxcb-dri3-dev
-      - libxcb-ewmh-dev
+      - libxfixes-dev
       - libxcb-glx0-dev
-      - libxcb-icccm4-dev
-      - libxcb-image0-dev
-      - libxcb-keysyms1-dev
-      - libxcb-present-dev
-      - libxcb-randr0-dev
-      - libxcb-record0-dev
-      - libxcb-render-util0-dev
-      - libxcb-render0-dev
-      - libxcb-res0-dev
-      - libxcb-screensaver0-dev
-      - libxcb-shape0-dev
-      - libxcb-shm0-dev
-      - libxcb-sync-dev
       - libxcb-sync0-dev
-      - libxcb-util-dev
-      - libxcb-xf86dri0-dev
-      - libxcb-xfixes0-dev
-      - libxcb-xinerama0-dev
-      - libxcb-xinput-dev
-      - libxcb-xkb-dev
-      - libxcb-xrm-dev
-      - libxcb-xtest0-dev
-      - libxcb-xv0-dev
-      - libxcb-xvmc0-dev
-      - libxcb1-dev
-      - libxcomposite-dev
-      - libxcursor-dev
-      - libxext-dev
-      - libxfixes-dev
-      - libxi-dev
-      - libxkbcommon-dev
-      - libxkbcommon-x11-dev
-      - libxkbfile-dev
-      - libxrender-dev
-      - libxshmfence-dev
-      - libxtst-dev
-      - libzstd-dev
-      - llvm-dev
-      - ninja-build
-      - nodejs
-      - pkg-config
-      - python-pip
-      - python2-minimal
-      - python3-html5lib
-      - python3-minimal
-      - unixodbc-dev
-      - zlib1g-dev
-      - gettext
-      - sgml-data
-      - libxml2-utils
-      - libglvnd-dev
-    prime:
-      - -lib
-      - -usr/lib/systemd
-      - -usr/share/bug
-      - -usr/share/dbus-1
-      - -usr/share/doc
-      - -usr/share/doc-base
-      - -usr/share/lintian
-      - -usr/share/man
-      - -usr/lib/*/*.a
-    override-stage: |
-        craftctl default
-        find $CRAFT_STAGE -type f,l -name "*.pc" -exec bash -c "sed -i 's:/root/stage:/snap/$CRAFT_PROJECT_NAME/current:g' {}*" \;
-
-  cleanup:
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtgamepad:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtgamepad.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtgamepad/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtgamepad/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtgamepad/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtgamepad/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtimageformats:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtimageformats.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtimageformats/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtimageformats/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtimageformats/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtimageformats/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+    build-packages:
+      - libtiff5-dev
+      - libmng-dev
+    stage-packages:
+      - libmng2
+      - libwebpdemux2
+  qtnetworkauth:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtnetworkauth.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtnetworkauth/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtnetworkauth/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtnetworkauth/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtnetworkauth/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtserialport:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtserialport.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtserialport/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtserialport/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtserialport/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtserialport/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtremoteobjects:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtremoteobjects.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtremoteobjects/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtremoteobjects/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtremoteobjects/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtremoteobjects/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtsvg:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtsvg.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtsvg/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtsvg/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtsvg/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtsvg/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtscript:
+    after: [ qtbase ]
+    source: https://invent.kde.org/qt/qt/qtscript.git
+    source-tag: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtscript/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtscript/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtscript/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtscript/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtdeclarative:
+    after: [ qtxmlpatterns ]
+    source: https://invent.kde.org/qt/qt/qtdeclarative.git
+    source-branch: kde/5.15
     plugin: nil
-    after: [debs]
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
     override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtdeclarative/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtdeclarative/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtdeclarative/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtdeclarative/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtwayland:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtwayland.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtwayland/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtwayland/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtwayland/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtwayland/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qttools:
+    after:
+    - qtdeclarative
+    - qtxmlpatterns
+    - qtbase
+    - qtdeclarative
+    - qtmultimedia
+    source: https://invent.kde.org/qt/qt/qttools.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qttools/build/*
+      rm -rf $CRAFT_STAGE/../parts/qttools/src/*
+      rm -rf $CRAFT_STAGE/../parts/qttools/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qttools/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+    stage-packages:
+      - libclang1-15
+      - libllvm15
+  qtconnectivity:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtconnectivity.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtconnectivity/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtconnectivity/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtconnectivity/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtconnectivity/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+    build-packages:
+      - libbluetooth-dev
+    stage-packages:
+      - libbluetooth3
+  qtcharts:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtcharts.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtcharts/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtcharts/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtcharts/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtcharts/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtdoc:
+    after:
+    - qtdeclarative
+    - qtxmlpatterns
+    - qtbase
+    - qtdeclarative
+    - qtmultimedia
+    - qttools
+    - qtwebengine
+    source: https://invent.kde.org/qt/qt/qtdoc.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+        - QT_INSTALL_DOCS: $CRAFT_PART_INSTALL/usr/share/qt5/doc
+    override-build: |
+      # $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      #$CRAFT_STAGE/usr/lib/qt5/bin/qmake -query
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake
+      make -j$CRAFT_PARALLEL_BUILD_COUNT docs
+      # make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      # cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtdoc/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtdoc/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtdoc/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtdoc/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtlottie:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtlottie.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtlottie/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtlottie/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtlottie/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtlottie/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtgraphicaleffects:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtgraphicaleffects.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtgraphicaleffects/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtgraphicaleffects/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtgraphicaleffects/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtgraphicaleffects/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtmultimedia:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtmultimedia.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtmultimedia/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtmultimedia/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtmultimedia/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtmultimedia/src/.git
+    stage:
+      # remove ffmpeg libs as they come from ffmpeg part
+      - -usr/lib/$CRAFT_ARCH_TRIPLET/libavcodec.so.58*
+      - -usr/lib/$CRAFT_ARCH_TRIPLET/libavutil.so.56*
+      - -usr/lib/$CRAFT_ARCH_TRIPLET/libswresample.so.3*
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+    build-packages:
+      - libgstreamer1.0-dev
+      - libgstreamer-plugins-base1.0-dev
+    stage-packages:
+      - libgstreamer-gl1.0-0
+      - libgstreamer-plugins-base1.0-0
+      - libgstreamer1.0-0
+      - libgudev-1.0-0
+      - liborc-0.4-0
+  qtquick3d:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtquick3d.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtquick3d/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtquick3d/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtquick3d/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtquick3d/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtquickcontrols:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtquickcontrols.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtscxml:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtscxml.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtscxml/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtscxml/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtscxml/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtscxml/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtquicktimeline:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtquicktimeline.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtquicktimeline/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtquicktimeline/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtquicktimeline/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtquicktimeline/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtsensors:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtsensors.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtsensors/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtsensors/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtsensors/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtsensors/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtwebchannel:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtwebchannel.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtwebchannel/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtwebchannel/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtwebchannel/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtwebchannel/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtwebsockets:
+    after: [ qtdeclarative ]
+    source: https://invent.kde.org/qt/qt/qtwebsockets.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtwebsockets/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtwebsockets/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtwebsockets/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtwebsockets/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qt3d:
+    after: [ qtdeclarative, qtimageformats ]
+    source: https://invent.kde.org/qt/qt/qt3d.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qt3d/build/*
+      rm -rf $CRAFT_STAGE/../parts/qt3d/src/*
+      rm -rf $CRAFT_STAGE/../parts/qt3d/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qt3d/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtquickcontrols2:
+    after: [ qtdeclarative, qtquickcontrols ]
+    source: https://invent.kde.org/qt/qt/qtquickcontrols2.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols2/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols2/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols2/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtquickcontrols2/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtlocation:
+    after: [ qtquickcontrols, qtserialport ]
+    source: https://invent.kde.org/qt/qt/qtlocation.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtlocation/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtlocation/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtlocation/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtlocation/src/.git
+    build-packages:
+      - libgeoclue-2-dev
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtdatavis3d:
+    after: [ qtmultimedia ]
+    source: https://invent.kde.org/qt/qt/qtdatavis3d.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtdatavis3d/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtdatavis3d/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtdatavis3d/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtdatavis3d/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtspeech:
+    after: [ qtmultimedia ]
+    source: https://invent.kde.org/qt/qt/qtspeech.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtspeech/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtspeech/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtspeech/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtspeech/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtserialbus:
+    after: [ qtserialport ]
+    source: https://invent.kde.org/qt/qt/qtserialbus.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtserialbus/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtserialbus/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtserialbus/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtserialbus/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qttranslations:
+    after: [ qttools ]
+    source: https://invent.kde.org/qt/qt/qttranslations.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qttranslations/build/*
+      rm -rf $CRAFT_STAGE/../parts/qttranslations/src/*
+      rm -rf $CRAFT_STAGE/../parts/qttranslations/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qttranslations/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtwebglplugin:
+    after: [ qtwebsockets ]
+    source: https://invent.kde.org/qt/qt/qtwebglplugin.git
+    source-branch: kde/5.15
+    plugin: nil
+    build-environment:
+        - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+        - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    override-stage: |
+      craftctl default
+      # Cleanup space on build VM to prevent running out of disk space for later parts
+      rm -rf $CRAFT_STAGE/../parts/qtwebglplugin/build/*
+      rm -rf $CRAFT_STAGE/../parts/qtwebglplugin/src/*
+      rm -rf $CRAFT_STAGE/../parts/qtwebglplugin/build/.git
+      rm -rf $CRAFT_STAGE/../parts/qtwebglplugin/src/.git
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+  qtwebengine:
+    source: https://invent.kde.org/qt/qt/qtwebengine.git
+    source-tag: 5.15.17-lts
+    plugin: nil
+    build-environment:
+      - LD_LIBRARY_PATH: $CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+      - PATH: $CRAFT_STAGE/usr/bin${PATH:+:$PATH}
+    override-build: |
+      # Setting number of build jobs to a safe number to prevent running out of memory during QtWebengine build
+      memtotal=$(cat /proc/meminfo | awk '{print $2}' | head -n1)
+      roundedmem=$(python3 -c "print(round($memtotal/1024000.0))")
+      maxcoresformem=$(python3 -c "print(max(1, int(($roundedmem / 2)-2)))")
+      numcoreslow=$(python3 -c "print(min($maxcoresformem, $CRAFT_PARALLEL_BUILD_COUNT))")
+      $CRAFT_STAGE/usr/lib/qt5/bin/qmake -qtconf "$CRAFT_STAGE/usr/lib/$CRAFT_ARCH_TRIPLET/qt5/qt.conf"
+      make -j$CRAFT_PARALLEL_BUILD_COUNT
+      make INSTALL_ROOT="$CRAFT_PART_INSTALL/tmp" install
+      cp -a "$CRAFT_PART_INSTALL/tmp$CRAFT_STAGE/." "$CRAFT_PART_INSTALL"
+      rm -r "$CRAFT_PART_INSTALL/tmp"
+    prime:
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.la
+      - -./usr/lib/$CRAFT_ARCH_TRIPLET/*.prl
+    stage-packages:
+      - libnspr4
+      - libnss3
+      - libxtst6
+    after:
+      - qtlocation
+      - qtwebchannel
+      - qtquickcontrols2
+      - qtsvg
+
+    # caches:
+    #   plugin: nil
+    # after: [ conditioning ]
+    #   build-packages:
+    #     - gtk-update-icon-cache
+    #     - libglib2.0-bin
+    #     - shared-mime-info
+    #   override-build: |
+    #     set -eux
+    #     snapcraftctl build
+    #     glib-compile-schemas $CRAFT_STAGE/usr/share/glib-2.0/schemas
+    #     update-mime-database $CRAFT_STAGE/usr/share/mime
+    #     for dir in $CRAFT_STAGE/usr/share/icons/*; do
+    #       if [ -f "$dir/index.theme" ]; then
+    #         gtk-update-icon-cache --force "$dir"
+    #       fi
+    #     done
+
+  conditioning:
+    after: [ qtimageformats, qtgamepad, qtgraphicaleffects, qtscript, qtspeech, qtwebsockets, qtwebglplugin, qtx11extras, qtcharts, qtconnectivity, qtdatavis3d, qttools, qtdoc, qtquick3d, qtlottie, qtnetworkauth, qtserialport, qtquicktimeline, qtremoteobjects, qtscxml, qtsensors, qtserialbus, qttranslations, qtmultimedia, qt3d, qtwayland, qtwebengine ]
+    plugin: nil
+    override-prime: |
       set -eux
-      for snap in "core22" "ffmpeg-2204-sdk"; do
-        cd "/snap/$snap/current" && find . -type f,l -exec rm -f "$CRAFT_PRIME/{}" \;
+      snapcraftctl prime
+
+      for PC in $(find . -path "*/pkgconfig/*.pc")
+      do
+        sed -i 's#prefix=$CRAFT_STAGE#prefix=/snap/$CRAFT_PROJECT_NAME/current#' $PC
+        sed -i 's#prefix = /usr#prefix=/snap/$CRAFT_PROJECT_NAME/current/usr#' $PC
+        sed -i 's#prefix=/usr#prefix=/snap/$CRAFT_PROJECT_NAME/current/usr#' $PC
+        sed -i 's#original_prefix=/snap/$CRAFT_PROJECT_NAME/current/usr#original_prefix=/usr#' $PC
+
+        sed -i 's#libdir=/usr#libdir=${prefix}#' $PC
+        sed -i 's#libdir=/lib#libdir=/snap/$CRAFT_PROJECT_NAME/current/lib#' $PC
+
+        sed -i 's#exec_prefix=/usr#exec_prefix=${prefix}#' $PC
+        sed -i 's#includedir=/usr#includedir=${prefix}#' $PC
+        sed -i 's#sysconfdir=/etc#sysconfdir=/snap/$CRAFT_PROJECT_NAME/current/etc#' $PC
+
+        sed -i 's#/usr/#/snap/$CRAFT_PROJECT_NAME/current/usr/#g' $PC
+        sed -i 's#$CRAFT_STAGE##g' $PC
+        sed -i 's#/etc/#/snap/$CRAFT_PROJECT_NAME/current/etc/#g' $PC
       done


More information about the Neon-commits mailing list