File: check.defs

package info (click to toggle)
pango1.0 1.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,380 kB
  • sloc: ansic: 54,775; sh: 11,224; makefile: 1,665; cpp: 966; perl: 138; xml: 44
file content (30 lines) | stat: -rwxr-xr-x 640 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

LC_ALL=C
export LC_ALL

test -z "$srcdir" && srcdir=.
status=0

get_pango_syms='nm "$so" | grep " T " | cut -d" " -f3'
if [ "`uname -s`" = "Linux" ]; then
	get_pango_syms='objdump -t "$so" | sed -n "/.*g *F *\.\(opd\|text\).* \(.*pango_.*\)$/s//\2/p"'
fi

for def in $srcdir/*.def; do
	lib=${def%.def}
	lib=${lib##*/}
	so=.libs/lib${lib}-1.0.so

	test -f "$so" || continue
	echo Checking $def

	expected=$lib.expected
	list=$lib.list
	eval $get_pango_syms | sort -u > "$expected"
	cut -f 2 "$def" | grep -v EXPORTS | sort -u > "$list"

	diff -u "$list" "$expected" >&2 && rm -f "$list" "$expected" || status=1
done

exit $status