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,22 @@
$NetBSD: patch-src_cmake_externalpackages.cmake,v 1.1 2016/02/17 04:49:47 dbj Exp $
--- src/cmake/externalpackages.cmake.orig 2015-06-11 17:25:58.000000000 +0000
+++ src/cmake/externalpackages.cmake
@@ -467,7 +467,16 @@ if (USE_OPENCV)
/usr/local/lib
/opt/local/lib
)
- set (OpenCV_LIBS "${OpenCV_LIBS} ${OpenCV_LIBS_highgui}")
+ set (OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_LIBS_highgui})
+ find_library (OpenCV_LIBS_videoio
+ NAMES opencv_videoio
+ PATHS "${THIRD_PARTY_TOOLS_HOME}/lib/"
+ "${PROJECT_SOURCE_DIR}/lib"
+ "${OpenCV_HOME}/lib"
+ /usr/local/lib
+ /opt/local/lib
+ )
+ set (OpenCV_LIBS ${OpenCV_LIBS} ${OpenCV_LIBS_videoio})
if (OpenCV_INCLUDE_DIR AND OpenCV_LIBS)
set (OpenCV_FOUND TRUE)
add_definitions ("-DUSE_OPENCV")
@@ -1,94 +0,0 @@
$NetBSD: patch-src_dpx.imageio_libdpx_DPXColorConverter.cpp,v 1.1 2014/04/07 12:15:55 ryoon Exp $
--- src/dpx.imageio/libdpx/DPXColorConverter.cpp.orig 2014-04-03 06:08:57.000000000 +0000
+++ src/dpx.imageio/libdpx/DPXColorConverter.cpp
@@ -90,7 +90,7 @@ namespace dpx {
}
}
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static inline void ConvertPixelYCbCrToRGB(const DATA CbYCr[3], DATA RGB[3], const float matrix[9]) {
float tmp;
for (int i = 0; i < 3; i++) {
@@ -106,7 +106,7 @@ namespace dpx {
}
// 4:4:4
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertCbYCrToRGB(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetYCbCrToRGBColorMatrix(space);
if (matrix == NULL)
@@ -120,7 +120,7 @@ namespace dpx {
}
// 4:4:4:4
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertCbYCrAToRGBA(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetYCbCrToRGBColorMatrix(space);
if (matrix == NULL)
@@ -135,7 +135,7 @@ namespace dpx {
}
// 4:2:2
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertCbYCrYToRGB(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetYCbCrToRGBColorMatrix(space);
if (matrix == NULL)
@@ -154,7 +154,7 @@ namespace dpx {
}
// 4:2:2:4
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertCbYACrYAToRGBA(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetYCbCrToRGBColorMatrix(space);
if (matrix == NULL)
@@ -390,7 +390,7 @@ namespace dpx {
}
}
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static inline void ConvertPixelRGBToYCbCr(const DATA RGB[3], DATA CbYCr[3], const float matrix[9]) {
float tmp;
for (int i = 0; i < 3; i++) {
@@ -407,7 +407,7 @@ namespace dpx {
}
// 4:4:4
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertRGBToCbYCr(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetRGBToYCbCrColorMatrix(space);
if (matrix == NULL)
@@ -421,7 +421,7 @@ namespace dpx {
}
// 4:4:4:4
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertRGBAToCbYCrA(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetRGBToYCbCrColorMatrix(space);
if (matrix == NULL)
@@ -436,7 +436,7 @@ namespace dpx {
}
// 4:2:2
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertRGBToCbYCrY(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetRGBToYCbCrColorMatrix(space);
if (matrix == NULL)
@@ -454,7 +454,7 @@ namespace dpx {
}
// 4:2:2:4
- template <typename DATA, int max>
+ template <typename DATA, unsigned int max>
static bool ConvertRGBAToCbYACrYA(const Characteristic space, const DATA *input, DATA *output, const int pixels) {
const float *matrix = GetRGBToYCbCrColorMatrix(space);
if (matrix == NULL)
@@ -1,13 +0,0 @@
$NetBSD: patch-src_gif.imageio_gifinput.cpp,v 1.1 2014/05/30 11:33:32 joerg Exp $
--- src/gif.imageio/gifinput.cpp.orig 2014-05-28 13:28:44.000000000 +0000
+++ src/gif.imageio/gifinput.cpp
@@ -497,7 +497,7 @@ inline bool
GIFInput::close (void)
{
if (m_gif_file) {
- if (DGifCloseFile (m_gif_file) == GIF_ERROR) {
+ if (DGifCloseFile (m_gif_file, NULL) == GIF_ERROR) {
error ("Error trying to close the file.");
return false;
}
@@ -0,0 +1,17 @@
$NetBSD: patch-src_include_OpenImageIO_platform.h,v 1.1 2016/02/17 21:54:09 richard Exp $
SunOS needs <alloca.h> for alloca()
--- src/include/OpenImageIO/platform.h.orig 2015-06-11 17:25:58.000000000 +0000
+++ src/include/OpenImageIO/platform.h
@@ -91,7 +91,9 @@
#define OIIO_CPLUSPLUS11 1
#endif
-
+#ifdef __sun
+#include <alloca.h>
+#endif
/// allocates memory, equivalent of C99 type var_name[size]
#define OIIO_ALLOCA(type, size) ((type*)alloca((size) * sizeof (type)))
@@ -0,0 +1,13 @@
$NetBSD: patch-src_libOpenImageIO_CMakeLists.txt,v 1.1 2016/02/17 04:49:47 dbj Exp $
--- src/libOpenImageIO/CMakeLists.txt.orig 2015-06-11 17:25:58.000000000 +0000
+++ src/libOpenImageIO/CMakeLists.txt
@@ -231,7 +231,7 @@ endif ()
# Include OpenCV if using it
if (OpenCV_FOUND)
include_directories (${OpenCV_INCLUDE_DIR})
- target_link_libraries (OpenImageIO opencv_core opencv_highgui)
+ target_link_libraries (OpenImageIO ${OpenCV_LIBS})
endif ()
# Include OpenSSL if using it
@@ -1,8 +1,10 @@
$NetBSD: patch-src_libutil_sysutil.cpp,v 1.2 2014/07/09 20:00:01 ryoon Exp $
$NetBSD: patch-src_libutil_sysutil.cpp,v 1.3 2016/02/17 21:54:09 richard Exp $
--- src/libutil/sysutil.cpp.orig 2014-06-21 06:21:09.000000000 +0000
updated for initial SunOS support
--- src/libutil/sysutil.cpp.orig 2015-06-11 17:25:58.000000000 +0000
+++ src/libutil/sysutil.cpp
@@ -70,6 +70,12 @@
@@ -70,6 +70,17 @@
# include <sys/ioctl.h>
#endif
@@ -11,11 +13,16 @@ $NetBSD: patch-src_libutil_sysutil.cpp,v 1.2 2014/07/09 20:00:01 ryoon Exp $
+# include <sys/ioctl.h>
+# include <sys/sysctl.h>
+#endif
+
+#ifdef __sun
+# include <unistd.h>
+# include <sys/ioctl.h>
+#endif
+
#include "OpenImageIO/dassert.h"
#include "OpenImageIO/sysutil.h"
@@ -108,6 +114,12 @@ Sysutil::memory_used (bool resident)
@@ -108,6 +119,12 @@ Sysutil::memory_used (bool resident)
return size;
#endif
@@ -28,7 +35,7 @@ $NetBSD: patch-src_libutil_sysutil.cpp,v 1.2 2014/07/09 20:00:01 ryoon Exp $
#elif defined(__APPLE__)
// Inspired by:
// http://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html
@@ -192,7 +204,12 @@ Sysutil::physical_memory ()
@@ -192,7 +209,12 @@ Sysutil::physical_memory ()
size_t length = sizeof(physical_memory);
sysctl (mib, 2, &physical_memory, &length, NULL, 0);
return physical_memory;
@@ -42,7 +49,7 @@ $NetBSD: patch-src_libutil_sysutil.cpp,v 1.2 2014/07/09 20:00:01 ryoon Exp $
#else
// No idea what platform this is
ASSERT (0 && "Need to implement Sysutil::physical_memory on this platform");
@@ -244,6 +261,10 @@ Sysutil::this_program_path ()
@@ -244,6 +266,16 @@ Sysutil::this_program_path ()
size_t cb = sizeof(filename);
int r=1;
sysctl(mib, 4, filename, &cb, NULL, 0);
@@ -50,10 +57,16 @@ $NetBSD: patch-src_libutil_sysutil.cpp,v 1.2 2014/07/09 20:00:01 ryoon Exp $
+ unsigned int size = sizeof(filename);
+ int r = readlink ("/proc/curproc/exe", filename, size);
+ ASSERT(r < int(size)); // user won't get the right answer if the filename is too long to store
+#elif defined(__sun)
+ int r = 0;
+ if (realpath(getexecname(), filename) == NULL)
+ filename[0] = '\0';
+ else
+ r = strlen(filename);
#elif defined(__GNU__) || defined(__OpenBSD__)
int r = 0;
#else
@@ -275,7 +296,7 @@ Sysutil::terminal_columns ()
@@ -275,7 +307,7 @@ Sysutil::terminal_columns ()
{
int columns = 80; // a decent guess, if we have nothing more to go on
@@ -1,13 +0,0 @@
$NetBSD: patch-src_psd.imageio_psdinput.cpp,v 1.1 2014/04/07 12:15:55 ryoon Exp $
--- src/psd.imageio/psdinput.cpp.orig 2014-04-03 06:08:57.000000000 +0000
+++ src/psd.imageio/psdinput.cpp
@@ -389,7 +389,7 @@ private:
// For debugging, numeric_cast will throw if precision is lost:
// value = boost::numeric_cast<TVariable>(buffer);
value = buffer;
- return m_file;
+ return !m_file.bad();
}
int read_pascal_string (std::string &s, uint16_t mod_padding);