summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/recipes/gmp/build.recipe36
1 files changed, 17 insertions, 19 deletions
diff --git a/examples/recipes/gmp/build.recipe b/examples/recipes/gmp/build.recipe
index 11de683..19a25f6 100644
--- a/examples/recipes/gmp/build.recipe
+++ b/examples/recipes/gmp/build.recipe
@@ -12,58 +12,56 @@ let sourcedir = "{{workdir}}/{{name}}-{{version}}";
let builddir = "{{workdir}}/{{name}}-build";
fetch source {
- url = ["https://invalid/{{name}}-{{version}}.tar.xz"];
+ url: ["https://invalid/{{name}}-{{version}}.tar.xz"],
// TODO: Move to lockfile
- sha256 = "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898";
+ sha256: "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898",
}
task unpack() {
- depends = [source];
+ task.depends = [source];
- run = ```
+ ```
tar xf {{source.path}}
- ```;
+ ```
}
task configure(host: Platform) {
- parent = unpack();
- depends = [
+ task.parent = unpack();
+ task.depends = [
build_depend(toolchain::build_depends),
host_depend(toolchain::depends),
];
- run = ```
+ ```
mkdir {{builddir}}
cd {{builddir}}
{{sourcedir}}/configure \
--build={{build.gnu_triplet}} \
--host={{host.gnu_triplet}} \
--prefix={{host.prefix}}
- ```;
+ ```
}
task compile(host: Platform) {
- parent = configure(host);
+ task.parent = configure(host);
- run = ```
+ ```
cd {{builddir}}
make
- ```;
+ ```
}
task install(host: Platform) {
- parent = compile(host);
+ task.parent = compile(host);
- output = {
- default = {
- runtime_depends = [host_depend(toolchain::depends)],
- },
+ task.output["default"] = {
+ runtime_depends: [host_depend(toolchain::depends)],
};
- run = ```
+ ```
cd {{builddir}}
make DESTDIR={{destdir}} install
rm {{destdir}}{{host.prefix}}/lib/*.a
rm {{destdir}}{{host.prefix}}/lib/*.la
- ```;
+ ```
}