1 |
commit: 8a08ba0f7e93e5da33fe28e39a88e713e497f7f5 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 23 20:05:09 2018 +0000 |
4 |
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 23 20:05:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a08ba0f |
7 |
|
8 |
www-misc/zoneminder: Make this actually build |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
.../zoneminder/files/zoneminder-1.30.4-gcc7.patch | 28 ++++++++++++++++++++++ |
13 |
.../files/zoneminder-1.30.4-glibc226.patch | 24 +++++++++++++++++++ |
14 |
www-misc/zoneminder/zoneminder-1.30.4.ebuild | 6 ++--- |
15 |
3 files changed, 55 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch b/www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..b022fbe35e1 |
20 |
--- /dev/null |
21 |
+++ b/www-misc/zoneminder/files/zoneminder-1.30.4-gcc7.patch |
22 |
@@ -0,0 +1,28 @@ |
23 |
+From 97380f009b0e6a8bb6ee4ecbf0436045342cdf1e Mon Sep 17 00:00:00 2001 |
24 |
+From: abishai <abi@××××××.ru> |
25 |
+Date: Tue, 31 Jan 2017 10:42:57 +0300 |
26 |
+Subject: [PATCH] implement platform-agnostic comparison without abs() |
27 |
+ |
28 |
+--- |
29 |
+ src/zm_image.cpp | 8 +++----- |
30 |
+ 1 file changed, 3 insertions(+), 5 deletions(-) |
31 |
+ |
32 |
+diff --git a/src/zm_image.cpp b/src/zm_image.cpp |
33 |
+index 9c8c12fda..80a821376 100644 |
34 |
+--- a/src/zm_image.cpp |
35 |
++++ b/src/zm_image.cpp |
36 |
+@@ -1658,11 +1658,9 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres |
37 |
+ { |
38 |
+ uint8_t *psrc = images[j]->buffer+c; |
39 |
+ |
40 |
+-#ifndef SOLARIS |
41 |
+- if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) |
42 |
+-#else |
43 |
+- if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) |
44 |
+-#endif |
45 |
++ unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc); |
46 |
++ |
47 |
++ if (diff >= RGB_VAL(threshold,c)) |
48 |
+ { |
49 |
+ count++; |
50 |
+ } |
51 |
|
52 |
diff --git a/www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch b/www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch |
53 |
new file mode 100644 |
54 |
index 00000000000..34afe0cb3b6 |
55 |
--- /dev/null |
56 |
+++ b/www-misc/zoneminder/files/zoneminder-1.30.4-glibc226.patch |
57 |
@@ -0,0 +1,24 @@ |
58 |
+From 417421b1d869d1b71c8ec1a1e3b082fcede6ce58 Mon Sep 17 00:00:00 2001 |
59 |
+From: Andrew Bauer <zonexpertconsulting@×××××××.com> |
60 |
+Date: Tue, 13 Jun 2017 14:39:12 -0500 |
61 |
+Subject: [PATCH] move include <sys/uio.h> outside defined(BSD) block (#1919) |
62 |
+ |
63 |
+--- |
64 |
+ src/zm_comms.h | 2 +- |
65 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
66 |
+ |
67 |
+diff --git a/src/zm_comms.h b/src/zm_comms.h |
68 |
+index cf108c1ea..ae5fd5b08 100644 |
69 |
+--- a/src/zm_comms.h |
70 |
++++ b/src/zm_comms.h |
71 |
+@@ -30,9 +30,9 @@ |
72 |
+ |
73 |
+ #include <set> |
74 |
+ #include <vector> |
75 |
++#include <sys/uio.h> |
76 |
+ |
77 |
+ #if defined(BSD) |
78 |
+-#include <sys/uio.h> |
79 |
+ #include <sys/socket.h> |
80 |
+ #include <netinet/in.h> |
81 |
+ #endif |
82 |
|
83 |
diff --git a/www-misc/zoneminder/zoneminder-1.30.4.ebuild b/www-misc/zoneminder/zoneminder-1.30.4.ebuild |
84 |
index aa27e4b053e..12ed2a18ac9 100644 |
85 |
--- a/www-misc/zoneminder/zoneminder-1.30.4.ebuild |
86 |
+++ b/www-misc/zoneminder/zoneminder-1.30.4.ebuild |
87 |
@@ -1,4 +1,4 @@ |
88 |
-# Copyright 1999-2017 Gentoo Foundation |
89 |
+# Copyright 1999-2018 Gentoo Foundation |
90 |
# Distributed under the terms of the GNU General Public License v2 |
91 |
|
92 |
# TO DO: |
93 |
@@ -81,11 +81,11 @@ RDEPEND="${DEPEND}" |
94 |
# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here. |
95 |
need_apache |
96 |
|
97 |
-S=${WORKDIR}/${MY_PN}-${PV} |
98 |
- |
99 |
PATCHES=( |
100 |
"${FILESDIR}/${PN}-1.30.2"-diskspace.patch |
101 |
"${FILESDIR}/${PN}-1.30.4"-path_zms.patch |
102 |
+ "${FILESDIR}/${PN}-1.30.4"-glibc226.patch |
103 |
+ "${FILESDIR}/${PN}-1.30.4"-gcc7.patch |
104 |
) |
105 |
|
106 |
MY_ZM_WEBDIR=/usr/share/zoneminder/www |