pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
devel/libks: Add libks version 2.0.6
Module Name: pkgsrc-wip
Committed By: Rob Goodall <rob%buglawton.com@localhost>
Pushed By: rsg
Date: Sun Feb 2 16:48:15 2025 +0000
Changeset: 9cb03ae69ec51c879b5cf44b8be9a3bb13a5603e
Modified Files:
Makefile
Added Files:
libks/DESCR
libks/Makefile
libks/PLIST
libks/buildlink3.mk
libks/distinfo
libks/patches/patch-CMakeLists.txt
libks/patches/patch-cmake_ksutil.cmake
libks/patches/patch-src_ks__thread.c
Log Message:
devel/libks: Add libks version 2.0.6
Foundational support for signalwire C products
Packaged in wip by Rob Goodall
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9cb03ae69ec51c879b5cf44b8be9a3bb13a5603e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
libks/DESCR | 1 +
libks/Makefile | 27 +++++++++++++++++++++++
libks/PLIST | 40 ++++++++++++++++++++++++++++++++++
libks/buildlink3.mk | 13 +++++++++++
libks/distinfo | 8 +++++++
libks/patches/patch-CMakeLists.txt | 14 ++++++++++++
libks/patches/patch-cmake_ksutil.cmake | 32 +++++++++++++++++++++++++++
libks/patches/patch-src_ks__thread.c | 15 +++++++++++++
9 files changed, 151 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 5f7a0a4bc3..b1ccdd6fb7 100644
--- a/Makefile
+++ b/Makefile
@@ -2071,6 +2071,7 @@ SUBDIR+= libjdksmidi
SUBDIR+= libjingle
SUBDIR+= libjxl
SUBDIR+= libkml
+SUBDIR+= libks
SUBDIR+= liblingoteach
SUBDIR+= libltc
SUBDIR+= libm4ri
diff --git a/libks/DESCR b/libks/DESCR
new file mode 100644
index 0000000000..ac1c7d5dc4
--- /dev/null
+++ b/libks/DESCR
@@ -0,0 +1 @@
+Foundational support for signalwire C products
diff --git a/libks/Makefile b/libks/Makefile
new file mode 100644
index 0000000000..521db98af2
--- /dev/null
+++ b/libks/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD$
+
+GITHUB_TAG= v${PKGVERSION_NOREV}
+DISTNAME= libks-2.0.6
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=signalwire/}
+
+MAINTAINER= rob%buglawton.com@localhost
+HOMEPAGE= https://github.com/signalwire/libks/
+COMMENT= Foundational support for signalwire C products
+LICENSE= mit AND public-domain AND modified-bsd
+
+USE_TOOLS+= cmake pkg-config
+USE_LANGUAGES= c c++
+WRKSRC= ${WRKDIR}/${DISTNAME}
+PKGCONFIG_OVERRIDE+= libks.pc.in
+MAKE_ENV+= GCC=yes
+
+CMAKE_ARGS+= -DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX:PATH=/usr/pkg
+
+
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../misc/rhash/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../mk/pthread.builtin.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/libks/PLIST b/libks/PLIST
new file mode 100755
index 0000000000..ca311c1ed4
--- /dev/null
+++ b/libks/PLIST
@@ -0,0 +1,40 @@
+@comment $NetBSD$
+include/libks2/libks/cmake/AddLibBacktrace.cmake
+include/libks2/libks/cmake/FindPCRE.cmake
+include/libks2/libks/cmake/LibKS2Config-release.cmake
+include/libks2/libks/cmake/LibKS2Config.cmake
+include/libks2/libks/cmake/ksutil.cmake
+include/libks2/libks/ks.h
+include/libks2/libks/ks_acl.h
+include/libks2/libks/ks_atomic.h
+include/libks2/libks/ks_base64.h
+include/libks2/libks/ks_buffer.h
+include/libks2/libks/ks_config.h
+include/libks2/libks/ks_debug.h
+include/libks2/libks/ks_dso.h
+include/libks2/libks/ks_env.h
+include/libks2/libks/ks_hash.h
+include/libks2/libks/ks_json.h
+include/libks2/libks/ks_json_check.h
+include/libks2/libks/ks_log.h
+include/libks2/libks/ks_metrics.h
+include/libks2/libks/ks_platform.h
+include/libks2/libks/ks_pool.h
+include/libks2/libks/ks_printf.h
+include/libks2/libks/ks_q.h
+include/libks2/libks/ks_sb.h
+include/libks2/libks/ks_socket.h
+include/libks2/libks/ks_ssl.h
+include/libks2/libks/ks_string.h
+include/libks2/libks/ks_thread_pool.h
+include/libks2/libks/ks_threadmutex.h
+include/libks2/libks/ks_time.h
+include/libks2/libks/ks_types.h
+include/libks2/libks/ks_utf8.h
+include/libks2/libks/ks_uuid.h
+include/libks2/libks/kws.h
+include/libks2/libks/simclist.h
+lib/libks2.so
+lib/libks2.so.2
+lib/pkgconfig/libks2.pc
+share/doc/libks2/copyright
diff --git a/libks/buildlink3.mk b/libks/buildlink3.mk
new file mode 100644
index 0000000000..17469c1adf
--- /dev/null
+++ b/libks/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.6 2023/10/21 17:09:53 gdt Exp $
+
+BUILDLINK_TREE+= libks
+
+.if !defined(LIBKS_BUILDLINK3_MK)
+LIBKS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libks+= libks>=2.0.6
+BUILDLINK_PKGSRCDIR.libks?= ../../wip/libks
+
+.endif # LIBKS_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libks
diff --git a/libks/distinfo b/libks/distinfo
new file mode 100644
index 0000000000..b0814bca33
--- /dev/null
+++ b/libks/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (libks-2.0.6.tar.gz) = cce1f2f22586443fc70fcb6e1f97ffc86d5a321b
+RMD160 (libks-2.0.6.tar.gz) = 3c9bcf56c4c2c762d8d094d0a7a3726436523e2a
+Size (libks-2.0.6.tar.gz) = 238880 bytes
+SHA1 (patch-CMakeLists.txt) = d019b9c8f46a01a87394c5aa3f4eed071d14be25
+SHA1 (patch-cmake_ksutil.cmake) = e4ab71a407582c954a9f929e4e6d6192831b0d4e
+SHA1 (patch-src_ks__thread.c) = 6180a7e02f68377ba4fd3e287ffffe7a35063f9d
diff --git a/libks/patches/patch-CMakeLists.txt b/libks/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..ba275db476
--- /dev/null
+++ b/libks/patches/patch-CMakeLists.txt
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Work around. Skip tests.
+
+--- CMakeLists.txt.orig 2024-07-23 20:48:07.000000000 +0000
++++ CMakeLists.txt 2024-09-19 17:08:21.421459585 +0000
+@@ -610,7 +610,6 @@
+
+ # Add tests
+ enable_testing()
+-add_subdirectory(tests)
+
+ if (WITH_KS_TEST)
+ enable_testing()
diff --git a/libks/patches/patch-cmake_ksutil.cmake b/libks/patches/patch-cmake_ksutil.cmake
new file mode 100644
index 0000000000..8624feee44
--- /dev/null
+++ b/libks/patches/patch-cmake_ksutil.cmake
@@ -0,0 +1,32 @@
+$NetBSD$
+
+Added options for UNIX (not Mac, Windows or Linux).
+
+--- cmake/ksutil.cmake.orig 2024-07-23 20:48:07.000000000 +0000
++++ cmake/ksutil.cmake
+@@ -114,6 +114,25 @@ macro(ksutil_setup_platform)
+ set(CMAKE_POSITION_INDEPENDENT_CODE YES)
+ add_definitions("-DKS_PLAT_MAC=1")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
++ elseif (UNIX)
++ message("Platform is UNIX")
++ set(KS_PLAT_UNIX 1 CACHE INTERNAL "Platform definition" FORCE)
++ add_compile_options("$<$<CONFIG:Release>:-O2>")
++ add_compile_options("$<$<CONFIG:Release>:-g>")
++ add_compile_options("$<$<CONFIG:Release>:-Wno-parentheses>")
++ add_compile_options("$<$<CONFIG:Release>:-Wno-pointer-sign>")
++ add_compile_options("$<$<CONFIG:Release>:-Wno-switch>")
++
++ add_compile_options("$<$<CONFIG:Debug>:-O0>")
++ add_compile_options("$<$<CONFIG:Debug>:-g>")
++ add_compile_options("$<$<CONFIG:Debug>:-DKS_BUILD_DEBUG=1>")
++ add_compile_options("$<$<CONFIG:Debug>:-Wno-parentheses>")
++ add_compile_options("$<$<CONFIG:Debug>:-Wno-pointer-sign>")
++ add_compile_options("$<$<CONFIG:Debug>:-Wno-switch>")
++
++ set(CMAKE_POSITION_INDEPENDENT_CODE YES)
++ add_definitions("-DKS_PLAT_UNIX=1")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
+ elseif (WIN32)
+ message("Platform is windows")
+ set(KS_PLAT_WIN 1 CACHE INTERNAL "Platform definition" FORCE)
diff --git a/libks/patches/patch-src_ks__thread.c b/libks/patches/patch-src_ks__thread.c
new file mode 100644
index 0000000000..8d516006bf
--- /dev/null
+++ b/libks/patches/patch-src_ks__thread.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add extra field required by pthread_setname_np.
+
+--- src/ks_thread.c.orig 2024-07-23 20:48:07.000000000 +0000
++++ src/ks_thread.c
+@@ -169,7 +169,7 @@ static void *KS_THREAD_CALLING_CONVENTIO
+ pthread_setname_np(thread->tag);
+ #else
+ if (thread->tag && pthread_setname_np)
+- pthread_setname_np(pthread_self(), thread->tag);
++ pthread_setname_np(pthread_self(), thread->tag, NULL);
+ #endif
+
+ ks_log(KS_LOG_DEBUG, "START call user thread callback with address: %p, tid: %8.8x\n", (void *)thread, thread->id);
Home |
Main Index |
Thread Index |
Old Index