blob: 5b35fbb666e7e20643333c75ef9a47dde2da9c5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=opencv
pkgver=3.2.0
pkgrel=4
pkgdesc="Computer vision and machine learning software library"
url="http://opencv.org"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="cmake ffmpeg-dev libpng-dev libjpeg-turbo-dev tiff-dev jasper-dev
libgomp openexr-dev gtk+3.0-dev gtk+-dev gst-plugins-base-dev
libgphoto2-dev v4l-utils-dev libwebp-dev libdc1394-dev doxygen"
install=""
subpackages="$pkgname-dev $pkgname-libs"
source="opencv-$pkgver.tar.gz::https://github.com/opencv/opencv/archive/$pkgver.tar.gz"
builddir="$srcdir/opencv-$pkgver"
prepare() {
default_prepare || return 1
# purge 3rd party except carotene
for i in "$builddir"/3rdparty/*; do
case $i in
*/carotene*) continue;;
esac
rm -rf "$i"
done
}
build() {
cd "$builddir"
if [ "$CARCH" != "x86_64" ]; then
local _sse="-DENABLE_SSE=OFF -DENABLE_SSE2=OFF"
fi
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DWITH_OPENMP=ON \
-WITH_OPENCL=ON \
-DWITH_IPP=OFF \
$_sse \
|| return 1
make || return 1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
}
sha512sums="381fc8146722f7eeed5ec6f36a0180f3210a0bc8412f9f9d5d667827241a12709afee6fd42fb6f8b4e0ff4ed96cc645c55590ac89f65c529d4fbb6cd0ee752ed opencv-3.2.0.tar.gz"
|