From: Akinori Hattori Date: Sat, 16 May 2020 14:32:02 +0000 (+0900) Subject: app-i18n/nkf: fix build with USE=python X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fc44b576f81ef08320480c9b4c1cfe00f842bee9;p=gentoo.git app-i18n/nkf: fix build with USE=python Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Akinori Hattori --- 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() {