aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/wayland.go
blob: 48ab9a65afbd80e00ab3a7d0b50e99a3064b55dd (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package rosa

import "hakurei.app/internal/pkg"

func (t Toolchain) newWayland() pkg.Artifact {
	const (
		version  = "1.24.0"
		checksum = "JxgLiFRRGw2D3uhVw8ZeDbs3V7K_d4z_ypDog2LBqiA_5y2vVbUAk5NT6D5ozm0m"
	)
	return t.New("wayland-"+version, 0, []pkg.Artifact{
		t.Load(Python),
		t.Load(Meson),
		t.Load(PkgConfig),
		t.Load(CMake),
		t.Load(Ninja),
		t.Load(Gawk),
		t.Load(Diffutils),

		t.Load(Libffi),
		t.Load(Libexpat),
		t.Load(Libxml2),
	}, nil, nil, `
cd /usr/src/wayland
chmod +w tests tests/sanity-test.c
echo 'int main(){}' > tests/sanity-test.c

cd "$(mktemp -d)"
meson setup \
	--reconfigure \
	--buildtype=release \
	--prefix=/system \
	--prefer-static \
	-Ddocumentation=false \
	-Dtests=true \
	-Ddefault_library=both \
	. /usr/src/wayland
meson compile
meson test
meson install \
	--destdir=/work
`, pkg.Path(AbsUsrSrc.Append("wayland"), true, pkg.NewHTTPGetTar(
		nil, "https://gitlab.freedesktop.org/wayland/wayland/"+
			"-/archive/"+version+"/wayland-"+version+".tar.bz2",
		mustDecode(checksum),
		pkg.TarBzip2,
	)))
}
func init() { artifactsF[Wayland] = Toolchain.newWayland }

func (t Toolchain) newWaylandProtocols() pkg.Artifact {
	const (
		version  = "1.47"
		checksum = "B_NodZ7AQfCstcx7kgbaVjpkYOzbAQq0a4NOk-SA8bQixAE20FY3p1-6gsbPgHn9"
	)
	return t.New("wayland-protocols-"+version, 0, []pkg.Artifact{
		t.Load(Python),
		t.Load(Meson),
		t.Load(PkgConfig),
		t.Load(CMake),
		t.Load(Ninja),

		t.Load(Wayland),
		t.Load(Libffi),
		t.Load(Libexpat),
		t.Load(Libxml2),
	}, nil, nil, `
cd "$(mktemp -d)"
meson setup \
	--reconfigure \
	--buildtype=release \
	--prefix=/system \
	--prefer-static \
	. /usr/src/wayland-protocols
meson compile
meson install \
	--destdir=/work
`, pkg.Path(AbsUsrSrc.Append("wayland-protocols"), false, pkg.NewHTTPGetTar(
		nil, "https://gitlab.freedesktop.org/wayland/wayland-protocols/"+
			"-/archive/"+version+"/wayland-protocols-"+version+".tar.bz2",
		mustDecode(checksum),
		pkg.TarBzip2,
	)))
}
func init() { artifactsF[WaylandProtocols] = Toolchain.newWaylandProtocols }