Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/hunspell/files/, app-text/hunspell/
Date: Mon, 02 Sep 2019 10:55:59
Message-Id: 1567421747.4b94328cd41359aa9a120a34b758e468f39849b8.polynomial-c@gentoo
1 commit: 4b94328cd41359aa9a120a34b758e468f39849b8
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 2 10:54:25 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 2 10:55:47 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b94328c
7
8 app-text/hunspell: Revbump fix build against sys-libs/ncurses[tinfo]
9
10 Thanks-to: zimous <zimous <AT> matfyz.cz>
11 Bug: https://bugs.gentoo.org/692614
12 Package-Manager: Portage-2.3.75, Repoman-2.3.17
13 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
14
15 app-text/hunspell/files/hunspell-1.7.0-tinfo.patch | 61 +++++++++++++++
16 app-text/hunspell/hunspell-1.7.0-r1.ebuild | 88 ++++++++++++++++++++++
17 2 files changed, 149 insertions(+)
18
19 diff --git a/app-text/hunspell/files/hunspell-1.7.0-tinfo.patch b/app-text/hunspell/files/hunspell-1.7.0-tinfo.patch
20 new file mode 100644
21 index 00000000000..1fb992b0c9d
22 --- /dev/null
23 +++ b/app-text/hunspell/files/hunspell-1.7.0-tinfo.patch
24 @@ -0,0 +1,61 @@
25 +From ce41cfc39129ee2be67667f2d9b78cc7f7d24dca Mon Sep 17 00:00:00 2001
26 +From: zimous <zimous@××××××.cz>
27 +Date: Mon, 2 Sep 2019 12:46:53 +0200
28 +Subject: [PATCH] Fix build against ncurses with separate tinfo lib
29 +
30 +Gentoo-bug: https://bugs.gentoo.org/692614
31 +---
32 + configure.ac | 22 ++++++++++++++++++----
33 + 1 file changed, 18 insertions(+), 4 deletions(-)
34 +
35 +diff --git a/configure.ac b/configure.ac
36 +index 9426a94..bc5e39d 100644
37 +--- a/configure.ac
38 ++++ b/configure.ac
39 +@@ -52,11 +52,23 @@ AC_ARG_WITH(
40 + AS_IF([test "x$with_ui" != xno], [
41 + AC_CHECK_LIB([ncursesw],[tparm],[
42 + CURSESLIB=-lncursesw
43 ++ AC_CHECK_LIB([tinfow],[tgetent], [
44 ++ CURSESLIB="$CURSESLIB -ltinfow"
45 ++ ])
46 + ],[AC_CHECK_LIB([curses],[tparm],[
47 + CURSESLIB=-lcurses
48 ++ AC_CHECK_LIB([tinfow],[tgetent], [
49 ++ CURSESLIB="$CURSESLIB -ltinfo"
50 ++ ])
51 + ],[AC_CHECK_LIB([ncurses],[tparm],[
52 + CURSESLIB=-lncurses
53 +- ])])])
54 ++ AC_CHECK_LIB([tinfow],[tgetent], [
55 ++ CURSESLIB="$CURSESLIB -ltinfo"
56 ++ ])
57 ++ ],
58 ++ [-ltinfo])],
59 ++ [-ltinfo])],
60 ++ [-ltinfow])
61 + if test "$CURSESLIB" != "" ; then
62 + echo Compiling with curses user interface.
63 + AC_CHECK_HEADERS([curses.h])
64 +@@ -78,13 +90,15 @@ AC_ARG_WITH(
65 + )
66 + READLINELIB=""
67 + AS_IF([test "x$with_readline" != xno],
68 +- [AC_CHECK_LIB([tinfo],[tgetent], [
69 ++ [AC_CHECK_LIB([tinfow],[tgetent], [
70 ++ TERMLIB=-ltinfow
71 ++ ],[AC_CHECK_LIB([tinfo],[tgetent], [
72 + TERMLIB=-ltinfo
73 +- ],[AC_CHECK_LIB([curses],[tparm],[
74 ++ ],[AC_CHECK_LIB([curses],[tparm],[
75 + TERMLIB=-lncurses
76 + ],[AC_CHECK_LIB([termcap],[tgetent],[
77 + TERMLIB=-ltermcap
78 +- ])])])
79 ++ ])])])])
80 + LDSAVE=$LDFLAGS
81 + LDFLAGS="$LDFLAGS $TERMLIB"
82 + AC_CHECK_LIB([readline],[readline],[
83 +--
84 +2.23.0
85 +
86
87 diff --git a/app-text/hunspell/hunspell-1.7.0-r1.ebuild b/app-text/hunspell/hunspell-1.7.0-r1.ebuild
88 new file mode 100644
89 index 00000000000..343a7fbce81
90 --- /dev/null
91 +++ b/app-text/hunspell/hunspell-1.7.0-r1.ebuild
92 @@ -0,0 +1,88 @@
93 +# Copyright 1999-2019 Gentoo Authors
94 +# Distributed under the terms of the GNU General Public License v2
95 +
96 +EAPI=7
97 +inherit autotools flag-o-matic
98 +
99 +MY_P="${PN}-${PV/_beta/b}"
100 +
101 +DESCRIPTION="Hunspell spell checker - an improved replacement for myspell in OOo"
102 +SRC_URI="https://github.com/hunspell/hunspell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
103 +HOMEPAGE="https://github.com/hunspell"
104 +
105 +SLOT="0/$(ver_cut 1-2)"
106 +LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
107 +IUSE="ncurses nls readline static-libs"
108 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
109 +
110 +RDEPEND="
111 + ncurses? ( sys-libs/ncurses:0= )
112 + readline? ( sys-libs/readline:= )
113 +"
114 +DEPEND="${RDEPEND}
115 + sys-devel/gettext
116 +"
117 +
118 +LANGS="af bg ca cs cy da de de-1901 el en eo es et fo fr ga gl he hr hu ia id
119 +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
120 +zu"
121 +
122 +PDEPEND=""
123 +for lang in ${LANGS}; do
124 + IUSE+=" l10n_${lang}"
125 + case ${lang} in
126 + de-1901) dict="de_1901" ;;
127 + pt-BR) dict="pt-br" ;;
128 + *) dict="${lang}" ;;
129 + esac
130 + PDEPEND+=" l10n_${lang}? ( app-dicts/myspell-${dict} )"
131 +done
132 +unset dict lang LANGS
133 +
134 +S="${WORKDIR}/${MY_P}"
135 +
136 +DOCS=(
137 + AUTHORS ChangeLog NEWS THANKS license.hunspell
138 + license.myspell README.md
139 +)
140 +
141 +PATCHES=(
142 + # Upstream package creates some executables which names are too generic
143 + # to be placed in /usr/bin - this patch prefixes them with 'hunspell-'.
144 + # It modifies a Makefile.am file, hence eautoreconf.
145 + "${FILESDIR}/${PN}-1.7.0-renameexes.patch"
146 +
147 + "${FILESDIR}/${PN}-1.7.0-tinfo.patch" #692614
148 +)
149 +
150 +src_prepare() {
151 + default
152 + eautoreconf
153 +}
154 +
155 +src_configure() {
156 + # missing somehow, and I am too lazy to fix it properly
157 + [[ ${CHOST} == *-darwin* ]] && append-libs -liconv
158 +
159 + # I wanted to put the include files in /usr/include/hunspell.
160 + # You can do that, libreoffice can find them anywhere, just
161 + # ping me when you do so ; -- scarabeus
162 + local myeconfargs=(
163 + $(use_enable nls)
164 + $(use_with ncurses ui)
165 + $(use_with readline readline)
166 + $(use_enable static-libs static)
167 + )
168 + econf "${myeconfargs[@]}"
169 +}
170 +
171 +src_install() {
172 + default
173 + einstalldocs
174 + find "${ED}" -type f -name '*.la' -delete || die
175 +
176 + #342449
177 + pushd "${ED}"/usr/$(get_libdir)/ >/dev/null
178 + ln -s lib${PN}{-$(ver_cut 1).$(ver_cut 2).so.0.0.1,.so}
179 + popd >/dev/null
180 +}