summaryrefslogtreecommitdiff
path: root/package/build.macos-64
diff options
context:
space:
mode:
authorSeokYeon Hwang <syeon.hwang@samsung.com>2015-10-21 16:49:22 +0900
committerSeokYeon Hwang <syeon.hwang@samsung.com>2015-10-23 16:21:07 +0900
commitade42febcc032fe1032f10c9aac37d5557e743c9 (patch)
treef597557a194eda34fa909690c7964f6c2df396a8 /package/build.macos-64
parent54682f08170b0d8a0969efcbf6f1097c501d9d26 (diff)
downloadqemu-ade42febcc032fe1032f10c9aac37d5557e743c9.tar.gz
qemu-ade42febcc032fe1032f10c9aac37d5557e743c9.tar.bz2
qemu-ade42febcc032fe1032f10c9aac37d5557e743c9.zip
build: clean DIBS build scripts up
Specific operations for MacOS move to macos-64 script. Routines checking whether TARGET_OS is valid or not is added. Change-Id: I7aadff447dcd7e7cbe6f55de9f4f6f319c21c2f3 Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Diffstat (limited to 'package/build.macos-64')
-rwxr-xr-xpackage/build.macos-6437
1 files changed, 35 insertions, 2 deletions
diff --git a/package/build.macos-64 b/package/build.macos-64
index 3d1f7c85da..a3c38286a9 100755
--- a/package/build.macos-64
+++ b/package/build.macos-64
@@ -1,8 +1,11 @@
-#!/bin/bash -xe
+#!/bin/sh -xe
# check build environment
prepare()
{
- echo "nothing to do"
+ if [ "${TARGET_OS}" != "macos-64" ]
+ then
+ exit 1
+ fi
}
# clean
@@ -23,4 +26,34 @@ install()
{
. $SRCDIR/package/build.common
install_common
+
+ EMULATOR_BIN_DIR=$EMULATOR_X86_DIR/emulator/bin
+
+ # change loading path of dynamic shared libraries on MAC OS X
+ if [ "${TARGET_OS}" = "macos-64" ]; then
+ LIB_LIST="libgthread-2.0.0.dylib libglib-2.0.0.dylib libintl.8.dylib libgcc_s.1.dylib libz.1.dylib libcurl.4.dylib libgcc_s.1.dylib libcurl.4.dylib libx264.142.dylib libncurses.5.dylib libpixman-1.0.dylib libpng16.16.dylib QtOpenGL QtWidgets QtGui QtCore"
+ BIN_ARR=( emulator-x86_64 qt5_msgbox )
+ for bin in ${BIN_ARR[@]}; do
+ LIB_ARR=( $(otool -L ${EMULATOR_BIN_DIR}/$bin | awk '/\opt\/local\/lib/ { split($1, lib, "/"); print lib[5]}') )
+ for lib in ${LIB_ARR[@]}; do
+ [[ $LIB_LIST =~ $lib ]] && IS_LIB=true || IS_LIB=false
+ if [ "$IS_LIB" == "true" ] ; then
+ install_name_tool -change /opt/local/lib/$lib @loader_path/$lib ${EMULATOR_BIN_DIR}/$bin
+ echo "$bin: the loading path of $lib is changed."
+ else
+ echo "$bin: $lib does not exist in the loading path."
+ fi
+ done
+ LIB_ARR=( $(otool -L ${EMULATOR_BIN_DIR}/$bin | awk '/\opt\/local\/Library/ { split($1, lib, "/"); print lib[9]}') )
+ for lib in ${LIB_ARR[@]}; do
+ [[ $LIB_LIST =~ $lib ]] && IS_LIB=true || IS_LIB=false
+ if [ "$IS_LIB" == "true" ] ; then
+ install_name_tool -change /opt/local/Library/Frameworks/$lib.framework/Versions/5/$lib @loader_path/$lib ${EMULATOR_BIN_DIR}/$bin
+ echo "$bin: the loading path of $lib is changed."
+ else
+ echo "$bin: $lib does not exist in the loading path."
+ fi
+ done
+ done
+ fi
}