aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjpeg/APKBUILD
blob: 9e340a68ed699b860c08c2e1c6160c65aefaaa46 (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
52
53
54
55
56
57
58
59
60
61
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer:
pkgname=openjpeg
pkgver=2.1.0
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="http://downloads.sourceforge.net/project/openjpeg.mirror/$pkgver/openjpeg-$pkgver.tar.gz
	CVE-2015-6581.patch
	fix-use-after-free.patch
	"

_builddir="${srcdir}/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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
}

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

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

md5sums="f6419fcc233df84f9a81eb36633c6db6  openjpeg-2.1.0.tar.gz
c4d44799e0f048d4e8ea63dc66c043c2  CVE-2015-6581.patch
5dfdfba1783e5f62a4270b0a3681e77f  fix-use-after-free.patch"
sha256sums="1232bb814fd88d8ed314c94f0bfebb03de8559583a33abbe8c64ef3fc0a8ff03  openjpeg-2.1.0.tar.gz
bb970ede0eeb5b2b849fe4a6ec93114bb8887160fdf06cc77f179866b5fc9ad8  CVE-2015-6581.patch
fc7205e89cc8221511d8bd056254b56445ff872b3fd217bfb6295f3989b2c9cc  fix-use-after-free.patch"
sha512sums="3da84d7828a82c738f6ea5fe776c989283ba257cc6884aebfc090cee7e33c88471dee1a93f4a87a300b11f43b98f6624b838171f06227add24afcb1d57208df1  openjpeg-2.1.0.tar.gz
cf6b65b955de0de29af6b6be4d09c172a153f881be07e3e80435fdcdfe3fae07c4e11138ba76fb62f2ec1adb8043d580b4bfcf5e0807e82ec36307b0cb18f67f  CVE-2015-6581.patch
a1cebeb7933bf10b47ebe420b71c0e2a83eb269028cf42aae08eb9b8a36b19df4c94c91ae1ef3d13e0a284f34ac0bd989e56f8071f0c0a3ca0326cc8d2502d91  fix-use-after-free.patch"