Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-video/mplayer/files: mplayer-1.0_rc4-pkg-config.patch
Date: Thu, 05 Apr 2012 18:42:57
Message-Id: 20120405184248.379D32004B@flycatcher.gentoo.org
1 vapier 12/04/05 18:42:48
2
3 Added: mplayer-1.0_rc4-pkg-config.patch
4 Log:
5 Fix pkg-config handling with libdvd{nav,read} #410189.
6
7 (Portage version: 2.2.0_alpha95/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/mplayer/files/mplayer-1.0_rc4-pkg-config.patch?rev=1.1&content-type=text/plain
14
15 Index: mplayer-1.0_rc4-pkg-config.patch
16 ===================================================================
17 respect $PKG_CONFIG, and use pkg-config for libdvdnav/libdvdread by
18 default rather than the ugly xxx-config scripts
19
20 https://bugs.gentoo.org/410189
21
22 hassle vapier@g.o if this causes issues
23
24 --- configure
25 +++ configure
26 @@ -4042,7 +4042,7 @@ echores "$_apple_ir"
27 fi #if linux
28
29 echocheck "pkg-config"
30 -_pkg_config=pkg-config
31 +_pkg_config=${PKG_CONFIG:-pkg-config}
32 if $($_pkg_config --version > /dev/null 2>&1); then
33 if test "$ld_static"; then
34 _pkg_config="$_pkg_config --static"
35 @@ -5740,8 +5740,13 @@ if test "$_dvdread_internal" = auto ; th
36 elif test "$_dvdread" = auto ; then
37 _dvdread=no
38 if test "$_dl" = yes; then
39 - _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
40 - _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
41 + if ! $_pkg_config --exists dvdread ; then
42 + _dvdreadcflags=$($_pkgconfig dvdread --cflags)
43 + _dvdreadlibs=$($_pkgconfig dvdread --libs)
44 + else
45 + _dvdreadcflags=$($_dvdreadconfig --cflags 2> /dev/null)
46 + _dvdreadlibs=$($_dvdreadconfig --libs 2> /dev/null)
47 + fi
48 if header_check dvdread/dvd_reader.h $_dvdreadcflags $_dvdreadlibs $ld_dl ; then
49 _dvdread=yes
50 extra_cflags="$extra_cflags $_dvdreadcflags"
51 @@ -7721,13 +7726,20 @@ if test "$_dvdnav" = auto ; then
52 dvdnav_internal=yes
53 res_comment="internal"
54 else
55 - $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
56 + if ! $_pkg_config --exists dvdnavmini ; then
57 + $_dvdnavconfig --version --minilibs >> $TMPLOG 2>&1 || _dvdnav=no
58 + fi
59 fi
60 fi
61 if test "$_dvdnav" = auto ; then
62 _dvdnav=no
63 - _dvdnavdir=$($_dvdnavconfig --cflags)
64 - _dvdnavlibs=$($_dvdnavconfig --libs)
65 + if $_pkg_config --exists dvdnavmini ; then
66 + _dvdnavdir=$($_pkg_config --cflags dvdnavmini)
67 + _dvdnavlibs=$($_pkg_config --libs dvdnavmini)
68 + else
69 + _dvdnavdir=$($_dvdnavconfig --cflags)
70 + _dvdnavlibs=$($_dvdnavconfig --libs)
71 + fi
72 statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $ld_dl $ld_pthread && _dvdnav=yes
73 fi
74 if test "$_dvdnav" = yes ; then
75 @@ -7736,8 +7748,13 @@ if test "$_dvdnav" = yes ; then
76 cflags_libdvdnav="-Ilibdvdnav"
77 inputmodules="dvdnav(internal) $inputmodules"
78 else
79 - extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
80 - extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
81 + if $_pkg_config --exists dvdnavmini ; then
82 + extra_cflags="$extra_cflags $($_pkg_config --cflags dvdnavmini)"
83 + extra_ldflags="$extra_ldflags $($_pkg_config --libs dvdnavmini)"
84 + else
85 + extra_cflags="$extra_cflags $($_dvdnavconfig --cflags)"
86 + extra_ldflags="$extra_ldflags $($_dvdnavconfig --minilibs)"
87 + fi
88 inputmodules="dvdnav $inputmodules"
89 fi
90 else