[Buildroot] [PATCH] mplayer: needs zlib

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue Oct 13 20:57:08 UTC 2015


Dear Vicente Olivert Riera,

I'm adding Bernd in Cc, since he has done numerous contributions to the
mplayer package. Also adding Gustavo, who did some mplayer packaging IIRC.

On Tue, 13 Oct 2015 10:58:33 +0100, Vicente Olivert Riera wrote:
> Otherwise it will fail to compile with an error message like this one:
> 
> libavcodec/pngdec.c:35:18: fatal error: zlib.h: No such file or
> directory
>  #include <zlib.h>
>                   ^
> compilation terminated.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera at imgtec.com>
> ---
>  package/mplayer/Config.in  |    1 +
>  package/mplayer/mplayer.mk |    2 +-
>  2 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/package/mplayer/Config.in b/package/mplayer/Config.in
> index 7a8b03f..80ad7f1 100644
> --- a/package/mplayer/Config.in
> +++ b/package/mplayer/Config.in
> @@ -6,6 +6,7 @@ config BR2_PACKAGE_MPLAYER_ARCH_SUPPORTS
>  		|| BR2_microblaze || BR2_nios2)
>  	# Broken support for <ARMv5
>  	depends on !BR2_ARM_CPU_ARMV4
> +	select BR2_PACKAGE_ZLIB
>  
>  config BR2_PACKAGE_MPLAYER
>  	bool "mplayer"
> diff --git a/package/mplayer/mplayer.mk b/package/mplayer/mplayer.mk
> index d896b35..0f5ced5 100644
> --- a/package/mplayer/mplayer.mk
> +++ b/package/mplayer/mplayer.mk
> @@ -7,7 +7,7 @@
>  MPLAYER_VERSION = 1.2
>  MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.xz
>  MPLAYER_SITE = http://www.mplayerhq.hu/MPlayer/releases
> -MPLAYER_DEPENDENCIES = host-pkgconf
> +MPLAYER_DEPENDENCIES = host-pkgconf zlib
>  MPLAYER_LICENSE = GPLv2
>  MPLAYER_LICENSE_FILES = LICENSE Copyright
>  MPLAYER_CFLAGS = $(TARGET_CFLAGS)

While this solution is simple, I am not sure if this is the right one.
It is in fact perfectly possible to build mplayer without zlib, by
doing:

+MPLAYER_CONF_OPTS += --disable-decoder=apng --disable-encoder=apng --disable-decoder=tdsc

So in fact, zlib is only needed for two decoders/encoders in the ffmpeg
code. However, it is not really clear to me how to handle this
properly: there is one configure script at the top-level directory, and
then another one in the ffmpeg/ directory. And it is really the ffmpeg
encoders/decoders that have this zlib requirement (and probably
others?).

So, simple solution is to make zlib mandatory (which is reasonable:
zlib is small, and probably already part of most systems). However, I
wonder if there are not some other dependencies for certain
encoders/decoders.

Bernd, Gustavo, do you have some suggestions ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list