# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit git-r3 meson DESCRIPTION="Building blocks for creating custom desktop shells" HOMEPAGE="aylur.github.io/astal/" EGIT_REPO_URI="https://github.com/Aylur/astal.git" LICENSE="GPL-2" SLOT="0" IUSE="+io gtk3 +gtk4 +gjs +hyprland +mpris +notifd +tray +wireplumber" REQUIRED_USE="" RDEPEND=" dev-libs/gobject-introspection gtk4? ( gui-libs/gtk4-layer-shell[vala] gui-libs/astal[io] ) gjs? ( || ( gui-libs/astal[gtk3] gui-libs/astal[gtk4] ) ) tray? ( x11-misc/vala-panel-appmenu ) " DEPEND="${RDEPEND}" # S="${S}/lib/astal/io" src_configure() { : } src_compile() { local dir local features=() initial_s=${S} compiled=() for var in $IUSE; do if use ${var#+}; then dir=$(find . -maxdepth 3 -type d -name ${var#+}) echo "Entering $dir" S="$initial_s/$dir" BUILD_DIR="$dir"-build for feature in $IUSE; do if [[ $features == $var* ]]; then features+=${feature#$var} fi done echo "Building with Features: ${features[@]}" local emesonargs=( ${features[@]} ) meson_src_configure meson_src_compile # meson_src_install compiled+=("$BUILD_DIR") fi done S=${initial_s} } src_install() { for dir in ${compiled[@]}; do BUILD_DIR="$initial_s/$dir" meson_src_install done }