From: Leonardo Florez Date: Thu, 28 Apr 2016 14:45:04 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~171 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9da4f57bdd881e550ec47323313b63f387ce2f74;p=cpPlugins.git ... --- diff --git a/third_party_installers/cpPlugins_Install_QT4.sh b/third_party_installers/cpPlugins_Install_QT4.sh index 76fddde..b8da668 100755 --- a/third_party_installers/cpPlugins_Install_QT4.sh +++ b/third_party_installers/cpPlugins_Install_QT4.sh @@ -22,8 +22,12 @@ function abspath() number_of_processes="-j4" platform=`uname` particular_options="" +patch_file="" if [ "$platform" == "Darwin" ]; then particular_options=-no-framework + bash_path=`abspath $0` + bash_dir=`dirname $bash_path` + patch_file=$bash_dir/qt-4.8.6.patch fi ## Check input parameters and process inputs (if needed) @@ -73,6 +77,14 @@ else echo "Usage: [qt4_package] or [qt4_source_dir qt4_build_dir] [build_type]" fi +# Apply patch +if [ "x$patch_file" != "x" ]; then + echo -n "Applying patch... " + cd $source_dir + patch -p0 < $patch_file + echo "done." +fi + echo "Given source dir : \"$source_dir\"" echo "Given build dir : \"$build_dir\"" diff --git a/third_party_installers/cpPlugins_Install_VTK.sh b/third_party_installers/cpPlugins_Install_VTK.sh index d5e9958..32297fe 100755 --- a/third_party_installers/cpPlugins_Install_VTK.sh +++ b/third_party_installers/cpPlugins_Install_VTK.sh @@ -41,19 +41,19 @@ if [ ! -x $cmake_exec ]; then exit 1 fi -## Locate qmake executable +# Locate qmake executable qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin") qmake_exec="" for loc in ${qmake_locations[@]}; do qmake_file="$loc/qmake" if [ -x $qmake_file ]; then - str=`$qmake_file --version | grep Using\ Qt\ version` - version=`expr substr "$str" 18 3` - if [ "$version" == "4.8" ]; then + version=`$qmake_file --version | grep Using\ Qt\ version | cut -d ' ' -f 4` + if [ "${version:0:3}" == "4.8" ]; then qmake_exec=$qmake_file fi fi done + if [ ! -x $qmake_exec ]; then echo "$0: modify this script to put the correct location of qmake." exit 1 diff --git a/third_party_installers/qt-4.8.6.patch b/third_party_installers/qt-4.8.6.patch new file mode 100644 index 0000000..f0d2122 --- /dev/null +++ b/third_party_installers/qt-4.8.6.patch @@ -0,0 +1,18 @@ +--- src/gui/painting/qpaintengine_mac.cpp.orig 2015-05-07 14:14:43.000000000 +0000 ++++ src/gui/painting/qpaintengine_mac.cpp +@@ -340,13 +340,7 @@ CGColorSpaceRef QCoreGraphicsPaintEngine + } + + // Get the color space from the display profile. +- CGColorSpaceRef colorSpace = 0; +- CMProfileRef displayProfile = 0; +- CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile); +- if (err == noErr) { +- colorSpace = CGColorSpaceCreateWithPlatformColorSpace(displayProfile); +- CMCloseProfile(displayProfile); +- } ++ CGColorSpaceRef colorSpace = CGDisplayCopyColorSpace(displayID); + + // Fallback: use generic DeviceRGB + if (colorSpace == 0) +