mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
80 lines
2.0 KiB
Bash
80 lines
2.0 KiB
Bash
# Copyright 1999-2026 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 +drm +fbdev freetype +gles2 libseat +pango test"
|
|
RESTRICT="!test? ( test )"
|
|
|
|
COMMON_DEPEND="app-text/docbook-xsl-stylesheets
|
|
>=dev-libs/libtsm-4.7.0:=
|
|
dev-libs/libxslt
|
|
media-libs/libglvnd[X(+)]
|
|
>=virtual/udev-172
|
|
virtual/zlib:=
|
|
x11-libs/libxkbcommon
|
|
drm? ( x11-libs/libdrm
|
|
>=media-libs/mesa-8.0.3[egl(+),gbm(+)] )
|
|
freetype? ( media-libs/fontconfig media-libs/freetype )
|
|
libseat? ( sys-auth/seatd )
|
|
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"
|
|
|
|
REQUIRED_USE="drm? ( gles2 )"
|
|
|
|
src_prepare() {
|
|
default
|
|
export CC_FOR_BUILD="$(tc-getBUILD_CC)"
|
|
}
|
|
|
|
src_configure() {
|
|
|
|
# kmscon sets -ffast-math unconditionally
|
|
strip-flags
|
|
|
|
local emesonargs=(
|
|
-Ddocs=enabled
|
|
$(meson_use debug)
|
|
$(meson_feature libseat)
|
|
$(meson_feature fbdev video_fbdev)
|
|
$(meson_feature drm video_drm2d)
|
|
$(meson_feature drm video_drm3d)
|
|
-Dfont_psf=enabled
|
|
-Dfont_unifont=enabled
|
|
$(meson_feature freetype font_freetype)
|
|
$(meson_feature pango font_pango)
|
|
$(meson_feature gles2 renderer_gltex)
|
|
$(meson_use test tests)
|
|
)
|
|
|
|
meson_src_configure
|
|
}
|
|
|
|
src_install() {
|
|
meson_src_install
|
|
|
|
newinitd "${FILESDIR}"/kmsconvt.init kmsconvt
|
|
newconfd "${FILESDIR}"/kmsconvt.conf kmsconvt
|
|
}
|
|
|
|
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"
|
|
}
|