1 |
commit: b091d8d409c0b0b96f344c5c07e3c37c2288e1cf |
2 |
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 8 08:46:49 2017 +0000 |
4 |
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 8 08:46:49 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b091d8d4 |
7 |
|
8 |
app-i18n/canna: add canuum USE flag |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
11 |
|
12 |
app-i18n/canna/canna-3.7_p3-r3.ebuild | 151 ++++++++++++++++++++++++++++++++ |
13 |
app-i18n/canna/files/canna-canuum.patch | 21 +++++ |
14 |
app-i18n/canna/metadata.xml | 3 + |
15 |
3 files changed, 175 insertions(+) |
16 |
|
17 |
diff --git a/app-i18n/canna/canna-3.7_p3-r3.ebuild b/app-i18n/canna/canna-3.7_p3-r3.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..c4ac85c584a |
20 |
--- /dev/null |
21 |
+++ b/app-i18n/canna/canna-3.7_p3-r3.ebuild |
22 |
@@ -0,0 +1,151 @@ |
23 |
+# Copyright 1999-2017 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI="6" |
27 |
+ |
28 |
+inherit cannadic toolchain-funcs |
29 |
+ |
30 |
+MY_P="Canna${PV//[._]/}" |
31 |
+ |
32 |
+DESCRIPTION="A client-server based Kana-Kanji conversion system" |
33 |
+HOMEPAGE="http://canna.osdn.jp/" |
34 |
+SRC_URI="mirror://sourceforge.jp/canna/9565/${MY_P}.tar.bz2" |
35 |
+ |
36 |
+LICENSE="MIT GPL-2" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~alpha ~amd64 ~ppc ~x86" |
39 |
+IUSE="canuum doc ipv6" |
40 |
+ |
41 |
+DEPEND="x11-misc/gccmakedep |
42 |
+ x11-misc/imake |
43 |
+ canuum? ( |
44 |
+ dev-libs/libspt |
45 |
+ sys-libs/ncurses |
46 |
+ virtual/pkgconfig |
47 |
+ ) |
48 |
+ doc? ( |
49 |
+ app-text/ghostscript-gpl |
50 |
+ dev-texlive/texlive-langjapanese |
51 |
+ dev-texlive/texlive-latexrecommended |
52 |
+ )" |
53 |
+RDEPEND="" |
54 |
+S="${WORKDIR}/${MY_P}" |
55 |
+ |
56 |
+PATCHES=( |
57 |
+ "${FILESDIR}"/${PN}-gentoo.patch |
58 |
+ "${FILESDIR}"/${PN}-canuum.patch |
59 |
+ "${FILESDIR}"/${PN}-kpdef.patch |
60 |
+ "${FILESDIR}"/${PN}-posix-sort.patch |
61 |
+) |
62 |
+DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*" |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ default |
66 |
+ |
67 |
+ sed -i \ |
68 |
+ -e "/DefLibCannaDir/s:/lib$:/$(get_libdir):" \ |
69 |
+ -e "/UseInet6/s:0:$(usex ipv6 1 0):" \ |
70 |
+ Canna.conf |
71 |
+ |
72 |
+ if use canuum; then |
73 |
+ cd canuum |
74 |
+ mv configure.{in,ac} |
75 |
+ eautoreconf |
76 |
+ cd - > /dev/null |
77 |
+ fi |
78 |
+} |
79 |
+ |
80 |
+src_configure() { |
81 |
+ xmkmf -a || die |
82 |
+ |
83 |
+ if use canuum; then |
84 |
+ cd canuum |
85 |
+ xmkmf -a || die |
86 |
+ # workaround for sys-libs/ncurses[tinfo] |
87 |
+ sed -i "/^TERMCAP_LIB/s:=.*:=$(pkg-config --libs ncurses):" Makefile |
88 |
+ cd - > /dev/null |
89 |
+ fi |
90 |
+ |
91 |
+ if use doc; then |
92 |
+ cd doc/man/guide/tex |
93 |
+ xmkmf -a || die |
94 |
+ cd - > /dev/null |
95 |
+ fi |
96 |
+} |
97 |
+ |
98 |
+src_compile() { |
99 |
+ # bug #279706 |
100 |
+ emake -j1 \ |
101 |
+ CC="$(tc-getCC)" \ |
102 |
+ CDEBUGFLAGS="${CFLAGS}" \ |
103 |
+ LOCAL_LDFLAGS="${LDFLAGS}" \ |
104 |
+ SHLIBGLOBALSFLAGS="${LDFLAGS}" \ |
105 |
+ ${PN} |
106 |
+ |
107 |
+ if use canuum; then |
108 |
+ einfo "Compiling canuum" |
109 |
+ emake -C canuum -j1 \ |
110 |
+ CC="$(tc-getCC)" \ |
111 |
+ CDEBUGFLAGS="${CFLAGS}" \ |
112 |
+ LOCAL_LDFLAGS="${LDFLAGS}" \ |
113 |
+ canuum |
114 |
+ fi |
115 |
+ |
116 |
+ if use doc; then |
117 |
+ # NOTE: build fails if infinality enabled in fontconfig |
118 |
+ einfo "Compiling DVI, PS, and PDF documents" |
119 |
+ # bug #223077 |
120 |
+ emake -C doc/man/guide/tex -j1 \ |
121 |
+ JLATEXCMD="platex -kanji=euc" \ |
122 |
+ DVI2PSCMD="dvips" \ |
123 |
+ VARTEXFONTS="${T}"/fonts \ |
124 |
+ ${PN}.ps \ |
125 |
+ ${PN}.pdf |
126 |
+ fi |
127 |
+} |
128 |
+ |
129 |
+src_install() { |
130 |
+ emake DESTDIR="${D}" install install.man |
131 |
+ einstalldocs |
132 |
+ |
133 |
+ if use canuum; then |
134 |
+ emake -C canuum DESTDIR="${D}" install install.man |
135 |
+ docinto canuum |
136 |
+ dodoc README.jp |
137 |
+ fi |
138 |
+ |
139 |
+ if use doc; then |
140 |
+ insinto /usr/share/doc/${PF} |
141 |
+ doins doc/man/guide/tex/${PN}.{dvi,ps,pdf} |
142 |
+ fi |
143 |
+ |
144 |
+ # for backward compatibility |
145 |
+ dosbin "${FILESDIR}"/update-canna-dics_dir |
146 |
+ |
147 |
+ keepdir /var/lib/${PN}/dic/{user,group} |
148 |
+ fowners bin:bin /var/lib/${PN}/dic/{user,group} |
149 |
+ fperms 0775 /var/lib/${PN}/dic/{user,group} |
150 |
+ |
151 |
+ insinto /var/lib/${PN}/dic/dics.d |
152 |
+ newins "${ED}"/var/lib/${PN}/dic/${PN}/dics.dir 00${PN}.dics.dir |
153 |
+ |
154 |
+ keepdir /var/log/${PN} |
155 |
+ |
156 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
157 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
158 |
+ |
159 |
+ insinto /etc |
160 |
+ newins "${FILESDIR}"/${PN}.hosts hosts.${PN} |
161 |
+} |
162 |
+ |
163 |
+pkg_postinst() { |
164 |
+ update-cannadic-dir |
165 |
+ |
166 |
+ if ! locale -a | grep -iq "ja_JP.eucjp"; then |
167 |
+ elog "Some dictionary tools in this package require ja_JP.EUC-JP locale." |
168 |
+ elog |
169 |
+ elog "# echo 'ja_JP.EUC-JP EUC-JP' >> /etc/locale.gen" |
170 |
+ elog "# locale-gen" |
171 |
+ elog |
172 |
+ fi |
173 |
+} |
174 |
|
175 |
diff --git a/app-i18n/canna/files/canna-canuum.patch b/app-i18n/canna/files/canna-canuum.patch |
176 |
new file mode 100644 |
177 |
index 00000000000..87866789c7c |
178 |
--- /dev/null |
179 |
+++ b/app-i18n/canna/files/canna-canuum.patch |
180 |
@@ -0,0 +1,21 @@ |
181 |
+--- a/canuum/configure.in |
182 |
++++ b/canuum/configure.in |
183 |
+@@ -401,7 +401,7 @@ |
184 |
+ dnl |
185 |
+ olibs="$LIBS" |
186 |
+ AC_MSG_CHECKING(--with-term-libs argument) |
187 |
+-AC_ARG_WITH(tlib, |
188 |
++AC_ARG_WITH(term-libs, |
189 |
+ [ --with-term-libs=-lLIB terminal library to be used ],) |
190 |
+ if test -n "$with_term_libs"; then |
191 |
+ AC_MSG_RESULT($with_term_libs) |
192 |
+--- a/canuum/wnn_os.h |
193 |
++++ b/canuum/wnn_os.h |
194 |
+@@ -41,6 +41,7 @@ |
195 |
+ #include <signal.h> |
196 |
+ #if STDC_HEADERS |
197 |
+ # include <stdlib.h> |
198 |
++# include <string.h> |
199 |
+ # include <limits.h> |
200 |
+ #endif /* STDC_HEADERS */ |
201 |
+ |
202 |
|
203 |
diff --git a/app-i18n/canna/metadata.xml b/app-i18n/canna/metadata.xml |
204 |
index 68869af5812..af8866b3beb 100644 |
205 |
--- a/app-i18n/canna/metadata.xml |
206 |
+++ b/app-i18n/canna/metadata.xml |
207 |
@@ -5,6 +5,9 @@ |
208 |
<email>cjk@g.o</email> |
209 |
<name>Cjk</name> |
210 |
</maintainer> |
211 |
+ <use> |
212 |
+ <flag name="canuum">Build canuum</flag> |
213 |
+ </use> |
214 |
<upstream> |
215 |
<remote-id type="sourceforge-jp">canna</remote-id> |
216 |
</upstream> |