aboutsummaryrefslogtreecommitdiffstats
path: root/main/gd/APKBUILD
blob: 9a5ffe91c043b4831c6b4c1f1ae01f6979bb1c2d (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gd
pkgver=2.2.5
pkgrel=3
_pkgreal=lib$pkgname
pkgdesc="Library for the dynamic creation of images by programmers"
url="https://libgd.github.io/"
arch="all"
license="custom"
depends=
makedepends="bash libpng-dev libjpeg-turbo-dev libwebp-dev freetype-dev zlib-dev"
subpackages="$pkgname-dev $_pkgreal:libs"
source="https://github.com/$_pkgreal/$_pkgreal/releases/download/$pkgname-$pkgver/$_pkgreal-$pkgver.tar.xz
	CVE-2018-1000222.patch
	CVE-2018-5711.patch
	CVE-2019-6977.patch
	CVE-2019-6978.patch
	"
builddir="$srcdir/$_pkgreal-$pkgver"
case "$CARCH" in
	aarch64|x86|ppc64le|s390x) options="!check" ;; # https://github.com/libgd/libgd/issues/359
esac

# secfixes:
#   2.2.5-r2:
#   - CVE-2018-5711
#   - CVE-2019-6977
#   - CVE-2019-6978
#   2.2.5-r1:
#   - CVE-2018-1000222

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--without-fontconfig \
		--disable-werror
	make
}

check() {
	cd "$builddir"
	make check
}

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

dev() {
       default_dev
       depends="$pkgname perl"
       mv "$pkgdir"/usr/bin/bdftogd "$subpkgdir"/usr/bin
}

sha512sums="e4598e17a277a75e02255402182cab139cb3f2cffcd68ec05cc10bbeaf6bc7aa39162c3445cd4a7efc1a26b72b9152bbedb187351e3ed099ea51767319997a6b  libgd-2.2.5.tar.xz
d12462f1b159d50b9032435e9767a5d76e1797a88be950ed33dda7aa17005b7cb60560d04b9520e46d8111e1669d42ce28cb2c508f9c8825d545ac0335d2a10b  CVE-2018-1000222.patch
b23929f10ad75fa97d2ff797ef44d185cfe6de4f26b649e8e507b6fc41ebdb527ab4633d10df955c92d677428d9ed1707d9997954a1bcfb0070995191211d886  CVE-2018-5711.patch
5214ac4148c618f3fef3bb3b6675e41a76e31465cd8dac326ee99dc1ae4cfe760749997d2941743efa48e79b8dbdb536d6b6d79d9bc4e5363f2c50da52ab5cac  CVE-2019-6977.patch
2f70f041b531a23d0bac5c5370a3fb135ca8facaa7baf1554baf35135cc9c6e21de9c09400d939e133ad090b9aa23fa901ea7b5cd9ea20d11edc38257601eb97  CVE-2019-6978.patch"