From 98716d5dc7ae87a39c2714c218126e5aea4a057b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Fri, 27 Apr 2018 22:18:52 +0200 Subject: [PATCH] - fix header to not use c++ syntax when using C compiler --- cplusplus.patch | 28 ++++++++++++++++++++++++++++ opencv.spec | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 cplusplus.patch diff --git a/cplusplus.patch b/cplusplus.patch new file mode 100644 index 0000000..eb57b95 --- /dev/null +++ b/cplusplus.patch @@ -0,0 +1,28 @@ +--- opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h~ 2018-02-23 09:38:33.000000000 +0100 ++++ opencv-3.4.1/modules/core/include/opencv2/core/cvdef.h 2018-04-27 22:17:38.423275013 +0200 +@@ -480,7 +480,7 @@ + using std::int64_t; + using std::uint64_t; + } +-#else ++#elif __cplusplus + #include + namespace cv { + typedef ::int8_t int8_t; +@@ -492,6 +492,16 @@ + typedef ::int64_t int64_t; + typedef ::uint64_t uint64_t; + } ++#else ++#include ++typedef int8_t int8_t; ++typedef uint8_t uint8_t; ++typedef int16_t int16_t; ++typedef uint16_t uint16_t; ++typedef int32_t int32_t; ++typedef uint32_t uint32_t; ++typedef int64_t int64_t; ++typedef uint64_t uint64_t; + #endif + #endif + diff --git a/opencv.spec b/opencv.spec index 187fe55..dce783a 100644 --- a/opencv.spec +++ b/opencv.spec @@ -101,6 +101,7 @@ Source30: https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229 # Source30-md5: 7505c44ca4eb54b4ab1e4777cb96ac05 Patch0: ix86-pause.patch Patch1: %{name}-ximea.patch +Patch2: cplusplus.patch Patch3: cmake-install-path.patch URL: http://www.opencv.org/ %{?with_pvapi:BuildRequires: AVT_GigE_SDK-devel} @@ -327,6 +328,7 @@ Wiązania Pythona 3 do OpenCV. %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch3 -p1 %build -- 2.43.0