[Buildroot] [PATCH] mplayer: fix detection of X.org

Peter Korsgaard peter at korsgaard.com
Wed Aug 31 21:29:09 UTC 2016


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at free-electrons.com> writes:

 > As reported in bug #8206, the mplayer configure script fails to detect
 > the availability of X11 header/library if the X.org development packages
 > are not installed on the build machine.

 > This is due to the logic used by the mplayer configure script, which
 > looks like this:

 >   for I in $(echo $extra_cflags | sed s/-I//g) /usr/include ; do
 >     if test -f "$I/X11/Xlib.h" ; then
 >       _x11_headers="yes"

 > So, in other words, it:

 >  1/ Parses the --extra-cflags option, and finds the -I options in there.

 >  2/ Looks in /usr/include

 > Since $(STAGING_DIR)/usr/include is in the compiler built-in search path
 > for headers, we currently don't explicitly pass it in --extra-cflags, so
 > mplayer only looks in /usr/include. If you have X11 headers there thanks
 > to being installed on your build machine, everything works fine (the
 > rest of the build logic really uses the headers and libraries of the
 > cross-compiler). But if you don't have X11 headers in /usr/include, the
 > configure scripts assumes X11 is not available.

 > Since fixing the hand-written configure script of mplayer, hosted in a
 > Subversion repository, is beyond sanity, we simply work around this
 > problem by passing the appropriate -I$(STAGING_DIR)/usr/include option
 > in --extra-cflags.

 > Before this patch, during the configure script:

 > Checking for X11 headers presence ... no (check if the dev(el) packages are installed)
 > Checking for X11 ... no (check if the dev(el) packages are installed)

 > And then, the mplayer binary:

 >  0x00000001 (NEEDED)                     Shared library: [librt.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 >  0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libdl.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libm.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libc.so.0]

 > With this patch, during the configure script:

 > Checking for X11 headers presence ... yes
 > Checking for X11 ... yes

 > And then, the mplayer binary:

 >  0x00000001 (NEEDED)                     Shared library: [librt.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 >  0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libdl.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libm.so.0]
 >  0x00000001 (NEEDED)                     Shared library: [libXext.so.6]
 >  0x00000001 (NEEDED)                     Shared library: [libX11.so.6]
 >  0x00000001 (NEEDED)                     Shared library: [libXinerama.so.1]
 >  0x00000001 (NEEDED)                     Shared library: [libXxf86vm.so.1]
 >  0x00000001 (NEEDED)                     Shared library: [libc.so.0]

 > Fixes bug #8206

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list