From edb434873238876790f6a17bb65490cc29a1d176 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sat, 17 Dec 2016 20:01:07 +0100 Subject: build: Store library version numbers in .version files This moves work from the configure to the Make stage where it can be parallelized and ensures that shared libraries are built with the right version number in the filename. --- configure | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'configure') diff --git a/configure b/configure index bcc5f6ec72..2671b5a02b 100755 --- a/configure +++ b/configure @@ -5318,19 +5318,6 @@ VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD} SAMPLES:=${samples:-\$(LIBAV_SAMPLES)} 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") - eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO - eval echo "${lcname}_VERSION=\$${name}_VERSION" >> avbuild/config.mak - eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> avbuild/config.mak - eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> avbuild/config.mak -} - -map 'get_version $v' $LIBRARY_LIST - map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> avbuild/config.mak' $LIBRARY_LIST print_program_extralibs(){ -- cgit v1.2.3 From 92db5083077a8b0f8e1050507671b456fd155125 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 20 Dec 2016 14:27:19 +0100 Subject: build: Generate pkg-config files from Make and not from configure This moves work from the configure to the Make stage where it can be parallelized and ensures that pkgconfig files are updated when library versions change. Bug-Id: 449 --- configure | 67 +++++++++++++++++++++------------------------------------------ 1 file changed, 22 insertions(+), 45 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 2671b5a02b..8e402383d8 100755 --- a/configure +++ b/configure @@ -5402,52 +5402,29 @@ lib_version(){ eval printf "\"lib${1} >= \$LIB$(toupper ${1})_VERSION, \"" } -pkgconfig_generate(){ - name=$1 - shortname=${name#lib} - 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 < $name/$name.pc +cat > avbuild/config.sh < $name/$name-uninstalled.pc -prefix= -exec_prefix= -libdir=\${pcfiledir} -includedir=${source_path} - -Name: $name -Description: $comment -Version: $version -Requires: $requires -Conflicts: -Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs -Cflags: -I\${includedir} -EOF -} - -pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBRT $LIBM" -pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" -pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" -pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" -pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" -pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$LIBM" -pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" -- cgit v1.2.3