[packages/opencv] - drop references to unused sysctl call/headers
baggins
baggins at pld-linux.org
Mon Mar 9 13:34:57 CET 2015
commit f9e8f4ea153f7b5b3bee1dc0ec0d2eb6e75e0ad9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Mar 9 13:34:33 2015 +0100
- drop references to unused sysctl call/headers
no-sysctl.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
opencv.spec | 2 ++
2 files changed, 46 insertions(+)
---
diff --git a/opencv.spec b/opencv.spec
index b18abee..30a3d68 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -63,6 +63,7 @@ Patch5: %{name}-ximea.patch
Patch6: %{name}-ocl-fft.patch
Patch7: java-ant-sourcelevel.patch
Patch8: %{name}-shared.patch
+Patch9: no-sysctl.patch
URL: http://www.opencv.org/
%{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel}
%{?with_opencl:BuildRequires: OpenCL-devel}
@@ -275,6 +276,7 @@ Wiązania Pythona do OpenCV.
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
%build
install -d build
diff --git a/no-sysctl.patch b/no-sysctl.patch
new file mode 100644
index 0000000..dd37a32
--- /dev/null
+++ b/no-sysctl.patch
@@ -0,0 +1,44 @@
+Description: get rid of sysctl includes on Linux
+ The 'sysctl' syscall has been strongly deprecated on Linux for ages.
+ Currently, on old architectures it will spam syslog whenever used, and on
+ newer ones it's missing from the headers altogether. Opencv has migrated
+ away on Linux already, but #include statements were left lingering.
+ .
+ This patch removes such #includes on non-__APPLE__, unbreaking x32.
+Author: Adam Borowski <kilobyte at angband.pl>
+
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/parallel.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/parallel.cpp
+@@ -56,8 +56,8 @@
+ #include <sys/types.h>
+ #if defined ANDROID
+ #include <sys/sysconf.h>
+- #elif !defined __GNU__
+- #include <sys/sysctl.h>
++ #elif defined __APPLE__
++ #include <sys/sysctl.h>
+ #endif
+ #endif
+
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/system.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/system.cpp
+@@ -163,8 +163,6 @@ std::wstring GetTempFileNameWinRT(std::w
+ #include <sys/types.h>
+ #if defined ANDROID
+ #include <sys/sysconf.h>
+-#elif !defined __GNU__
+-#include <sys/sysctl.h>
+ #endif
+ #endif
+
+--- opencv-2.4.9.1+dfsg.orig/modules/highgui/src/cap_ffmpeg_impl.hpp
++++ opencv-2.4.9.1+dfsg/modules/highgui/src/cap_ffmpeg_impl.hpp
+@@ -145,7 +145,7 @@ extern "C" {
+
+ #if defined WIN32 || defined _WIN32
+ #include <windows.h>
+-#elif defined __linux__ || defined __APPLE__
++#elif defined __APPLE__
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <sys/types.h>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/opencv.git/commitdiff/f9e8f4ea153f7b5b3bee1dc0ec0d2eb6e75e0ad9
More information about the pld-cvs-commit
mailing list