diff --git a/devel/libcbor/Makefile b/devel/libcbor/Makefile index 6e9fd56750fb..aad94b0a4ec0 100644 --- a/devel/libcbor/Makefile +++ b/devel/libcbor/Makefile @@ -1,25 +1,36 @@ PORTNAME= libcbor PORTVERSION= 0.12.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= sunpoet@FreeBSD.org COMMENT= CBOR protocol implementation for C and others WWW= https://github.com/PJK/libcbor LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.md LIB_DEPENDS= libcjson.so:devel/libcjson USES= cmake pathfix -CMAKE_OFF= CBOR_CUSTOM_ALLOC COVERAGE HUGE_FUZZ PRINT_FUZZ SANE_MALLOC SANITIZE WITH_EXAMPLES WITH_TESTS -CMAKE_ON= BUILD_SHARED_LIBS CBOR_PRETTY_PRINTER CMAKE_SKIP_INSTALL_ALL_DEPENDENCY +CMAKE_OFF= CBOR_CUSTOM_ALLOC \ + CMAKE_INTERPROCEDURAL_OPTIMIZATION \ + COVERAGE \ + HUGE_FUZZ \ + PRINT_FUZZ \ + SANE_MALLOC \ + SANITIZE \ + WITH_EXAMPLES \ + WITH_TESTS +CMAKE_ON= BUILD_SHARED_LIBS \ + CBOR_PRETTY_PRINTER \ + CMAKE_SKIP_INSTALL_ALL_DEPENDENCY PLIST_SUB= PORTVERSION=${PORTVERSION} GH_ACCOUNT= PJK USE_GITHUB= yes .include diff --git a/devel/libcbor/files/patch-src-CMakeLists.txt b/devel/libcbor/files/patch-src-CMakeLists.txt index 66d7bece4669..c185c1e95c59 100644 --- a/devel/libcbor/files/patch-src-CMakeLists.txt +++ b/devel/libcbor/files/patch-src-CMakeLists.txt @@ -1,11 +1,40 @@ ---- src/CMakeLists.txt.orig 2025-03-16 19:29:33 UTC +--- src/CMakeLists.txt.orig 2025-05-06 17:51:02 UTC +++ src/CMakeLists.txt -@@ -62,7 +62,7 @@ set_target_properties( +@@ -29,12 +29,19 @@ add_library(cbor ${SOURCES}) + endif() + + add_library(cbor ${SOURCES}) ++add_library(cbor_static STATIC ${SOURCES}) + target_include_directories(cbor PUBLIC + $ + $ + $ + $) ++target_include_directories(cbor_static PUBLIC ++ $ ++ $ ++ $ ++ $) + set_target_properties(cbor PROPERTIES EXPORT_NAME libcbor) ++set_target_properties(cbor_static PROPERTIES OUTPUT_NAME cbor) + # For vendored builds + add_library(libcbor::libcbor ALIAS cbor) + +@@ -62,7 +69,7 @@ set_target_properties( PROPERTIES VERSION ${CBOR_VERSION} MACHO_COMPATIBILITY_VERSION ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}.0 - SOVERSION ${CBOR_VERSION_MAJOR}.${CBOR_VERSION_MINOR}) + SOVERSION ${CBOR_VERSION_MAJOR}) join_paths(libdir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_LIBDIR}") join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}") +@@ -70,7 +77,7 @@ install( + + # http://www.cmake.org/Wiki/CMake:Install_Commands + install( +- TARGETS cbor ++ TARGETS cbor cbor_static + EXPORT libcborTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/devel/libcbor/pkg-plist b/devel/libcbor/pkg-plist index 2d3669f157c2..cfbb3567abaa 100644 --- a/devel/libcbor/pkg-plist +++ b/devel/libcbor/pkg-plist @@ -1,30 +1,31 @@ include/cbor.h include/cbor/arrays.h include/cbor/bytestrings.h include/cbor/callbacks.h include/cbor/cbor_export.h include/cbor/common.h include/cbor/configuration.h include/cbor/data.h include/cbor/encoding.h include/cbor/floats_ctrls.h include/cbor/internal/builder_callbacks.h include/cbor/internal/encoders.h include/cbor/internal/loaders.h include/cbor/internal/memory_utils.h include/cbor/internal/stack.h include/cbor/internal/unicode.h include/cbor/ints.h include/cbor/maps.h include/cbor/serialization.h include/cbor/streaming.h include/cbor/strings.h include/cbor/tags.h lib/cmake/libcbor/libcborConfig.cmake lib/cmake/libcbor/libcborConfigVersion.cmake lib/cmake/libcbor/libcborTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/libcbor/libcborTargets.cmake +lib/libcbor.a lib/libcbor.so lib/libcbor.so.0 lib/libcbor.so.%%PORTVERSION%% libdata/pkgconfig/libcbor.pc