commit: 9c55f366b8e8e45125dfd3c115e5a60b513790de Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Jun 6 08:43:46 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Jun 6 08:48:05 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c55f366
sys-apps/dtc: install Python bindings Closes: https://bugs.gentoo.org/835733 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-apps/dtc/dtc-1.7.0.ebuild | 18 ++++++++++++++---- sys-apps/dtc/dtc-9999.ebuild | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sys-apps/dtc/dtc-1.7.0.ebuild b/sys-apps/dtc/dtc-1.7.0.ebuild index 117f6b36238e..6427393029fc 100644 --- a/sys-apps/dtc/dtc-1.7.0.ebuild +++ b/sys-apps/dtc/dtc-1.7.0.ebuild @@ -3,7 +3,8 @@ EAPI=8 -inherit meson +PYTHON_COMPAT=( python3_{10..11} ) +inherit meson python-single-r1 if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dtc/dtc.git" @@ -18,15 +19,20 @@ HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/ LICENSE="GPL-2" SLOT="0" -IUSE="static-libs test yaml" +IUSE="python static-libs test yaml" RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" BDEPEND=" sys-devel/bison sys-devel/flex virtual/pkgconfig + python? ( dev-lang/swig ) +" +RDEPEND=" + python? ( ${PYTHON_DEPS} ) + yaml? ( dev-libs/libyaml ) " -RDEPEND="yaml? ( dev-libs/libyaml )" DEPEND="${RDEPEND}" DOCS=( @@ -40,6 +46,10 @@ PATCHES=( "${FILESDIR}"/${P}-meson-macos.patch ) +pkg_setup() { + use python && python-single-r1_pkg_setup +} + src_prepare() { default @@ -51,9 +61,9 @@ src_prepare() { src_configure() { local emesonargs=( -Ddefault_library=$(usex static-libs both shared) - -Dpython=disabled -Dtools=true -Dvalgrind=disabled # only used for some tests + $(meson_feature python) $(meson_feature yaml) ) diff --git a/sys-apps/dtc/dtc-9999.ebuild b/sys-apps/dtc/dtc-9999.ebuild index ce10f9e3b775..72cf9d539b46 100644 --- a/sys-apps/dtc/dtc-9999.ebuild +++ b/sys-apps/dtc/dtc-9999.ebuild @@ -3,7 +3,8 @@ EAPI=8 -inherit meson +PYTHON_COMPAT=( python3_{10..11} ) +inherit meson python-single-r1 if [[ ${PV} == 9999 ]] ; then EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dtc/dtc.git" @@ -18,15 +19,20 @@ HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/ LICENSE="GPL-2" SLOT="0" -IUSE="static-libs test yaml" +IUSE="python static-libs test yaml" RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" BDEPEND=" sys-devel/bison sys-devel/flex virtual/pkgconfig + python? ( dev-lang/swig ) +" +RDEPEND=" + python? ( ${PYTHON_DEPS} ) + yaml? ( >=dev-libs/libyaml-0.2.3 ) " -RDEPEND="yaml? ( >=dev-libs/libyaml-0.2.3 )" DEPEND="${RDEPEND}" DOCS=( @@ -35,6 +41,10 @@ DOCS=( Documentation/manual.txt ) +pkg_setup() { + use python && python-single-r1_pkg_setup +} + src_prepare() { default @@ -46,9 +56,9 @@ src_prepare() { src_configure() { local emesonargs=( -Ddefault_library=$(usex static-libs both shared) - -Dpython=disabled -Dtools=true -Dvalgrind=disabled # only used for some tests + $(meson_feature python) $(meson_feature yaml) )
