summaryrefslogtreecommitdiff
blob: 51104b583c18b4cf67af1caf19290887b9f0e686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="dmenu clone for wayland"
HOMEPAGE="https://github.com/Cloudef/bemenu"
if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/Cloudef/bemenu.git"
else
	SRC_URI="https://github.com/Cloudef/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
fi

LICENSE="GPL-3"
SLOT="0"
IUSE="doc ncurses wayland X"

# Require at least one backend be built
REQUIRED_USE="|| ( ncurses wayland X )"

RDEPEND="
	ncurses? ( sys-libs/ncurses:= )
	wayland? (
		dev-libs/wayland
		x11-libs/cairo
		x11-libs/libxkbcommon
		x11-libs/pango
	)
	X? (
		x11-libs/cairo[X]
		x11-libs/libX11
		x11-libs/libXext
		x11-libs/libXinerama
		x11-libs/libxcb:=
		x11-libs/pango[X]
	)
"
DEPEND="${RDEPEND}"
BDEPEND="
	app-text/scdoc
	virtual/pkgconfig
	doc? ( app-doc/doxygen )
	wayland? (
		dev-libs/wayland-protocols
		dev-util/wayland-scanner
	)
"

src_compile() {
	tc-export CC

	emake clients $(usev ncurses curses) $(usev X x11) $(usev wayland) PREFIX="${EPREFIX}"/usr libdir=/$(get_libdir)
	use doc && emake doxygen PREFIX="${EPREFIX}"/usr libdir=/$(get_libdir)
}

src_install() {
	emake install DESTDIR="${D}" PREFIX="${EPREFIX}"/usr libdir=/$(get_libdir)
}