[opencv] 01/03: Imported Debian patch 2.4.9.1+dfsg-1.3

Mattia Rizzolo mattia at debian.org
Sun Jun 26 15:12:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository opencv.

commit 6520830133401c254187d51d244922774a511039
Author: John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>
Date:   Mon Feb 8 10:51:45 2016 +0100

    Imported Debian patch 2.4.9.1+dfsg-1.3
---
 debian/changelog                                   |  10 +++
 debian/patches/change_type_from_int_to_Atomic_word | 100 +++++++++++----------
 debian/patches/fix_without_sysctl.patch            |  55 ++++++++++++
 debian/patches/series                              |   3 +-
 4 files changed, 120 insertions(+), 48 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d4f21e7..475697a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+opencv (2.4.9.1+dfsg-1.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Refresh debian/patches:
+    - Update change_type_from_int_to_Atomic_word to fix
+      FTBFS on sparc64. (Closes: #714923)
+    - Re-add fix_without_sysctl.patch to fix FTBFS on x32. (Closes: #792264)
+
+ -- John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>  Mon, 08 Feb 2016 10:51:45 +0100
+
 opencv (2.4.9.1+dfsg-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/patches/change_type_from_int_to_Atomic_word b/debian/patches/change_type_from_int_to_Atomic_word
index 16ff8fb..8775d84 100644
--- a/debian/patches/change_type_from_int_to_Atomic_word
+++ b/debian/patches/change_type_from_int_to_Atomic_word
@@ -1,14 +1,12 @@
 Description: Fix FTBFS on sparc64
-Author: Aurelien Jarno <aurel32 at debian.org>
+Author: Aurelien Jarno <aurel32 at debian.org>, David Mattli <dmm at mattli.us>
 Forwarded: not yet
 Debian-Bug: 714923
-Last-Update: <2013-11-23>
+Last-Update: <2016-02-08>
 
-diff --git a/modules/core/include/opencv2/core/core.hpp b/modules/core/include/opencv2/core/core.hpp
-index af3a50c..7e008e0 100644
---- a/modules/core/include/opencv2/core/core.hpp
-+++ b/modules/core/include/opencv2/core/core.hpp
-@@ -1296,7 +1296,7 @@ public:
+--- opencv-2.4.9.1+dfsg.orig/modules/core/include/opencv2/core/core.hpp
++++ opencv-2.4.9.1+dfsg/modules/core/include/opencv2/core/core.hpp
+@@ -1300,7 +1300,7 @@ public:
      operator const _Tp*() const;
  
      _Tp* obj; //< the object pointer.
@@ -17,7 +15,7 @@ index af3a50c..7e008e0 100644
  };
  
  
-@@ -1464,9 +1464,9 @@ class CV_EXPORTS MatAllocator
+@@ -1468,9 +1468,9 @@ class CV_EXPORTS MatAllocator
  public:
      MatAllocator() {}
      virtual ~MatAllocator() {}
@@ -29,7 +27,7 @@ index af3a50c..7e008e0 100644
  };
  
  /*!
-@@ -1961,7 +1961,7 @@ public:
+@@ -1965,7 +1965,7 @@ public:
  
      //! pointer to the reference counter;
      // when matrix points to user-allocated data, the pointer is NULL
@@ -38,7 +36,7 @@ index af3a50c..7e008e0 100644
  
      //! helper fields used in locateROI and adjustROI
      uchar* datastart;
-@@ -3380,7 +3380,7 @@ public:
+@@ -3384,7 +3384,7 @@ public:
      {
          Hdr(int _dims, const int* _sizes, int _type);
          void clear();
@@ -47,10 +45,8 @@ index af3a50c..7e008e0 100644
          int dims;
          int valueOffset;
          size_t nodeSize;
-diff --git a/modules/core/include/opencv2/core/gpumat.hpp b/modules/core/include/opencv2/core/gpumat.hpp
-index 193c9aa..afff7ef 100644
---- a/modules/core/include/opencv2/core/gpumat.hpp
-+++ b/modules/core/include/opencv2/core/gpumat.hpp
+--- opencv-2.4.9.1+dfsg.orig/modules/core/include/opencv2/core/gpumat.hpp
++++ opencv-2.4.9.1+dfsg/modules/core/include/opencv2/core/gpumat.hpp
 @@ -301,7 +301,7 @@ namespace cv { namespace gpu
  
          //! pointer to the reference counter;
@@ -60,11 +56,9 @@ index 193c9aa..afff7ef 100644
  
          //! helper fields used in locateROI and adjustROI
          uchar* datastart;
-diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp
-index 9569d1a..5509203 100644
---- a/modules/core/include/opencv2/core/operations.hpp
-+++ b/modules/core/include/opencv2/core/operations.hpp
-@@ -2279,7 +2279,7 @@ public:
+--- opencv-2.4.9.1+dfsg.orig/modules/core/include/opencv2/core/operations.hpp
++++ opencv-2.4.9.1+dfsg/modules/core/include/opencv2/core/operations.hpp
+@@ -2281,7 +2281,7 @@ public:
          Hdr() : data(0), datastart(0), refcount(0), size(0), capacity(0) {};
          _Tp* data;
          _Tp* datastart;
@@ -73,7 +67,7 @@ index 9569d1a..5509203 100644
          size_t size;
          size_t capacity;
      };
-@@ -2586,7 +2586,7 @@ template<typename _Tp> inline Ptr<_Tp>::Ptr(_Tp* _obj) : obj(_obj)
+@@ -2588,7 +2588,7 @@ template<typename _Tp> inline Ptr<_Tp>::
  {
      if(obj)
      {
@@ -82,7 +76,7 @@ index 9569d1a..5509203 100644
          *refcount = 1;
      }
      else
-@@ -2623,7 +2623,7 @@ template<typename _Tp> inline Ptr<_Tp>::Ptr(const Ptr<_Tp>& _ptr)
+@@ -2625,7 +2625,7 @@ template<typename _Tp> inline Ptr<_Tp>::
  
  template<typename _Tp> inline Ptr<_Tp>& Ptr<_Tp>::operator = (const Ptr<_Tp>& _ptr)
  {
@@ -91,11 +85,9 @@ index 9569d1a..5509203 100644
      if( _refcount )
          CV_XADD(_refcount, 1);
      release();
-diff --git a/modules/core/src/gpumat.cpp b/modules/core/src/gpumat.cpp
-index 53e118a..3169d03 100644
---- a/modules/core/src/gpumat.cpp
-+++ b/modules/core/src/gpumat.cpp
-@@ -1548,7 +1548,7 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/gpumat.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/gpumat.cpp
+@@ -716,7 +716,7 @@ void cv::gpu::GpuMat::create(int _rows,
          datastart = data = static_cast<uchar*>(devPtr);
          dataend = data + nettosize;
  
@@ -104,11 +96,9 @@ index 53e118a..3169d03 100644
          *refcount = 1;
      }
  }
-diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp
-index 5a3600b..f6f59c4 100644
---- a/modules/core/src/matrix.cpp
-+++ b/modules/core/src/matrix.cpp
-@@ -213,7 +213,7 @@ void Mat::create(int d, const int* _sizes, int _type)
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/matrix.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/matrix.cpp
+@@ -213,7 +213,7 @@ void Mat::create(int d, const int* _size
          {
              size_t totalsize = alignSize(step.p[0]*size.p[0], (int)sizeof(*refcount));
              data = datastart = (uchar*)fastMalloc(totalsize + (int)sizeof(*refcount));
@@ -117,11 +107,9 @@ index 5a3600b..f6f59c4 100644
              *refcount = 1;
          }
          else
-diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
-index 2c76e75..3a5f124 100644
---- a/modules/core/src/system.cpp
-+++ b/modules/core/src/system.cpp
-@@ -890,7 +890,7 @@ struct Mutex::Impl
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/system.cpp
++++ opencv-2.4.9.1+dfsg/modules/core/src/system.cpp
+@@ -903,7 +903,7 @@ struct Mutex::Impl
      void unlock() { pthread_spin_unlock(&sl); }
  
      pthread_spinlock_t sl;
@@ -130,10 +118,8 @@ index 2c76e75..3a5f124 100644
  };
  
  #else
-diff --git a/modules/gpu/include/opencv2/gpu/gpu.hpp b/modules/gpu/include/opencv2/gpu/gpu.hpp
-index e2fc99b..64c4330 100644
---- a/modules/gpu/include/opencv2/gpu/gpu.hpp
-+++ b/modules/gpu/include/opencv2/gpu/gpu.hpp
+--- opencv-2.4.9.1+dfsg.orig/modules/gpu/include/opencv2/gpu/gpu.hpp
++++ opencv-2.4.9.1+dfsg/modules/gpu/include/opencv2/gpu/gpu.hpp
 @@ -125,7 +125,7 @@ public:
      size_t step;
  
@@ -143,11 +129,31 @@ index e2fc99b..64c4330 100644
  
      uchar* datastart;
      uchar* dataend;
-diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp
-index 3c28555..6530d31 100644
---- a/modules/python/src2/cv2.cpp
-+++ b/modules/python/src2/cv2.cpp
-@@ -152,14 +152,14 @@ static PyObject* failmsgp(const char *fmt, ...)
+--- opencv-2.4.9.1+dfsg.orig/modules/ocl/include/opencv2/ocl/ocl.hpp
++++ opencv-2.4.9.1+dfsg/modules/ocl/include/opencv2/ocl/ocl.hpp
+@@ -404,7 +404,7 @@ namespace cv
+ 
+             //! pointer to the reference counter;
+             // when oclMatrix points to user-allocated data, the pointer is NULL
+-            int *refcount;
++            _Atomic_word *refcount;
+ 
+             //! helper fields used in locateROI and adjustROI
+             //datastart and dataend are not used in current version
+--- opencv-2.4.9.1+dfsg.orig/modules/ocl/src/matrix_operations.cpp
++++ opencv-2.4.9.1+dfsg/modules/ocl/src/matrix_operations.cpp
+@@ -591,7 +591,7 @@ void cv::ocl::oclMat::createEx(int _rows
+         datastart = data = (uchar *)dev_ptr;
+         dataend = data + nettosize;
+ 
+-        refcount = (int *)fastMalloc(sizeof(*refcount));
++        refcount = (_Atomic_word *)fastMalloc(sizeof(*refcount));
+         *refcount = 1;
+     }
+ }
+--- opencv-2.4.9.1+dfsg.orig/modules/python/src2/cv2.cpp
++++ opencv-2.4.9.1+dfsg/modules/python/src2/cv2.cpp
+@@ -157,14 +157,14 @@ static PyObject* failmsgp(const char *fm
  static size_t REFCOUNT_OFFSET = (size_t)&(((PyObject*)0)->ob_refcnt) +
      (0x12345678 != *(const size_t*)"\x78\x56\x34\x12\0\0\0\0\0")*sizeof(int);
  
@@ -165,7 +171,7 @@ index 3c28555..6530d31 100644
  }
  
  class NumpyAllocator : public MatAllocator
-@@ -168,7 +168,7 @@ public:
+@@ -173,7 +173,7 @@ public:
      NumpyAllocator() {}
      ~NumpyAllocator() {}
  
@@ -174,7 +180,7 @@ index 3c28555..6530d31 100644
                    uchar*& datastart, uchar*& data, size_t* step)
      {
          PyEnsureGIL gil;
-@@ -201,7 +201,7 @@ public:
+@@ -206,7 +206,7 @@ public:
          datastart = data = (uchar*)PyArray_DATA((PyArrayObject*) o);
      }
  
diff --git a/debian/patches/fix_without_sysctl.patch b/debian/patches/fix_without_sysctl.patch
new file mode 100644
index 0000000..e16b4f1
--- /dev/null
+++ b/debian/patches/fix_without_sysctl.patch
@@ -0,0 +1,55 @@
+Description: Don't use sysctl on unsupported targets
+Author: Thorsten Glaser <tg at mirbsd.de>
+Forwarded: not yet
+Debian-Bug: 792264
+Last-Update: <2016-02-08>
+
+--- opencv-2.4.9.1+dfsg.orig/CMakeLists.txt
++++ opencv-2.4.9.1+dfsg/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)
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/parallel.cpp
++++ opencv-2.4.9.1+dfsg/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
+ 
+--- opencv-2.4.9.1+dfsg.orig/modules/core/src/system.cpp
++++ opencv-2.4.9.1+dfsg/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>
+--- 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
+@@ -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 --git a/debian/patches/series b/debian/patches/series
index 4341750..5a07840 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,9 +3,10 @@ drop_asm_types_h_kfreebsd
 support_multiarch
 fix_ftbfs_on_non_linux
 pkg-config
-change_type_from_int_to_Atomic_word
 revert-Make-ts-always-static
 fix_path_of_opencl_headers
 libav10.patch
 optimize_i586.patch
 Don-t-check-sphinx-build-version.patch
+change_type_from_int_to_Atomic_word
+fix_without_sysctl.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list