archrelease: copy trunk to community-any
[ArchLinux/community.git] / dtc / trunk / PKGBUILD
blob2cdf3da0223c21c2ba731cc0916f24868a661c03
1 # Maintainer: Anatol Pomozov
2 # Contributor: Frederic Bezies <fredbezies at gmail dot com>
4 pkgname=dtc
5 pkgver=1.7.0
6 pkgrel=4
7 pkgdesc='Device Tree Compiler'
8 url='https://www.devicetree.org/'
9 arch=(x86_64)
10 license=(GPL2)
11 depends=(bash glibc libyaml python)
12 makedepends=(meson swig python-setuptools-scm)
13 checkdepends=(valgrind)
14 source=(https://www.kernel.org/pub/software/utils/dtc/dtc-$pkgver.tar.xz
15         fix_test.patch::https://github.com/dgibson/dtc/commit/32174a66efa4ad19fc6a2a6422e4af2ae4f055cb.patch
16         fix_meson_version.patch::https://github.com/dgibson/dtc/commit/64a907f08b9bedd89833c1eee674148cff2343c6.patch
17         fix_meson_version2.patch::https://github.com/dgibson/dtc/pull/95.patch
18         pyscm.patch)
19 sha256sums=('29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4'
20             '4538d60e5837cc1b7ead839eab2062a8677cf1ee7582fed76d3c4f043b3c0765'
21             '31ba6e7191cdb88a12f3ffa3016006cdc820c7588a54214e34326a67b68bd984'
22             '1c6f13e57e4b635a21dbb6b515e556bb9d28564b6f119edd852e41c019410bb6'
23             '3198c9e41cbebb0bcd9caa5de0940ccaf02b3b3bcc00fbc19bfdf3cdb8a075bb')
25 prepare() {
26   cd dtc-$pkgver
27   patch -Np1 < ../fix_test.patch
28   patch -Np1 < ../fix_meson_version.patch
29   patch -Np1 < ../fix_meson_version2.patch
30   patch -Np1 < ../pyscm.patch
31   sed -i "s/@VERSION@/$pkgver/" setup.py
34 build() {
35   arch-meson dtc-$pkgver build
36   meson compile -C build
39 check() {
40   meson test -C build --print-errorlogs
43 package() {
44   meson install -C build --destdir "$pkgdir"