summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2016-05-29 22:20:21 -0600
committerBrian Bidulock2016-05-29 22:20:21 -0600
commit5ee46ccdc67047023dcf5e0305a6fb53e48b766e (patch)
tree0ae97d266ccaf5f5f376f6f734618cfa18bb4e29
downloadaur-5ee46ccdc67047023dcf5e0305a6fb53e48b766e.tar.gz
initial version
-rw-r--r--.SRCINFO30
-rw-r--r--0001-Revert-Drop-GTK2-support.patch109
-rw-r--r--0002-more-gtk2-reverts.patch24
-rw-r--r--0003-handle-missing-method-in-gtk2.patch39
-rw-r--r--PKGBUILD50
5 files changed, 252 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6277c0d2f5a8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+# Generated by mksrcinfo v8
+# Mon May 30 04:20:21 UTC 2016
+pkgbase = eekboard-gtk2
+ pkgdesc = Yet Another Virtual Keyboard for Gnome. http://blog.du-a.org/?cat=9
+ pkgver = 1.0.8
+ pkgrel = 4
+ url = https://github.com/ueno/eekboard
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = intltool
+ makedepends = gtk-doc
+ depends = gtk2
+ depends = libxklavier
+ depends = libcanberra
+ optdepends = ibus
+ optdepends = clutter-gtk
+ provides = eekboard
+ conflicts = eekboard
+ source = https://github.com/downloads/ueno/eekboard/eekboard-1.0.8.tar.gz
+ source = 0001-Revert-Drop-GTK2-support.patch
+ source = 0002-more-gtk2-reverts.patch
+ source = 0003-handle-missing-method-in-gtk2.patch
+ md5sums = 83584689cd3353d2f471d01f4f5f2efd
+ md5sums = def53b919e778ddceabbad9fc35ed71d
+ md5sums = ed22aeda66e92ef2b89168fc5baef8b8
+ md5sums = b02d89302d86cd7ebc304babf64408bd
+
+pkgname = eekboard-gtk2
+
diff --git a/0001-Revert-Drop-GTK2-support.patch b/0001-Revert-Drop-GTK2-support.patch
new file mode 100644
index 000000000000..6272ec25e256
--- /dev/null
+++ b/0001-Revert-Drop-GTK2-support.patch
@@ -0,0 +1,109 @@
+From a90fd71a93451bd6b76e8036c678b8ec948c1c27 Mon Sep 17 00:00:00 2001
+From: Brian Bidulock <bidulock@openss7.org>
+Date: Sun, 29 May 2016 20:44:00 -0600
+Subject: [PATCH 1/3] Revert "Drop GTK2 support."
+
+This reverts commit 1943749cb6f61a8e2a3a26111c95ee806ca4c474.
+---
+ configure.ac | 38 +++++++++++++++++++++++++++++++-------
+ eek/eek-gtk-keyboard.c | 20 ++++++++++++++++++++
+ 2 files changed, 51 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index be57569..b58eeb1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,13 +44,34 @@ AC_HEADER_STDC
+ LT_INIT
+ IT_PROG_INTLTOOL([0.35.0])
+
+-GTK_API_VERSION=3.0
+-GTK_REQUIRED=2.91.0
+-EEK_API_VERSION=0.90
+-EEK_API_MAJOR_VERSION=0
+-EEK_API_MINOR_VERSION=90
+-EEK_API_PC_VERSION=0.90
+-EEK_LIBRARY_SUFFIX="-$EEK_API_VERSION"
++AC_MSG_CHECKING([which gtk+ version to compile against])
++AC_ARG_WITH([gtk],
++ [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 3.0)])],
++ [case "$with_gtk" in
++ 2.0|3.0) ;;
++ *) AC_MSG_ERROR([invalid gtk version specified]) ;;
++ esac],
++ [with_gtk=3.0])
++AC_MSG_RESULT([$with_gtk])
++
++case "$with_gtk" in
++ 2.0) GTK_API_VERSION=2.0
++ GTK_REQUIRED=2.14.0
++ EEK_API_VERSION=0.90
++ EEK_API_MAJOR_VERSION=0
++ EEK_API_MINOR_VERSION=90
++ EEK_API_PC_VERSION=0.90
++ EEK_LIBRARY_SUFFIX="-$EEK_API_VERSION"
++ ;;
++ 3.0) GTK_API_VERSION=3.0
++ GTK_REQUIRED=2.91.0
++ EEK_API_VERSION=0.90
++ EEK_API_MAJOR_VERSION=0
++ EEK_API_MINOR_VERSION=90
++ EEK_API_PC_VERSION=0.90
++ EEK_LIBRARY_SUFFIX="-$EEK_API_VERSION"
++ ;;
++esac
+
+ AC_SUBST([GTK_API_VERSION])
+ AC_SUBST([EEK_API_VERSION])
+@@ -60,6 +81,9 @@ AC_SUBST([EEK_API_PC_VERSION])
+ AC_SUBST([EEK_LIBRARY_SUFFIX])
+ AC_SUBST([EEK_LIBRARY_SUFFIX_U],[AS_TR_SH([$EEK_LIBRARY_SUFFIX])])
+
++AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
++AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
++
+ AM_PATH_GLIB_2_0
+ PKG_CHECK_MODULES([GLIB2], [glib-2.0 >= 2.26.0], ,
+ [AC_MSG_ERROR([GLib2 not found])])
+diff --git a/eek/eek-gtk-keyboard.c b/eek/eek-gtk-keyboard.c
+index e2ddf4a..42066e5 100644
+--- a/eek/eek-gtk-keyboard.c
++++ b/eek/eek-gtk-keyboard.c
+@@ -180,6 +180,22 @@ eek_gtk_keyboard_real_draw (GtkWidget *self,
+ return FALSE;
+ }
+
++#if !GTK_CHECK_VERSION (2, 91, 2)
++static gboolean
++eek_gtk_keyboard_real_expose_event (GtkWidget *self,
++ GdkEventExpose *event)
++{
++ gboolean retval;
++ cairo_t *cr;
++
++ cr = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (self)));
++ retval = eek_gtk_keyboard_real_draw (self, cr);
++ cairo_destroy (cr);
++
++ return retval;
++}
++#endif /* !GTK_CHECK_VERSION (2, 91, 2) */
++
+ static void
+ eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
+ GtkAllocation *allocation)
+@@ -416,7 +432,11 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
+
+ widget_class->realize = eek_gtk_keyboard_real_realize;
+ widget_class->unmap = eek_gtk_keyboard_real_unmap;
++#if GTK_CHECK_VERSION (2, 91, 2)
+ widget_class->draw = eek_gtk_keyboard_real_draw;
++#else /* GTK_CHECK_VERSION (2, 91, 2) */
++ widget_class->expose_event = eek_gtk_keyboard_real_expose_event;
++#endif /* !GTK_CHECK_VERSION (2, 91, 2) */
+ widget_class->size_allocate = eek_gtk_keyboard_real_size_allocate;
+ widget_class->button_press_event =
+ eek_gtk_keyboard_real_button_press_event;
+--
+2.8.3
+
diff --git a/0002-more-gtk2-reverts.patch b/0002-more-gtk2-reverts.patch
new file mode 100644
index 000000000000..9f2d06f38b10
--- /dev/null
+++ b/0002-more-gtk2-reverts.patch
@@ -0,0 +1,24 @@
+From 07ed900684af0e180d7370240a45ee7cc7bdfdce Mon Sep 17 00:00:00 2001
+From: Brian Bidulock <bidulock@openss7.org>
+Date: Sun, 29 May 2016 20:48:19 -0600
+Subject: [PATCH 2/3] more gtk2 reverts
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index b58eeb1..500cb73 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -259,6 +259,7 @@ Build options:
+ Build shared libs $enable_shared
+ Build static libs $enable_static
+ CFLAGS $CFLAGS
++ GTK version $with_gtk
+ Build Vala binding $enable_vala
+ Sound support $enable_libcanberra
+ Build document $enable_gtk_doc
+--
+2.8.3
+
diff --git a/0003-handle-missing-method-in-gtk2.patch b/0003-handle-missing-method-in-gtk2.patch
new file mode 100644
index 000000000000..ea0a742991a9
--- /dev/null
+++ b/0003-handle-missing-method-in-gtk2.patch
@@ -0,0 +1,39 @@
+From 562c738b68591aab8d399a772dea5bc7e8ae7611 Mon Sep 17 00:00:00 2001
+From: Brian Bidulock <bidulock@openss7.org>
+Date: Sun, 29 May 2016 21:36:49 -0600
+Subject: [PATCH 3/3] handle missing method in gtk2
+
+---
+ src/preferences-dialog.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/preferences-dialog.c b/src/preferences-dialog.c
+index 084941a..9b198b2 100644
+--- a/src/preferences-dialog.c
++++ b/src/preferences-dialog.c
+@@ -151,9 +151,22 @@ up_keyboard (GtkWidget *button, PreferencesDialog *dialog)
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(dialog->selected_keyboards_treeview));
+ if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
++#if 1
++ GtkTreePath *path;
++ if ((path = gtk_tree_model_get_path(model, &iter))) {
++ if (gtk_tree_path_prev(path)) {
++ GtkTreeIter prev;
++ if (gtk_tree_model_get_iter(model, &prev, path)) {
++ gtk_list_store_swap (GTK_LIST_STORE(model), &iter, &prev);
++ }
++ }
++ gtk_tree_path_free(path);
++ }
++#else
+ GtkTreeIter prev = iter;
+ if (gtk_tree_model_iter_previous (model, &prev))
+ gtk_list_store_swap (GTK_LIST_STORE(model), &iter, &prev);
++#endif
+ }
+ }
+
+--
+2.8.3
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dd52c33cbf42
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Brian Bidulock <bidulock@openss7.org>
+# Contributor: Simeon Felis <simeonfelis@gmail.com>
+
+pkgname=eekboard-gtk2
+_pkgname=eekboard
+pkgver=1.0.8
+pkgrel=4
+pkgdesc='Yet Another Virtual Keyboard for Gnome. http://blog.du-a.org/?cat=9'
+arch=(i686 x86_64)
+url='https://github.com/ueno/eekboard'
+license=(GPL3)
+depends=('gtk2' 'libxklavier' 'libcanberra')
+makedepends=('intltool' 'gtk-doc')
+optdepends=('ibus' 'clutter-gtk')
+provides=($_pkgname)
+conflicts=($_pkgname)
+source=("https://github.com/downloads/ueno/eekboard/eekboard-$pkgver.tar.gz"
+ '0001-Revert-Drop-GTK2-support.patch'
+ '0002-more-gtk2-reverts.patch'
+ '0003-handle-missing-method-in-gtk2.patch')
+md5sums=('83584689cd3353d2f471d01f4f5f2efd'
+ 'def53b919e778ddceabbad9fc35ed71d'
+ 'ed22aeda66e92ef2b89168fc5baef8b8'
+ 'b02d89302d86cd7ebc304babf64408bd')
+
+prepare() {
+ cd $_pkgname-$pkgver
+ sed -i src/preferences-dialog.ui -e 's,GtkButtonBox,GtkHButtonBox,'
+ patch -Np1 <../0001-Revert-Drop-GTK2-support.patch
+ patch -Np1 <../0002-more-gtk2-reverts.patch
+ patch -Np1 <../0003-handle-missing-method-in-gtk2.patch
+}
+
+build () {
+ cd $_pkgname-$pkgver
+ gnome-autogen.sh \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --enable-gtk-doc \
+ --disable-vala \
+ --with-gtk=2.0
+ make PYTHON=/usr/bin/python2 V=0
+}
+
+package() {
+ cd $_pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+