]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez <leonardo@iMac-de-Andrea.local>
Thu, 28 Apr 2016 14:45:04 +0000 (09:45 -0500)
committerLeonardo Florez <leonardo@iMac-de-Andrea.local>
Thu, 28 Apr 2016 14:45:04 +0000 (09:45 -0500)
third_party_installers/cpPlugins_Install_QT4.sh
third_party_installers/cpPlugins_Install_VTK.sh
third_party_installers/qt-4.8.6.patch [new file with mode: 0644]

index 76fdddeccf9183ec4b71b77e14e13a3ec162d30d..b8da6680a7287d458ae6933f95aea1e5fa8b4dd4 100755 (executable)
@@ -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\""
 
index d5e99585709c8d9198205c3d286b96cd0a046a5a..32297fe2678d061546280c15a25f31a43c6fc306 100755 (executable)
@@ -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 (file)
index 0000000..f0d2122
--- /dev/null
@@ -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)
+