forked from zoltan-ongithub/FFmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 8a34f36 and ee16472 to fix issues. Changes were also made to retain support for raise_major and build_suffix. Reviewed-by: ubitux Merged-by: James Almer <[email protected]>
- Loading branch information
Showing
16 changed files
with
129 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/config.fate | ||
/config.log | ||
/config.mak | ||
/config.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/sh | ||
|
||
. ffbuild/config.sh | ||
|
||
if test "$shared" = "yes"; then | ||
shared=true | ||
else | ||
shared=false | ||
fi | ||
|
||
shortname=$1 | ||
name=lib${shortname} | ||
fullname=${name}${build_suffix} | ||
comment=$2 | ||
libs=$(eval echo \$extralibs_${shortname}) | ||
deps=$(eval echo \$${shortname}_deps) | ||
|
||
for dep in $deps; do | ||
depname=lib${dep} | ||
fulldepname=${depname}${build_suffix} | ||
. ${depname}/${depname}.version | ||
depversion=$(eval echo \$${depname}_VERSION) | ||
requires="$requires ${fulldepname} >= ${depversion}, " | ||
done | ||
requires=${requires%, } | ||
|
||
version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2) | ||
|
||
cat <<EOF > $name/$fullname.pc | ||
prefix=$prefix | ||
exec_prefix=\${prefix} | ||
libdir=$libdir | ||
includedir=$incdir | ||
Name: $fullname | ||
Description: $comment | ||
Version: $version | ||
Requires: $($shared || echo $requires) | ||
Requires.private: $($shared && echo $requires) | ||
Conflicts: | ||
Libs: -L\${libdir} $rpath -l${fullname#lib} $($shared || echo $libs) | ||
Libs.private: $($shared && echo $libs) | ||
Cflags: -I\${includedir} | ||
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=${source_path} | ||
Name: $fullname | ||
Description: $comment | ||
Version: $version | ||
Requires: $requires | ||
Conflicts: | ||
Libs: -L\${libdir} -Wl,-rpath,\${libdir} -l${fullname#lib} $($shared || echo $libs) | ||
Cflags: -I\${includedir} | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
NAME = avresample | ||
DESC = Libav audio resampling library | ||
|
||
HEADERS = avresample.h \ | ||
version.h \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters