aboutsummaryrefslogtreecommitdiffstats
path: root/main/libjpeg-turbo/APKBUILD
blob: 2efe02530a4d6f5148391f7568eb875d7f3eaf2d (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
62
63
64
65
66
67
68
69
70
71
72
73
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libjpeg-turbo
pkgver=1.5.3
pkgrel=3
pkgdesc="accelerated baseline JPEG compression and decompression library"
url="http://libjpeg-turbo.virtualgl.org/"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev nasm"
replaces="libjpeg"
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
source="https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$pkgver.tar.gz
	0001-tjLoadImage-Fix-FPE-triggered-by-malformed-BMP.patch
	CVE-2018-11813.patch
	CVE-2018-14498.patch
	"

# secfixes:
#   1.5.3-r3:
#   - CVE-2018-14498
#   1.5.3-r2:
#   - CVE-2018-11813
#   1.5.3-r1:
#   - CVE-2018-1152
#   1.5.3-r0:
#   - CVE-2017-15232

builddir="$srcdir"/libjpeg-turbo-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-jpeg8
	make
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" docdir=/usr/share/doc/$pkgname \
		install
}

utils() {
	pkgdesc="Utilities for manipulating JPEG images"
	replaces="jpeg"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

doc() {
	default_doc
	replaces="jpeg-doc"
}

dev() {
	default_dev
	replaces="jpeg-dev"
}

sha512sums="b611b1cc3d1ddedddad871854b42449d053a5f910ed1bdfa45c98e0270f4ecc110fde3a10111d2b876d847a826fa634f09c0bb8c357056c9c3a91c9065eb5202  libjpeg-turbo-1.5.3.tar.gz
d6465d96427289d90c342e94316018565eb1711ea0028121ea0a962900b7c7599a7457e42201bcfd288da30019ae3b841ce319cfbe02705d49749d660ef04b74  0001-tjLoadImage-Fix-FPE-triggered-by-malformed-BMP.patch
d32234df784ebe1cad6af114f74d14995637e494a502c171e154e1abc5aa335930d3a256fda234a85842d5c1658d2fac6474e0bc959fdf04413f69a35e3bf39a  CVE-2018-11813.patch
315aba552a2d66cdc8d83c5602a7e47c995f6709509afd07daf3ffacaf650404dc9f7a4beeb1373cabb5afc915a3d4c704b71dfdfcad3bc25ae5361ed16980d5  CVE-2018-14498.patch"