Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
1 #!/bin/sh
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 # arguments:
7 # 1: full path to DIST/OBJDIR (parent dir of "lib")
8 # 2: full path to shlibsign executable (DIST/OBJDIR/bin)
9 # 3: OS_TARGET
10 # 4: full path to DIST/OBJDIR/lib
11 # 5: full path to library that is to be signed
13 case "${3}" in
14 WIN*)
15 if echo "${PATH}" | grep -c \; >/dev/null; then
16 PATH=${1}/lib\;${1}/bin\;${4}\;${PATH}
17 else
18 # ARG1 is ${1} with the drive letter escaped.
19 if echo "${1}" | grep -c : >/dev/null; then
20 ARG1=`(cd ${1}; pwd)`
21 else
22 ARG1=${1}
23 fi
24 if echo "${4}" | grep -c : >/dev/null; then
25 ARG4=`(cd ${4}; pwd)`
26 else
27 ARG4=${4}
28 fi
29 PATH=${ARG1}/lib:${ARG1}/bin:${ARG4}:${PATH}
30 fi
31 export PATH
32 echo "${2}"/shlibsign -v -i "${5}"
33 "${2}"/shlibsign -v -i "${5}"
34 ;;
35 *)
36 LIBPATH=`(cd "${1}"/lib; pwd)`:`(cd "${4}"; pwd)`:$LIBPATH
37 export LIBPATH
38 SHLIB_PATH=${1}/lib:${4}:$SHLIB_PATH
39 export SHLIB_PATH
40 LD_LIBRARY_PATH=${1}/lib:${4}:$LD_LIBRARY_PATH
41 export LD_LIBRARY_PATH
42 DYLD_LIBRARY_PATH=${1}/lib:${4}:$DYLD_LIBRARY_PATH
43 export DYLD_LIBRARY_PATH
44 LIBRARY_PATH=${1}/lib:${4}:$LIBRARY_PATH
45 export LIBRARY_PATH
46 ADDON_PATH=${1}/lib:${4}:$ADDON_PATH
47 export ADDON_PATH
48 echo "${2}"/shlibsign -v -i "${5}"
49 "${2}"/shlibsign -v -i "${5}"
50 ;;
51 esac