aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjpeg/APKBUILD
blob: f9c374e7bfe1886594ebdb775fb91ba616c2e0b2 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openjpeg
pkgver=2.1.2
pkgrel=1
pkgdesc="Open-source implementation of JPEG2000 image codec"
url="http://www.openjpeg.org/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev libpng-dev tiff-dev lcms-dev doxygen cmake"
install=""
subpackages="$pkgname-dev $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/uclouvain/openjpeg/archive/v$pkgver.tar.gz
CVE-2016-9580-9581.patch"
builddir="${srcdir}/$pkgname-$pkgver"

build() {
	cd "$builddir"
	cmake . \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DOPENJPEG_INSTALL_LIB_DIR=lib \
		-DOPENJPEG_INSTALL_PACKAGE_DIR=/usr/lib/cmake/$pkgname-${pkgver%.*} \
		|| return 1
	make || return 1
}

# secfixes:
#   2.1.2-r1:
#     - CVE-2016-9580
#     - CVE-2016-9581

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

tools() {
	pkgdesc="$pkgdesc - tools"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

md5sums="40a7bfdcc66280b3c1402a0eb1a27624  openjpeg-2.1.2.tar.gz
a5971d486b670e76d5e473ff15e65405  CVE-2016-9580-9581.patch"
sha256sums="4ce77b6ef538ef090d9bde1d5eeff8b3069ab56c4906f083475517c2c023dfa7  openjpeg-2.1.2.tar.gz
e352e9480925a31804d965c673545eeaa32d0a47605abaaa09b515ca956058ba  CVE-2016-9580-9581.patch"
sha512sums="411067e33c8e4da9921d0281e932a4ac2af592cf822bfad828daea9e2b9c414859455bcec6d912ce76460ea462fa4cbd94a401333bda5716ec017d18b8e5942c  openjpeg-2.1.2.tar.gz
bffe1126c18296fdc1e7f98437e2b468b8b16c4903d504dc9abf24a9b8e02f18e86200038c5a59c061c40d41b42f6b378776ed0040559bb362a3a592928941d7  CVE-2016-9580-9581.patch"