commit:     b7b3366351532de0ca41e3044570f0d354ab3390
Author:     Ben Buhse <me <AT> benbuhse <DOT> com>
AuthorDate: Sun Dec  1 00:27:51 2024 +0000
Commit:     Ben Buhse <gentoo <AT> benbuhse <DOT> com>
CommitDate: Sun Dec  1 00:30:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b7b33663

gui-apps/wlopm: use proper dependency; install bashcompletions on 9999

Signed-off-by: Ben Buhse <me <AT> benbuhse.com>

 .../{wlopm-0.1.0.ebuild => wlopm-0.1.0-r1.ebuild}    | 17 +++++++++++++----
 gui-apps/wlopm/wlopm-9999.ebuild                     | 20 +++++++++++++++-----
 2 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/gui-apps/wlopm/wlopm-0.1.0.ebuild 
b/gui-apps/wlopm/wlopm-0.1.0-r1.ebuild
similarity index 70%
rename from gui-apps/wlopm/wlopm-0.1.0.ebuild
rename to gui-apps/wlopm/wlopm-0.1.0-r1.ebuild
index 44cf143bf..3a2d611aa 100644
--- a/gui-apps/wlopm/wlopm-0.1.0.ebuild
+++ b/gui-apps/wlopm/wlopm-0.1.0-r1.ebuild
@@ -6,6 +6,8 @@ EAPI=8
 DESCRIPTION="wlr-output-power-management-v1 client"
 HOMEPAGE="https://git.sr.ht/~leon_plickat/wlopm/";
 
+inherit toolchain-funcs
+
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://git.sr.ht/~leon_plickat/wlopm";
@@ -20,10 +22,17 @@ SLOT="0"
 
 DEPEND="dev-libs/wayland"
 RDEPEND="${DEPEND}"
-BDEPEND="dev-libs/wayland-protocols"
+BDEPEND="dev-util/wayland-scanner"
+
+src_prepare() {
+       default
+       sed '/^CFLAGS/s/-Werror//' -i Makefile || die
+}
+
+src_compile() {
+       emake CC="$(tc-getCC)"
+}
 
 src_install() {
-       # Need to install to /usr instead of /usr/local
-       # and the Makefile doens't handle DESTDIR properly
-       emake PREFIX="${D}"/usr install
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
 }

diff --git a/gui-apps/wlopm/wlopm-9999.ebuild b/gui-apps/wlopm/wlopm-9999.ebuild
index 667206308..c4dfd4eea 100644
--- a/gui-apps/wlopm/wlopm-9999.ebuild
+++ b/gui-apps/wlopm/wlopm-9999.ebuild
@@ -6,13 +6,15 @@ EAPI=8
 DESCRIPTION="wlr-output-power-management-v1 client"
 HOMEPAGE="https://git.sr.ht/~leon_plickat/wlopm/";
 
+inherit bash-completion-r1 toolchain-funcs
+
 if [[ ${PV} == *9999* ]]; then
        inherit git-r3
        EGIT_REPO_URI="https://git.sr.ht/~leon_plickat/wlopm";
 else
        SRC_URI="https://git.sr.ht/~leon_plickat/wlopm/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
        S="${WORKDIR}/${PN}-v${PV}"
-       KEYWORDS="~amd64"
+       KEYWORDS="~amd64 ~arm64"
 fi
 
 LICENSE="GPL-3"
@@ -20,10 +22,18 @@ SLOT="0"
 
 DEPEND="dev-libs/wayland"
 RDEPEND="${DEPEND}"
-BDEPEND="dev-libs/wayland-protocols"
+BDEPEND="dev-util/wayland-scanner"
+
+src_prepare() {
+       default
+       sed '/^CFLAGS/s/-Werror//' -i Makefile || die
+}
+
+src_compile() {
+       emake CC="$(tc-getCC)"
+}
 
 src_install() {
-       # Need to install to /usr instead of /usr/local
-       # and the Makefile doens't handle DESTDIR properly
-       emake PREFIX="${D}"/usr install
+       install -d "${D}$(get_bashcompdir)"
+       emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" 
BASHCOMPDIR="$(get_bashcompdir)" install
 }

Reply via email to