RJVB / macstrop

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection, including a set of KF5 ports.
20 stars 9 forks source link

qt4-mac-devel: patch to qfontengine_coretext.mm breaks the build against 10.5.8 SDK #103

Open barracuda156 opened 4 months ago

barracuda156 commented 4 months ago

@RJVB This is a specific error, since the patched source differs here from qt4-mac port:

:info:build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/text/qfontengine_coretext.mm: In member function ‘void QCoreTextFontEngine::init()’:
:info:build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/text/qfontengine_coretext.mm:546: error: ‘kCTFontColorGlyphsTrait’ was not declared in this scope
:info:build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/text/qfontengine_coretext.mm: In member function ‘QImage QCoreTextFontEngine::imageForGlyph(glyph_t, QFixed, int, bool)’:
:info:build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/text/qfontengine_coretext.mm:872: error: ‘CTFontDrawGlyphs’ was not declared in this scope
:info:build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/text/qfontengine_coretext.mm: At global scope:
:info:build /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/text/qfontengine_coretext.mm:914: error: no ‘QImage QCoreTextFontEngine::bitmapForGlyph(glyph_t, QFixed, const QTransform&)’ member function declared in class ‘QCoreTextFontEngine’
:info:build /usr/bin/g++-4.2 -c -pipe -O2 -arch ppc -arch ppc -Xarch_ppc -mmacosx-version-min=10.5 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -isysroot /Developer/SDKs/MacOSX10.5.sdk -DQT_SHARED -DNDEBUG -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_NO_CUPS -DQT_NO_LPR -DQT_NO_OPENTYPE -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQT_NO_STYLE_S60 -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/mkspecs/macx-g++ -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui -I.moc/release-shared -I../../include/QtGui -I.rcc/release-shared -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/image -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/3rdparty/harfbuzz/src -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/dialogs -I../../include/QtCore -I../../include -I.uic/release-shared -I. -F/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/build/Library/Frameworks -F/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/build/lib -o .obj/release-shared/qcocoamenu_mac.o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.7/src/gui/widgets/qcocoamenu_mac.mm
:info:build make[1]: *** [.obj/release-shared/qfontengine_coretext.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....

P. S. I build against 10.5 SDK, since it does not want to build against 10a190 SDK correctly. This is the same fix we use in qt4-mac.

RJVB commented 4 months ago

It looks like those are the changes introduced by patch-font-emojis.diff, which is really one of the least important patches, except in applications like Kontact if you often get emails with emojis.

So there are 2 options here. Either you reverse the patch, or you help me adapt it to pre-10.6 OS/SDK builds (and I'm even suspicious about the 2nd error you flagged).

If you want to spend some time on it, you could

barracuda156 commented 4 months ago

I think it makes sense first do build without that patch, to see how it works in general and whether some ports which are now broken get fixed. Then later on it can be improved, with adapting patches etc. Rebuilding Qt4 alone is not a big deal.

RJVB commented 4 months ago

As you wish, but in this case the changes to the patch are really minimal.

Weird that Qt4 doesn't build against the 10.6 SDK; I guess that's a PPC issue?

barracuda156 commented 4 months ago

Weird that Qt4 doesn't build against the 10.6 SDK; I guess that's a PPC issue?

I am sure it builds, the issue is that 10.6 ppc (10a190) is not exactly 10.6 SDK, since it is a rather early development build. There are some differences, of varying degree of potential to cause issues. A few of those are actual bugs, most are just differences, but in result SDK is not exactly what third-party apps expect. In 90% of cases that does not matter and everything works fine. In some cases it is trivially adjustable. For some, rather rare issues, I have no solution, as of now.

Last time I tried to build Qt4 against 10.6 SDK on PPC, it worked, but then apps built with that Qt4 crashed. It is likely that it can be fixed, but I just gave up back then, since potential benefits aren’t obvious.

Now, against 10.6.8 SDK it should build fine, and that makes sense as an improvement, but we got DNS broken on 10.6.8 on powerpc at the moment. So I only built gcc there, but not normal end-user ports.