gfx/harfbuzz/src/check-exported-symbols.sh

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 #!/bin/sh
michael@0 2
michael@0 3 LC_ALL=C
michael@0 4 export LC_ALL
michael@0 5
michael@0 6 test -z "$srcdir" && srcdir=.
michael@0 7 test -z "$MAKE" && MAKE=make
michael@0 8 stat=0
michael@0 9
michael@0 10 if which nm 2>/dev/null >/dev/null; then
michael@0 11 :
michael@0 12 else
michael@0 13 echo "check-exported-symbols.sh: 'nm' not found; skipping test"
michael@0 14 exit 77
michael@0 15 fi
michael@0 16
michael@0 17 defs="harfbuzz.def"
michael@0 18 $MAKE $defs > /dev/null
michael@0 19 tested=false
michael@0 20 for def in $defs; do
michael@0 21 lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'`
michael@0 22 so=.libs/lib${lib}.so
michael@0 23 if test -f "$so"; then
michael@0 24 echo "Checking that $so has the same symbol list as $def"
michael@0 25 {
michael@0 26 echo EXPORTS
michael@0 27 nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' T _fini\>\| T _init\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>' | cut -d' ' -f3
michael@0 28 stat=1
michael@0 29 # cheat: copy the last line from the def file!
michael@0 30 tail -n1 "$def"
michael@0 31 } | diff "$def" - >&2 || stat=1
michael@0 32 tested=true
michael@0 33 fi
michael@0 34 done
michael@0 35 if ! $tested; then
michael@0 36 echo "check-exported-symbols.sh: libharfbuzz shared library not found; skipping test"
michael@0 37 exit 77
michael@0 38 fi
michael@0 39
michael@0 40 exit $stat

mercurial