mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 07:26:58 +02:00
sys-apps/dtc: Sync with Gentoo
It's from Gentoo commit 8d4d6bd4de28a5f9efc783d947397dabe7ffd568.
This commit is contained in:
parent
e11dc02db8
commit
cf7589aae1
@ -1 +1,2 @@
|
|||||||
DIST dtc-1.6.0.tar.xz 158584 BLAKE2B 47b15b5df7f5d87369d6daaad87f2989a80865f2fab19f89d050d390a9f8319bcd86a36e12f7cc8d62947bb4d1335769071d0e3ea0a6e16861aea163e78f4696 SHA512 15433b24f1d6b7ed1f8066d050bd1bcbf988731aa38147564e3dd04b5f69af8d69e03befdc621a768526c620425a9bdd24aad4f9ff135930d6a1eeb0625f7de3
|
DIST dtc-1.6.0.tar.xz 158584 BLAKE2B 47b15b5df7f5d87369d6daaad87f2989a80865f2fab19f89d050d390a9f8319bcd86a36e12f7cc8d62947bb4d1335769071d0e3ea0a6e16861aea163e78f4696 SHA512 15433b24f1d6b7ed1f8066d050bd1bcbf988731aa38147564e3dd04b5f69af8d69e03befdc621a768526c620425a9bdd24aad4f9ff135930d6a1eeb0625f7de3
|
||||||
|
DIST dtc-1.7.0.tar.xz 165548 BLAKE2B de433a1034b7ef75559bf39f85695d0b275cfd17bf100c12b6186e226a65659053f9b5a053f20e64a5a0670ea3e728edd0e624c26287bd264594569408065bab SHA512 d3ba6902a9a2f2cdbaff55f12fca3cfe4a1ec5779074a38e3d8b88097c7abc981835957e8ce72971e10c131e05fde0b1b961768e888ff96d89e42c75edb53afb
|
||||||
|
74
sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.7.0.ebuild
vendored
Normal file
74
sdk_container/src/third_party/portage-stable/sys-apps/dtc/dtc-1.7.0.ebuild
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# Copyright 1999-2023 Gentoo Authors
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=8
|
||||||
|
|
||||||
|
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"
|
||||||
|
inherit git-r3
|
||||||
|
else
|
||||||
|
SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz"
|
||||||
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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="
|
||||||
|
sys-devel/bison
|
||||||
|
sys-devel/flex
|
||||||
|
virtual/pkgconfig
|
||||||
|
python? ( dev-lang/swig )
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
python? ( ${PYTHON_DEPS} )
|
||||||
|
yaml? ( dev-libs/libyaml )
|
||||||
|
"
|
||||||
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
|
DOCS=(
|
||||||
|
Documentation/dt-object-internal.txt
|
||||||
|
Documentation/dts-format.txt
|
||||||
|
Documentation/manual.txt
|
||||||
|
)
|
||||||
|
|
||||||
|
PATCHES=(
|
||||||
|
"${FILESDIR}"/${P}-meson-tests.patch
|
||||||
|
"${FILESDIR}"/${P}-meson-macos.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
if use python ; then
|
||||||
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
|
||||||
|
python-single-r1_pkg_setup
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
if ! use test ; then
|
||||||
|
sed -i -e "/subdir('tests')/d" meson.build || die
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local emesonargs=(
|
||||||
|
-Ddefault_library=$(usex static-libs both shared)
|
||||||
|
-Dtools=true
|
||||||
|
-Dvalgrind=disabled # only used for some tests
|
||||||
|
$(meson_feature python)
|
||||||
|
$(meson_feature yaml)
|
||||||
|
)
|
||||||
|
|
||||||
|
meson_src_configure
|
||||||
|
}
|
@ -1,16 +1,17 @@
|
|||||||
# Copyright 1999-2022 Gentoo Authors
|
# Copyright 1999-2023 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
EAPI=7
|
EAPI=8
|
||||||
|
|
||||||
inherit toolchain-funcs
|
PYTHON_COMPAT=( python3_{10..11} )
|
||||||
|
inherit meson python-single-r1
|
||||||
|
|
||||||
if [[ ${PV} == "9999" ]] ; then
|
if [[ ${PV} == 9999 ]] ; then
|
||||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
|
EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/dtc/dtc.git"
|
||||||
inherit git-r3
|
inherit git-r3
|
||||||
else
|
else
|
||||||
SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz"
|
SRC_URI="https://www.kernel.org/pub/software/utils/${PN}/${P}.tar.xz"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DESCRIPTION="Open Firmware device tree compiler"
|
DESCRIPTION="Open Firmware device tree compiler"
|
||||||
@ -18,65 +19,51 @@ HOMEPAGE="https://devicetree.org/ https://git.kernel.org/cgit/utils/dtc/dtc.git/
|
|||||||
|
|
||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE="static-libs yaml"
|
IUSE="python static-libs test yaml"
|
||||||
|
RESTRICT="!test? ( test )"
|
||||||
|
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||||
|
|
||||||
BDEPEND="
|
BDEPEND="
|
||||||
sys-devel/bison
|
sys-devel/bison
|
||||||
sys-devel/flex
|
sys-devel/flex
|
||||||
virtual/pkgconfig
|
virtual/pkgconfig
|
||||||
|
python? ( dev-lang/swig )
|
||||||
|
"
|
||||||
|
RDEPEND="
|
||||||
|
python? ( ${PYTHON_DEPS} )
|
||||||
|
yaml? ( >=dev-libs/libyaml-0.2.3 )
|
||||||
"
|
"
|
||||||
RDEPEND="yaml? ( dev-libs/libyaml )"
|
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
DOCS="
|
DOCS=(
|
||||||
Documentation/dt-object-internal.txt
|
Documentation/dt-object-internal.txt
|
||||||
Documentation/dts-format.txt
|
Documentation/dts-format.txt
|
||||||
Documentation/manual.txt
|
Documentation/manual.txt
|
||||||
"
|
)
|
||||||
|
|
||||||
_emake() {
|
pkg_setup() {
|
||||||
# valgrind is used only in 'make checkm'
|
if use python ; then
|
||||||
emake \
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
|
||||||
NO_PYTHON=1 \
|
python-single-r1_pkg_setup
|
||||||
NO_VALGRIND=1 \
|
fi
|
||||||
NO_YAML=$(usex !yaml 1 0) \
|
|
||||||
\
|
|
||||||
AR="$(tc-getAR)" \
|
|
||||||
CC="$(tc-getCC)" \
|
|
||||||
PKG_CONFIG="$(tc-getPKG_CONFIG)" \
|
|
||||||
\
|
|
||||||
V=1 \
|
|
||||||
\
|
|
||||||
PREFIX="${EPREFIX}/usr" \
|
|
||||||
\
|
|
||||||
LIBDIR="\$(PREFIX)/$(get_libdir)" \
|
|
||||||
\
|
|
||||||
"$@"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
default
|
default
|
||||||
|
|
||||||
sed -i \
|
if ! use test ; then
|
||||||
-e '/^CFLAGS =/s:=:+=:' \
|
sed -i -e "/subdir('tests')/d" meson.build || die
|
||||||
-e '/^CPPFLAGS =/s:=:+=:' \
|
fi
|
||||||
-e 's:-Werror::' \
|
|
||||||
-e 's:-g -Os::' \
|
|
||||||
Makefile || die
|
|
||||||
|
|
||||||
tc-export AR CC PKG_CONFIG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_configure() {
|
||||||
_emake
|
local emesonargs=(
|
||||||
}
|
-Ddefault_library=$(usex static-libs both shared)
|
||||||
|
-Dtools=true
|
||||||
|
-Dvalgrind=disabled # only used for some tests
|
||||||
|
$(meson_feature python)
|
||||||
|
$(meson_feature yaml)
|
||||||
|
)
|
||||||
|
|
||||||
src_test() {
|
meson_src_configure
|
||||||
_emake check
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
_emake DESTDIR="${D}" install
|
|
||||||
|
|
||||||
use static-libs || find "${ED}" -name '*.a' -delete
|
|
||||||
}
|
}
|
||||||
|
39
sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.7.0-meson-macos.patch
vendored
Normal file
39
sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.7.0-meson-macos.patch
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/?id=71a8b8ef0adf01af4c78c739e04533a35c1dc89c
|
||||||
|
|
||||||
|
From 71a8b8ef0adf01af4c78c739e04533a35c1dc89c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Otavio Salvador <otavio@ossystems.com.br>
|
||||||
|
Date: Wed, 31 May 2023 11:41:42 -0300
|
||||||
|
Subject: libfdt: meson: Fix linking on macOS linker
|
||||||
|
|
||||||
|
-undefined error is the equivalent of --no-undefined for the macOS
|
||||||
|
linker, but -undefined would also be understood as a valid argument for
|
||||||
|
GNU ld so we use the supported linker variant.
|
||||||
|
|
||||||
|
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||||
|
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||||
|
--- a/libfdt/meson.build
|
||||||
|
+++ b/libfdt/meson.build
|
||||||
|
@@ -16,10 +16,20 @@ sources = files(
|
||||||
|
'fdt_wip.c',
|
||||||
|
)
|
||||||
|
|
||||||
|
+link_args = []
|
||||||
|
+if cc.has_link_argument('-Wl,--no-undefined')
|
||||||
|
+ link_args += '-Wl,--no-undefined'
|
||||||
|
+else
|
||||||
|
+ # -undefined error is the equivalent of --no-undefined for the macOS linker,
|
||||||
|
+ # but -undefined would also be understood as a valid argument for GNU ld!
|
||||||
|
+ link_args += cc.get_supported_link_arguments('-Wl,-undefined,error')
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+link_args += version_script
|
||||||
|
libfdt = library(
|
||||||
|
'fdt', sources,
|
||||||
|
version: '1.6.0',
|
||||||
|
- link_args: ['-Wl,--no-undefined', version_script],
|
||||||
|
+ link_args: link_args,
|
||||||
|
link_depends: 'version.lds',
|
||||||
|
install: true,
|
||||||
|
)
|
||||||
|
--
|
||||||
|
cgit
|
27
sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.7.0-meson-tests.patch
vendored
Normal file
27
sdk_container/src/third_party/portage-stable/sys-apps/dtc/files/dtc-1.7.0-meson-tests.patch
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=32174a66efa4ad19fc6a2a6422e4af2ae4f055cb
|
||||||
|
|
||||||
|
From 32174a66efa4ad19fc6a2a6422e4af2ae4f055cb Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Gibson <david@gibson.dropbear.id.au>
|
||||||
|
Date: Tue, 28 Feb 2023 10:33:58 +1100
|
||||||
|
Subject: meson: Fix cell overflow tests when running from meson
|
||||||
|
|
||||||
|
Because meson always builds out-of-tree we need to reference things in the
|
||||||
|
original source tree via $SRCDIR from run_tests.sh. We forgot a couple of
|
||||||
|
cases for the cell overflow tests. Fix them.
|
||||||
|
|
||||||
|
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
||||||
|
--- a/tests/run_tests.sh
|
||||||
|
+++ b/tests/run_tests.sh
|
||||||
|
@@ -519,8 +519,8 @@ libfdt_tests () {
|
||||||
|
check_tests "$SRCDIR/phandle-args-overflow.dts" clocks_property
|
||||||
|
|
||||||
|
## https://github.com/dgibson/dtc/issues/74
|
||||||
|
- run_dtc_test -I dts -O dtb -o cell-overflow-results.test.dtb cell-overflow-results.dts
|
||||||
|
- run_dtc_test -I dts -O dtb -o cell-overflow.test.dtb cell-overflow.dts
|
||||||
|
+ run_dtc_test -I dts -O dtb -o cell-overflow-results.test.dtb "$SRCDIR/cell-overflow-results.dts"
|
||||||
|
+ run_dtc_test -I dts -O dtb -o cell-overflow.test.dtb "$SRCDIR/cell-overflow.dts"
|
||||||
|
run_test dtbs_equal_ordered cell-overflow.test.dtb cell-overflow-results.test.dtb
|
||||||
|
|
||||||
|
# check full tests
|
||||||
|
--
|
||||||
|
cgit
|
Loading…
Reference in New Issue
Block a user