APKBUILD 1.74 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
pkgver=1.6.34
5
pkgrel=1
Carlo Landmeter's avatar
Carlo Landmeter committed
6 7
pkgdesc="Portable Network Graphics library"
url="http://www.libpng.org/"
8
arch="all"
Carlo Landmeter's avatar
Carlo Landmeter committed
9
license="GPL"
10
depends=""
11
depends_dev="zlib-dev"
12
makedepends="$depends_dev gawk autoconf automake libtool"
13
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils"
14
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
15
	http://downloads.sourceforge.net/sourceforge/$pkgname-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 41 42 43
check() {
	make -C "$builddir" check
}

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

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

58 59
sha512sums="7ee14f3fcf68802b56ac006ae0188735f25adb0402422dc97f560e6d00ba0adac50b1014dbab83457cd33b360901771c962e6b7c0c6e3948cda13eb1188de825  libpng-1.6.34.tar.gz
0777b8e55aeee207ee92479f2258ef1f60f16d7951fdbc6d89a80ef533b86dadecd1ef659d6fe7602d8ea3a8e711a096b0f77ee09b993799b73dfffddfe5dd3c  libpng-1.6.34-apng.patch.gz
tmpfile's avatar
tmpfile committed
60
e3fae918f14bc34e7c126892f69527c6e1b4d72593835ece839d9a28cff55a886b2030f877cf9e29b2c97abf2e47bbb5ba54584828edd2a841c2556f330b9c7e  libpng-fix-arm-neon.patch"