aboutsummaryrefslogtreecommitdiffstats
path: root/community/openexr/APKBUILD
blob: 73f9dff26a2637864d332e6db7296ff61f19d666 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Mark Riedesel <mark+alpine@klowner.com>
pkgname=openexr
pkgver=3.1.3
pkgrel=0
pkgdesc="A high dynamic-range image file format library"
url="https://www.openexr.com/"
arch="all"
license="BSD-3-Clause"
makedepends="
	boost-dev
	boost-python3
	chrpath
	cmake
	zlib-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-tools
	$pkgname-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/openexr/openexr/archive/v$pkgver.tar.gz"

# tests hopelessly broken on anything other than aarch64 and x86_64
options="!check"

# secfixes:
#   3.1.1-r0:
#     - CVE-2021-3598
#     - CVE-2021-23169
#     - CVE-2021-23215
#     - CVE-2021-26260
#     - CVE-2021-26945
#   2.5.4-r0:
#     - CVE-2021-20296
#     - CVE-2021-3474
#     - CVE-2021-3475
#     - CVE-2021-3476
#     - CVE-2021-3477
#     - CVE-2021-3478
#     - CVE-2021-3479
#   2.5.2-r0:
#     - CVE-2020-15304
#     - CVE-2020-15305
#     - CVE-2020-15306
#   2.4.1-r0:
#     - CVE-2020-11758
#     - CVE-2020-11759
#     - CVE-2020-11760
#     - CVE-2020-11761
#     - CVE-2020-11762
#     - CVE-2020-11763
#     - CVE-2020-11764
#     - CVE-2020-11765
#   2.4.0-r0:
#     - CVE-2017-12596
#   2.2.1-r0:
#     - CVE-2017-9110
#     - CVE-2017-9111
#     - CVE-2017-9112
#     - CVE-2017-9113
#     - CVE-2017-9114
#     - CVE-2017-9115
#     - CVE-2017-9116

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		$CMAKE_CROSSOPTS
	cmake --build build
}

check() {
	cd build

	_exclude_tests="OpenEXR.IlmImf"
	case "$CARCH" in
		x86) _exclude_tests="($_exclude_tests|IlmBase.Imath)" ;;
		arm*) _exclude_tests="($_exclude_tests|OpenEXRCore.testHUF)" ;;
	esac

	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E $_exclude_tests
}

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

tools() {
	amove usr/bin
}

sha512sums="
12a8f3660104e68ccea0856caf334d1fafbf0ee79115aae23cdce5b835299294ab8a23bafed282acfacd159ce9bc7f6ffc620b1e0df0d40f9ca0eb15a288964d  openexr-3.1.3.tar.gz
"