diff options
author | James Almer <jamrial@gmail.com> | 2017-05-04 19:59:30 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-05-04 19:59:30 -0300 |
commit | 6fdd35a3126f6ecbe4ebab12bdf8867e4f544958 (patch) | |
tree | 7e0a89ba5a5e99377ec5461e9946ff1a0003a545 /ffbuild/libversion.sh | |
parent | c0f17a905f3588bf61ba6d86a83c6835d431ed3d (diff) | |
parent | 92db5083077a8b0f8e1050507671b456fd155125 (diff) | |
download | ffmpeg-6fdd35a3126f6ecbe4ebab12bdf8867e4f544958.tar.gz |
Merge commit '92db5083077a8b0f8e1050507671b456fd155125'
* commit '92db5083077a8b0f8e1050507671b456fd155125':
build: Generate pkg-config files from Make and not from configure
build: Store library version numbers in .version files
Includes cherry-picked commits 8a34f3659371680ca523aecfd9098c28f0f809eb and
ee164727dd64c199b87118917e674b17c25e0da3 to fix issues.
Changes were also made to retain support for raise_major and build_suffix.
Reviewed-by: ubitux
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'ffbuild/libversion.sh')
-rwxr-xr-x | ffbuild/libversion.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ffbuild/libversion.sh b/ffbuild/libversion.sh new file mode 100755 index 0000000000..687adf28bc --- /dev/null +++ b/ffbuild/libversion.sh @@ -0,0 +1,15 @@ +toupper(){ + echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ +} + +name=lib$1 +ucname=$(toupper ${name}) +file=$2 +raise_major=$3 + +eval $(awk "/#define ${ucname}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file") +eval ${ucname}_VERSION_MAJOR=$((${ucname}_VERSION_MAJOR+${raise_major})) +eval ${ucname}_VERSION=\$${ucname}_VERSION_MAJOR.\$${ucname}_VERSION_MINOR.\$${ucname}_VERSION_MICRO +eval echo "${name}_VERSION=\$${ucname}_VERSION" +eval echo "${name}_VERSION_MAJOR=\$${ucname}_VERSION_MAJOR" +eval echo "${name}_VERSION_MINOR=\$${ucname}_VERSION_MINOR" |