Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/uim/, app-i18n/uim/files/
Date: Sat, 14 May 2022 02:32:31
Message-Id: 1652495526.d5901bd14f66b550782cfa755da29d2755369f70.sam@gentoo
1 commit: d5901bd14f66b550782cfa755da29d2755369f70
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sat Apr 2 07:33:21 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat May 14 02:32:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5901bd1
7
8 app-i18n/uim: remove wrong Wconversion substitution
9
10 Closes: https://bugs.gentoo.org/836623
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/24859
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 ....9_pre20210103-remove-Wconversion-replace.patch | 13 ++
16 app-i18n/uim/uim-1.8.9_pre20210103-r1.ebuild | 247 +++++++++++++++++++++
17 2 files changed, 260 insertions(+)
18
19 diff --git a/app-i18n/uim/files/uim-1.8.9_pre20210103-remove-Wconversion-replace.patch b/app-i18n/uim/files/uim-1.8.9_pre20210103-remove-Wconversion-replace.patch
20 new file mode 100644
21 index 000000000000..d90433b414bf
22 --- /dev/null
23 +++ b/app-i18n/uim/files/uim-1.8.9_pre20210103-remove-Wconversion-replace.patch
24 @@ -0,0 +1,13 @@
25 +--- a/qt4/common.pro.in
26 ++++ b/qt4/common.pro.in
27 +@@ -20,10 +20,6 @@
28 + QMAKE_CXX = @CXX@
29 + QMAKE_CXXFLAGS_DEBUG += @CXXFLAGS@ @CPPFLAGS@ @X_CFLAGS@
30 + QMAKE_CXXFLAGS_RELEASE += @CXXFLAGS@ @CPPFLAGS@ @X_CFLAGS@
31 +-# Remove "-Wconversion" from CXXFLAGS to avoid lots of warnings
32 +-# from Qt4 header files
33 +-QMAKE_CXXFLAGS_DEBUG = $$replace(QMAKE_CXXFLAGS_DEBUG, "-Wconversion", "")
34 +-QMAKE_CXXFLAGS_RELEASE = $$replace(QMAKE_CXXFLAGS_RELEASE, "-Wconversion", "")
35 + QMAKE_LINK = @CXX@
36 + QMAKE_LFLAGS = @LDFLAGS@
37 + QMAKE_STRIP =
38
39 diff --git a/app-i18n/uim/uim-1.8.9_pre20210103-r1.ebuild b/app-i18n/uim/uim-1.8.9_pre20210103-r1.ebuild
40 new file mode 100644
41 index 000000000000..1b0b34a88f5b
42 --- /dev/null
43 +++ b/app-i18n/uim/uim-1.8.9_pre20210103-r1.ebuild
44 @@ -0,0 +1,247 @@
45 +# Copyright 1999-2022 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI="7"
49 +
50 +inherit autotools elisp-common flag-o-matic gnome2-utils qmake-utils vcs-snapshot
51 +
52 +EGIT_COMMIT="d1ac9d9315ff8c57c713b502544fef9b3a83b3e5"
53 +SIG_PV="0.9.1"
54 +
55 +DESCRIPTION="A multilingual input method framework"
56 +HOMEPAGE="https://github.com/uim/uim"
57 +SRC_URI="https://github.com/${PN}/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
58 + https://github.com/${PN}/sigscheme/releases/download/${SIG_PV}/sigscheme-${SIG_PV}.tar.bz2"
59 +
60 +LICENSE="BSD GPL-2 LGPL-2.1"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~riscv ~x86"
63 +IUSE="X +anthy curl eb emacs expat libffi gtk gtk2 kde l10n_ja l10n_ko l10n_zh-CN l10n_zh-TW libedit libnotify m17n-lib ncurses nls qt5 skk sqlite ssl static-libs xft"
64 +RESTRICT="test"
65 +REQUIRED_USE="gtk? ( X )
66 + gtk2? ( X )
67 + qt5? ( X )
68 + xft? ( X )"
69 +
70 +CDEPEND="X? (
71 + x11-libs/libICE
72 + x11-libs/libSM
73 + x11-libs/libX11
74 + x11-libs/libXext
75 + x11-libs/libXft
76 + x11-libs/libXrender
77 + x11-libs/libXt
78 + )
79 + anthy? ( app-i18n/anthy )
80 + curl? ( net-misc/curl )
81 + eb? ( dev-libs/eb )
82 + emacs? ( >=app-editors/emacs-23.1:* )
83 + expat? ( dev-libs/expat )
84 + gtk? ( x11-libs/gtk+:3 )
85 + gtk2? ( x11-libs/gtk+:2 )
86 + kde? ( kde-frameworks/plasma:5 )
87 + libedit? ( dev-libs/libedit )
88 + libffi? ( dev-libs/libffi:= )
89 + libnotify? ( x11-libs/libnotify )
90 + m17n-lib? ( dev-libs/m17n-lib )
91 + ncurses? ( sys-libs/ncurses:0= )
92 + nls? ( virtual/libintl )
93 + qt5? ( dev-qt/qtx11extras:5 )
94 + skk? ( app-i18n/skk-jisyo )
95 + sqlite? ( dev-db/sqlite:3 )
96 + ssl? ( dev-libs/openssl:0= )"
97 +DEPEND="${CDEPEND}
98 + X? ( x11-base/xorg-proto )"
99 +RDEPEND="${CDEPEND}
100 + !dev-scheme/sigscheme
101 + X? (
102 + media-fonts/font-sony-misc
103 + l10n_ja? (
104 + || (
105 + media-fonts/font-jis-misc
106 + media-fonts/intlfonts
107 + )
108 + )
109 + l10n_ko? (
110 + || (
111 + media-fonts/font-daewoo-misc
112 + media-fonts/intlfonts
113 + )
114 + )
115 + l10n_zh-CN? (
116 + || (
117 + media-fonts/font-isas-misc
118 + media-fonts/intlfonts
119 + )
120 + )
121 + l10n_zh-TW? ( media-fonts/intlfonts )
122 + )"
123 +BDEPEND="dev-util/intltool
124 + gnome-base/librsvg
125 + sys-devel/gettext
126 + virtual/pkgconfig
127 + kde? ( dev-util/cmake )"
128 +
129 +PATCHES=(
130 + "${FILESDIR}"/${PN}-gentoo.patch
131 + "${FILESDIR}"/${PN}-kde.patch
132 + "${FILESDIR}"/${PN}-slibtool.patch
133 + "${FILESDIR}"/${PN}-tinfo.patch
134 + "${FILESDIR}"/${PN}-xkb.patch
135 + "${FILESDIR}"/${PN}-zh-TW.patch
136 + "${FILESDIR}"/${P}-remove-Wconversion-replace.patch
137 +)
138 +DOCS=( AUTHORS NEWS README RELNOTE doc )
139 +
140 +AT_NO_RECURSIVE="yes"
141 +SITEFILE="50${PN}-gentoo.el"
142 +
143 +src_unpack() {
144 + vcs-snapshot_src_unpack
145 + rmdir "${S}"/sigscheme || die
146 + mv "${WORKDIR}"/sigscheme-${SIG_PV} "${S}"/sigscheme || die
147 +}
148 +
149 +src_prepare() {
150 + default
151 + sed -i "s:\$libedit_path/lib:/$(get_libdir):g" configure.ac
152 + # fix build with >=dev-scheme/chicken-4, bug #656852
153 + touch scm/json-parser-expanded.scm
154 + # fix build with "-march=pentium4 -O2", bug #661806
155 + use x86 && append-cflags $(test-flags-CC -fno-inline-small-functions)
156 +
157 + eautoreconf
158 +}
159 +
160 +src_configure() {
161 + local myconf=(
162 + $(use_with X x)
163 + $(use_with anthy anthy-utf8)
164 + $(use_with curl)
165 + $(use_with eb)
166 + $(use_enable emacs)
167 + $(use_with emacs lispdir "${SITELISP}")
168 + $(use_with expat)
169 + $(use_enable kde kde5-applet)
170 + $(use_with libedit)
171 + $(use_with libffi ffi)
172 + $(use_with gtk gtk3)
173 + $(use_with gtk2)
174 + $(use_with m17n-lib m17nlib)
175 + $(use_enable ncurses fep)
176 + $(use_enable nls)
177 + $(use_with qt5)
178 + $(use_with qt5 qt5-immodule)
179 + _QMAKE5=$(qt5_get_bindir)/qmake
180 + $(use_with skk)
181 + $(use_with sqlite sqlite3)
182 + $(use_enable ssl openssl)
183 + $(use_enable static-libs static)
184 + $(use_with xft)
185 + --without-anthy
186 + --without-canna
187 + --enable-default-toolkit=$(usex gtk gtk3 $(usex gtk2 gtk $(usex qt5 qt5)))
188 + --disable-gnome-applet
189 + --disable-gnome3-applet
190 + --disable-kde-applet
191 + --disable-kde4-applet
192 + --without-mana
193 + --enable-maintainer-mode
194 + --without-prime
195 + --disable-qt4-qt3support
196 + )
197 +
198 + if (use gtk || use gtk2) && use anthy; then
199 + myconf+=( --enable-dict )
200 + else
201 + myconf+=( --disable-dict )
202 + fi
203 +
204 + if use libnotify; then
205 + myconf+=( --enable-notify=libnotify )
206 + fi
207 +
208 + if use gtk || use gtk2 || use qt5; then
209 + myconf+=( --enable-pref )
210 + else
211 + myconf+=( --disable-pref )
212 + fi
213 +
214 + econf "${myconf[@]}"
215 +}
216 +
217 +src_compile() {
218 + default
219 +
220 + if use emacs; then
221 + cd emacs || die
222 + elisp-compile *.el || die
223 + cd - >/dev/null || die
224 + fi
225 +}
226 +
227 +src_install() {
228 + # bug #222677
229 + emake -j1 DESTDIR="${D}" install
230 + rm -f doc/Makefile*
231 + einstalldocs
232 +
233 + find "${ED}"/usr/$(get_libdir)/${PN} -name '*.la' -delete || die
234 + use static-libs || find "${ED}" -name '*.la' -delete || die
235 +
236 + insinto /etc/X11/xinit/xinput.d
237 + sed \
238 + -e "s:@EPREFIX@:${EPREFIX}:g" \
239 + "${FILESDIR}"/xinput-${PN} > "${T}"/${PN}.conf
240 + doins "${T}"/${PN}.conf
241 +
242 + if use X; then
243 + docinto xim
244 + dodoc xim/README*
245 + fi
246 +
247 + if use emacs; then
248 + elisp-install ${PN}-el emacs/*.el{,c}
249 + elisp-site-file-install "${FILESDIR}"/${SITEFILE} ${PN}-el
250 + docinto emacs
251 + dodoc emacs/README*
252 + fi
253 +
254 + if use ncurses; then
255 + docinto fep
256 + dodoc fep/README*
257 + fi
258 +}
259 +
260 +pkg_postinst() {
261 + elog "New input method switcher has been introduced. You need to set"
262 + elog
263 + elog "% GTK_IM_MODULE=uim ; export GTK_IM_MODULE"
264 + elog "% QT_IM_MODULE=uim ; export QT_IM_MODULE"
265 + elog "% XMODIFIERS=@im=uim ; export XMODIFIERS"
266 + elog
267 + elog "If you would like to use uim-anthy as default input method, put"
268 + elog "(define default-im-name 'anthy)"
269 + elog "to your ~/.uim."
270 + elog
271 + elog "All input methods can be found by running uim-im-switcher-gtk, "
272 + elog "uim-im-switcher-gtk3 or uim-im-switcher-qt5."
273 +
274 + if use emacs; then
275 + elisp-site-regen
276 + elog
277 + elog "uim is autoloaded with Emacs with a minimal set of features:"
278 + elog "There is no keybinding defined to call it directly, so please"
279 + elog "create one yourself and choose an input method."
280 + elog "Integration with LEIM is not done with this ebuild, please have"
281 + elog "a look at the documentation how to achieve this."
282 + fi
283 + use gtk && gnome2_query_immodules_gtk3
284 + use gtk2 && gnome2_query_immodules_gtk2
285 +}
286 +
287 +pkg_postrm() {
288 + use emacs && elisp-site-regen
289 + use gtk && gnome2_query_immodules_gtk3
290 + use gtk2 && gnome2_query_immodules_gtk2
291 +}