summaryrefslogtreecommitdiff
path: root/package/mplayer/Makefile
blob: 047e07a9739f6e3752a5440b30f6978253c2b9b1 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${ADK_TOPDIR}/rules.mk

PKG_NAME:=		mplayer
PKG_VERSION:=		1.3.0
PKG_RELEASE:=		1
PKG_HASH:=		3ad0846c92d89ab2e4e6fb83bf991ea677e7aa2ea775845814cbceb608b09843
PKG_DESCR:=		popular video player
PKG_SECTION:=		mm/video
PKG_DEPENDS:=		alsa-lib libjpeg-turbo libfaad2 libmad libncurses
PKG_DEPENDS+=		libogg libpng libvorbis giflib
PKG_DEPENDS+=		libx11 libxau libxdmcp libxext libxv zlib
PKG_DEPENDS+=		libxscrnsaver libtheora libxvid libvpx
PKG_BUILDDEP:=		alsa-lib libmad libvorbis faad2 ncurses zlib
PKG_BUILDDEP+=		libX11 libXv libpng libXext libjpeg-turbo libtheora
PKG_BUILDDEP+=		xvidcore libvpx
PKG_NEEDS:=		threads intl
PKG_URL:=		http://www.mplayerhq.hu/
PKG_SITES:=		http://www.mplayerhq.hu/MPlayer/releases/

DISTFILES:=		MPlayer-$(PKG_VERSION).tar.xz
WRKDIST=		${WRKDIR}/MPlayer-${PKG_VERSION}

PKG_ARCH_DEPENDS:=	x86 x86_64 mips arm

PKG_FLAVOURS_MPLAYER:=	WITH_DIRECTFB
PKGFD_WITH_DIRECTFB:=	enable DirectFB video output support
PKGFS_WITH_DIRECTFB:=	directfb
PKGFB_WITH_DIRECTFB:=	DirectFB


include ${ADK_TOPDIR}/mk/package.mk

$(eval $(call PKG_template,MPLAYER,mplayer,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

TARGET_CC:=		${TARGET_COMPILER_PREFIX}gcc
TARGET_CFLAGS+=		-D_POSIX_SOURCE -D_GNU_SOURCE

CONFIG_STYLE:=		minimal
FAKE_FLAGS+=		INSTALLSTRIP=''

ifeq (${ADK_TARGET_SYSTEM_LEMOTE_YEELONG},y)
EXTRA_CFLAGS:=		-DARCH_MIPS64
endif

# Somehow this include path is missing here, although other
# applications build fine against DirectFB. There is also a
# related patch to allow configure to find out the DirectFB
# version number.
ifeq (${ADK_PACKAGE_MPLAYER_WITH_DIRECTFB},y)
TARGET_CPPFLAGS+=	-I${STAGING_TARGET_DIR}/usr/include/directfb
endif

ifeq (${ADK_TARGET_CPU_WITH_MMX},y)
CONFIGURE_CPU_OPTS:=	--enable-mmx
else
CONFIGURE_CPU_OPTS:=	--disable-mmx
endif
ifeq (${ADK_TARGET_CPU_WITH_MMXEXT},y)
CONFIGURE_CPU_OPTS+=	--enable-mmxext
else
CONFIGURE_CPU_OPTS+=	--disable-mmxext
endif
ifeq (${ADK_TARGET_CPU_WITH_3DNOW},y)
CONFIGURE_CPU_OPTS:=	--enable-3dnow
else
CONFIGURE_CPU_OPTS:=	--disable-3dnow
endif
ifeq (${ADK_TARGET_CPU_WITH_SSE4_2},y)
CONFIGURE_CPU_OPTS+=    --enable-sse42 \
			--disable-sse4 \
			--disable-ssse3 \
			--disable-sse3 \
			--disable-sse2 \
			--disable-sse
else
CONFIGURE_CPU_OPTS+=    --disable-sse42
ifeq (${ADK_TARGET_CPU_WITH_SSE4_1},y)
CONFIGURE_CPU_OPTS+=    --enable-sse4 \
			--disable-ssse3 \
			--disable-sse3 \
			--disable-sse2 \
			--disable-sse
else
CONFIGURE_CPU_OPTS+=    --disable-sse4
ifeq (${ADK_TARGET_CPU_WITH_SSSE3},y)
CONFIGURE_CPU_OPTS+=    --enable-ssse3 \
			--disable-sse3 \
			--disable-sse2 \
			--disable-sse
else
CONFIGURE_CPU_OPTS+=    --disable-ssse3
ifeq (${ADK_TARGET_CPU_WITH_SSE3},y)
CONFIGURE_CPU_OPTS+=    --enable-sse3 \
			--disable-sse2 \
			--disable-sse
else
CONFIGURE_CPU_OPTS+=    --disable-sse3
ifeq (${ADK_TARGET_CPU_WITH_SSE2},y)
CONFIGURE_CPU_OPTS+=    --enable-sse2 \
			--disable-sse
else
CONFIGURE_CPU_OPTS+=    --disable-sse2
ifeq (${ADK_TARGET_CPU_WITH_SSE},y)
CONFIGURE_CPU_OPTS+=    --enable-sse
else
CONFIGURE_CPU_OPTS+=    --disable-sse
endif
endif
endif
endif
endif
endif
#ifeq (${ADK_TARGET_CPU_WITH_IWMMXT},y)
#CONFIGURE_CPU_OPTS+=	--enable-iwmmxt
#else
#CONFIGURE_CPU_OPTS+=	--disable-iwmmxt
#endif

ifeq ($(ADK_DEBUG),y)
CONFIGURE_DEBUG=	--enable-debug
endif

ifeq (${ADK_PACKAGE_MPLAYER_WITH_DIRECTFB},y)
CONFIGURE_DIRECTFB=	--enable-directfb
else
CONFIGURE_DIRECTFB=	--disable-directfb
endif

CONFIGURE_ARGS:=	--prefix=/usr \
			--enable-x11 \
			--confdir=/etc \
			--enable-cross-compile \
			--target=${ADK_TARGET_ARCH}-linux \
			--cc='$(TARGET_CC)' \
			--host-cc=$(CC_FOR_BUILD) \
			--enable-fbdev \
			--enable-alsa \
			--enable-tv \
			--enable-v4l2 \
			--enable-png \
			--enable-jpeg \
			--enable-mad \
			--enable-libvorbis \
			--enable-faac \
			--enable-theora \
			--enable-xvid \
			--enable-x264 \
			--enable-x264-lavc \
			--disable-mencoder \
			--disable-ossaudio \
			--disable-caca \
			--disable-vm \
			--disable-iconv \
			--disable-lirc \
			--disable-radio-v4l2 \
			--disable-speex \
			--disable-libdv \
			--disable-live \
			--disable-pvr \
			--disable-ftp \
			--disable-ivtv \
			--disable-freetype \
			--disable-mpg123 \
			--disable-arts \
			--disable-esd \
			--disable-jack \
			--disable-openal \
			--disable-nas \
			--disable-sgiaudio \
			--disable-sunaudio \
			--disable-win32waveout \
			--disable-tga \
			--disable-pnm \
			--disable-md5sum \
			--disable-liblzo \
			--disable-sdl \
			--disable-xinerama \
			--disable-vidix \
			--disable-gl \
			--extra-cflags="${EXTRA_CFLAGS}" \
			${CONFIGURE_CPU_OPTS} \
			${CONFIGURE_DEBUG} \
			${CONFIGURE_DIRECTFB}

XAKE_FLAGS+=		AR="${TARGET_CROSS}ar" RANLIB="${TARGET_CROSS}ranlib"
TARGET_LDFLAGS+=	-lxvidcore -lX11 -lXext -lvorbis

mplayer-install:
	${INSTALL_DIR} ${IDIR_MPLAYER}/usr/bin
	${CP} ${WRKINST}/usr/bin/mplayer ${IDIR_MPLAYER}/usr/bin

include ${ADK_TOPDIR}/mk/pkg-bottom.mk