summaryrefslogtreecommitdiff
path: root/user/libpng/APKBUILD
blob: 5b1a3352de4a1458efd25ae0e4ed843445108b43 (plain) (blame)
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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: 
pkgname=libpng
pkgver=1.6.35
pkgrel=0
pkgdesc="Portable Network Graphics library"
url="http://www.libpng.org/"
arch="all"
license="Libpng"
depends=""
depends_dev=""
makedepends="autoconf automake libtool zlib-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	https://downloads.sourceforge.net/sourceforge/$pkgname-apng/$pkgname-$pkgver-apng.patch.gz
	libpng-fix-arm-neon.patch
	"

prepare() {
	cd "$builddir"
	gunzip -c "$srcdir"/$pkgname-$pkgver-apng.patch.gz | patch -p1
	default_prepare
	# libpng-fix-arm-neon.patch modifies configure.ac
	autoreconf -vif
}

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

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

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	rm -f "$pkgdir"/usr/lib/*.la
}

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

sha512sums="e4312a4b33e02ad975864d8f1b0c29427625257983962ddd043f258643c18ddcb15a118405282f04d1310817e454a95111e2d4569de494d01d649c7171fd3127  libpng-1.6.35.tar.gz
fe02147399a3cf3bf86d12589f876cf685fd5edf140d0e8b92f58fc6f113f8b2fce9ab9c19d5b3c8bff381d7e657faa6a2c6b1b6640472c2f1b59dedc598ef52  libpng-1.6.35-apng.patch.gz
e3fae918f14bc34e7c126892f69527c6e1b4d72593835ece839d9a28cff55a886b2030f877cf9e29b2c97abf2e47bbb5ba54584828edd2a841c2556f330b9c7e  libpng-fix-arm-neon.patch"