summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-10-01 11:19:35 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-10-01 11:19:35 +0300
commit3842d176b0ef96f17be3c22d3ee7450816cea3a8 (patch)
tree745ea8f848e3035ea27debeff77fb0621f10e7b5
parenteedc83800a867d34156b5c313510707a17016c6b (diff)
downloadopencv-3842d176b0ef96f17be3c22d3ee7450816cea3a8.tar.gz
-rw-r--r--debian/changelog7
-rw-r--r--debian/patches/dyson.patch74
-rw-r--r--debian/patches/series1
3 files changed, 82 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 9e886c1..46deba7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+opencv (2.4.9.1+dfsg1-2+dyson1) unstable; urgency=medium
+
+ * Package for Dyson
+ * Added dyson.patch
+
+ -- Igor Pashev <pashev.igor@gmail.com> Sun, 01 Oct 2017 11:12:19 +0300
+
opencv (2.4.9.1+dfsg1-2) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/dyson.patch b/debian/patches/dyson.patch
new file mode 100644
index 0000000..0319a5e
--- /dev/null
+++ b/debian/patches/dyson.patch
@@ -0,0 +1,74 @@
+Index: opencv-2.4.9.1+dfsg1/modules/ts/src/ts.cpp
+===================================================================
+--- opencv-2.4.9.1+dfsg1.orig/modules/ts/src/ts.cpp
++++ opencv-2.4.9.1+dfsg1/modules/ts/src/ts.cpp
+@@ -562,7 +562,7 @@ void TS::vprintf( int streams, const cha
+ for( int i = 0; i < MAX_IDX; i++ )
+ if( (streams & (1 << i)) )
+ {
+- output_buf[i] += std::string(str);
++ output_buf[i] += ::std::string(str);
+ // in the new GTest-based framework we do not use
+ // any output files (except for the automatically generated xml report).
+ // if a test fails, all the buffers are printed, so we do not want to duplicate the information and
+@@ -617,7 +617,7 @@ void smoothBorder(Mat& img, const Scalar
+ Scalar s;
+ uchar *p = NULL;
+ int n = 100/delta;
+- int nR = std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2);
++ int nR = ::std::min(n, (img.rows+1)/2), nC = ::std::min(n, (img.cols+1)/2);
+
+ int r, c, i;
+ for(r=0; r<nR; r++)
+Index: opencv-2.4.9.1+dfsg1/modules/contrib/src/inputoutput.cpp
+===================================================================
+--- opencv-2.4.9.1+dfsg1.orig/modules/contrib/src/inputoutput.cpp
++++ opencv-2.4.9.1+dfsg1/modules/contrib/src/inputoutput.cpp
+@@ -7,6 +7,7 @@
+ #include <tchar.h>
+ #else
+ #include <dirent.h>
++ #include <sys/stat.h>
+ #endif
+
+ namespace cv
+@@ -72,14 +73,18 @@ namespace cv
+ (void)addPath;
+ DIR *dp;
+ struct dirent *dirp;
++ int dfd;
++ struct stat st;
+ if((dp = opendir(path.c_str())) == NULL)
+ {
+ return list;
+ }
++ dfd = dirfd(dp);
+
+ while ((dirp = readdir(dp)) != NULL)
+ {
+- if (dirp->d_type == DT_REG)
++ if ((0 == fstatat(dfd, dirp->d_name, &st, 0)) &&
++ S_ISREG(st.st_mode))
+ {
+ if (exten.compare("*") == 0)
+ list.push_back(static_cast<std::string>(dirp->d_name));
+@@ -162,14 +167,18 @@ namespace cv
+ (void)addPath;
+ DIR *dp;
+ struct dirent *dirp;
++ int dfd;
++ struct stat st;
+ if((dp = opendir(path_f.c_str())) == NULL)
+ {
+ return list;
+ }
++ dfd = dirfd(dp);
+
+ while ((dirp = readdir(dp)) != NULL)
+ {
+- if (dirp->d_type == DT_DIR &&
++ if ((0 == fstatat(dfd, dirp->d_name, &st, 0)) &&
++ S_ISDIR(st.st_mode) &&
+ strcmp(dirp->d_name, ".") != 0 &&
+ strcmp(dirp->d_name, "..") != 0 )
+ {
diff --git a/debian/patches/series b/debian/patches/series
index 721d8bc..249ae6c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ change_type_from_int_to_Atomic_word
fix_without_sysctl.patch
ffmpeg_2.9.patch
fix_ftbfs_with_gcc6
+dyson.patch