aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/dtc.go
blob: 17d40408f3235d5d6439f8c9d8b129b36b2d95e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newDTC() (pkg.Artifact, string) {
	const (
		version  = "1.7.2"
		checksum = "vUoiRynPyYRexTpS6USweT5p4SVHvvVJs8uqFkkVD-YnFjwf6v3elQ0-Etrh00Dt"
	)
	return t.NewPackage("dtc", version, pkg.NewHTTPGetTar(
		nil, "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/"+
			"dtc-v"+version+".tar.gz",
		mustDecode(checksum),
		pkg.TarGzip,
	), &PackageAttr{
		// works around buggy test:
		// fdtdump-runtest.sh /usr/src/dtc/tests/fdtdump.dts
		Writable: true,
		Chmod:    true,
	}, &MesonHelper{
		Setup: [][2]string{
			{"Dyaml", "disabled"},
			{"Dstatic-build", "true"},
		},
	},
		Flex,
		Bison,
		M4,
		Coreutils,
		Diffutils,
	), version
}
func init() {
	artifactsM[DTC] = Metadata{
		f: Toolchain.newDTC,

		Name:        "dtc",
		Description: "The Device Tree Compiler",
		Website:     "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/",
	}
}