aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-misc/xneur/files')
-rw-r--r--x11-misc/xneur/files/01-fix-arg-parsing.patch14
-rw-r--r--x11-misc/xneur/files/enchant.patch119
-rw-r--r--x11-misc/xneur/files/gcc-10.patch40
-rw-r--r--x11-misc/xneur/files/xneur-0.12.0-libnotify-0.7.patch28
4 files changed, 201 insertions, 0 deletions
diff --git a/x11-misc/xneur/files/01-fix-arg-parsing.patch b/x11-misc/xneur/files/01-fix-arg-parsing.patch
new file mode 100644
index 000000000..703e1253b
--- /dev/null
+++ b/x11-misc/xneur/files/01-fix-arg-parsing.patch
@@ -0,0 +1,14 @@
+--- a/src/xneur.c
++++ b/src/xneur.c
+@@ -404,6 +404,11 @@
+ }
+ }
+
++ if (optind < argc)
++ {
++ xneur_usage();
++ exit(EXIT_FAILURE);
++ }
+ if (opted)
+ exit(EXIT_SUCCESS);
+ }
diff --git a/x11-misc/xneur/files/enchant.patch b/x11-misc/xneur/files/enchant.patch
new file mode 100644
index 000000000..0fac5d244
--- /dev/null
+++ b/x11-misc/xneur/files/enchant.patch
@@ -0,0 +1,119 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -158,7 +158,7 @@ if test "x$with_spell" != "xno"; then
+
+ case $with_spell in
+ enchant|yes)
+- PKG_CHECK_MODULES(ENCHANT, [enchant >= 1.0])
++ PKG_CHECK_MODULES(ENCHANT, [enchant-2 >= 1.0])
+ AC_DEFINE(WITH_ENCHANT, 1, [Define if you want enchant support])
+ ;;
+ aspell)
+--- a/xneur.pc
++++ b/xneur.pc
+@@ -6,5 +6,5 @@ includedir=${prefix}/include
+ Name: xneur
+ Description: XNeur library
+ Version: 0.20.0
+-Libs: -L${exec_prefix}/lib -lxneur -lpcre -lenchant -lpthread -ldl
++Libs: -L${exec_prefix}/lib -lxneur -lpcre -lenchant-2 -lpthread -ldl
+ Cflags: -I${prefix}/include
+--- a/plugins/statistic/Makefile.am
++++ b/plugins/statistic/Makefile.am
+@@ -7,7 +7,7 @@ pkglib_LTLIBRARIES = libxnstatistic.la
+ libxnstatistic_la_SOURCES = \
+ statistic.c
+
+-libxnstatistic_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/lib @DEFAULT_CFLAGS@
++libxnstatistic_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/lib @ASPELL_CFLAGS@ @ENCHANT_CFLAGS@ @DEFAULT_CFLAGS@
+ libxnstatistic_la_LDFLAGS = @X11_LIBS@
+
+ libxnstatistic_la_LIBADD =
+--- a/lib/lib/xneur.h
++++ b/lib/lib/xneur.h
+@@ -29,7 +29,7 @@
+ #endif
+
+ #ifdef WITH_ENCHANT
+-# include <enchant/enchant.h>
++# include <enchant.h>
+ #endif
+
+ struct _window *main_window;
+--- a/lib/lib/xneurlib.c
++++ b/lib/lib/xneurlib.c
+@@ -30,7 +30,7 @@
+ #endif
+
+ #ifdef WITH_ENCHANT
+-# include <enchant/enchant.h>
++# include <enchant.h>
+ #endif
+
+ #include "xneur.h"
+--- a/lib/notify/Makefile.am
++++ b/lib/notify/Makefile.am
+@@ -16,7 +16,9 @@ libxnnotify_la_CFLAGS = -I@top_srcdir@/l
+ @GSTREAMER_CFLAGS@ \
+ @XOSD_CFLAGS@ \
+ @LIBNOTIFY_CFLAGS@ \
+- @GTK_CFLAGS@
++ @GTK_CFLAGS@ \
++ @ASPELL_CFLAGS@ \
++ @ENCHANT_CFLAGS@
+ libxnnotify_la_LDFLAGS = -static @X11_LIBS@ @ADDITIONAL_LIBS@ \
+ @FREEALUT_LIBS@ \
+ @GSTREAMER_LIBS@ \
+--- a/lib/main/Makefile.am
++++ b/lib/main/Makefile.am
+@@ -28,6 +28,6 @@ libxnmain_la_SOURCES = \
+ defines.h
+
+
+-libxnmain_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/notify -I@top_srcdir@/lib/ai -I@top_srcdir@/lib/lib -I@top_srcdir@/lib/rec @X11_CFLAGS@ @DEFAULT_CFLAGS@ -DXNEUR_PLUGIN_DIR=\""@libdir@/xneur"\"
++libxnmain_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/notify -I@top_srcdir@/lib/ai -I@top_srcdir@/lib/lib -I@top_srcdir@/lib/rec @X11_CFLAGS@ @ASPELL_CFLAGS@ @ENCHANT_CFLAGS@ @DEFAULT_CFLAGS@ -DXNEUR_PLUGIN_DIR=\""@libdir@/xneur"\"
+ libxnmain_la_LDFLAGS = -static @X11_LIBS@ @ADDITIONAL_LIBS@
+
+--- a/lib/ai/Makefile.am
++++ b/lib/ai/Makefile.am
+@@ -6,6 +6,6 @@ libxnai_la_SOURCES = \
+ detection.c \
+ detection.h
+
+-libxnai_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/main -I@top_srcdir@/lib/lib @X11_CFLAGS@ @ASPELL_CFLAGS@ @DEFAULT_CFLAGS@
++libxnai_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/main -I@top_srcdir@/lib/lib @X11_CFLAGS@ @ASPELL_CFLAGS@ @ENCHANT_CFLAGS@ @DEFAULT_CFLAGS@
+ libxnai_la_LDFLAGS = -static @X11_LIBS@ @ASPELL_LIBS@ @ADDITIONAL_LIBS@
+
+--- a/lib/config/Makefile.am
++++ b/lib/config/Makefile.am
+@@ -13,7 +13,7 @@ noinst_HEADERS = \
+ libxnconfig_la_SOURCES = \
+ xnconfig.c
+
+-libxnconfig_la_CFLAGS = -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/main -I@top_srcdir@/lib/lib @DEFAULT_CFLAGS@
++libxnconfig_la_CFLAGS = -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/main -I@top_srcdir@/lib/lib @ASPELL_CFLAGS@ @ENCHANT_CFLAGS@ @DEFAULT_CFLAGS@
+ libxnconfig_la_LIBADD = ../lib/libxneur.la @ADDITIONAL_LIBS@
+ libxnconfig_la_LDFLAGS = -version-info 20:0:0
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -9,7 +9,7 @@ xneur_SOURCES = \
+ newlang_creation.c \
+ newlang_creation.h
+
+-xneur_CFLAGS = -I@top_srcdir@/lib/ai -I@top_srcdir@/lib/lib -I@top_srcdir@/lib/config -I@top_srcdir@/lib/main -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/notify @X11_CFLAGS@ @DEFAULT_CFLAGS@
++xneur_CFLAGS = -I@top_srcdir@/lib/ai -I@top_srcdir@/lib/lib -I@top_srcdir@/lib/config -I@top_srcdir@/lib/main -I@top_srcdir@/lib/misc -I@top_srcdir@/lib/notify @X11_CFLAGS@ @ASPELL_CFLAGS@ @ENCHANT_CFLAGS@ @DEFAULT_CFLAGS@
+
+ xneur_LDFLAGS = -L$(top_srcdir)/lib/lib -L$(top_srcdir)/lib/ai -L$(top_srcdir)/lib/config -L$(top_srcdir)/lib/misc -L$(top_srcdir)/lib/main -L$(top_srcdir)/lib/notify @X11_LIBS@ @ADDITIONAL_LIBS@
+
+--- a/plugins/test/Makefile.am
++++ b/plugins/test/Makefile.am
+@@ -7,7 +7,7 @@ pkglib_LTLIBRARIES = libxntest.la
+ libxntest_la_SOURCES = \
+ test.c
+
+-libxntest_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/lib @DEFAULT_CFLAGS@
++libxntest_la_CFLAGS = -I@top_srcdir@/lib/config -I@top_srcdir@/lib/lib @ASPELL_CFLAGS@ @ENCHANT_CFLAGS@ @DEFAULT_CFLAGS@
+ libxntest_la_LDFLAGS = @X11_LIBS@
+
+ libxntest_la_LIBADD =
diff --git a/x11-misc/xneur/files/gcc-10.patch b/x11-misc/xneur/files/gcc-10.patch
new file mode 100644
index 000000000..f3d2f97e6
--- /dev/null
+++ b/x11-misc/xneur/files/gcc-10.patch
@@ -0,0 +1,40 @@
+--- a/lib/main/program.c
++++ b/lib/main/program.c
+@@ -315,7 +315,7 @@
+
+ p->buffer->save_and_clear(p->buffer, p->last_window);
+ p->correction_buffer->clear(p->correction_buffer);
+- p->correction_action = ACTION_NONE;
++ p->correction_action = CORRECTION_NONE;
+
+ if (status == FOCUS_NONE)
+ return;
+@@ -426,7 +426,7 @@
+ p->correction_buffer = buffer_init(xconfig->handle, main_window->keymap);
+ p->correction_buffer->handle = xconfig->handle;
+ p->correction_buffer->keymap = main_window->keymap;
+- p->correction_action = ACTION_NONE;
++ p->correction_action = CORRECTION_NONE;
+
+ //log_message (DEBUG, _("Now layouts count %d"), xconfig->handle->total_languages);
+ log_message(LOG, _("Keyboard layouts present in system:"));
+@@ -609,7 +609,7 @@
+ //{
+ p->buffer->save_and_clear(p->buffer, p->focus->owner_window);
+ p->correction_buffer->clear(p->correction_buffer);
+- p->correction_action = ACTION_NONE;
++ p->correction_action = CORRECTION_NONE;
+ if ((Window)p->focus->get_focused_window(p->focus) != (Window)p->focus->owner_window)
+ {
+ p->update(p);
+--- a/lib/lib/xneur.h
++++ b/lib/lib/xneur.h
+@@ -32,7 +32,7 @@
+ # include <enchant.h>
+ #endif
+
+-struct _window *main_window;
++extern struct _window *main_window;
+
+ struct _xneur_language
+ {
diff --git a/x11-misc/xneur/files/xneur-0.12.0-libnotify-0.7.patch b/x11-misc/xneur/files/xneur-0.12.0-libnotify-0.7.patch
new file mode 100644
index 000000000..080dcc680
--- /dev/null
+++ b/x11-misc/xneur/files/xneur-0.12.0-libnotify-0.7.patch
@@ -0,0 +1,28 @@
+diff -ru xneur-0.12.0-orig/lib/notify/popup.c xneur-0.12.0/lib/notify/popup.c
+--- xneur-0.12.0-orig/lib/notify/popup.c 2011-01-27 05:25:42.000000000 -0500
++++ xneur-0.12.0/lib/notify/popup.c 2011-03-12 02:21:20.411001315 -0500
+@@ -27,6 +27,10 @@
+
+ #include <libnotify/notify.h>
+
++#ifndef NOTIFY_CHECK_VERSION /* macro did not exist before libnotify-0.5.2 */
++# define NOTIFY_CHECK_VERSION(x,y,z) 0
++#endif
++
+ #include <pthread.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -73,8 +77,12 @@
+ popup_body->header = popup_body->content;
+ popup_body->content = NULL;
+ }
+-
++
++#if NOTIFY_CHECK_VERSION(0,7,0)
++ NotifyNotification *notify = notify_notification_new(popup_body->header, popup_body->content, icon);
++#else
+ NotifyNotification *notify = notify_notification_new(popup_body->header, popup_body->content, icon, NULL);
++#endif
+
+ notify_notification_set_category(notify, type);
+ notify_notification_set_urgency(notify, urgency);