diff options
author | Olivier Cochard <olivier@FreeBSD.org> | 2016-06-20 08:06:46 +0000 |
---|---|---|
committer | Olivier Cochard <olivier@FreeBSD.org> | 2016-06-20 08:06:46 +0000 |
commit | 71cf1564f9a8c4bb0e1901be3804057d97d5cb06 (patch) | |
tree | 0e0cafe794b515666f343a1115575604a5602d7d /multimedia/zoneminder | |
parent | a3b3ff1f71d4540d51a06f721edd067541319a86 (diff) | |
download | ports-71cf1564f9a8c4bb0e1901be3804057d97d5cb06.tar.gz ports-71cf1564f9a8c4bb0e1901be3804057d97d5cb06.zip |
Notes
Diffstat (limited to 'multimedia/zoneminder')
-rw-r--r-- | multimedia/zoneminder/Makefile | 6 | ||||
-rw-r--r-- | multimedia/zoneminder/files/patch-src_zm__image.cpp | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/multimedia/zoneminder/Makefile b/multimedia/zoneminder/Makefile index d35415e0a8a2..61949c8754bd 100644 --- a/multimedia/zoneminder/Makefile +++ b/multimedia/zoneminder/Makefile @@ -41,6 +41,8 @@ USE_RC_SUBR= zoneminder PHP= json pdo_mysql session IGNORE_WITH_PHP=70 +ONLY_FOR_ARCHS= amd64 i386 + OPTIONS_DEFINE= NLS V4L DOCS OPTIONS_SUB= yes NLS_USES= gettext @@ -76,6 +78,10 @@ CMAKE_ARGS+= -DZM_PERL_MM_PARMS=INSTALLDIRS=site \ -DHAVE_SENDFILE=0 \ -DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include" +.if ${OSVERSION} < 1000000 && ${ARCH} == i386 +CFLAGS+= -msse +.endif + PKGMESSAGE= ${WRKDIR}/pkg-message post-extract: diff --git a/multimedia/zoneminder/files/patch-src_zm__image.cpp b/multimedia/zoneminder/files/patch-src_zm__image.cpp new file mode 100644 index 000000000000..2118dfc9e355 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm__image.cpp @@ -0,0 +1,18 @@ +--- src/zm_image.cpp.orig 2016-06-01 00:41:17 UTC ++++ src/zm_image.cpp +@@ -1619,12 +1619,9 @@ Image *Image::Highlight( unsigned int n_ + for ( unsigned int j = 0; j < n_images; j++ ) + { + uint8_t *psrc = images[j]->buffer+c; +- +-#ifndef SOLARIS +- if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) +-#else +- if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) +-#endif ++ unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc); ++ ++ if (diff >= RGB_VAL(threshold,c)) + { + count++; + } |