pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zoneminder: Add patch extending BSDish systems to NetBSD



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Sun Jan 14 14:25:25 2024 -0500
Changeset:	2bd4dbfe9713490160be702fbd1b96eb45812eb4

Modified Files:
	zoneminder/distinfo
	zoneminder/patches/patch-src_zm__utils.cpp
	zoneminder/patches/patch-src_zm_comms_h
Added Files:
	zoneminder/patches/patch-dep_RtspServer_src_net_EventLoop.cpp
	zoneminder/patches/patch-dep_RtspServer_src_net_Socket.h
	zoneminder/patches/patch-dep_RtspServer_src_net_SocketUtil.cpp
	zoneminder/patches/patch-dep_RtspServer_src_xop_rtsp.h
	zoneminder/patches/patch-src_zm__packet.h

Log Message:
zoneminder: Add patch extending BSDish systems to NetBSD

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2bd4dbfe9713490160be702fbd1b96eb45812eb4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zoneminder/distinfo                                |  9 +++--
 .../patch-dep_RtspServer_src_net_EventLoop.cpp     | 13 +++++++
 .../patches/patch-dep_RtspServer_src_net_Socket.h  | 26 ++++++++++++++
 .../patch-dep_RtspServer_src_net_SocketUtil.cpp    | 40 ++++++++++++++++++++++
 .../patches/patch-dep_RtspServer_src_xop_rtsp.h    | 22 ++++++++++++
 zoneminder/patches/patch-src_zm__packet.h          | 13 +++++++
 zoneminder/patches/patch-src_zm__utils.cpp         |  9 ++++-
 zoneminder/patches/patch-src_zm_comms_h            |  5 ++-
 8 files changed, 133 insertions(+), 4 deletions(-)

diffs:
diff --git a/zoneminder/distinfo b/zoneminder/distinfo
index edccdb5cb5..5e5016bccb 100644
--- a/zoneminder/distinfo
+++ b/zoneminder/distinfo
@@ -13,6 +13,10 @@ BLAKE2s (ZoneMinder-RtspServer-master.tar.gz) = 8a15c1a1f61b218137721b040c96051f
 SHA512 (ZoneMinder-RtspServer-master.tar.gz) = 80f7310d08f8a32f31f332a221e7b63f09246f4c507846082f691936a180d213d10fc5f9a27bbc31a06b89bb0bbf547e476e8d9fad09980d32d97f7fef5c66b8
 Size (ZoneMinder-RtspServer-master.tar.gz) = 1396607 bytes
 SHA1 (patch-CMakeLists.txt) = dca040058ec7b389474dff9853c46f65fd5626da
+SHA1 (patch-dep_RtspServer_src_net_EventLoop.cpp) = 7cf96a916a2210179383581b917983ce94ca2759
+SHA1 (patch-dep_RtspServer_src_net_Socket.h) = 789e90da4bfc15d6d43d942718538385cb6dfade
+SHA1 (patch-dep_RtspServer_src_net_SocketUtil.cpp) = e33695be6c49942d4dd6ddbc5fccc6823d5f0252
+SHA1 (patch-dep_RtspServer_src_xop_rtsp.h) = 469796d824bb26f861d353539ec0e3e09eaeff21
 SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_ConfigData.pm.in) = 3bf4e5e8276a682695db640e6608dd14c7315320
 SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm) = 996670d8a659c0624587da73f8083d9349aaa1ba
 SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_Memory_Shared.pm) = b3de55618915fad3d9263954db71270c800ad6f1
@@ -21,10 +25,11 @@ SHA1 (patch-scripts_zmpkg_pl_in) = eb3166ae3cd9bb0ce1b828b64722506aa4e82368
 SHA1 (patch-src_zm__event.cpp) = 2831f586f140f682dd107a1adb09531c388a1df8
 SHA1 (patch-src_zm__eventstream.cpp) = d2134edf09f142a6a545ca36d3263b13defcadd6
 SHA1 (patch-src_zm__monitor.cpp) = ac6eb821d5d72455b46165e74ea1d321faf9e431
+SHA1 (patch-src_zm__packet.h) = dd0426b46ab9fa192fe0b5ff3ce646b26b9e0749
 SHA1 (patch-src_zm__rtp__ctrl.h) = c0cd9358f63a7eee495db46d07fd3e130616fd62
 SHA1 (patch-src_zm__rtp__source.cpp) = 288b32cff869103b04e96487b92bb12533b29772
-SHA1 (patch-src_zm__utils.cpp) = ba2d2a976f678a590b8895acf05079f619c7a9be
-SHA1 (patch-src_zm_comms_h) = b0fc917e2d54913f96623b723ee32b6e09361722
+SHA1 (patch-src_zm__utils.cpp) = e16ffd3f41bd05a32c80142e7246307df12801a8
+SHA1 (patch-src_zm_comms_h) = 33577ab0eac62eadc415fe6fb970b82eb473c8e7
 SHA1 (patch-src_zm_logger_cpp) = 1d3d2a6baef1abe762ede06aaf393e5bc2e2080e
 SHA1 (patch-src_zm_remote_camera_h) = 2f774924338b9e42e7bcaa1701af72861ea62c22
 SHA1 (patch-src_zm_signal_cpp) = af9625702518648b8d62ed20d0d52c1a2a27841a
diff --git a/zoneminder/patches/patch-dep_RtspServer_src_net_EventLoop.cpp b/zoneminder/patches/patch-dep_RtspServer_src_net_EventLoop.cpp
new file mode 100644
index 0000000000..3a7132de8f
--- /dev/null
+++ b/zoneminder/patches/patch-dep_RtspServer_src_net_EventLoop.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- dep/RtspServer/src/net/EventLoop.cpp.orig	2024-01-14 21:16:28.747478445 +0000
++++ dep/RtspServer/src/net/EventLoop.cpp
+@@ -60,7 +60,7 @@ void EventLoop::Loop()
+ 	{
+ #if defined(__linux) || defined(__linux__)
+ 		std::shared_ptr<TaskScheduler> task_scheduler_ptr(new EpollTaskScheduler(n));
+-#elif defined(WIN32) || defined(_WIN32) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#elif defined(WIN32) || defined(_WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ 		std::shared_ptr<TaskScheduler> task_scheduler_ptr(new SelectTaskScheduler(n));
+ #endif
+ 		task_schedulers_.push_back(task_scheduler_ptr);
diff --git a/zoneminder/patches/patch-dep_RtspServer_src_net_Socket.h b/zoneminder/patches/patch-dep_RtspServer_src_net_Socket.h
new file mode 100644
index 0000000000..d754d00a0e
--- /dev/null
+++ b/zoneminder/patches/patch-dep_RtspServer_src_net_Socket.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+Extend BSDish OS detection to NetBSD.
+
+Not yet filed upstream.
+
+--- dep/RtspServer/src/net/Socket.h.orig	2024-01-14 21:10:13.216456825 +0000
++++ dep/RtspServer/src/net/Socket.h
+@@ -4,7 +4,7 @@
+ #ifndef XOP_SOCKET_H
+ #define XOP_SOCKET_H
+ 
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <sys/types.h>         
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+@@ -17,7 +17,7 @@
+ #include <net/ethernet.h>   
+ #endif
+ 
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <net/route.h>  
+ #include <netdb.h>
+ #include <net/if.h>
diff --git a/zoneminder/patches/patch-dep_RtspServer_src_net_SocketUtil.cpp b/zoneminder/patches/patch-dep_RtspServer_src_net_SocketUtil.cpp
new file mode 100644
index 0000000000..22247bf00c
--- /dev/null
+++ b/zoneminder/patches/patch-dep_RtspServer_src_net_SocketUtil.cpp
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- dep/RtspServer/src/net/SocketUtil.cpp.orig	2024-01-14 21:17:15.225438102 +0000
++++ dep/RtspServer/src/net/SocketUtil.cpp
+@@ -23,7 +23,7 @@ bool SocketUtil::Bind(SOCKET sockfd, std
+ 
+ void SocketUtil::SetNonBlock(SOCKET fd)
+ {
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+     int flags = fcntl(fd, F_GETFL, 0);
+     fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+ #elif defined(WIN32) || defined(_WIN32)
+@@ -34,7 +34,7 @@ void SocketUtil::SetNonBlock(SOCKET fd)
+ 
+ void SocketUtil::SetBlock(SOCKET fd, int write_timeout)
+ {
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+     int flags = fcntl(fd, F_GETFL, 0);
+     fcntl(fd, F_SETFL, flags&(~O_NONBLOCK));
+ #elif defined(WIN32) || defined(_WIN32)
+@@ -45,7 +45,7 @@ void SocketUtil::SetBlock(SOCKET fd, int
+     if(write_timeout > 0)
+     {
+ #ifdef SO_SNDTIMEO
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+     struct timeval tv = {write_timeout/1000, (write_timeout%1000)*1000};
+     setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (char*)&tv, sizeof tv);
+ #elif defined(WIN32) || defined(_WIN32)
+@@ -168,7 +168,7 @@ int SocketUtil::GetPeerAddr(SOCKET sockf
+ 
+ void SocketUtil::Close(SOCKET sockfd)
+ {
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+     ::close(sockfd);
+ #elif defined(WIN32) || defined(_WIN32)
+     ::closesocket(sockfd);
diff --git a/zoneminder/patches/patch-dep_RtspServer_src_xop_rtsp.h b/zoneminder/patches/patch-dep_RtspServer_src_xop_rtsp.h
new file mode 100644
index 0000000000..787be28fe4
--- /dev/null
+++ b/zoneminder/patches/patch-dep_RtspServer_src_xop_rtsp.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- dep/RtspServer/src/xop/rtsp.h.orig	2024-01-14 21:21:34.574730494 +0000
++++ dep/RtspServer/src/xop/rtsp.h
+@@ -51,7 +51,7 @@ public:
+ 		char ip[100] = { 0 };
+ 		char suffix[100] = { 0 };
+ 		uint16_t port = 0;
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__)  || defined(__NetBSD__)|| defined(__OpenBSD__)
+ 		if (sscanf(url.c_str() + 7, "%[^:]:%hu/%s", ip, &port, suffix) == 3)
+ #elif defined(WIN32) || defined(_WIN32)
+ 		if (sscanf_s(url.c_str() + 7, "%[^:]:%hu/%s", ip, 100, &port, suffix, 100) == 3)
+@@ -59,7 +59,7 @@ public:
+ 		{
+ 			rtsp_url_info_.port = port;
+ 		}
+-#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
++#if defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ 		else if (sscanf(url.c_str() + 7, "%[^/]/%s", ip, suffix) == 2)
+ #elif defined(WIN32) || defined(_WIN32)
+ 		else if (sscanf_s(url.c_str() + 7, "%[^/]/%s", ip, 100, suffix, 100) == 2)
diff --git a/zoneminder/patches/patch-src_zm__packet.h b/zoneminder/patches/patch-src_zm__packet.h
new file mode 100644
index 0000000000..3bf90a8d9e
--- /dev/null
+++ b/zoneminder/patches/patch-src_zm__packet.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/zm_packet.h.orig	2024-01-14 21:29:59.095197872 +0000
++++ src/zm_packet.h
+@@ -32,7 +32,7 @@ extern "C" {
+ #include <libavformat/avformat.h>
+ }
+ 
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/time.h>
+ #endif // __FreeBSD__
+ 
diff --git a/zoneminder/patches/patch-src_zm__utils.cpp b/zoneminder/patches/patch-src_zm__utils.cpp
index 448dd615ef..3b85dd34c0 100644
--- a/zoneminder/patches/patch-src_zm__utils.cpp
+++ b/zoneminder/patches/patch-src_zm__utils.cpp
@@ -15,7 +15,14 @@ Fix time types (sizes).
  }
  
  /* Detect special hardware features, such as SIMD instruction sets */
-@@ -238,6 +238,10 @@ void HwCapsDetect() {
+@@ -231,13 +231,15 @@ void HwCapsDetect() {
+   unsigned long auxval = 0;
+   elf_aux_info(AT_HWCAP, &auxval, sizeof(auxval));
+   if (auxval & HWCAP_NEON) {
+-  #error Unsupported OS.
+-  #endif
+     Debug(1,"Detected ARM (AArch32) processor with Neon");
+     neonversion = 1;
    } else {
      Debug(1,"Detected ARM (AArch32) processor");
    }
diff --git a/zoneminder/patches/patch-src_zm_comms_h b/zoneminder/patches/patch-src_zm_comms_h
index 51757be7a7..919ca77f3b 100644
--- a/zoneminder/patches/patch-src_zm_comms_h
+++ b/zoneminder/patches/patch-src_zm_comms_h
@@ -9,7 +9,7 @@ https://github.com/ZoneMinder/zoneminder/commit/417421b1d869d1b71c8ec1a1e3b082fc
 
 --- src/zm_comms.h.orig	2023-02-23 21:44:01.000000000 +0000
 +++ src/zm_comms.h
-@@ -22,18 +22,27 @@
+@@ -22,18 +22,30 @@
  
  #include "zm_exception.h"
  #include "zm_logger.h"
@@ -24,6 +24,9 @@ https://github.com/ZoneMinder/zoneminder/commit/417421b1d869d1b71c8ec1a1e3b082fc
  #include <unistd.h>
 -#include <vector>
 +
++#include <errno.h>
++#include <string.h>
++
 +/* \todo Validate this addition. */
 +#include <stdlib.h>
 +#include <time.h>


Home | Main Index | Thread Index | Old Index