blob: 1ec516417b6fded16d12007a708590398500bb73 (
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
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libjpeg-turbo
pkgver=2.0.2
pkgrel=0
pkgdesc="accelerated baseline JPEG compression and decompression library"
url="https://libjpeg-turbo.org/"
arch="all"
license="IJG"
depends=""
makedepends="cmake nasm"
replaces="libjpeg"
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
source="https://downloads.sourceforge.net/libjpeg-turbo/libjpeg-turbo-$pkgver.tar.gz"
# secfixes:
# 1.5.3-r3:
# - CVE-2018-11813
# 1.5.3-r2:
# - CVE-2018-1152
builddir="$srcdir"/libjpeg-turbo-$pkgver
build() {
cd "$builddir"
if [ "$CBUILD" != "$CHOST" ]; then
CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
fi
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DWITH_JPEG8=1 \
${CMAKE_CROSSOPTS}
make
}
check() {
cd "$builddir"
make test
}
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
install -d "$pkgdir"/usr/share/licenses/$pkgname
ln -s ../../doc/libjpeg-turbo/LICENSE.md "$pkgdir/usr/share/licenses/$pkgname"
}
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="204b6d083e99488c975c75efb08699e4dc1c409556e4dee4f21e3ee67e9c6682eb342f2e5712816b0342c00399fbe6e43fbce30c3d22f30f7ef91db006b3be08 libjpeg-turbo-2.0.2.tar.gz"
|