summaryrefslogtreecommitdiffstats
path: root/testing/mplayer2/APKBUILD
blob: 747e3e87cb1632f327a90206b5ed71fa428d50e6 (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
51
52
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mplayer2
pkgver=2.0
pkgrel=3
pkgdesc="advanced general-purpose video player"
url="http://www.mplayer2.org/"
arch="all"
license="GPL"
depends=
makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
	libtheora-dev xvidcore-dev zlib-dev sdl-dev freetype-dev
	x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev live-media-dev
	mesa-dev ffmpeg-dev"
install=""
subpackages="$pkgname-doc"
source="http://ftp.mplayer2.org/pub/release/mplayer2-$pkgver.tar.xz
	mplayer-gcc-4.6-audio-fix.patch
	c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch"

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

build() {
	cd "$_builddir"
	export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
	./configure --prefix=/usr \
		--mandir=/usr/share/man \
		--datadir=/usr/share/mplayer2 \
		--confdir=/etc/mplayer2 \
		--enable-runtime-cpudetection \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	mv "$pkgdir"/usr/bin/mplayer "$pkgdir"/usr/bin/mplayer2
}

md5sums="b880ae4be0e5b9693cdecf97c84b74f3  mplayer2-2.0.tar.xz
5f261813c5dfa70ba2378c2535428e5d  mplayer-gcc-4.6-audio-fix.patch
8125a2e2d696f6d5af584b01a2d15e78  c33fafd6f1bc2a430c114231cecc6e1c56c1f939.patch"