Source: opencv Version: 2.4.9.1+dfsg-1.1 Severity: important Tags: patch Hi,
the attached patch lets CMake search for <sys/sysctl.h> and uses it only if found. This, together with the fix for #792262, fixes opencv on x32. -- System Information: Debian Release: stretch/sid APT prefers unreleased APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable') Architecture: x32 (x86_64) Foreign Architectures: i386, amd64 Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/lksh Init: sysvinit (via /sbin/init)
diff -Nru opencv-2.4.9.1+dfsg/debian/changelog opencv-2.4.9.1+dfsg/debian/changelog --- opencv-2.4.9.1+dfsg/debian/changelog 2015-05-15 21:34:14.000000000 +0200 +++ opencv-2.4.9.1+dfsg/debian/changelog 2015-07-13 11:07:07.000000000 +0200 @@ -1,3 +1,10 @@ +opencv (2.4.9.1+dfsg-1.1+x32.1) unreleased; urgency=medium + + * Non-maintainer upload. + * Add fix_without_sysctl patch + + -- Thorsten Glaser <[email protected]> Mon, 13 Jul 2015 11:06:47 +0200 + opencv (2.4.9.1+dfsg-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru opencv-2.4.9.1+dfsg/debian/patches/fix_without_sysctl opencv-2.4.9.1+dfsg/debian/patches/fix_without_sysctl --- opencv-2.4.9.1+dfsg/debian/patches/fix_without_sysctl 1970-01-01 01:00:00.000000000 +0100 +++ opencv-2.4.9.1+dfsg/debian/patches/fix_without_sysctl 2015-07-13 11:06:38.000000000 +0200 @@ -0,0 +1,54 @@ +Description: only include <sys/sysctl.h> if usable +Forwarded: not yet +Bug-Debian: coming +Author: mirabilos <[email protected]> + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -441,6 +441,8 @@ if(UNIX) + else() + set(HAVE_LIBPTHREAD YES) + endif() ++ ++ CHECK_INCLUDE_FILE(sys/sysctl.h HAVE_SYS_SYSCTL_H) + endif() + + include(cmake/OpenCVPCHSupport.cmake) +--- a/modules/core/src/parallel.cpp ++++ b/modules/core/src/parallel.cpp +@@ -57,7 +57,9 @@ + #if defined ANDROID + #include <sys/sysconf.h> + #elif !defined __GNU__ ++ #ifdef HAVE_SYS_SYSCTL_H + #include <sys/sysctl.h> ++ #endif + #endif + #endif + +--- a/modules/core/src/system.cpp ++++ b/modules/core/src/system.cpp +@@ -164,9 +164,11 @@ std::wstring GetTempFileNameWinRT(std::w + #if defined ANDROID + #include <sys/sysconf.h> + #elif !defined __GNU__ ++#ifdef HAVE_SYS_SYSCTL_H + #include <sys/sysctl.h> + #endif + #endif ++#endif + + #ifdef ANDROID + # include <android/log.h> +--- a/modules/highgui/src/cap_ffmpeg_impl.hpp ++++ b/modules/highgui/src/cap_ffmpeg_impl.hpp +@@ -149,7 +149,9 @@ extern "C" { + #include <unistd.h> + #include <stdio.h> + #include <sys/types.h> ++ #ifdef HAVE_SYS_SYSCTL_H + #include <sys/sysctl.h> ++ #endif + #endif + + #ifndef MIN diff -Nru opencv-2.4.9.1+dfsg/debian/patches/series opencv-2.4.9.1+dfsg/debian/patches/series --- opencv-2.4.9.1+dfsg/debian/patches/series 2015-05-15 16:43:46.000000000 +0200 +++ opencv-2.4.9.1+dfsg/debian/patches/series 2015-07-13 10:47:26.000000000 +0200 @@ -8,3 +8,4 @@ fix_path_of_opencl_headers libav10.patch optimize_i586.patch +fix_without_sysctl

