summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-03-24 16:47:47 +0000
committerjoerg <joerg@pkgsrc.org>2013-03-24 16:47:47 +0000
commit653bfe530f6163a8b0bf15d20f07776d24c73ea2 (patch)
tree5c902b431cff051570527598eecfdb79726a58f4 /security
parent5426e8abe3c97623b38e5d9bba8c74a665d663c5 (diff)
downloadpkgsrc-653bfe530f6163a8b0bf15d20f07776d24c73ea2.tar.gz
Fix build with Clang and as unprivileged user.
Diffstat (limited to 'security')
-rw-r--r--security/zoneminder/Makefile7
-rw-r--r--security/zoneminder/distinfo33
-rw-r--r--security/zoneminder/patches/patch-Makefile_am10
-rw-r--r--security/zoneminder/patches/patch-configure_ac27
-rw-r--r--security/zoneminder/patches/patch-scripts_zm_in12
-rw-r--r--security/zoneminder/patches/patch-src_Makefile_am8
-rw-r--r--security/zoneminder/patches/patch-src_zm__thread.h13
-rw-r--r--security/zoneminder/patches/patch-src_zm__timer.h13
-rw-r--r--security/zoneminder/patches/patch-src_zm__utils.cpp26
-rw-r--r--security/zoneminder/patches/patch-src_zm__utils.h12
-rw-r--r--security/zoneminder/patches/patch-src_zm_comms_cpp6
-rw-r--r--security/zoneminder/patches/patch-src_zm_comms_h10
-rw-r--r--security/zoneminder/patches/patch-src_zm_logger_cpp8
-rw-r--r--security/zoneminder/patches/patch-src_zm_remote_camera_h6
-rw-r--r--security/zoneminder/patches/patch-src_zm_signal_h6
-rw-r--r--security/zoneminder/patches/patch-src_zm_thread_cpp17
-rw-r--r--security/zoneminder/patches/patch-src_zmc_cpp8
-rw-r--r--security/zoneminder/patches/patch-src_zmf_cpp10
-rw-r--r--security/zoneminder/patches/patch-web_Makefile.am13
-rw-r--r--security/zoneminder/patches/patch-web_ajax_stream_php8
20 files changed, 172 insertions, 81 deletions
diff --git a/security/zoneminder/Makefile b/security/zoneminder/Makefile
index d33cf1347fd..545b11782c9 100644
--- a/security/zoneminder/Makefile
+++ b/security/zoneminder/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2013/03/16 07:21:22 obache Exp $
+# $NetBSD: Makefile,v 1.4 2013/03/24 16:47:47 joerg Exp $
#
DISTNAME= ZoneMinder-1.25.0
@@ -173,9 +173,8 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/zm.conf ${DESTDIR}${PREFIX}/${EGDIR}/config/zm.conf
${INSTALL_SCRIPT} ${WRKSRC}/scripts/zm ${DESTDIR}${PREFIX}/share/examples/rc.d/zoneminder
${INSTALL_DATA} ${WRKSRC}/db/*.sql ${DESTDIR}${PREFIX}/share/zoneminder/db/
- rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp
- rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events
- rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images
+ rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events || true
+ rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images || true
${LN} -s ${ZM_CACHE}/temp ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp
${LN} -s ${ZM_CACHE}/events ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events
${LN} -s ${ZM_CACHE}/images ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images
diff --git a/security/zoneminder/distinfo b/security/zoneminder/distinfo
index 1d3291b1c38..c21c79ea8f4 100644
--- a/security/zoneminder/distinfo
+++ b/security/zoneminder/distinfo
@@ -1,18 +1,23 @@
-$NetBSD: distinfo,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: distinfo,v 1.2 2013/03/24 16:47:47 joerg Exp $
SHA1 (ZoneMinder-1.25.0.tar.gz) = a93a976a5cd82f1e197f4d7bd626d3f0387c4231
RMD160 (ZoneMinder-1.25.0.tar.gz) = 32a4f503770103e55bfe592864c1cab82e7395a6
Size (ZoneMinder-1.25.0.tar.gz) = 1119091 bytes
-SHA1 (patch-Makefile_am) = a66d11a5743a945801bec23c0611e1ec34b9e207
-SHA1 (patch-configure_ac) = 5f839d3f619096f843620079f491393d74d751ad
-SHA1 (patch-scripts_zm_in) = e8dd80bb6d00f17199a0e44d0b6490567bc005eb
-SHA1 (patch-src_Makefile_am) = 54ed8c43b964cc549ee6b78a569de552f617f5a7
-SHA1 (patch-src_zm_comms_cpp) = 8b786fa7c0a61ce94b9310df4ff14b4daec785c8
-SHA1 (patch-src_zm_comms_h) = 3436a563a8c1fedfca6daa325c017b9d2ed22f21
-SHA1 (patch-src_zm_logger_cpp) = 486f9ae99623ed4a8b20ddc0543f83217d85805d
-SHA1 (patch-src_zm_remote_camera_h) = b02a58a2422007aa6ab23338d4ffa9bb7679f165
-SHA1 (patch-src_zm_signal_h) = c40fb8c3265e042771058794c2f13f7a519a7390
-SHA1 (patch-src_zm_thread_cpp) = f1957ab1ea7bc80a1f8c2c129fddb7e4b541b87b
-SHA1 (patch-src_zmc_cpp) = bf8e745ceda9dc61c2d11c92e2ea9a9eb242a3b6
-SHA1 (patch-src_zmf_cpp) = 23707dd6493b11fd2b79dcbf9e09598ce286c07f
-SHA1 (patch-web_ajax_stream_php) = a3be6ae58c98c90807c764937ffe0f9a782a9de2
+SHA1 (patch-Makefile_am) = 09b3ba7f9c292ef672506219be66f059290b6405
+SHA1 (patch-configure_ac) = 87410ce8bc8fe42e08bf0e32e40b59619f7db90d
+SHA1 (patch-scripts_zm_in) = 91809c9a179a0135c432a0ffad7c2d2ddfd512de
+SHA1 (patch-src_Makefile_am) = 84999df8b7c80b049e2dd9cb308e12f50ed8285f
+SHA1 (patch-src_zm__thread.h) = 51b2868f6de36e6713f6f0a0cd5a40e8cfc7b943
+SHA1 (patch-src_zm__timer.h) = 38dae4f8573c7ae6d459adddf05260ce4b6e2088
+SHA1 (patch-src_zm__utils.cpp) = f6a109296146822014d57d39094390adcc5df760
+SHA1 (patch-src_zm__utils.h) = 361a69dfd4e2c3e46cf6fea3e1470df2e5cfa446
+SHA1 (patch-src_zm_comms_cpp) = d40932a3d0ae4375a649f200d973995d56aa71c7
+SHA1 (patch-src_zm_comms_h) = 69992d44e17d5c8e15cd4431f2fcb313e4891852
+SHA1 (patch-src_zm_logger_cpp) = 879077d2961ee735dd3e150aaf18a81117dc98db
+SHA1 (patch-src_zm_remote_camera_h) = 9df0e7f0eaab171b50560eb3490a4c5f44d066dc
+SHA1 (patch-src_zm_signal_h) = 226e96d4771921a8ad23fbe130a80a43550062d3
+SHA1 (patch-src_zm_thread_cpp) = c5f64697c3024c6c382f9ae2c5dbe9c21b529b6e
+SHA1 (patch-src_zmc_cpp) = d1046ddfad3a88bdd30501237834ec9e9fbc4c83
+SHA1 (patch-src_zmf_cpp) = 77dafa6ef6e9756b975e45b2ca41d1be85f9bf2c
+SHA1 (patch-web_Makefile.am) = ddb3815fa1b1799658034789302c8d3840f2b894
+SHA1 (patch-web_ajax_stream_php) = e8f811e63bedec03345b74db72c3d8014b3cc7f6
diff --git a/security/zoneminder/patches/patch-Makefile_am b/security/zoneminder/patches/patch-Makefile_am
index 2160ebdee65..e64706c1aa5 100644
--- a/security/zoneminder/patches/patch-Makefile_am
+++ b/security/zoneminder/patches/patch-Makefile_am
@@ -1,11 +1,11 @@
-$NetBSD: patch-Makefile_am,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-Makefile_am,v 1.2 2013/03/24 16:47:47 joerg 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 2009-03-21 01:07:10.000000000 +1300
-+++ Makefile.am 2010-11-23 00:34:37.003586001 +1300
-@@ -4,8 +4,8 @@
+--- Makefile.am.orig 2011-05-20 09:39:37.000000000 +0000
++++ Makefile.am
+@@ -4,8 +4,8 @@ AUTOMAKE_OPTIONS = gnu
webuser = @WEB_USER@
webgroup = @WEB_GROUP@
@@ -16,7 +16,7 @@ Don't install zm.conf at all - let Pkgsrc install it into EGDIR.
SUBDIRS = \
src \
-@@ -19,7 +19,7 @@
+@@ -19,7 +19,7 @@ EXTRA_DIST = \
zmconfgen.pl.in
# Yes, you are correct. This is a HACK!
diff --git a/security/zoneminder/patches/patch-configure_ac b/security/zoneminder/patches/patch-configure_ac
index 110bba0f50e..779599de516 100644
--- a/security/zoneminder/patches/patch-configure_ac
+++ b/security/zoneminder/patches/patch-configure_ac
@@ -1,13 +1,13 @@
-$NetBSD: patch-configure_ac,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-configure_ac,v 1.2 2013/03/24 16:47:47 joerg Exp $
Set PATH_BUILD to PREFIX/share/zoneminder, so that zmupdate.pl can locate the
database build scripts as installed files, not out of a probably non-existent
build directory. Correct shell syntax. Allow Pkgsrc to manage dlopen()
support.
---- configure.ac.orig 2011-08-24 03:10:32.000000000 +1200
-+++ configure.ac 2013-02-13 14:09:57.143689856 +1300
-@@ -2,9 +2,9 @@
+--- configure.ac.orig 2011-08-23 15:10:32.000000000 +0000
++++ configure.ac
+@@ -2,10 +2,10 @@ AC_PREREQ(2.59)
AC_INIT(zm,1.25.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/zm.h)
@@ -15,12 +15,13 @@ support.
+AC_CONFIG_HEADERS(config.h)
-PATH_BUILD=`pwd`
-+AC_DEFINE_DIR([DATA_ROOT_DIR],[datarootdir],[Expanded data directory])
-AC_SUBST(PATH_BUILD)
++AC_DEFINE_DIR([DATA_ROOT_DIR],[datarootdir],[Expanded data directory])
+AC_SUBST(PATH_BUILD, "$DATA_ROOT_DIR/zoneminder")
TIME_BUILD=`date +'%s'`
AC_SUBST(TIME_BUILD)
-@@ -19,31 +19,31 @@
+
+@@ -19,31 +19,31 @@ AC_ARG_VAR(ZM_RUNDIR,[Location of transi
AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /tmp/zm])
AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm])
@@ -61,7 +62,7 @@ support.
AC_SUBST(ZM_LOGDIR,[/var/log/zm])
fi
-@@ -203,7 +203,7 @@
+@@ -203,7 +203,7 @@ AC_ARG_ENABLE(mmap,
filesystem which will normally be the case by default.
e.g. --enable-mmap=yes or --disable-mmap])
)
@@ -70,7 +71,7 @@ support.
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")
-@@ -254,7 +254,7 @@
+@@ -254,7 +254,7 @@ AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no)
AC_PATH_PROG(PATH_FFMPEG,ffmpeg)
AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no)
AC_PATH_PROG(PATH_NETPBM,pnmscale)
@@ -79,7 +80,7 @@ support.
PATH_NETPBM=`dirname $PATH_NETPBM`
fi
-@@ -262,8 +262,8 @@
+@@ -262,8 +262,8 @@ fi
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.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))
@@ -90,7 +91,7 @@ support.
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(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),)
-@@ -293,7 +293,7 @@
+@@ -293,7 +293,7 @@ AC_CHECK_HEADERS(syscall.h,,,)
AC_CHECK_HEADERS(pthread.h,,,)
AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),)
AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,0),)
@@ -99,7 +100,7 @@ support.
AC_SUBST(ZM_HAS_V4L,1)
else
AC_SUBST(ZM_HAS_V4L,0)
-@@ -307,7 +307,7 @@
+@@ -307,7 +307,7 @@ AC_CHECK_HEADERS(libavformat/avformat.h,
AC_CHECK_HEADERS(libswscale/swscale.h,,,)
AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
@@ -108,7 +109,7 @@ support.
AC_CHECK_HEADERS(sys/mman.h,,,)
AC_CHECK_HEADERS(fcntl.h,,,)
else
-@@ -317,7 +317,7 @@
+@@ -317,7 +317,7 @@ fi
AC_CHECK_HEADERS(zlib.h,,,)
AC_CHECK_DECLS(round,,,[#include <math.h>])
@@ -117,7 +118,7 @@ support.
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
-@@ -339,7 +339,7 @@
+@@ -339,7 +339,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))
diff --git a/security/zoneminder/patches/patch-scripts_zm_in b/security/zoneminder/patches/patch-scripts_zm_in
index 7a78342238a..b108b17c5d8 100644
--- a/security/zoneminder/patches/patch-scripts_zm_in
+++ b/security/zoneminder/patches/patch-scripts_zm_in
@@ -1,12 +1,12 @@
-$NetBSD: patch-scripts_zm_in,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-scripts_zm_in,v 1.2 2013/03/24 16:47:47 joerg Exp $
/etc/rc.d/init.d/functions doesn't commonly exist.
The LOCKFILE feature appears unused, and requires a /var/lock/subsys directory
we don't have.
---- scripts/zm.in.orig 2010-11-23 01:26:38.000000000 +1300
-+++ scripts/zm.in 2010-11-23 01:26:46.000000000 +1300
+--- scripts/zm.in.orig 2011-06-22 10:42:16.000000000 +0000
++++ scripts/zm.in
@@ -4,12 +4,12 @@
# processname: zmpkg.pl
@@ -22,7 +22,7 @@ we don't have.
loadconf()
{
-@@ -50,7 +50,7 @@
+@@ -50,7 +50,7 @@ start()
RETVAL=$?
[ $RETVAL = 0 ] && success || failure
echo
@@ -31,7 +31,7 @@ we don't have.
return $RETVAL
}
-@@ -62,7 +62,7 @@
+@@ -62,7 +62,7 @@ stop()
RETVAL=$?
[ $RETVAL = 0 ] && success || failure
echo
@@ -40,7 +40,7 @@ we don't have.
}
zmstatus()
-@@ -103,7 +103,7 @@
+@@ -103,7 +103,7 @@ case "$1" in
result=`$ZM_PATH_BIN/zmdc.pl check`
if [ "$result" = "running" ]; then
$ZM_PATH_BIN/zmdc.pl shutdown > /dev/null
diff --git a/security/zoneminder/patches/patch-src_Makefile_am b/security/zoneminder/patches/patch-src_Makefile_am
index 8cb9faae75f..9f2d7c366c1 100644
--- a/security/zoneminder/patches/patch-src_Makefile_am
+++ b/security/zoneminder/patches/patch-src_Makefile_am
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_Makefile_am,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_Makefile_am,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't pointlessly chown zms. Don't setuid zmfix here, let Pkgsrc deal with
that.
---- src/Makefile.am.orig 2010-11-23 01:57:40.000000000 +1300
-+++ src/Makefile.am 2010-11-23 01:58:47.000000000 +1300
-@@ -124,8 +124,8 @@
+--- src/Makefile.am.orig 2011-06-21 07:40:14.000000000 +0000
++++ src/Makefile.am
+@@ -125,8 +125,8 @@ dist-hook:
# Yes, you are correct. This is a HACK!
install-exec-hook:
( cd $(DESTDIR)@bindir@; mkdir -p $(DESTDIR)$(cgidir); mv zms $(DESTDIR)$(cgidir) )
diff --git a/security/zoneminder/patches/patch-src_zm__thread.h b/security/zoneminder/patches/patch-src_zm__thread.h
new file mode 100644
index 00000000000..dc1fc4f0c4b
--- /dev/null
+++ b/security/zoneminder/patches/patch-src_zm__thread.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_zm__thread.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_thread.h.orig 2009-06-08 09:20:17.000000000 +0000
++++ src/zm_thread.h
+@@ -27,7 +27,7 @@
+ class ThreadException : public Exception
+ {
+ public:
+- ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
++ ThreadException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)syscall(224) ) )
+ {
+ }
+ };
diff --git a/security/zoneminder/patches/patch-src_zm__timer.h b/security/zoneminder/patches/patch-src_zm__timer.h
new file mode 100644
index 00000000000..77b6a5e9301
--- /dev/null
+++ b/security/zoneminder/patches/patch-src_zm__timer.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_zm__timer.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_timer.h.orig 2008-07-25 09:33:24.000000000 +0000
++++ src/zm_timer.h
+@@ -30,7 +30,7 @@ private:
+ class TimerException : public Exception
+ {
+ public:
+- TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
++ TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)syscall(224) ) )
+ {
+ }
+ };
diff --git a/security/zoneminder/patches/patch-src_zm__utils.cpp b/security/zoneminder/patches/patch-src_zm__utils.cpp
new file mode 100644
index 00000000000..488fef6a4b9
--- /dev/null
+++ b/security/zoneminder/patches/patch-src_zm__utils.cpp
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_zm__utils.cpp,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_utils.cpp.orig 2011-06-21 09:19:11.000000000 +0000
++++ src/zm_utils.cpp
+@@ -38,21 +38,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_start(ap, format );
+- vsnprintf( tempBuffer, sizeof(tempBuffer), format.c_str() , ap );
+- va_end(ap);
+-
+- tempString = tempBuffer;
+-
+- return( tempString );
+-}
+-
+ bool startsWith( const std::string &haystack, const std::string &needle )
+ {
+ return( haystack.substr( 0, needle.length() ) == needle );
diff --git a/security/zoneminder/patches/patch-src_zm__utils.h b/security/zoneminder/patches/patch-src_zm__utils.h
new file mode 100644
index 00000000000..87c319a1968
--- /dev/null
+++ b/security/zoneminder/patches/patch-src_zm__utils.h
@@ -0,0 +1,12 @@
+$NetBSD: patch-src_zm__utils.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- src/zm_utils.h.orig 2009-06-02 07:59:26.000000000 +0000
++++ src/zm_utils.h
+@@ -26,7 +26,6 @@
+ typedef std::vector<std::string> StringVector;
+
+ const std::string stringtf( const char *format, ... );
+-const std::string stringtf( const std::string &format, ... );
+
+ bool startsWith( const std::string &haystack, const std::string &needle );
+ StringVector split( const std::string &string, const std::string chars, int limit=0 );
diff --git a/security/zoneminder/patches/patch-src_zm_comms_cpp b/security/zoneminder/patches/patch-src_zm_comms_cpp
index ce21a69367a..a653d289543 100644
--- a/security/zoneminder/patches/patch-src_zm_comms_cpp
+++ b/security/zoneminder/patches/patch-src_zm_comms_cpp
@@ -1,9 +1,9 @@
-$NetBSD: patch-src_zm_comms_cpp,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zm_comms_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't attempt to include headers that don't exist.
---- src/zm_comms.cpp.orig 2013-03-08 08:26:27.000000000 +1300
-+++ src/zm_comms.cpp 2013-03-08 08:27:10.000000000 +1300
+--- src/zm_comms.cpp.orig 2011-06-21 09:19:10.000000000 +0000
++++ src/zm_comms.cpp
@@ -25,7 +25,9 @@
#include <fcntl.h>
#include <stdarg.h>
diff --git a/security/zoneminder/patches/patch-src_zm_comms_h b/security/zoneminder/patches/patch-src_zm_comms_h
index a44bcfab74d..f5a85e75cfb 100644
--- a/security/zoneminder/patches/patch-src_zm_comms_h
+++ b/security/zoneminder/patches/patch-src_zm_comms_h
@@ -1,12 +1,12 @@
-$NetBSD: patch-src_zm_comms_h,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zm_comms_h,v 1.2 2013/03/24 16:47:47 joerg Exp $
extern "C" system headers.
Include missing system headers for NetBSD.
---- src/zm_comms.h 2009-10-15 02:08:49.000000000 +1300
-+++ src/zm_comms.h 2013-03-08 09:07:38.000000000 +1300
-@@ -22,10 +23,15 @@
+--- src/zm_comms.h.orig 2009-10-14 13:08:49.000000000 +0000
++++ src/zm_comms.h
+@@ -22,10 +22,17 @@
#include "zm_exception.h"
@@ -18,6 +18,8 @@ Include missing system headers for NetBSD.
+#include <sys/uio.h>
#include <sys/un.h>
+#include <netinet/in.h>
++#include <stdlib.h>
++#include <string.h>
+}
#include <set>
diff --git a/security/zoneminder/patches/patch-src_zm_logger_cpp b/security/zoneminder/patches/patch-src_zm_logger_cpp
index 376b2b4b280..4d2a47fdf25 100644
--- a/security/zoneminder/patches/patch-src_zm_logger_cpp
+++ b/security/zoneminder/patches/patch-src_zm_logger_cpp
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_zm_logger_cpp,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zm_logger_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
If the system has syscall() but not SYS_gettid [E.g. NetBSD], don't attempt
to use SYS_gettid.
---- src/zm_logger.cpp.orig 2013-03-08 10:51:36.000000000 +1300
-+++ src/zm_logger.cpp 2013-03-08 10:52:17.000000000 +1300
-@@ -515,7 +515,7 @@
+--- src/zm_logger.cpp.orig 2011-06-28 11:07:35.000000000 +0000
++++ src/zm_logger.cpp
+@@ -515,7 +515,7 @@ void Logger::logPrint( bool hex, const c
#endif
pid_t tid;
diff --git a/security/zoneminder/patches/patch-src_zm_remote_camera_h b/security/zoneminder/patches/patch-src_zm_remote_camera_h
index 38cc89851bf..8de4bb61a46 100644
--- a/security/zoneminder/patches/patch-src_zm_remote_camera_h
+++ b/security/zoneminder/patches/patch-src_zm_remote_camera_h
@@ -1,9 +1,9 @@
-$NetBSD: patch-src_zm_remote_camera_h,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zm_remote_camera_h,v 1.2 2013/03/24 16:47:47 joerg Exp $
Declare sockaddr_in.
---- src/zm_remote_camera.h.orig 2013-03-08 11:09:05.000000000 +1300
-+++ src/zm_remote_camera.h 2013-03-08 11:10:42.000000000 +1300
+--- src/zm_remote_camera.h.orig 2009-06-02 07:59:26.000000000 +0000
++++ src/zm_remote_camera.h
@@ -22,6 +22,8 @@
#include "zm_camera.h"
diff --git a/security/zoneminder/patches/patch-src_zm_signal_h b/security/zoneminder/patches/patch-src_zm_signal_h
index d5716b24565..7c2d35e2df1 100644
--- a/security/zoneminder/patches/patch-src_zm_signal_h
+++ b/security/zoneminder/patches/patch-src_zm_signal_h
@@ -1,9 +1,9 @@
-$NetBSD: patch-src_zm_signal_h,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zm_signal_h,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't include <execinfo.h> for lack of portability.
---- src/zm_signal.h.orig 2010-11-09 00:11:24.876121001 +1300
-+++ src/zm_signal.h 2010-11-09 00:11:32.692121001 +1300
+--- src/zm_signal.h.orig 2008-07-25 09:33:24.000000000 +0000
++++ src/zm_signal.h
@@ -21,7 +21,6 @@
#define ZM_SIGNAL_H
diff --git a/security/zoneminder/patches/patch-src_zm_thread_cpp b/security/zoneminder/patches/patch-src_zm_thread_cpp
index 56b1a41394e..b02a0a5288b 100644
--- a/security/zoneminder/patches/patch-src_zm_thread_cpp
+++ b/security/zoneminder/patches/patch-src_zm_thread_cpp
@@ -1,11 +1,11 @@
-$NetBSD: patch-src_zm_thread_cpp,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zm_thread_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
pthread_mutex_timedlock() is not available on NetBSD 5.0, and not required
in ZoneMinder.
---- src/zm_thread.cpp.orig 2013-03-08 11:32:29.000000000 +1300
-+++ src/zm_thread.cpp 2013-03-08 11:32:58.000000000 +1300
-@@ -72,6 +72,7 @@
+--- src/zm_thread.cpp.orig 2011-06-21 09:19:11.000000000 +0000
++++ src/zm_thread.cpp
+@@ -72,6 +72,7 @@ void Mutex::lock()
throw ThreadException( stringtf( "Unable to lock pthread mutex: %s", strerror(errno) ) );
}
@@ -13,7 +13,7 @@ in ZoneMinder.
void Mutex::lock( int secs )
{
struct timespec timeout = getTimeout( secs );
-@@ -85,6 +86,7 @@
+@@ -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) ) );
}
@@ -21,3 +21,10 @@ in ZoneMinder.
void Mutex::unlock()
{
+@@ -336,4 +338,5 @@ void Thread::kill( int signal )
+ }
+
+ // Some explicit template instantiations
+-#include "zm_threaddata.cpp"
++template class ThreadData<bool>;
++template class ThreadData<int>;
diff --git a/security/zoneminder/patches/patch-src_zmc_cpp b/security/zoneminder/patches/patch-src_zmc_cpp
index 6ce06d66e28..c11bfef4623 100644
--- a/security/zoneminder/patches/patch-src_zmc_cpp
+++ b/security/zoneminder/patches/patch-src_zmc_cpp
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_zmc_cpp,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$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 2010-11-08 23:51:08.000000000 +1300
-+++ src/zmc.cpp 2010-11-08 23:51:45.000000000 +1300
+--- src/zmc.cpp.orig 2011-06-21 09:19:11.000000000 +0000
++++ src/zmc.cpp
@@ -19,7 +19,7 @@
#include <getopt.h>
@@ -14,7 +14,7 @@ of <limits.h>, for portability.
#include "zm.h"
#include "zm_db.h"
-@@ -224,7 +224,7 @@
+@@ -224,7 +224,7 @@ int main( int argc, char *argv[] )
sigprocmask( SIG_BLOCK, &block_set, 0 );
for ( int i = 0; i < n_monitors; i++ )
{
diff --git a/security/zoneminder/patches/patch-src_zmf_cpp b/security/zoneminder/patches/patch-src_zmf_cpp
index c65375c84eb..b5e0b2db76b 100644
--- a/security/zoneminder/patches/patch-src_zmf_cpp
+++ b/security/zoneminder/patches/patch-src_zmf_cpp
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_zmf_cpp,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-src_zmf_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
http://www.zoneminder.com/wiki/index.php/1.24.2_Patches
@@ -11,9 +11,9 @@ image frame from the socket, all the data had not yet been written to the
socket by the writer, so the reader thought there was a problem. The loop
reads from the socket until a full image frame is read, or there is an error.
---- src/zmf.cpp.orig 2010-11-04 12:10:08.824894001 +1300
-+++ src/zmf.cpp 2010-11-04 12:10:15.992894001 +1300
-@@ -231,16 +231,39 @@
+--- src/zmf.cpp.orig 2011-06-21 09:19:11.000000000 +0000
++++ src/zmf.cpp
+@@ -231,16 +231,39 @@ int main( int argc, char *argv[] )
}
Debug( 1, "Read frame header, expecting %ld bytes of image", frame_header.image_length );
static unsigned char image_data[ZM_MAX_IMAGE_SIZE];
@@ -59,7 +59,7 @@ reads from the socket until a full image frame is read, or there is an error.
}
else
{
-@@ -249,16 +272,18 @@
+@@ -249,16 +272,18 @@ int main( int argc, char *argv[] )
ReopenSocket( sd, monitor->Id() );
continue;
}
diff --git a/security/zoneminder/patches/patch-web_Makefile.am b/security/zoneminder/patches/patch-web_Makefile.am
new file mode 100644
index 00000000000..e856cbb7fcd
--- /dev/null
+++ b/security/zoneminder/patches/patch-web_Makefile.am
@@ -0,0 +1,13 @@
+$NetBSD: patch-web_Makefile.am,v 1.1 2013/03/24 16:47:47 joerg Exp $
+
+--- 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 )
diff --git a/security/zoneminder/patches/patch-web_ajax_stream_php b/security/zoneminder/patches/patch-web_ajax_stream_php
index b92ba4384b3..cb0044d5d50 100644
--- a/security/zoneminder/patches/patch-web_ajax_stream_php
+++ b/security/zoneminder/patches/patch-web_ajax_stream_php
@@ -1,10 +1,10 @@
-$NetBSD: patch-web_ajax_stream_php,v 1.1 2013/03/15 02:01:47 dsainty Exp $
+$NetBSD: patch-web_ajax_stream_php,v 1.2 2013/03/24 16:47:47 joerg Exp $
http://www.zoneminder.com/forums/viewtopic.php?t=13322
---- web/ajax/stream.php 2010-10-31 14:54:06.262326001 +1300
-+++ web/ajax/stream.php 2010-11-18 22:21:34.802226529 +1300
-@@ -60,7 +60,7 @@
+--- web/ajax/stream.php.orig 2011-06-27 11:14:00.000000000 +0000
++++ web/ajax/stream.php
+@@ -60,7 +60,7 @@ $wSockets = NULL;
$eSockets = NULL;
$numSockets = @socket_select( $rSockets, $wSockets, $eSockets, intval(MSG_TIMEOUT/1000), (MSG_TIMEOUT%1000)*1000 );