APKBUILD 1.67 KB
Newer Older
1
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Carlo Landmeter's avatar
Carlo Landmeter committed
3
pkgname=libpng
4 5
pkgver=1.6.35
pkgrel=0
Carlo Landmeter's avatar
Carlo Landmeter committed
6
pkgdesc="Portable Network Graphics library"
7
url="http://www.libpng.org"
8
arch="all"
9
license="Libpng"
10
depends=""
11
depends_dev="zlib-dev"
12
makedepends="$depends_dev gawk autoconf automake libtool"
13
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
14 15
source="https://downloads.sourceforge.net/libpng/$pkgname-$pkgver.tar.gz
	https://downloads.sourceforge.net/sourceforge/libpng-apng/$pkgname-$pkgver-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
16
	libpng-fix-arm-neon.patch
17
	"
18
builddir="$srcdir/$pkgname-$pkgver"
Carlo Landmeter's avatar
Carlo Landmeter committed
19

20
prepare() {
Carlo Landmeter's avatar
Carlo Landmeter committed
21
	cd "$builddir"
tmpfile's avatar
tmpfile committed
22 23
	gunzip -c "$srcdir"/$pkgname-$pkgver-apng.patch.gz | patch -p1
	default_prepare
24 25
	# libpng-fix-arm-neon.patch modifies configure.ac
	autoreconf -vif
26
}
27

Carlo Landmeter's avatar
Carlo Landmeter committed
28
build() {
Carlo Landmeter's avatar
Carlo Landmeter committed
29
	cd "$builddir"
30 31 32 33
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
34 35
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
tmpfile's avatar
tmpfile committed
36 37
		--localstatedir=/var
	make
38 39
}

40
check() {
41 42
	cd "$builddir"
	make check
43 44
}

45
package() {
Carlo Landmeter's avatar
Carlo Landmeter committed
46
	cd "$builddir"
tmpfile's avatar
tmpfile committed
47
	make DESTDIR="$pkgdir" install
48
	rm -f "$pkgdir"/usr/lib/*.la
Carlo Landmeter's avatar
Carlo Landmeter committed
49 50
}

51 52 53 54 55 56
utils() {
	pkgdesc="$pkgdesc (pngfix utils)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

57 58
sha512sums="e4312a4b33e02ad975864d8f1b0c29427625257983962ddd043f258643c18ddcb15a118405282f04d1310817e454a95111e2d4569de494d01d649c7171fd3127  libpng-1.6.35.tar.gz
fe02147399a3cf3bf86d12589f876cf685fd5edf140d0e8b92f58fc6f113f8b2fce9ab9c19d5b3c8bff381d7e657faa6a2c6b1b6640472c2f1b59dedc598ef52  libpng-1.6.35-apng.patch.gz
tmpfile's avatar
tmpfile committed
59
e3fae918f14bc34e7c126892f69527c6e1b4d72593835ece839d9a28cff55a886b2030f877cf9e29b2c97abf2e47bbb5ba54584828edd2a841c2556f330b9c7e  libpng-fix-arm-neon.patch"