Qt 4.8.6 を El Capitan でソースからコンパイルするメモ。

 

https://download.qt.io/archive/qt/4.8/4.8.6/

から

qt-everywhere-opensource-src-4.8.6.tgz 

をダウンロードする。

オプションは適宜だが、今回は以下のようにした。

 

$./configure -prefix /opt -release -opensource -confirm-license -no-qt3support -no-phonon -no-phonon-backend -no-scripttools

 

$make

 

この後、

painting/qpaintengine_mac.cpp:345:19: error: use of undeclared identifier 'CMGetProfileByAVID'
    CMError err = CMGetProfileByAVID((CMDisplayIDType)displayID, &displayProfile);
                  ^
painting/qpaintengine_mac.cpp:348:9: error: use of undeclared identifier 'CMCloseProfile'
        CMCloseProfile(displayProfile);
        ^

 

というエラーが出たときは、以下のパッチを当てて、再度 make。

 

--- a/src/gui/painting/qpaintengine_mac.cpp    2015-05-07 07:14:43.000000000 -0700
+++ b/src/gui/painting/qpaintengine_mac.cpp    2015-07-06 18:07:52.000000000 -0700
@@ -340,13 +340,7 @@
     }
 
     // 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)
Sign up for free

 

 

 

Qt 5.7 をコンパイルするメモ。

 

ソースは git://code.qt.io/qt/qt5.git から git repository を clone。

 

$git checkout v5.7.0

 

オプションは適宜だが、今回は以下のようにした。

 

$./configure   -confirm-license  -opensource -release -prefix $OPTDIR -no-xinput2 -no-gstreamer -qt-libpng 

 

$make 

$make install