Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 2017 19:41:43 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r436017 - in head/multimedia: zoneminder zoneminder-h264 zoneminder-h264/files zoneminder/files
Message-ID:  <201703121941.v2CJfhDI022448@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sun Mar 12 19:41:42 2017
New Revision: 436017
URL: https://svnweb.freebsd.org/changeset/ports/436017

Log:
  multimedia/zoneminder{-h264}: fix build with clang 4.0
  
  PR:		216627
  Reported by:	jbeich
  Submitted by:	Ivan <bsd@abinet.ru> (maintainer)
  MFH:		2017Q1

Added:
  head/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp   (contents, props changed)
  head/multimedia/zoneminder-h264/files/patch-src_zmf.cpp   (contents, props changed)
  head/multimedia/zoneminder/files/patch-src_zm__monitor.cpp   (contents, props changed)
  head/multimedia/zoneminder/files/patch-src_zmf.cpp   (contents, props changed)
Modified:
  head/multimedia/zoneminder-h264/Makefile
  head/multimedia/zoneminder/Makefile

Modified: head/multimedia/zoneminder-h264/Makefile
==============================================================================
--- head/multimedia/zoneminder-h264/Makefile	Sun Mar 12 19:11:20 2017	(r436016)
+++ head/multimedia/zoneminder-h264/Makefile	Sun Mar 12 19:41:42 2017	(r436017)
@@ -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 soluti
 
 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/libx2
 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
 

Added: head/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/zoneminder-h264/files/patch-src_zm__monitor.cpp	Sun Mar 12 19:41:42 2017	(r436017)
@@ -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 );

Added: head/multimedia/zoneminder-h264/files/patch-src_zmf.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/zoneminder-h264/files/patch-src_zmf.cpp	Sun Mar 12 19:41:42 2017	(r436017)
@@ -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 );

Modified: head/multimedia/zoneminder/Makefile
==============================================================================
--- head/multimedia/zoneminder/Makefile	Sun Mar 12 19:11:20 2017	(r436016)
+++ head/multimedia/zoneminder/Makefile	Sun Mar 12 19:41:42 2017	(r436017)
@@ -3,7 +3,7 @@
 PORTNAME=	zoneminder
 PORTVERSION=	1.30.0
 DISTVERSIONPREFIX=	v
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	multimedia
 
 MAINTAINER=	bsd@abinet.ru
@@ -11,6 +11,8 @@ COMMENT=	Complete security camera soluti
 
 LICENSE=	GPLv2
 
+CONFLICTS_INSTALL=	zoneminder-h264
+
 ZM_DEPENDS=	p5-DBI>=0:databases/p5-DBI \
 		p5-DBD-mysql>=0:databases/p5-DBD-mysql \
 		p5-Date-Manip>=0:devel/p5-Date-Manip \
@@ -27,6 +29,7 @@ ZM_DEPENDS=	p5-DBI>=0:databases/p5-DBI \
 BUILD_DEPENDS=	${ZM_DEPENDS}
 RUN_DEPENDS=	${ZM_DEPENDS} \
 		sudo:security/sudo \
+		p5-Device-SerialPort>=0:comms/p5-Device-SerialPort \
 		zip:archivers/zip
 
 USE_GITHUB=	yes
@@ -35,7 +38,7 @@ GH_TUPLE=	FriendsOfCake:crud:c3976f1:cru
 
 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
 

Added: head/multimedia/zoneminder/files/patch-src_zm__monitor.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/zoneminder/files/patch-src_zm__monitor.cpp	Sun Mar 12 19:41:42 2017	(r436017)
@@ -0,0 +1,29 @@
+--- src/zm_monitor.cpp.orig	2016-07-28 01:45:26 UTC
++++ 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 *)0 )
+     {
+       Debug( 3, "Can't shmat link memory: %s", strerror(errno) );
+       connected = false;
+@@ -194,7 +194,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 );
+@@ -558,7 +558,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 );

Added: head/multimedia/zoneminder/files/patch-src_zmf.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/zoneminder/files/patch-src_zmf.cpp	Sun Mar 12 19:41:42 2017	(r436017)
@@ -0,0 +1,11 @@
+--- src/zmf.cpp.orig	2016-07-28 01:45:26 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 );



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703121941.v2CJfhDI022448>