1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/harfbuzz/src/check-internal-symbols.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +LC_ALL=C 1.7 +export LC_ALL 1.8 + 1.9 +test -z "$srcdir" && srcdir=. 1.10 +stat=0 1.11 + 1.12 + 1.13 +if which nm 2>/dev/null >/dev/null; then 1.14 + : 1.15 +else 1.16 + echo "check-internal-symbols.sh: 'nm' not found; skipping test" 1.17 + exit 77 1.18 +fi 1.19 + 1.20 +tested=false 1.21 +for suffix in .so; do 1.22 + so=`echo .libs/libharfbuzz$suffix` 1.23 + if test -f "$so"; then 1.24 + echo "Checking that we are not exposing internal symbols" 1.25 + 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 1.26 + echo "Ouch, internal symbols exposed" 1.27 + stat=1 1.28 + fi 1.29 + tested=true 1.30 + fi 1.31 +done 1.32 +if ! $tested; then 1.33 + echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test" 1.34 + exit 77 1.35 +fi 1.36 + 1.37 +exit $stat