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-24 12:00:16 +03:00
|
|
|
# newer mplayer revisions lack the --enable-system-ffmpeg configure option
|
|
|
|
# which totally screws us :( (i.e. they want to checkout and rebuild libffmpeg
|
|
|
|
# from the mplayer source tree, yuck!)
|
|
|
|
PKG_REV:=33304
|
|
|
|
FFMPEG_REV:=3d462373f8e8fa58b697a9b2d93a5edf70841937
|
|
|
|
#32225 -- last revision with enable-system-ffmpeg
|
|
|
|
PKG_VERSION:=r$(PKG_REV)
|
|
|
|
PKG_RELEASE:=1
|
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) ) && \
|
|
|
|
git clone --depth 1 $(FFMPEG_SOURCE_URL) $(SUBDIR)/ffmpeg && \
|
|
|
|
(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
|
2011-04-24 12:00:16 +03:00
|
|
|
DEPENDS:=+libjpeg +libpng +directfb +zlib +libsdl +libfreetype +fontconfig $(ICONV_DEPENDS) +BUILD_PATENTED:libmad +libaa +giflib +fribidi +libtheora +libggi
|
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 \
|
|
|
|
--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 \
|
2010-09-26 00:45:28 +03:00
|
|
|
--enable-rpath \
|
2010-09-26 22:03:19 +03:00
|
|
|
--extra-cflags="-I$(STAGING_DIR)/usr/include/directfb \
|
2011-02-06 21:14:05 +02:00
|
|
|
$(ICONV_CPPFLAGS)" \
|
|
|
|
--extra-ldflags="$(ICONV_LDFLAGS)" \
|
2010-09-26 00:45:28 +03:00
|
|
|
--host-cc=gcc \
|
2010-09-26 22:03:19 +03:00
|
|
|
--enable-fbdev \
|
2010-09-26 22:21:01 +03:00
|
|
|
--confdir=/usr/share/mplayer \
|
2011-01-08 15:08:37 +02:00
|
|
|
--enable-menu \
|
|
|
|
--$(if $(CONFIG_BUILD_PATENTED),enable-mad,disable-mad) \
|
2011-01-25 11:19:34 +02:00
|
|
|
--$(if $(CONFIG_BUILD_PATENTED),enable-mp3lib,disable-mp3lib) \
|
|
|
|
--disable-x11 \
|
|
|
|
--disable-xv \
|
|
|
|
--disable-vm \
|
|
|
|
--disable-vdpau \
|
|
|
|
--disable-gl \
|
2011-03-05 14:33:47 +02:00
|
|
|
--disable-xf86keysym \
|
|
|
|
--enable-vidix \
|
|
|
|
--disable-vidix-pcidb \
|
|
|
|
--with-vidix-drivers="no"
|
|
|
|
|
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 \
|
|
|
|
$(1)/usr/share/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) \
|
|
|
|
$(FILES_DIR)/input.conf \
|
|
|
|
$(1)/usr/share/mplayer
|
2010-09-26 00:45:28 +03:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,MPlayer))
|