Hi,
when trying to build editors/emacs,no_x11 I noticed that cmake (and thus python) were needed to build jansson. That's a bit much in my book. It turns out that upstream jansson seems to advertize ./configure instead of cmake. Also: - the autotools build provides shared and static libs by default, no need for a patch - the autotools build uses -Wl,--version-script thus the list of exported symbols shrinks a lot, which avoids potential conflicts with other libraries Looking for oks. The cmake files aren't installed anymore, I'll try to find out whether that's a problem. Index: Makefile =================================================================== RCS file: /d/cvs/ports/devel/jansson/Makefile,v retrieving revision 1.15 diff -u -p -r1.15 Makefile --- Makefile 30 Oct 2020 17:17:00 -0000 1.15 +++ Makefile 9 Jul 2021 10:08:32 -0000 @@ -3,9 +3,9 @@ COMMENT = library for manipulating JSON data DISTNAME = jansson-2.12 -REVISION = 0 +REVISION = 1 -SHARED_LIBS = jansson 3.2 +SHARED_LIBS = jansson 4.0 CATEGORIES = devel @@ -18,10 +18,6 @@ PERMIT_PACKAGE = Yes MASTER_SITES = https://digip.org/jansson/releases/ -MODULES = devel/cmake - -CONFIGURE_ARGS += -DJANSSON_BUILD_SHARED_LIBS=ON \ - -DJANSSON_BUILD_DOCS=OFF \ - -DJANSSON_EXAMPLES=OFF +CONFIGURE_STYLE = gnu .include <bsd.port.mk> Index: patches/patch-CMakeLists_txt =================================================================== RCS file: patches/patch-CMakeLists_txt diff -N patches/patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 12 Dec 2018 15:09:14 -0000 1.6 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,42 +0,0 @@ -$OpenBSD: patch-CMakeLists_txt,v 1.6 2018/12/12 15:09:14 sthen Exp $ - -Index: CMakeLists.txt ---- CMakeLists.txt.orig -+++ CMakeLists.txt -@@ -358,19 +358,19 @@ if(JANSSON_BUILD_SHARED_LIBS) - ${JANSSON_HDR_PRIVATE} - ${JANSSON_HDR_PUBLIC} - src/jansson.def) -- - set_target_properties(jansson PROPERTIES - VERSION ${JANSSON_VERSION} - SOVERSION ${JANSSON_SOVERSION}) --else() -- add_library(jansson STATIC -- ${JANSSON_SRC} -- ${JANSSON_HDR_PRIVATE} -- ${JANSSON_HDR_PUBLIC}) -- set_target_properties(jansson PROPERTIES -- POSITION_INDEPENDENT_CODE true) - endif() - -+add_library(janssonstatic STATIC -+ ${JANSSON_SRC} -+ ${JANSSON_HDR_PRIVATE} -+ ${JANSSON_HDR_PUBLIC}) -+set_target_properties(janssonstatic PROPERTIES -+ OUTPUT_NAME jansson -+ POSITION_INDEPENDENT_CODE true) -+ - if (JANSSON_EXAMPLES) - add_executable(simple_parse "${CMAKE_CURRENT_SOURCE_DIR}/examples/simple_parse.c") - target_link_libraries(simple_parse jansson) -@@ -652,7 +652,7 @@ configure_package_config_file( - # - option(JANSSON_INSTALL "Generate installation target" ON) - if (JANSSON_INSTALL) -- install(TARGETS jansson -+ install(TARGETS jansson janssonstatic - EXPORT janssonTargets - LIBRARY DESTINATION "lib" - ARCHIVE DESTINATION "lib" Index: pkg/PLIST =================================================================== RCS file: /d/cvs/ports/devel/jansson/pkg/PLIST,v retrieving revision 1.4 diff -u -p -r1.4 PLIST --- pkg/PLIST 12 Dec 2018 15:09:14 -0000 1.4 +++ pkg/PLIST 9 Jul 2021 09:47:39 -0000 @@ -1,12 +1,7 @@ @comment $OpenBSD: PLIST,v 1.4 2018/12/12 15:09:14 sthen Exp $ include/jansson.h include/jansson_config.h -lib/cmake/ -lib/cmake/jansson/ -lib/cmake/jansson/janssonConfig.cmake -lib/cmake/jansson/janssonConfigVersion.cmake -lib/cmake/jansson/janssonTargets${MODCMAKE_BUILD_SUFFIX} -lib/cmake/jansson/janssonTargets.cmake -lib/libjansson.a +@static-lib lib/libjansson.a +lib/libjansson.la @lib lib/libjansson.so.${LIBjansson_VERSION} lib/pkgconfig/jansson.pc -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
