Commit 69444316 authored by diego's avatar diego

Generate pkgconfig files via two functions.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7313 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 749af62b
...@@ -2038,168 +2038,73 @@ if test "$source_path_used" = "yes" ; then ...@@ -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
cat <<EOF >libavutil.pc
prefix=$PREFIX
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: libavutil
Description: FFmpeg utility library
Version: $lavu_version
Requires:
Conflicts:
Libs: -L\${libdir} -lavutil
Cflags: -I\${includedir} -I\${includedir}/ffmpeg
EOF
cat <<EOF >libavutil-uninstalled.pc
prefix=
exec_prefix=
libdir=\${pcfiledir}/libavutil
includedir=\${pcfiledir}/libavutil
Name: libavutil
Description: FFmpeg utility library
Version: $lavu_version
Requires:
Conflicts:
Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
Cflags: -I\${includedir}
EOF
# libavcodec.pc # build pkg-config files
cat <<EOF >libavcodec.pc
prefix=$PREFIX
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include
Name: libavcodec
Description: FFmpeg codec library
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
prefix=
exec_prefix=
libdir=\${pcfiledir}/libavcodec
includedir=\${pcfiledir}/libavcodec
Name: libavcodec
Description: FFmpeg codec library
Version: $lavc_version
Requires: $pkg_requires libavutil = $lavu_version
Conflicts:
Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
Cflags: -I\${includedir}
EOF
# libavformat.pc pkgconfig_generate(){
cat <<EOF >libavformat.pc 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: libavformat Name: $name
Description: FFmpeg container format library Description: $comment
Version: $lavf_version Version: $version
Requires: $pkg_requires libavcodec = $lavc_version Requires: $requires
Conflicts: Conflicts:
Libs: -L\${libdir} -lavformat $extralibs Libs: -L\${libdir} $libs
Cflags: -I\${includedir} -I\${includedir}/ffmpeg Cflags: -I\${includedir} -I\${includedir}/$include
EOF EOF
}
cat <<EOF >libavformat-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}/libavformat libdir=\${pcfiledir}/$name
includedir=\${pcfiledir}/libavformat includedir=\${pcfiledir}/$name
Name: libavformat Name: $name
Description: FFmpeg container format library Description: $comment
Version: $lavf_version Version: $version
Requires: $pkg_requires libavcodec = $lavc_version Requires: $requires
Conflicts: Conflicts:
Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
Cflags: -I\${includedir} Cflags: -I\${includedir}
EOF EOF
}
pkgconfig_generate libavutil "FFmpeg utility library" "$lavu_version" -lavutil ffmpeg
pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$lavu_version"
# libpostproc.pc pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec $extralibs" "$pkg_requires libavutil = $lavu_version" ffmpeg
cat <<EOF >libpostproc.pc pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "$extralibs" "$pkg_requires libavutil = $lavu_version"
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 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}/libpostproc
includedir=\${pcfiledir}/libpostproc
Name: libpostproc pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc "" postproc
Description: FFmpeg post processing library pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$pp_version"
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment