Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Banky <martin.banky@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 09/10] mplayer: convert to gentargets
Date: Tue,  5 Oct 2010 01:22:42 -0700	[thread overview]
Message-ID: <1286266963-23413-9-git-send-email-Martin.Banky@gmail.com> (raw)
In-Reply-To: <1286266963-23413-1-git-send-email-Martin.Banky@gmail.com>

Would have bumped the version, but someone smarter than me is going to have to
do it.

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/multimedia/mplayer/mplayer.mk |   88 +++++++++++---------------------
 1 files changed, 30 insertions(+), 58 deletions(-)

diff --git a/package/multimedia/mplayer/mplayer.mk b/package/multimedia/mplayer/mplayer.mk
index ac3a67e..a53c687 100644
--- a/package/multimedia/mplayer/mplayer.mk
+++ b/package/multimedia/mplayer/mplayer.mk
@@ -3,67 +3,54 @@
 # mplayer
 #
 #############################################################
-MPLAYER_VERSION:=1.0rc2
-MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
-MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
-MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
-MPLAYER_CAT:=$(BZCAT)
-MPLAYER_BINARY:=mplayer
-MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
+MPLAYER_VERSION = 1.0rc2
+MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.bz2
+MPLAYER_SITE = http://www.mplayerhq.hu/MPlayer/releases
 
 MPLAYER_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_LIBMAD),libmad) \
 	$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)
 
 ifeq ($(BR2_ENDIAN),"BIG")
-MPLAYER_ENDIAN:=--enable-big-endian
+MPLAYER_CONF_OPTS += --enable-big-endian
 else
-MPLAYER_ENDIAN:=--disable-big-endian
+MPLAYER_CONF_OPTS += --disable-big-endian
 endif
 
-# mplayer unfortunately uses --disable-largefileS, so we cannot use
+# mplayer unfortunately uses --disable-largefiles, so we cannot use
 # DISABLE_LARGEFILE
 ifeq ($(BR2_LARGEFILE),y)
-MPLAYER_LARGEFILE:=--enable-largefiles
+MPLAYER_CONF_OPTS += --enable-largefiles
 else
 # dvdread/dvdcss requires largefile support
-MPLAYER_LARGEFILE:=--disable-largefiles \
+MPLAYER_CONF_OPTS += --disable-largefiles \
 		   --disable-dvdread-internal \
 		   --disable-libdvdcss-internal
 endif
 
 ifeq ($(BR2_PACKAGE_SDL),y)
-MPLAYER_SDL:=--enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
+MPLAYER_CONF_OPTS += --enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
 MPLAYER_DEPENDENCIES += sdl
 else
-MPLAYER_SDL:=--disable-sdl
+MPLAYER_CONF_OPTS += --disable-sdl
 endif
 
 ifeq ($(BR2_PACKAGE_FREETYPE),y)
-MPLAYER_FREETYPE:= \
+MPLAYER_CONF_OPTS +=  \
 	--enable-freetype \
 	--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config
 MPLAYER_DEPENDENCIES += freetype
 else
-MPLAYER_FREETYPE:=--disable-freetype
+MPLAYER_CONF_OPTS += --disable-freetype
 endif
 
 ifeq ($(BR2_i386),y)
 # This seems to be required to compile some of the inline asm
-MPLAYER_CFLAGS:=-fomit-frame-pointer
+MPLAYER_CFLAGS = -fomit-frame-pointer
 endif
 
-$(DL_DIR)/$(MPLAYER_SOURCE):
-	$(call DOWNLOAD,$(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/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
-	$(CONFIG_UPDATE) $(MPLAYER_DIR)
-	touch $@
-
-$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
-	(cd $(MPLAYER_DIR); rm -rf config.cache; \
+define MPLAYER_CONFIGURE_CMDS
+	(cd $(@D); rm -rf config.cache; \
 		$(TARGET_CONFIGURE_OPTS) \
 		$(TARGET_CONFIGURE_ARGS) \
 		CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
@@ -80,44 +67,29 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
 		--charset=UTF-8 \
 		--enable-mad \
 		--enable-fbdev \
-		$(MPLAYER_ENDIAN) \
-		$(MPLAYER_LARGEFILE) \
-		$(MPLAYER_SDL) \
-		$(MPLAYER_FREETYPE) \
+		$(MPLAYER_CONF_OPTS) \
 		--enable-cross-compile \
 		--disable-ivtv \
 		--disable-tv \
 		--disable-live \
 		--enable-dynamic-plugins \
 	)
-	touch $@
-
-$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
-	$(MAKE1) -C $(MPLAYER_DIR)
-	touch -c $@
+endef
 
-$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
-	$(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
-	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
-	touch -c $@
+define MPLAYER_BUILD_CMDS
+	$(MAKE1) -C $(@D)
+endef
 
-mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+define MPLAYER_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
 
-mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
+define MPLAYER_UNINSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
 
-mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
+define MPLAYER_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
 
-mplayer-clean:
-	rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
-	-$(MAKE) -C $(MPLAYER_DIR) clean
-
-mplayer-dirclean:
-	rm -rf $(MPLAYER_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MPLAYER),y)
-TARGETS+=mplayer
-endif
+$(eval $(call GENTARGETS,package/multimedia,mplayer))
-- 
1.7.3.1

  parent reply	other threads:[~2010-10-05  8:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  8:22 [Buildroot] [PATCH 01/10] input-tools: convert to gentargets Martin Banky
2010-10-05  8:22 ` [Buildroot] [PATCH 02/10] lsof: convert to gentargets and bump to 4.84 Martin Banky
2010-12-12 16:58   ` Thomas Petazzoni
2010-10-05  8:22 ` [Buildroot] [PATCH 03/10] lvm2: convert to autotargets and bump to 2.02.74 Martin Banky
2010-12-12 16:59   ` Thomas Petazzoni
2010-10-05  8:22 ` [Buildroot] [PATCH 04/10] memtester: convert to gentargets and bump to 4.2.0 Martin Banky
2010-12-12 17:11   ` Thomas Petazzoni
2010-10-05  8:22 ` [Buildroot] [PATCH 05/10] microcom: convert to gentargets Martin Banky
2010-10-05  9:21   ` Thomas Petazzoni
2010-10-05 18:54     ` Martin Banky
2010-10-05 19:48       ` Peter Korsgaard
2010-10-05 21:05         ` Martin Banky
2010-10-05 21:13           ` Peter Korsgaard
2010-10-05 21:58             ` Martin Banky
2010-12-12 17:12         ` Thomas Petazzoni
2010-10-05  8:22 ` [Buildroot] [PATCH 06/10] microperl: " Martin Banky
2010-10-05  9:19   ` Thomas Petazzoni
2010-10-05 19:10     ` Martin Banky
2010-10-05  8:22 ` [Buildroot] [PATCH 07/10] mii-diag: convert to gentargets and bump to 2.11.3 Martin Banky
2010-10-05  8:22 ` [Buildroot] [PATCH 08/10] alsa-utils: convert to autotargets and bump to 1.0.23 Martin Banky
2010-10-05  8:22 ` Martin Banky [this message]
2010-10-06  3:42   ` [Buildroot] [PATCH 09/10] mplayer: convert to gentargets Chih-Min Chao
2010-10-06  5:55     ` Martin Banky
2010-10-08 20:45   ` Sergio Monteiro Basto
2010-10-10 21:50     ` Martin Banky
2010-12-12 21:12   ` Thomas Petazzoni
2010-10-05  8:22 ` [Buildroot] [PATCH 10/10] netplug: convert to gentargets and bump to 1.2.9.2 Martin Banky
2010-10-05  9:17 ` [Buildroot] [PATCH 01/10] input-tools: convert to gentargets Thomas Petazzoni
2010-10-05 18:38   ` Martin Banky
2010-10-05 19:26     ` Martin Banky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286266963-23413-9-git-send-email-Martin.Banky@gmail.com \
    --to=martin.banky@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox