|
@@ -6756,20 +6756,6 @@ NOREDZONE_FLAGS=$noredzone_flags
|
|
|
LIBFUZZER_PATH=$libfuzzer_path
|
|
|
EOF
|
|
|
|
|
|
-get_version(){
|
|
|
- lcname=lib${1}
|
|
|
- name=$(toupper $lcname)
|
|
|
- file=$source_path/$lcname/version.h
|
|
|
- eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
|
|
|
- enabled raise_major && eval ${name}_VERSION_MAJOR=$((${name}_VERSION_MAJOR+100))
|
|
|
- eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
|
|
|
- eval echo "${lcname}_VERSION=\$${name}_VERSION" >> ffbuild/config.mak
|
|
|
- eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> ffbuild/config.mak
|
|
|
- eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> ffbuild/config.mak
|
|
|
-}
|
|
|
-
|
|
|
-map 'get_version $v' $LIBRARY_LIST
|
|
|
-
|
|
|
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST
|
|
|
|
|
|
print_program_extralibs(){
|
|
@@ -6866,64 +6852,32 @@ if test -n "$WARNINGS"; then
|
|
|
enabled fatal_warnings && exit 1
|
|
|
fi
|
|
|
|
|
|
-# build pkg-config files
|
|
|
+# Settings for pkg-config files
|
|
|
|
|
|
-lib_version(){
|
|
|
- eval printf "\"lib${1}${build_suffix} >= \$LIB$(toupper ${1})_VERSION, \""
|
|
|
-}
|
|
|
-
|
|
|
-pkgconfig_generate(){
|
|
|
- name=$1
|
|
|
- shortname=${name#lib}${build_suffix}
|
|
|
- comment=$2
|
|
|
- version=$3
|
|
|
- libs=$4
|
|
|
- requires=$(map 'lib_version $v' $(eval echo \$${name#lib}_deps))
|
|
|
- requires=${requires%, }
|
|
|
- enabled ${name#lib} || return 0
|
|
|
- mkdir -p $name
|
|
|
- cat <<EOF > $name/$name${build_suffix}.pc
|
|
|
+cat > ffbuild/config.sh <<EOF
|
|
|
+# Automatically generated by configure - do not modify!
|
|
|
+shared=$shared
|
|
|
+build_suffix=$build_suffix
|
|
|
prefix=$prefix
|
|
|
-exec_prefix=\${prefix}
|
|
|
libdir=$libdir
|
|
|
-includedir=$incdir
|
|
|
-
|
|
|
-Name: $name
|
|
|
-Description: $comment
|
|
|
-Version: $version
|
|
|
-Requires: $(enabled shared || echo $requires)
|
|
|
-Requires.private: $(enabled shared && echo $requires)
|
|
|
-Conflicts:
|
|
|
-Libs: -L\${libdir} $(enabled rpath && echo "-Wl,-rpath,\${libdir}") -l${shortname} $(enabled shared || echo $libs)
|
|
|
-Libs.private: $(enabled shared && echo $libs)
|
|
|
-Cflags: -I\${includedir}
|
|
|
+incdir=$incdir
|
|
|
+rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
|
|
|
+source_path=${source_path}
|
|
|
+LIBPREF=${LIBPREF}
|
|
|
+LIBSUF=${LIBSUF}
|
|
|
+
|
|
|
+extralibs_avutil="$LIBRT $LIBM"
|
|
|
+extralibs_avcodec="$extralibs"
|
|
|
+extralibs_avformat="$extralibs"
|
|
|
+extralibs_avdevice="$extralibs"
|
|
|
+extralibs_avfilter="$extralibs"
|
|
|
+extralibs_avresample="$LIBM"
|
|
|
+extralibs_postproc=""
|
|
|
+extralibs_swscale="$LIBM"
|
|
|
+extralibs_swresample="$LIBM $LIBSOXR"
|
|
|
EOF
|
|
|
|
|
|
-mkdir -p doc/examples/pc-uninstalled
|
|
|
-includedir=${source_path}
|
|
|
-[ "$includedir" = . ] && includedir="\${pcfiledir}/../../.."
|
|
|
- cat <<EOF > doc/examples/pc-uninstalled/${name}-uninstalled.pc
|
|
|
-prefix=
|
|
|
-exec_prefix=
|
|
|
-libdir=\${pcfiledir}/../../../$name
|
|
|
-includedir=${includedir}
|
|
|
-
|
|
|
-Name: $name
|
|
|
-Description: $comment
|
|
|
-Version: $version
|
|
|
-Requires: $requires
|
|
|
-Conflicts:
|
|
|
-Libs: -L\${libdir} -Wl,-rpath,\${libdir} -l${shortname} $(enabled shared || echo $libs)
|
|
|
-Cflags: -I\${includedir}
|
|
|
-EOF
|
|
|
-}
|
|
|
-
|
|
|
-pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBRT $LIBM"
|
|
|
-pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs"
|
|
|
-pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs"
|
|
|
-pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs"
|
|
|
-pkgconfig_generate libavfilter "FFmpeg audio/video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
|
|
|
-pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" ""
|
|
|
-pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$LIBM"
|
|
|
-pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM"
|
|
|
-pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM $LIBSOXR"
|
|
|
+for lib in $LIBRARY_LIST; do
|
|
|
+ lib_deps="$(eval echo \$${lib}_deps)"
|
|
|
+ echo ${lib}_deps=\"$lib_deps\" >> ffbuild/config.sh
|
|
|
+done
|