2010-09-26 00:45:28 +03:00
|
|
|
#
|
|
|
|
# OpenWrt
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=MPlayer
|
2011-04-30 12:06:19 +03:00
|
|
|
PKG_REV:=33341
|
2011-05-11 20:09:59 +03:00
|
|
|
FFMPEG_REV:=3b6bbfa0631d237f2bbc85a7b43907733bea1e82
|
2011-04-24 12:00:16 +03:00
|
|
|
PKG_VERSION:=r$(PKG_REV)
|
2012-04-07 14:25:48 +03:00
|
|
|
PKG_RELEASE:=5
|
2010-09-26 00:45:28 +03:00
|
|
|
|
2011-04-24 12:00:16 +03:00
|
|
|
PKG_SOURCE=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
FFMPEG_SOURCE_URL:=git://git.videolan.org/ffmpeg.git
|
|
|
|
PKG_SOURCE_URL:=svn://svn.mplayerhq.hu/mplayer/trunk
|
|
|
|
PKG_SOURCE_PROTO:=svn_plus_ffmpeg_git
|
|
|
|
PKG_SOURCE_VERSION=$(PKG_REV)
|
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
2010-09-26 00:45:28 +03:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2011-02-06 21:14:05 +02:00
|
|
|
include $(INCLUDE_DIR)/nls.mk
|
2010-09-26 00:45:28 +03:00
|
|
|
|
2011-04-24 12:00:16 +03:00
|
|
|
define DownloadMethod/svn_plus_ffmpeg_git
|
|
|
|
$(call wrap_mirror, \
|
|
|
|
echo "Checking out files from the svn repository..."; \
|
|
|
|
mkdir -p $(TMP_DIR)/dl && \
|
|
|
|
cd $(TMP_DIR)/dl && \
|
|
|
|
rm -rf $(SUBDIR) && \
|
|
|
|
[ \! -d $(SUBDIR) ] && \
|
|
|
|
( svn help export | grep -q trust-server-cert && \
|
|
|
|
svn export --non-interactive --trust-server-cert -r$(VERSION) $(URL) $(SUBDIR) || \
|
|
|
|
svn export --non-interactive -r$(VERSION) $(URL) $(SUBDIR) ) && \
|
2011-04-30 12:06:19 +03:00
|
|
|
git clone $(FFMPEG_SOURCE_URL) $(SUBDIR)/ffmpeg && \
|
2011-04-24 12:00:16 +03:00
|
|
|
(cd $(SUBDIR)/ffmpeg && git checkout $(FFMPEG_REV)) && \
|
|
|
|
echo "Packing checkout..." && \
|
|
|
|
rm -rf $(SUBDIR)/ffmpeg/.git && \
|
|
|
|
$(call dl_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
|
|
|
|
mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
|
|
|
|
rm -rf $(SUBDIR); \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
2010-09-26 00:45:28 +03:00
|
|
|
define Package/MPlayer
|
|
|
|
SECTION:=multimedia
|
|
|
|
CATEGORY:=Multimedia
|
|
|
|
TITLE:=MPlayer, the movie player
|
|
|
|
URL:=http://www.mplayerhq.hu
|
2012-10-16 06:12:44 +03:00
|
|
|
DEPENDS:=+libjpeg +libpng +directfb +zlib +libsdl +libfreetype +fontconfig $(ICONV_DEPENDS) +BUILD_PATENTED:libmad +BUILD_PATENTED:libmpg123 +libaa +giflib +fribidi +libtheora +libggi +PACKAGE_libspeex:libspeex +liblzo
|
2010-09-26 00:45:28 +03:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/MPlayer/description
|
|
|
|
MPlayer is a movie player which runs on many systems.
|
|
|
|
endef
|
|
|
|
|
2011-04-24 12:00:16 +03:00
|
|
|
# --enable-system-ffmpeg
|
|
|
|
# --extra-libs="-lavformat -lavcodec -lavutil -lpostproc -lswscale" \
|
|
|
|
|
2010-09-26 00:45:28 +03:00
|
|
|
CONFIGURE_ARGS := --target=mips \
|
2012-07-11 05:51:46 +03:00
|
|
|
--disable-pulse \
|
2010-09-26 00:45:28 +03:00
|
|
|
--disable-mencoder \
|
|
|
|
--disable-pthreads \
|
|
|
|
--enable-cross-compile \
|
|
|
|
--prefix=/usr \
|
|
|
|
--with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config \
|
2010-09-26 22:03:19 +03:00
|
|
|
--with-freetype-config=$(STAGING_DIR)/host/bin/freetype-config \
|
2011-04-24 22:27:53 +03:00
|
|
|
--enable-rpath \
|
|
|
|
--extra-cflags="-I$(STAGING_DIR)/usr/include/directfb \
|
|
|
|
$(ICONV_CPPFLAGS)" \
|
|
|
|
--extra-ldflags="$(ICONV_LDFLAGS)" \
|
|
|
|
--host-cc=gcc \
|
|
|
|
--enable-fbdev \
|
2011-04-30 15:08:34 +03:00
|
|
|
--confdir=/etc/mplayer \
|
2011-04-24 22:27:53 +03:00
|
|
|
--enable-menu \
|
|
|
|
--disable-x11 \
|
2012-04-07 14:25:48 +03:00
|
|
|
--disable-xmga \
|
|
|
|
--disable-xshape \
|
|
|
|
--disable-xinerama \
|
|
|
|
--disable-gif \
|
2011-04-24 22:27:53 +03:00
|
|
|
--disable-xv \
|
|
|
|
--disable-vm \
|
|
|
|
--disable-vdpau \
|
|
|
|
--disable-gl \
|
2012-10-16 05:15:45 +03:00
|
|
|
--disable-libgsm \
|
2011-04-24 22:27:53 +03:00
|
|
|
--disable-xf86keysym \
|
2011-04-27 09:28:37 +03:00
|
|
|
--disable-ossaudio \
|
|
|
|
--enable-alsa \
|
2011-04-24 22:27:53 +03:00
|
|
|
--enable-vidix \
|
|
|
|
--disable-vidix-pcidb \
|
|
|
|
--with-vidix-drivers="no" \
|
|
|
|
--enable-tremor-internal \
|
2011-04-27 08:16:12 +03:00
|
|
|
--enable-tremor-low \
|
2011-04-24 22:27:53 +03:00
|
|
|
--enable-decoder=RAWVIDEO_DECODER \
|
|
|
|
--enable-decoder=THEORA_DECODER \
|
|
|
|
--enable-decoder=VP3_DECODER \
|
|
|
|
--enable-decoder=VP8_DECODER \
|
|
|
|
--enable-decoder=MP2_DECODER \
|
|
|
|
--enable-decoder=FLAC_DECODER \
|
|
|
|
--enable-decoder=PCM_U8_DECODER \
|
|
|
|
--enable-decoder=PCM_U16BE_DECODER \
|
|
|
|
--enable-decoder=PCM_U16LE_DECODER \
|
|
|
|
--enable-decoder=PCM_S8_DECODER \
|
|
|
|
--enable-decoder=PCM_S16BE_DECODER \
|
|
|
|
--enable-decoder=PCM_S16LE_DECODER \
|
|
|
|
--enable-decoder=PCM_MULAW_DECODER \
|
|
|
|
--enable-decoder=PCM_ALAW_DECODER \
|
|
|
|
--enable-demuxer=RAWVIDEO_DEMUXER \
|
|
|
|
--enable-demuxer=AVI_DEMUXER \
|
|
|
|
--enable-demuxer=FLAC_DEMUXER \
|
|
|
|
--enable-demuxer=MATROSKA_DEMUXER \
|
|
|
|
--enable-demuxer=MATROSKA_AUDIO_DEMUXER \
|
|
|
|
--enable-demuxer=SRT_DEMUXER \
|
|
|
|
--enable-demuxer=WAV_DEMUXER \
|
|
|
|
--enable-demuxer=YUV4MPEGPIPE_DEMUXER \
|
|
|
|
--enable-parser=VP3_PARSER \
|
|
|
|
--enable-parser=VP8_PARSER \
|
|
|
|
--enable-parser=PNM_PARSER \
|
|
|
|
--enable-parser=DIRAC_PARSER \
|
|
|
|
--enable-parser=FLAC_PARSER \
|
|
|
|
--enable-protocol=HTTP_PROTOCOL \
|
|
|
|
--enable-protocol=CONCAT_PROTOCOL \
|
|
|
|
--enable-protocol=FILE_PROTOCOL \
|
|
|
|
--enable-protocol=PIPE_PROTOCOL \
|
|
|
|
--enable-protocol=TCP_PROTOCOL \
|
|
|
|
--enable-protocol=UDP_PROTOCOL
|
|
|
|
|
|
|
|
# cannot enable, pulls in mpegts, and realmedia stuff (?):
|
|
|
|
# --enable-protocol=RTP_PROTOCOL
|
|
|
|
|
|
|
|
# not compiling working with libspeex version from openwrt:
|
|
|
|
# --enable-decoder=LIBSPEEX_DECODER
|
|
|
|
|
|
|
|
# ffmpeg ogg demuxer disabled for now (leaks memory, use mplayer's native ogg
|
|
|
|
# support instead) --enable-demuxer=OGG_DEMUXER
|
|
|
|
|
|
|
|
# ffmpeg vorbis is float-based and slow, using mplayer's internal tremor
|
|
|
|
#instead --enable-decoder=VORBIS_DECODER
|
|
|
|
|
|
|
|
ifdef CONFIG_BUILD_PATENTED
|
|
|
|
CONFIGURE_ARGS+= --enable-mad \
|
2012-04-11 10:51:23 +03:00
|
|
|
--enable-mp3lib
|
2011-04-24 22:27:53 +03:00
|
|
|
else
|
|
|
|
CONFIGURE_ARGS+= --disable-mad \
|
2012-04-11 10:51:23 +03:00
|
|
|
--disable-mp3lib \
|
|
|
|
--disable-libmpeg2 \
|
|
|
|
--disable-libmpeg2-internal \
|
|
|
|
--disable-faad
|
2011-04-24 22:27:53 +03:00
|
|
|
endif
|
2011-03-05 14:33:47 +02:00
|
|
|
|
2011-04-24 12:00:16 +03:00
|
|
|
# mplayer makefile is soooo broken. have to specify libs by hand, if
|
|
|
|
# compileing with --enable-system-ffmpeg
|
|
|
|
TARGET_CFLAGS+= -std=c99 -DPATH_MAX=512 -D_GNU_SOURCE
|
|
|
|
# -lavcore
|
|
|
|
|
2011-03-05 14:33:47 +02:00
|
|
|
# todo: remove once building correctly
|
|
|
|
MAKE_FLAGS = -j4
|
2010-09-26 00:45:28 +03:00
|
|
|
|
2011-04-24 12:00:16 +03:00
|
|
|
define Build/Configure
|
|
|
|
$(call Build/Configure/Default,)
|
|
|
|
endef
|
|
|
|
|
2010-09-26 00:45:28 +03:00
|
|
|
define Package/MPlayer/install
|
|
|
|
$(INSTALL_DIR) \
|
2010-09-26 22:21:01 +03:00
|
|
|
$(1)/usr/bin \
|
2011-04-30 15:11:55 +03:00
|
|
|
$(1)/etc/mplayer
|
2010-09-26 00:45:28 +03:00
|
|
|
|
|
|
|
$(INSTALL_BIN) \
|
|
|
|
$(PKG_BUILD_DIR)/mplayer \
|
|
|
|
$(1)/usr/bin/mplayer
|
2010-09-26 22:21:01 +03:00
|
|
|
$(INSTALL_DATA) \
|
2011-04-30 15:08:34 +03:00
|
|
|
$(FILES_DIR)/input.conf \
|
|
|
|
$(FILES_DIR)/mplayer.conf \
|
|
|
|
$(1)/etc/mplayer/
|
2010-09-26 00:45:28 +03:00
|
|
|
|
2011-04-30 12:16:55 +03:00
|
|
|
endef
|
|
|
|
|
2010-09-26 00:45:28 +03:00
|
|
|
$(eval $(call BuildPackage,MPlayer))
|
2011-04-24 22:27:53 +03:00
|
|
|
|
|
|
|
|
|
|
|
# The following comments configure the Emacs editor. Just ignore them.
|
|
|
|
# Local Variables:
|
|
|
|
# compile-command: "make -C ~/h/src/qi/openwrt-xburst package/mplayer/compile -j4 V=99"
|
|
|
|
# End:
|