From 7d19dbf225ba015aa1311aeb650a65263a630912 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 11 Nov 2022 06:51:41 -0500 Subject: [PATCH] +libuv --- projects/gnu.org/libtool/package.yml | 10 ++++++-- projects/libuv.org/package.yml | 34 ++++++++++++++++++++++++++++ scripts/build/build.ts | 2 +- 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 projects/libuv.org/package.yml diff --git a/projects/gnu.org/libtool/package.yml b/projects/gnu.org/libtool/package.yml index 5c15f1c4..6dc8e008 100644 --- a/projects/gnu.org/libtool/package.yml +++ b/projects/gnu.org/libtool/package.yml @@ -19,11 +19,17 @@ build: script: |- ./configure --prefix={{ prefix }} make --jobs {{ hw.concurrency }} install + + cd {{prefix}}/bin + sed -i.bak \ -e 's_prefix="{{prefix}}"_prefix="$(dirname $(dirname $0))"_' \ -e 's_{{prefix}}_$prefix_' \ - {{prefix}}/bin/libtoolize - rm {{prefix}}/bin/libtoolize.bak + libtoolize + rm libtoolize.bak + + # an often expected alias + ln -s libtoolize glibtoolize test: dependencies: diff --git a/projects/libuv.org/package.yml b/projects/libuv.org/package.yml new file mode 100644 index 00000000..acbb6b1a --- /dev/null +++ b/projects/libuv.org/package.yml @@ -0,0 +1,34 @@ +distributable: + url: https://dist.libuv.org/dist/v{{version}}/libuv-v{{version}}-dist.tar.gz + sig: ${{url}}.sign + strip-components: 1 + +versions: + github: libuv/libuv/tags + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + script: | + ./configure --prefix="{{prefix}}" + make --jobs {{hw.concurrency}} + make install + +test: + dependencies: + tea.xyz/gx/cc: c99 + script: | + mv $FIXTURE $FIXTURE.c + cc $FIXTURE.c -luv + ./a.out + fixture: | + #include + #include + int main() { + uv_loop_t* loop = malloc(sizeof *loop); + uv_loop_init(loop); + uv_loop_close(loop); + free(loop); + return 0; + } diff --git a/scripts/build/build.ts b/scripts/build/build.ts index 065f4c26..46c5e8ee 100644 --- a/scripts/build/build.ts +++ b/scripts/build/build.ts @@ -110,7 +110,7 @@ async function __build(pkg: Package): Promise { } } - await run({ cmd }) // THE BUILD + await run({ cmd, clearEnv: true }) // THE BUILD return { path: dst, pkg } }