Root/mplayer/Makefile

Source at commit 1b3135c created 8 years 1 month ago.
By Xiangfu Liu, new package: SDL-widgets: a GUI toolkit on top of the SDL libraries
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:=4
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-xv \
78          --disable-vm \
79          --disable-vdpau \
80          --disable-gl \
81          --disable-xf86keysym \
82          --disable-ossaudio \
83          --enable-alsa \
84          --enable-vidix \
85          --disable-vidix-pcidb \
86          --with-vidix-drivers="no" \
87              --enable-tremor-internal \
88              --enable-tremor-low \
89          --enable-decoder=RAWVIDEO_DECODER \
90          --enable-decoder=THEORA_DECODER \
91          --enable-decoder=VP3_DECODER \
92          --enable-decoder=VP8_DECODER \
93          --enable-decoder=MP2_DECODER \
94          --enable-decoder=FLAC_DECODER \
95          --enable-decoder=PCM_U8_DECODER \
96          --enable-decoder=PCM_U16BE_DECODER \
97          --enable-decoder=PCM_U16LE_DECODER \
98          --enable-decoder=PCM_S8_DECODER \
99          --enable-decoder=PCM_S16BE_DECODER \
100          --enable-decoder=PCM_S16LE_DECODER \
101          --enable-decoder=PCM_MULAW_DECODER \
102          --enable-decoder=PCM_ALAW_DECODER \
103          --enable-demuxer=RAWVIDEO_DEMUXER \
104          --enable-demuxer=AVI_DEMUXER \
105          --enable-demuxer=FLAC_DEMUXER \
106          --enable-demuxer=MATROSKA_DEMUXER \
107          --enable-demuxer=MATROSKA_AUDIO_DEMUXER \
108          --enable-demuxer=SRT_DEMUXER \
109          --enable-demuxer=WAV_DEMUXER \
110          --enable-demuxer=YUV4MPEGPIPE_DEMUXER \
111          --enable-parser=VP3_PARSER \
112          --enable-parser=VP8_PARSER \
113          --enable-parser=PNM_PARSER \
114          --enable-parser=DIRAC_PARSER \
115          --enable-parser=FLAC_PARSER \
116          --enable-protocol=HTTP_PROTOCOL \
117          --enable-protocol=CONCAT_PROTOCOL \
118          --enable-protocol=FILE_PROTOCOL \
119          --enable-protocol=PIPE_PROTOCOL \
120          --enable-protocol=TCP_PROTOCOL \
121          --enable-protocol=UDP_PROTOCOL
122
123# cannot enable, pulls in mpegts, and realmedia stuff (?):
124# --enable-protocol=RTP_PROTOCOL
125
126# not compiling working with libspeex version from openwrt:
127# --enable-decoder=LIBSPEEX_DECODER
128
129# ffmpeg ogg demuxer disabled for now (leaks memory, use mplayer's native ogg
130# support instead) --enable-demuxer=OGG_DEMUXER
131
132# ffmpeg vorbis is float-based and slow, using mplayer's internal tremor
133#instead --enable-decoder=VORBIS_DECODER
134
135ifdef CONFIG_BUILD_PATENTED
136CONFIGURE_ARGS+= --enable-mad \
137          --enable-mp3lib
138else
139CONFIGURE_ARGS+= --disable-mad \
140          --disable-mp3lib \
141        --disable-libmpeg2 \
142        --disable-libmpeg2-internal
143endif
144
145# mplayer makefile is soooo broken. have to specify libs by hand, if
146# compileing with --enable-system-ffmpeg
147TARGET_CFLAGS+= -std=c99 -DPATH_MAX=512 -D_GNU_SOURCE
148# -lavcore
149
150# todo: remove once building correctly
151MAKE_FLAGS = -j4
152
153define Build/Configure
154    $(call Build/Configure/Default,)
155endef
156
157define Package/MPlayer/install
158    $(INSTALL_DIR) \
159        $(1)/usr/bin \
160        $(1)/etc/mplayer
161
162    $(INSTALL_BIN) \
163        $(PKG_BUILD_DIR)/mplayer \
164        $(1)/usr/bin/mplayer
165    $(INSTALL_DATA) \
166        $(FILES_DIR)/input.conf \
167        $(FILES_DIR)/mplayer.conf \
168        $(1)/etc/mplayer/
169
170endef
171
172$(eval $(call BuildPackage,MPlayer))
173
174
175# The following comments configure the Emacs editor. Just ignore them.
176# Local Variables:
177# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/mplayer/compile -j4 V=99"
178# End:
179

Archive Download this file



interactive