summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2006-08-20 14:14:09 +0000
committerAlastair Tse <liquidx@gentoo.org>2006-08-20 14:14:09 +0000
commitbe4e6c3183d40a9ab99c656a00dc17ea24910dc2 (patch)
treeccf109b98692b6546a5b46479ca63e63f432e5b9 /app-i18n/canna/canna-3.7_p3.ebuild
parentsecurity cleanup (bug #140543) (diff)
downloadgentoo-2-be4e6c3183d40a9ab99c656a00dc17ea24910dc2.tar.gz
gentoo-2-be4e6c3183d40a9ab99c656a00dc17ea24910dc2.tar.bz2
gentoo-2-be4e6c3183d40a9ab99c656a00dc17ea24910dc2.zip
version bump. Fixed deprecated sort invocation (#142818)
(Portage version: 2.1-r1)
Diffstat (limited to 'app-i18n/canna/canna-3.7_p3.ebuild')
-rw-r--r--app-i18n/canna/canna-3.7_p3.ebuild142
1 files changed, 142 insertions, 0 deletions
diff --git a/app-i18n/canna/canna-3.7_p3.ebuild b/app-i18n/canna/canna-3.7_p3.ebuild
new file mode 100644
index 000000000000..b8023b5f1d62
--- /dev/null
+++ b/app-i18n/canna/canna-3.7_p3.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-i18n/canna/canna-3.7_p3.ebuild,v 1.1 2006/08/20 14:14:09 liquidx Exp $
+
+inherit cannadic eutils multilib
+
+MY_P="Canna${PV//./}"
+
+DESCRIPTION="A client-server based Kana-Kanji conversion system"
+HOMEPAGE="http://canna.sourceforge.jp/"
+SRC_URI="mirror://sourceforge.jp/canna/9565/${MY_P/_/}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc"
+
+DEPEND="virtual/libc
+ >=sys-apps/sed-4
+ || ( ( x11-misc/gccmakedep
+ x11-misc/imake
+ )
+ virtual/x11
+ )
+ doc? ( app-text/ptex )"
+RDEPEND="virtual/libc"
+
+S="${WORKDIR}/${MY_P/_/}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ find . -name '*.man' -o -name '*.jmn' | xargs sed -i.bak -e 's/1M/8/g'
+ sed -e "s%@cannapkgver@%${PF}%" \
+ ${FILESDIR}/${P/_*/}-gentoo.diff.in > ${T}/${PF}-gentoo.diff
+ epatch ${T}/${PF}-gentoo.diff
+ cd dic/phono
+ epatch ${FILESDIR}/${PN}-kpdef-gentoo.diff
+
+ cd ${S}
+ # Multilib-strict fix for amd64
+ sed -i -e "s:\(DefLibCannaDir.*\)/lib:\1/$(get_libdir):g" Canna.conf*
+ # fix deprecated sort syntax
+ sed -e 's:^\(sortcmd=\".* -s\).*$:\1 -k 1,1\":' \
+ -i cmd/mkbindic/mkbindic.cpp
+}
+
+src_compile() {
+ xmkmf || die
+
+ #make libCannaDir=../lib/canna canna || die
+ make canna || die
+
+ if use doc ; then
+ einfo "Compiling DVI, PS (and PDF) document"
+ cd doc/man/guide/tex
+ xmkmf || die
+ make JLATEXCMD=platex \
+ DVI2PSCMD="dvips -f" \
+ canna.dvi canna.ps || die
+ if has_version 'app-text/dvipdfmx' && \
+ ( has_version 'app-text/acroread' \
+ || has_version 'app-text/xpdf-japanese' ); then
+ make JLATEXCMD=platex \
+ DVI2PSCMD="dvips -f" \
+ canna.pdf || die
+ fi
+ fi
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ make DESTDIR=${D} install.man || die
+
+ # install default.canna (removed from Canna36p4)
+ insinto /usr/share/canna
+ newins misc/initfiles/verbose.canna default.canna
+
+ # cannakill should link to /usr/bin/catdic
+ dosym ../bin/catdic /usr/sbin/cannakill
+
+ dodir /usr/share/man/man8 /usr/share/man/ja/man8
+ for man in cannaserver cannakill ; do
+ for mandir in ${D}/usr/share/man ${D}/usr/share/man/ja ; do
+ mv ${mandir}/man1/${man}.1 ${mandir}/man8/${man}.8
+ done
+ done
+
+ dodoc CHANGES.jp ChangeLog INSTALL* README* WHATIS*
+
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins doc/man/guide/tex/canna.{dvi,ps,pdf}
+ fi
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/canna.initd canna || die
+ insinto /etc/conf.d ; newins ${FILESDIR}/canna.confd canna || die
+ insinto /etc/ ; newins ${FILESDIR}/canna.hosts hosts.canna || die
+ keepdir /var/log/canna/ || die
+
+ # for backward compatibility
+ dosbin ${FILESDIR}/update-canna-dics_dir
+
+ insinto /var/lib/canna/dic/dics.d/
+ newins ${D}/var/lib/canna/dic/canna/dics.dir 00canna.dics.dir
+
+ # fix permission for user dictionary
+ keepdir /var/lib/canna/dic/{user,group}
+ fowners root:bin /var/lib/canna/dic/{user,group}
+ fperms 775 /var/lib/canna/dic/{user,group}
+}
+
+pkg_postinst() {
+ update-cannadic-dir
+ einfo
+ einfo "Canna dictionary format has been changed."
+ einfo "You should rebuild app-dict/canna-* after emerge."
+ einfo
+}
+
+pkg_prerm() {
+ if [ -S /tmp/.iroha_unix/IROHA ] ; then
+ # make sure cannaserver get stopped because otherwise
+ # we cannot stop it with /etc/init.d after emerge -C canna
+ einfo
+ einfo "Stopping Canna for safe unmerge"
+ einfo
+ /etc/init.d/canna stop
+ touch ${T}/canna.cookie
+ fi
+}
+
+pkg_postrm() {
+ if [ -f /usr/sbin/cannaserver -a -e ${T}/canna.cookie ] ; then
+ #update-cannadic-dir
+ einfo
+ einfo "Restarting Canna"
+ einfo
+ /etc/init.d/canna start
+ rm -f ${T}/canna.cookie
+ fi
+}