/[gentoo-x86]/app-i18n/nkf/nkf-2.1.0.ebuild
Gentoo

Contents of /app-i18n/nkf/nkf-2.1.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat Apr 23 15:09:01 2011 UTC (8 years, 11 months ago) by grobian
Branch: MAIN
Changes since 1.2: +2 -2 lines
Marked ~x86-macos, bug #360273

(Portage version: 2.2.01.18252-prefix/cvs/Darwin powerpc)

1 arfrever 1.2 # Copyright 1999-2011 Gentoo Foundation
2 matsuu 1.1 # Distributed under the terms of the GNU General Public License v2
3 grobian 1.3 # $Header: /var/cvsroot/gentoo-x86/app-i18n/nkf/nkf-2.1.0.ebuild,v 1.2 2011/01/08 19:35:49 arfrever Exp $
4 matsuu 1.1
5 arfrever 1.2 EAPI="3"
6 matsuu 1.1
7     inherit eutils distutils perl-module toolchain-funcs
8    
9     DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
10     HOMEPAGE="http://sourceforge.jp/projects/nkf/"
11     SRC_URI="mirror://sourceforge.jp/nkf/44486/${P}.tar.gz
12     python? ( http://city.plala.jp/moin/NkfPython?action=AttachFile&do=get&target=NKF_python20090602.tgz -> NKF_python20090602.tgz )"
13    
14     LICENSE="as-is"
15     SLOT="0"
16 grobian 1.3 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-macos"
17 matsuu 1.1 IUSE="perl python linguas_ja"
18    
19     src_prepare() {
20     sed -i \
21     -e "/^CFLAGS/s:-O2:${CFLAGS}:" \
22     -e '/-o nkf/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
23     Makefile || die
24    
25     if use python; then
26     mv "${WORKDIR}/NKF.python" "${S}" || die
27     sed -i -e "s/-s/${CFLAGS}/" NKF.python/setup.py || die
28     fi
29     }
30    
31     src_compile() {
32     emake CC="$(tc-getCC)" nkf || die
33     if use perl; then
34     cd "${S}/NKF.mod"
35     perl-module_src_compile
36     fi
37     if use python; then
38     cd "${S}/NKF.python"
39     distutils_src_compile
40     fi
41     }
42    
43     src_test() {
44     emake test || die
45     if use perl; then
46     cd "${S}/NKF.mod"
47     perl-module_src_test
48     fi
49     }
50    
51     src_install() {
52     dobin nkf || die
53     doman nkf.1
54     if use linguas_ja; then
55     ./nkf -e nkf.1j > nkf.1
56     doman -i18n=ja nkf.1
57     fi
58     dodoc nkf.doc
59     if use perl; then
60     cd "${S}/NKF.mod"
61     perl-module_src_install
62     fi
63     if use python; then
64     cd "${S}/NKF.python"
65     distutils_src_install
66     fi
67     }
68 arfrever 1.2
69     pkg_postinst() {
70     use python && distutils_pkg_postinst
71     }
72    
73     pkg_postrm() {
74     use python && distutils_pkg_postrm
75     }

  ViewVC Help
Powered by ViewVC 1.1.20