summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2018-06-25 16:46:31 -0500
committerBen Kohler <bkohler@gentoo.org>2018-06-25 16:46:54 -0500
commita4c2852f58e899ed33c0744b0cd838c6857539ac (patch)
treedb86ba71015571eecdabb8f06bae3f59549ac2a7
parentnet-analyzer/graphite-web: fix deps, re-add USE=ldap, misc. (diff)
downloadgentoo-a4c2852f58e899ed33c0744b0cd838c6857539ac.tar.gz
gentoo-a4c2852f58e899ed33c0744b0cd838c6857539ac.tar.bz2
gentoo-a4c2852f58e899ed33c0744b0cd838c6857539ac.zip
sys-apps/kmscon: new (revived) package
Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r--sys-apps/kmscon/Manifest1
-rw-r--r--sys-apps/kmscon/files/kmscon-SIGUNUSED.patch14
-rw-r--r--sys-apps/kmscon/files/kmscon-sysmacros-fix.patch11
-rw-r--r--sys-apps/kmscon/kmscon-8.ebuild137
-rw-r--r--sys-apps/kmscon/metadata.xml17
5 files changed, 180 insertions, 0 deletions
diff --git a/sys-apps/kmscon/Manifest b/sys-apps/kmscon/Manifest
new file mode 100644
index 00000000000..f74a8b0969e
--- /dev/null
+++ b/sys-apps/kmscon/Manifest
@@ -0,0 +1 @@
+DIST kmscon-8.tar.xz 950068 BLAKE2B 7c4bbcc6eb0967d8e38e05a3e6fac60109a0ce468bc8967364b621274a9af4dd12a31af692be2efe0cc234af36f760836ec421b6567460efd4b7b1c3d913f44b SHA512 ac1581c2520a9c30406848dafc27231b38d392b2176e3ed4dd95b03cd54e256dd22f09e04057fc089effbbe08eb25546164bb885e0e5cbdbd752d4c27d07a41d
diff --git a/sys-apps/kmscon/files/kmscon-SIGUNUSED.patch b/sys-apps/kmscon/files/kmscon-SIGUNUSED.patch
new file mode 100644
index 00000000000..dc69f7700c6
--- /dev/null
+++ b/sys-apps/kmscon/files/kmscon-SIGUNUSED.patch
@@ -0,0 +1,14 @@
+diff -ur kmscon-8/src/pty.c kmscon-8.new/src/pty.c
+--- kmscon-8/src/pty.c 2018-01-10 09:03:09.477962638 -0600
++++ kmscon-8.new/src/pty.c 2018-01-10 09:04:21.620658836 -0600
+@@ -299,8 +299,10 @@
+ if (ret)
+ log_warn("cannot reset blocked signals: %m");
+
++ #ifdef SIGUNUSED
+ for (i = 1; i < SIGUNUSED; ++i)
+ signal(i, SIG_DFL);
++ #endif
+
+ ret = grantpt(master);
+ if (ret < 0) {
diff --git a/sys-apps/kmscon/files/kmscon-sysmacros-fix.patch b/sys-apps/kmscon/files/kmscon-sysmacros-fix.patch
new file mode 100644
index 00000000000..cd8a374e5ca
--- /dev/null
+++ b/sys-apps/kmscon/files/kmscon-sysmacros-fix.patch
@@ -0,0 +1,11 @@
+diff -ur a/src/uterm_vt.c b/src/uterm_vt.c
+--- a/src/uterm_vt.c 2017-08-12 12:14:46.213183769 -0500
++++ b/src/uterm_vt.c 2017-08-12 12:16:12.011069210 -0500
+@@ -40,6 +40,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/signalfd.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <termios.h>
+ #include <time.h>
+ #include <unistd.h>
diff --git a/sys-apps/kmscon/kmscon-8.ebuild b/sys-apps/kmscon/kmscon-8.ebuild
new file mode 100644
index 00000000000..ca585cfb9a2
--- /dev/null
+++ b/sys-apps/kmscon/kmscon-8.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.xz"
+KEYWORDS="~amd64 ~x86"
+
+inherit autotools systemd flag-o-matic
+
+DESCRIPTION="KMS/DRM based virtual Console Emulator"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/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
+ 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}
+ virtual/pkgconfig
+ x11-base/xorg-proto
+ 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() {
+ eapply "${FILESDIR}/kmscon-sysmacros-fix.patch"
+ eapply "${FILESDIR}/kmscon-SIGUNUSED.patch"
+ eapply_user
+ sed -i -e 's/\[libsystemd-daemon libsystemd-login\]/\[libsystemd\]/' configure.ac
+ eautoreconf
+}
+
+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) \
+ --htmldir=/usr/share/doc/${PF}/html \
+ --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
+}
diff --git a/sys-apps/kmscon/metadata.xml b/sys-apps/kmscon/metadata.xml
new file mode 100644
index 00000000000..796abf1fb7d
--- /dev/null
+++ b/sys-apps/kmscon/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>bkohler@gentoo.org</email>
+ <name>Ben Kohler</name>
+ </maintainer>
+ <use>
+ <flag name='drm'>Enable Linux DRM for backend</flag>
+ <flag name='fbdev'>Enable Linux FBDev for backend</flag>
+ <flag name='gles2'>Enable GLES2 for backend</flag>
+ <flag name='pango'>Enable pango font rendering</flag>
+ <flag name='pixman'>Enable pixman font rendering</flag>
+ <flag name='systemd'>Enable multiseat support via systemd</flag>
+ <flag name='optimizations'>Enable optimizations</flag>
+ </use>
+</pkgmetadata>