blob: 4f1d55db5051d86baa69a0565e234c427151c009 (
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
73
74
75
76
77
78
79
80
|
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit meson flag-o-matic toolchain-funcs
DESCRIPTION="KMS/DRM based virtual Console Emulator"
HOMEPAGE="https://github.com/kmscon/kmscon"
SRC_URI="https://github.com/kmscon/kmscon/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT LGPL-2.1 BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc +drm elogind +fbdev +gles2 +pango systemd test"
RESTRICT="!test? ( test )"
COMMON_DEPEND="
>=virtual/udev-172
x11-libs/libxkbcommon
>=dev-libs/libtsm-4.3.0:=
media-libs/libglvnd[X(+)]
drm? ( x11-libs/libdrm
>=media-libs/mesa-8.0.3[egl(+),gbm(+)] )
systemd? ( sys-apps/systemd )
pango? ( x11-libs/pango dev-libs/glib:2 )"
RDEPEND="${COMMON_DEPEND}
x11-misc/xkeyboard-config"
DEPEND="${COMMON_DEPEND}
x11-base/xorg-proto"
BDEPEND="virtual/pkgconfig
doc? ( dev-util/gtk-doc )"
REQUIRED_USE="
drm? ( gles2 )
?? ( elogind systemd )"
src_prepare() {
default
export CC_FOR_BUILD="$(tc-getBUILD_CC)"
}
src_configure() {
# kmscon sets -ffast-math unconditionally
strip-flags
local emesonargs=(
$(meson_feature doc docs)
$(meson_use debug)
$(meson_feature systemd multi_seat)
$(meson_feature fbdev video_fbdev)
$(meson_feature drm video_drm2d)
$(meson_feature drm video_drm3d)
-Dfont_unifont=enabled
$(meson_feature pango font_pango)
$(meson_feature gles2 renderer_gltex)
$(meson_use test tests)
-Dsession_dummy=enabled
-Dsession_terminal=enabled
)
if use systemd; then
emesonargs+=( -Dmulti_seat=enabled )
elif use elogind; then
emesonargs+=( -Dmulti_seat=enabled -Delogind=enabled )
else
emesonargs+=( -Dmulti_seat=disabled )
fi
meson_src_configure
}
pkg_postinst() {
grep -e "^ERASECHAR" "${EROOT}"/etc/login.defs && \
ewarn "It is recommended that you comment out the ERASECHAR line in" && \
ewarn " /etc/login.defs for proper backspace functionality at the" && \
ewarn " kmscon login prompt. For details see:" && \
ewarn "https://github.com/dvdhrm/kmscon/issues/69#issuecomment-13827797"
}
|