2007-07-23 10:12:39 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# mplayer
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-07-27 13:20:27 +02:00
|
|
|
MPLAYER_VERSION:=1.0rc2
|
2007-07-23 14:40:43 +02:00
|
|
|
MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
|
2007-07-23 10:12:39 +02:00
|
|
|
MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
|
2007-07-23 14:40:43 +02:00
|
|
|
MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
|
2007-07-23 10:12:39 +02:00
|
|
|
MPLAYER_CAT:=$(BZCAT)
|
|
|
|
MPLAYER_BINARY:=mplayer
|
|
|
|
MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
|
|
|
|
|
2010-07-22 12:49:17 +02:00
|
|
|
MPLAYER_DEPENDENCIES = \
|
|
|
|
$(if $(BR2_PACKAGE_LIBMAD),libmad) \
|
|
|
|
$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)
|
|
|
|
|
2007-07-23 10:12:39 +02:00
|
|
|
ifeq ($(BR2_ENDIAN),"BIG")
|
|
|
|
MPLAYER_ENDIAN:=--enable-big-endian
|
|
|
|
else
|
|
|
|
MPLAYER_ENDIAN:=--disable-big-endian
|
|
|
|
endif
|
|
|
|
|
2009-01-20 10:29:50 +01:00
|
|
|
# mplayer unfortunately uses --disable-largefileS, so we cannot use
|
|
|
|
# DISABLE_LARGEFILE
|
|
|
|
ifeq ($(BR2_LARGEFILE),y)
|
|
|
|
MPLAYER_LARGEFILE:=--enable-largefiles
|
|
|
|
else
|
2010-05-04 21:38:14 +02:00
|
|
|
# dvdread/dvdcss requires largefile support
|
|
|
|
MPLAYER_LARGEFILE:=--disable-largefiles \
|
|
|
|
--disable-dvdread-internal \
|
|
|
|
--disable-libdvdcss-internal
|
2009-01-20 10:29:50 +01:00
|
|
|
endif
|
|
|
|
|
2010-07-22 12:49:17 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SDL),y)
|
|
|
|
MPLAYER_SDL:=--enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
|
|
|
|
MPLAYER_DEPENDENCIES += sdl
|
|
|
|
else
|
|
|
|
MPLAYER_SDL:=--disable-sdl
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
|
|
|
MPLAYER_FREETYPE:= \
|
|
|
|
--enable-freetype \
|
|
|
|
--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config
|
|
|
|
MPLAYER_DEPENDENCIES += freetype
|
|
|
|
else
|
|
|
|
MPLAYER_FREETYPE:=--disable-freetype
|
|
|
|
endif
|
|
|
|
|
2009-01-26 10:22:52 +01:00
|
|
|
ifeq ($(BR2_i386),y)
|
|
|
|
# This seems to be required to compile some of the inline asm
|
|
|
|
MPLAYER_CFLAGS:=-fomit-frame-pointer
|
|
|
|
endif
|
|
|
|
|
2007-07-23 10:12:39 +02:00
|
|
|
$(DL_DIR)/$(MPLAYER_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))
|
2007-07-23 10:12:39 +02:00
|
|
|
|
|
|
|
$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
|
|
|
|
$(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2008-11-15 22:33:14 +01:00
|
|
|
toolchain/patch-kernel.sh $(MPLAYER_DIR) package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
|
2008-02-12 01:35:03 +01:00
|
|
|
$(CONFIG_UPDATE) $(MPLAYER_DIR)
|
2007-07-23 14:40:43 +02:00
|
|
|
touch $@
|
2007-07-23 10:12:39 +02:00
|
|
|
|
|
|
|
$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
|
|
|
|
(cd $(MPLAYER_DIR); rm -rf config.cache; \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-07-23 14:40:43 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2009-01-26 10:22:52 +01:00
|
|
|
CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
|
2007-07-23 10:12:39 +02:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--confdir=/etc \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host-cc=$(HOSTCC) \
|
2010-07-06 09:27:32 +02:00
|
|
|
--cc="$(TARGET_CC)" \
|
2007-07-23 10:12:39 +02:00
|
|
|
--as=$(TARGET_CROSS)as \
|
2007-08-12 00:26:56 +02:00
|
|
|
--with-extraincdir=$(STAGING_DIR)/usr/include \
|
2007-07-23 10:12:39 +02:00
|
|
|
--with-extralibdir=$(STAGING_DIR)/lib \
|
2010-02-21 16:55:21 +01:00
|
|
|
--charset=UTF-8 \
|
2007-07-23 10:12:39 +02:00
|
|
|
--enable-mad \
|
|
|
|
--enable-fbdev \
|
|
|
|
$(MPLAYER_ENDIAN) \
|
2009-01-20 10:29:50 +01:00
|
|
|
$(MPLAYER_LARGEFILE) \
|
2010-07-22 12:49:17 +02:00
|
|
|
$(MPLAYER_SDL) \
|
|
|
|
$(MPLAYER_FREETYPE) \
|
2009-01-20 10:11:57 +01:00
|
|
|
--enable-cross-compile \
|
2008-12-01 13:32:50 +01:00
|
|
|
--disable-ivtv \
|
2007-07-23 10:12:39 +02:00
|
|
|
--disable-tv \
|
2009-03-28 14:10:17 +01:00
|
|
|
--disable-live \
|
2007-07-23 10:12:39 +02:00
|
|
|
--enable-dynamic-plugins \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-07-23 14:40:43 +02:00
|
|
|
touch $@
|
2007-07-23 10:12:39 +02:00
|
|
|
|
|
|
|
$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
|
2010-05-04 22:48:16 +02:00
|
|
|
$(MAKE1) -C $(MPLAYER_DIR)
|
2007-07-23 14:40:43 +02:00
|
|
|
touch -c $@
|
2007-07-23 10:12:39 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
|
|
|
|
$(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
|
2007-10-01 18:15:31 +02:00
|
|
|
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
|
2007-07-23 14:40:43 +02:00
|
|
|
touch -c $@
|
2007-07-23 10:12:39 +02:00
|
|
|
|
2010-07-22 12:49:17 +02:00
|
|
|
mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
|
2007-07-23 10:12:39 +02:00
|
|
|
|
2007-09-25 14:01:27 +02:00
|
|
|
mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
|
|
|
|
|
|
|
|
mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
|
|
|
|
|
2007-07-23 10:12:39 +02:00
|
|
|
mplayer-clean:
|
|
|
|
rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
|
|
|
|
-$(MAKE) -C $(MPLAYER_DIR) clean
|
|
|
|
|
|
|
|
mplayer-dirclean:
|
|
|
|
rm -rf $(MPLAYER_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-01 14:08:43 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_MPLAYER),y)
|
2007-07-23 10:12:39 +02:00
|
|
|
TARGETS+=mplayer
|
|
|
|
endif
|