summaryrefslogtreecommitdiff
blob: aa2351de6ddc679e01a7f46be1f9192ccba526c0 (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
63
64
65
66
67
68
69
70
71
72
# Copyright 2019-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit multiprocessing toolchain-funcs

DESCRIPTION="Wayland compositor inspired by CWM"
HOMEPAGE="https://hikari.acmelabs.space/"
SRC_URI="https://hikari.acmelabs.space/releases/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X suid"

COMMON_DEPEND="
	dev-libs/glib:2
	dev-libs/libinput:=
	dev-libs/libucl
	dev-libs/wayland
	gui-libs/wlroots:0/15[X?]
	sys-libs/pam
	x11-libs/cairo
	x11-libs/libxkbcommon
	x11-libs/pango
	x11-libs/pixman"
RDEPEND="
	${COMMON_DEPEND}
	x11-misc/xkeyboard-config"
DEPEND="
	${COMMON_DEPEND}
	dev-libs/wayland-protocols"
BDEPEND="
	dev-util/wayland-scanner
	sys-devel/bmake
	virtual/pkgconfig"

src_compile() {
	tc-export CC PKG_CONFIG

	local bmake=(
		bmake -j$(makeopts_jobs)
		ETC_PREFIX="${EPREFIX}"
		CFLAGS_EXTRA="${CFLAGS} ${CPPFLAGS}"
		LDFLAGS_EXTRA="${LDFLAGS}"
		VERSION=${PV}
		-DWITH_GAMMACONTROL
		-DWITH_LAYERSHELL
		-DWITH_POSIX_C_SOURCE
		-DWITH_SCREENCOPY
		-DWITH_VIRTUAL_INPUT
		$(usev X -DWITH_XWAYLAND)
	)

	# empty flags to avoid duplicates (some parts use only _EXTRA, others both)
	echo "${bmake[*]}"
	CFLAGS= LDFLAGS= "${bmake[@]}" || die
}

src_install() {
	local bmake=(
		bmake install
		DESTDIR="${D}"
		PREFIX="${EPREFIX}"/usr
		ETC_PREFIX="${EPREFIX}"
		$(usev suid -DWITH_SUID)
	)

	echo "${bmake[*]}"
	"${bmake[@]}" || die
}