diff --git a/gtkspell/PKGBUILD b/gtkspell/PKGBUILD index a71e912..8d744ef 100644 --- a/gtkspell/PKGBUILD +++ b/gtkspell/PKGBUILD @@ -1,23 +1,39 @@ pkgname=gtkspell pkgver=2.0.16 -pkgrel=3 +pkgrel=4 url="http://gtkspell.sourceforge.net/" pkgdesc="GtkSpell provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget" arch=('x86_64') license=('GPL') depends=('gtk2' 'enchant') -makedepends=('intltool') -options=('!libtool') -install=gtkspell.install -source=(http://gtkspell.sourceforge.net/download/${pkgname}-${pkgver}.tar.gz) -md5sums=('f75dcc9338f182c571b321d37c606a94') +makedepends=('intltool' 'gtk-doc' 'python3-six') +validpgpkeys=('7C70E4D9927061BD840E82DB6BA6197569B23319') #Daniel Atallah +source=(https://downloads.sourceforge.net/sourceforge/gtkspell/${pkgname}-${pkgver}.tar.gz{,.asc} + enchant-2.diff) +sha1sums=('49a3eaff850d119a94fc929635270f01e87cdca1' + 'SKIP' + '505bf7bad778c7c1bdd0bfbad7887f042dfd5eea') +prepare() { + cd $pkgname-$pkgver + # enchant 2.2 + patch -Np1 -i ../enchant-2.diff + gtkdocize + autoreconf -fvi +} + build() { cd "${srcdir}/${pkgname}-${pkgver}" - ./configure --prefix=/usr --disable-gtk-doc + ./configure --prefix=/usr --disable-static + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } +check() { + cd "${srcdir}/${pkgname}-${pkgver}" + make check +} + package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install diff --git a/gtkspell/enchant-2.diff b/gtkspell/enchant-2.diff new file mode 100644 index 0000000..9ce0781 --- /dev/null +++ b/gtkspell/enchant-2.diff @@ -0,0 +1,30 @@ +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); +