summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2020-05-16 23:32:02 +0900
committerAkinori Hattori <hattya@gentoo.org>2020-05-16 23:47:45 +0900
commitfc44b576f81ef08320480c9b4c1cfe00f842bee9 (patch)
treec211b46c8ba5a80628598b024db0ebdd0f4ecbb1 /app-i18n/nkf
parentapp-i18n/nkf: update PYTHON_COMPAT (diff)
downloadgentoo-fc44b576f81ef08320480c9b4c1cfe00f842bee9.tar.gz
gentoo-fc44b576f81ef08320480c9b4c1cfe00f842bee9.tar.bz2
gentoo-fc44b576f81ef08320480c9b4c1cfe00f842bee9.zip
app-i18n/nkf: fix build with USE=python
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'app-i18n/nkf')
-rw-r--r--app-i18n/nkf/nkf-2.1.3-r2.ebuild19
-rw-r--r--app-i18n/nkf/nkf-2.1.4.ebuild19
2 files changed, 38 insertions, 0 deletions
diff --git a/app-i18n/nkf/nkf-2.1.3-r2.ebuild b/app-i18n/nkf/nkf-2.1.3-r2.ebuild
index 5aebc9371fa0..6c07e5dae6e8 100644
--- a/app-i18n/nkf/nkf-2.1.3-r2.ebuild
+++ b/app-i18n/nkf/nkf-2.1.3-r2.ebuild
@@ -3,6 +3,8 @@
EAPI="6"
PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL="1"
+DISTUTILS_USE_SETUPTOOLS="no"
inherit distutils-r1 perl-module toolchain-funcs
@@ -16,6 +18,15 @@ LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-macos"
IUSE="perl python l10n_ja"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )"
+DEPEND="${RDEPEND}"
src_prepare() {
sed -i \
@@ -28,6 +39,9 @@ src_prepare() {
if use python; then
mv "${WORKDIR}"/NKF.python . || die
eapply "${FILESDIR}"/${P}-strip.patch
+ cd NKF.python
+ distutils-r1_src_prepare
+ cd - >/dev/null
fi
default
@@ -40,6 +54,11 @@ src_configure() {
perl-module_src_configure
cd - >/dev/null
fi
+ if use python; then
+ cd NKF.python
+ distutils-r1_src_configure
+ cd - >/dev/null
+ fi
}
src_compile() {
diff --git a/app-i18n/nkf/nkf-2.1.4.ebuild b/app-i18n/nkf/nkf-2.1.4.ebuild
index 0e5fcaa2bbe1..e229db433992 100644
--- a/app-i18n/nkf/nkf-2.1.4.ebuild
+++ b/app-i18n/nkf/nkf-2.1.4.ebuild
@@ -3,6 +3,8 @@
EAPI="7"
PYTHON_COMPAT=( python3_{6,7,8} )
+DISTUTILS_OPTIONAL="1"
+DISTUTILS_USE_SETUPTOOLS="no"
inherit distutils-r1 perl-module toolchain-funcs vcs-snapshot
@@ -18,6 +20,15 @@ LICENSE="ZLIB python? ( BSD )"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-macos"
IUSE="perl python l10n_ja"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )"
+DEPEND="${RDEPEND}"
src_unpack() {
use python && vcs-snapshot_src_unpack || default
@@ -31,6 +42,9 @@ src_prepare() {
if use python; then
mv "${WORKDIR}"/${PY_P} NKF.python || die
eapply "${FILESDIR}"/${P}-python.patch
+ cd NKF.python
+ distutils-r1_src_prepare
+ cd - >/dev/null
fi
default
@@ -43,6 +57,11 @@ src_configure() {
perl-module_src_configure
cd - >/dev/null
fi
+ if use python; then
+ cd NKF.python
+ distutils-r1_src_configure
+ cd - >/dev/null
+ fi
}
src_compile() {