summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/gpac/PKGBUILD
blob: a89db81b938d3abb84973045bad10d4b59b21823 (plain)
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
pkgname=gpac
pkgver=0.4.2
pkgrel=3
arch=("i686")
pkgdesc="A multimedia framework based on the MPEG-4 Systems standard"
url="http://gpac.sourceforge.net"
options=(strip !docs !libtool !emptydirs)
depends=('freetype2' 'spidermonkey' 'libjpeg' 'libpng' 'libmad' 'xvidcore' 'ffmpeg' 'libogg' 'faad2' 'libxml2' 'sdl' 'libvorbis' 'libtheora')
source=(http://easynews.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/${pkgname}-${pkgver}-patches.tar.bz2
gpac-0.4.2-ffmpeg-errno.patch)
md5sums=('834910b42ef007410fcc49a5acd4656b' '7c40146553ab621154e52a8c43344083')

build() {
	cd $pkgname
	patch -p1 -i $startdir/src/$pkgname-$pkgver-DESTDIR.patch
	patch -p0 -i $startdir/src/$pkgname-$pkgver-configure-ogg.patch
	patch -p1 -i $startdir/src/$pkgname-$pkgver-nostrip.patch
	patch -p1 -i $startdir/src/$pkgname-$pkgver-soname.patch
	patch -p1 -i $startdir/src/$pkgname-$pkgver-static-defs.patch
	patch -p1 -i $startdir/src/$pkgname-$pkgver-ffmpeg-snapshots-compat.patch
	patch -p1 -i $startdir/src/$pkgname-$pkgver-ffmpeg-errno.patch
	sed -i 's/ldconfig / /' Makefile
	sed -i 's/-Wall//' Makefile
	patch -p1 -i $startdir/src/$pkgname-$pkgver-pic.patch
	chmod +x configure
	sed -i -e 's/has_wx=yes/has_wx=no/' configure
	sed -i -e 's/osmozilla//g' applications/Makefile
	./configure --prefix=/usr \
		--use-ogg=system \
		--use-vorbis=system \
		--use-theora=system \
		--use-ffmpeg=system \
		--use-xvid=system \
		--use-ft=system \
		--use-png=system \
		--use-js=system \
		--use-mad=system \
		--use-jpeg=system \
		--disable-wx
	make OPTCFLAGS="${CFLAGS}" || return 1
	make DESTDIR="${startdir}/pkg" install
	make DESTDIR="${startdir}/pkg" install-lib
	ln -sf MP4Box ${startdir}/pkg/usr/bin/mp4box
	ln -sf MP4Client ${startdir}/pkg/usr/bin/mp4client
	install -d ${startdir}/pkg/usr/man/man1
	cp doc/man/mp4box.1 ${startdir}/pkg/usr/man/man1
	cp doc/man/mp4client.1 ${startdir}/pkg/usr/man/man1
	cp doc/man/gpac.1 ${startdir}/pkg/usr/man/man1
}