aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gmic/APKBUILD
blob: fc844d93ef3fe49ca28eb79050544cd761f93c56 (plain) (blame)
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
58
59
# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=gmic
pkgver=3.0.0
pkgrel=1
pkgdesc="GREYC's Magic for Image Computing"
url="https://gmic.eu/"
arch="all"
license="CECILL-2.1"
makedepends="
	cmake
	curl-dev
	eigen-dev
	fftw-dev
	graphicsmagick-dev
	openexr-dev
	tiff-dev
	"
depends="ncurses"
subpackages="
	$pkgname-bash-completion
	$pkgname-doc
	$pkgname-dev
	$pkgname-libs
	"
source="https://gmic.eu/files/source/gmic_$pkgver.tar.gz"
options="!check" # No test suite

# Enable opencv support when possible
# opencv-dev is not available on s390x and ppc64le
case "$CARCH" in
	s390x|ppc64le)
		_enable_opencv=OFF ;;
	*)
		makedepends="$makedepends opencv-dev"
		_enable_opencv=ON ;;
esac

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi

	cmake -B build \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_DYNAMIC_LINKING=ON \
		-DBUILD_LIB_STATIC=OFF \
		-DENABLE_OPENCV=$_enable_opencv \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
89353d16d6304e322400c93bafb50f7557df93c933ed2994f33a17d877e4e12ec511a355b38058680f356bccab5aa84b607fab225354c19d4b8ab3e64424c87c  gmic_3.0.0.tar.gz
"