Skip to content

Commit

Permalink
gui-apps/wlopm: use proper dependency; install bashcompletions on 9999
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Buhse <[email protected]>
  • Loading branch information
bwbuhse committed Dec 1, 2024
1 parent f3e5fd9 commit b7b3366
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}
20 changes: 15 additions & 5 deletions gui-apps/wlopm/wlopm-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,34 @@ 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"
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
}

0 comments on commit b7b3366

Please sign in to comment.