From 47fb8b73f25eb90bea61bb3c29b3654dc63528c2 Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Mon, 23 Jul 2007 08:12:39 +0000 Subject: Add mplayer package --- package/mplayer/mplayer.mk | 75 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 package/mplayer/mplayer.mk (limited to 'package/mplayer/mplayer.mk') diff --git a/package/mplayer/mplayer.mk b/package/mplayer/mplayer.mk new file mode 100644 index 000000000..9fe42b350 --- /dev/null +++ b/package/mplayer/mplayer.mk @@ -0,0 +1,75 @@ +############################################################# +# +# mplayer +# +############################################################# +MPLAYER_VER:=1.0rc1 +MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VER).tar.bz2 +MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases +MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VER) +MPLAYER_CAT:=$(BZCAT) +MPLAYER_BINARY:=mplayer +MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY) + +ifeq ($(BR2_ENDIAN),"BIG") +MPLAYER_ENDIAN:=--enable-big-endian +else +MPLAYER_ENDIAN:=--disable-big-endian +endif + +$(DL_DIR)/$(MPLAYER_SOURCE): + $(WGET) -P $(DL_DIR) $(MPLAYER_SITE)/$(MPLAYER_SOURCE) + +$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE) + $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + toolchain/patch-kernel.sh $(MPLAYER_DIR) package/mplayer/ mplayer-$(MPLAYER_VER)\*.patch\* + @touch $@ + +$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked + (cd $(MPLAYER_DIR); rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + ./configure \ + --prefix=/usr \ + --confdir=/etc \ + --target=$(GNU_TARGET_NAME) \ + --host-cc=$(HOSTCC) \ + --cc=$(TARGET_CC) \ + --as=$(TARGET_CROSS)as \ + --with-extraincdir=$(STAGING_DIR)/include \ + --with-extralibdir=$(STAGING_DIR)/lib \ + --enable-mad \ + --enable-fbdev \ + $(MPLAYER_ENDIAN) \ + --disable-mpdvdkit \ + --disable-tv \ + --enable-dynamic-plugins \ + ); + @touch $@ + +$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured + $(MAKE) -C $(MPLAYER_DIR) + @touch -c $@ + +$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY) + $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY) + -$(STRIP) --strip-unneeded $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY) + @touch -c $@ + +mplayer: uclibc libmad $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY) + +mplayer-clean: + rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY) + -$(MAKE) -C $(MPLAYER_DIR) clean + +mplayer-dirclean: + rm -rf $(MPLAYER_DIR) +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_MPLAYER)),y) +TARGETS+=mplayer +endif -- cgit v1.2.3