# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit vala cmake xdg gnome2-utils KEYWORDS="~amd64" SRC_URI="https://releases.ayatana-indicators.org/source/${PN}/${P}.tar.gz https://github.com/AyatanaIndicators/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" DESCRIPTION="Ayatana System Indicator for Bluetooth Management" HOMEPAGE="https://github.com/AyatanaIndicators/${PN}" LICENSE="GPL-3" SLOT="0" DEPEND=" dev-libs/glib gui-libs/libayatana-common sys-apps/systemd " RDEPEND="${DEPEND}" BDEPEND=" dev-build/cmake dev-build/cmake-extras $(vala_depend) " src_prepare() { eapply_user vala_setup # fix hard coded name 'FindVala.cmake' -> maybe we should disable this file sed -i "s:find_program (VALA_COMPILER \"valac\"):find_program (VALA_COMPILER \"valac-$(vala_best_api_version)\"):" cmake/FindVala.cmake || die sed -i "s:find_program (VAPI_GEN \"vapigen\"):find_program (VAPI_GEN \"vapigen-$(vala_best_api_version)\"):" cmake/FindVala.cmake || die cmake_src_prepare } src_configure() { local mycmakeargs=( -DENABLE_WERROR=ON ) cmake_src_configure } src_install() { cmake_src_install # create 'service,wants' symlinks dosym /usr/lib/systemd/user/ayatana-indicator-bluetooth.service \ /usr/lib/systemd/user/lomiri-indicators.target.wants/ayatana-indicator-bluetooth.service dosym /usr/lib/systemd/user/ayatana-indicator-bluetooth.service \ /usr/lib/systemd/user/ayatana-indicators.target.wants/ayatana-indicator-bluetooth.service } pkg_postinst() { xdg_pkg_postinst gnome2_schemas_update } pkg_postrm() { xdg_pkg_postrm gnome2_schemas_update }