aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjpeg/APKBUILD
blob: 7f8c248fb1ddd0a31f3b4defaf7d52d2b1a5464e (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer:
pkgname=openjpeg
pkgver=2.1.2
pkgrel=2
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
	CVE-2017-12982.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-r2:
#     - CVE-2017-12982
#   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
8dac6b8c8cb72f43e59ce785ea07eb32  CVE-2017-12982.patch"
sha256sums="4ce77b6ef538ef090d9bde1d5eeff8b3069ab56c4906f083475517c2c023dfa7  openjpeg-2.1.2.tar.gz
e352e9480925a31804d965c673545eeaa32d0a47605abaaa09b515ca956058ba  CVE-2016-9580-9581.patch
2693934f4e57a57ec28f9b4fa7664c79e8a200910ef7fbe41a72b8cf1e5b711f  CVE-2017-12982.patch"
sha512sums="411067e33c8e4da9921d0281e932a4ac2af592cf822bfad828daea9e2b9c414859455bcec6d912ce76460ea462fa4cbd94a401333bda5716ec017d18b8e5942c  openjpeg-2.1.2.tar.gz
bffe1126c18296fdc1e7f98437e2b468b8b16c4903d504dc9abf24a9b8e02f18e86200038c5a59c061c40d41b42f6b378776ed0040559bb362a3a592928941d7  CVE-2016-9580-9581.patch
0e0ce7bdf53c4b6f1b2e9e5f855186763a1bea39b70bdc1fd5b60a5516036a04562cb43030e9946972009e3733d0efadb8ba4825939e32ba6b9419d6428ee9ad  CVE-2017-12982.patch"