aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opencv/APKBUILD
blob: f4908edefed9e240bfdc0495ef9f342150499262 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=opencv
pkgver=3.1.0
pkgrel=0
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-base1-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
	rm -rf "$builddir"/3rdparty
}

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
}

md5sums="70e1dd07f0aa06606f1bc0e3fa15abd3  opencv-3.1.0.tar.gz"
sha256sums="f00b3c4f42acda07d89031a2ebb5ebe390764a133502c03a511f67b78bbd4fbf  opencv-3.1.0.tar.gz"
sha512sums="57e0fe41e3d5d1dc036e7fc5673523e53d54f5f62e4d3bcb95238a9cd53e79da7c1704dc136ce632f7cfce369ebf5eb27f629a9b6ac4f7fa34120b80b5c7438f  opencv-3.1.0.tar.gz"