APKBUILD 1.72 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
Sören Tempel's avatar
Sören Tempel committed
4 5
pkgver=1.6.31
pkgrel=0
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"
Sören Tempel's avatar
Sören Tempel committed
10
depends=""
11 12
depends_dev="zlib-dev"
makedepends="$depends_dev gawk"
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"
22
	gunzip -c "$srcdir"/$pkgname-$pkgver-apng.patch.gz | patch -p1 || return 1
Carlo Landmeter's avatar
Carlo Landmeter committed
23
	default_prepare || return 1
24
}
25

Carlo Landmeter's avatar
Carlo Landmeter committed
26
build() {
Carlo Landmeter's avatar
Carlo Landmeter committed
27
	cd "$builddir"
28 29 30 31
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Sören Tempel's avatar
Sören Tempel committed
32 33 34
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
35
		|| return 1
Sören Tempel's avatar
Sören Tempel committed
36
	make || return 1
Natanael Copa's avatar
Natanael Copa committed
37 38
}

39 40 41 42
check() {
	make -C "$builddir" check
}

Natanael Copa's avatar
Natanael Copa committed
43
package() {
Carlo Landmeter's avatar
Carlo Landmeter committed
44
	cd "$builddir"
Sören Tempel's avatar
Sören Tempel committed
45 46 47
	make DESTDIR="$pkgdir" install || return 1
	install -Dm644 LICENSE \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE || return 1
Ariadne Conill's avatar
Ariadne Conill committed
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
}

Sören Tempel's avatar
Sören Tempel committed
57 58
sha512sums="9d76384e52f27f0ca984936fa813910cad04b3a0a0abb4d310a2765eda2eac42a082d719427d65fe6c88998dac0d844b4237e21310d2cf57f494f9f5f03b9a85  libpng-1.6.31.tar.gz
61373296f19ed35c2df6c3d1f80ed683763ccec7079df25b5ee0f70215f535566bb29a3026ff51c86b9dbcadaa2e9a53672caeec23af8d3132952d317f711088  libpng-1.6.31-apng.patch.gz
Carlo Landmeter's avatar
Carlo Landmeter committed
59
30c8389d075b90c0e30c0be8d7630cbf98c87c610f414c529485630dd0411cced28852d2fecc96bca72bc712f0f7e13358f9fc47b6d7b8c7806d34ebeef20514  libpng-fix-arm-neon.patch"