From cef3d321ee72f7b3b32f05c2b73921588659749d Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Sun, 27 Nov 2016 11:08:00 +0100 Subject: app-text/enchant: Fix hunspell 1.5 support (#600952 by Lars Wendler) Package-Manager: portage-2.3.2 --- app-text/enchant/enchant-1.6.0.ebuild | 22 ++++++++++++---------- .../files/enchant-1.6.0-hunspell150_fix.patch | 12 ++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 app-text/enchant/files/enchant-1.6.0-hunspell150_fix.patch diff --git a/app-text/enchant/enchant-1.6.0.ebuild b/app-text/enchant/enchant-1.6.0.ebuild index 181d389fe311..765719fcbd99 100644 --- a/app-text/enchant/enchant-1.6.0.ebuild +++ b/app-text/enchant/enchant-1.6.0.ebuild @@ -3,7 +3,6 @@ # $Id$ EAPI=6 - inherit eutils autotools DESCRIPTION="Spellchecker wrapping library" @@ -13,26 +12,29 @@ SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/${P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" + IUSE="aspell +hunspell static-libs zemberek" +REQUIRED_USE="|| ( hunspell aspell zemberek )" COMMON_DEPENDS=" dev-libs/glib:2 aspell? ( app-text/aspell ) hunspell? ( >=app-text/hunspell-1.2.1:0= ) - zemberek? ( dev-libs/dbus-glib )" - + zemberek? ( dev-libs/dbus-glib ) +" RDEPEND="${COMMON_DEPENDS} - zemberek? ( app-text/zemberek-server )" - + zemberek? ( app-text/zemberek-server ) +" DEPEND="${COMMON_DEPENDS} - virtual/pkgconfig" - -REQUIRED_USE="|| ( hunspell aspell zemberek )" + virtual/pkgconfig +" DOCS="AUTHORS BUGS ChangeLog HACKING MAINTAINERS NEWS README TODO" PATCHES=( + # http://bugzilla.abisource.com/show_bug.cgi?id=13772 "${FILESDIR}/${P}-hunspell140_fix.patch" + "${FILESDIR}/${P}-hunspell150_fix.patch" ) src_prepare() { @@ -40,6 +42,7 @@ src_prepare() { sed -i \ -e 's:noinst_PROGRAMS:check_PROGRAMS:' \ tests/Makefile.am || die + mv configure.in configure.ac || die AT_M4DIR=ac-helpers eautoreconf } @@ -56,6 +59,5 @@ src_configure() { src_install() { default - - prune_libtool_files --all + prune_libtool_files --modules } diff --git a/app-text/enchant/files/enchant-1.6.0-hunspell150_fix.patch b/app-text/enchant/files/enchant-1.6.0-hunspell150_fix.patch new file mode 100644 index 000000000000..bd40c81d3c03 --- /dev/null +++ b/app-text/enchant/files/enchant-1.6.0-hunspell150_fix.patch @@ -0,0 +1,12 @@ +diff -upr enchant-1.6.0.orig/src/myspell/myspell_checker.cpp enchant-1.6.0/src/myspell/myspell_checker.cpp +--- enchant-1.6.0.orig/src/myspell/myspell_checker.cpp 2016-11-26 16:04:05.689051339 +0200 ++++ enchant-1.6.0/src/myspell/myspell_checker.cpp 2016-11-26 16:05:11.380014568 +0200 +@@ -431,7 +431,7 @@ MySpellChecker::requestDictionary(const + if(myspell == NULL){ + return false; + } +- char *enc = myspell->get_dic_encoding(); ++ const char *enc = myspell->get_dic_encoding(); + + m_translate_in = g_iconv_open(enc, "UTF-8"); + m_translate_out = g_iconv_open("UTF-8", enc); -- cgit v1.2.3-65-gdbad