Generate pkgconfig files via two functions.
Originally committed as revision 7313 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7224e89638
commit
d0674868c5
191
configure
vendored
191
configure
vendored
@ -2038,168 +2038,73 @@ if test "$source_path_used" = "yes" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build pkg-config files libav*.pc and libpostproc.pc
|
|
||||||
# libavutil.pc
|
# build pkg-config files
|
||||||
cat <<EOF >libavutil.pc
|
|
||||||
|
pkgconfig_generate(){
|
||||||
|
name=$1
|
||||||
|
comment=$2
|
||||||
|
version=$3
|
||||||
|
libs=$4
|
||||||
|
requires=$5
|
||||||
|
include=$6
|
||||||
|
cat <<EOF >$name.pc
|
||||||
prefix=$PREFIX
|
prefix=$PREFIX
|
||||||
exec_prefix=\${prefix}
|
exec_prefix=\${prefix}
|
||||||
libdir=\${exec_prefix}/lib
|
libdir=\${exec_prefix}/lib
|
||||||
includedir=\${prefix}/include
|
includedir=\${prefix}/include
|
||||||
|
|
||||||
Name: libavutil
|
Name: $name
|
||||||
Description: FFmpeg utility library
|
Description: $comment
|
||||||
Version: $lavu_version
|
Version: $version
|
||||||
Requires:
|
Requires: $requires
|
||||||
Conflicts:
|
Conflicts:
|
||||||
Libs: -L\${libdir} -lavutil
|
Libs: -L\${libdir} $libs
|
||||||
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
|
Cflags: -I\${includedir} -I\${includedir}/$include
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
cat <<EOF >libavutil-uninstalled.pc
|
pkgconfig_generate_uninstalled(){
|
||||||
|
name=$1
|
||||||
|
shortname=${name/lib/}
|
||||||
|
comment=$2
|
||||||
|
version=$3
|
||||||
|
libs=$4
|
||||||
|
requires=$5
|
||||||
|
cat <<EOF >$name-uninstalled.pc
|
||||||
prefix=
|
prefix=
|
||||||
exec_prefix=
|
exec_prefix=
|
||||||
libdir=\${pcfiledir}/libavutil
|
libdir=\${pcfiledir}/$name
|
||||||
includedir=\${pcfiledir}/libavutil
|
includedir=\${pcfiledir}/$name
|
||||||
|
|
||||||
Name: libavutil
|
Name: $name
|
||||||
Description: FFmpeg utility library
|
Description: $comment
|
||||||
Version: $lavu_version
|
Version: $version
|
||||||
Requires:
|
Requires: $requires
|
||||||
Conflicts:
|
Conflicts:
|
||||||
Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
|
Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
|
||||||
Cflags: -I\${includedir}
|
Cflags: -I\${includedir}
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
# libavcodec.pc
|
pkgconfig_generate libavutil "FFmpeg utility library" "$lavu_version" -lavutil ffmpeg
|
||||||
cat <<EOF >libavcodec.pc
|
pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$lavu_version"
|
||||||
prefix=$PREFIX
|
|
||||||
exec_prefix=\${prefix}
|
|
||||||
libdir=\${exec_prefix}/lib
|
|
||||||
includedir=\${prefix}/include
|
|
||||||
|
|
||||||
Name: libavcodec
|
pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec $extralibs" "$pkg_requires libavutil = $lavu_version" ffmpeg
|
||||||
Description: FFmpeg codec library
|
pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "$extralibs" "$pkg_requires libavutil = $lavu_version"
|
||||||
Version: $lavc_version
|
|
||||||
Requires: $pkg_requires libavutil = $lavu_version
|
|
||||||
Conflicts:
|
|
||||||
Libs: -L\${libdir} -lavcodec $extralibs
|
|
||||||
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >libavcodec-uninstalled.pc
|
pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version" ffmpeg
|
||||||
prefix=
|
pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version"
|
||||||
exec_prefix=
|
|
||||||
libdir=\${pcfiledir}/libavcodec
|
|
||||||
includedir=\${pcfiledir}/libavcodec
|
|
||||||
|
|
||||||
Name: libavcodec
|
pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc "" postproc
|
||||||
Description: FFmpeg codec library
|
pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$pp_version"
|
||||||
Version: $lavc_version
|
|
||||||
Requires: $pkg_requires libavutil = $lavu_version
|
|
||||||
Conflicts:
|
|
||||||
Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
|
|
||||||
Cflags: -I\${includedir}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# libavformat.pc
|
|
||||||
cat <<EOF >libavformat.pc
|
|
||||||
prefix=$PREFIX
|
|
||||||
exec_prefix=\${prefix}
|
|
||||||
libdir=\${exec_prefix}/lib
|
|
||||||
includedir=\${prefix}/include
|
|
||||||
|
|
||||||
Name: libavformat
|
|
||||||
Description: FFmpeg container format library
|
|
||||||
Version: $lavf_version
|
|
||||||
Requires: $pkg_requires libavcodec = $lavc_version
|
|
||||||
Conflicts:
|
|
||||||
Libs: -L\${libdir} -lavformat $extralibs
|
|
||||||
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >libavformat-uninstalled.pc
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=\${pcfiledir}/libavformat
|
|
||||||
includedir=\${pcfiledir}/libavformat
|
|
||||||
|
|
||||||
Name: libavformat
|
|
||||||
Description: FFmpeg container format library
|
|
||||||
Version: $lavf_version
|
|
||||||
Requires: $pkg_requires libavcodec = $lavc_version
|
|
||||||
Conflicts:
|
|
||||||
Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
|
|
||||||
Cflags: -I\${includedir}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
# libpostproc.pc
|
|
||||||
cat <<EOF >libpostproc.pc
|
|
||||||
prefix=$PREFIX
|
|
||||||
exec_prefix=\${prefix}
|
|
||||||
libdir=\${exec_prefix}/lib
|
|
||||||
includedir=\${prefix}/include
|
|
||||||
|
|
||||||
Name: libpostproc
|
|
||||||
Description: FFmpeg post processing library
|
|
||||||
Version: $pp_version
|
|
||||||
Requires:
|
|
||||||
Conflicts:
|
|
||||||
Libs: -L\${libdir} -lpostproc
|
|
||||||
Cflags: -I\${includedir} -I\${includedir}/postproc
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >libpostproc-uninstalled.pc
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=\${pcfiledir}/libpostproc
|
|
||||||
includedir=\${pcfiledir}/libpostproc
|
|
||||||
|
|
||||||
Name: libpostproc
|
|
||||||
Description: FFmpeg post processing library
|
|
||||||
Version: $pp_version
|
|
||||||
Requires:
|
|
||||||
Conflicts:
|
|
||||||
Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
|
|
||||||
Cflags: -I\${includedir}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if test "$swscaler" != "no"; then
|
if test "$swscaler" != "no"; then
|
||||||
sws_pc_libs="-L\${libdir} -lswscale"
|
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$sws_version" "-lswscale" "$pkg_requires libavutil = $lavu_version" swscale
|
||||||
sws_pc_uninstalled_libs="\${libdir}/${LIBPREF}swscale${LIBSUF}"
|
pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavutil = $lavu_version"
|
||||||
sws_pc_requires="$pkg_requires libavutil = $lavu_version"
|
|
||||||
else
|
else
|
||||||
sws_pc_libs=""
|
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavcodec = $lavc_version" swscale
|
||||||
sws_pc_uninstalled_libs=""
|
pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavcodec = $lavc_version"
|
||||||
sws_pc_requires="$pkg_requires libavcodec = $lavc_version"
|
sed -i s/^Libs:.*$/Libs:/ libswscale.pc
|
||||||
|
sed -i s/^Libs:.*$/Libs:/ libswscale-uninstalled.pc
|
||||||
fi
|
fi
|
||||||
# libswscale.pc
|
|
||||||
cat <<EOF >libswscale.pc
|
|
||||||
prefix=$PREFIX
|
|
||||||
exec_prefix=\${prefix}
|
|
||||||
libdir=\${exec_prefix}/lib
|
|
||||||
includedir=\${prefix}/include
|
|
||||||
|
|
||||||
Name: libswscale
|
|
||||||
Description: FFmpeg image rescaling library
|
|
||||||
Version: $sws_version
|
|
||||||
Requires: $sws_pc_requires
|
|
||||||
Conflicts:
|
|
||||||
Libs: $sws_pc_libs
|
|
||||||
Cflags: -I\${includedir} -I\${includedir}/swscale
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >libswscale-uninstalled.pc
|
|
||||||
prefix=
|
|
||||||
exec_prefix=
|
|
||||||
libdir=\${pcfiledir}/libswscale
|
|
||||||
includedir=\${pcfiledir}/libswscale
|
|
||||||
|
|
||||||
Name: libswscale
|
|
||||||
Description: FFmpeg image rescaling library
|
|
||||||
Version: $sws_version
|
|
||||||
Requires: $sws_pc_requires
|
|
||||||
Conflicts:
|
|
||||||
Libs: $sws_pc_uninstalled_libs
|
|
||||||
Cflags: -I\${includedir}
|
|
||||||
EOF
|
|
||||||
|
Loading…
Reference in New Issue
Block a user