Ticket #54754: macports_qt5-qtbase_fix-bug-54754.diff

File macports_qt5-qtbase_fix-bug-54754.diff, 2.9 KB (added by bertrandrustle (Bertrand Rustle), 7 years ago)

Portfile patch incorporating the patch from upstream. Applying this in a local repo copy of the port directory fixes the build.

  • Portfile

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/aqua/qt5/Portfile ./Portfile
    old new  
    714714                }
    715715            }
    716716
     717            # https://codereview.qt-project.org/#/c/201546/
     718            patchfiles-append patch-undeclared_identifiers.diff
     719
    717720            # https://codereview.qt-project.org/#/c/141654/
    718721            patchfiles-append patch-add_sdk.diff
    719722
  • files/patch-undeclared_identifiers.diff

    diff -urN /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/aqua/qt5/files/patch-undeclared_identifiers.diff ./files/patch-undeclared_identifiers.diff
    old new  
     1--- src/gui/painting/qcoregraphics.mm.orig      2017-01-18 06:20:58.000000000 -0800
     2+++ src/gui/painting/qcoregraphics.mm   2017-09-29 03:08:59.497115152 -0700
     3@@ -65,17 +65,8 @@
     4                               image.bytesPerLine(), dataProvider, NULL, false);
     5 }
     6 
     7-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
     8+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
     9 {
     10-    // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev)
     11-    OSStatus err = noErr;
     12-
     13-#ifdef Q_OS_MACOS
     14-    require_action(inContext != NULL, InvalidContext, err = paramErr);
     15-    require_action(inBounds != NULL, InvalidBounds, err = paramErr);
     16-    require_action(inImage != NULL, InvalidImage, err = paramErr);
     17-#endif
     18-
     19     CGContextSaveGState( inContext );
     20     CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds));
     21     CGContextScaleCTM(inContext, 1, -1);
     22@@ -83,13 +74,6 @@
     23     CGContextDrawImage(inContext, *inBounds, inImage);
     24 
     25     CGContextRestoreGState(inContext);
     26-
     27-#ifdef Q_OS_MACOS
     28-InvalidImage:
     29-InvalidBounds:
     30-InvalidContext:
     31-#endif
     32-    return err;
     33 }
     34 
     35 QImage qt_mac_toQImage(CGImageRef image)
     36--- src/gui/painting/qcoregraphics_p.h.orig     2017-01-18 06:20:58.000000000 -0800
     37+++ src/gui/painting/qcoregraphics_p.h  2017-09-29 03:08:59.497439616 -0700
     38@@ -65,7 +65,7 @@
     39 Q_GUI_EXPORT CGImageRef qt_mac_toCGImageMask(const QImage &qImage);
     40 Q_GUI_EXPORT QImage qt_mac_toQImage(CGImageRef image);
     41 
     42-Q_GUI_EXPORT OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
     43+Q_GUI_EXPORT void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage);
     44 
     45 Q_GUI_EXPORT CGColorSpaceRef qt_mac_genericColorSpace();
     46 Q_GUI_EXPORT CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice);