+digip.org/jansson (#390)

* first attempt

* use gcc on linux

---------

Co-authored-by: Max Howell <mxcl@me.com>
This commit is contained in:
Lino Le Van 2023-02-25 08:35:56 -08:00 committed by GitHub
parent ed1fede886
commit 1a0a2f104c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,11 @@
#include <jansson.h>
#include <assert.h>
int main()
{
json_t *json;
json_error_t error;
json = json_loads("\"foo\"", JSON_DECODE_ANY, &error);
assert(json && json_is_string(json));
json_decref(json);
return 0;
}

View file

@ -0,0 +1,25 @@
distributable:
url: https://github.com/akheron/jansson/releases/download/v{{ version.raw }}/jansson-{{ version.raw }}.tar.gz
strip-components: 1
versions:
github: akheron/jansson/tags
strip: /^v/
build:
dependencies:
linux:
gnu.org/gcc: '*'
darwin:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
script: |
./configure --prefix="{{prefix}}"
make --jobs {{ hw.concurrency }} install
test:
dependencies:
tea.xyz/gx/cc: c99
script: |
cc fixture.c -ljansson
./a.out