Adam Wolk <adam.w...@tintagel.pl> writes: > Hi ports@ > > This is my first shared lib port so go nuts and have fun ;) > > Known issues/questions: > 1. Had to patch out set(SOVERSION "5") as it overwrote what the port > set in SHARED_LIBS.
Actually the cmake port has support for automatically set the proper version. But you have to name stuff appropriately, see below. > 2. The port is able to build a static library but I only need the > shared one so didn't bother delivering that one. If there's interest I > might look into it. If there's no good reason to disable it, ship it. > 3. I am not building sample server & client applications along the > port. Does that mean that they are useless? Could they be used as testcases? Right now this port ought to set NO_TEST=Yes > 4. I am not installing upstream supplied CMake FindLibWebSockets.cmake > script (should I?). No idea. > 5. I name the port devel/libwebsockets because upstream examples all > include <libwebsockets.h> and that's also the domain they use for the > port (libwebsockets.org). > > $ cat > pkg/DESCR Libwebsockets is a lightweight pure C library built to use > minimal CPU and memory resources, and provide fast throughput in both > directions. Updated tarball attached, with the following changes: - ship static lib ans remove SHARED_ONLY - correctly name the entry in SHARED_LIBS, removing the need for -DSOVERSION and the patch - add NO_TEST=Yes I'd prefer to put this port in the "www" category. diff -pruN libwebsockets.orig/Makefile libwebsockets/Makefile --- libwebsockets.orig/Makefile Wed Nov 11 21:47:41 2015 +++ libwebsockets/Makefile Thu Nov 12 00:02:06 2015 @@ -1,13 +1,11 @@ -# $OpenBSD: $ +# $OpenBSD$ -SHARED_ONLY = Yes - COMMENT = lightweight C library for fast bi-directional websockets DISTNAME = libwebsockets-1.5-chrome47-firefox41 PKGNAME = libwebsockets-1.5 -SHARED_LIBS = libwebsockets 0.0 # 5 +SHARED_LIBS = websockets 0.0 # 5 CATEGORIES = devel @@ -22,12 +20,12 @@ MASTER_SITES = http://git.libwebsockets.org/cgi-bin/c WANTLIB += crypto m ssl z -SEPARATE_BUILD = yes +SEPARATE_BUILD = Yes MODULES = devel/cmake -CONFIGURE_ARGS += -DLWS_WITHOUT_TESTAPPS=ON \ - -DLWS_WITH_STATIC=OFF \ - -DSOVERSION=${LIBlibwebsockets_VERSION} +CONFIGURE_ARGS += -DLWS_WITHOUT_TESTAPPS=ON + +NO_TEST = Yes .include <bsd.port.mk> diff -pruN libwebsockets.orig/patches/patch-CMakeLists_txt libwebsockets/patches/patch-CMakeLists_txt --- libwebsockets.orig/patches/patch-CMakeLists_txt Wed Nov 11 21:42:23 2015 +++ libwebsockets/patches/patch-CMakeLists_txt Thu Jan 1 01:00:00 1970 @@ -1,11 +0,0 @@ -$OpenBSD$ ---- CMakeLists.txt.orig Wed Nov 11 21:37:49 2015 -+++ CMakeLists.txt Wed Nov 11 21:38:08 2015 -@@ -13,7 +13,6 @@ set(CPACK_PACKAGE_VERSION_MINOR "5") - set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") - set(CPACK_PACKAGE_VENDOR "a...@warmcat.com") - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE} ${PACKAGE_VERSION}") --set(SOVERSION "5") - set(CPACK_SOURCE_GENERATOR "TGZ") - set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") - set(VERSION "${CPACK_PACKAGE_VERSION}") diff -pruN libwebsockets.orig/pkg/PLIST libwebsockets/pkg/PLIST --- libwebsockets.orig/pkg/PLIST Wed Nov 11 16:24:33 2015 +++ libwebsockets/pkg/PLIST Wed Nov 11 23:37:30 2015 @@ -1,5 +1,6 @@ @comment $OpenBSD$ include/libwebsockets.h include/lws_config.h -@lib lib/libwebsockets.so.${LIBlibwebsockets_VERSION} +lib/libwebsockets.a +@lib lib/libwebsockets.so.${LIBwebsockets_VERSION} lib/pkgconfig/libwebsockets.pc
libwebsockets.tgz
Description: Binary data
-- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE