/[gentoo-x86]/app-text/cmigemo/cmigemo-1.3c-r2.ebuild
Gentoo

Contents of /app-text/cmigemo/cmigemo-1.3c-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Jun 14 09:33:05 2012 UTC (2 years, 6 months ago) by jdhore
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
marked x86 per bug 418641

(Portage version: 2.2.0_alpha110/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/cmigemo/cmigemo-1.3c-r2.ebuild,v 1.3 2012/06/14 09:15:27 ago Exp $
4
5 EAPI=2
6 inherit eutils flag-o-matic multilib toolchain-funcs
7
8 MY_P="${P}-MIT"
9 DESCRIPTION="C/Migemo -- Migemo library implementation in C"
10 HOMEPAGE="http://www.kaoriya.net/#CMIGEMO"
11 SRC_URI="http://www.kaoriya.net/dist/var/${MY_P}.tar.bz2"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 ~ppc x86"
16 IUSE="emacs unicode vim-syntax"
17
18 DEPEND=">=app-dicts/migemo-dict-200812[unicode=]
19 dev-lang/perl
20 || (
21 net-misc/curl
22 net-misc/wget
23 net-misc/fetch
24 )
25 app-i18n/nkf"
26 RDEPEND="${RDEPEND}
27 emacs? ( >=app-text/migemo-0.40-r1 )"
28
29 S="${WORKDIR}/${MY_P}"
30
31 src_prepare() {
32 # Bug #246953
33 epatch "${FILESDIR}/${P}-gentoo.patch" \
34 "${FILESDIR}"/${P}-ldflags.patch
35
36 touch dict/SKK-JISYO.L
37 if use unicode ; then
38 sed -i -e "/gcc:/s/euc-jp/utf-8/" dict/dict.mak || die
39 fi
40
41 # Bug #255813
42 sed -i -e "/^docdir/s:/doc/migemo:/share/doc/${PF}:" compile/config.mk.in || die
43 }
44
45 src_compile() {
46 append-flags -fPIC
47 # parallel make b0rked
48 emake -j1 \
49 CC="$(tc-getCC)" \
50 CFLAGS="${CFLAGS}" \
51 LDFLAGS="${LDFLAGS}" \
52 gcc-all || die
53 }
54
55 src_install() {
56 # parallel make b0rked
57 emake -j1 \
58 prefix="${D}/usr" \
59 libdir="${D}/usr/$(get_libdir)" \
60 gcc-install || die
61
62 local encoding
63 if use unicode ; then
64 encoding="utf-8"
65 else
66 encoding="euc-jp"
67 fi
68
69 mv "${D}/usr/share/migemo/${encoding}/"*.dat "${D}/usr/share/migemo/"
70 rm -rf "${D}/usr/share/migemo/"{cp932,euc-jp,utf-8}
71
72 if use vim-syntax ; then
73 insinto /usr/share/vim/vimfiles/plugin
74 doins tools/migemo.vim
75 fi
76
77 dodoc doc/{README_j,TODO_j,vimigemo}.txt
78 }
79
80 pkg_postinst() {
81 if use emacs ; then
82 elog
83 elog "Please add to your ~/.emacs"
84 elog " (setq migemo-command \"cmigemo\")"
85 elog " (setq migemo-options '(\"-q\" \"--emacs\" \"-i\" \"\\\\a\"))"
86 elog " (setq migemo-dictionary \"/usr/share/migemo/migemo-dict\")"
87 elog " (setq migemo-user-dictionary nil)"
88 elog " (setq migemo-regex-dictionary nil)"
89 elog "to use cmigemo instead of migemo under emacs."
90 elog
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20