From 41b466d0faa1438fc5e5e1b17484702b63eef070 Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 1 Mar 2020 14:36:00 -0300 Subject: [PATCH] community/gtkspell: switch to enchant2 --- community/gtkspell/APKBUILD | 16 +++++++++------ community/gtkspell/enchant-2.patch | 31 ++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 community/gtkspell/enchant-2.patch diff --git a/community/gtkspell/APKBUILD b/community/gtkspell/APKBUILD index a465b929f03..5244065ea9b 100644 --- a/community/gtkspell/APKBUILD +++ b/community/gtkspell/APKBUILD @@ -1,18 +1,21 @@ # Maintainer: Natanael Copa pkgname=gtkspell pkgver=2.0.16 -pkgrel=7 -pkgdesc="GtkSpell provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget" +pkgrel=8 +pkgdesc="Word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget" url="http://gtkspell.sourceforge.net/" arch="all" license="GPL-2.0-only" -makedepends="gtk+2.0-dev enchant-dev intltool" +makedepends="gtk+2.0-dev enchant2-dev automake autoconf libtool + gtk-doc" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang" -source="http://gtkspell.sourceforge.net/download/gtkspell-$pkgver.tar.gz" +source="http://gtkspell.sourceforge.net/download/gtkspell-$pkgver.tar.gz + enchant-2.patch + " prepare() { - update_config_sub default_prepare + autoreconf -fi } build() { @@ -31,4 +34,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="7d3afb327c2e15608194e6ee6110107a0ce082e483788d831d636b2e579472304137373c09a966d8e5c0cd2f830bf2e0ee477c9b5fca7da6ee27fd1498915b9d gtkspell-2.0.16.tar.gz" +sha512sums="7d3afb327c2e15608194e6ee6110107a0ce082e483788d831d636b2e579472304137373c09a966d8e5c0cd2f830bf2e0ee477c9b5fca7da6ee27fd1498915b9d gtkspell-2.0.16.tar.gz +a1a8b2409677b1903d75e6d2baff0455e5adb0fc19cc0a054c02249a307544ab35f2d2386c79cbc7894f9cbb154fd51d4b4eb5061d3ccfc418ffc126a9f03704 enchant-2.patch" diff --git a/community/gtkspell/enchant-2.patch b/community/gtkspell/enchant-2.patch new file mode 100644 index 00000000000..9b2e3732c0b --- /dev/null +++ b/community/gtkspell/enchant-2.patch @@ -0,0 +1,31 @@ +diff -u -r gtkspell-2.0.16/configure.ac gtkspell-2.0.16-enchant2/configure.ac +--- gtkspell-2.0.16/configure.ac 2009-10-23 04:52:31.000000000 +0200 ++++ gtkspell-2.0.16-enchant2/configure.ac 2018-01-18 12:42:06.366410232 +0100 +@@ -12,12 +12,12 @@ + AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + AC_CONFIG_HEADERS([config.h]) + +-SPELLER_LIB=-lenchant ++SPELLER_LIB=-lenchant-2 + + AC_SUBST(SPELLER_LIB) + GTKSPELL_PACKAGES=gtk+-2.0 + AC_SUBST(GTKSPELL_PACKAGES) +-PKG_CHECK_MODULES(GTKSPELL, $GTKSPELL_PACKAGES enchant >= 0.4.0 ) ++PKG_CHECK_MODULES(GTKSPELL, $GTKSPELL_PACKAGES enchant-2 >= 2.2.0 ) + AC_SUBST(GTKSPELL_CFLAGS) + AC_SUBST(GTKSPELL_LIBS) + +diff -u -r gtkspell-2.0.16/gtkspell/gtkspell.c gtkspell-2.0.16-enchant2/gtkspell/gtkspell.c +--- gtkspell-2.0.16/gtkspell/gtkspell.c 2009-10-09 21:01:47.000000000 +0200 ++++ gtkspell-2.0.16-enchant2/gtkspell/gtkspell.c 2018-01-18 12:41:37.146338802 +0100 +@@ -277,7 +277,7 @@ + get_word_extents_from_mark(spell->buffer, &start, &end, spell->mark_click); + word = gtk_text_buffer_get_text(spell->buffer, &start, &end, FALSE); + +- enchant_dict_add_to_pwl( spell->speller, word, strlen(word)); ++ enchant_dict_add( spell->speller, word, strlen(word)); + + gtkspell_recheck_all(spell); + +