Commit 46b30a2d authored by Minecrell's avatar Minecrell Committed by Leo
Browse files

main/dtc: add py3-libfdt subpackage

pylibfdt is included in the dtc sources and allows using libfdt
from Python.

For some reason, the pylibfdt Makefile ignores $(DESTDIR) at the
moment. Add a small patch to fix this so the Python library is
installed properly. This is just temporary, the next release will
introduce Meson build scripts which do not seem to have that problem.
parent 2d0b35fa
Pipeline #68125 failed with stages
in 24 seconds
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dtc
pkgver=1.6.0
pkgrel=1
pkgrel=2
pkgdesc="Device Tree Compiler"
url="https://git.kernel.org/pub/scm/utils/dtc/dtc.git/"
arch="all"
license="GPL-2.0-or-later"
makedepends="$depends_dev bison flex"
makedepends="bison flex python3-dev swig"
checkdepends="coreutils"
subpackages="$pkgname-dev libfdt"
subpackages="$pkgname-dev libfdt py3-libfdt:py3_libfdt"
source="https://kernel.org/pub/software/utils/dtc/dtc-$pkgver.tar.xz
increase_max_srcfile_depth.patch"
increase_max_srcfile_depth.patch
install-pylibfdt-to-destdir.patch"
prepare() {
default_prepare
......@@ -32,9 +33,15 @@ package() {
libfdt() {
pkgdesc="Device tree library"
mkdir -p "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libfdt* "$subpkgdir"/usr/lib/
amove usr/lib/libfdt*
}
py3_libfdt() {
pkgdesc="Device tree library for Python 3"
depends="python3"
amove usr/lib/python3*
}
sha512sums="15433b24f1d6b7ed1f8066d050bd1bcbf988731aa38147564e3dd04b5f69af8d69e03befdc621a768526c620425a9bdd24aad4f9ff135930d6a1eeb0625f7de3 dtc-1.6.0.tar.xz
d30b04d6c177578f000465654d1bb0ebe4509fb290842f14d4dbdcd7c0bbdc8f2c8c73cfac2fc87a1896e17352652090cbac46c4e8d62c4e8cb97d5e9bd99647 increase_max_srcfile_depth.patch"
d30b04d6c177578f000465654d1bb0ebe4509fb290842f14d4dbdcd7c0bbdc8f2c8c73cfac2fc87a1896e17352652090cbac46c4e8d62c4e8cb97d5e9bd99647 increase_max_srcfile_depth.patch
1c43dfae8d15861c4f0170f0df9ba63d197ab3be50e39fe5748e547074c52dc7b042ca5e9c64d3d4bb0a8e8cde8df7e71660cde93e9512923405c38debcaa01c install-pylibfdt-to-destdir.patch"
diff --git a/pylibfdt/Makefile.pylibfdt b/pylibfdt/Makefile.pylibfdt
index 6866a0b..6363840 100644
--- a/pylibfdt/Makefile.pylibfdt
+++ b/pylibfdt/Makefile.pylibfdt
@@ -22,7 +22,7 @@ $(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_archive) $(SETUP) $(VERSION_FILE)
install_pylibfdt: $(PYMODULE)
@$(VECHO) INSTALL-PYLIB
- $(PYTHON) $(SETUP) $(SETUPFLAGS) install --prefix=$(PREFIX)
+ $(PYTHON) $(SETUP) $(SETUPFLAGS) install --prefix=$(PREFIX) --root=$(DESTDIR)
pylibfdt_clean:
@$(VECHO) CLEAN "(pylibfdt)"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment