|
root / base / msgpack-c
msgpack-c Plain Text 53 lines 1.7 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh
# Build script for msgpack-c (CMake, Ninja generator). CMake doesn't
# recognize Hammerhead and won't set UNIX=TRUE / pick the right shared-lib
# conventions without a Platform module (same gotcha as base/neovim's and
# base/libjpeg-turbo's cmake builds) - map it to the SunOS platform module.
#
# This is the C-only "c-<ver>" release tag (NOT the C++ "cpp-" tag), so
# there is no MSGPACK_ENABLE_CXX option to disable here.
set -e
cd "$SRCDIR"

mkdir -p "$SRCDIR/.cmake/Platform"
echo 'include(Platform/SunOS)' > "$SRCDIR/.cmake/Platform/Hammerhead.cmake"

export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"

cmake -B build -G Ninja \
    -DCMAKE_MODULE_PATH="$SRCDIR/.cmake" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="$PREFIX" \
    -DCMAKE_INSTALL_RPATH="$PREFIX/lib" \
    -DCMAKE_C_FLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS" \
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
    -DMSGPACK_BUILD_TESTS=OFF \
    -DMSGPACK_BUILD_EXAMPLES=OFF

cmake --build build -j${JOBS:-1}
DESTDIR="$PKGDIR" cmake --install build
# msgpack-c - MessagePack binary serialization, C library (neovim RPC)
# https://github.com/msgpack/msgpack-c

[package]
name = "msgpack-c"
version = "7.0.1"
release = 1
description = "MessagePack binary-based object serialization library for C"
url = "https://github.com/msgpack/msgpack-c"
license = "BSL-1.0"
maintainer = "Chris Tusa <chris.tusa@leafscale.com>"
arch = "x86_64"

[dependencies]
runtime = []
build = []

[[source]]
file = "msgpack-c-7.0.1.tar.gz"
urls = ["https://github.com/msgpack/msgpack-c/archive/refs/tags/c-7.0.1.tar.gz"]
checksum = "1a8f85d21418d118af953043146f727b9b08d78ad85ed17cd6aa0b568f60f1d7"

[build]
parallel = true