aboutsummaryrefslogtreecommitdiffstats
path: root/main/giflib/APKBUILD
blob: f1920ed99e1f98001d83ce13f21a222c363decd2 (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
61
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=giflib
pkgver=5.0.4
pkgrel=0
pkgdesc="A library for reading and writing gif images"
url="http://sourceforge.net/projects/giflib/"
arch="all"
license="MIT"
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils"
depends=
makedepends="libx11-dev libsm-dev util-linux-dev xmlto"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2
	xmlto-skip-validation.patch"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	update_config_sub || return 1
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build () { 
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		|| return 1
	make || return 1
	MAJOR=`echo $pkgver | sed 's/\([0-9]\+\)\..*/\1/'`
	gcc -shared -Wl,-soname,libungif.so.${MAJOR} -Llib/.libs -lgif -o libungif.so.$pkgver || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING \
		|| return 1
	
	install -m755 libungif.so.$pkgver "$pkgdir"/usr/lib/ || return 1
	ln -sf libungif.so.$pkgver "$pkgdir"/usr/lib/libungif.so.4 || return 1
	ln -sf libungif.so.4 "$pkgdir"/usr/lib/libungif.so || return 1
}

utils() {
	pkgdesc="Programs for manipulating GIF format image files"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

md5sums="da60935d07374de00a78c2f6f720c8f5  giflib-5.0.4.tar.bz2
e1ae3d46e40a8609231dea3075388d4a  xmlto-skip-validation.patch"
sha256sums="7c78b2834256fcb7ff703d0d2153f965dc296f8e059de1fc635aba1042b00bba  giflib-5.0.4.tar.bz2
2244e339343d027044732e47bce2b0bdb3e6d9c472963748af4adb2304374022  xmlto-skip-validation.patch"
sha512sums="057c7754a7169a8690d03b39e084626355e907dcc0644473da1ebe6c6f36c7d991a477c0b22d258bdbceafe473bab585bca57fa9bf4d9c0c4d7ebbe920bea83f  giflib-5.0.4.tar.bz2
36f92cb092ee9dc463aa1b6b9857d1a1591fa5ed6bf973b02385a979a7178cf2c1f7fc75d6474c2fa90c090e9659178ab8cfe6bb3e147425828a1b5a59ca6f06  xmlto-skip-validation.patch"