27 lines
806 B
Plaintext
27 lines
806 B
Plaintext
# Description: C library for parsing and generating CBOR, the general-purpose schema-less binary data format
|
|
# URL: https://github.com/PJK/libcbor
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on:
|
|
# Optional: cmocka
|
|
|
|
name=libcbor
|
|
version=0.11.0
|
|
release=1
|
|
source=(https://github.com/PJK/libcbor/archive/v$version/$name-$version.tar.gz)
|
|
|
|
build() {
|
|
prt-get isinst cmocka && PKGMK_LIBCBOR+=' -D WITH_TESTS=OFF'
|
|
|
|
cmake -S $name-$version -B build -G Ninja $PKGMK_LIBCBOR \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-D BUILD_SHARED_LIBS=ON \
|
|
-D WITH_EXAMPLES=OFF \
|
|
-Wno-dev
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
}
|