This commit is contained in:
Max Howell 2022-11-11 06:51:41 -05:00
parent 9bddf47435
commit 7d19dbf225
3 changed files with 43 additions and 3 deletions

View file

@ -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:

View file

@ -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 <uv.h>
#include <stdlib.h>
int main() {
uv_loop_t* loop = malloc(sizeof *loop);
uv_loop_init(loop);
uv_loop_close(loop);
free(loop);
return 0;
}

View file

@ -110,7 +110,7 @@ async function __build(pkg: Package): Promise<BuildResult> {
}
}
await run({ cmd }) // THE BUILD
await run({ cmd, clearEnv: true }) // THE BUILD
return { path: dst, pkg }
}