kvantum-qt5

SVG-based Qt5 theme engine plus a config tool and extra themes

runtime dependencies hicolor-icon-theme (Fonts, cursors, icons, sounds and themes/Icon)
qt5svg (Graphic libraries and applications/Other GUIs)
qt5x11extras (Graphic libraries and applications/Other GUIs)
kwindowsystem
make dependencies qt5tools
libkf5windowsystem-dev
apt install libkf5windowsystem-dev
mkdir /data/buildroot/package/kvantum-qt5
cat > /data/buildroot/package/kvantum-qt5/Config.in<< 'EOF'
config BR2_PACKAGE_KVANTUM_QT5
        bool "kvantum-qt5"
        depends on BR2_PACKAGE_QT5SVG
        depends on BR2_PACKAGE_QT5X11EXTRAS
        depends on BR2_PACKAGE_HICOLOR_ICON_THEME
        depends on BR2_PACKAGE_KWINDOWSYSTEM
        depends on BR2_PACKAGE_QT5TOOLS
        help
          SVG-based Qt5 theme engine plus a config tool and extra themes
EOF

cat > /data/buildroot/package/kvantum-qt5/kvantum-qt5.mk<< 'EOF'
#############################################################
#
# kvantum-qt5
#https://github.com/tsujan/Kvantum/archive/refs/tags/V1.0.4.tar.gz
#############################################################
KVANTUM_QT5_VERSION = 1.0.4
KVANTUM_QT5_SOURCE  = V$(KVANTUM_QT5_VERSION).tar.gz
KVANTUM_QT5_SITE    = https://github.com/tsujan/Kvantum/archive/refs/tags

KVANTUM_QT5_DEPENDENCIES = qt5svg qt5x11extras hicolor-icon-theme kwindowsystem qt5tools
KVANTUM_QT5_INSTALL_TARGET = YES
KVANTUM_QT5_SUPPORTS_IN_SOURCE_BUILD = NO 
KVANTUM_QT5_CONF_OPTS = -DKF5WindowSystem_DIR=$(TARGET_DIR)/usr/lib/cmake/KF5WindowSystem \
    -DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
    -DCMAKE_INSTALL_PREFIX=/usr

define KVANTUM_QT5_CONFIGURE_CMDS
  if [[ ! -L "$(HOST_DIR)/usr/lib/libpcre.so.3" ]]; then ln -s $(HOST_DIR)/usr/lib/libpcre.so $(HOST_DIR)/usr/lib/libpcre.so.3; fi
  if [[ ! -d $(@D)/buildroot-build ]]; then mkdir $(@D)/buildroot-build; fi
  cd $(@D)/buildroot-build && \
  LDFLAGS="$(LDFLAGS) -pthread -Wl,--as-needed -Wl,--allow-shlib-undefined" cmake $(KVANTUM_QT5_CONF_OPTS) -S "$(@D)/Kvantum" 
endef

$(eval $(generic-package))
EOF

sed -i '/menu "Custom packages"/a source "package/kvantum-qt5/Config.in"' /data/buildroot/package/Config.in