blob: 19a25f6a5ab104c89fb5679c44259e9456cca5c1 (
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
|
// External definitions used by this recipe:
//
// workdir: String
// name: String
// destdir: String
// build: Platform
// build_depend: (task: TaskID) -> TaskDep
// host_depend: (task: TaskID) -> TaskDep
let version = "6.3.0";
let sourcedir = "{{workdir}}/{{name}}-{{version}}";
let builddir = "{{workdir}}/{{name}}-build";
fetch source {
url: ["https://invalid/{{name}}-{{version}}.tar.xz"],
// TODO: Move to lockfile
sha256: "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898",
}
task unpack() {
task.depends = [source];
```
tar xf {{source.path}}
```
}
task configure(host: Platform) {
task.parent = unpack();
task.depends = [
build_depend(toolchain::build_depends),
host_depend(toolchain::depends),
];
```
mkdir {{builddir}}
cd {{builddir}}
{{sourcedir}}/configure \
--build={{build.gnu_triplet}} \
--host={{host.gnu_triplet}} \
--prefix={{host.prefix}}
```
}
task compile(host: Platform) {
task.parent = configure(host);
```
cd {{builddir}}
make
```
}
task install(host: Platform) {
task.parent = compile(host);
task.output["default"] = {
runtime_depends: [host_depend(toolchain::depends)],
};
```
cd {{builddir}}
make DESTDIR={{destdir}} install
rm {{destdir}}{{host.prefix}}/lib/*.a
rm {{destdir}}{{host.prefix}}/lib/*.la
```
}
|