summaryrefslogtreecommitdiff
path: root/app-i18n/nkf/nkf-2.1.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-04 08:53:53 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-04 08:53:53 +0100
commite3872864be25f7421015bef2732fa57c0c9fb726 (patch)
tree9cb29a544215119b5c5538e37211b994ce1c87ae /app-i18n/nkf/nkf-2.1.4.ebuild
parent480486b52ea64765faf696c88b2c6a26a5a454d4 (diff)
gentoo resync : 04.08.2018
Diffstat (limited to 'app-i18n/nkf/nkf-2.1.4.ebuild')
-rw-r--r--app-i18n/nkf/nkf-2.1.4.ebuild90
1 files changed, 90 insertions, 0 deletions
diff --git a/app-i18n/nkf/nkf-2.1.4.ebuild b/app-i18n/nkf/nkf-2.1.4.ebuild
new file mode 100644
index 000000000000..9f6f6f5d6308
--- /dev/null
+++ b/app-i18n/nkf/nkf-2.1.4.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1 perl-module toolchain-funcs vcs-snapshot
+
+PY_P="python-${PN}-0.2.0_p20141211"
+PY_COMMIT="000915e115acac57a1fdbceb1e6361788af83a3d"
+
+DESCRIPTION="Network Kanji code conversion Filter with UTF-8/16 support"
+HOMEPAGE="http://sourceforge.jp/projects/nkf/"
+SRC_URI="mirror://sourceforge.jp/${PN}/64158/${P}.tar.gz
+ python? ( https://github.com/fumiyas/python-${PN}/archive/${PY_COMMIT}.tar.gz -> ${PY_P}.tar.gz )"
+
+LICENSE="ZLIB python? ( BSD )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-macos"
+IUSE="perl python l10n_ja"
+
+src_prepare() {
+ sed -i \
+ -e "/^CFLAGS/{ s/-g -O2//; s/=/+=/; }" \
+ -e "/ -o ${PN}/s/\(-o \)/\$(LDFLAGS) \1/" \
+ Makefile
+ if use python; then
+ mv "${WORKDIR}"/${PY_P} NKF.python || die
+ eapply "${FILESDIR}"/${P}-python.patch
+ fi
+
+ default
+}
+
+src_configure() {
+ default
+ if use perl; then
+ cd NKF.mod
+ perl-module_src_configure
+ cd - >/dev/null
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+ if use perl; then
+ cd NKF.mod
+ perl-module_src_compile
+ cd - >/dev/null
+ fi
+ if use python; then
+ cd NKF.python
+ distutils-r1_src_compile
+ cd - >/dev/null
+ fi
+}
+
+src_test() {
+ default
+ if use perl; then
+ cd NKF.mod
+ perl-module_src_test
+ cd - >/dev/null
+ fi
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+
+ if use l10n_ja; then
+ iconv -f ISO-2022-JP-3 -t UTF-8 ${PN}.1j > ${PN}.ja.1 || die
+ doman ${PN}.ja.1
+ fi
+ dodoc ${PN}.doc
+
+ if use perl; then
+ cd NKF.mod
+ docinto perl
+ perl-module_src_install
+ cd - >/dev/null
+ fi
+ if use python; then
+ cd NKF.python
+ docinto python
+ DOCS= distutils-r1_src_install
+ dodoc CHANGES README.md
+ cd - >/dev/null
+ fi
+}