<div class="gmail_quote">On Tue, Oct 5, 2010 at 8:42 PM, Chih-Min Chao <span dir="ltr">&lt;<a href="mailto:cmchao@gmail.com">cmchao@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">On Tue, Oct 5, 2010 at 4:22 PM, Martin Banky &lt;<a href="mailto:martin.banky@gmail.com">martin.banky@gmail.com</a>&gt; wrote:<br>
&gt; Would have bumped the version, but someone smarter than me is going to have to<br>
&gt; do it.<br>
&gt;<br>
&gt; Signed-off-by: Martin Banky &lt;<a href="mailto:Martin.Banky@gmail.com">Martin.Banky@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  package/multimedia/mplayer/<a href="http://mplayer.mk" target="_blank">mplayer.mk</a> |   88 +++++++++++---------------------<br>
&gt;  1 files changed, 30 insertions(+), 58 deletions(-)<br>
&gt;<br>
&gt; diff --git a/package/multimedia/mplayer/<a href="http://mplayer.mk" target="_blank">mplayer.mk</a> b/package/multimedia/mplayer/<a href="http://mplayer.mk" target="_blank">mplayer.mk</a><br>
&gt; index ac3a67e..a53c687 100644<br>
&gt; --- a/package/multimedia/mplayer/<a href="http://mplayer.mk" target="_blank">mplayer.mk</a><br>
&gt; +++ b/package/multimedia/mplayer/<a href="http://mplayer.mk" target="_blank">mplayer.mk</a><br>
&gt; @@ -3,67 +3,54 @@<br>
&gt;  # mplayer<br>
&gt;  #<br>
&gt;  #############################################################<br>
&gt; -MPLAYER_VERSION:=1.0rc2<br>
&gt; -MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2<br>
&gt; -MPLAYER_SITE:=<a href="http://www7.mplayerhq.hu/MPlayer/releases" target="_blank">http://www7.mplayerhq.hu/MPlayer/releases</a><br>
&gt; -MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)<br>
&gt; -MPLAYER_CAT:=$(BZCAT)<br>
&gt; -MPLAYER_BINARY:=mplayer<br>
&gt; -MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)<br>
&gt; +MPLAYER_VERSION = 1.0rc2<br>
&gt; +MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.bz2<br>
&gt; +MPLAYER_SITE = <a href="http://www.mplayerhq.hu/MPlayer/releases" target="_blank">http://www.mplayerhq.hu/MPlayer/releases</a><br>
&gt;<br>
&gt;  MPLAYER_DEPENDENCIES = \<br>
&gt;        $(if $(BR2_PACKAGE_LIBMAD),libmad) \<br>
&gt;        $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)<br>
&gt;<br>
&gt;  ifeq ($(BR2_ENDIAN),&quot;BIG&quot;)<br>
&gt; -MPLAYER_ENDIAN:=--enable-big-endian<br>
&gt; +MPLAYER_CONF_OPTS += --enable-big-endian<br>
&gt;  else<br>
&gt; -MPLAYER_ENDIAN:=--disable-big-endian<br>
&gt; +MPLAYER_CONF_OPTS += --disable-big-endian<br>
&gt;  endif<br>
<br>
</div></div>How about using  MPLAYER_CONF_OPT += --disable-sdl  rather than<br>
creating new var ?<br>
<div><div></div><div class="h5">&gt;<br>
&gt; -# mplayer unfortunately uses --disable-largefileS, so we cannot use<br>
&gt; +# mplayer unfortunately uses --disable-largefiles, so we cannot use<br>
&gt;  # DISABLE_LARGEFILE<br>
&gt;  ifeq ($(BR2_LARGEFILE),y)<br>
&gt; -MPLAYER_LARGEFILE:=--enable-largefiles<br>
&gt; +MPLAYER_CONF_OPTS += --enable-largefiles<br>
&gt;  else<br>
&gt;  # dvdread/dvdcss requires largefile support<br>
&gt; -MPLAYER_LARGEFILE:=--disable-largefiles \<br>
&gt; +MPLAYER_CONF_OPTS += --disable-largefiles \<br>
&gt;                   --disable-dvdread-internal \<br>
&gt;                   --disable-libdvdcss-internal<br>
&gt;  endif<br>
&gt;<br>
&gt;  ifeq ($(BR2_PACKAGE_SDL),y)<br>
&gt; -MPLAYER_SDL:=--enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config<br>
&gt; +MPLAYER_CONF_OPTS += --enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config<br>
&gt;  MPLAYER_DEPENDENCIES += sdl<br>
&gt;  else<br>
&gt; -MPLAYER_SDL:=--disable-sdl<br>
&gt; +MPLAYER_CONF_OPTS += --disable-sdl<br>
&gt;  endif<br>
&gt;<br>
&gt;  ifeq ($(BR2_PACKAGE_FREETYPE),y)<br>
&gt; -MPLAYER_FREETYPE:= \<br>
&gt; +MPLAYER_CONF_OPTS +=  \<br>
&gt;        --enable-freetype \<br>
&gt;        --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config<br>
&gt;  MPLAYER_DEPENDENCIES += freetype<br>
&gt;  else<br>
&gt; -MPLAYER_FREETYPE:=--disable-freetype<br>
&gt; +MPLAYER_CONF_OPTS += --disable-freetype<br>
&gt;  endif<br>
&gt;<br>
&gt;  ifeq ($(BR2_i386),y)<br>
&gt;  # This seems to be required to compile some of the inline asm<br>
&gt; -MPLAYER_CFLAGS:=-fomit-frame-pointer<br>
&gt; +MPLAYER_CFLAGS = -fomit-frame-pointer<br>
&gt;  endif<br>
&gt;<br>
&gt; -$(DL_DIR)/$(MPLAYER_SOURCE):<br>
&gt; -       $(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))<br>
&gt; -<br>
&gt; -$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)<br>
&gt; -       $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -<br>
&gt; -       toolchain/patch-kernel.sh $(MPLAYER_DIR) package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*<br>
&gt; -       $(CONFIG_UPDATE) $(MPLAYER_DIR)<br>
&gt; -       touch $@<br>
&gt; -<br>
&gt; -$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked<br>
&gt; -       (cd $(MPLAYER_DIR); rm -rf config.cache; \<br>
&gt; +define MPLAYER_CONFIGURE_CMDS<br>
&gt; +       (cd $(@D); rm -rf config.cache; \<br>
&gt;                $(TARGET_CONFIGURE_OPTS) \<br>
&gt;                $(TARGET_CONFIGURE_ARGS) \<br>
&gt;                CFLAGS=&quot;$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)&quot; \<br>
&gt; @@ -80,44 +67,29 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked<br>
&gt;                --charset=UTF-8 \<br>
&gt;                --enable-mad \<br>
&gt;                --enable-fbdev \<br>
&gt; -               $(MPLAYER_ENDIAN) \<br>
&gt; -               $(MPLAYER_LARGEFILE) \<br>
&gt; -               $(MPLAYER_SDL) \<br>
&gt; -               $(MPLAYER_FREETYPE) \<br>
&gt; +               $(MPLAYER_CONF_OPTS) \<br>
&gt;                --enable-cross-compile \<br>
&gt;                --disable-ivtv \<br>
&gt;                --disable-tv \<br>
&gt;                --disable-live \<br>
&gt;                --enable-dynamic-plugins \<br>
&gt;        )<br>
&gt; -       touch $@<br>
&gt; -<br>
&gt; -$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured<br>
&gt; -       $(MAKE1) -C $(MPLAYER_DIR)<br>
&gt; -       touch -c $@<br>
&gt; +endef<br>
</div></div>merge target option to (PKG)_CONF_OPT and defining CONFIGURE_CMDS   is<br>
not necessary<br>
<div class="im"><br>
&gt;<br>
&gt; -$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)<br>
&gt; -       $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)<br>
&gt; -       -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)<br>
&gt; -       touch -c $@<br>
&gt; +define MPLAYER_BUILD_CMDS<br>
&gt; +       $(MAKE1) -C $(@D)<br>
&gt; +endef<br>
<br>
</div>is it necessary ?<br>
<div class="im">&gt;<br>
&gt; -mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)<br>
&gt; +define MPLAYER_INSTALL_TARGET_CMDS<br>
&gt; +       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install<br>
&gt; +endef<br>
&gt;<br>
&gt; -mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)<br>
&gt; +define MPLAYER_UNINSTALL_TARGET_CMDS<br>
&gt; +       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall<br>
&gt; +endef<br>
&gt;<br>
&gt; -mplayer-unpacked: $(MPLAYER_DIR)/.unpacked<br>
&gt; +define MPLAYER_CLEAN_CMDS<br>
&gt; +       $(MAKE) -C $(@D) clean<br>
&gt; +endef<br>
&gt;<br>
&gt; -mplayer-clean:<br>
&gt; -       rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)<br>
&gt; -       -$(MAKE) -C $(MPLAYER_DIR) clean<br>
&gt; -<br>
&gt; -mplayer-dirclean:<br>
&gt; -       rm -rf $(MPLAYER_DIR)<br>
&gt; -#############################################################<br>
&gt; -#<br>
&gt; -# Toplevel Makefile options<br>
&gt; -#<br>
&gt; -#############################################################<br>
&gt; -ifeq ($(BR2_PACKAGE_MPLAYER),y)<br>
&gt; -TARGETS+=mplayer<br>
&gt; -endif<br>
&gt; +$(eval $(call GENTARGETS,package/multimedia,mplayer))<br>
&gt; --<br>
&gt; 1.7.3.1<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; buildroot mailing list<br>
&gt; <a href="mailto:buildroot@busybox.net">buildroot@busybox.net</a><br>
&gt; <a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
&gt;<br>
</blockquote></div>This is a gentargets package, (PKG)_CONF_OPT is only available to autotargets. This is why I added the &#39;S&#39; to the end of the variable name, to show that it&#39;s not an autotargets package. As for MAKE1, I&#39;m not sure if it&#39;s necessary, but it was in the original package, so I used it.<br>

<br>Martin <br>