aboutsummaryrefslogtreecommitdiff
path: root/multimedia/zoneminder-h264
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2017-03-12 19:41:42 +0000
committerKurt Jaeger <pi@FreeBSD.org>2017-03-12 19:41:42 +0000
commit14389cc24fdd3ed62bd96370a4b975f0e4d3e372 (patch)
treefe31300a317532b6945974c7d3d115c4a4f725aa /multimedia/zoneminder-h264
parent771aedd9c055bb2331fbaa4072e350e05e723e85 (diff)
downloadports-14389cc24fdd3ed62bd96370a4b975f0e4d3e372.tar.gz
ports-14389cc24fdd3ed62bd96370a4b975f0e4d3e372.zip
multimedia/zoneminder{-h264}: fix build with clang 4.0
PR: 216627 Reported by: jbeich Submitted by: Ivan <bsd@abinet.ru> (maintainer) MFH: 2017Q1
Notes
Notes: svn path=/head/; revision=436017
Diffstat (limited to 'multimedia/zoneminder-h264')
-rw-r--r--multimedia/zoneminder-h264/Makefile7
-rw-r--r--multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp29
-rw-r--r--multimedia/zoneminder-h264/files/patch-src_zmf.cpp11
3 files changed, 45 insertions, 2 deletions
diff --git a/multimedia/zoneminder-h264/Makefile b/multimedia/zoneminder-h264/Makefile
index 2b0d4dd57a53..f72eca55bf88 100644
--- a/multimedia/zoneminder-h264/Makefile
+++ b/multimedia/zoneminder-h264/Makefile
@@ -2,7 +2,7 @@
PORTNAME= zoneminder-h264
PORTVERSION= 1.30.20161104
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= multimedia
MAINTAINER= bsd@abinet.ru
@@ -10,6 +10,8 @@ COMMENT= Complete security camera solution, fully web based with image analysis
LICENSE= GPLv2
+CONFLICTS_INSTALL= zoneminder
+
ZM_DEPENDS= p5-DBI>=0:databases/p5-DBI \
p5-DBD-mysql>=0:databases/p5-DBD-mysql \
p5-Date-Manip>=0:devel/p5-Date-Manip \
@@ -32,6 +34,7 @@ LIB_DEPENDS= libx264.so:multimedia/libx264 \
RUN_DEPENDS= ${ZM_DEPENDS} \
p5-MIME-Tools>=0:mail/p5-MIME-Tools \
sudo:security/sudo \
+ p5-Device-SerialPort>=0:comms/p5-Device-SerialPort \
zip:archivers/zip
USE_GITHUB= yes
@@ -40,7 +43,7 @@ GH_TUPLE= zoneminder:ZoneMinder:a2f782d \
USES= cmake jpeg mysql perl5 php shebangfix ssl
USE_RC_SUBR= zoneminder
-USE_PHP= json pdo_mysql session gd sockets
+USE_PHP= json pdo_mysql session gd sockets ctype
ONLY_FOR_ARCHS= amd64 i386
diff --git a/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp b/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp
new file mode 100644
index 000000000000..39e596ba6d23
--- /dev/null
+++ b/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp
@@ -0,0 +1,29 @@
+--- src/zm_monitor.cpp.orig 2016-11-03 20:26:18 UTC
++++ src/zm_monitor.cpp
+@@ -161,7 +161,7 @@ bool Monitor::MonitorLink::connect()
+ return( false );
+ }
+ mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
+- if ( mem_ptr < 0 )
++ if ( mem_ptr < (void *)0 )
+ {
+ Debug( 3, "Can't shmat link memory: %s", strerror(errno) );
+ connected = false;
+@@ -195,7 +195,7 @@ bool Monitor::MonitorLink::disconnect()
+ connected = false;
+
+ #if ZM_MEM_MAPPED
+- if ( mem_ptr > 0 )
++ if ( mem_ptr > (void *)0 )
+ {
+ msync( mem_ptr, mem_size, MS_ASYNC );
+ munmap( mem_ptr, mem_size );
+@@ -576,7 +576,7 @@ bool Monitor::connect() {
+ exit( -1 );
+ }
+ mem_ptr = (unsigned char *)shmat( shm_id, 0, 0 );
+- if ( mem_ptr < 0 )
++ if ( mem_ptr < (void *)0 )
+ {
+ Error( "Can't shmat: %s", strerror(errno));
+ exit( -1 );
diff --git a/multimedia/zoneminder-h264/files/patch-src_zmf.cpp b/multimedia/zoneminder-h264/files/patch-src_zmf.cpp
new file mode 100644
index 000000000000..fd6b5f6b55e0
--- /dev/null
+++ b/multimedia/zoneminder-h264/files/patch-src_zmf.cpp
@@ -0,0 +1,11 @@
+--- src/zmf.cpp.orig 2016-11-03 20:26:18 UTC
++++ src/zmf.cpp
+@@ -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" )) == NULL )
+ {
+ Error( "Can't fopen '%s': %s", path, strerror(errno) );
+ exit( -1 );