summaryrefslogtreecommitdiff
path: root/sys-apps/kmscon
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/kmscon')
-rw-r--r--sys-apps/kmscon/Manifest1
-rw-r--r--sys-apps/kmscon/kmscon-8_p20180906-r2.ebuild145
2 files changed, 146 insertions, 0 deletions
diff --git a/sys-apps/kmscon/Manifest b/sys-apps/kmscon/Manifest
index b82fdc3fdf6b..bb124145e36f 100644
--- a/sys-apps/kmscon/Manifest
+++ b/sys-apps/kmscon/Manifest
@@ -1,3 +1,4 @@
DIST kmscon-8_p20180906.tar.gz 1156350 BLAKE2B 52c024ca6e9652b468efb23d38cda34bf0c05e1e2bb4268435e17adb8858439ac6bf0e1783cfdd24a48fcb2dcf7c1cb20eee09aeb90db08c2e94224d01efeff7 SHA512 2ccdc5b30df6d96ac7a75d01d674b295bcdb0d445169716638a20c9884b090bbfe509e0aee79cb674a2d9b0eb18ea6284b9d4e2939cb5bf290cade4c1a02487a
EBUILD kmscon-8_p20180906-r1.ebuild 2914 BLAKE2B 5ae857b7cc683e7e634b37d4902964d302ade0fc77863b8e2ffda7a61232273dcc8a844d245e8eafa51263358f95c6b31959d9cc524ce51b033d51080565f001 SHA512 e596373113c4f1294fa7cbd6eaee31111ae15eb9332b6f3e1d97d856242ab75020016b214df8e9c19bf59c53f6d931c8635e0cded8faf3790f0133af7c7bf01a
+EBUILD kmscon-8_p20180906-r2.ebuild 2923 BLAKE2B 19a579e503918fca6eb448dd5895690592f683f1aaed5a0c5288766469b3b595a89d84f862ae4527fdae04572d0e359a5c034c56ea637a81faf4005c07135243 SHA512 af719304d99eca7210695deb8410309370c7defba815002c28e9dffefb5d78033f7b02c9eff86d3b7931e78fa0dc99dc8139ac169870a98e946b0ba152cfea0f
MISC metadata.xml 664 BLAKE2B 3e24275e972d23c41dbab76a90f4a47b589f652f580f5e019b44d5e926556ac2e5138a23f36beee31c53f3f5c344908832ca0d008826a720256d756425048063 SHA512 96f2c383dda46a41505e4aaf01376ed51cb2856516b800652d9ddb43c4794c1f57840368d31b822230ed3f16b6009699ee0ccec62f4967cbdaa8781a845d96b3
diff --git a/sys-apps/kmscon/kmscon-8_p20180906-r2.ebuild b/sys-apps/kmscon/kmscon-8_p20180906-r2.ebuild
new file mode 100644
index 000000000000..7e56c83f9f9a
--- /dev/null
+++ b/sys-apps/kmscon/kmscon-8_p20180906-r2.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+COMMIT="01dd0a231e2125a40ceba5f59fd945ff29bf2cdc"
+SRC_URI="https://github.com/Aetf/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~x86"
+
+inherit autotools flag-o-matic systemd toolchain-funcs vcs-snapshot
+
+DESCRIPTION="KMS/DRM based virtual Console Emulator"
+HOMEPAGE="https://github.com/Aetf/kmscon"
+
+LICENSE="MIT LGPL-2.1 BSD-2"
+SLOT="0"
+IUSE="debug doc +drm +fbdev +gles2 +optimizations +pango pixman static-libs systemd +unicode"
+
+COMMON_DEPEND="
+ >=virtual/udev-172
+ x11-libs/libxkbcommon
+ >=dev-libs/libtsm-4.0.0:=
+ media-libs/mesa[X(+)]
+ drm? ( x11-libs/libdrm
+ >=media-libs/mesa-8.0.3[egl,gbm] )
+ gles2? ( >=media-libs/mesa-8.0.3[gles2] )
+ systemd? ( sys-apps/systemd )
+ pango? ( x11-libs/pango dev-libs/glib:2 )
+ pixman? ( x11-libs/pixman )"
+RDEPEND="${COMMON_DEPEND}
+ x11-misc/xkeyboard-config"
+DEPEND="${COMMON_DEPEND}
+ x11-base/xorg-proto"
+BDEPEND="virtual/pkgconfig
+ doc? ( dev-util/gtk-doc )"
+
+REQUIRED_USE="gles2? ( drm )"
+
+# args - names of renderers to enable
+renderers_enable() {
+ if [[ "x${RENDER}" == "x" ]]; then
+ RENDER="$1"
+ shift
+ else
+ for i in $@; do
+ RENDER+=",${i}"
+ done
+ fi
+}
+
+# args - names of font renderer backends to enable
+fonts_enable() {
+ if [[ "x${FONTS}" == "x" ]]; then
+ FONTS="$1"
+ shift
+ else
+ for i in $@; do
+ FONTS+=",${i}"
+ done
+ fi
+}
+
+# args - names of video backends to enable
+video_enable() {
+ if [[ "x${VIDEO}" == "x" ]]; then
+ VIDEO="$1"
+ shift
+ else
+ for i in $@; do
+ VIDEO+=",${i}"
+ done
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+
+ export CC_FOR_BUILD="$(tc-getBUILD_CC)"
+}
+
+src_configure() {
+ # Video backends
+
+ if use fbdev; then
+ video_enable fbdev
+ fi
+
+ if use drm; then
+ video_enable drm2d
+ fi
+
+ if use gles2; then
+ video_enable drm3d
+ fi
+
+ # Font rendering backends
+
+ if use unicode; then
+ fonts_enable unifont
+ fi
+
+ if use pango; then
+ fonts_enable pango
+ fi
+
+ # Console rendering backends
+
+ renderers_enable bbulk
+
+ if use gles2; then
+ renderers_enable gltex
+ fi
+
+ if use pixman; then
+ renderers_enable pixman
+ fi
+
+ # kmscon sets -ffast-math unconditionally
+ strip-flags
+
+ # xkbcommon not in portage
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable debug) \
+ $(use_enable optimizations) \
+ $(use_enable systemd multi-seat) \
+ --with-video=${VIDEO} \
+ --with-fonts=${FONTS} \
+ --with-renderers=${RENDER} \
+ --with-sessions=dummy,terminal
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ systemd_dounit "${S}/docs"/kmscon{,vt@}.service
+}
+
+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"
+}