summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-07-21 12:22:06 +0200
committerJeroen Roovers <jer@gentoo.org>2020-07-21 12:30:27 +0200
commitc1a1f1ebc4cb70693c3c54e8fc9ca96aeaa6e12f (patch)
tree3580465a803899727c0c83127d7469075b2a2ece /x11-misc
parentx11-misc/xkbd: Version 0.8.18 (diff)
downloadgentoo-c1a1f1ebc4cb70693c3c54e8fc9ca96aeaa6e12f.tar.gz
gentoo-c1a1f1ebc4cb70693c3c54e8fc9ca96aeaa6e12f.tar.bz2
gentoo-c1a1f1ebc4cb70693c3c54e8fc9ca96aeaa6e12f.zip
x11-misc/xkbd: Add live ebuild
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r--x11-misc/xkbd/files/xkbd-999999-evdev.patch15
-rw-r--r--x11-misc/xkbd/files/xkbd-999999-xft.patch33
-rw-r--r--x11-misc/xkbd/metadata.xml9
-rw-r--r--x11-misc/xkbd/xkbd-999999.ebuild52
4 files changed, 107 insertions, 2 deletions
diff --git a/x11-misc/xkbd/files/xkbd-999999-evdev.patch b/x11-misc/xkbd/files/xkbd-999999-evdev.patch
new file mode 100644
index 000000000000..087fd74ea01a
--- /dev/null
+++ b/x11-misc/xkbd/files/xkbd-999999-evdev.patch
@@ -0,0 +1,15 @@
+--- a/src/xtg.c
++++ b/src/xtg.c
+@@ -382,10 +382,12 @@
+ static void map_to(){
+ float x=scrX1,y=scrY1,w=width,h=height,dx=pf[p_touch_add],dy=pf[p_touch_add];
+ _short m = 1;
++#ifdef USE_EVDEV
+ if (pa[p_touch_add] && pa[p_touch_add][0] == '+' && pa[p_touch_add][1] == 0) {
+ if (mwidth && devX!=0) dx = (devX - mwidth)/2;
+ if (mheight && devY!=0) dy = (devY - mheight)/2;
+ }
++#endif
+ if (dx!=0 && mwidth) {
+ float b = (w/mwidth)*dx;
+ x-=b;
diff --git a/x11-misc/xkbd/files/xkbd-999999-xft.patch b/x11-misc/xkbd/files/xkbd-999999-xft.patch
new file mode 100644
index 000000000000..8f803111bc02
--- /dev/null
+++ b/x11-misc/xkbd/files/xkbd-999999-xft.patch
@@ -0,0 +1,33 @@
+--- a/src/kb.c
++++ b/src/kb.c
+@@ -66,7 +66,7 @@
+ if (*f) XftFontClose(kb->display, *f);
+ return ((*f = XftFontOpenName(kb->display, kb->screen, fontname)) != NULL);
+ #else
+- if (*f) XUnloadFont((*f)->fid);
++ if (*f) XUnloadFont(kb->display, (*f)->fid);
+ if ((*f = XLoadQueryFont(kb->display, fontname)) == NULL) return 0;
+ XSetFont(kb->display, kb->gc, (*f)->fid);
+ return True;
+--- a/src/button.c
++++ b/src/button.c
+@@ -150,7 +150,7 @@
+ &extents);
+ return extents.width;
+ #else
+- return XTextWidth(kb->font_info, txt, strlen(txt));
++ return XTextWidth(kb->font, txt, strlen(txt));
+ #endif
+ }
+
+@@ -441,8 +441,10 @@
+
+ b->fg_gc = k->gc;
+ b->bg_gc = k->rev_gc;
++#ifdef USE_XFT
+ b->col = k->color;
+ b->col_rev = k->color_rev;
++#endif
+
+ b->layout_switch = -1;
+
diff --git a/x11-misc/xkbd/metadata.xml b/x11-misc/xkbd/metadata.xml
index 49c86a887b6a..b43c941bd068 100644
--- a/x11-misc/xkbd/metadata.xml
+++ b/x11-misc/xkbd/metadata.xml
@@ -2,7 +2,12 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
- <email>desktop-misc@gentoo.org</email>
- <name>Gentoo Desktop Miscellaneous Project</name>
+<email>desktop-misc@gentoo.org</email>
+<name>Gentoo Desktop Miscellaneous Project</name>
</maintainer>
+<use>
+<flag name='evdev'>Enable <pkg>dev-libs/libevdev</pkg> support for xtg</flag>
+<flag name='xi'>Enable XInput2 support through <pkg>x11-libs/libXi</pkg></flag>
+<flag name='xrandr'>Enable XRandR support through <pkg>x11-libs/libXrandr</pkg></flag>
+</use>
</pkgmetadata>
diff --git a/x11-misc/xkbd/xkbd-999999.ebuild b/x11-misc/xkbd/xkbd-999999.ebuild
new file mode 100644
index 000000000000..8d6139bf4019
--- /dev/null
+++ b/x11-misc/xkbd/xkbd-999999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic git-r3
+
+DESCRIPTION="onscreen soft keyboard for X11"
+HOMEPAGE="https://github.com/mahatma-kaganovich/xkbd"
+EGIT_REPO_URI="https://github.com/mahatma-kaganovich/xkbd"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="debug +evdev +xft +xi +xpm +xrandr +xscreensaver"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ x11-libs/libXfixes
+ x11-libs/libXi
+ x11-libs/libXtst
+ evdev? ( dev-libs/libevdev )
+ xft? ( x11-libs/libXft )
+ xpm? ( x11-libs/libXpm )
+ xrandr? ( x11-libs/libXrandr )
+"
+DEPEND="
+ ${RDEPEND}
+ x11-base/xorg-proto
+"
+DOCS=( AUTHORS )
+PATCHES=(
+ "${FILESDIR}"/${PN}-999999-evdev.patch
+ "${FILESDIR}"/${PN}-999999-xft.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ use debug && append-cppflags -DDEBUG
+ econf \
+ $(use_enable evdev) \
+ $(use_enable xft) \
+ $(use_enable xi) \
+ $(use_enable xpm) \
+ $(use_enable xrandr) \
+ $(use_enable xscreensaver ss) \
+ --disable-debug
+}