pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zoneminder: Patch for NetBSD/earmv7hf-el
Module Name: pkgsrc-wip
Committed By: Greg Troxel <gdt%lexort.com@localhost>
Pushed By: gdt
Date: Sat May 20 20:07:33 2023 -0400
Changeset: a458f7c81120187736db8e59202c9d19bf4cda4d
Modified Files:
zoneminder/Makefile
zoneminder/distinfo
zoneminder/patches/patch-src_zm__event.cpp
zoneminder/patches/patch-src_zm__eventstream.cpp
zoneminder/patches/patch-src_zm__utils.cpp
zoneminder/patches/patch-src_zmu.cpp
Log Message:
zoneminder: Patch for NetBSD/earmv7hf-el
Patch more types, mostly time_t which is not long.
Do not assume linux if arm. Rather than using a linux syscall to
determine if neon is present, just assume it is, optimizing for RPI2/3
and hoping little harm is done, as zm on a RPI1 is a stretch anyway
due to lack of RAM.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a458f7c81120187736db8e59202c9d19bf4cda4d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
zoneminder/Makefile | 1 +
zoneminder/distinfo | 8 +++---
zoneminder/patches/patch-src_zm__event.cpp | 2 +-
zoneminder/patches/patch-src_zm__eventstream.cpp | 8 +++++-
zoneminder/patches/patch-src_zm__utils.cpp | 32 +++++++++++++++++++++++-
zoneminder/patches/patch-src_zmu.cpp | 2 +-
6 files changed, 45 insertions(+), 8 deletions(-)
diffs:
diff --git a/zoneminder/Makefile b/zoneminder/Makefile
index c0c18b0ecf..9e0e88bbd1 100644
--- a/zoneminder/Makefile
+++ b/zoneminder/Makefile
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.42 2019/06/18 12:36:59 gdt Exp $
VERSION= 1.32.3
+PKGREVISION= 1
# Sometimes the distfile unpacks to ZoneMinder and sometimes zoneminder.
NAME_DIST= ZoneMinder
NAME_LOWER= zoneminder
diff --git a/zoneminder/distinfo b/zoneminder/distinfo
index d034864381..02dae1418b 100644
--- a/zoneminder/distinfo
+++ b/zoneminder/distinfo
@@ -13,14 +13,14 @@ SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm) = 84a1db650e90aa8e4dfe
SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_Memory_Shared.pm) = b97c104f6ac102fc4510eb0977169375cdd97197
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__event.cpp) = ba65b91fd62c2840819a71b23ffdae87b0ebe487
+SHA1 (patch-src_zm__eventstream.cpp) = 63040024a69c9362e544e8950da57d831824f2f8
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) = 03e7cce589b62b95676a72df0d6707816c477ffa
SHA1 (patch-src_zm__timer.h) = 18ab09cd1ce92c80c43d34a2f2f8b9fe614bedeb
-SHA1 (patch-src_zm__utils.cpp) = d9244a1e3e9c67bbc89515fd6b79e6b98a18a069
+SHA1 (patch-src_zm__utils.cpp) = 0326a092f441a481975548a73d0c8f7af1fc702c
SHA1 (patch-src_zm_comms_cpp) = bd3c3e6dd4d11ea0845d2da662e99169cd6e6680
SHA1 (patch-src_zm_comms_h) = e9e25dced4ad54aa118f153fbd3390d1eb525e65
SHA1 (patch-src_zm_logger_cpp) = aed07139cd8adc11c7b43d4fefc24bc158b5617c
@@ -28,4 +28,4 @@ SHA1 (patch-src_zm_remote_camera_h) = 87da3e6326df5f9ab3c98fed5c7c9bae20cd6dc5
SHA1 (patch-src_zm_signal_cpp) = af9625702518648b8d62ed20d0d52c1a2a27841a
SHA1 (patch-src_zm_thread_cpp) = 165a1e38eb76f5cfe72606b1071177e619d73fe6
SHA1 (patch-src_zmc_cpp) = 1499eb3e2d92372a0dea036f22f429efeefe4d95
-SHA1 (patch-src_zmu.cpp) = 894f0e8941ca2d135d775001b96c0f780570aa2b
+SHA1 (patch-src_zmu.cpp) = c2097766ecd0707728d29353ffaf590b234d8902
diff --git a/zoneminder/patches/patch-src_zm__event.cpp b/zoneminder/patches/patch-src_zm__event.cpp
index 8f2a2f664c..3b56ce8243 100644
--- a/zoneminder/patches/patch-src_zm__event.cpp
+++ b/zoneminder/patches/patch-src_zm__event.cpp
@@ -70,7 +70,7 @@ Avoid sendfile code when sendfile doesn't exist.
"INSERT INTO Frames ( EventId, FrameId, Type, TimeStamp, Delta, Score )"
- " VALUES ( %" PRIu64 ", %d, '%s', from_unixtime( %ld ), %s%ld.%02ld, %d )",
- id, frames, frame_type_names[frame_type], timestamp.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, score);
-+ " VALUES ( %" PRIu64 ", %d, '%s', from_unixtime( %jd ), %s%ld.%02jd, %d )",
++ " VALUES ( %" PRIu64 ", %d, '%s', from_unixtime( %jd ), %s%jd.%02ld, %d )",
+ id, frames, frame_type_names[frame_type], (intmax_t) timestamp.tv_sec, delta_time.positive?"":"-", (intmax_t) delta_time.sec, delta_time.fsec, score);
db_mutex.lock();
if ( mysql_query(&dbconn, sql) ) {
diff --git a/zoneminder/patches/patch-src_zm__eventstream.cpp b/zoneminder/patches/patch-src_zm__eventstream.cpp
index 96ed81724f..09166a0ca5 100644
--- a/zoneminder/patches/patch-src_zm__eventstream.cpp
+++ b/zoneminder/patches/patch-src_zm__eventstream.cpp
@@ -5,7 +5,7 @@ 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 @@
+@@ -39,12 +39,14 @@
#include "zm_storage.h"
#include "zm_monitor.h"
@@ -15,3 +15,9 @@ avoid #error for no sendfile implementation.
bool EventStream::loadInitialEventData( int monitor_id, time_t event_time ) {
static char sql[ZM_SQL_SML_BUFSIZ];
+
+- snprintf(sql, sizeof(sql), "SELECT Id FROM Events WHERE MonitorId = %d AND unix_timestamp(EndTime) > %ld ORDER BY Id ASC LIMIT 1", monitor_id, event_time);
++ snprintf(sql, sizeof(sql), "SELECT Id FROM Events WHERE MonitorId = %d AND unix_timestamp(EndTime) > %jd ORDER BY Id ASC LIMIT 1", monitor_id, (intmax_t) event_time);
+
+ if ( mysql_query(&dbconn, sql) ) {
+ Error("Can't run query: %s", mysql_error(&dbconn));
diff --git a/zoneminder/patches/patch-src_zm__utils.cpp b/zoneminder/patches/patch-src_zm__utils.cpp
index bd3784c0d9..a1dd0b4fef 100644
--- a/zoneminder/patches/patch-src_zm__utils.cpp
+++ b/zoneminder/patches/patch-src_zm__utils.cpp
@@ -1,10 +1,40 @@
$NetBSD$
+Avoid assuming linux on arm. For now, assume neon.
+
Fix time types (sizes).
--- src/zm_utils.cpp.orig 2018-12-08 14:22:36.000000000 +0000
+++ src/zm_utils.cpp
-@@ -397,7 +397,7 @@ char *timeval_to_string( struct timeval
+@@ -26,7 +26,7 @@
+ #include <stdarg.h>
+ #include <fcntl.h> /* Definition of AT_* constants */
+ #include <sys/stat.h>
+-#if defined(__arm__)
++#if defined(__arm__) && defined(__linux__)
+ #include <sys/auxv.h>
+ #endif
+
+@@ -305,6 +305,7 @@ void hwcaps_detect() {
+ Debug(1,"Detected a x86\\x86-64 processor");
+ }
+ #elif defined(__arm__)
++# if defined(__linux__)
+ // ARM processor in 32bit mode
+ // To see if it supports NEON, we need to get that information from the kernel
+ unsigned long auxval = getauxval(AT_HWCAP);
+@@ -314,6 +315,10 @@ void hwcaps_detect() {
+ } else {
+ Debug(1,"Detected ARM (AArch32) processor");
+ }
++# else
++ Debug(1,"!!ASSUMING!! ARM (AArch32) processor with Neon");
++ neonversion = 1;
++# endif
+ #elif defined(__aarch64__)
+ // ARM processor in 64bit mode
+ // Neon is mandatory, no need to check for it
+@@ -397,7 +402,7 @@ char *timeval_to_string( struct timeval
nowtime = tv.tv_sec;
nowtm = localtime(&nowtime);
strftime(tmbuf, sizeof tmbuf, "%Y-%m-%d %H:%M:%S", nowtm);
diff --git a/zoneminder/patches/patch-src_zmu.cpp b/zoneminder/patches/patch-src_zmu.cpp
index 74a0dedbca..5f73327397 100644
--- a/zoneminder/patches/patch-src_zmu.cpp
+++ b/zoneminder/patches/patch-src_zmu.cpp
@@ -16,7 +16,7 @@ time types
} else {
if ( have_output ) printf( "%c", separator );
- printf( "%ld.%02ld", timestamp.tv_sec, timestamp.tv_usec/10000 );
-+ printf( "%ld.%02ld", timestamp.tv_sec, (long) timestamp.tv_usec/10000 );
++ printf( "%jd.%02ld", (intmax_t) timestamp.tv_sec, (long) timestamp.tv_usec/10000 );
have_output = true;
}
}
Home |
Main Index |
Thread Index |
Old Index