1 |
commit: 9865150618d0f7cca111d930737e5e590cd65b24 |
2 |
Author: Felix Janda <felix.janda <AT> posteo <DOT> de> |
3 |
AuthorDate: Tue Jul 26 16:58:44 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 28 17:09:59 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98651506 |
7 |
|
8 |
app-i18n/uim: add libressl support |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/585672 |
11 |
|
12 |
app-i18n/uim/files/uim-1.8.6-libressl.patch | 79 ++++++++++ |
13 |
app-i18n/uim/uim-1.8.6-r2.ebuild | 228 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 307 insertions(+) |
15 |
|
16 |
diff --git a/app-i18n/uim/files/uim-1.8.6-libressl.patch b/app-i18n/uim/files/uim-1.8.6-libressl.patch |
17 |
new file mode 100644 |
18 |
index 0000000..b14de58 |
19 |
--- /dev/null |
20 |
+++ b/app-i18n/uim/files/uim-1.8.6-libressl.patch |
21 |
@@ -0,0 +1,79 @@ |
22 |
+From 7a281b1131399f04627986e6f9a54499b08e239d Mon Sep 17 00:00:00 2001 |
23 |
+From: Felix Janda <felix.janda@××××××.de> |
24 |
+Date: Thu, 21 Apr 2016 23:12:10 +0200 |
25 |
+Subject: [PATCH] Make openssl SSLv2 and SSLv3 support optional |
26 |
+ |
27 |
+Fixes compilation with libressl |
28 |
+--- |
29 |
+ uim/openssl.c | 30 ++++++++++++++++++++++++++++++ |
30 |
+ 1 file changed, 30 insertions(+) |
31 |
+ |
32 |
+diff --git a/uim/openssl.c b/uim/openssl.c |
33 |
+index ba1b238..35ca1ca 100644 |
34 |
+--- a/uim/openssl.c |
35 |
++++ b/uim/openssl.c |
36 |
+@@ -208,34 +208,64 @@ c_SSL_write(uim_lisp s_, uim_lisp buf_) |
37 |
+ static uim_lisp |
38 |
+ c_SSLv2_method(void) |
39 |
+ { |
40 |
++#ifndef OPENSSL_NO_SSL2 |
41 |
+ return MAKE_PTR(SSLv2_method()); |
42 |
++#else |
43 |
++ uim_notify_fatal(N_("uim-openssl: SSLv2_method() is not supported on this system")); |
44 |
++ return uim_scm_f(); |
45 |
++#endif |
46 |
+ } |
47 |
+ static uim_lisp |
48 |
+ c_SSLv2_server_method(void) |
49 |
+ { |
50 |
++#ifndef OPENSSL_NO_SSL2 |
51 |
+ return MAKE_PTR(SSLv2_server_method()); |
52 |
++#else |
53 |
++ uim_notify_fatal(N_("uim-openssl: SSLv2_server_method() is not supported on this system")); |
54 |
++ return uim_scm_f(); |
55 |
++#endif |
56 |
+ } |
57 |
+ static uim_lisp |
58 |
+ c_SSLv2_client_method(void) |
59 |
+ { |
60 |
++#ifndef OPENSSL_NO_SSL2 |
61 |
+ return MAKE_PTR(SSLv2_client_method()); |
62 |
++#else |
63 |
++ uim_notify_fatal(N_("uim-openssl: SSLv2_client_method() is not supported on this system")); |
64 |
++ return uim_scm_f(); |
65 |
++#endif |
66 |
+ } |
67 |
+ |
68 |
+ /* SSLv3 */ |
69 |
+ static uim_lisp |
70 |
+ c_SSLv3_method(void) |
71 |
+ { |
72 |
++#ifndef OPENSSL_NO_SSL3 |
73 |
+ return MAKE_PTR(SSLv3_method()); |
74 |
++#else |
75 |
++ uim_notify_fatal(N_("uim-openssl: SSLv3_method() is not supported on this system")); |
76 |
++ return uim_scm_f(); |
77 |
++#endif |
78 |
+ } |
79 |
+ static uim_lisp |
80 |
+ c_SSLv3_server_method(void) |
81 |
+ { |
82 |
++#ifndef OPENSSL_NO_SSL3 |
83 |
+ return MAKE_PTR(SSLv3_server_method()); |
84 |
++#else |
85 |
++ uim_notify_fatal(N_("uim-openssl: SSLv3_server_method() is not supported on this system")); |
86 |
++ return uim_scm_f(); |
87 |
++#endif |
88 |
+ } |
89 |
+ static uim_lisp |
90 |
+ c_SSLv3_client_method(void) |
91 |
+ { |
92 |
++#ifndef OPENSSL_NO_SSL3 |
93 |
+ return MAKE_PTR(SSLv3_client_method()); |
94 |
++#else |
95 |
++ uim_notify_fatal(N_("uim-openssl: SSLv3_client_method() is not supported on this system")); |
96 |
++ return uim_scm_f(); |
97 |
++#endif |
98 |
+ } |
99 |
+ |
100 |
+ /* SSLv3 but can rollback to v2 */ |
101 |
|
102 |
diff --git a/app-i18n/uim/uim-1.8.6-r2.ebuild b/app-i18n/uim/uim-1.8.6-r2.ebuild |
103 |
new file mode 100644 |
104 |
index 0000000..5b04cfd |
105 |
--- /dev/null |
106 |
+++ b/app-i18n/uim/uim-1.8.6-r2.ebuild |
107 |
@@ -0,0 +1,228 @@ |
108 |
+# Copyright 1999-2016 Gentoo Foundation |
109 |
+# Distributed under the terms of the GNU General Public License v2 |
110 |
+# $Id$ |
111 |
+ |
112 |
+EAPI="5" |
113 |
+inherit autotools eutils multilib elisp-common gnome2-utils |
114 |
+ |
115 |
+DESCRIPTION="Simple, secure and flexible input method library" |
116 |
+HOMEPAGE="https://github.com/uim/uim/" |
117 |
+SRC_URI="https://uim.googlecode.com/files/${P}.tar.bz2" |
118 |
+ |
119 |
+LICENSE="BSD GPL-2 LGPL-2.1" |
120 |
+SLOT="0" |
121 |
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" |
122 |
+IUSE="+anthy canna curl eb emacs expat libffi gtk gtk3 kde libedit libnotify libressl m17n-lib ncurses nls qt4 skk sqlite ssl static-libs test unicode X xft l10n_ja l10n_ko l10n_zh-CN l10n_zh-TW" |
123 |
+ |
124 |
+RESTRICT="test" |
125 |
+ |
126 |
+REQUIRED_USE="gtk? ( X ) qt4? ( X )" |
127 |
+ |
128 |
+RDEPEND="X? ( |
129 |
+ x11-libs/libX11 |
130 |
+ x11-libs/libXft |
131 |
+ x11-libs/libXt |
132 |
+ x11-libs/libICE |
133 |
+ x11-libs/libSM |
134 |
+ x11-libs/libXext |
135 |
+ x11-libs/libXrender |
136 |
+ ) |
137 |
+ anthy? ( |
138 |
+ unicode? ( >=app-i18n/anthy-8622 ) |
139 |
+ !unicode? ( app-i18n/anthy ) |
140 |
+ ) |
141 |
+ canna? ( app-i18n/canna ) |
142 |
+ curl? ( >=net-misc/curl-7.16.4 ) |
143 |
+ eb? ( dev-libs/eb ) |
144 |
+ emacs? ( virtual/emacs ) |
145 |
+ expat? ( dev-libs/expat ) |
146 |
+ libffi? ( virtual/libffi ) |
147 |
+ gtk? ( >=x11-libs/gtk+-2.4:2 ) |
148 |
+ gtk3? ( x11-libs/gtk+:3 ) |
149 |
+ kde? ( >=kde-base/kdelibs-4 ) |
150 |
+ libedit? ( dev-libs/libedit ) |
151 |
+ libnotify? ( >=x11-libs/libnotify-0.4 ) |
152 |
+ m17n-lib? ( >=dev-libs/m17n-lib-1.3.1 ) |
153 |
+ ncurses? ( sys-libs/ncurses:0= ) |
154 |
+ nls? ( virtual/libintl ) |
155 |
+ qt4? ( dev-qt/qtgui:4[qt3support] ) |
156 |
+ skk? ( app-i18n/skk-jisyo ) |
157 |
+ sqlite? ( dev-db/sqlite:3 ) |
158 |
+ ssl? ( |
159 |
+ !libressl? ( dev-libs/openssl:0= ) |
160 |
+ libressl? ( dev-libs/libressl:0= ) |
161 |
+ ) |
162 |
+ !dev-scheme/sigscheme" |
163 |
+# scim? ( >=app-i18n/scim-1.3.0 ) # broken |
164 |
+# wnn? ( app-i18n/wnn ) |
165 |
+ |
166 |
+DEPEND="${RDEPEND} |
167 |
+ dev-util/intltool |
168 |
+ virtual/pkgconfig |
169 |
+ >=sys-devel/gettext-0.15 |
170 |
+ kde? ( dev-util/cmake ) |
171 |
+ X? ( |
172 |
+ x11-proto/xextproto |
173 |
+ x11-proto/xproto |
174 |
+ )" |
175 |
+ |
176 |
+RDEPEND="${RDEPEND} |
177 |
+ X? ( |
178 |
+ media-fonts/font-sony-misc |
179 |
+ l10n_ja? ( || ( media-fonts/font-jis-misc media-fonts/intlfonts ) ) |
180 |
+ l10n_ko? ( || ( media-fonts/font-daewoo-misc media-fonts/intlfonts ) ) |
181 |
+ l10n_zh-CN? ( || ( media-fonts/font-isas-misc media-fonts/intlfonts ) ) |
182 |
+ l10n_zh-TW? ( media-fonts/intlfonts ) |
183 |
+ )" |
184 |
+# test? ( dev-scheme/gauche ) |
185 |
+ |
186 |
+SITEFILE=50${PN}-gentoo.el |
187 |
+ |
188 |
+pkg_setup() { |
189 |
+ strip-linguas fr ja ko |
190 |
+ if [[ -z "${LINGUAS}" ]]; then |
191 |
+ # no linguas set, using the default one |
192 |
+ LINGUAS=" " |
193 |
+ fi |
194 |
+} |
195 |
+ |
196 |
+src_prepare() { |
197 |
+ epatch \ |
198 |
+ "${FILESDIR}"/${PN}-1.6.0-gentoo.patch \ |
199 |
+ "${FILESDIR}"/${PN}-1.5.4-zhTW.patch \ |
200 |
+ "${FILESDIR}"/${P}-libressl.patch |
201 |
+ |
202 |
+ # bug 275420 |
203 |
+ sed -i -e "s:\$libedit_path/lib:/$(get_libdir):g" configure.ac || die "sed failed!" |
204 |
+ |
205 |
+ AT_NO_RECURSIVE=1 eautoreconf |
206 |
+} |
207 |
+ |
208 |
+src_configure() { |
209 |
+ local myconf |
210 |
+ |
211 |
+ if (use gtk || use gtk3) && (use anthy || use canna) ; then |
212 |
+ myconf="${myconf} --enable-dict" |
213 |
+ else |
214 |
+ myconf="${myconf} --disable-dict" |
215 |
+ fi |
216 |
+ |
217 |
+ if use gtk || use gtk3 || use qt4 ; then |
218 |
+ myconf="${myconf} --enable-pref" |
219 |
+ else |
220 |
+ myconf="${myconf} --disable-pref" |
221 |
+ fi |
222 |
+ |
223 |
+ if use anthy ; then |
224 |
+ if use unicode ; then |
225 |
+ myconf="${myconf} --with-anthy-utf8" |
226 |
+ else |
227 |
+ myconf="${myconf} --with-anthy" |
228 |
+ fi |
229 |
+ else |
230 |
+ myconf="${myconf} --without-anthy" |
231 |
+ fi |
232 |
+ |
233 |
+ if use libnotify ; then |
234 |
+ myconf="${myconf} --enable-notify=libnotify" |
235 |
+ fi |
236 |
+ |
237 |
+ econf $(use_with X x) \ |
238 |
+ $(use_with canna) \ |
239 |
+ $(use_with curl) \ |
240 |
+ $(use_with eb) \ |
241 |
+ $(use_enable emacs) \ |
242 |
+ $(use_with emacs lispdir "${SITELISP}") \ |
243 |
+ $(use_with expat) \ |
244 |
+ $(use_with libffi ffi) \ |
245 |
+ --disable-gnome-applet \ |
246 |
+ $(use_with gtk gtk2) \ |
247 |
+ $(use_with gtk3) \ |
248 |
+ $(use_with libedit) \ |
249 |
+ --disable-kde-applet \ |
250 |
+ $(use_enable kde kde4-applet) \ |
251 |
+ $(use_with m17n-lib m17nlib) \ |
252 |
+ $(use_enable ncurses fep) \ |
253 |
+ $(use_enable nls) \ |
254 |
+ --without-qt \ |
255 |
+ --without-qt-immodule \ |
256 |
+ $(use_with qt4 qt4) \ |
257 |
+ $(use_with qt4 qt4-immodule) \ |
258 |
+ $(use_enable qt4 qt4-qt3support) \ |
259 |
+ $(use_with skk) \ |
260 |
+ $(use_with sqlite sqlite3) \ |
261 |
+ $(use_enable ssl openssl) \ |
262 |
+ $(use_enable static-libs static) \ |
263 |
+ $(use_with xft) \ |
264 |
+ ${myconf} |
265 |
+} |
266 |
+ |
267 |
+src_compile() { |
268 |
+ default |
269 |
+ |
270 |
+ if use emacs; then |
271 |
+ cd emacs |
272 |
+ elisp-compile *.el || die "elisp-compile failed!" |
273 |
+ fi |
274 |
+} |
275 |
+ |
276 |
+src_install() { |
277 |
+ # parallel make install b0rked, bug #222677 |
278 |
+ emake -j1 INSTALL_ROOT="${D}" DESTDIR="${D}" install |
279 |
+ |
280 |
+ dodoc AUTHORS ChangeLog* NEWS README RELNOTE |
281 |
+ if use emacs; then |
282 |
+ elisp-install uim-el emacs/*.elc || die "elisp-install failed!" |
283 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" uim-el \ |
284 |
+ || die "elisp-site-file-install failed!" |
285 |
+ fi |
286 |
+ |
287 |
+ find "${ED}/usr/$(get_libdir)/uim" -name '*.la' -exec rm {} + |
288 |
+ use static-libs || find "${ED}" -name '*.la' -exec rm {} + |
289 |
+ |
290 |
+ sed -e "s:@EPREFIX@:${EPREFIX}:" "${FILESDIR}/xinput-uim" > "${T}/uim.conf" || die "sed failed!" |
291 |
+ insinto /etc/X11/xinit/xinput.d |
292 |
+ doins "${T}/uim.conf" |
293 |
+ |
294 |
+ # collision with dev-scheme/sigscheme, bug #330975 |
295 |
+ # find "${ED}" -name '*gcroots*' -delete || die |
296 |
+ |
297 |
+ #rmdir "${ED}"/usr/share/doc/sigscheme || die |
298 |
+} |
299 |
+ |
300 |
+pkg_postinst() { |
301 |
+ elog |
302 |
+ elog "New input method switcher has been introduced. You need to set" |
303 |
+ elog |
304 |
+ elog "% GTK_IM_MODULE=uim ; export GTK_IM_MODULE" |
305 |
+ elog "% QT_IM_MODULE=uim ; export QT_IM_MODULE" |
306 |
+ elog "% XMODIFIERS=@im=uim ; export XMODIFIERS" |
307 |
+ elog |
308 |
+ elog "If you would like to use uim-anthy as default input method, put" |
309 |
+ elog "(define default-im-name 'anthy)" |
310 |
+ elog "to your ~/.uim." |
311 |
+ elog |
312 |
+ elog "All input methods can be found by running uim-im-switcher-gtk, " |
313 |
+ elog "uim-im-switcher-gtk3 or uim-im-switcher-qt4." |
314 |
+ elog |
315 |
+ elog "If you upgrade from a version of uim older than 1.4.0," |
316 |
+ elog "you should run revdep-rebuild." |
317 |
+ |
318 |
+ use gtk && gnome2_query_immodules_gtk2 |
319 |
+ use gtk3 && gnome2_query_immodules_gtk3 |
320 |
+ if use emacs; then |
321 |
+ elisp-site-regen |
322 |
+ echo |
323 |
+ elog "uim is autoloaded with Emacs with a minimal set of features:" |
324 |
+ elog "There is no keybinding defined to call it directly, so please" |
325 |
+ elog "create one yourself and choose an input method." |
326 |
+ elog "Integration with LEIM is not done with this ebuild, please have" |
327 |
+ elog "a look at the documentation how to achieve this." |
328 |
+ fi |
329 |
+} |
330 |
+ |
331 |
+pkg_postrm() { |
332 |
+ use gtk && gnome2_query_immodules_gtk2 |
333 |
+ use gtk3 && gnome2_query_immodules_gtk3 |
334 |
+ use emacs && elisp-site-regen |
335 |
+} |