summaryrefslogtreecommitdiff
path: root/user/jasper/APKBUILD
blob: a9b18d2ea1f21d8b680772bed0eb13bd25028089 (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
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=jasper
pkgver=2.0.33
pkgrel=0
pkgdesc="Library implementing JPEG-2000"
url="http://www.ece.uvic.ca/~mdadams/jasper/"
arch="all"
license="JasPer-2.0"
depends=""
makedepends="libjpeg-turbo-dev cmake"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://github.com/jasper-software/$pkgname/releases/download/version-$pkgver/$pkgname-$pkgver.tar.gz"

# secfixes:
#   2.0.12-r1:
#     - CVE-2017-1000050

build() {
	# default of 16 causes stack overflow
	export CFLAGS="${CFLAGS} -DJPC_QMFB_COLGRPSIZE=6"
	cmake \
		-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib \
		-DJAS_ENABLE_OPENGL=OFF \
		-DJAS_ENABLE_LIBJPEG=ON \
		-DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF \
		-Bbuild
	make -C build
}

check() {
	make -C build test
}

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

libs() {
	pkgdesc="JPEG-2000 library"
	install -d "$subpkgdir"/usr/
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}

sha512sums="b243be296b9e7adc86c5eee1deb50afab9e9361861fa3bc010d0fb10d29712fb872f685e7caeb15a6ecf25a7684ecd03bc2ebf851573e3930e8ee9bb2fa65a22  jasper-2.0.33.tar.gz"