Skip to content

Commit

Permalink
qt5-qtmultimedia: build on Mac OS X 10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusCalhoun-Lopez committed Dec 28, 2016
1 parent 1c13818 commit ec39a5a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aqua/qt5/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,14 @@ foreach {module module_info} [array get modules] {
# https://codereview.qt-project.org/#/c/172619/
patchfiles-append patch-qtconn-for-10.12.diff
}

# special case
if { ${module} eq "qtmultimedia" } {
if { [vercmp ${os.version} 12] < 0} {
# see https://trac.macports.org/ticket/52922
patchfiles-append patch-firstObject.diff
}
}
}
}

Expand Down
15 changes: 15 additions & 0 deletions aqua/qt5/files/patch-firstObject.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- src/plugins/avfoundation/camera/avfcamerautility.mm.orig 2016-09-12 03:58:51.000000000 -0700
+++ src/plugins/avfoundation/camera/avfcamerautility.mm 2016-12-28 09:44:52.000000000 -0700
@@ -42,6 +42,12 @@
#include <algorithm>
#include <limits>

+// see https://trac.macports.org/ticket/52922
+// from the 10.9 SDK
+@interface NSArray (MacPortsCompatibilityFirstObject)
+- (id)firstObject NS_AVAILABLE(10_6, 4_0);
+@end
+
QT_BEGIN_NAMESPACE

AVFPSRange qt_connection_framerates(AVCaptureConnection *videoConnection)

0 comments on commit ec39a5a

Please sign in to comment.