mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
+json-c
This commit is contained in:
parent
05cbd58da5
commit
57ac9ca3a4
2 changed files with 35 additions and 0 deletions
9
projects/github.com/json-c/json-c/fixture.c
Normal file
9
projects/github.com/json-c/json-c/fixture.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include <stdio.h>
|
||||
#include <json-c/json.h>
|
||||
int main() {
|
||||
json_object *obj = json_object_new_object();
|
||||
json_object *value = json_object_new_string("value");
|
||||
json_object_object_add(obj, "key", value);
|
||||
printf("%s\n", json_object_to_json_string(obj));
|
||||
return 0;
|
||||
}
|
26
projects/github.com/json-c/json-c/package.yml
Normal file
26
projects/github.com/json-c/json-c/package.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
distributable:
|
||||
url: https://s3.amazonaws.com/json-c_releases/releases/json-c-{{ version.raw }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: json-c/json-c/tags
|
||||
strip:
|
||||
- /^json-c-/
|
||||
- /-\d{8}/ # calver
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
cmake.org: 3
|
||||
tea.xyz/gx/cc: c99
|
||||
tea.xyz/gx/make: '*'
|
||||
working-directory: build
|
||||
script: |
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX="{{prefix}}" -DCMAKE_BUILD_TYPE=Release
|
||||
make --jobs {{ hw.concurrency }} install
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
script: |
|
||||
cc fixture.c -ljson-c
|
||||
./a.out
|
Loading…
Reference in a new issue