summaryrefslogtreecommitdiff
path: root/user/jasper/APKBUILD
blob: 006a2f7eb5f0ac9fb64a40a884e8e1f14d6ef581 (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
# Maintainer: 
pkgname=jasper
pkgver=2.0.16
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="$pkgname-$pkgver.tar.gz::https://github.com/mdadams/jasper/archive/version-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-version-$pkgver"

# 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 \
		-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="b3bca227f833567c9061c4a29c0599784ed6a131b5cceddfd1696542d19add821eda445ce6d83782b454b266723b24d0f028cbc644a25c0e3a75304e615b34ee  jasper-2.0.16.tar.gz"