summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2021-08-25 15:10:22 +0200
committerPacho Ramos <pacho@gentoo.org>2021-08-25 15:18:43 +0200
commitb756cdf1812b30340c6c7ec800b3461c4b229225 (patch)
tree3696ae092f505d76a9b482f2a5338be1a07ab2a7 /app-accessibility
parentnet-fs/cvmfs: restrict dependency on leveldb (diff)
downloadgentoo-b756cdf1812b30340c6c7ec800b3461c4b229225.tar.gz
gentoo-b756cdf1812b30340c6c7ec800b3461c4b229225.tar.bz2
gentoo-b756cdf1812b30340c6c7ec800b3461c4b229225.zip
app-accessibility/caribou: Apply more fixes from Fedora
One patch fixing desktop file to get autostarted only on desktops still relying on caribou. The other patch fixing compat with latest vala. Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'app-accessibility')
-rw-r--r--app-accessibility/caribou/caribou-0.4.21-r4.ebuild99
-rw-r--r--app-accessibility/caribou/files/caribou-change_autostart_cinnamon.patch13
-rw-r--r--app-accessibility/caribou/files/caribou-drop_gir_patch.patch117
3 files changed, 229 insertions, 0 deletions
diff --git a/app-accessibility/caribou/caribou-0.4.21-r4.ebuild b/app-accessibility/caribou/caribou-0.4.21-r4.ebuild
new file mode 100644
index 000000000000..a142e1c4d332
--- /dev/null
+++ b/app-accessibility/caribou/caribou-0.4.21-r4.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE="xml"
+
+inherit autotools gnome.org gnome2-utils python-single-r1 vala
+
+DESCRIPTION="Input assistive technology intended for switch and pointer users"
+HOMEPAGE="https://wiki.gnome.org/Projects/Caribou"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ app-accessibility/at-spi2-core
+ $(python_gen_cond_dep '
+ >=dev-python/pygobject-2.90.3:3[${PYTHON_USEDEP}]
+ ')
+ >=dev-libs/gobject-introspection-0.10.7:=
+ dev-libs/libgee:0.8
+ dev-libs/libxml2
+ >=media-libs/clutter-1.5.11:1.0[introspection]
+ >=x11-libs/gtk+-3:3[introspection]
+ x11-libs/libX11
+ x11-libs/libxklavier
+ x11-libs/libXtst
+"
+# gsettings-desktop-schemas is needed for the 'toolkit-accessibility' key
+# pyatspi-2.1.90 needed to run caribou if pygobject:3 is installed
+# librsvg needed to load svg images in css styles
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-libs/glib[dbus]
+ $(python_gen_cond_dep '
+ >=dev-python/pyatspi-2.1.90[${PYTHON_USEDEP}]
+ ')
+ >=gnome-base/gsettings-desktop-schemas-3
+ gnome-base/librsvg:2
+ sys-apps/dbus
+ !<x11-base/xorg-server-1.20.10
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ dev-libs/libxslt
+"
+BDEPEND="
+ $(vala_depend)
+ >=dev-util/intltool-0.35.5
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-fix-compilation-error.patch"
+ "${FILESDIR}/${PN}-fix-subkey-popmenu.patch"
+ "${FILESDIR}/${PN}-fix-xadapter-xkb-calls.patch"
+ "${FILESDIR}/${PN}-fix-antler-style-css.patch"
+ "${FILESDIR}/${PN}-fix-python-env.patch"
+ "${FILESDIR}/${PN}-change_autostart_cinnamon.patch"
+ "${FILESDIR}/${PN}-drop_gir_patch.patch"
+)
+
+src_prepare() {
+ default
+ vala_src_prepare
+ gnome2_disable_deprecation_warning
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-maintainer-mode \
+ --disable-schemas-compile \
+ --disable-docs \
+ --disable-static \
+ --disable-gtk2-module \
+ --enable-gtk3-module
+}
+
+src_install() {
+ DOCS="AUTHORS NEWS README"
+ default
+ find "${D}" -name '*.la' -delete || die
+ python_optimize
+}
+
+pkg_postinst() {
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ gnome2_schemas_update
+}
diff --git a/app-accessibility/caribou/files/caribou-change_autostart_cinnamon.patch b/app-accessibility/caribou/files/caribou-change_autostart_cinnamon.patch
new file mode 100644
index 000000000000..f55ddd276e7d
--- /dev/null
+++ b/app-accessibility/caribou/files/caribou-change_autostart_cinnamon.patch
@@ -0,0 +1,13 @@
+--- a/data/caribou-autostart.desktop.in.in
++++ b/data/caribou-autostart.desktop.in.in
+@@ -2,7 +2,7 @@
+ Type=Application
+ Name=Caribou
+ Exec=@libexecdir@/caribou
+-AutostartCondition=GSettings org.gnome.desktop.a11y.applications screen-keyboard-enabled
++AutostartCondition=GSettings org.cinnamon.desktop.a11y.applications screen-keyboard-enabled
+ X-GNOME-AutoRestart=true
+ #X-GNOME-Autostart-Phase=Initialization
+-OnlyShowIn=GNOME;Unity;
++OnlyShowIn=X-Cinnamon;
+
diff --git a/app-accessibility/caribou/files/caribou-drop_gir_patch.patch b/app-accessibility/caribou/files/caribou-drop_gir_patch.patch
new file mode 100644
index 000000000000..bbcf1ddee9e5
--- /dev/null
+++ b/app-accessibility/caribou/files/caribou-drop_gir_patch.patch
@@ -0,0 +1,117 @@
+From c52ce71c49dc8d6109a58d16cc8d491d7bd1d781 Mon Sep 17 00:00:00 2001
+From: Rico Tzschichholz <ricotz@ubuntu.com>
+Date: Wed, 20 Jan 2021 22:59:49 +0100
+Subject: [PATCH] Stop patching the generated GIR
+
+---
+ libcaribou/Makefile.am | 8 ++-----
+ tools/Makefile.am | 1 -
+ tools/fix_gir.py | 53 ------------------------------------------
+ 3 files changed, 2 insertions(+), 60 deletions(-)
+ delete mode 100755 tools/fix_gir.py
+
+diff --git a/libcaribou/Makefile.am b/libcaribou/Makefile.am
+index 05f2774..0634374 100644
+--- a/libcaribou/Makefile.am
++++ b/libcaribou/Makefile.am
+@@ -7,7 +7,7 @@ libcaribou_la_VALAFLAGS = \
+ --pkg xtst --pkg gee-0.8 --pkg gdk-x11-3.0 --pkg libxml-2.0 \
+ --pkg libxklavier --pkg external-libs \
+ --internal-vapi caribou-internals-1.0.vapi \
+- --library caribou-1.0 --gir _Caribou-1.0.gir \
++ --library caribou-1.0 --gir Caribou-1.0.gir \
+ --symbols libcaribou.symbols \
+ $(VALAFLAGS)
+
+@@ -63,9 +63,6 @@ gir_DATA = Caribou-1.0.gir
+ typelibdir = $(libdir)/girepository-1.0
+ typelib_DATA = Caribou-1.0.typelib
+
+-Caribou-1.0.gir: _Caribou-1.0.gir
+- $(AM_V_GEN)$(PYTHON) -B $(top_srcdir)/tools/fix_gir.py $< > $@
+-
+ Caribou-1.0.typelib: Caribou-1.0.gir
+ @INTROSPECTION_COMPILER@ --shared-library=libcaribou.so.0 -o $@ $^
+
+@@ -81,8 +78,7 @@ CLEANFILES = \
+ caribou-1.0.vapi \
+ caribou-internals-1.0.vapi \
+ Caribou-1.0.typelib \
+- Caribou-1.0.gir \
+- _Caribou-1.0.gir
++ Caribou-1.0.gir
+
+ DISTCLEANFILES = \
+ caribou-1.0.pc
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 3a9bcdb..89f753d 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -1,5 +1,4 @@
+ EXTRA_DIST = \
+- fix_gir.py \
+ make_schema.py \
+ convert_cldr.py \
+ basic.xsl
+diff --git a/tools/fix_gir.py b/tools/fix_gir.py
+deleted file mode 100755
+index 182d108..0000000
+--- a/tools/fix_gir.py
++++ /dev/null
+@@ -1,53 +0,0 @@
+-#!/usr/bin/python
+-
+-from xml.dom import minidom
+-
+-def purge_white_space_and_fix_namespace(node, indent=0):
+- if getattr(node, "tagName", None) == "namespace":
+- name = node.getAttribute("name")
+- node.setAttribute("name", name.lstrip('_'))
+- for child in [c for c in node.childNodes]:
+- if child.nodeType == node.TEXT_NODE or \
+- getattr(child, "tagName", None) == "annotation":
+- node.removeChild(child)
+- continue
+- purge_white_space_and_fix_namespace(child, indent+1)
+-
+-def find_ancestor(node, name):
+- if getattr(node, "tagName", None) == name:
+- return node
+- parent = getattr(node, "parentNode", None)
+- if not parent:
+- return None
+- return find_ancestor(parent, name)
+-
+-def fix_vfuncs(dom):
+- for f in dom.getElementsByTagName("field"):
+- callbacks = f.getElementsByTagName("callback")
+-
+- record = find_ancestor(f, "record")
+- if not record:
+- continue
+-
+- name = record.getAttribute("name")
+- cname = record.getAttribute("c:type")
+-
+- assert(name.endswith("Class") or name.endswith("Iface"))
+- assert(cname.endswith("Class") or name.endswith("Iface"))
+-
+- if len(callbacks) == 2:
+- callbacks[-1].parentNode.removeChild(callbacks[-1])
+-
+-if __name__ == "__main__":
+- import sys
+-
+- if len(sys.argv) != 2:
+- print("supply a gir file")
+- sys.exit(1)
+-
+- dom = minidom.parse(sys.argv[-1])
+-
+- purge_white_space_and_fix_namespace(dom)
+- fix_vfuncs(dom)
+-
+- print(dom.toprettyxml(indent=" ", newl="\n"))
+--
+GitLab
+