solid

Hardware integration and detection

runtime dependencies qt5base (Graphic libraries and applications/Other GUIs)
upower (Hardware handling)
udisks (Hardware handling)
media-player-info
make dependencies extra-cmake-modules
qt5tools
qt5-doc
doxygen
qt5-declarative
mkdir /data/buildroot/package/solid
cat > /data/buildroot/package/solid/Config.in<< 'EOF'
config BR2_PACKAGE_SOLID
        bool "solid"
        depends on BR2_PACKAGE_QT5
        depends on BR2_PACKAGE_MEDIA_PLAYER_INFO
        depends on BR2_PACKAGE_UPOWER
        depends on BR2_PACKAGE_UDISKS
        depends on BR2_PACKAGE_QT5TOOLS
        help
          Hardware integration and detection
EOF

cat > /data/buildroot/package/solid/solid.mk<< 'EOF'
#############################################################
#
# solid
#https://download.kde.org/stable/frameworks/5.94/solid-5.94.0.tar.xz
#############################################################
SOLID_VERSION = 5.94.0
SOLID_SOURCE  = solid-$(SOLID_VERSION).tar.xz
SOLID_SITE    = https://download.kde.org/stable/frameworks/5.94

SOLID_DEPENDENCIES = qt5base media-player-info upower udisks qt5tools
SOLID_INSTALL_TARGET = YES
SOLID_SUPPORTS_IN_SOURCE_BUILD = NO 
    
SOLID_CONF_OPTS = -DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_TESTING=OFF \
    -DBUILD_QCH=OFF \
    -DWITH_NEW_POWER_ASYNC_API=ON \
    -DWITH_NEW_POWER_ASYNC_FREEDESKTOP=ON \
    -DWITH_NEW_SOLID_JOB=ON
    
define SOLID_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 "$(@D)/" $(SOLID_CONF_OPTS)
endef

$(eval $(cmake-package))
EOF

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