diff options
| author | Michael Forney <mforney@mforney.org> | 2019-11-01 18:51:40 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2019-11-03 13:13:44 -0800 |
| commit | 479b4a9313cd551db129a7a5d399d4a2975f1fb9 (patch) | |
| tree | d03af278dea6096f4b6497d2db48e65de83a2b42 /pkg/libcbor/gen.lua | |
| parent | 4e7ee1fdabed14f5f418e9ee92dcaa62571d9653 (diff) | |
Add libcbor 0.5.0
Diffstat (limited to 'pkg/libcbor/gen.lua')
| -rw-r--r-- | pkg/libcbor/gen.lua | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/pkg/libcbor/gen.lua b/pkg/libcbor/gen.lua new file mode 100644 index 00000000..fd0382c1 --- /dev/null +++ b/pkg/libcbor/gen.lua @@ -0,0 +1,67 @@ +cflags{ + '-Wall', '-pedantic', + '-D HAVE_ENDIAN_H', + '-I $outdir/include', +} + +build('sed', '$outdir/include/cbor/configuration.h', '$srcdir/src/cbor/configuration.h.in', { + expr={ + [[-e 's,$${CBOR_VERSION_MAJOR},0,']], + [[-e 's,$${CBOR_VERSION_MINOR},5,']], + [[-e 's,$${CBOR_VERSION_PATCH},0,']], + [[-e 's,$${CBOR_BUFFER_GROWTH},2,']], + [[-e 's,$${CBOR_RESTRICT_SPECIFIER},restrict,']], + [[-e 's,$${CBOR_INLINE_SPECIFIER},inline,']], + '-e /CBOR_CUSTOM_ALLOC/d', + '-e /CBOR_PRETTY_PRINTER/d', + }, +}) + +pkg.hdrs = { + copy('$outdir/include', '$srcdir/src', { + 'cbor.h', + 'cbor/arrays.h', + 'cbor/bytestrings.h', + 'cbor/callbacks.h', + 'cbor/common.h', + 'cbor/data.h', + 'cbor/encoding.h', + 'cbor/floats_ctrls.h', + 'cbor/ints.h', + 'cbor/maps.h', + 'cbor/serialization.h', + 'cbor/streaming.h', + 'cbor/strings.h', + 'cbor/tags.h', + }), + '$outdir/include/cbor/configuration.h', +} +pkg.deps = {'$dir/headers'} + +lib('libcbor.a', [[ + src/cbor.c + src/cbor/( + streaming.c + internal/( + encoders.c + builder_callbacks.c + loaders.c + memory_utils.c + stack.c + unicode.c + ) + encoding.c + serialization.c + arrays.c + common.c + floats_ctrls.c + bytestrings.c + callbacks.c + strings.c + maps.c + tags.c + ints.c + ) +]]) + +fetch 'git' |
