pkgsrc-WIP-changes archive

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

zoneminder: Update progress



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Tue Sep 27 08:31:39 2022 -0400
Changeset:	057180fc10e1ebcecdc626adb05b59c092e7208c

Modified Files:
	zoneminder/COMMIT_MSG
	zoneminder/Makefile
	zoneminder/distinfo
	zoneminder/patches/patch-src_zm__thread.h
	zoneminder/patches/patch-src_zm__timer.h
Added Files:
	zoneminder/patches/patch-src_zm__eventstream.cpp

Log Message:
zoneminder: Update progress

  - Remove vestigial polkit avoidance
  - NetBSD thread it support
  - Depend on mp4v2
  - Patch out sendfile logic

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

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

diffstat:
 zoneminder/COMMIT_MSG                            |  4 +--
 zoneminder/Makefile                              |  8 +-----
 zoneminder/distinfo                              |  5 ++--
 zoneminder/patches/patch-src_zm__eventstream.cpp | 17 ++++++++++++
 zoneminder/patches/patch-src_zm__thread.h        | 34 +++++++++++++++++++-----
 zoneminder/patches/patch-src_zm__timer.h         |  2 +-
 6 files changed, 52 insertions(+), 18 deletions(-)

diffs:
diff --git a/zoneminder/COMMIT_MSG b/zoneminder/COMMIT_MSG
index 6e3048323a..f9ecc68328 100644
--- a/zoneminder/COMMIT_MSG
+++ b/zoneminder/COMMIT_MSG
@@ -3,8 +3,8 @@ security/zoneminder: Update to 1.32.3
 Welcome to 2018.
 
 Packaging changes:
-  zmf removed upstream; drop patch
-
+  Upstream removed zmf; drop patch.
+  Depend on mp4v2.
 
 Upstream NEWS:
 
diff --git a/zoneminder/Makefile b/zoneminder/Makefile
index dff05988c2..02c7a27ebe 100644
--- a/zoneminder/Makefile
+++ b/zoneminder/Makefile
@@ -93,13 +93,6 @@ CMAKE_ARGS+=		-DZM_SOCKDIR=${VARBASE}/run/zm
 CMAKE_ARGS+=		-DZM_TMPDIR=${VARBASE}/tmp/zm
 CMAKE_ARGS+=		-DZM_LOGDIR=${VARBASE}/log/zm
 
-# PolicyKit doesn't actually seem to be necessary.  This hack disables
-# configure's hunt for PolicyKit, but has no other apparent ill effects.
-# cmake needs an almost identical hack - though resorting to patching might
-# be safer.
-CONFIGURE_ENV+=		POLKIT_CFLAGS=" " POLKIT_LIBS=" "
-CMAKE_ARGS+=		-DPOLKIT_LIBRARIES=" " -DPOLKIT_INCLUDE_DIR=" "
-
 PTHREAD_AUTO_VARS=	yes
 .include "../../mk/pthread.buildlink3.mk"
 
@@ -323,6 +316,7 @@ post-install:
 .include "../../devel/glib2/buildlink3.mk"
 .include "../../devel/pcre/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
+.include "../../multimedia/mp4v2/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
 .include "../../www/curl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/zoneminder/distinfo b/zoneminder/distinfo
index db5860b70f..9f5275abaf 100644
--- a/zoneminder/distinfo
+++ b/zoneminder/distinfo
@@ -14,11 +14,12 @@ SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_Memory_Shared.pm) = b97c104f6ac102
 SHA1 (patch-scripts_zm_in) = a05727261bb8be6b707e9a14ae4ff52ea3770d51
 SHA1 (patch-scripts_zmpkg_pl_in) = 1dd13f9d3a5901e89ff8ac6062de9272dbea2d58
 SHA1 (patch-src_zm__event.cpp) = 0fe0a96db5ca3f6753d3922f3b22c44827055cfe
+SHA1 (patch-src_zm__eventstream.cpp) = 383f9bb0cc2f43af12e68be7f4e7d16bd71dbfa8
 SHA1 (patch-src_zm__monitor.cpp) = 5611aa37187bc9910ba1ccd9ddd5d0f421438b53
 SHA1 (patch-src_zm__rtp__ctrl.h) = 4e0fd8e80932de8d77b3386a356cc026ddc23113
 SHA1 (patch-src_zm__rtp__source.cpp) = 2488ae3655f529a71d8b98fa29a9e0435bbdf182
-SHA1 (patch-src_zm__thread.h) = 80c15ea1a949c3a1728ddb1bbcbb50facc9e14f8
-SHA1 (patch-src_zm__timer.h) = c415a98f0bfbc5a4082bacb9ff1213ea7eca1c8f
+SHA1 (patch-src_zm__thread.h) = 03e7cce589b62b95676a72df0d6707816c477ffa
+SHA1 (patch-src_zm__timer.h) = 18ab09cd1ce92c80c43d34a2f2f8b9fe614bedeb
 SHA1 (patch-src_zm__utils.cpp) = 49fc733e9ee79d2be4beebe2ec61398a0f292f30
 SHA1 (patch-src_zm__utils.h) = 02501e21103514c7bed76676156e23d4f165342e
 SHA1 (patch-src_zm_comms_cpp) = bd3c3e6dd4d11ea0845d2da662e99169cd6e6680
diff --git a/zoneminder/patches/patch-src_zm__eventstream.cpp b/zoneminder/patches/patch-src_zm__eventstream.cpp
new file mode 100644
index 0000000000..96ed81724f
--- /dev/null
+++ b/zoneminder/patches/patch-src_zm__eventstream.cpp
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Only include local sendfile header if there is sendfile support, to
+avoid #error for no sendfile implementation.
+
+--- src/zm_eventstream.cpp.orig	2018-12-08 14:22:36.000000000 +0000
++++ src/zm_eventstream.cpp
+@@ -39,7 +39,9 @@
+ #include "zm_storage.h"
+ #include "zm_monitor.h"
+ 
++#if HAVE_SENDFILE
+ #include "zm_sendfile.h"
++#endif
+ 
+ bool EventStream::loadInitialEventData( int monitor_id, time_t event_time ) {
+   static char sql[ZM_SQL_SML_BUFSIZ];
diff --git a/zoneminder/patches/patch-src_zm__thread.h b/zoneminder/patches/patch-src_zm__thread.h
index e021910c84..696db6f84f 100644
--- a/zoneminder/patches/patch-src_zm__thread.h
+++ b/zoneminder/patches/patch-src_zm__thread.h
@@ -10,7 +10,7 @@ portable than syscall(SYS_gettid).
 
 --- src/zm_thread.h.orig	2018-12-08 14:22:36.000000000 +0000
 +++ src/zm_thread.h
-@@ -22,10 +22,8 @@
+@@ -22,19 +22,20 @@
  
  #include <unistd.h>
  #include <pthread.h>
@@ -22,7 +22,11 @@ portable than syscall(SYS_gettid).
  #include "zm_exception.h"
  #include "zm_utils.h"
  #ifdef __FreeBSD__
-@@ -34,7 +32,7 @@
+ #include <sys/thr.h>
+ #endif
++#ifdef __NetBSD__
++#include <lwp.h>
++#endif
  
  class ThreadException : public Exception {
  private:
@@ -31,7 +35,16 @@ portable than syscall(SYS_gettid).
    pid_t pid() {
      pid_t tid; 
  #ifdef __FreeBSD__ 
-@@ -54,7 +52,7 @@ private:
+@@ -44,6 +45,8 @@ private:
+ #else 
+   #ifdef __FreeBSD_kernel__
+     if ( (syscall(SYS_thr_self, &tid)) < 0 ) // Thread/Process id
++  #elif defined(__NetBSD__)
++    tid = _lwp_self();
+   # else
+     tid=syscall(SYS_gettid); 
+   #endif
+@@ -54,7 +57,7 @@ private:
    pthread_t pid() { return( pthread_self() ); }
  #endif
  public:
@@ -40,7 +53,7 @@ portable than syscall(SYS_gettid).
    }
  };
  
-@@ -209,7 +207,7 @@ protected:
+@@ -209,7 +212,7 @@ protected:
  
    Mutex mThreadMutex;
    Condition mThreadCondition;
@@ -49,7 +62,7 @@ portable than syscall(SYS_gettid).
    pid_t mPid;
  #else
    pthread_t mPid;
-@@ -222,7 +220,7 @@ protected:
+@@ -222,7 +225,7 @@ protected:
    Thread();
    virtual ~Thread();
  
@@ -58,7 +71,16 @@ portable than syscall(SYS_gettid).
    pid_t id() const {
      pid_t tid; 
  #ifdef __FreeBSD__ 
-@@ -257,7 +255,7 @@ public:
+@@ -233,6 +236,8 @@ protected:
+   #ifdef __FreeBSD_kernel__
+     if ( (syscall(SYS_thr_self, &tid)) < 0 ) // Thread/Process id
+ 
++  #elif defined(__NetBSD__)
++    tid = _lwp_self();
+   #else
+     tid=syscall(SYS_gettid); 
+   #endif
+@@ -257,7 +262,7 @@ public:
    void join();
    void kill( int signal );
    bool isThread() {
diff --git a/zoneminder/patches/patch-src_zm__timer.h b/zoneminder/patches/patch-src_zm__timer.h
index c2a3552da3..b1d0b56043 100644
--- a/zoneminder/patches/patch-src_zm__timer.h
+++ b/zoneminder/patches/patch-src_zm__timer.h
@@ -22,7 +22,7 @@ portable than syscall(SYS_gettid).
  #endif
    public:
 -    explicit TimerException( const std::string &message ) : Exception( stringtf("(%d) ", (long int)pid())+message ) {
-+    explicit TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)pid() ) )
++    explicit TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)pid() ) ) {
      }
    };
  


Home | Main Index | Thread Index | Old Index