Skip to contentSkip to conversation

mplayer: convert to the generic-tools infrastructure

PATCH New keguang.zhang at gmail.com 2 participants 3 messages Apr 19, 2010 – May 7, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mplayer: convert to the generic-tools infrastructure

From: Kelvin Cheung <[email protected]>

---
 package/multimedia/mplayer/mplayer.mk |   63 +++++++++-----------------------
 1 files changed, 18 insertions(+), 45 deletions(-)
package/multimedia/mplayer/mplayer.mk +18 -45
index 538bac9..4d5e9e0 100644
@@ -6,10 +6,7 @@
 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_DEPENDENCIES:=libmad alsa-lib
 
 ifeq ($(BR2_ENDIAN),"BIG")
 MPLAYER_ENDIAN:=--enable-big-endian
@@ -30,17 +27,8 @@ ifeq ($(BR2_i386),y)
 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)" \
@@ -52,8 +40,6 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
 		--host-cc=$(HOSTCC) \
 		--cc=$(TARGET_CC) \
 		--as=$(TARGET_CROSS)as \
-		--with-extraincdir=$(STAGING_DIR)/usr/include \
-		--with-extralibdir=$(STAGING_DIR)/lib \
 		--charset=UTF-8 \
 		--enable-mad \
 		--enable-fbdev \
@@ -61,38 +47,25 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
 		$(MPLAYER_LARGEFILE) \
 		--enable-cross-compile \
 		--disable-ivtv \
-		--disable-tv \
-		--disable-live \
 		--enable-dynamic-plugins \
 	)
-	touch $@
-
-$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
-	$(MAKE) -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
+ $(MAKE) -C $(@D)
+endef
 
-mplayer: $(if $(BR2_PACKAGE_LIBMAD),libmad) $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+define MPLAYER_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/mplayer $(TARGET_DIR)/usr/bin
+	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/mplayer
+endef
 
-mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
-
-mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
-
-mplayer-clean:
-	rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+define MPLAYER_CLEAN_CMDS
 	-$(MAKE) -C $(MPLAYER_DIR) clean
+endef
 
-mplayer-dirclean:
-	rm -rf $(MPLAYER_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MPLAYER),y)
-TARGETS+=mplayer
-endif
+define MPLAYER_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/bin/mplayer
+endef
+
+$(eval $(call GENTARGETS,package/multimedia,mplayer))
Signature · 1 line
1.6.3.3

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

PATCH 1/1 mplayer: convert to the generic-tools infrastructure

Hi Peter and Thomas,

Should I submit this patch to the bugzilla ?
Wait for your reply.

Best regards
Kelvin

2010/5/4 Kelvin Cheung <[email protected]>

Quoted 129 lines

Hi,

Could this patch be accepted before release 2010.05?

Thanks!

---------- Forwarded message ----------
From: <[email protected]>
Date: 2010/4/19
Subject: [PATCH] mplayer: convert to the generic-tools infrastructure
To: buildroot at busybox.net
Cc: Kelvin Cheung <[email protected]>

From: Kelvin Cheung <[email protected]>

---
 package/multimedia/mplayer/mplayer.mk |   63
+++++++++-----------------------
 1 files changed, 18 insertions(+), 45 deletions(-)
(quoted diff) +0 -0

mplayer.mk
index 538bac9..4d5e9e0 100644

package/multimedia/mplayer/mplayer.mk +1 -9
@@ -6,10 +6,7 @@
 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_DEPENDENCIES:=libmad alsa-lib
 
 ifeq ($(BR2_ENDIAN),"BIG")
 MPLAYER_ENDIAN:=--enable-big-endian
@@ -30,17 +27,8 @@ ifeq ($(BR2_i386),y)
 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\*

package/multimedia/mplayer/mplayer.mk +17 -36
-       $(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)" \
@@ -52,8 +40,6 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
               --host-cc=$(HOSTCC) \
               --cc=$(TARGET_CC) \
               --as=$(TARGET_CROSS)as \
-               --with-extraincdir=$(STAGING_DIR)/usr/include \
-               --with-extralibdir=$(STAGING_DIR)/lib \
               --charset=UTF-8 \
               --enable-mad \
               --enable-fbdev \
@@ -61,38 +47,25 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
               $(MPLAYER_LARGEFILE) \
               --enable-cross-compile \
               --disable-ivtv \
-               --disable-tv \
-               --disable-live \
               --enable-dynamic-plugins \
       )
-       touch $@
-
-$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
-       $(MAKE) -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
+ $(MAKE) -C $(@D)
+endef
 
-mplayer: $(if $(BR2_PACKAGE_LIBMAD),libmad) $(if
 $(BR2_PACKAGE_ALSA_LIB),alsa-lib) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+define MPLAYER_INSTALL_TARGET_CMDS
+       $(INSTALL) -m 0755 -D $(@D)/mplayer $(TARGET_DIR)/usr/bin
+       -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/mplayer
+endef
 
-mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
-
-mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
-
-mplayer-clean:
-       rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
+define MPLAYER_CLEAN_CMDS
       -$(MAKE) -C $(MPLAYER_DIR) clean
+endef
 
-mplayer-dirclean:
-       rm -rf $(MPLAYER_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MPLAYER),y)
-TARGETS+=mplayer
-endif
+define MPLAYER_UNINSTALL_TARGET_CMDS
+       rm -f $(TARGET_DIR)/usr/bin/mplayer
+endef
+
+$(eval $(call GENTARGETS,package/multimedia,mplayer))
--
Quoted 4 lines

1.6.3.3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100507/fc3f2816/attachment.htm>

#3 lore raw

PATCH 1/1 mplayer: convert to the generic-tools infrastructure

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Kelvin" == Kelvin Cheung <[email protected]> writes:

Kelvin> Hi Peter and Thomas,
Kelvin> ??? Should I submit this patch to the bugzilla ? Kelvin> ??? Wait for your reply.

Yes, please - So we don't forget about it. I'm afraid it didn't make it into 2010.05, but I'll add it after the release.

Signature · 1 line
Bye, Peter Korsgaard