+++ /dev/null
-# 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.6_p4.ebuild,v 1.20 2006/09/04 09:19:31 mr_bones_ Exp $
-
-inherit cannadic eutils
-
-MY_P="Canna${PV//[._]/}"
-
-DESCRIPTION="A client-server based Kana-Kanji conversion system"
-HOMEPAGE="http://canna.sourceforge.jp/"
-SRC_URI="mirror://sourceforge.jp/canna/6059/${MY_P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="x86 ppc sparc alpha"
-IUSE="doc"
-
-DEPEND="virtual/libc
- || ( ( x11-misc/gccmakedep
- x11-misc/imake
- )
- virtual/x11
- )
- >=sys-apps/sed-4
- 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'
- epatch ${FILESDIR}/${P}-gentoo.diff
- cd dic/phono
- epatch ${FILESDIR}/${PN}-kpdef-gentoo.diff
-}
-
-src_compile() {
- xmkmf || die
- make Makefiles || die
-
- # Remove VENDORNAME, see bug #48229
- sed -i -e "/VENDORNAME/d" Makefile
-
- # make includes
- 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
-
- 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_prerm() {
- if [ -S /tmp/.iroha_unix/IROHA ] ; then
- einfo
- einfo "Stopping Canna for safe unmerge"
- einfo
- /etc/init.d/canna stop
- fi
-}
-
-pkg_postrm() {
- if [ -f /usr/sbin/cannaserver ] ; then
- update-cannadic-dir
- einfo
- einfo "Restarting Canna"
- einfo
- /etc/init.d/canna start
- fi
-}
+++ /dev/null
-diff -urN Canna36p4.ORIG/Canna.conf Canna36p4/Canna.conf
---- Canna36p4.ORIG/Canna.conf 2003-09-22 19:27:12.000000000 +0900
-+++ Canna36p4/Canna.conf 2003-09-22 23:02:32.000000000 +0900
-@@ -133,7 +133,7 @@
- /* root¤Ë¤Ê¤é¤º¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë»þ¤Ï¤³¤ì¤òÄêµÁ¤·¤Æ²¼¤µ¤¤ */
- /* #define InstallAsUser */
- /* ½¾Íè¤È¸ß´¹¤Î¥Ç¥£¥ì¥¯¥È¥ê¹½Â¤¤Ë¤¹¤ë¾ì¹ç¤Ï¤³¤ì¤òÄêµÁ¤·¤Æ¤¯¤À¤µ¤¤ */
--#define ObsoleteInstallDir
-+/* #define ObsoleteInstallDir */
- #ifdef InstallAsUser
- # define DefCannaPrefix $(HOME)/canna
- # define DefErrDir $(cannaPrefix)/log
-@@ -144,7 +144,7 @@
- # define DefErrDir /usr/spool/canna
- # define DefLibCannaDir /usr/lib
- # else
--# define DefErrDir /var/log
-+# define DefErrDir /var/log/canna
- # define DefLibCannaDir $(cannaExecPrefix)/lib
- # endif
- #endif
-@@ -156,16 +156,18 @@
- # define DefCannaLibDir $(cannaPrefix)/share/canna
- #endif
-
--cannaPrefix = DefCannaPrefix
-+cannaPrefix = /usr
- cannaExecPrefix = $(cannaPrefix)
- cannaBinDir = $(cannaExecPrefix)/bin
- cannaSrvDir = DefCannaSrvDir
- XCOMM cannaLibDir = /var/lib/canna
- XCOMM cannaLibDir = /var/db/canna
- cannaLibDir = DefCannaLibDir
--XCOMM cannaManDir = $(cannaPrefix)/share/man
--cannaManDir = $(cannaPrefix)/man
-+cannaManDir = $(cannaPrefix)/share/man
-+XCOMM cannaManDir = $(cannaPrefix)/man
- cannaIncDir = $(cannaPrefix)/include/canna
-+cannaDocDir = $(cannaPrefix)/share/doc/canna-3.6_p4
-+cannaShareDir = $(cannaPrefix)/share/canna
-
- libCannaDir = DefLibCannaDir
- ErrDir = DefErrDir
-@@ -251,7 +253,7 @@
- /* #define UseInstalledLibCanna YES */
- #define UseInstalledLibCanna NO
-
--DicDir = $(cannaLibDir)/dic
-+DicDir = /var/lib/canna/dic
-
- #ifdef NeXT
- #define NO_X_ENV
-@@ -566,6 +568,7 @@
- echo "#define CANNAHOSTFILE '$(cannaLibDir)/cannahost'" >> junk @@\
- echo "/* for lib/canna */" >> junk @@\
- echo "#define CANNALIBDIR '$(cannaLibDir)'" >> junk @@\
-+ echo "#define CANNASHAREDIR '$(cannaShareDir)'" >> junk @@\
- echo "/* for scripts */" >> junk @@\
- echo "#define CANNABINDIR $(cannaBinDir)" >> junk @@\
- echo "/* others */" >> junk @@\
-@@ -592,6 +595,7 @@
- echo "#define CANNAHOSTFILE \"$(cannaLibDir)/cannahost\"";\ @@\
- echo "/* for lib/canna */";\ @@\
- echo "#define CANNALIBDIR \"$(cannaLibDir)\""; \ @@\
-+ echo "#define CANNASHAREDIR \"$(cannaShareDir)\""; \ @@\
- echo "/* for scripts */";\ @@\
- echo "#define CANNABINDIR $(cannaBinDir)"; \ @@\
- echo "/* others */";\ @@\
-diff -urN Canna36p4.ORIG/dic/phono/Imakefile Canna36p4/dic/phono/Imakefile
---- Canna36p4.ORIG/dic/phono/Imakefile 2002-10-19 17:27:40.000000000 +0900
-+++ Canna36p4/dic/phono/Imakefile 2003-09-22 22:55:59.000000000 +0900
-@@ -27,9 +27,10 @@
-
- ROMAJI_DIC_DEF = -DSHIFT
-
-- DICDIR = $(cannaLibDir)/dic
-- SAMPLEDIR = $(cannaLibDir)/sample
-- SAMPLESRCDIR = $(cannaLibDir)/sample/src
-+ DICDIR = $(DicDir)
-+ CANNASHAREDIR = $(cannaShareDir)
-+ SAMPLEDIR = $(cannaDocDir)/sample
-+ SAMPLESRCDIR = $(cannaDocDir)/sample/src
-
- KPDEF = default.kpdef jdaemon.kpdef just.kpdef kaisoku.kpdef kana.kpdef \
- lan5.kpdef matsu.kpdef newjis.kpdef romaji.kpdef sokuon.kpdef \
-@@ -69,7 +70,7 @@
- MakeDirectories(install,$(DICDIR))
- MakeDirectories(install,$(SAMPLESRCDIR))
-
--InstallMultiple($(ROMKANA_TABLES),$(DICDIR))
-+InstallMultiple($(ROMKANA_TABLES),$(CANNASHAREDIR))
-
- #ifdef USE_OBSOLETE_STYLE_FILENAME
- InstallNonExec(default.kpdef,$(SAMPLESRCDIR))
-diff -urN Canna36p4.ORIG/lib/canna/Imakefile Canna36p4/lib/canna/Imakefile
---- Canna36p4.ORIG/lib/canna/Imakefile 2002-10-20 17:20:33.000000000 +0900
-+++ Canna36p4/lib/canna/Imakefile 2003-09-22 22:55:59.000000000 +0900
-@@ -116,8 +116,8 @@
- #endif /* ProjectX */
- #endif /* DoSharedLib */
-
--sglobal.h: GSYM.awk globnames
-- awk -f GSYM.awk < globnames > $@
-+includes::
-+ awk -f GSYM.awk < globnames > sglobal.h
-
- clean::
- $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c sglobal.h
-diff -urN Canna36p4.ORIG/lib/canna/romaji.c Canna36p4/lib/canna/romaji.c
---- Canna36p4.ORIG/lib/canna/romaji.c 2003-09-12 22:18:05.000000000 +0900
-+++ Canna36p4/lib/canna/romaji.c 2003-09-22 22:55:59.000000000 +0900
-@@ -438,7 +438,7 @@
- }
- }
-
--#if 0 /* currently CANNASHAREDDIR is not defined */
-+#if 1 /* currently CANNASHAREDDIR is defined */
- if (retval == (struct RkRxDic *)NULL) { /* added for Debian by ISHIKAWA Mutsumi <ishikawa@linux.or.jp> */
- extern jrUserInfoStruct *uinfo;
-
-diff -urN Canna36p4.ORIG/misc/Imakefile Canna36p4/misc/Imakefile
---- Canna36p4.ORIG/misc/Imakefile 2003-09-12 14:48:44.000000000 +0900
-+++ Canna36p4/misc/Imakefile 2003-09-22 22:59:20.000000000 +0900
-@@ -48,7 +48,7 @@
- MakeLintLibSubdirs($(SUBDIRS))
- MakeLintSubdirs($(SUBDIRS),install.ln,install.ln)
-
--MakeDirectories(install,$(cannaLibDir)/sample/src)
-+MakeDirectories(install,$(cannaDocDir)/sample/src)
-
- #ifdef USE_OBSOLETE_STYLE_FILENAME
- default.canna: default.ca
-@@ -58,8 +58,8 @@
- $(CP) default.ca default.canna
- #endif
-
--InstallNonExec(default.canna,$(cannaLibDir))
--InstallNonExec(is.c,$(cannaLibDir)/sample/src)
-+InstallNonExec(default.canna,$(cannaDocDir))
-+InstallNonExec(is.c,$(cannaDocDir)/sample/src)
-
- clean::
- $(RM) $(PROGRAMS)
-diff -urN Canna36p4.ORIG/misc/initfiles/Imakefile Canna36p4/misc/initfiles/Imakefile
---- Canna36p4.ORIG/misc/initfiles/Imakefile 2003-09-12 14:48:44.000000000 +0900
-+++ Canna36p4/misc/initfiles/Imakefile 2003-09-22 22:55:59.000000000 +0900
-@@ -6,7 +6,7 @@
- #endif
-
- CANNAROOT = ../..
-- SAMPLEDIR = $(cannaLibDir)/sample
-+ SAMPLEDIR = $(cannaShareDir)
-
- all::
-