libcbor: Update to 0.12.0

and pass CMAKE_POLICY_VERSION_MINIMUM to make it build with cmake 4
This commit is contained in:
Christoph Reiter 2025-03-30 10:51:20 +02:00
parent df76c6b105
commit 97229454e7

View File

@ -2,25 +2,26 @@
pkgbase=libcbor
pkgname=("${pkgbase}" "${pkgbase}-devel")
pkgver=0.11.0
pkgrel=2
pkgver=0.12.0
pkgrel=1
pkgdesc="A C library for parsing and generating CBOR, a general-purpose schema-less binary data format"
arch=('i686' 'x86_64')
url="https://github.com/PJK/libcbor"
license=('spdx:MIT')
makedepends=("cmake" "ninja" "gcc")
source=(https://github.com/PJK/libcbor/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7')
sha256sums=('5368add109db559f546d7ed10f440f39a273b073daa8da4abffc83815069fa7f')
build() {
cd ${pkgname}-${pkgver}
cmake . \
cmake \
-GNinja \
-Bbuild \
-S "${pkgname}-${pkgver}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCBOR_CUSTOM_ALLOC=ON \
-DBUILD_SHARED_LIBS=ON
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
cmake --build build
DESTDIR="${srcdir}/dest" cmake --install build
}