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

Contents of /app-i18n/nkf/nkf-2.1.2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Thu Aug 7 18:25:08 2014 UTC (5 years, 6 months ago) by zlogene
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Stable for all wrt bug #518292

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0xC42EB5D6)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-i18n/nkf/nkf-2.1.2-r1.ebuild,v 1.3 2013/05/24 20:25:30 aballier Exp $
4
5 EAPI="3"
6 PYTHON_DEPEND="python? 2"
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/53171/${P}.tar.gz
12 python? ( http://dev.gentoo.org/~naota/files/NKF_python20090602.tgz )"
13
14 LICENSE="ZLIB"
15 SLOT="0"
16 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-macos"
17 IUSE="perl python linguas_ja"
18
19 pkg_setup() {
20 if use python ; then
21 python_set_active_version 2
22 fi
23 }
24
25 src_prepare() {
26 sed -i \
27 -e "/^CFLAGS/s:-O2:${CFLAGS}:" \
28 -e '/-o nkf/s:$(CFLAGS):$(CFLAGS) $(LDFLAGS):' \
29 Makefile || die
30
31 if use python; then
32 mv "${WORKDIR}/NKF.python" "${S}" || die
33 sed -i -e "s/-s/${CFLAGS}/" NKF.python/setup.py || die
34 fi
35 }
36
37 src_compile() {
38 emake CC="$(tc-getCC)" nkf || die
39 if use perl; then
40 cd "${S}/NKF.mod"
41 perl-module_src_compile
42 fi
43 if use python; then
44 cd "${S}/NKF.python"
45 distutils_src_compile
46 fi
47 }
48
49 src_test() {
50 emake test || die
51 if use perl; then
52 cd "${S}/NKF.mod"
53 perl-module_src_test
54 fi
55 }
56
57 src_install() {
58 dobin nkf || die
59 doman nkf.1
60 if use linguas_ja; then
61 ./nkf -e nkf.1j > nkf.1
62 doman -i18n=ja nkf.1
63 fi
64 dodoc nkf.doc
65 if use perl; then
66 cd "${S}/NKF.mod"
67 perl-module_src_install
68 fi
69 if use python; then
70 cd "${S}/NKF.python"
71 distutils_src_install
72 fi
73 }
74
75 pkg_postinst() {
76 if use python ; then
77 distutils_pkg_postinst
78 fi
79 }
80
81 pkg_postrm() {
82 if use python ; then
83 distutils_pkg_postrm
84 fi
85 }

  ViewVC Help
Powered by ViewVC 1.1.20