mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 10:25:05 +03:00
new file: projects/github.com/open-source-parsers/jsoncpp/package.yml
new file: projects/github.com/open-source-parsers/jsoncpp/test.cpp
This commit is contained in:
parent
355a995441
commit
5b2c33b880
2 changed files with 39 additions and 0 deletions
30
projects/github.com/open-source-parsers/jsoncpp/package.yml
Normal file
30
projects/github.com/open-source-parsers/jsoncpp/package.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
distributable:
|
||||
url: https://github.com/open-source-parsers/jsoncpp/archive/{{version}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: open-source-parsers/jsoncpp
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
tea.xyz/gx/make: '*'
|
||||
mesonbuild.com: '*'
|
||||
ninja-build.org: '*'
|
||||
script: |
|
||||
meson setup build $ARGS
|
||||
meson compile -C build --verbose
|
||||
meson install -C build
|
||||
env:
|
||||
ARGS:
|
||||
- --prefix="{{prefix}}"
|
||||
- --libdir="{{prefix}}/lib"
|
||||
- --buildtype=release
|
||||
- --wrap-mode=nofallback
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
script: |
|
||||
g++ -std=c++11 ./test.cpp -o test -ljsoncpp
|
||||
./test
|
9
projects/github.com/open-source-parsers/jsoncpp/test.cpp
Normal file
9
projects/github.com/open-source-parsers/jsoncpp/test.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include <json/json.h>
|
||||
int main() {
|
||||
Json::Value root;
|
||||
Json::CharReaderBuilder builder;
|
||||
std::string errs;
|
||||
std::istringstream stream1;
|
||||
stream1.str("[1, 2, 3]");
|
||||
return Json::parseFromStream(builder, stream1, &root, &errs) ? 0: 1;
|
||||
}
|
Loading…
Reference in a new issue