From bef7e6a7f3bc6755be3934ab21e93494be939d7f Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 7 Oct 2024 07:07:40 +0000 Subject: [PATCH] sys-apps/dtc: Sync with Gentoo It's from Gentoo commit d49d6df057b35be9c21db1b8730c51a1eb0414cd. --- .../portage-stable/sys-apps/dtc/Manifest | 1 + .../sys-apps/dtc/dtc-1.7.1.ebuild | 66 +++++++++++++++++++ .../sys-apps/dtc/dtc-9999.ebuild | 13 ++-- 3 files changed, 71 insertions(+), 9 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.7.1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest index 48789513fc..3bca2a9fbc 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/Manifest @@ -1,2 +1,3 @@ DIST dtc-1.6.0.tar.xz 158584 BLAKE2B 47b15b5df7f5d87369d6daaad87f2989a80865f2fab19f89d050d390a9f8319bcd86a36e12f7cc8d62947bb4d1335769071d0e3ea0a6e16861aea163e78f4696 SHA512 15433b24f1d6b7ed1f8066d050bd1bcbf988731aa38147564e3dd04b5f69af8d69e03befdc621a768526c620425a9bdd24aad4f9ff135930d6a1eeb0625f7de3 DIST dtc-1.7.0.tar.xz 165548 BLAKE2B de433a1034b7ef75559bf39f85695d0b275cfd17bf100c12b6186e226a65659053f9b5a053f20e64a5a0670ea3e728edd0e624c26287bd264594569408065bab SHA512 d3ba6902a9a2f2cdbaff55f12fca3cfe4a1ec5779074a38e3d8b88097c7abc981835957e8ce72971e10c131e05fde0b1b961768e888ff96d89e42c75edb53afb +DIST dtc-1.7.1.tar.xz 169524 BLAKE2B c9d9d7c60ce13c8e138ab8ddf3e8166d7cf3867ca4e5ea53621bf73514319faf6a6bac09fb96c971554db9f77dd3428e01d53990586041092a64849685d8854b SHA512 3195924b374680e367d7be6b9793691efc0441858068c8bc8d8a908db00bbae781a99184b5c5e272af39045ec58cb0f92adbdd00ff808480b635bd632aa74719 diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.7.1.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.7.1.ebuild new file mode 100644 index 0000000000..954d08126e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.7.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +inherit meson python-single-r1 + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dtc/dtc.git" + inherit git-r3 +else + SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz" + KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +fi + +DESCRIPTION="Open Firmware device tree compiler" +HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="python static-libs test yaml" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +BDEPEND=" + app-alternatives/yacc + app-alternatives/lex + virtual/pkgconfig + python? ( dev-lang/swig ) +" +RDEPEND=" + python? ( ${PYTHON_DEPS} ) + yaml? ( >=dev-libs/libyaml-0.2.3[static-libs?] ) +" +DEPEND=" + ${RDEPEND} +" + +DOCS=( + Documentation/dt-object-internal.txt + Documentation/dts-format.txt + Documentation/manual.txt +) + +pkg_setup() { + if use python ; then + export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} + python-single-r1_pkg_setup + fi +} + +src_configure() { + local emesonargs=( + -Dtools=true + -Dvalgrind=disabled # only used for some tests + $(meson_feature python) + $(meson_use test tests) + $(meson_feature yaml) + ) + + # bug #909366 + use static-libs && emesonargs+=( -Dstatic-build=true ) + + meson_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild index c58d58fb78..6da2ddea52 100644 --- a/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-9999.ebuild @@ -33,7 +33,9 @@ RDEPEND=" python? ( ${PYTHON_DEPS} ) yaml? ( >=dev-libs/libyaml-0.2.3 ) " -DEPEND="${RDEPEND}" +DEPEND=" + ${RDEPEND} +" DOCS=( Documentation/dt-object-internal.txt @@ -48,19 +50,12 @@ pkg_setup() { fi } -src_prepare() { - default - - if ! use test ; then - sed -i -e "/subdir('tests')/d" meson.build || die - fi -} - src_configure() { local emesonargs=( -Dtools=true -Dvalgrind=disabled # only used for some tests $(meson_feature python) + $(meson_use test tests) $(meson_feature yaml) )