mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
@@ -1,7 +1,7 @@
|
||||
SUMMARY="Open Source Computer Vision Library"
|
||||
DESCRIPTION="A collection of algorithms and sample code for various \
|
||||
computer vision problems."
|
||||
HOMEPAGE="http://opencv.org/"
|
||||
HOMEPAGE="https://opencv.org/"
|
||||
COPYRIGHT="2000-2016, Intel Corporation
|
||||
2009-2011, Willow Garage Inc.
|
||||
2009-2016, NVIDIA Corporation
|
||||
@@ -12,16 +12,16 @@ LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/opencv/opencv/archive/$portVersion.tar.gz"
|
||||
SOURCE_FILENAME="opencv-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="678cc3d2d1b3464b512b084a8cca1fad7de207c7abdf2caa1fed636c13e916da"
|
||||
CHECKSUM_SHA256="f1b87684d75496a1054405ae3ee0b6573acaf3dad39eaf4f1d66fdd7e03dc852"
|
||||
PATCHES="opencv-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandSuffix =$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandSuffix =
|
||||
fi
|
||||
|
||||
portVersionCompat="$portVersion compat >= ${portVersion%%.*}"
|
||||
@@ -30,12 +30,12 @@ libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
opencv$secondaryArchSuffix = $portVersionCompat
|
||||
cmd:opencv_annotation$commandSuffix= $portVersion
|
||||
cmd:opencv_createsamples$commandSuffix= $portVersion
|
||||
cmd:opencv_interactive_calibration$commandSuffix= $portVersion
|
||||
cmd:opencv_traincascade$commandSuffix= $portVersion
|
||||
cmd:opencv_version$commandSuffix= $portVersion
|
||||
cmd:opencv_visualisation$commandSuffix= $portVersion
|
||||
cmd:opencv_annotation$commandSuffix = $portVersion
|
||||
cmd:opencv_createsamples$commandSuffix = $portVersion
|
||||
cmd:opencv_interactive_calibration$commandSuffix = $portVersion
|
||||
cmd:opencv_traincascade$commandSuffix = $portVersion
|
||||
cmd:opencv_version$commandSuffix = $portVersion
|
||||
cmd:opencv_visualisation$commandSuffix = $portVersion
|
||||
lib:libopencv_calib3d$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libopencv_core$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libopencv_dnn$secondaryArchSuffix = $libVersionCompat
|
||||
@@ -61,9 +61,9 @@ REQUIRES="
|
||||
lib:libavresample$secondaryArchSuffix
|
||||
lib:libavutil$secondaryArchSuffix
|
||||
lib:libgdal$secondaryArchSuffix
|
||||
# lib:libGL$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
# lib:libGLU$secondaryArchSuffix
|
||||
lib:libGLU$secondaryArchSuffix
|
||||
lib:libgphoto2$secondaryArchSuffix
|
||||
lib:libgstapp_1.0$secondaryArchSuffix
|
||||
lib:libgstreamer_1.0$secondaryArchSuffix
|
||||
@@ -118,9 +118,9 @@ BUILD_REQUIRES="
|
||||
devel:libavresample$secondaryArchSuffix
|
||||
devel:libavutil$secondaryArchSuffix
|
||||
devel:libgdal$secondaryArchSuffix
|
||||
# devel:libGL$secondaryArchSuffix
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
# devel:libGLU$secondaryArchSuffix
|
||||
devel:libGLU$secondaryArchSuffix
|
||||
devel:libgphoto2$secondaryArchSuffix
|
||||
devel:libgstapp_1.0$secondaryArchSuffix
|
||||
devel:libgstreamer_1.0$secondaryArchSuffix
|
||||
@@ -160,23 +160,23 @@ BUILD_PREREQUIRES="
|
||||
"
|
||||
|
||||
defineDebugInfoPackage opencv$secondaryArchSuffix \
|
||||
$libDir/libopencv_calib3d.so.$portVersion \
|
||||
$libDir/libopencv_core.so.$portVersion \
|
||||
$libDir/libopencv_dnn.so.$portVersion \
|
||||
$libDir/libopencv_features2d.so.$portVersion \
|
||||
$libDir/libopencv_flann.so.$portVersion \
|
||||
$libDir/libopencv_highgui.so.$portVersion \
|
||||
$libDir/libopencv_imgcodecs.so.$portVersion \
|
||||
$libDir/libopencv_imgproc.so.$portVersion \
|
||||
$libDir/libopencv_ml.so.$portVersion \
|
||||
$libDir/libopencv_objdetect.so.$portVersion \
|
||||
$libDir/libopencv_photo.so.$portVersion \
|
||||
$libDir/libopencv_shape.so.$portVersion \
|
||||
$libDir/libopencv_stitching.so.$portVersion \
|
||||
$libDir/libopencv_superres.so.$portVersion \
|
||||
$libDir/libopencv_video.so.$portVersion \
|
||||
$libDir/libopencv_videoio.so.$portVersion \
|
||||
$libDir/libopencv_videostab.so.$portVersion
|
||||
$libDir/libopencv_calib3d.so.$libVersion \
|
||||
$libDir/libopencv_core.so.$libVersion \
|
||||
$libDir/libopencv_dnn.so.$libVersion \
|
||||
$libDir/libopencv_features2d.so.$libVersion \
|
||||
$libDir/libopencv_flann.so.$libVersion \
|
||||
$libDir/libopencv_highgui.so.$libVersion \
|
||||
$libDir/libopencv_imgcodecs.so.$libVersion \
|
||||
$libDir/libopencv_imgproc.so.$libVersion \
|
||||
$libDir/libopencv_ml.so.$libVersion \
|
||||
$libDir/libopencv_objdetect.so.$libVersion \
|
||||
$libDir/libopencv_photo.so.$libVersion \
|
||||
$libDir/libopencv_shape.so.$libVersion \
|
||||
$libDir/libopencv_stitching.so.$libVersion \
|
||||
$libDir/libopencv_superres.so.$libVersion \
|
||||
$libDir/libopencv_video.so.$libVersion \
|
||||
$libDir/libopencv_videoio.so.$libVersion \
|
||||
$libDir/libopencv_videostab.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
@@ -1,14 +1,21 @@
|
||||
From 9cc93465114e8ce1841ab1e0a5a78b2b6e4a2f19 Mon Sep 17 00:00:00 2001
|
||||
From 1f8ba8b4e5cc4c7e6aa423fb3ffb88fd67d6e166 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sun, 24 Dec 2017 20:20:10 +0100
|
||||
Subject: Disable PIC for Haiku
|
||||
Date: Sun, 4 Mar 2018 18:13:17 +0100
|
||||
Subject: [PATCH] Haiku supporting patches
|
||||
|
||||
---
|
||||
cmake/OpenCVCompilerDefenses.cmake | 6 +++++-
|
||||
modules/core/include/opencv2/core/utils/filesystem.private.hpp | 2 +-
|
||||
modules/core/src/parallel.cpp | 5 +++--
|
||||
modules/core/src/utils/filesystem.cpp | 10 +++++-----
|
||||
modules/videoio/src/cap_ffmpeg_impl.hpp | 4 ++--
|
||||
5 files changed, 16 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/cmake/OpenCVCompilerDefenses.cmake b/cmake/OpenCVCompilerDefenses.cmake
|
||||
index 7d1ba0b..ca3522b 100644
|
||||
index f72f941..672c527 100644
|
||||
--- a/cmake/OpenCVCompilerDefenses.cmake
|
||||
+++ b/cmake/OpenCVCompilerDefenses.cmake
|
||||
@@ -66,7 +66,11 @@ else()
|
||||
@@ -70,7 +70,11 @@ else()
|
||||
# not supported
|
||||
endif()
|
||||
|
||||
@@ -18,47 +25,27 @@ index 7d1ba0b..ca3522b 100644
|
||||
+else()
|
||||
+ set(CMAKE_POSITION_INDEPENDENT_CODE FALSE)
|
||||
+endif()
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC")
|
||||
ocv_add_defense_compiler_flag("-fPIC")
|
||||
endif()
|
||||
--
|
||||
2.15.0
|
||||
|
||||
|
||||
From 4f6dc7e4b42e6bf18ffa36f8b98d404c5768d747 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Mon, 25 Dec 2017 17:29:17 +0100
|
||||
Subject: Haiku have filesystem support
|
||||
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(NOT CMAKE_CXX_FLAGS MATCHES "-fPIC")
|
||||
ocv_add_defense_compiler_flag("-fPIC")
|
||||
diff --git a/modules/core/include/opencv2/core/utils/filesystem.private.hpp b/modules/core/include/opencv2/core/utils/filesystem.private.hpp
|
||||
index 28b1747..7e2b98b 100644
|
||||
index 73f56d4..deca4a4 100644
|
||||
--- a/modules/core/include/opencv2/core/utils/filesystem.private.hpp
|
||||
+++ b/modules/core/include/opencv2/core/utils/filesystem.private.hpp
|
||||
@@ -10,7 +10,7 @@
|
||||
# if defined(__EMSCRIPTEN__) || defined(__native_client__)
|
||||
/* no support */
|
||||
@@ -12,7 +12,7 @@
|
||||
# elif defined WINRT
|
||||
/* not supported */
|
||||
# elif defined __ANDROID__ || defined __linux__ || defined _WIN32 || \
|
||||
- defined __FreeBSD__ || defined __bsdi__
|
||||
+ defined __FreeBSD__ || defined __bsdi__ || defined __HAIKU__
|
||||
# define OPENCV_HAVE_FILESYSTEM_SUPPORT 1
|
||||
# elif defined(__APPLE__)
|
||||
# include <TargetConditionals.h>
|
||||
--
|
||||
2.15.0
|
||||
|
||||
|
||||
From 6737ad323f30faaf5bafe5af109f314c5519e8bf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Mon, 25 Dec 2017 17:58:25 +0100
|
||||
Subject: Basic Haiku support
|
||||
|
||||
|
||||
diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
|
||||
index 8ead516..d743f96 100644
|
||||
index 93d4e6c..5739d3d 100644
|
||||
--- a/modules/core/src/parallel.cpp
|
||||
+++ b/modules/core/src/parallel.cpp
|
||||
@@ -52,7 +52,8 @@
|
||||
@@ -53,7 +53,8 @@
|
||||
#undef abs
|
||||
#endif
|
||||
|
||||
@@ -68,7 +55,7 @@ index 8ead516..d743f96 100644
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
@@ -672,7 +673,7 @@ int cv::getNumberOfCPUs(void)
|
||||
@@ -721,7 +722,7 @@ int cv::getNumberOfCPUs(void)
|
||||
#elif defined __ANDROID__
|
||||
static int ncpus = getNumberOfCPUsImpl();
|
||||
return ncpus;
|
||||
@@ -78,10 +65,10 @@ index 8ead516..d743f96 100644
|
||||
#elif defined __APPLE__
|
||||
int numCPU=0;
|
||||
diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp
|
||||
index 266a92f..1f25bf9 100644
|
||||
index 1aa0d3d..9af7e14 100644
|
||||
--- a/modules/core/src/utils/filesystem.cpp
|
||||
+++ b/modules/core/src/utils/filesystem.cpp
|
||||
@@ -33,7 +33,7 @@
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
@@ -90,7 +77,7 @@ index 266a92f..1f25bf9 100644
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -156,7 +156,7 @@ cv::String getcwd()
|
||||
@@ -161,7 +161,7 @@ cv::String getcwd()
|
||||
sz = GetCurrentDirectoryA((DWORD)buf.size(), (char*)buf);
|
||||
return cv::String((char*)buf, (size_t)sz);
|
||||
#endif
|
||||
@@ -99,7 +86,7 @@ index 266a92f..1f25bf9 100644
|
||||
for(;;)
|
||||
{
|
||||
char* p = ::getcwd((char*)buf, buf.size());
|
||||
@@ -190,7 +190,7 @@ bool createDirectory(const cv::String& path)
|
||||
@@ -195,7 +195,7 @@ bool createDirectory(const cv::String& path)
|
||||
#else
|
||||
int result = _mkdir(path.c_str());
|
||||
#endif
|
||||
@@ -108,7 +95,7 @@ index 266a92f..1f25bf9 100644
|
||||
int result = mkdir(path.c_str(), 0777);
|
||||
#else
|
||||
int result = -1;
|
||||
@@ -305,7 +305,7 @@ private:
|
||||
@@ -310,7 +310,7 @@ private:
|
||||
Impl& operator=(const Impl&); // disabled
|
||||
};
|
||||
|
||||
@@ -117,7 +104,7 @@ index 266a92f..1f25bf9 100644
|
||||
|
||||
struct FileLock::Impl
|
||||
{
|
||||
@@ -419,7 +419,7 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu
|
||||
@@ -424,7 +424,7 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu
|
||||
default_cache_path = "/tmp/";
|
||||
CV_LOG_WARNING(NULL, "Using world accessible cache directory. This may be not secure: " << default_cache_path);
|
||||
}
|
||||
@@ -127,7 +114,7 @@ index 266a92f..1f25bf9 100644
|
||||
if (default_cache_path.empty())
|
||||
{
|
||||
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
index fb12902..8ab77a3 100644
|
||||
index 8ca304a..de60030 100644
|
||||
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
@@ -101,7 +101,7 @@ extern "C" {
|
||||
@@ -149,5 +136,5 @@ index fb12902..8ab77a3 100644
|
||||
#elif defined __APPLE__
|
||||
int numCPU=0;
|
||||
--
|
||||
2.15.0
|
||||
2.16.2
|
||||
|
||||
Reference in New Issue
Block a user