qsv: align surface width/height to 16.
[ffmpeg.git] / avbuild / pkgconfig_generate.sh
1 #!/bin/sh
2
3 . avbuild/config.sh
4
5 if test "$shared" = "yes"; then
6     shared=true
7 else
8     shared=false
9 fi
10
11 shortname=$1
12 name=lib${shortname}
13 comment=$2
14 libs=$(eval echo \$extralibs_${shortname})
15 deps=$(eval echo \$${shortname}_deps)
16
17 for dep in $deps; do
18     depname=lib${dep}
19     . ${depname}/${depname}.version
20     depversion=$(eval echo \$${depname}_VERSION)
21     requires="$requires ${depname} >= ${depversion}, "
22 done
23
24 requires=${requires%, }
25
26 version=$(grep ${name}_VERSION= $name/${name}.version | cut -d= -f2)
27
28 cat <<EOF > $name/$name.pc
29 prefix=$prefix
30 exec_prefix=\${prefix}
31 libdir=$libdir
32 includedir=$incdir
33
34 Name: $name
35 Description: $comment
36 Version: $version
37 Requires: $($shared || echo $requires)
38 Requires.private: $($shared && echo $requires)
39 Conflicts:
40 Libs: -L\${libdir} -l${shortname} $($shared || echo $libs)
41 Libs.private: $($shared && echo $libs)
42 Cflags: -I\${includedir}
43 EOF
44
45 cat <<EOF > $name/$name-uninstalled.pc
46 prefix=
47 exec_prefix=
48 libdir=\${pcfiledir}
49 includedir=${source_path}
50
51 Name: $name
52 Description: $comment
53 Version: $version
54 Requires: $requires
55 Conflicts:
56 Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
57 Cflags: -I\${includedir}
58 EOF