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

Signed-off-by: Ben Buhse <me@benbuhse.com>
This commit is contained in:
Ben Buhse
2024-11-30 18:27:51 -06:00
parent f3e5fd995c
commit b7b3366351
2 changed files with 28 additions and 9 deletions

View File

@@ -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
}

View File

@@ -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
}