diff options
author | Akinori Hattori <hattya@gentoo.org> | 2017-07-08 17:46:49 +0900 |
---|---|---|
committer | Akinori Hattori <hattya@gentoo.org> | 2017-07-08 17:46:49 +0900 |
commit | b091d8d409c0b0b96f344c5c07e3c37c2288e1cf (patch) | |
tree | 2cae442bacad3f9a82c33152f7ddcb1a73833070 /app-i18n | |
parent | dev-libs/libspt: add suid USE flag (diff) | |
download | gentoo-b091d8d409c0b0b96f344c5c07e3c37c2288e1cf.tar.gz gentoo-b091d8d409c0b0b96f344c5c07e3c37c2288e1cf.tar.bz2 gentoo-b091d8d409c0b0b96f344c5c07e3c37c2288e1cf.zip |
app-i18n/canna: add canuum USE flag
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'app-i18n')
-rw-r--r-- | app-i18n/canna/canna-3.7_p3-r3.ebuild | 151 | ||||
-rw-r--r-- | app-i18n/canna/files/canna-canuum.patch | 21 | ||||
-rw-r--r-- | app-i18n/canna/metadata.xml | 3 |
3 files changed, 175 insertions, 0 deletions
diff --git a/app-i18n/canna/canna-3.7_p3-r3.ebuild b/app-i18n/canna/canna-3.7_p3-r3.ebuild new file mode 100644 index 000000000000..c4ac85c584a5 --- /dev/null +++ b/app-i18n/canna/canna-3.7_p3-r3.ebuild @@ -0,0 +1,151 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit cannadic toolchain-funcs + +MY_P="Canna${PV//[._]/}" + +DESCRIPTION="A client-server based Kana-Kanji conversion system" +HOMEPAGE="http://canna.osdn.jp/" +SRC_URI="mirror://sourceforge.jp/canna/9565/${MY_P}.tar.bz2" + +LICENSE="MIT GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~x86" +IUSE="canuum doc ipv6" + +DEPEND="x11-misc/gccmakedep + x11-misc/imake + canuum? ( + dev-libs/libspt + sys-libs/ncurses + virtual/pkgconfig + ) + doc? ( + app-text/ghostscript-gpl + dev-texlive/texlive-langjapanese + dev-texlive/texlive-latexrecommended + )" +RDEPEND="" +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-gentoo.patch + "${FILESDIR}"/${PN}-canuum.patch + "${FILESDIR}"/${PN}-kpdef.patch + "${FILESDIR}"/${PN}-posix-sort.patch +) +DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*" + +src_prepare() { + default + + sed -i \ + -e "/DefLibCannaDir/s:/lib$:/$(get_libdir):" \ + -e "/UseInet6/s:0:$(usex ipv6 1 0):" \ + Canna.conf + + if use canuum; then + cd canuum + mv configure.{in,ac} + eautoreconf + cd - > /dev/null + fi +} + +src_configure() { + xmkmf -a || die + + if use canuum; then + cd canuum + xmkmf -a || die + # workaround for sys-libs/ncurses[tinfo] + sed -i "/^TERMCAP_LIB/s:=.*:=$(pkg-config --libs ncurses):" Makefile + cd - > /dev/null + fi + + if use doc; then + cd doc/man/guide/tex + xmkmf -a || die + cd - > /dev/null + fi +} + +src_compile() { + # bug #279706 + emake -j1 \ + CC="$(tc-getCC)" \ + CDEBUGFLAGS="${CFLAGS}" \ + LOCAL_LDFLAGS="${LDFLAGS}" \ + SHLIBGLOBALSFLAGS="${LDFLAGS}" \ + ${PN} + + if use canuum; then + einfo "Compiling canuum" + emake -C canuum -j1 \ + CC="$(tc-getCC)" \ + CDEBUGFLAGS="${CFLAGS}" \ + LOCAL_LDFLAGS="${LDFLAGS}" \ + canuum + fi + + if use doc; then + # NOTE: build fails if infinality enabled in fontconfig + einfo "Compiling DVI, PS, and PDF documents" + # bug #223077 + emake -C doc/man/guide/tex -j1 \ + JLATEXCMD="platex -kanji=euc" \ + DVI2PSCMD="dvips" \ + VARTEXFONTS="${T}"/fonts \ + ${PN}.ps \ + ${PN}.pdf + fi +} + +src_install() { + emake DESTDIR="${D}" install install.man + einstalldocs + + if use canuum; then + emake -C canuum DESTDIR="${D}" install install.man + docinto canuum + dodoc README.jp + fi + + if use doc; then + insinto /usr/share/doc/${PF} + doins doc/man/guide/tex/${PN}.{dvi,ps,pdf} + fi + + # for backward compatibility + dosbin "${FILESDIR}"/update-canna-dics_dir + + keepdir /var/lib/${PN}/dic/{user,group} + fowners bin:bin /var/lib/${PN}/dic/{user,group} + fperms 0775 /var/lib/${PN}/dic/{user,group} + + insinto /var/lib/${PN}/dic/dics.d + newins "${ED}"/var/lib/${PN}/dic/${PN}/dics.dir 00${PN}.dics.dir + + keepdir /var/log/${PN} + + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + + insinto /etc + newins "${FILESDIR}"/${PN}.hosts hosts.${PN} +} + +pkg_postinst() { + update-cannadic-dir + + if ! locale -a | grep -iq "ja_JP.eucjp"; then + elog "Some dictionary tools in this package require ja_JP.EUC-JP locale." + elog + elog "# echo 'ja_JP.EUC-JP EUC-JP' >> /etc/locale.gen" + elog "# locale-gen" + elog + fi +} diff --git a/app-i18n/canna/files/canna-canuum.patch b/app-i18n/canna/files/canna-canuum.patch new file mode 100644 index 000000000000..87866789c7c7 --- /dev/null +++ b/app-i18n/canna/files/canna-canuum.patch @@ -0,0 +1,21 @@ +--- a/canuum/configure.in ++++ b/canuum/configure.in +@@ -401,7 +401,7 @@ + dnl + olibs="$LIBS" + AC_MSG_CHECKING(--with-term-libs argument) +-AC_ARG_WITH(tlib, ++AC_ARG_WITH(term-libs, + [ --with-term-libs=-lLIB terminal library to be used ],) + if test -n "$with_term_libs"; then + AC_MSG_RESULT($with_term_libs) +--- a/canuum/wnn_os.h ++++ b/canuum/wnn_os.h +@@ -41,6 +41,7 @@ + #include <signal.h> + #if STDC_HEADERS + # include <stdlib.h> ++# include <string.h> + # include <limits.h> + #endif /* STDC_HEADERS */ + diff --git a/app-i18n/canna/metadata.xml b/app-i18n/canna/metadata.xml index 68869af58123..af8866b3beb0 100644 --- a/app-i18n/canna/metadata.xml +++ b/app-i18n/canna/metadata.xml @@ -5,6 +5,9 @@ <email>cjk@gentoo.org</email> <name>Cjk</name> </maintainer> + <use> + <flag name="canuum">Build canuum</flag> + </use> <upstream> <remote-id type="sourceforge-jp">canna</remote-id> </upstream> |