[FFmpeg-devel] [PATCH 3.4] configure: add LIBDRM to Libs.private instead of Libs

Giulio Benetti giulio.benetti at micronovasrl.com
Tue Jan 29 18:59:24 EET 2019


Hello,

Il 21/10/2018 22:43, Giulio Benetti ha scritto:
> Currently LIBDRM is appended to Libs: in libavutil.pc. This causes
> every program linking with avutil to link with -ldrm in both shared and
> static linking cases. In shared linking case it makes no sense, since
> -ldrm is a dependency of libavutil and is transparent while linking with
> libavutil
> 
> - Add privatelibs_avutil variable for explicit private libraries to be
>    appended to Libs.private:
> - Add $LIBDRM to privatelibs_avutil.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti at micronovasrl.com>
> ---
>   configure                     | 3 ++-
>   ffbuild/pkgconfig_generate.sh | 3 ++-
>   2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 9fe7760822..0996d8a85d 100755
> --- a/configure
> +++ b/configure
> @@ -7096,7 +7096,8 @@ source_path=${source_path}
>   LIBPREF=${LIBPREF}
>   LIBSUF=${LIBSUF}
>   
> -extralibs_avutil="$LIBRT $LIBDRM $LIBM"
> +extralibs_avutil="$LIBRT $LIBM"
> +privatelibs_avutil="$LIBDRM"
>   extralibs_avcodec="$extralibs"
>   extralibs_avformat="$extralibs"
>   extralibs_avdevice="$extralibs"
> diff --git a/ffbuild/pkgconfig_generate.sh b/ffbuild/pkgconfig_generate.sh
> index e5de6716d2..b86486a107 100755
> --- a/ffbuild/pkgconfig_generate.sh
> +++ b/ffbuild/pkgconfig_generate.sh
> @@ -13,6 +13,7 @@ name=lib${shortname}
>   fullname=${name}${build_suffix}
>   comment=$2
>   libs=$(eval echo \$extralibs_${shortname})
> +privatelibs=$(eval echo \$privatelibs_${shortname})
>   deps=$(eval echo \$${shortname}_deps)
>   
>   for dep in $deps; do
> @@ -39,7 +40,7 @@ Requires: $($shared || echo $requires)
>   Requires.private: $($shared && echo $requires)
>   Conflicts:
>   Libs: -L\${libdir} $rpath -l${fullname#lib} $($shared || echo $libs)
> -Libs.private: $($shared && echo $libs)
> +Libs.private: $($shared && echo $libs) ${privatelibs}
>   Cflags: -I\${includedir}
>   EOF
>   
> 

any news about this patch?
Is there something wrong with it?

On Buildroot there's still the problem during static linking where -ldrm 
is appended when linking with -lavutil.

Best Regards

-- 
Giulio Benetti
CTO

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale € 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642


More information about the ffmpeg-devel mailing list