mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
new file: projects/duktape.org/package.yml
new file: projects/duktape.org/test.c new file: projects/duktape.org/test.js
This commit is contained in:
parent
6503b1b827
commit
d5a7f8c394
3 changed files with 31 additions and 0 deletions
20
projects/duktape.org/package.yml
Normal file
20
projects/duktape.org/package.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/svaarala/duktape/releases/download/v{{version}}/duktape-{{version}}.tar.xz
|
||||||
|
strip-components: 1
|
||||||
|
versions:
|
||||||
|
github: svaarala/duktape
|
||||||
|
build:
|
||||||
|
script:
|
||||||
|
- make -f Makefile.sharedlibrary install
|
||||||
|
- make -f Makefile.cmdline
|
||||||
|
- mkdir -p {{prefix}}/bin
|
||||||
|
- install duk {{prefix}}/bin/
|
||||||
|
env:
|
||||||
|
INSTALL_PREFIX: "{{prefix}}"
|
||||||
|
provides:
|
||||||
|
- bin/duk
|
||||||
|
test:
|
||||||
|
script:
|
||||||
|
- duk test.js | grep "Hello World!"
|
||||||
|
- cc test.c -o test -lduktape -lm
|
||||||
|
- ./test
|
10
projects/duktape.org/test.c
Normal file
10
projects/duktape.org/test.c
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "duktape.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
duk_context *ctx = duk_create_heap_default();
|
||||||
|
duk_eval_string(ctx, "1 + 2");
|
||||||
|
printf("1 + 2 = %d\\n", (int) duk_get_int(ctx, -1));
|
||||||
|
duk_destroy_heap(ctx);
|
||||||
|
return 0;
|
||||||
|
}
|
1
projects/duktape.org/test.js
Normal file
1
projects/duktape.org/test.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
console.log('Hello World!');
|
Loading…
Reference in a new issue