pkgsrc-WIP-changes archive

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

zoneminder: Update to 1.30.5



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Mon Oct 4 21:08:02 2021 -0400
Changeset:	d92cef0a23037579c15bcc74ead0c3a4a16c4902

Modified Files:
	zoneminder/Makefile
	zoneminder/distinfo
	zoneminder/patches/patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm
	zoneminder/patches/patch-src_zm__event.cpp
	zoneminder/patches/patch-src_zm__monitor.cpp
	zoneminder/patches/patch-src_zm__rtp__ctrl.h
	zoneminder/patches/patch-src_zm__rtp__source.cpp
	zoneminder/patches/patch-src_zm__sdp.cpp
	zoneminder/patches/patch-src_zm__thread.h
	zoneminder/patches/patch-src_zm__timer.h
	zoneminder/patches/patch-src_zm__utils.cpp
	zoneminder/patches/patch-src_zm_logger_cpp
	zoneminder/patches/patch-src_zm_signal_cpp
	zoneminder/patches/patch-src_zm_thread_cpp
	zoneminder/patches/patch-src_zmc_cpp
	zoneminder/patches/patch-src_zmf.cpp
	zoneminder/patches/patch-src_zmu.cpp
Removed Files:
	zoneminder/patches/patch-Makefile_am
	zoneminder/patches/patch-configure_ac
	zoneminder/patches/patch-src_Makefile_am
	zoneminder/patches/patch-web_Makefile.am

Log Message:
zoneminder: Update to 1.30.5

NOMERGE: This update is not yet baked.

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

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

diffstat:
 zoneminder/Makefile                                |  11 +-
 zoneminder/distinfo                                |  42 +++---
 zoneminder/patches/patch-Makefile_am               |  27 ----
 zoneminder/patches/patch-configure_ac              | 146 ---------------------
 ...ch-scripts_ZoneMinder_lib_ZoneMinder_General_pm |  41 ++----
 zoneminder/patches/patch-src_Makefile_am           |  15 ---
 zoneminder/patches/patch-src_zm__event.cpp         | 102 +++++++-------
 zoneminder/patches/patch-src_zm__monitor.cpp       |  35 ++---
 zoneminder/patches/patch-src_zm__rtp__ctrl.h       |  18 +--
 zoneminder/patches/patch-src_zm__rtp__source.cpp   |  30 ++---
 zoneminder/patches/patch-src_zm__sdp.cpp           |  11 --
 zoneminder/patches/patch-src_zm__thread.h          |  89 ++++---------
 zoneminder/patches/patch-src_zm__timer.h           |  26 ++--
 zoneminder/patches/patch-src_zm__utils.cpp         |  24 ++--
 zoneminder/patches/patch-src_zm_logger_cpp         |  66 +++++-----
 zoneminder/patches/patch-src_zm_signal_cpp         |  20 ---
 zoneminder/patches/patch-src_zm_thread_cpp         |  40 +++---
 zoneminder/patches/patch-src_zmc_cpp               |  20 +--
 zoneminder/patches/patch-src_zmf.cpp               |  18 +--
 zoneminder/patches/patch-src_zmu.cpp               |  96 +++++++-------
 zoneminder/patches/patch-web_Makefile.am           |  15 ---
 21 files changed, 297 insertions(+), 595 deletions(-)

diffs:
diff --git a/zoneminder/Makefile b/zoneminder/Makefile
index 00cb5b9092..89ece04842 100644
--- a/zoneminder/Makefile
+++ b/zoneminder/Makefile
@@ -1,10 +1,10 @@
 # $NetBSD: Makefile,v 1.42 2019/06/18 12:36:59 gdt Exp $
 
-VERSION=	1.29.0
+#VERSION=	1.36.7
+VERSION=	1.30.5
 # Sometimes the distfile unpacks to ZoneMinder and sometimes zoneminder.
 NAME_DIST=	ZoneMinder
 NAME_LOWER=	zoneminder
-PKGREVISION=	6
 
 PKGNAME=	${DISTNAME:S/${NAME_DIST}-/${NAME_LOWER}-/}
 DISTNAME=	${NAME_DIST}-${VERSION}
@@ -13,9 +13,10 @@ CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_GITHUB:=${NAME_DIST}/}
 GITHUB_PROJECT=	${NAME_DIST}
 GITHUB_TYPE=	tag
-GITHUB_TAG=	v${PKGVERSION_NOREV}
+GITHUB_TAG=	${PKGVERSION_NOREV}
 
 MAINTAINER=	dsainty%NetBSD.org@localhost
+#MAINTAINER+=	gdt%NetBSD.org@localhost
 HOMEPAGE=	https://www.zoneminder.com/
 COMMENT=	Video camera security and surveillance solution
 LICENSE=	gnu-gpl-v2
@@ -34,9 +35,9 @@ PKG_SUGGESTED_OPTIONS=	apache
 
 .include "../../mk/bsd.options.mk"
 
-GNU_CONFIGURE=	yes
+USE_CMAKE=	yes
 USE_LANGUAGES=	c c++
-USE_TOOLS+=	aclocal autoconf autoheader automake gmake perl pkg-config
+USE_TOOLS+=	gmake perl pkg-config
 
 # zoneminder can depend on a number of perl modules depending on
 # configuration.  We take the view that if an installation can be
diff --git a/zoneminder/distinfo b/zoneminder/distinfo
index 4a83733534..a85daed9e9 100644
--- a/zoneminder/distinfo
+++ b/zoneminder/distinfo
@@ -1,32 +1,28 @@
 $NetBSD: distinfo,v 1.12 2018/07/14 15:03:57 gdt Exp $
 
-SHA1 (ZoneMinder-1.29.0.tar.gz) = 1e1fb9aeb7f482c27b4275ad84556b6c3910e4dc
-RMD160 (ZoneMinder-1.29.0.tar.gz) = d744a68552651489cc17f369c11baa3cc45621ff
-SHA512 (ZoneMinder-1.29.0.tar.gz) = 4716e0788db29880eeafc817fe63662d07c3b805214b4d2eb29b346dd3493b0215c9e79370e3414220c812065eefbe253548a70d8128c253aa4535f66f9544df
-Size (ZoneMinder-1.29.0.tar.gz) = 9302624 bytes
-SHA1 (patch-Makefile_am) = d3b66d8d741b739e2e6b354cef29881d8bcde31c
-SHA1 (patch-configure_ac) = 689230f4d7526ab3d47142b111102b9bc4ff409c
-SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm) = 841d897662958698a4dfcb95dd5bc43bb5fed568
+SHA1 (ZoneMinder-1.30.5.tar.gz) = 38453f66711b6c5555f56fa932250094d8aeab8d
+RMD160 (ZoneMinder-1.30.5.tar.gz) = c19d119dfad9a2d234341c84ad4f21d1dfe3e0fd
+SHA512 (ZoneMinder-1.30.5.tar.gz) = f423b79726357c277814c9346445b695fc1b0f9cff61847003d6286bc36f92aab8ab35689e1a3552fb60394793c478fefb4c8fa3861a1dd06a2655b018c6a52a
+Size (ZoneMinder-1.30.5.tar.gz) = 9936584 bytes
+SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm) = bded373e318cd074b92853165d5ca38d23bdea5f
 SHA1 (patch-scripts_ZoneMinder_lib_ZoneMinder_Memory_Shared.pm) = b97c104f6ac102fc4510eb0977169375cdd97197
 SHA1 (patch-scripts_zm_in) = a05727261bb8be6b707e9a14ae4ff52ea3770d51
-SHA1 (patch-src_Makefile_am) = 0f6571c9d5a3e688544f93d687d266e1b71f0f43
-SHA1 (patch-src_zm__event.cpp) = 83d0d3f5de5d3a7b1ea81917bd9c5264c8129637
-SHA1 (patch-src_zm__monitor.cpp) = 4a0f2bd9a180092e3aa7ba8c0626e0907d45ab32
-SHA1 (patch-src_zm__rtp__ctrl.h) = 052b41bf09d41d1d5f980db011603b3b04f6142f
-SHA1 (patch-src_zm__rtp__source.cpp) = 50d2621b474de5defb94b019ba2084f67a5b2665
-SHA1 (patch-src_zm__sdp.cpp) = ed89bc14ae557281bb43baca9c90b78d801d8eb1
-SHA1 (patch-src_zm__thread.h) = a2af2ae87ba07cd51695c73082f8da319ff5f9a7
-SHA1 (patch-src_zm__timer.h) = 218dfae75b8c9a7b0c5542a2437b350743d11e5f
-SHA1 (patch-src_zm__utils.cpp) = f0e15990b7f801303259af8c9b86731b74327fe6
+SHA1 (patch-src_zm__event.cpp) = c9ffa1f11c410b56b774be1879a227f2be361f36
+SHA1 (patch-src_zm__monitor.cpp) = 95400e1e524c6efe479a6eb3512596ba0f284334
+SHA1 (patch-src_zm__rtp__ctrl.h) = 4e0fd8e80932de8d77b3386a356cc026ddc23113
+SHA1 (patch-src_zm__rtp__source.cpp) = 039257e76768df2e32a5550625ba7f8d1cb9ba26
+SHA1 (patch-src_zm__sdp.cpp) = ce1b8a9e597ce7b500533a42d14390f580c72de7
+SHA1 (patch-src_zm__thread.h) = 7d9d7dfcd79491f1dd28b6d233aba4d623d882a4
+SHA1 (patch-src_zm__timer.h) = d91d41ef987fa4cc67d6f55c25afc581ef3a273f
+SHA1 (patch-src_zm__utils.cpp) = d5012fb54b0a91640fa49a16daf7c5f0eb54228e
 SHA1 (patch-src_zm__utils.h) = 4ffb7eafa8602076766fd4ae00be797866a229d9
 SHA1 (patch-src_zm_comms_cpp) = bd3c3e6dd4d11ea0845d2da662e99169cd6e6680
 SHA1 (patch-src_zm_comms_h) = 75ceba7e2c725c02a09cb2203a94142b1a987bce
-SHA1 (patch-src_zm_logger_cpp) = f8f11cd1a969435d727186b816aec612d74e55db
+SHA1 (patch-src_zm_logger_cpp) = 3ad97a499643d9af5bbd1f86d9b4101bc24be4df
 SHA1 (patch-src_zm_remote_camera_h) = 0d4bd7dae0188df7e463586250ac2ed530230f3d
-SHA1 (patch-src_zm_signal_cpp) = 0e53c30d408cf926d9a1f05a683e10cd8b9f2d8e
-SHA1 (patch-src_zm_thread_cpp) = f6e603bbf505fc0ed6f3a8150613687c5dab0df0
-SHA1 (patch-src_zmc_cpp) = 9fee2df53603a26a086fc2d8a56b29e4059f3ed1
-SHA1 (patch-src_zmf.cpp) = a69ef31d3b9fa31081e32fd4db15e12627c75bc5
-SHA1 (patch-src_zmu.cpp) = 3c3bd2b82a19d50c91f8b6ad311caf9a195af120
-SHA1 (patch-web_Makefile.am) = e1568a9960590f8b2deb74c7068d1a2b91169a47
+SHA1 (patch-src_zm_signal_cpp) = e86a79f9ca8b5fba58907fc1c67d95fe29819dcc
+SHA1 (patch-src_zm_thread_cpp) = 5f50ce734df427ca8d63082ac0798a136ed0dad1
+SHA1 (patch-src_zmc_cpp) = a7ff8186639ce459d74920e505de0d877d3f3cd3
+SHA1 (patch-src_zmf.cpp) = 73affd763e7f37109e607cc6474fb8e87f783bdf
+SHA1 (patch-src_zmu.cpp) = a238a58cf383e847b69031ec06c929c960cafc6e
 SHA1 (patch-web_ajax_stream_php) = e8f811e63bedec03345b74db72c3d8014b3cc7f6
diff --git a/zoneminder/patches/patch-Makefile_am b/zoneminder/patches/patch-Makefile_am
deleted file mode 100644
index 2e36786c53..0000000000
--- a/zoneminder/patches/patch-Makefile_am
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-Makefile_am,v 1.3 2015/04/05 08:51:08 dsainty Exp $
-
-Disable the hacks around ownership setup so Pkgsrc can take responsibility.
-Don't install zm.conf at all - let Pkgsrc install it into EGDIR.
-
---- Makefile.am.orig	2016-02-03 18:40:30.000000000 +0000
-+++ Makefile.am
-@@ -6,8 +6,8 @@ webuser = @WEB_USER@
- webgroup = @WEB_GROUP@
- zmconfigdir = @ZM_CONFIG_DIR@
- 
--zmconfig_DATA = \
--	zm.conf
-+#zmconfig_DATA = \
-+#	zm.conf
- 
- if COND_ONVIF
-    MAYBE_ONVIF = onvif
-@@ -26,7 +26,7 @@ EXTRA_DIST = \
- 	zmconfgen.pl.in
- 
- # Yes, you are correct. This is a HACK!
--install-data-hook:
-+pkgsrc-disabled-install-data-hook:
- 	( cd $(DESTDIR)$(zmconfigdir); chown $(webuser):$(webgroup) $(zmconfig_DATA); chmod 600 $(zmconfig_DATA) )
- 	( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir -p $(DESTDIR)$(ZM_RUNDIR); fi; if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR); fi )
- 	( if ! test -e $(DESTDIR)$(ZM_SOCKDIR); then mkdir -p $(DESTDIR)$(ZM_SOCKDIR); fi; if test "$(DESTDIR)$(ZM_SOCKDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_SOCKDIR); chmod u+w $(DESTDIR)$(ZM_SOCKDIR); fi )
diff --git a/zoneminder/patches/patch-configure_ac b/zoneminder/patches/patch-configure_ac
deleted file mode 100644
index 6c7831837a..0000000000
--- a/zoneminder/patches/patch-configure_ac
+++ /dev/null
@@ -1,146 +0,0 @@
-$NetBSD: patch-configure_ac,v 1.4 2015/04/07 12:54:36 dsainty Exp $
-
-Remediate == (bashism) in configure.ac
-
---- configure.ac.orig	2016-02-03 18:40:30.000000000 +0000
-+++ configure.ac
-@@ -64,41 +64,41 @@ AC_ARG_VAR(ZM_TMPDIR,[Location of tempor
- AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm])
- AC_ARG_VAR(ZM_CONFIG_DIR,[Location of ZoneMinder configuration, default system config directory])
- 
--if test "$ZM_DB_TYPE" == ""; then
-+if test "$ZM_DB_TYPE" = ""; then
- 	AC_SUBST(ZM_DB_TYPE,[mysql])
- fi
--if test "$ZM_DB_HOST" == ""; then
-+if test "$ZM_DB_HOST" = ""; then
- 	AC_SUBST(ZM_DB_HOST,[localhost])
- fi
--if test "$ZM_DB_NAME" == ""; then
-+if test "$ZM_DB_NAME" = ""; then
- 	AC_SUBST(ZM_DB_NAME,[zm])
- fi
--if test "$ZM_DB_USER" == ""; then
-+if test "$ZM_DB_USER" = ""; then
- 	AC_SUBST(ZM_DB_USER,[zmuser])
- fi
--if test "$ZM_DB_PASS" == ""; then
-+if test "$ZM_DB_PASS" = ""; then
- 	AC_SUBST(ZM_DB_PASS,[zmpass])
- fi
--if test "$ZM_SSL_LIB" == ""; then
-+if test "$ZM_SSL_LIB" = ""; then
- 	AC_SUBST(ZM_SSL_LIB,gnutls)
- fi
--if test "$ZM_MYSQL_ENGINE" == ""; then
-+if test "$ZM_MYSQL_ENGINE" = ""; then
- 	AC_SUBST(ZM_MYSQL_ENGINE,InnoDB)
- fi
--if test "$ZM_RUNDIR" == ""; then
-+if test "$ZM_RUNDIR" = ""; then
- 	AC_SUBST(ZM_RUNDIR,[/var/run/zm])
- fi
--if test "$ZM_SOCKDIR" == ""; then
-+if test "$ZM_SOCKDIR" = ""; then
- 	AC_SUBST(ZM_SOCKDIR,[/var/run/zm])
- fi
--if test "$ZM_TMPDIR" == ""; then
-+if test "$ZM_TMPDIR" = ""; then
- 	AC_SUBST(ZM_TMPDIR,[/tmp/zm])
- fi
--if test "$ZM_LOGDIR" == ""; then
-+if test "$ZM_LOGDIR" = ""; then
- 	AC_SUBST(ZM_LOGDIR,[/var/log/zm])
- fi
- AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory])
--if test "$ZM_CONFIG_DIR" == ""; then
-+if test "$ZM_CONFIG_DIR" = ""; then
- 	AC_SUBST(ZM_CONFIG_DIR,[$SYSCONFDIR])
- fi
- 
-@@ -270,7 +270,7 @@ AC_ARG_ENABLE(mmap,
-     filesystem which will normally be the case by default.
-     e.g. --enable-mmap=yes or --disable-mmap])
- )
--if test "$ENABLE_MMAP" == "yes"; then
-+if test "$ENABLE_MMAP" = "yes"; then
-   AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory")
- else
-   AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory")
-@@ -292,7 +292,7 @@ AM_CONDITIONAL([COND_ONVIF], [test "$ena
- 
- # Compiler
- AC_LANG_CPLUSPLUS
--if test "$ENABLE_ONVIF" == "yes"; then
-+if test "$ENABLE_ONVIF" = "yes"; then
-   AC_SUBST(ZM_HAS_ONVIF,1)
- else
-   AC_SUBST(ZM_HAS_ONVIF,0)
-@@ -342,22 +342,22 @@ AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ER
- AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a))
- AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
- AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
--if test "$BSD" == "0"; then
-+if test "$BSD" = "0"; then
- AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
- fi
--if test "$ZM_SSL_LIB" == "openssl"; then
-+if test "$ZM_SSL_LIB" = "openssl"; then
- AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),)
- AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead]))
- else
- AC_CHECK_HEADERS(gnutls/openssl.h,AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,1),AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,0),)
- AC_CHECK_HEADERS(gnutls/gnutls.h,AC_SUBST(ZM_HAS_GNUTLS,1),AC_SUBST(ZM_HAS_GNUTLS,0),)
--if test "$ZM_HAS_GNUTLS_OPENSSL" == "0" && test "$ZM_HAS_GNUTLS" == "0"; then
-+if test "$ZM_HAS_GNUTLS_OPENSSL" = "0" && test "$ZM_HAS_GNUTLS" = "0"; then
- AC_MSG_WARN(gnutls is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead)
- fi
- AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),)
- AC_CHECK_LIB(gcrypt,gcry_check_version,,AC_MSG_WARN([libgcrypt.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead]))
- AC_CHECK_LIB(gnutls,gnutls_fingerprint,,AC_MSG_WARN([libgnutls.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead]))
--if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then
-+if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then
- AC_CHECK_LIB(gnutls-openssl,MD5,,AC_MSG_WARN([libgnutls.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead]))
- fi
- fi
-@@ -400,7 +400,7 @@ AC_SUBST(ZM_HAS_V4L2)
- 
- # Set global Video for Linux flag
- ZM_HAS_V4L=0
--if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then
-+if test "$ZM_HAS_V4L1" = "1" || test "$ZM_HAS_V4L2" = "1"; then
- ZM_HAS_V4L=1
- else
- AC_MSG_WARN(zm requires Video4Linux or Video4Linux2 to be installed for analog or USB camera support)
-@@ -417,7 +417,7 @@ AC_CHECK_HEADERS(libswscale/swscale.h,,,
- AC_LANG_POP([C])
- AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
- AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
--if test "$ENABLE_MMAP" == "yes"; then
-+if test "$ENABLE_MMAP" = "yes"; then
- AC_CHECK_HEADERS(sys/mman.h,,,)
- AC_CHECK_HEADERS(fcntl.h,,,)
- else
-@@ -428,11 +428,11 @@ AC_CHECK_HEADERS(zlib.h,,,)
- AC_CHECK_HEADERS(vlc/vlc.h,,,)
- AC_CHECK_HEADERS(curl/curl.h,,,)
- 
--if test "$ZM_SSL_LIB" == "openssl"; then
-+if test "$ZM_SSL_LIB" = "openssl"; then
- AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h>
- #include <openssl/md5.h>])
- else
--if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then
-+if test "$ZM_HAS_GNUTLS_OPENSSL" = "1"; then
- AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include <stdlib.h>
- #include <gnutls/openssl.h>])
- else
-@@ -457,7 +457,7 @@ AC_PROG_PERL_MODULES(Time::HiRes,,AC_MSG
- AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip))
- AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent))
- AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker))
--if test "$ENABLE_MMAP" == "yes"; then
-+if test "$ENABLE_MMAP" = "yes"; then
- AC_PROG_PERL_MODULES(Sys::Mmap,,AC_MSG_ERROR(zm requires Sys::Mmap for mapped memory - set --enable-mmap=no to use IPC shared memory instead))
- fi
- 
diff --git a/zoneminder/patches/patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm b/zoneminder/patches/patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm
index b3df6c6a36..2fd3c6c70b 100644
--- a/zoneminder/patches/patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm
+++ b/zoneminder/patches/patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm
@@ -19,35 +19,14 @@ installed on the system, or not in the $PATH.
 
 Use the -m parameter to su, as ZM_WEB_USER shouldn't require a login shell.
 
---- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2015-04-01 19:40:39.708621257 +1300
-+++ scripts/ZoneMinder/lib/ZoneMinder/General.pm	2015-04-01 19:50:47.372646449 +1300
-@@ -107,7 +107,7 @@
-     my $suffix = "";
-     my $command = $prefix.$null_command.$suffix;
-     Debug( "Testing \"$command\"\n" );
--    $command .= " > /dev/null 2>&1"; 
-+    $command .= " 2>&1";
-     my $output = qx($command);
-     my $status = $? >> 8;
-     if ( !$status )
-@@ -124,6 +124,7 @@
-         $suffix = "'";
-         $command = $prefix.$null_command.$suffix;
-         Debug( "Testing \"$command\"\n" );
-+        $command .= " 2>&1";
-         my $output = qx($command);
-         my $status = $? >> 8;
-         if ( !$status )
-@@ -136,10 +137,11 @@
-             chomp( $output );
-             Debug( "Test failed, '$output'\n" );
+--- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2019-02-22 15:38:47.000000000 +0000
++++ scripts/ZoneMinder/lib/ZoneMinder/General.pm
+@@ -129,7 +129,7 @@ sub getCmdFormat {
+       chomp( $output );
+       Debug( "Test failed, '$output'\n" );
  
--            $prefix = "su ".$Config{ZM_WEB_USER}." -c '";
-+            $prefix = "su -m ".$Config{ZM_WEB_USER}." -c '";
-             $suffix = "'";
-             $command = $prefix.$null_command.$suffix;
-             Debug( "Testing \"$command\"\n" );
-+            $command .= " 2>&1";
-             $output = qx($command);
-             $status = $? >> 8;
-             if ( !$status )
+-      $prefix = "su ".$Config{ZM_WEB_USER}." -c '";
++      $prefix = "su -m ".$Config{ZM_WEB_USER}." -c '";
+       $suffix = "'";
+       $command = $prefix.$null_command.$suffix;
+       Debug( "Testing \"$command\"\n" );
diff --git a/zoneminder/patches/patch-src_Makefile_am b/zoneminder/patches/patch-src_Makefile_am
deleted file mode 100644
index 5c9d928bc5..0000000000
--- a/zoneminder/patches/patch-src_Makefile_am
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_Makefile_am,v 1.3 2015/04/05 08:51:08 dsainty Exp $
-
-Don't pointlessly chown zms.
-
---- src/Makefile.am.orig	2015-02-05 15:52:37.000000000 +1300
-+++ src/Makefile.am	2015-04-01 19:33:05.628602430 +1300
-@@ -128,7 +128,7 @@
- # Yes, you are correct. This is a HACK!
- install-exec-hook:
- 	( cd $(DESTDIR)@bindir@; mkdir -p $(DESTDIR)$(cgidir); mv zms $(DESTDIR)$(cgidir) )
--	( cd $(DESTDIR)$(cgidir); chown $(webuser):$(webgroup) zms; ln -f zms nph-zms )
-+	( cd $(DESTDIR)$(cgidir); ln -f zms nph-zms )
- 
- uninstall-hook:
- 	( cd $(DESTDIR)$(cgidir); rm -f zms nph-zms )
diff --git a/zoneminder/patches/patch-src_zm__event.cpp b/zoneminder/patches/patch-src_zm__event.cpp
index 945b88375e..3332ade60c 100644
--- a/zoneminder/patches/patch-src_zm__event.cpp
+++ b/zoneminder/patches/patch-src_zm__event.cpp
@@ -10,7 +10,7 @@ Also, this fix is expedient and probably a better fix is appropriate.
 
 Avoid sendfile code when sendfile doesn't exist.
 
---- src/zm_event.cpp.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zm_event.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_event.cpp
 @@ -36,11 +36,13 @@
  #include "zm_event.h"
@@ -27,66 +27,66 @@ Avoid sendfile code when sendfile doesn't exist.
  #include "zmf.h"
  
 @@ -80,7 +82,7 @@ Event::Event( Monitor *p_monitor, struct
-     static char sql[ZM_SQL_MED_BUFSIZ];
- 
-     struct tm *stime = localtime( &start_time.tv_sec );
--    snprintf( sql, sizeof(sql), "insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes ) values ( %d, 'New Event', from_unixtime( %ld ), %d, %d, '%s', '%s' )", monitor->Id(), start_time.tv_sec, monitor->Width(), monitor->Height(), cause.c_str(), notes.c_str() );
-+    snprintf( sql, sizeof(sql), "insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes ) values ( %d, 'New Event', from_unixtime( %jd ), %d, %d, '%s', '%s' )", monitor->Id(), (intmax_t) start_time.tv_sec, monitor->Width(), monitor->Height(), cause.c_str(), notes.c_str() );
-     if ( mysql_query( &dbconn, sql ) )
-     {
-         Error( "Can't insert event: %s", mysql_error( &dbconn ) );
-@@ -178,7 +180,7 @@ Event::~Event()
+   static char sql[ZM_SQL_MED_BUFSIZ];
  
-         Debug( 1, "Adding closing frame %d to DB", frames );
-         static char sql[ZM_SQL_SML_BUFSIZ];
--        snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, TimeStamp, Delta ) values ( %d, %d, from_unixtime( %ld ), %s%ld.%02ld )", id, frames, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
-+        snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, TimeStamp, Delta ) values ( %d, %d, from_unixtime( %jd ), %s%ld.%02ld )", id, frames, (intmax_t) end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
-         if ( mysql_query( &dbconn, sql ) )
-         {
-             Error( "Can't insert frame: %s", mysql_error( &dbconn ) );
-@@ -191,7 +193,7 @@ Event::~Event()
-     struct DeltaTimeval delta_time;
-     DELTA_TIMEVAL( delta_time, end_time, start_time, DT_PREC_2 );
+   struct tm *stime = localtime( &start_time.tv_sec );
+-  snprintf( sql, sizeof(sql), "insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes ) values ( %d, 'New Event', from_unixtime( %ld ), %d, %d, '%s', '%s' )", monitor->Id(), start_time.tv_sec, monitor->Width(), monitor->Height(), cause.c_str(), notes.c_str() );
++  snprintf( sql, sizeof(sql), "insert into Events ( MonitorId, Name, StartTime, Width, Height, Cause, Notes ) values ( %d, 'New Event', from_unixtime( %jd ), %d, %d, '%s', '%s' )", monitor->Id(), (intmax_t) start_time.tv_sec, monitor->Width(), monitor->Height(), cause.c_str(), notes.c_str() );
+   if ( mysql_query( &dbconn, sql ) )
+   {
+     Error( "Can't insert event: %s", mysql_error( &dbconn ) );
+@@ -181,7 +183,7 @@ Event::~Event()
  
--    snprintf( sql, sizeof(sql), "update Events set Name='%s%d', EndTime = from_unixtime( %ld ), Length = %s%ld.%02ld, Frames = %d, AlarmFrames = %d, TotScore = %d, AvgScore = %d, MaxScore = %d where Id = %d", monitor->EventPrefix(), id, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, frames, alarm_frames, tot_score, (int)(alarm_frames?(tot_score/alarm_frames):0), max_score, id );
-+    snprintf( sql, sizeof(sql), "update Events set Name='%s%d', EndTime = from_unixtime( %jd ), Length = %s%ld.%02ld, Frames = %d, AlarmFrames = %d, TotScore = %d, AvgScore = %d, MaxScore = %d where Id = %d", monitor->EventPrefix(), id, (intmax_t) end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, frames, alarm_frames, tot_score, (int)(alarm_frames?(tot_score/alarm_frames):0), max_score, id );
+     Debug( 1, "Adding closing frame %d to DB", frames );
+     static char sql[ZM_SQL_SML_BUFSIZ];
+-    snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, TimeStamp, Delta ) values ( %d, %d, from_unixtime( %ld ), %s%ld.%02ld )", id, frames, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
++    snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, TimeStamp, Delta ) values ( %d, %d, from_unixtime( %jd ), %s%ld.%02ld )", id, frames, end_time.tv_sec, delta_time.positive?"":"-", (intmax_t) delta_time.sec, delta_time.fsec );
      if ( mysql_query( &dbconn, sql ) )
      {
-         Error( "Can't update event: %s", mysql_error( &dbconn ) );
-@@ -522,7 +524,7 @@ void Event::AddFramesInternal( int n_fra
-         DELTA_TIMEVAL( delta_time, *(timestamps[i]), start_time, DT_PREC_2 );
- 
-         int sql_len = strlen(sql);
--        snprintf( sql+sql_len, sizeof(sql)-sql_len, "( %d, %d, from_unixtime(%ld), %s%ld.%02ld ), ", id, frames, timestamps[i]->tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
-+        snprintf( sql+sql_len, sizeof(sql)-sql_len, "( %d, %d, from_unixtime( %jd ), %s%ld.%02ld ), ", id, frames, (intmax_t) timestamps[i]->tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
+       Error( "Can't insert frame: %s", mysql_error( &dbconn ) );
+@@ -194,7 +196,7 @@ Event::~Event()
+   struct DeltaTimeval delta_time;
+   DELTA_TIMEVAL( delta_time, end_time, start_time, DT_PREC_2 );
  
-         frameCount++;
-     }
-@@ -573,7 +575,7 @@ void Event::AddFrame( Image *image, stru
+-  snprintf( sql, sizeof(sql), "update Events set Name='%s%d', EndTime = from_unixtime( %ld ), Length = %s%ld.%02ld, Frames = %d, AlarmFrames = %d, TotScore = %d, AvgScore = %d, MaxScore = %d where Id = %d", monitor->EventPrefix(), id, end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, frames, alarm_frames, tot_score, (int)(alarm_frames?(tot_score/alarm_frames):0), max_score, id );
++  snprintf( sql, sizeof(sql), "update Events set Name='%s%d', EndTime = from_unixtime( %jd ), Length = %s%ld.%02ld, Frames = %d, AlarmFrames = %d, TotScore = %d, AvgScore = %d, MaxScore = %d where Id = %d", monitor->EventPrefix(), id, (intmax_t) end_time.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, frames, alarm_frames, tot_score, (int)(alarm_frames?(tot_score/alarm_frames):0), max_score, id );
+   if ( mysql_query( &dbconn, sql ) )
+   {
+     Error( "Can't update event: %s", mysql_error( &dbconn ) );
+@@ -525,7 +527,7 @@ void Event::AddFramesInternal( int n_fra
+     DELTA_TIMEVAL( delta_time, *(timestamps[i]), start_time, DT_PREC_2 );
  
-         Debug( 1, "Adding frame %d of type \"%s\" to DB", frames, frame_type );
-         static char sql[ZM_SQL_MED_BUFSIZ];
--        snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, Type, TimeStamp, Delta, Score ) values ( %d, %d, '%s', from_unixtime( %ld ), %s%ld.%02ld, %d )", id, frames, frame_type, timestamp.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, score );
-+        snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, Type, TimeStamp, Delta, Score ) values ( %d, %d, '%s', from_unixtime( %jd ), %s%ld.%02ld, %d )", id, frames, frame_type, (intmax_t) timestamp.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, score );
-         if ( mysql_query( &dbconn, sql ) )
-         {
-             Error( "Can't insert frame: %s", mysql_error( &dbconn ) );
-@@ -661,7 +663,7 @@ bool EventStream::loadInitialEventData( 
- {
-     static char sql[ZM_SQL_SML_BUFSIZ];
+     int sql_len = strlen(sql);
+-    snprintf( sql+sql_len, sizeof(sql)-sql_len, "( %d, %d, from_unixtime(%ld), %s%ld.%02ld ), ", id, frames, timestamps[i]->tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
++    snprintf( sql+sql_len, sizeof(sql)-sql_len, "( %d, %d, from_unixtime(%jd), %s%ld.%02ld ), ", id, frames, (intmax_t) timestamps[i]->tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec );
  
--    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 );
+     frameCount++;
+   }
+@@ -576,7 +578,7 @@ void Event::AddFrame( Image *image, stru
  
+     Debug( 1, "Adding frame %d of type \"%s\" to DB", frames, frame_type );
+     static char sql[ZM_SQL_MED_BUFSIZ];
+-    snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, Type, TimeStamp, Delta, Score ) values ( %d, %d, '%s', from_unixtime( %ld ), %s%ld.%02ld, %d )", id, frames, frame_type, timestamp.tv_sec, delta_time.positive?"":"-", delta_time.sec, delta_time.fsec, score );
++    snprintf( sql, sizeof(sql), "insert into Frames ( EventId, FrameId, Type, TimeStamp, Delta, Score ) values ( %d, %d, '%s', from_unixtime( %jd ), %s%ld.%02ld, %d )", id, frames, frame_type, timestamp.tv_sec, delta_time.positive?"":"-", (intmax_t) delta_time.sec, delta_time.fsec, score );
      if ( mysql_query( &dbconn, sql ) )
      {
-@@ -1219,7 +1221,9 @@ bool EventStream::sendFrame( int delta_u
-     Debug( 2, "Sending frame %d", curr_frame_id );
+       Error( "Can't insert frame: %s", mysql_error( &dbconn ) );
+@@ -664,7 +666,7 @@ bool EventStream::loadInitialEventData( 
+ {
+   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 ) )
+   {
+@@ -1222,7 +1224,9 @@ bool EventStream::sendFrame( int delta_u
+   Debug( 2, "Sending frame %d", curr_frame_id );
  
-     static char filepath[PATH_MAX];
+   static char filepath[PATH_MAX];
 +#if HAVE_SENDFILE
-     static struct stat filestat;
+   static struct stat filestat;
 +#endif
-     FILE *fdj = NULL;
-     
-     snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id );
+   FILE *fdj = NULL;
+   
+   snprintf( filepath, sizeof(filepath), Event::capture_file_format, event_data->path, curr_frame_id );
diff --git a/zoneminder/patches/patch-src_zm__monitor.cpp b/zoneminder/patches/patch-src_zm__monitor.cpp
index e17f3031e2..ca36f490e7 100644
--- a/zoneminder/patches/patch-src_zm__monitor.cpp
+++ b/zoneminder/patches/patch-src_zm__monitor.cpp
@@ -4,32 +4,23 @@ $NetBSD: patch-src_zm__monitor.cpp,v 1.1 2017/02/15 00:54:25 joerg Exp $
 
 Avoid type error (suseconds_t is not long).  To be addressed upstream once caught up.
 
---- src/zm_monitor.cpp.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zm_monitor.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_monitor.cpp
 @@ -160,7 +160,7 @@ bool Monitor::MonitorLink::connect()
-             return( false );
-         }
-         mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
--        if ( mem_ptr < 0 )
-+        if ( mem_ptr == (void *)-1 )
-         {
-             Debug( 3, "Can't shmat link memory: %s", strerror(errno) );
-             connected = false;
-@@ -558,7 +558,7 @@ bool Monitor::connect() {
-         exit( -1 );
+       return( false );
      }
      mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
 -    if ( mem_ptr < 0 )
 +    if ( mem_ptr == (void *)-1 )
      {
-         Error( "Can't shmat: %s", strerror(errno));
-         exit( -1 );
-@@ -3181,7 +3181,7 @@ void Monitor::TimestampImage( Image *ts_
-                         found_macro = true;
-                         break;
-                     case 'f' :
--                        d_ptr += snprintf( d_ptr, sizeof(label_text)-(d_ptr-label_text), "%02ld", ts_time->tv_usec/10000 );
-+		         d_ptr += snprintf( d_ptr, sizeof(label_text)-(d_ptr-label_text), "%02ld", (long) ts_time->tv_usec/10000 );
-                         found_macro = true;
-                         break;
-                 }
+       Debug( 3, "Can't shmat link memory: %s", strerror(errno) );
+       connected = false;
+@@ -3175,7 +3175,7 @@ void Monitor::TimestampImage( Image *ts_
+             found_macro = true;
+             break;
+           case 'f' :
+-            d_ptr += snprintf( d_ptr, sizeof(label_text)-(d_ptr-label_text), "%02ld", ts_time->tv_usec/10000 );
++            d_ptr += snprintf( d_ptr, sizeof(label_text)-(d_ptr-label_text), "%02ld", (long) ts_time->tv_usec/10000 );
+             found_macro = true;
+             break;
+         }
diff --git a/zoneminder/patches/patch-src_zm__rtp__ctrl.h b/zoneminder/patches/patch-src_zm__rtp__ctrl.h
index 244e7f1673..0f66d0db81 100644
--- a/zoneminder/patches/patch-src_zm__rtp__ctrl.h
+++ b/zoneminder/patches/patch-src_zm__rtp__ctrl.h
@@ -5,14 +5,14 @@ Work around:
 
 Not reported upstream because pkgsrc is out of date; to be done if this is not resolved by updating.
 
---- src/zm_rtp_ctrl.h.orig	2015-02-05 02:52:37.000000000 +0000
+--- src/zm_rtp_ctrl.h.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_rtp_ctrl.h
 @@ -125,7 +125,7 @@ private:
-             // BYE
-             struct Bye
-             {
--                uint32_t srcN[];     // list of sources
-+                uint32_t srcN[0];     // list of sources
-                 // can't express trailing text for reason (what does this mean? it's not even english!)
-             } bye;
-          } body;
+       // BYE
+       struct
+       {
+-        uint32_t srcN[];   // list of sources
++        uint32_t srcN[0];   // list of sources
+         // can't express trailing text for reason (what does this mean? it's not even english!)
+       } bye;
+      } body;
diff --git a/zoneminder/patches/patch-src_zm__rtp__source.cpp b/zoneminder/patches/patch-src_zm__rtp__source.cpp
index 88d4397503..834d7ceb60 100644
--- a/zoneminder/patches/patch-src_zm__rtp__source.cpp
+++ b/zoneminder/patches/patch-src_zm__rtp__source.cpp
@@ -2,25 +2,25 @@ $NetBSD: patch-src_zm__rtp__source.cpp,v 1.2 2018/07/14 15:03:57 gdt Exp $
 
 Fix type issue with tv_sec; see earlier patches.
 
---- src/zm_rtp_source.cpp.orig	2015-02-05 02:52:37.000000000 +0000
+--- src/zm_rtp_source.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_rtp_source.cpp
 @@ -197,7 +197,7 @@ void RtpSource::updateRtcpData( uint32_t
  {
-     struct timeval ntpTime = tvMake( ntpTimeSecs, suseconds_t((USEC_PER_SEC*(ntpTimeFrac>>16))/(1<<16)) );
+   struct timeval ntpTime = tvMake( ntpTimeSecs, suseconds_t((USEC_PER_SEC*(ntpTimeFrac>>16))/(1<<16)) );
  
+-  Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", ntpTime.tv_sec, ntpTime.tv_usec, rtpTime );
++  Debug( 5, "ntpTime: %jd.%06ld, rtpTime: %x", (intmax_t) ntpTime.tv_sec,ntpTime.tv_usec, rtpTime );
+                            
+   if ( mBaseTimeNtp.tv_sec == 0 )
+   {
+@@ -207,8 +207,8 @@ void RtpSource::updateRtcpData( uint32_t
+   }
+   else if ( !mRtpClock )
+   {
+-    Debug( 5, "lastSrNtpTime: %ld.%06ld, rtpTime: %x", mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime );
 -    Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", ntpTime.tv_sec, ntpTime.tv_usec, rtpTime );
++    Debug( 5, "lastSrNtpTime: %jd.%06ld, rtpTime: %x", (intmax_t) mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime );
 +    Debug( 5, "ntpTime: %jd.%06ld, rtpTime: %x", (intmax_t) ntpTime.tv_sec, ntpTime.tv_usec, rtpTime );
-                                                      
-     if ( mBaseTimeNtp.tv_sec == 0 )
-     {
-@@ -207,8 +207,8 @@ void RtpSource::updateRtcpData( uint32_t
-     }
-     else if ( !mRtpClock )
-     {
--        Debug( 5, "lastSrNtpTime: %ld.%06ld, rtpTime: %x", mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime );
--        Debug( 5, "ntpTime: %ld.%06ld, rtpTime: %x", ntpTime.tv_sec, ntpTime.tv_usec, rtpTime );
-+        Debug( 5, "lastSrNtpTime: %jd.%06ld, rtpTime: %x", (intmax_t) mLastSrTimeNtp.tv_sec, mLastSrTimeNtp.tv_usec, rtpTime );
-+        Debug( 5, "ntpTime: %jd.%06ld, rtpTime: %x", (intmax_t) ntpTime.tv_sec, ntpTime.tv_usec, rtpTime );
  
-         double diffNtpTime = tvDiffSec( mBaseTimeNtp, ntpTime );
-         uint32_t diffRtpTime = rtpTime - mBaseTimeRtp;
+     double diffNtpTime = tvDiffSec( mBaseTimeNtp, ntpTime );
+     uint32_t diffRtpTime = rtpTime - mBaseTimeRtp;
diff --git a/zoneminder/patches/patch-src_zm__sdp.cpp b/zoneminder/patches/patch-src_zm__sdp.cpp
index ce66bfcd8d..4fb9264a61 100644
--- a/zoneminder/patches/patch-src_zm__sdp.cpp
+++ b/zoneminder/patches/patch-src_zm__sdp.cpp
@@ -2,14 +2,3 @@ $NetBSD: patch-src_zm__sdp.cpp,v 1.1 2017/09/09 07:55:31 alnsn Exp $
 
 Commit f5ef721: Add IP6 address type to valid types for ConnInfo.
 
---- src/zm_sdp.cpp.orig	2015-02-05 02:52:37.000000000 +0000
-+++ src/zm_sdp.cpp
-@@ -112,7 +112,7 @@ SessionDescriptor::ConnInfo::ConnInfo( c
-     if ( mNetworkType != "IN" )
-         throw Exception( "Invalid SDP network type '"+mNetworkType+"' in connection info '"+connInfo+"'" );
-     mAddressType = tokens[1];
--    if ( mAddressType != "IP4" )
-+    if ( mAddressType != "IP4" && mAddressType != "IP6" )
-         throw Exception( "Invalid SDP address type '"+mAddressType+"' in connection info '"+connInfo+"'" );
-     StringVector addressTokens = split( tokens[2], "/" );
-     if ( addressTokens.size() < 1 ) 
diff --git a/zoneminder/patches/patch-src_zm__thread.h b/zoneminder/patches/patch-src_zm__thread.h
index 102baafbd3..8bd75c2ddc 100644
--- a/zoneminder/patches/patch-src_zm__thread.h
+++ b/zoneminder/patches/patch-src_zm__thread.h
@@ -8,9 +8,9 @@ portable than syscall(SYS_gettid).
 
 \todo Fix correctly upstream.
 
---- src/zm_thread.h.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zm_thread.h.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_thread.h
-@@ -22,20 +22,21 @@
+@@ -22,16 +22,17 @@
  
  #include <unistd.h>
  #include <pthread.h>
@@ -31,72 +31,41 @@ portable than syscall(SYS_gettid).
  class ThreadException : public Exception
  {
  private:
--#ifndef SOLARIS
-+#ifndef USE_PTHREAD
- pid_t pid() {
-     pid_t tid; 
- #ifdef __FreeBSD__ 
-@@ -55,7 +56,8 @@ pid_t pid() {
- pthread_t pid() { return( pthread_self() ); }
+@@ -55,7 +56,9 @@ private:
+   pthread_t pid() { return( pthread_self() ); }
  #endif
  public:
--    ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)pid() ) ) {
-+ /* The type of pid() varies by OS */
-+ ThreadException( const std::string &message ) : Exception( stringtf( ("(%jd) "+message).c_str(), (intmax_t)pid() ) ) {
-     }
+-  ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)pid() ) ) {
++  /* The type of pid() varies by OS */
++  ThreadException( const std::string &message ) : Exception( stringtf( ("(%jd) "+message).c_str(), (intmax_t)pid() ) ) {
++
+   }
  };
  
-@@ -217,7 +219,7 @@ protected:
+@@ -217,7 +220,7 @@ protected:
  
-     Mutex mThreadMutex;
-     Condition mThreadCondition;
+   Mutex mThreadMutex;
+   Condition mThreadCondition;
 -#ifndef SOLARIS
 +#ifndef USE_PTHREAD
-     pid_t mPid;
+   pid_t mPid;
  #else
-     pthread_t mPid;
-@@ -229,7 +231,7 @@ protected:
-     Thread();
-     virtual ~Thread();
+   pthread_t mPid;
+@@ -230,7 +233,7 @@ protected:
+   Thread();
+   virtual ~Thread();
  
 -#ifndef SOLARIS
 +#ifndef USE_PTHREAD
-     pid_t id() const
-     {
-         pid_t tid; 
-@@ -237,22 +239,21 @@ protected:
-         long lwpid; 
-         thr_self(&lwpid); 
-         tid = lwpid; 
--#else 
-+#else /* __FreeBSD__ */
-     #ifdef __FreeBSD_kernel__
-         if ( (syscall(SYS_thr_self, &tid)) < 0 ) // Thread/Process id
--
-     #else
-         tid=syscall(SYS_gettid); 
-     #endif
--#endif
-+#endif /* __FreeBSD__ */
- return tid;
-     }
--#else
-+#else /* USE_PTHREAD */
-     pthread_t id() const
-     {
-         return( pthread_self() );
-     }
--#endif
-+#endif /* USE_PTHREAD */
-     void exit( int status = 0 )
-     {
-         //INFO( "Exiting" );
-@@ -268,7 +269,7 @@ public:
-     void kill( int signal );
-     bool isThread()
-     {
--        return( mPid > -1 && pthread_equal( pthread_self(), mThread ) );
-+        return( /* mPid > -1 && */ pthread_equal( pthread_self(), mThread ) );
-     }
-     bool isStarted() const { return( mStarted ); }
-     bool isRunning() const { return( mRunning ); }
+   pid_t id() const
+   {
+     pid_t tid; 
+@@ -269,7 +272,7 @@ public:
+   void kill( int signal );
+   bool isThread()
+   {
+-    return( mPid > -1 && pthread_equal( pthread_self(), mThread ) );
++    return( /* mPid > -1 && */ pthread_equal( pthread_self(), mThread ) );
+   }
+   bool isStarted() const { return( mStarted ); }
+   bool isRunning() const { return( mRunning ); }
diff --git a/zoneminder/patches/patch-src_zm__timer.h b/zoneminder/patches/patch-src_zm__timer.h
index 1bf96a03ef..d285fdb412 100644
--- a/zoneminder/patches/patch-src_zm__timer.h
+++ b/zoneminder/patches/patch-src_zm__timer.h
@@ -6,23 +6,23 @@ pthread_t is opaque, and under NetBSD is a pointer.  It's being abused here,
 but the value is only used for logging, and casting pthread_self() is more
 portable than syscall(SYS_gettid).
 
---- src/zm_timer.h.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zm_timer.h.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_timer.h
 @@ -33,7 +33,7 @@ private:
-     class TimerException : public Exception
-     {
-     private:
+   class TimerException : public Exception
+   {
+   private:
 -#ifndef SOLARIS
 +#if !defined(SOLARIS) && !defined(__NetBSD__)
-         pid_t pid() {
- 		pid_t tid;
+     pid_t pid() {
+     pid_t tid;
  #ifdef __FreeBSD__
 @@ -53,7 +53,7 @@ private:
- 	pthread_t pid() { return( pthread_self() ); }
+   pthread_t pid() { return( pthread_self() ); }
  #endif
-     public:
--        TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)pid() ) )
-+        TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (intmax_t)pid() ) )
-         {
-         }
-     };
+   public:
+-    TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)pid() ) )
++    TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)pid() ) )
+     {
+     }
+   };
diff --git a/zoneminder/patches/patch-src_zm__utils.cpp b/zoneminder/patches/patch-src_zm__utils.cpp
index 3d44c2fcab..9dd9ccb704 100644
--- a/zoneminder/patches/patch-src_zm__utils.cpp
+++ b/zoneminder/patches/patch-src_zm__utils.cpp
@@ -2,27 +2,27 @@ $NetBSD: patch-src_zm__utils.cpp,v 1.1 2013/03/24 16:47:47 joerg Exp $
 
 \todo Explain
 
---- src/zm_utils.cpp.orig	2011-06-21 09:19:11.000000000 +0000
+--- src/zm_utils.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_utils.cpp
-@@ -38,21 +38,6 @@ const std::string stringtf( const char *
-     return( tempString );
+@@ -76,21 +76,6 @@ const std::string stringtf( const char *
+   return( tempString );
  }
  
 -const std::string stringtf( const std::string &format, ... )
 -{
--    va_list ap;
--    char tempBuffer[8192];
--    std::string tempString;
+-  va_list ap;
+-  char tempBuffer[8192];
+-  std::string tempString;
 -
--    va_start(ap, format );
--    vsnprintf( tempBuffer, sizeof(tempBuffer), format.c_str() , ap );
--    va_end(ap);
+-  va_start(ap, format );
+-  vsnprintf( tempBuffer, sizeof(tempBuffer), format.c_str() , ap );
+-  va_end(ap);
 -
--    tempString = tempBuffer;
+-  tempString = tempBuffer;
 -
--    return( tempString );
+-  return( tempString );
 -}
 -
  bool startsWith( const std::string &haystack, const std::string &needle )
  {
-     return( haystack.substr( 0, needle.length() ) == needle );
+   return( haystack.substr( 0, needle.length() ) == needle );
diff --git a/zoneminder/patches/patch-src_zm_logger_cpp b/zoneminder/patches/patch-src_zm_logger_cpp
index aa5023e318..01d3d78064 100644
--- a/zoneminder/patches/patch-src_zm_logger_cpp
+++ b/zoneminder/patches/patch-src_zm_logger_cpp
@@ -9,7 +9,7 @@ to use SYS_gettid.
 
 Fix time types (sizes).
 
---- src/zm_logger.cpp.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zm_logger.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_logger.cpp
 @@ -33,9 +33,11 @@
  #include <errno.h>
@@ -24,39 +24,39 @@ Fix time types (sizes).
  bool Logger::smInitialised = false;
  Logger *Logger::smInstance = 0;
  
-@@ -504,7 +506,8 @@ void Logger::logPrint( bool hex, const c
-         va_list         argPtr;
-         struct timeval  timeVal;
+@@ -515,7 +517,8 @@ void Logger::logPrint( bool hex, const c
+     va_list     argPtr;
+     struct timeval  timeVal;
  
--        const char * const file = basename(filepath);
-+	/* \todo Verify that the cast is safe. */
-+        const char * const file = basename((char *)filepath);
-         
-         if ( level < PANIC || level > DEBUG9 )
-             Panic( "Invalid logger level %d", level );
-@@ -520,14 +523,14 @@ void Logger::logPrint( bool hex, const c
+-    const char * const file = basename(filepath);
++    /* \todo Verify that the cast is safe. */
++    const char * const file = basename((char *)filepath);
+     
+     if ( level < PANIC || level > DEBUG9 )
+       Panic( "Invalid logger level %d", level );
+@@ -531,14 +534,14 @@ void Logger::logPrint( bool hex, const c
  
-             subtractTime( &timeVal, &logStart );
+       subtractTime( &timeVal, &logStart );
  
--            snprintf( timeString, sizeof(timeString), "%ld.%03ld", timeVal.tv_sec, timeVal.tv_usec/1000 );
-+            snprintf( timeString, sizeof(timeString), "%jd.%03ld", (intmax_t) timeVal.tv_sec, timeVal.tv_usec/1000 );
-         }
-         else
-         {
-     #endif
-             char *timePtr = timeString;
-             timePtr += strftime( timePtr, sizeof(timeString), "%x %H:%M:%S", localtime(&timeVal.tv_sec) );
--            snprintf( timePtr, sizeof(timeString)-(timePtr-timeString), ".%06ld", timeVal.tv_usec );
-+            snprintf( timePtr, sizeof(timeString)-(timePtr-timeString), ".%06jd", (intmax_t) timeVal.tv_usec );
-     #if 0
-         }
-     #endif
-@@ -604,7 +607,7 @@ void Logger::logPrint( bool hex, const c
+-      snprintf( timeString, sizeof(timeString), "%ld.%03ld", timeVal.tv_sec, timeVal.tv_usec/1000 );
++      snprintf( timeString, sizeof(timeString), "%jd.%03ld", (intmax_t) timeVal.tv_sec, timeVal.tv_usec/1000 );
+     }
+     else
+     {
+   #endif
+       char *timePtr = timeString;
+       timePtr += strftime( timePtr, sizeof(timeString), "%x %H:%M:%S", localtime(&timeVal.tv_sec) );
+-      snprintf( timePtr, sizeof(timeString)-(timePtr-timeString), ".%06ld", timeVal.tv_usec );
++      snprintf( timePtr, sizeof(timeString)-(timePtr-timeString), ".%06jd", (intmax_t) timeVal.tv_usec );
+   #if 0
+     }
+   #endif
+@@ -615,7 +618,7 @@ void Logger::logPrint( bool hex, const c
  
-             mysql_real_escape_string( &mDbConnection, escapedString, syslogStart, strlen(syslogStart) );
- 			
--            snprintf( sql, sizeof(sql), "insert into Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) values ( %ld.%06ld, '%s', %d, %d, %d, '%s', '%s', '%s', %d )", timeVal.tv_sec, timeVal.tv_usec, mId.c_str(), staticConfig.SERVER_ID, tid, level, classString, escapedString, file, line );
-+            snprintf( sql, sizeof(sql), "insert into Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) values ( %jd.%06jd, '%s', %d, %d, %d, '%s', '%s', '%s', %d )", (intmax_t) timeVal.tv_sec, (intmax_t) timeVal.tv_usec, mId.c_str(), staticConfig.SERVER_ID, tid, level, classString, escapedString, file, line );
-             if ( mysql_query( &mDbConnection, sql ) )
-             {
-                 databaseLevel( NOLOG );
+       mysql_real_escape_string( &mDbConnection, escapedString, syslogStart, strlen(syslogStart) );
+       
+-      snprintf( sql, sizeof(sql), "insert into Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) values ( %ld.%06ld, '%s', %d, %d, %d, '%s', '%s', '%s', %d )", timeVal.tv_sec, timeVal.tv_usec, mId.c_str(), staticConfig.SERVER_ID, tid, level, classString, escapedString, file, line );
++      snprintf( sql, sizeof(sql), "insert into Logs ( TimeKey, Component, ServerId, Pid, Level, Code, Message, File, Line ) values ( %jd.%06jd, '%s', %d, %d, %d, '%s', '%s', '%s', %d )", (intmax_t) timeVal.tv_sec, (intmax_t) timeVal.tv_usec, mId.c_str(), staticConfig.SERVER_ID, tid, level, classString, escapedString, file, line );
+       if ( mysql_query( &mDbConnection, sql ) )
+       {
+         Level tempDatabaseLevel = mDatabaseLevel;
diff --git a/zoneminder/patches/patch-src_zm_signal_cpp b/zoneminder/patches/patch-src_zm_signal_cpp
index 6b37dc6ede..ece9e8193b 100644
--- a/zoneminder/patches/patch-src_zm_signal_cpp
+++ b/zoneminder/patches/patch-src_zm_signal_cpp
@@ -6,23 +6,3 @@ platform except Linux.  Only Linux is sure to have this style of mcontext_t.
 Resolves build on systems that have ucontext_t but an mcontext_t that
 doesn't look like Linux.
 
---- src/zm_signal.cpp.orig	2016-02-03 18:40:30.000000000 +0000
-+++ src/zm_signal.cpp
-@@ -69,13 +69,17 @@ RETSIGTYPE zm_die_handler(int signal)
- 	#ifdef __FreeBSD_kernel__
- 		ip = (void *)(uc->uc_mcontext.mc_rip);
- 	#else
-+		#if defined(__linux__)
- 		ip = (void *)(uc->uc_mcontext.gregs[REG_RIP]);
-+		#endif
- 	#endif
- #else
- 	#ifdef __FreeBSD_kernel__
- 		ip = (void *)(uc->uc_mcontext.mc_eip);
- 	#else
-+		#if defined(__linux__)
- 		ip = (void *)(uc->uc_mcontext.gregs[REG_EIP]);
-+		#endif
- 	#endif
- #endif				// defined(__x86_64__)
- 
diff --git a/zoneminder/patches/patch-src_zm_thread_cpp b/zoneminder/patches/patch-src_zm_thread_cpp
index b238b49ae2..c8cda29baa 100644
--- a/zoneminder/patches/patch-src_zm_thread_cpp
+++ b/zoneminder/patches/patch-src_zm_thread_cpp
@@ -5,26 +5,26 @@ in ZoneMinder.
 
 Work around varying notion of an undefined mpid on pthread/not.
 
---- src/zm_thread.cpp.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zm_thread.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zm_thread.cpp
 @@ -72,6 +72,7 @@ void Mutex::lock()
-         throw ThreadException( stringtf( "Unable to lock pthread mutex: %s", strerror(errno) ) );
+     throw ThreadException( stringtf( "Unable to lock pthread mutex: %s", strerror(errno) ) );
  }
  
 +#if 0
  void Mutex::lock( int secs )
  {
-     struct timespec timeout = getTimeout( secs );
+   struct timespec timeout = getTimeout( secs );
 @@ -85,6 +86,7 @@ void Mutex::lock( double secs )
-     if ( pthread_mutex_timedlock( &mMutex, &timeout ) < 0 )
-         throw ThreadException( stringtf( "Unable to timedlock pthread mutex: %s", strerror(errno) ) );
+   if ( pthread_mutex_timedlock( &mMutex, &timeout ) < 0 )
+     throw ThreadException( stringtf( "Unable to timedlock pthread mutex: %s", strerror(errno) ) );
  }
 +#endif
  
  void Mutex::unlock()
  {
 @@ -232,9 +234,15 @@ template <class T> void ThreadData<T>::u
-     Debug( 9, "Updated value, %p", this );
+   Debug( 9, "Updated value, %p", this );
  }
  
 +#ifndef USE_PTHREAD
@@ -34,22 +34,22 @@ Work around varying notion of an undefined mpid on pthread/not.
 +#endif /* USE_PTHREAD */
 +
  Thread::Thread() :
-     mThreadCondition( mThreadMutex ),
--    mPid( -1 ),
-+    mPid( MPID_UNDEFINED ),
-     mStarted( false ),
-     mRunning( false )
+   mThreadCondition( mThreadMutex ),
+-  mPid( -1 ),
++  mPid( MPID_UNDEFINED ),
+   mStarted( false ),
+   mRunning( false )
  {
-@@ -308,7 +316,7 @@ void Thread::join()
-     if ( isThread() )
-         throw ThreadException( "Can't self join thread" );
-     mThreadMutex.lock();
--    if ( mPid >= 0 )
-+    if ( mPid != MPID_UNDEFINED )
+@@ -307,7 +315,7 @@ void Thread::join()
+   if ( isThread() )
+     throw ThreadException( "Can't self join thread" );
+   mThreadMutex.lock();
+-  if ( mPid >= 0 )
++  if ( mPid >= MPID_UNDEFINED )
+   {
+     if ( mStarted )
      {
-         if ( mStarted )
-         {
-@@ -337,4 +345,5 @@ void Thread::kill( int signal )
+@@ -336,4 +344,5 @@ void Thread::kill( int signal )
  }
  
  // Some explicit template instantiations
diff --git a/zoneminder/patches/patch-src_zmc_cpp b/zoneminder/patches/patch-src_zmc_cpp
index 6d38092f9f..786433b25c 100644
--- a/zoneminder/patches/patch-src_zmc_cpp
+++ b/zoneminder/patches/patch-src_zmc_cpp
@@ -3,9 +3,9 @@ $NetBSD: patch-src_zmc_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
 Use a more appropriate initialisation for a long, and use the definition out
 of <limits.h>, for portability.
 
---- src/zmc.cpp.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zmc.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zmc.cpp
-@@ -57,7 +57,7 @@ possible, this should run at more or les
+@@ -55,7 +55,7 @@ possible, this should run at more or les
  
  #include <getopt.h>
  #include <signal.h>
@@ -14,12 +14,12 @@ of <limits.h>, for portability.
  #include <limits.h>
  #else
  #include <values.h>
-@@ -283,7 +283,7 @@ int main( int argc, char *argv[] )
- 		sigprocmask( SIG_BLOCK, &block_set, 0 );
- 		for ( int i = 0; i < n_monitors; i++ )
- 		{
--			long min_delay = MAXINT;
-+			long min_delay = LONG_MAX;
+@@ -280,7 +280,7 @@ int main( int argc, char *argv[] )
+     sigprocmask( SIG_BLOCK, &block_set, 0 );
+     for ( int i = 0; i < n_monitors; i++ )
+     {
+-      long min_delay = MAXINT;
++      long min_delay = LONG_MAX;
  
- 			gettimeofday( &now, NULL );
- 			for ( int j = 0; j < n_monitors; j++ )
+       gettimeofday( &now, NULL );
+       for ( int j = 0; j < n_monitors; j++ )
diff --git a/zoneminder/patches/patch-src_zmf.cpp b/zoneminder/patches/patch-src_zmf.cpp
index 7b65cefa55..2ebefa7b56 100644
--- a/zoneminder/patches/patch-src_zmf.cpp
+++ b/zoneminder/patches/patch-src_zmf.cpp
@@ -2,14 +2,14 @@ $NetBSD: patch-src_zmf.cpp,v 1.1 2017/02/15 00:54:25 joerg Exp $
 
 \todo Explain
 
---- src/zmf.cpp.orig	2017-02-15 00:51:13.260940737 +0000
+--- src/zmf.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zmf.cpp
-@@ -293,7 +293,7 @@ int main( int argc, char *argv[] )
- 		Debug( 1, "Got image, writing to %s", path );
+@@ -331,7 +331,7 @@ int main( int argc, char *argv[] )
+     Debug( 1, "Got image, writing to %s", path );
  
- 		FILE *fd = 0;
--		if ( (fd = fopen( path, "w" )) < 0 )
-+		if ( (fd = fopen( path, "w" )) == 0 )
- 		{
- 			Error( "Can't fopen '%s': %s", path, strerror(errno) );
- 			exit( -1 );
+     FILE *fd = 0;
+-    if ( (fd = fopen( path, "w" )) < 0 )
++    if ( (fd = fopen( path, "w" )) == 0 )
+     {
+       Error( "Can't fopen '%s': %s", path, strerror(errno) );
+       exit( -1 );
diff --git a/zoneminder/patches/patch-src_zmu.cpp b/zoneminder/patches/patch-src_zmu.cpp
index 9fbca34b67..36a79a18e3 100644
--- a/zoneminder/patches/patch-src_zmu.cpp
+++ b/zoneminder/patches/patch-src_zmu.cpp
@@ -2,53 +2,53 @@ $NetBSD: patch-src_zmu.cpp,v 1.2 2018/07/14 15:03:57 gdt Exp $
 
 time types
 
---- src/zmu.cpp.orig	2016-02-03 18:40:30.000000000 +0000
+--- src/zmu.cpp.orig	2019-02-22 15:38:47.000000000 +0000
 +++ src/zmu.cpp
 @@ -519,14 +519,14 @@ int main( int argc, char *argv[] )
- 					if ( timestamp.tv_sec )
- 						strftime( timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S", localtime( &timestamp.tv_sec ) );
- 					if ( image_idx == -1 )
--						printf( "Time of last image capture: %s.%02ld\n", timestamp_str, timestamp.tv_usec/10000 );
-+						printf( "Time of last image capture: %s.%02ld\n", timestamp_str, (long) timestamp.tv_usec/10000 );
- 					else
--						printf( "Time of image %d capture: %s.%02ld\n", image_idx, timestamp_str, timestamp.tv_usec/10000 );
-+						printf( "Time of image %d capture: %s.%02ld\n", image_idx, timestamp_str, (long) timestamp.tv_usec/10000 );
- 				}
- 				else
- 				{
- 					if ( have_output ) printf( "%c", separator );
--					printf( "%ld.%02ld", timestamp.tv_sec, timestamp.tv_usec/10000 );
-+					printf( "%jd.%02ld", (intmax_t) timestamp.tv_sec, (long) timestamp.tv_usec/10000 );
- 					have_output = true;
- 				}
- 			}
-@@ -793,12 +793,12 @@ int main( int argc, char *argv[] )
- 						if ( monitor && monitor->connect() )
- 						{
- 							struct timeval tv = monitor->GetTimestamp();
--							printf( "%4d%5d%6d%9d%11ld.%02ld%6d%6d%8d%8.2f\n",
-+							printf( "%4d%5d%6d%9d%11jd.%02ld%6d%6d%8d%8.2f\n",
- 								monitor->Id(),
- 								function,
- 								monitor->GetState(),
- 								monitor->GetTriggerState(),
--								tv.tv_sec, tv.tv_usec/10000,
-+								(intmax_t) tv.tv_sec, (long) tv.tv_usec/10000,
- 								monitor->GetLastReadIndex(),
- 								monitor->GetLastWriteIndex(),
- 								monitor->GetLastEvent(),
-@@ -810,12 +810,12 @@ int main( int argc, char *argv[] )
- 					else
- 					{
- 						struct timeval tv = { 0, 0 };
--						printf( "%4d%5d%6d%9d%11ld.%02ld%6d%6d%8d%8.2f\n",
-+						printf( "%4d%5d%6d%9d%11jd.%02ld%6d%6d%8d%8.2f\n",
- 							mon_id,
- 							function,
- 							0,
- 							0,
--							tv.tv_sec, tv.tv_usec/10000,
-+							(intmax_t) tv.tv_sec, (long) tv.tv_usec/10000,
- 							0,
- 							0,
- 							0,
+           if ( timestamp.tv_sec )
+             strftime( timestamp_str, sizeof(timestamp_str), "%Y-%m-%d %H:%M:%S", localtime( &timestamp.tv_sec ) );
+           if ( image_idx == -1 )
+-            printf( "Time of last image capture: %s.%02ld\n", timestamp_str, timestamp.tv_usec/10000 );
++            printf( "Time of last image capture: %s.%02ld\n", timestamp_str, (long) timestamp.tv_usec/10000 );
+           else
+-            printf( "Time of image %d capture: %s.%02ld\n", image_idx, timestamp_str, timestamp.tv_usec/10000 );
++            printf( "Time of image %d capture: %s.%02ld\n", image_idx, timestamp_str, (long) timestamp.tv_usec/10000 );
+         }
+         else
+         {
+           if ( have_output ) printf( "%c", separator );
+-          printf( "%ld.%02ld", timestamp.tv_sec, timestamp.tv_usec/10000 );
++          printf( "%jd.%02ld", (intmax_t) timestamp.tv_sec, (long) timestamp.tv_usec/10000 );
+           have_output = true;
+         }
+       }
+@@ -792,12 +792,12 @@ int main( int argc, char *argv[] )
+             if ( monitor && monitor->connect() )
+             {
+               struct timeval tv = monitor->GetTimestamp();
+-              printf( "%4d%5d%6d%9d%11ld.%02ld%6d%6d%8d%8.2f\n",
++              printf( "%4d%5d%6d%9d%11jd.%02ld%6d%6d%8d%8.2f\n",
+                 monitor->Id(),
+                 function,
+                 monitor->GetState(),
+                 monitor->GetTriggerState(),
+-                tv.tv_sec, tv.tv_usec/10000,
++		(intmax_t) tv.tv_sec, (long) tv.tv_usec/10000,
+                 monitor->GetLastReadIndex(),
+                 monitor->GetLastWriteIndex(),
+                 monitor->GetLastEvent(),
+@@ -809,12 +809,12 @@ int main( int argc, char *argv[] )
+           else
+           {
+             struct timeval tv = { 0, 0 };
+-            printf( "%4d%5d%6d%9d%11ld.%02ld%6d%6d%8d%8.2f\n",
++            printf( "%4d%5d%6d%9d%11jd.%02ld%6d%6d%8d%8.2f\n",
+               mon_id,
+               function,
+               0,
+               0,
+-              tv.tv_sec, tv.tv_usec/10000,
++	      (intmax_t) tv.tv_sec, (long) tv.tv_usec/10000,
+               0,
+               0,
+               0,
diff --git a/zoneminder/patches/patch-web_Makefile.am b/zoneminder/patches/patch-web_Makefile.am
deleted file mode 100644
index 4648d9fccb..0000000000
--- a/zoneminder/patches/patch-web_Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-web_Makefile.am,v 1.1 2013/03/24 16:47:47 joerg Exp $
-
-Don't set owners; see previous
-
---- web/Makefile.am.orig	2013-03-24 15:56:43.000000000 +0000
-+++ web/Makefile.am
-@@ -21,7 +21,7 @@ dist_web_DATA = \
- 	index.php
- 
- # Yes, you are correct. This is a HACK!
--install-data-hook:
-+pkgsrc-disabled-install-data-hook:
- 	( cd $(DESTDIR)$(webdir); chown $(webuser):$(webgroup) $(dist_web_DATA) )
- 	( cd $(DESTDIR)$(webdir); chown -R $(webuser):$(webgroup) $(SUBDIRS) )
- 	@-( cd $(DESTDIR)$(webdir); if ! test -e events; then mkdir events; fi; chown $(webuser):$(webgroup) events; chmod u+w events )


Home | Main Index | Thread Index | Old Index