<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[128036] trunk/dports/multimedia/mpv</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/128036">128036</a></dd>
<dt>Author</dt> <dd>ionic@macports.org</dd>
<dt>Date</dt> <dd>2014-11-11 10:04:03 -0800 (Tue, 11 Nov 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>mpv: add patches required to build on 10.6. compiles, but doesn't yet work as intended at run time.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsmultimediampvPortfile">trunk/dports/multimedia/mpv/Portfile</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_gl_commonhuseOpenGLlegacydiff">trunk/dports/multimedia/mpv/files/patch-video_out_gl_common.h-use-OpenGL-legacy.diff</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportsmultimediampvfilespatchaudio_out_ao_coreaudio_deviceccompilefixdiff">trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_device.c-compile-fix.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchmiscaddstrnlendiff">trunk/dports/multimedia/mpv/files/patch-misc-add-strnlen.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchosdep_macosx_compatmaddsubscriptingimplementationdiff">trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmdefineconstantsdiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmusedeprecatedColorSyncfunctionsdiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewhremoveNSDraggingDestinationprotocoldiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.h-remove-NSDraggingDestination-protocol.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewmreplaceconvertPointToBackingwithuserSpaceScaleFactordiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewmreplaceconvertRectFromScreenwithconvertScreenToBasediff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewmreplaceconvertRectToBackingwithuserSpaceScaleFactordiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_cocoa_windowmfullscreenfixesdiff">trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchvideo_out_gl_cocoachardcodeOpenGL2diff">trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff</a></li>
<li><a href="#trunkdportsmultimediampvfilespatchwaftools_checks_custompydisablelibarclitediff">trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsmultimediampvPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/Portfile (128035 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/Portfile        2014-11-11 12:16:41 UTC (rev 128035)
+++ trunk/dports/multimedia/mpv/Portfile        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
</span><del>-# $Id$
</del><ins>+# $Id: Portfile 125490 2014-09-18 20:46:07Z devans@macports.org $
</ins><span class="cx">
</span><span class="cx"> PortSystem 1.0
</span><span class="cx"> PortGroup github 1.0
</span><span class="lines">@@ -141,6 +141,33 @@
</span><span class="cx"> Consult ``man mpv'' for further information.
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+ # Versions 10.6 and below don't support XCode 4, which is required for ARCLite.
+ # We will have to patch mpv for unofficial Cocoa support.
+ # Also fix some other minor compile issues only manifesting on 10.6 and below along the way.
+ if {${os.major} < 11} {
+ patchfiles-append patch-waftools_checks_custom.py-disable-libarclite.diff \
+ patch-misc-add-strnlen.diff \
+ patch-audio_out_ao_coreaudio_device.c-compile-fix.diff \
+ patch-video_out_cocoa_view.h-remove-NSDraggingDestination-protocol.diff \
+ patch-video_out_cocoa_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff \
+ patch-video_out_cocoa_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff \
+ patch-video_out_cocoa_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff \
+ patch-video_out_cocoa_window.m-fullscreen-fixes.diff \
+ patch-video_out_cocoa_common.m-define-constants.diff \
+ patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff \
+ patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff \
+ patch-osdep_macosx_compat.m-add-subscripting-implementation.diff
+
+ notes-append {
+ On systems older than Lion (10.7), Cocoa output support is currently
+ being patched by the MacPorts maintainer to make it work.
+
+ It is known to be broken.
+
+ Please do not expect it to work or be bug free.
+ }
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchaudio_out_ao_coreaudio_deviceccompilefixdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_device.c-compile-fix.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_device.c-compile-fix.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_device.c-compile-fix.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- audio/out/ao_coreaudio_device.c.old
++++ audio/out/ao_coreaudio_device.c
+@@ -35,6 +35,8 @@
+ * when you are wanting to do good buffering of audio).
+ */
+
++#include <unistd.h>
++
+ #include "config.h"
+ #include "ao.h"
+ #include "internal.h"
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchmiscaddstrnlendiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-misc-add-strnlen.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-misc-add-strnlen.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-misc-add-strnlen.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+--- common/common.h.old
++++ common/common.h
+@@ -26,6 +26,7 @@
+
+ #include "osdep/compiler.h"
+ #include "talloc.h"
++#include "common/compat.h"
+
+ // double should be able to represent this exactly
+ #define MP_NOPTS_VALUE (-0x1p+63)
+--- common/compat.h.old
++++ common/compat.h
+@@ -0,0 +1,19 @@
++#ifndef COMPAT_H
++#define COMPAT_H
++
++#include <stddef.h>
++#include <errno.h>
++
++static inline size_t strnlen(const char *s, size_t maxlen) {
++ int result = 0;
++
++ if (s != NULL) {
++ const char *iter = s;
++ while ((result < maxlen) && ((*(iter++)) != 0))
++ ++result;
++ }
++
++ return (result);
++}
++
++#endif /* !defined (COMPAT_H) */
+--- ta/ta.h.old
++++ ta/ta.h
+@@ -18,6 +18,8 @@
+ #include <stdbool.h>
+ #include <stdarg.h>
+
++#include "common/compat.h"
++
+ #ifdef __GNUC__
+ #define TA_PRF(a1, a2) __attribute__ ((format(printf, a1, a2)))
+ #define TA_TYPEOF(t) __typeof__(t)
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchosdep_macosx_compatmaddsubscriptingimplementationdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+--- osdep/macosx_compat.m.old
++++ osdep/macosx_compat.m
+@@ -0,0 +1,54 @@
++/*
++ * This file is part of mpv.
++ *
++ * mpv is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * mpv is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with mpv; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++#include "osdep/macosx_compat.h"
++
++#if (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8)
++
++@implementation NSArray (SubscriptingAdditions)
++- (id)objectAtIndexedSubscript:(NSUInteger)index
++{
++ return [self objectAtIndex:index];
++}
++@end
++
++@implementation NSMutableArray (SubscriptingAdditions)
++- (void)setObject:(id)object atIndexedSubscript:(NSUInteger)index
++{
++ if (index == [self count])
++ [self addObject:object];
++ else
++ [self replaceObjectAtIndex:index withObject:object];
++}
++@end
++
++@implementation NSDictionary (SubscriptingAdditions)
++- (id)objectForKeyedSubscript:(id)key
++{
++ return [self objectForKey:key];
++}
++@end
++
++@implementation NSMutableDictionary (SubscriptingAdditions)
++- (void)setObject:(id)object forKeyedSubscript:(id)key
++{
++ [self setObject:object forKey:key];
++}
++@end
++
++#endif
+--- wscript_build.py.old
++++ wscript_build.py
+@@ -385,6 +385,7 @@
+ ( "osdep/ar/HIDRemote.m", "cocoa" ),
+ ( "osdep/macosx_application.m", "cocoa-application" ),
+ ( "osdep/macosx_events.m", "cocoa" ),
++ ( "osdep/macosx_compat.m" ),
+ ( "osdep/semaphore_osx.c" ),
+ ( "osdep/path-macosx.m", "cocoa" ),
+ ( "osdep/path-win.c", "os-win32" ),
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmdefineconstantsdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+--- video/out/cocoa_common.m.old
++++ video/out/cocoa_common.m
+@@ -48,6 +48,14 @@
+
+ #define CF_RELEASE(a) if ((a) != NULL) CFRelease(a)
+
++/* not used on OS X < 10.8 */
++#if !defined(MAC_OS_X_VERSION_10_8) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
++#define kIOPMAssertionTypePreventUserIdleDisplaySleep CFSTR("PreventUserIdleDisplaySleep")
++enum {
++ NSWindowCollectionBehaviorFullScreenPrimary = 0,
++};
++#endif
++
+ static void vo_cocoa_fullscreen(struct vo *vo);
+ static void vo_cocoa_ontop(struct vo *vo);
+ static void cocoa_change_profile(struct vo *vo, char **store, NSScreen *screen);
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_commonmusedeprecatedColorSyncfunctionsdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+--- video/out/cocoa_common.m.old
++++ video/out/cocoa_common.m
+@@ -553,6 +553,8 @@
+ CGDirectDisplayID displayID = (CGDirectDisplayID)
+ [[screen deviceDescription][@"NSScreenNumber"] unsignedLongValue];
+
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
++
+ CFUUIDRef uuid = CGDisplayCreateUUIDFromDisplayID(displayID);
+ if (CFGetTypeID(uuid) == CFNullGetTypeID()) {
+ MP_ERR(s, "cannot get display UUID.\n");
+@@ -617,6 +619,23 @@
+ if (!result)
+ MP_ERR(s, "cannot get display profile path.\n");
+
++#else // 10.6 and lower
++
++ CMProfileRef profile = 0;
++ CMProfileLocation location;
++ int error = CMGetProfileByAVID ((CMDisplayIDType) displayID, &profile);
++ if (!error) {
++ UInt32 size = sizeof (location);
++ error = NCMGetProfileLocation (profile, &location, &size);
++ result = talloc_strdup (vo, location.u.pathLoc.path);
++ CMCloseProfile (profile);
++ }
++ else {
++ result = talloc_strdup (vo, "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc");
++ }
++
++#endif
++
+ get_icc_profile_path_err_out:
+ CF_RELEASE(device_info);
+ return result;
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewhremoveNSDraggingDestinationprotocoldiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.h-remove-NSDraggingDestination-protocol.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.h-remove-NSDraggingDestination-protocol.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.h-remove-NSDraggingDestination-protocol.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- video/out/cocoa/view.h.old
++++ video/out/cocoa/view.h
+@@ -18,7 +18,7 @@
+ #import <Cocoa/Cocoa.h>
+ #import "video/out/cocoa/mpvadapter.h"
+
+-@interface MpvVideoView : NSView <NSDraggingDestination> {
++@interface MpvVideoView : NSView {
+ BOOL hasMouseDown;
+ }
+ @property(nonatomic, retain) MpvCocoaAdapter *adapter;
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewmreplaceconvertPointToBackingwithuserSpaceScaleFactordiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertPointToBacking-with-userSpaceScaleFactor.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+--- video/out/cocoa/view.m.old
++++ video/out/cocoa/view.m
+@@ -165,7 +165,9 @@
+ - (NSPoint)convertPointToPixels:(NSPoint)point
+ {
+ point = [self convertPoint:point fromView:nil];
+- point = [self convertPointToBacking:point];
++ CGFloat scale_factor = [self.window userSpaceScaleFactor];
++ //point = [self convertPointToBacking:point];
++ point = NSMakePoint (point.x * scale_factor, point.y * scale_factor);
+ // flip y since isFlipped returning YES doesn't affect the backing
+ // coordinate system
+ point.y = -point.y;
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewmreplaceconvertRectFromScreenwithconvertScreenToBasediff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectFromScreen-with-convertScreenToBase.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,16 @@
</span><ins>+--- video/out/cocoa/view.m.old
++++ video/out/cocoa/view.m
+@@ -109,7 +109,12 @@
+ - (BOOL)containsMouseLocation
+ {
+ NSRect vF = [[self.window screen] visibleFrame];
+- NSRect vFW = [self.window convertRectFromScreen:vF];
++ NSPoint vFStart = vF.origin;
++ NSPoint vFEnd = NSMakePoint (vFStart.x + vF.size.width, vFStart.y + vF.size.height);
++ //NSRect vFW = [self.window convertRectFromScreen:vF];
++ NSPoint vFStartW = [self.window convertScreenToBase:vFStart];
++ NSPoint vFEndW = [self.window convertScreenToBase:vFEnd];
++ NSRect vFW = NSMakeRect (vFStartW.x, vFStartW.y, vFEndW.x - vFStartW.x, vFEndW.y - vFStartW.y);
+ NSRect vFV = [self convertRect:vFW fromView:nil];
+ NSPoint pt = [self convertPoint:[self mouseLocation] fromView:nil];
+
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_viewmreplaceconvertRectToBackingwithuserSpaceScaleFactordiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_view.m-replace-convertRectToBacking-with-userSpaceScaleFactor.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,19 @@
</span><ins>+--- video/out/cocoa/view.m.old
++++ video/out/cocoa/view.m
+@@ -130,7 +130,15 @@
+
+ - (NSRect)frameInPixels
+ {
+- return [self convertRectToBacking:[self frame]];
++ NSRect cur_frame = self.frame;
++ NSPoint frame_point = cur_frame.origin;
++ NSSize frame_extents = cur_frame.size;
++ CGFloat scale_factor = [self.window userSpaceScaleFactor];
++ NSPoint conv_frame_point = NSMakePoint (frame_point.x * scale_factor, frame_point.y * scale_factor);
++ NSSize conv_frame_extents = NSMakeSize (frame_extents.width * scale_factor, frame_extents.height * scale_factor);
++ NSRect conv_frame = NSMakeRect (conv_frame_point.x, conv_frame_point.y, conv_frame_extents.width, conv_frame_extents.height);
++ //return [self.window convertRectToBacking:[self frame]];
++ return conv_frame;
+ }
+
+ - (BOOL)canHideCursor
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_cocoa_windowmfullscreenfixesdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_window.m-fullscreen-fixes.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+--- video/out/cocoa/window.m.old
++++ video/out/cocoa/window.m
+@@ -27,6 +27,14 @@
+
+ #include "window.h"
+
++#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
++enum {
++ NSFullScreenWindowMask = 0,
++ NSApplicationPresentationFullScreen = 0,
++ NSApplicationPresentationAutoHideToolbar = 0,
++};
++#endif
++
+ @implementation MpvVideoWindow {
+ NSSize _queued_video_size;
+ }
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_gl_cocoachardcodeOpenGL2diff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+--- video/out/gl_cocoa.c.old
++++ video/out/gl_cocoa.c
+@@ -56,6 +56,8 @@
+ struct cgl_context *p = ctx->priv;
+ CGLError err;
+
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
++
+ CGLOpenGLProfile gl_vers_map[] = {
+ [2] = kCGLOGLPVersion_Legacy,
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
+@@ -66,15 +68,24 @@
+ #endif
+ };
+
++#endif
++
+ int gl_major = MPGL_VER_GET_MAJOR(ctx->requested_gl_version);
++
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ if (gl_major < 2 || gl_major >= MP_ARRAY_SIZE(gl_vers_map)) {
++#else
++ if (gl_major != 2) {
++#endif
+ MP_FATAL(ctx->vo, "OpenGL major version %d not supported", gl_major);
+ return false;
+ }
+
+ CGLPixelFormatAttribute attrs[] = {
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ kCGLPFAOpenGLProfile,
+ (CGLPixelFormatAttribute) gl_vers_map[gl_major],
++#endif
+ kCGLPFADoubleBuffer,
+ kCGLPFAAccelerated,
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
</ins></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchvideo_out_gl_commonhuseOpenGLlegacydiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/multimedia/mpv/files/patch-video_out_gl_common.h-use-OpenGL-legacy.diff (128035 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-video_out_gl_common.h-use-OpenGL-legacy.diff        2014-11-11 12:16:41 UTC (rev 128035)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_gl_common.h-use-OpenGL-legacy.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><del>---- video/out/gl_common.h.old        2014-08-12 03:40:56.000000000 +0200
-+++ video/out/gl_common.h        2014-08-12 03:41:27.000000000 +0200
</del><ins>+--- video/out/gl_common.h.old
++++ video/out/gl_common.h
</ins><span class="cx"> @@ -38,11 +38,11 @@
</span><span class="cx"> #include "video/mp_image.h"
</span><span class="cx">
</span></span></pre></div>
<a id="trunkdportsmultimediampvfilespatchwaftools_checks_custompydisablelibarclitediff"></a>
<div class="addfile"><h4>Added: trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff (0 => 128036)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff         (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff        2014-11-11 18:04:03 UTC (rev 128036)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- waftools/checks/custom.py.old
++++ waftools/checks/custom.py
+@@ -123,7 +123,6 @@
+ fragment = load_fragment('cocoa.m'),
+ compile_filename = 'test.m',
+ framework_name = ['Cocoa', 'IOKit', 'OpenGL'],
+- includes = ctx.srcnode.abspath(),
+- linkflags = '-fobjc-arc')
++ includes = ctx.srcnode.abspath())
+
+ return fn(ctx, dependency_identifier)
</ins></span></pre>
</div>
</div>
</body>
</html>