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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rwxr-xr-x

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 #!/bin/sh
     3 LC_ALL=C
     4 export LC_ALL
     6 test -z "$srcdir" && srcdir=.
     7 stat=0
    10 if which nm 2>/dev/null >/dev/null; then
    11 	:
    12 else
    13 	echo "check-internal-symbols.sh: 'nm' not found; skipping test"
    14 	exit 77
    15 fi
    17 tested=false
    18 for suffix in .so; do
    19 	so=`echo .libs/libharfbuzz$suffix`
    20 	if test -f "$so"; then
    21 		echo "Checking that we are not exposing internal symbols"
    22 		if nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' T _fini\>\| T _init\>\| T hb_\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>'; then
    23 			echo "Ouch, internal symbols exposed"
    24 			stat=1
    25 		fi
    26 		tested=true
    27 	fi
    28 done
    29 if ! $tested; then
    30 	echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
    31 	exit 77
    32 fi
    34 exit $stat

mercurial