summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2018-02-23 21:05:09 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-02-23 21:05:36 +0100
commit8a08ba0f7e93e5da33fe28e39a88e713e497f7f5 (patch)
tree06483e3755e5f81463f39a27544abc9b454d816a /www-misc/zoneminder
parentmail-client/alot: version bump to 0.7. (diff)
downloadgentoo-8a08ba0f7e93e5da33fe28e39a88e713e497f7f5.tar.gz
gentoo-8a08ba0f7e93e5da33fe28e39a88e713e497f7f5.tar.bz2
gentoo-8a08ba0f7e93e5da33fe28e39a88e713e497f7f5.zip
www-misc/zoneminder: Make this actually build
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'www-misc/zoneminder')
-rw-r--r--www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch28
-rw-r--r--www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch24
-rw-r--r--www-misc/zoneminder/zoneminder-1.30.4.ebuild6
3 files changed, 55 insertions, 3 deletions
diff --git a/www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch b/www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch
new file mode 100644
index 000000000000..b022fbe35e17
--- /dev/null
+++ b/www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch
@@ -0,0 +1,28 @@
+From 97380f009b0e6a8bb6ee4ecbf0436045342cdf1e Mon Sep 17 00:00:00 2001
+From: abishai <abi@abinet.ru>
+Date: Tue, 31 Jan 2017 10:42:57 +0300
+Subject: [PATCH] implement platform-agnostic comparison without abs()
+
+---
+ src/zm_image.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/zm_image.cpp b/src/zm_image.cpp
+index 9c8c12fda..80a821376 100644
+--- a/src/zm_image.cpp
++++ b/src/zm_image.cpp
+@@ -1658,11 +1658,9 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres
+ {
+ 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++;
+ }
diff --git a/www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch b/www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch
new file mode 100644
index 000000000000..34afe0cb3b67
--- /dev/null
+++ b/www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch
@@ -0,0 +1,24 @@
+From 417421b1d869d1b71c8ec1a1e3b082fcede6ce58 Mon Sep 17 00:00:00 2001
+From: Andrew Bauer <zonexpertconsulting@outlook.com>
+Date: Tue, 13 Jun 2017 14:39:12 -0500
+Subject: [PATCH] move include <sys/uio.h> outside defined(BSD) block (#1919)
+
+---
+ src/zm_comms.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/zm_comms.h b/src/zm_comms.h
+index cf108c1ea..ae5fd5b08 100644
+--- a/src/zm_comms.h
++++ b/src/zm_comms.h
+@@ -30,9 +30,9 @@
+
+ #include <set>
+ #include <vector>
++#include <sys/uio.h>
+
+ #if defined(BSD)
+-#include <sys/uio.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #endif
diff --git a/www-misc/zoneminder/zoneminder-1.30.4.ebuild b/www-misc/zoneminder/zoneminder-1.30.4.ebuild
index aa27e4b053eb..12ed2a18ac9e 100644
--- a/www-misc/zoneminder/zoneminder-1.30.4.ebuild
+++ b/www-misc/zoneminder/zoneminder-1.30.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# TO DO:
@@ -81,11 +81,11 @@ RDEPEND="${DEPEND}"
# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here.
need_apache
-S=${WORKDIR}/${MY_PN}-${PV}
-
PATCHES=(
"${FILESDIR}/${PN}-1.30.2"-diskspace.patch
"${FILESDIR}/${PN}-1.30.4"-path_zms.patch
+ "${FILESDIR}/${PN}-1.30.4"-glibc226.patch
+ "${FILESDIR}/${PN}-1.30.4"-gcc7.patch
)
MY_ZM_WEBDIR=/usr/share/zoneminder/www