aboutsummaryrefslogtreecommitdiffstats
path: root/main/libpng/APKBUILD
blob: c101ddce9a722835b698d73ca8db967deb344087 (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libpng
pkgver=1.6.29
_apngver=1.6.29
pkgrel=0
pkgdesc="Portable Network Graphics library"
url="http://www.libpng.org/"
arch="all"
license="GPL"
depends=""
depends_dev="zlib-dev"
makedepends="$depends_dev gawk"
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-$_apngver-apng.patch.gz
	libpng-fix-arm-neon.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	gunzip -c "$srcdir"/libpng-$_apngver-apng.patch.gz | patch -p1 || return 1
	default_prepare || return 1
}

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

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1
}

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

sha512sums="4b45fcad0e9cd220c5c6a3e3db74fbdca9cedabd1a3f66cd5c302e93a445585ef80934dcb1f1f3ee468bcd287f49b514a4f316df1b32066dadaaa8e15c8d20f4  libpng-1.6.29.tar.gz
466ce59902c45438c403d91115743adcb338dc1006063f5a3c53d27993ad82d02125437fe53a162b09ebb41b36e71b04404e98ed35580afbc137db64d831252d  libpng-1.6.29-apng.patch.gz
30c8389d075b90c0e30c0be8d7630cbf98c87c610f414c529485630dd0411cced28852d2fecc96bca72bc712f0f7e13358f9fc47b6d7b8c7806d34ebeef20514  libpng-fix-arm-neon.patch"