Import of pkgsrc-2016Q3

This commit is contained in:
2016-11-18 22:39:22 +01:00
committed by sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949747 additions and 377081 deletions
@@ -0,0 +1,60 @@
$NetBSD: patch-modules_contrib_src_inputoutput.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $
SunOS does not have dirent d_type.
--- modules/contrib/src/inputoutput.cpp.orig 2015-02-25 12:10:31.000000000 +0000
+++ modules/contrib/src/inputoutput.cpp
@@ -6,6 +6,9 @@
#include <windows.h>
#include <tchar.h>
#else
+#ifdef __sun
+ #include <sys/stat.h>
+#endif
#include <dirent.h>
#endif
@@ -72,6 +75,10 @@ namespace cv
(void)addPath;
DIR *dp;
struct dirent *dirp;
+#ifdef __sun
+ struct stat sb;
+ char buf[PATH_MAX];
+#endif
if((dp = opendir(path.c_str())) == NULL)
{
return list;
@@ -96,6 +103,10 @@ namespace cv
extra = _DEXTRA_NEXT(extra),
extra_stat = reinterpret_cast<dirent_extra_stat *>(extra))
if ((extra->d_type != _DTYPE_NONE) && S_ISREG(extra_stat->d_stat.st_mode))
+ #elif defined(__sun)
+ snprintf(buf, PATH_MAX, "%s/%s", path.c_str(), dirp->d_name);
+ stat(buf, &sb);
+ if (S_ISREG(sb.st_mode))
#else
if (dirp->d_type == DT_REG)
#endif
@@ -181,6 +192,10 @@ namespace cv
(void)addPath;
DIR *dp;
struct dirent *dirp;
+#ifdef __sun
+ struct stat sb;
+ char buf[PATH_MAX];
+#endif
if((dp = opendir(path_f.c_str())) == NULL)
{
return list;
@@ -206,6 +221,10 @@ namespace cv
extra_stat = reinterpret_cast<dirent_extra_stat *>(extra))
if ((extra->d_type != _DTYPE_NONE) &&
S_ISDIR(extra_stat->d_stat.st_mode) &&
+ #elif defined(__sun)
+ snprintf(buf, PATH_MAX, "%s/%s", path.c_str(), dirp->d_name);
+ stat(buf, &sb);
+ if (S_ISDIR(sb.st_mode) &&
#else
if (dirp->d_type == DT_DIR &&
#endif
@@ -0,0 +1,12 @@
$NetBSD: patch-modules_contrib_src_spinimages.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $
--- modules/contrib/src/spinimages.cpp.orig 2013-05-05 18:32:00.000000000 +0000
+++ modules/contrib/src/spinimages.cpp
@@ -46,6 +46,7 @@
#include <functional>
#include <fstream>
#include <limits>
+#include <numeric>
#include <set>
using namespace cv;
@@ -0,0 +1,15 @@
$NetBSD: patch-modules_core_include_opencv2_core_types_c.h,v 1.1 2015/10/17 10:28:43 fhajny Exp $
Define 'depth' as unsigned int, or IPL_DEPTH_SIGN=0x8000000 won't fit in int.
--- modules/core/include/opencv2/core/types_c.h.orig 2012-12-07 21:15:58.000000000 +0000
+++ modules/core/include/opencv2/core/types_c.h
@@ -473,7 +473,7 @@ typedef struct _IplImage
int ID; /* version (=0)*/
int nChannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */
int alphaChannel; /* Ignored by OpenCV */
- int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
+ unsigned int depth; /* Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported. */
char colorModel[4]; /* Ignored by OpenCV */
char channelSeq[4]; /* ditto */
@@ -0,0 +1,12 @@
$NetBSD: patch-modules_core_src_system.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $
--- modules/core/src/system.cpp.orig 2013-04-28 15:15:06.000000000 +0000
+++ modules/core/src/system.cpp
@@ -79,6 +79,7 @@
#include <pthread.h>
#include <sys/time.h>
#include <time.h>
+#include <unistd.h>
#if defined __MACH__ && defined __APPLE__
#include <mach/mach.h>
@@ -0,0 +1,16 @@
$NetBSD: patch-modules_flann_include_opencv2_flann_defines.h,v 1.1 2015/10/17 10:28:43 fhajny Exp $
Avoid CS conflict on SunOS.
--- modules/flann/include/opencv2/flann/defines.h.orig 2012-09-27 22:55:06.000000000 +0000
+++ modules/flann/include/opencv2/flann/defines.h
@@ -71,6 +71,9 @@
#define FLANN_PLATFORM_32_BIT
#endif
+#ifdef __sun
+#undef CS
+#endif
#undef FLANN_ARRAY_LEN
#define FLANN_ARRAY_LEN(a) (sizeof(a)/sizeof(a[0]))
@@ -0,0 +1,16 @@
$NetBSD: patch-modules_ocl_src_gftt.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $
Avoid GS define from sys/regset.h on SunOS.
--- modules/ocl/src/gftt.cpp.orig 2014-04-11 10:15:26.000000000 +0000
+++ modules/ocl/src/gftt.cpp
@@ -69,6 +69,9 @@ struct DefCornerCompare
}
};
+#if defined(__sun)
+#undef GS
+#endif
// sort corner point using opencl bitonicosrt implementation
static void sortCorners_caller(oclMat& corners, const int count)
{
@@ -0,0 +1,16 @@
$NetBSD: patch-modules_python_src2_cv2.cv.hpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $
Fix build under clang.
"error: C-style cast from 'nullprt_t' to 'CvNextEdgeType' is not allowed."
--- modules/python/src2/cv2.cv.hpp.orig 2014-04-11 10:15:26.000000000 +0000
+++ modules/python/src2/cv2.cv.hpp
@@ -2155,7 +2155,7 @@ static int convert_to_CvSubdiv2DPTR(PyOb
static int convert_to_CvNextEdgeType(PyObject *o, CvNextEdgeType *dst, const char *name = "no_name")
{
if (!PyInt_Check(o)) {
- *dst = (CvNextEdgeType)NULL;
+ *dst = (CvNextEdgeType)0;
return failmsg("Expected number for CvNextEdgeType argument '%s'", name);
} else {
*dst = (CvNextEdgeType)PyInt_AsLong(o);
@@ -0,0 +1,24 @@
$NetBSD: patch-modules_ts_src_ts.cpp,v 1.1 2015/10/17 10:28:43 fhajny Exp $
Avoid std::foo conflict.
--- modules/ts/src/ts.cpp.orig 2013-04-05 09:00:20.000000000 +0000
+++ 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++)