Skip to content

Commit

Permalink
Update enchant deps to build with enchant-2 and force a rebuild. Fixes
Browse files Browse the repository at this point in the history
…#4039 (#4041)

latexila is missing as that needs a package rename and update, will follow later.

I also went ahead and updated gspell (dll version bump) since its reverse deps are
a subset of the enchant ones.
  • Loading branch information
lazka authored and Alexpux committed Jul 5, 2018
1 parent 7b259ef commit b1f7ddb
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 17 deletions.
6 changes: 3 additions & 3 deletions mingw-w64-gedit/PKGBUILD
Expand Up @@ -4,7 +4,7 @@ _realname=gedit
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.28.1
pkgrel=1
pkgrel=2
arch=('any')
pkgdesc="A text editor for GNOME (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme"
Expand All @@ -13,13 +13,13 @@ depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme"
"${MINGW_PACKAGE_PREFIX}-gtksourceview3"
"${MINGW_PACKAGE_PREFIX}-iso-codes"
"${MINGW_PACKAGE_PREFIX}-libpeas"
"${MINGW_PACKAGE_PREFIX}-python3-gobject")
"${MINGW_PACKAGE_PREFIX}-python3-gobject"
"${MINGW_PACKAGE_PREFIX}-gspell")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
"${MINGW_PACKAGE_PREFIX}-python3"
"${MINGW_PACKAGE_PREFIX}-vala"
"${MINGW_PACKAGE_PREFIX}-gobject-introspection"
"${MINGW_PACKAGE_PREFIX}-gspell"
"${MINGW_PACKAGE_PREFIX}-gnome-common"
"${MINGW_PACKAGE_PREFIX}-gtk-doc"
"intltool"
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-gitg/PKGBUILD
Expand Up @@ -4,7 +4,7 @@ _realname=gitg
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.26.0
pkgrel=1
pkgrel=2
arch=('any')
pkgdesc="git repository viewer for GTK+/GNOME (mingw-w64)"
depends=("${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme"
Expand Down
4 changes: 2 additions & 2 deletions mingw-w64-gspell/PKGBUILD
Expand Up @@ -3,7 +3,7 @@
_realname=gspell
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.6.1
pkgver=1.8.1
pkgrel=1
arch=('any')
pkgdesc="Spell-checking library for GTK+ (mingw-w64)"
Expand All @@ -19,7 +19,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-vala"
license=("LGPL 2.1")
url="https://www.gnome.org"
source=(https://download.gnome.org/sources/${_realname}/${pkgver%.*}/${_realname}-${pkgver}.tar.xz)
sha256sums=('f4d329348775374eec18158f8dcbbacf76f85be5ce002a92d93054ece70ec4de')
sha256sums=('819a1d23c7603000e73f5e738bdd284342e0cd345fb0c7650999c31ec741bbe5')

prepare() {
cd "${srcdir}"/${_realname}-${pkgver}
Expand Down
10 changes: 7 additions & 3 deletions mingw-w64-gtkspell/PKGBUILD
Expand Up @@ -6,7 +6,7 @@ _realname=gtkspell
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.0.16
pkgrel=6
pkgrel=7
pkgdesc="Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget (mingw-w64)"
arch=('any')
url="https://gtkspell.sourceforge.io/"
Expand All @@ -20,16 +20,20 @@ depends=("${MINGW_PACKAGE_PREFIX}-gtk2"
options=(!libtool strip staticlibs)
source=(https://gtkspell.sourceforge.io/download/${_realname}-${pkgver}.tar.gz
gtkspell-no-undefined.patch
001-localedir-relocation.patch)
001-localedir-relocation.patch
enchant-2.diff)
sha256sums=('8fc7dc560167b2cb7193e76aca625a152dc19b0ebf49816b78539cbb90d80d02'
'cb6978c914d5a20544cad2ba6b3a58096daadc420d21f99797949c7f3a02e57b'
'1b4c6400c19eef9e36cb85fcb6c9a97a49d474bdd24ba4e8bfb29f3bacefa868')
'1b4c6400c19eef9e36cb85fcb6c9a97a49d474bdd24ba4e8bfb29f3bacefa868'
'52e693590161bc285ec46a2beece802f47c7ede65ec0b72ffa224ab0db176bad')

prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/gtkspell-no-undefined.patch
patch -p1 -i ${srcdir}/001-localedir-relocation.patch
patch -p1 -i ${srcdir}/enchant-2.diff

gtkdocize
WANT_AUTOMAKE=latest autoreconf -fi
}

Expand Down
30 changes: 30 additions & 0 deletions mingw-w64-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);

10 changes: 7 additions & 3 deletions mingw-w64-gtkspell3/PKGBUILD
Expand Up @@ -4,7 +4,7 @@ _realname=gtkspell3
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.0.9
pkgrel=2
pkgrel=3
pkgdesc="Provides word-processor-style highlighting and replacement of misspelled words in a GtkTextView widget (mingw-w64)"
arch=('any')
url="https://gtkspell.sourceforge.io/"
Expand All @@ -21,13 +21,17 @@ depends=("${MINGW_PACKAGE_PREFIX}-gtk3"
"${MINGW_PACKAGE_PREFIX}-enchant")
options=(!libtool strip staticlibs)
source=(https://sourceforge.net/projects/gtkspell/files/${pkgver}/${_realname}-${pkgver}.tar.xz
001-win.patch)
001-win.patch
enchant-2.patch)
sha256sums=('a4f4a4a2789f7499563e26d96b22d8085222ebe278da47d026b2de782b8b4d26'
'658a15a3a34c39632ce0700b9d709b634e5b166498f053d235416bd3e11b29c0')
'658a15a3a34c39632ce0700b9d709b634e5b166498f053d235416bd3e11b29c0'
'17355439e8540e02591e398bc8fd2abfce708157cc116bfd93feab214613cbd3')

prepare() {
cd ${_realname}-${pkgver}
patch -p1 -i ${srcdir}/001-win.patch
patch -p1 -i ${srcdir}/enchant-2.patch
sed -e 's/enchant/enchant-2/g' -i configure.ac

WANT_AUTOMAKE=latest autoreconf -fi
}
Expand Down
20 changes: 20 additions & 0 deletions mingw-w64-gtkspell3/enchant-2.patch
@@ -0,0 +1,20 @@
--- gtkspell3-3.0.9/gtkspell/gtkspell.c.orig 2016-08-06 09:43:17.000000000 +0000
+++ gtkspell3-3.0.9/gtkspell/gtkspell.c 2017-11-22 12:07:52.716086700 +0000
@@ -353,7 +353,7 @@
get_word_extents_from_mark (spell->priv->buffer, &start, &end, spell->priv->mark_click);
word = gtk_text_buffer_get_text (spell->priv->buffer, &start, &end, FALSE);

- enchant_dict_add_to_pwl (spell->priv->speller, word, strlen (word));
+ enchant_dict_add (spell->priv->speller, word, strlen (word));

gtk_spell_checker_recheck_all (spell);

@@ -1246,7 +1246,7 @@
void
gtk_spell_checker_add_to_dictionary (GtkSpellChecker *spell, const gchar *word)
{
- enchant_dict_add_to_pwl (spell->priv->speller, word, strlen (word));
+ enchant_dict_add (spell->priv->speller, word, strlen (word));
gtk_spell_checker_recheck_all (spell);
}

13 changes: 8 additions & 5 deletions mingw-w64-webkitgtk/PKGBUILD
Expand Up @@ -4,7 +4,7 @@ _realname=webkitgtk
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}2" "${MINGW_PACKAGE_PREFIX}-${_realname}3")
pkgver=2.4.11
pkgrel=5
pkgrel=6
pkgdesc="GTK+ Web content engine library (mingw-w64)"
arch=('any')
url="https://webkitgtk.org/"
Expand All @@ -22,7 +22,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
"libtool"
"gtk-doc"
"perl"
"python2")
"python3")
depends=("${MINGW_PACKAGE_PREFIX}-angleproject"
"${MINGW_PACKAGE_PREFIX}-cairo"
"${MINGW_PACKAGE_PREFIX}-enchant"
Expand Down Expand Up @@ -50,7 +50,8 @@ source=(https://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz
0022-gl-casts.patch
0101-webkitgtk-2.4.3-gcc-asm.all.patch
0102-fix-build-with-icu-59.1.patch
webkitgtk-2.4.9-abs.patch)
webkitgtk-2.4.9-abs.patch
enchant-2.x.patch)

prepare() {
cd ${srcdir}/${_realname}-${pkgver}
Expand All @@ -61,8 +62,9 @@ prepare() {
patch -p1 -i ${srcdir}/0102-fix-build-with-icu-59.1.patch
# borrowed from Arch Linux
patch -p1 -i ${srcdir}/webkitgtk-2.4.9-abs.patch
patch -p1 -i ${srcdir}/enchant-2.x.patch

# autoreconf --verbose --install -I Source/autotools
autoreconf --verbose --install -I Source/autotools

rm -rf ${srcdir}/build-gtk{2,3}
mkdir -p ${srcdir}/build-gtk{2,3}
Expand Down Expand Up @@ -156,4 +158,5 @@ sha256sums=('588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7'
'2a74b1174410121fe8a25b1a87dfeadd22aebd0337df8a31a42ec99ee1585389'
'82f089e1271ccd39ea3fee7c066a06eabb287d6273910c9e9bddb86ba5ad2818'
'3d17c925cd6b21a2aafb4d91913b0b3e1a11f532e31190161398b228c367bd31'
'ec294bbb5588a1802a68e3615c6718486b22f922645c5fef686d3d103014bf70')
'ec294bbb5588a1802a68e3615c6718486b22f922645c5fef686d3d103014bf70'
'3bdb4c57c5ff4a86706282905b0f1d4a44a25dd3d6185d94871994db6fdb9b79')
22 changes: 22 additions & 0 deletions mingw-w64-webkitgtk/enchant-2.x.patch
@@ -0,0 +1,22 @@
--- webkitgtk-2.4.9/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp.orig 2017-12-06 14:59:40.768262788 -0500
+++ webkitgtk-2.4.9/Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp 2017-12-06 15:03:10.000000000 -0500
@@ -128,7 +128,7 @@
for (i = 0; i < numberOfSuggestions; i++)
guesses.append(String::fromUTF8(suggestions[i]));

- enchant_dict_free_suggestions(*iter, suggestions);
+ enchant_dict_free_string_list(*iter, suggestions);
}

return guesses;
--- webkitgtk-2.4.11/Source/autotools/FindDependencies.m4.orig 2018-07-04 12:52:47.582565800 +0200
+++ webkitgtk-2.4.11/Source/autotools/FindDependencies.m4 2018-07-04 12:53:18.535026100 +0200
@@ -154,7 +154,7 @@
AC_SUBST(PANGO_LIBS)

if test "$enable_spellcheck" = "yes"; then
- PKG_CHECK_MODULES(ENCHANT, enchant >= enchant_required_version, [], [enable_spellcheck="no"])
+ PKG_CHECK_MODULES(ENCHANT, enchant-2 >= enchant_required_version, [], [enable_spellcheck="no"])
AC_SUBST(ENCHANT_CFLAGS)
AC_SUBST(ENCHANT_LIBS)
fi

0 comments on commit b1f7ddb

Please sign in to comment.