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)
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\""
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
--- /dev/null
+--- 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)
+