aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjpeg/APKBUILD
blob: a53021c6a421796d3ab267cd7c91bf8c0de176a4 (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openjpeg
pkgver=2.3.0
pkgrel=2
pkgdesc="Open-source implementation of JPEG2000 image codec"
url="http://www.openjpeg.org/"
arch="all"
license="BSD"
makedepends="libpng-dev tiff-dev lcms2-dev doxygen cmake"
subpackages="$pkgname-dev $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/uclouvain/openjpeg/archive/v$pkgver.tar.gz
	CVE-2017-17480.patch
	CVE-2018-18088.patch
	CVE-2018-14423.patch
	CVE-2018-6616.patch
	CVE-2018-5785.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%.*}
	make
}

# secfixes:
#   2.3.0-r2:
#     - CVE-2018-5785
#   2.3.0-r1:
#     - CVE-2018-14423
#     - CVE-2018-6616
#     - CVE-2017-17480
#     - CVE-2018-18088
#   2.3.0-r0:
#     - CVE-2017-14039
#   2.2.0-r2:
#     - CVE-2017-14040
#     - CVE-2017-14041
#     - CVE-2017-14151
#     - CVE-2017-14152
#     - CVE-2017-14164
#   2.2.0-r1:
#     - CVE-2017-12982
#   2.1.2-r1:
#     - CVE-2016-9580
#     - CVE-2016-9581

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

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

sha512sums="0a9d427be4a820b1d759fca4b50e293721b45fe4885aa61ca1ae09e099f75ed93520448090c780d62f51076d575cc03618cd6d5181bdb6b34e4fc07b4cfdd568  openjpeg-2.3.0.tar.gz
15f4292ab6e19ecad1d47772ea28154bc7bbf9b9ba68467c5750e0c823efe3657e5973c08b81456f649fb789b6772ddaf5122f23a530ae0f6a9e5adb61c51c74  CVE-2017-17480.patch
24b646f2b24cfbe9babe8b5c622069178998f35d0b82f5034ff12f8df5f3ffd35f4f8bcc195dfec1072d8f8847d200c3d28f689ec16f29ab9ce895dbabd044bb  CVE-2018-18088.patch
4292a05e63ec1ba1ec30e02cd981e9aab617e42831a799bc777b03174bcbc4c49d8b45534668a5237f06c0361865b0ff9bd71f40e2fcab370af6cf9c256c8537  CVE-2018-14423.patch
9c5eccb7b00e8ed6e473db61aaaf9d37462b9a5c5efabb2af3e0d701922c54827aee55253404c149605fa9103adf6f4375a684c89f17a7fe7bdf85988b5db222  CVE-2018-6616.patch
ec48472de6c6d34abff949bbae1ae1e92e0b59939c13345a3a69c8219fdf91ea2c07dda59fe212a88212b3116cae1fb8c47aa5d12b84af669a28aa52864f55de  CVE-2018-5785.patch"