extra/opencv: fix

This commit is contained in:
Kevin Mihelich 2019-07-26 23:21:01 +00:00
parent b55207a2f3
commit 5245f20ff5
2 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,25 @@
From 2af1e78b3fd63de03ea4453d69c067a275e70354 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Fri, 26 Jul 2019 12:30:41 -0600
Subject: [PATCH] link with libatomic
---
modules/core/CMakeLists.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt
index 246f23b0b..e4768362a 100644
--- a/modules/core/CMakeLists.txt
+++ b/modules/core/CMakeLists.txt
@@ -31,6 +31,8 @@ if(HAVE_TBB)
list(APPEND extra_libs tbb)
endif()
+list(APPEND extra_libs atomic)
+
if(DEFINED WINRT AND NOT DEFINED ENABLE_WINRT_MODE_NATIVE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW")
endif()
--
2.21.0

View file

@ -3,6 +3,7 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove -DCPU_BASELINE_{ENABLE,DISABLE} flags for SSE
# - link with libatomic on v5/v6
pkgbase=opencv
pkgname=(opencv opencv-samples)
@ -23,16 +24,22 @@ optdepends=('opencv-samples: samples'
'java-runtime: Java interface')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.zip"
"opencv_contrib-$pkgver.tar.gz::https://github.com/opencv/opencv_contrib/archive/$pkgver.tar.gz"
opencv-includedir.patch)
opencv-includedir.patch
0001-link-with-libatomic.patch)
sha256sums=('d34985c7b4283519c032e3585b30846644f56c81acba35693295ff8930f080aa'
'9f85d380758498d800fec26307e389620cde8b1a2e86ab51cddc5200fbe37102'
'a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10')
'a96e35c9592e655b21a62cfe04e864a10e21535ad900e5de67356b9e9f40ca10'
'3376bc87ac7404c6f396f1bee03b76ab0e5cb18829f535bbc97cef71d28ab168')
prepare() {
mkdir -p build
cd $pkgname-$pkgver
patch -p1 -i ../opencv-includedir.patch # Fix wrong include patch in pkgconfig file
if [[ $CARCH == "arm" || $CARCH == "armv6h" ]]; then
patch -p1 -i ../0001-link-with-libatomic.patch
fi
}
build() {