summaryrefslogtreecommitdiff
path: root/app-text/hunspell
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /app-text/hunspell
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'app-text/hunspell')
-rw-r--r--app-text/hunspell/Manifest2
-rw-r--r--app-text/hunspell/files/hunspell-1.7.0-CVE-2019-16707.patch22
-rw-r--r--app-text/hunspell/hunspell-1.7.0-r2.ebuild89
3 files changed, 113 insertions, 0 deletions
diff --git a/app-text/hunspell/Manifest b/app-text/hunspell/Manifest
index 940dc60712ed..e582c67e5a89 100644
--- a/app-text/hunspell/Manifest
+++ b/app-text/hunspell/Manifest
@@ -1,5 +1,7 @@
+AUX hunspell-1.7.0-CVE-2019-16707.patch 811 BLAKE2B 5adc2e6009a0381bbe6ea10a64fb8847b070a37eb7fd6858f2e5180a19f4aff9f8ce007c5a948c6caa3b0de8454f3f87953bbe2c18a2ea43aaea3504d4d3c460 SHA512 e7674819a9da4c3d742d34338d68d137d8613f97be2d25bf20db5219d4dd626f59a63ed4757b92f34307f499f2d687014065cdea97b55c98db295a8290300d2d
AUX hunspell-1.7.0-renameexes.patch 6399 BLAKE2B d852305da0dc0330e293a028a1e178d7887a3567a35bc6feebe48e7a4bf205103155ec31b5a483a1002c505ae89bdf47ae80c1b6ccd866eb62cc7e6851c1a1b9 SHA512 3703b49728e8ce92637a602478995d38deb64c1b3281a06447f66c352ca0e2adb7d8aa9167debd9cb15e4009ee4efeb7618065bf16dda47155245c0266d97eaa
AUX hunspell-1.7.0-tinfo.patch 1719 BLAKE2B 1b612edd63dc04fe57a27fc94937b1cabcb32c4158009c3444d43f506d19b94d0aa79d746ba409ec429d467e29619cd32894e935b8f8c0deda7f0ed2600841c6 SHA512 297f337895f805c9ce27ae63f424c88e8f153fb8f6724aedc11dd564acee6264b8eba01b09f43d75585d6d5bf3eb245db69b3da00c349c3c1c0d04a5a99b1b48
DIST hunspell-1.7.0.tar.gz 482156 BLAKE2B daf689ab44872c78d27bd035d996c61da9b01b7bbe5ced120034b2d64bbead573ad3807dfe5a06ecdbd96c610f42e4ea015be4b2046ebafad13347c08e60913a SHA512 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903
EBUILD hunspell-1.7.0-r1.ebuild 2317 BLAKE2B 9557168fd901afe16a8402a682cf06cb97f6a6fd367caef811e31acc92f04f2b77a907d409e9d77b6389425eaad901a0084bb8d38d69935648da4bda9ae6ac47 SHA512 e2926c1860838c46fcddb6bb7c05462d6908fb188791ddcc677243394cf46902ed01198c53e137f7860c418c27c20ac59de21d4033fc624c168fdd60c104c69b
+EBUILD hunspell-1.7.0-r2.ebuild 2372 BLAKE2B b65efc24aa4e71a043e86a747a3d5ec257a6ad584129fb540aa2003c6d31656b6b3d96d0c53c47baec5538df71d187a2719e7699aa31c1435a1b65e209020ef2 SHA512 d40ad309340d7822093aff140760d189f6e54061951c32e5c168df83a2f4b42541cd8e485021c5a18efd2e0f13c2ae1defb426bc348c0d8069452a457b4c7d3c
MISC metadata.xml 300 BLAKE2B 03418bffa5dab48a3d9f5f7de46a79b8b5de44296b7c39d8d75d021f3c5693eea63148fbed02c8a77b1a0846e1d39d8e11caeb003297839fda0c5dc679aaca08 SHA512 b541c90d84ee8c1541d588948286428f065ebf0bb393108e7521ba8d45ab3fb235eaba61ca61eebc61f371e399e7d98ccf3c2994d8df97d1b6a7972e92cffa71
diff --git a/app-text/hunspell/files/hunspell-1.7.0-CVE-2019-16707.patch b/app-text/hunspell/files/hunspell-1.7.0-CVE-2019-16707.patch
new file mode 100644
index 000000000000..649eef5b293d
--- /dev/null
+++ b/app-text/hunspell/files/hunspell-1.7.0-CVE-2019-16707.patch
@@ -0,0 +1,22 @@
+From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Tue, 12 Nov 2019 20:03:15 +0000
+Subject: [PATCH] invalid read memory access #624
+
+---
+ src/hunspell/suggestmgr.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
+index dba084e9..c23f165a 100644
+--- a/src/hunspell/suggestmgr.cxx
++++ b/src/hunspell/suggestmgr.cxx
+@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring(
+ int l2 = su2.size();
+ // decapitalize dictionary word
+ if (complexprefixes) {
+- if (su1[l1 - 1] == su2[l2 - 1])
++ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1])
+ return 1;
+ } else {
+ unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l;
diff --git a/app-text/hunspell/hunspell-1.7.0-r2.ebuild b/app-text/hunspell/hunspell-1.7.0-r2.ebuild
new file mode 100644
index 000000000000..209dab4e6da2
--- /dev/null
+++ b/app-text/hunspell/hunspell-1.7.0-r2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic
+
+MY_P="${PN}-${PV/_beta/b}"
+
+DESCRIPTION="Hunspell spell checker - an improved replacement for myspell in OOo"
+SRC_URI="https://github.com/hunspell/hunspell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://github.com/hunspell"
+
+SLOT="0/$(ver_cut 1-2)"
+LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
+IUSE="ncurses nls readline static-libs"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND="
+ ncurses? ( sys-libs/ncurses:0= )
+ readline? ( sys-libs/readline:= )
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
+
+LANGS="af bg ca cs cy da de de-1901 el en eo es et fo fr ga gl he hr hu ia id
+is it kk km ku lt lv mi mk ms nb nl nn pl pt pt-BR ro ru sk sl sq sv sw tn uk
+zu"
+
+PDEPEND=""
+for lang in ${LANGS}; do
+ IUSE+=" l10n_${lang}"
+ case ${lang} in
+ de-1901) dict="de_1901" ;;
+ pt-BR) dict="pt-br" ;;
+ *) dict="${lang}" ;;
+ esac
+ PDEPEND+=" l10n_${lang}? ( app-dicts/myspell-${dict} )"
+done
+unset dict lang LANGS
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=(
+ AUTHORS ChangeLog NEWS THANKS license.hunspell
+ license.myspell README.md
+)
+
+PATCHES=(
+ # Upstream package creates some executables which names are too generic
+ # to be placed in /usr/bin - this patch prefixes them with 'hunspell-'.
+ # It modifies a Makefile.am file, hence eautoreconf.
+ "${FILESDIR}/${PN}-1.7.0-renameexes.patch"
+
+ "${FILESDIR}/${PN}-1.7.0-tinfo.patch" #692614
+ "${FILESDIR}/${PN}-1.7.0-CVE-2019-16707.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # missing somehow, and I am too lazy to fix it properly
+ [[ ${CHOST} == *-darwin* ]] && append-libs -liconv
+
+ # I wanted to put the include files in /usr/include/hunspell.
+ # You can do that, libreoffice can find them anywhere, just
+ # ping me when you do so ; -- scarabeus
+ local myeconfargs=(
+ $(use_enable nls)
+ $(use_with ncurses ui)
+ $(use_with readline readline)
+ $(use_enable static-libs static)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ einstalldocs
+ find "${ED}" -type f -name '*.la' -delete || die
+
+ #342449
+ pushd "${ED}"/usr/$(get_libdir)/ >/dev/null
+ ln -s lib${PN}{-$(ver_cut 1).$(ver_cut 2).so.0.0.1,.so}
+ popd >/dev/null
+}