aboutsummaryrefslogtreecommitdiffstats
path: root/main/mplayer/APKBUILD
blob: 28907bcdb39da3983e19639a0f6a54d79cc730d3 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mplayer
pkgver=1.0_rc4
_ver=${pkgver%_*}${pkgver#*_}
pkgrel=4
pkgdesc="A movie player for linux"
url="http://www.mplayerhq.hu/"
arch="all"
license="GPL"
depends=
subpackages="$pkgname-doc"
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"

source="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-$_ver.tar.bz2
	mplayer-libpng-1.5.patch
	"
_builddir="$srcdir"/MPlayer-$_ver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) patch -p1 -i "$srcdir"/$i || return 1 ;;
		esac;
	done
}

build() {
	cd "$_builddir"

	export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
	./configure --prefix=/usr \
		--disable-gui \
		--disable-gif \
		--disable-arts \
		--enable-x11 \
		--enable-runtime-cpudetection \
		--confdir=/etc/mplayer \
		--disable-nas \
		--enable-gl \
		--disable-tv-v4l1 \
		--enable-tv-v4l2 \
		--enable-largefiles \
		--disable-liblzo \
		--disable-speex \
		--disable-openal \
		--disable-fribidi \
		--disable-libdv \
		--disable-musepack \
		--language=all\
		--disable-esd \
		--disable-mga \
		--disable-lirc \
		--enable-debug \
		--enable-radio \
		--enable-radio-capture \
		--extra-cflags="-I/usr/lib/live-media -O2" \
		--disable-nemesi \
		--enable-freetype \
		--enable-xvmc \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	install -Dm644 etc/codecs.conf etc/input.conf etc/example.conf \
		"$pkgdir"/etc/mplayer/ || return 1
	install -dm755 "$pkgdir"/usr/share/mplayer/
	ln -s /usr/share/fonts/TTF/DejaVuSans.ttf \
		"$pkgdir"/usr/share/mplayer/subfont.ttf || return 1
	rm -rf "$pkgdir"/usr/share/mplayer/font
}
md5sums="1699c94de39da9c4c5d34e8f58e418f0  MPlayer-1.0rc4.tar.bz2
f3f3bae09f6cee684ced1dbc7d7ed23c  mplayer-libpng-1.5.patch"