Root/mplayer/Makefile

Source at commit f76d6929809fd77a0f0963e1e1eca52a98a17c38 created 9 years 6 days ago.
By kyak, mplayer: get rid of X11 runtime dependency
1#
2# OpenWrt
3#
4# This is free software, licensed under the GNU General Public License v2.
5#
6
7include $(TOPDIR)/rules.mk
8
9PKG_NAME:=MPlayer
10PKG_REV:=33341
11FFMPEG_REV:=3b6bbfa0631d237f2bbc85a7b43907733bea1e82
12PKG_VERSION:=r$(PKG_REV)
13PKG_RELEASE:=5
14
15PKG_SOURCE=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16FFMPEG_SOURCE_URL:=git://git.videolan.org/ffmpeg.git
17PKG_SOURCE_URL:=svn://svn.mplayerhq.hu/mplayer/trunk
18PKG_SOURCE_PROTO:=svn_plus_ffmpeg_git
19PKG_SOURCE_VERSION=$(PKG_REV)
20PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
21
22include $(INCLUDE_DIR)/package.mk
23include $(INCLUDE_DIR)/nls.mk
24
25define DownloadMethod/svn_plus_ffmpeg_git
26    $(call wrap_mirror, \
27        echo "Checking out files from the svn repository..."; \
28        mkdir -p $(TMP_DIR)/dl && \
29        cd $(TMP_DIR)/dl && \
30        rm -rf $(SUBDIR) && \
31        [ \! -d $(SUBDIR) ] && \
32        ( svn help export | grep -q trust-server-cert && \
33        svn export --non-interactive --trust-server-cert -r$(VERSION) $(URL) $(SUBDIR) || \
34        svn export --non-interactive -r$(VERSION) $(URL) $(SUBDIR) ) && \
35        git clone $(FFMPEG_SOURCE_URL) $(SUBDIR)/ffmpeg && \
36        (cd $(SUBDIR)/ffmpeg && git checkout $(FFMPEG_REV)) && \
37        echo "Packing checkout..." && \
38        rm -rf $(SUBDIR)/ffmpeg/.git && \
39        $(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
40        mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
41        rm -rf $(SUBDIR); \
42    )
43endef
44
45
46define Package/MPlayer
47  SECTION:=multimedia
48  CATEGORY:=Multimedia
49  TITLE:=MPlayer, the movie player
50  URL:=http://www.mplayerhq.hu
51  DEPENDS:=+libjpeg +libpng +directfb +zlib +libsdl +libfreetype +fontconfig $(ICONV_DEPENDS) +BUILD_PATENTED:libmad +libaa +giflib +fribidi +libtheora +libggi
52endef
53
54define Package/MPlayer/description
55  MPlayer is a movie player which runs on many systems.
56endef
57
58# --enable-system-ffmpeg
59# --extra-libs="-lavformat -lavcodec -lavutil -lpostproc -lswscale" \
60
61CONFIGURE_ARGS := --target=mips \
62          --disable-mencoder \
63          --disable-pthreads \
64          --enable-cross-compile \
65          --prefix=/usr \
66          --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config \
67          --with-freetype-config=$(STAGING_DIR)/host/bin/freetype-config \
68          --enable-rpath \
69          --extra-cflags="-I$(STAGING_DIR)/usr/include/directfb \
70          $(ICONV_CPPFLAGS)" \
71          --extra-ldflags="$(ICONV_LDFLAGS)" \
72          --host-cc=gcc \
73          --enable-fbdev \
74          --confdir=/etc/mplayer \
75          --enable-menu \
76          --disable-x11 \
77          --disable-xmga \
78          --disable-xshape \
79          --disable-xinerama \
80          --disable-gif \
81          --disable-xv \
82          --disable-vm \
83          --disable-vdpau \
84          --disable-gl \
85          --disable-xf86keysym \
86          --disable-ossaudio \
87          --enable-alsa \
88          --enable-vidix \
89          --disable-vidix-pcidb \
90          --with-vidix-drivers="no" \
91              --enable-tremor-internal \
92              --enable-tremor-low \
93          --enable-decoder=RAWVIDEO_DECODER \
94          --enable-decoder=THEORA_DECODER \
95          --enable-decoder=VP3_DECODER \
96          --enable-decoder=VP8_DECODER \
97          --enable-decoder=MP2_DECODER \
98          --enable-decoder=FLAC_DECODER \
99          --enable-decoder=PCM_U8_DECODER \
100          --enable-decoder=PCM_U16BE_DECODER \
101          --enable-decoder=PCM_U16LE_DECODER \
102          --enable-decoder=PCM_S8_DECODER \
103          --enable-decoder=PCM_S16BE_DECODER \
104          --enable-decoder=PCM_S16LE_DECODER \
105          --enable-decoder=PCM_MULAW_DECODER \
106          --enable-decoder=PCM_ALAW_DECODER \
107          --enable-demuxer=RAWVIDEO_DEMUXER \
108          --enable-demuxer=AVI_DEMUXER \
109          --enable-demuxer=FLAC_DEMUXER \
110          --enable-demuxer=MATROSKA_DEMUXER \
111          --enable-demuxer=MATROSKA_AUDIO_DEMUXER \
112          --enable-demuxer=SRT_DEMUXER \
113          --enable-demuxer=WAV_DEMUXER \
114          --enable-demuxer=YUV4MPEGPIPE_DEMUXER \
115          --enable-parser=VP3_PARSER \
116          --enable-parser=VP8_PARSER \
117          --enable-parser=PNM_PARSER \
118          --enable-parser=DIRAC_PARSER \
119          --enable-parser=FLAC_PARSER \
120          --enable-protocol=HTTP_PROTOCOL \
121          --enable-protocol=CONCAT_PROTOCOL \
122          --enable-protocol=FILE_PROTOCOL \
123          --enable-protocol=PIPE_PROTOCOL \
124          --enable-protocol=TCP_PROTOCOL \
125          --enable-protocol=UDP_PROTOCOL
126
127# cannot enable, pulls in mpegts, and realmedia stuff (?):
128# --enable-protocol=RTP_PROTOCOL
129
130# not compiling working with libspeex version from openwrt:
131# --enable-decoder=LIBSPEEX_DECODER
132
133# ffmpeg ogg demuxer disabled for now (leaks memory, use mplayer's native ogg
134# support instead) --enable-demuxer=OGG_DEMUXER
135
136# ffmpeg vorbis is float-based and slow, using mplayer's internal tremor
137#instead --enable-decoder=VORBIS_DECODER
138
139ifdef CONFIG_BUILD_PATENTED
140CONFIGURE_ARGS+= --enable-mad \
141          --enable-mp3lib
142else
143CONFIGURE_ARGS+= --disable-mad \
144          --disable-mp3lib \
145        --disable-libmpeg2 \
146        --disable-libmpeg2-internal
147endif
148
149# mplayer makefile is soooo broken. have to specify libs by hand, if
150# compileing with --enable-system-ffmpeg
151TARGET_CFLAGS+= -std=c99 -DPATH_MAX=512 -D_GNU_SOURCE
152# -lavcore
153
154# todo: remove once building correctly
155MAKE_FLAGS = -j4
156
157define Build/Configure
158    $(call Build/Configure/Default,)
159endef
160
161define Package/MPlayer/install
162    $(INSTALL_DIR) \
163        $(1)/usr/bin \
164        $(1)/etc/mplayer
165
166    $(INSTALL_BIN) \
167        $(PKG_BUILD_DIR)/mplayer \
168        $(1)/usr/bin/mplayer
169    $(INSTALL_DATA) \
170        $(FILES_DIR)/input.conf \
171        $(FILES_DIR)/mplayer.conf \
172        $(1)/etc/mplayer/
173
174endef
175
176$(eval $(call BuildPackage,MPlayer))
177
178
179# The following comments configure the Emacs editor. Just ignore them.
180# Local Variables:
181# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/mplayer/compile -j4 V=99"
182# End:
183

Archive Download this file



interactive