[141222] trunk/dports/multimedia/mpv

ionic at macports.org ionic at macports.org
Mon Oct 12 21:06:53 PDT 2015


Revision: 141222
          https://trac.macports.org/changeset/141222
Author:   ionic at macports.org
Date:     2015-10-12 21:06:53 -0700 (Mon, 12 Oct 2015)
Log Message:
-----------
mpv: update to 0.11.0. Fixes: #49228.

Changes:
  - update to 0.11.0 (obviously.)
  - split up configuration file into config-maintainer-vda and
    config-maintainer-vtb.
  - add support for VTB.
  - work around VTB bug by also enabling VDA on 10.11.
  - updated patchset for 10.6:
    * a few files were renamed, hence also the patches
    * fix new incompatibilities
    * refresh all patches that didn't apply cleanly

Modified Paths:
--------------
    trunk/dports/multimedia/mpv/Portfile
    trunk/dports/multimedia/mpv/files/patch-misc-import-CoreVideo.diff
    trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff
    trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff
    trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff
    trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff

Added Paths:
-----------
    trunk/dports/multimedia/mpv/files/config-maintainer-vda
    trunk/dports/multimedia/mpv/files/config-maintainer-vtb
    trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff
    trunk/dports/multimedia/mpv/files/patch-video_decode_vda.c-disable-HAVE_VDA_DEFAULT_INIT2.diff
    trunk/dports/multimedia/mpv/files/patch-video_out_opengl_cocoa.c-hardcode-OpenGL-2.diff
    trunk/dports/multimedia/mpv/files/patch-video_out_opengl_hwdec_vda.c-disable-NV12.diff

Removed Paths:
-------------
    trunk/dports/multimedia/mpv/files/config-maintainer
    trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff

Modified: trunk/dports/multimedia/mpv/Portfile
===================================================================
--- trunk/dports/multimedia/mpv/Portfile	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/Portfile	2015-10-13 04:06:53 UTC (rev 141222)
@@ -6,8 +6,8 @@
 PortGroup               waf 1.0
 
 # Please revbump mpv whenever ffmpeg{,-devel} is updated!
-github.setup            mpv-player mpv 0.9.2 v
-revision                1
+github.setup            mpv-player mpv 0.11.0 v
+revision                0
 categories              multimedia
 license                 GPL-2+
 maintainers             ionic
@@ -22,7 +22,7 @@
                         and even H.264 movies.
 homepage                http://www.mpv.io/
 
-set waf_version         1.8.4
+set waf_version         1.8.12
 set waf_distfile        waf-${waf_version}
 set mpv_distfile        ${distfiles}
 master_sites-append     http://ftp.waf.io/pub/release:waf
@@ -31,11 +31,11 @@
 extract.only-delete     ${waf_distfile}
 
 checksums               ${mpv_distfile} \
-                        rmd160  00f381bc678a7900dcd137507ac93373859a6232 \
-                        sha256  468b86fa56f4d286c227f04cb0fe0f83d0311d55481da671a32296355fe75c9c \
+                        rmd160  47d625b899b7bbe3867845e9710fef14d41d5249 \
+                        sha256  7d0598a0f5f5825143e2678f058d6305683c82ff36702235703e8d54048132fe \
                         ${waf_distfile} \
-                        rmd160  d58b790001664fe5f6a720e4ff9ce9f4105d195a \
-                        sha256  f02035fa5d8814f33f19b2b20d43822ddef6bb39b955ca196c2a247a1f9ffaa8
+                        rmd160  bb1dcd10a0c336a5497bb1247a301c27f997078c \
+                        sha256  01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b
 
 depends_build           path:bin/pkg-config:pkgconfig
 depends_lib             path:lib/libavcodec.dylib:ffmpeg \
@@ -49,7 +49,7 @@
 
 universal_variant       no
 
-default_variants        +bundle +network +osd +rubberband +opengl +dvd +audiocd
+default_variants        +bundle +network +osd +rubberband +opengl +dvd +audiocd +libarchive
 
 # Current waf doesn't support --nocache anymore. Set by PortGroup.
 configure.args-delete   --nocache
@@ -62,7 +62,9 @@
                         --enable-coreaudio \
                         --enable-cocoa \
                         --disable-vda-hwaccel \
-                        --disable-vda-gl
+                        --disable-videotoolbox-hwaccel \
+                        --disable-vda-gl \
+                        --disable-videotoolbox-gl
 
 # mpv autodetects many support libs. To prevent undeclared
 # dependencies, explicitly disable everything optional first.
@@ -79,6 +81,7 @@
                         --disable-cdda \
                         --disable-vapoursynth \
                         --disable-vapoursynth-lazy \
+                        --disable-libarchive \
                         --disable-enca \
                         --disable-rubberband \
                         --disable-pulse \
@@ -142,6 +145,9 @@
                             --enable-apple-remote
 }
 
+set has_vda 0
+set has_vtb 0
+
 platform darwin {
     notes-append [subst {
                     The maintainer ships his personal config file in
@@ -153,17 +159,44 @@
                     and adjust it to your needs.
     }]
 
-    # VDA (video hardware acceleration, mostly H264) is only supported on 10.6.3+
+    # Note: VDA support has already been removed on master. The next update will probably not include it anymore.
+
+    # VDA (video hardware acceleration, mostly H264) is only supported on 10.6.3+ up to (excluding) 10.11.
+    #if {(${os.major} > 10 || (${os.major} == 10 && ${os.minor} >= 3)) && (${os.major} < 15)}
+    # Due to a bug in ffmpeg(?), we have to enable VDA on 10.11 as well, even though it shouldn't be supported.
+    # More information: https://github.com/mpv-player/mpv/issues/2299
     if {${os.major} > 10 || (${os.major} == 10 && ${os.minor} >= 3)} {
+        set has_vda 1
         configure.args-delete   --disable-vda-hwaccel \
                                 --disable-vda-gl
         configure.args-append   --enable-vda-hwaccel \
                                 --enable-vda-gl
+    }
 
+    # VideotoolBox, a new hardware acceleration framework, is supported on 10.8+ and "here to stay".
+    # It provides support for H264, H263, MPEG1, MPEG2 and MPEG4.
+    if {${os.major} > 11} {
+        set has_vtb 1
+        configure.args-delete   --disable-videotoolbox-hwaccel \
+                                --disable-videotoolbox-gl
+        configure.args-append   --enable-videotoolbox-hwaccel \
+                                --enable-videotoolbox-gl
+    }
+
+    if {(${has_vtb}) || (${has_vda})} {
         notes-append {
                         This config file already defines the necessary video output settings to make \
                         use of the hardware acceleration features provided by your operating system.
         }
+
+        if {(${has_vtb}) && (${has_vda})} {
+            notes-append [subst {
+                            While the default configuration file makes use of the newer and preferred \
+                            VideoToolBox framework, a separate config file set up for the old VDA \
+                            framework has been installed as
+                            * ${prefix}/share/examples/${name}/config-maintainer-vda.
+            }]
+        }
     } else {
         notes-append {
                         Sadly, your system is incapable of utilizing mpv's hardware decoding features.
@@ -193,8 +226,11 @@
                             patch-video_out_cocoa_window.m-fullscreen-fixes.diff \
                             patch-video_out_cocoa_common.m-define-constants.diff \
                             patch-video_out_cocoa_common.m-port-lightsensor.diff \
-                            patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff \
-                            patch-osdep_macosx_compat.m-add-subscripting-implementation.diff
+                            patch-video_out_opengl_cocoa.c-hardcode-OpenGL-2.diff \
+                            patch-osdep_macosx_compat.m-add-subscripting-implementation.diff \
+                            patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff \
+                            patch-video_decode_vda.c-disable-HAVE_VDA_DEFAULT_INIT2.diff \
+                            patch-video_out_opengl_hwdec_vda.c-disable-NV12.diff
 
                             # Let's hope this is actually unneeded...
                             #patch-video_out_cocoa_common.m-use-deprecated-ColorSync-functions.diff
@@ -210,14 +246,16 @@
     }
 
     post-extract {
-        xinstall -m 0644 -W "${filespath}" config-maintainer "${worksrcpath}/TOOLS/"
+        xinstall -m 0644 -W "${filespath}" config-maintainer-vda config-maintainer-vtb "${worksrcpath}/TOOLS/"
     }
 
     pre-configure {
         if {[variant_isset network]} {
-            reinplace -W "${worksrcpath}/TOOLS" "s|@@NETWORK@@||" config-maintainer
+            reinplace -W "${worksrcpath}/TOOLS" "s|@@NETWORK@@||" config-maintainer-vda
+            reinplace -W "${worksrcpath}/TOOLS" "s|@@NETWORK@@||" config-maintainer-vtb
         } else {
-            reinplace -W "${worksrcpath}/TOOLS" "|@@NETWORK@@|d" config-maintainer
+            reinplace -W "${worksrcpath}/TOOLS" "|@@NETWORK@@|d" config-maintainer-vda
+            reinplace -W "${worksrcpath}/TOOLS" "|@@NETWORK@@|d" config-maintainer-vtb
         }
     }
 }
@@ -285,8 +323,18 @@
          ${destroot}${prefix}/share/examples/${name}
 
     if {${os.platform} eq "darwin"} {
-        xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer \
-                         ${destroot}${prefix}/share/examples/${name}
+        if {(${has_vtb})} {
+            xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer-vtb \
+                             ${destroot}${prefix}/share/examples/${name}/config-maintainer
+
+            if {(${has_vda})} {
+                xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer-vda \
+                                 ${destroot}${prefix}/share/examples/${name}/
+            }
+        } else {
+            xinstall -m 0644 ${worksrcpath}/TOOLS/config-maintainer-vda \
+                             ${destroot}${prefix}/share/examples/${name}/config-maintainer
+        }
     }
 }
 
@@ -342,6 +390,12 @@
                              --enable-cdda
 }
 
+variant libarchive description {Enable transparent handling of Zip files and other compressed formats} {
+    depends_lib-append      port:libarchive
+    configure.args-replace  --disable-libarchive \
+                            --enable-libarchive
+}
+
 variant enca description {Enable encoding support via ENCA} {
     depends_lib-append      port:enca
     configure.args-replace  --disable-enca \

Deleted: trunk/dports/multimedia/mpv/files/config-maintainer
===================================================================
--- trunk/dports/multimedia/mpv/files/config-maintainer	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/config-maintainer	2015-10-13 04:06:53 UTC (rev 141222)
@@ -1,23 +0,0 @@
-# Write your default config options here!
-[default]
-
-vo=opengl-hq:backend=cocoa
-ao=coreaudio
-
-sub-scale=3
-
-af=scaletempo
-
-softvol=yes
-softvol-max=800
-
-framedrop=vo
-
-hwdec=vda
-
-#alang=en,eng,de,ger
-
-cache=50700
-
-@@NETWORK@@ytdl
-@@NETWORK@@ytdl-format=best

Copied: trunk/dports/multimedia/mpv/files/config-maintainer-vda (from rev 141221, trunk/dports/multimedia/mpv/files/config-maintainer)
===================================================================
--- trunk/dports/multimedia/mpv/files/config-maintainer-vda	                        (rev 0)
+++ trunk/dports/multimedia/mpv/files/config-maintainer-vda	2015-10-13 04:06:53 UTC (rev 141222)
@@ -0,0 +1,23 @@
+# Write your default config options here!
+[default]
+
+vo=opengl-hq:backend=cocoa
+ao=coreaudio
+
+sub-scale=3
+
+af=scaletempo
+
+softvol=yes
+softvol-max=800
+
+framedrop=vo
+
+hwdec=vda
+
+#alang=en,eng,de,ger
+
+cache=50700
+
+@@NETWORK@@ytdl
+@@NETWORK@@ytdl-format=best

Copied: trunk/dports/multimedia/mpv/files/config-maintainer-vtb (from rev 141221, trunk/dports/multimedia/mpv/files/config-maintainer)
===================================================================
--- trunk/dports/multimedia/mpv/files/config-maintainer-vtb	                        (rev 0)
+++ trunk/dports/multimedia/mpv/files/config-maintainer-vtb	2015-10-13 04:06:53 UTC (rev 141222)
@@ -0,0 +1,23 @@
+# Write your default config options here!
+[default]
+
+vo=opengl-hq:backend=cocoa
+ao=coreaudio
+
+sub-scale=3
+
+af=scaletempo
+
+softvol=yes
+softvol-max=800
+
+framedrop=vo
+
+hwdec=videotoolbox
+
+#alang=en,eng,de,ger
+
+cache=50700
+
+@@NETWORK@@ytdl
+@@NETWORK@@ytdl-format=best

Added: trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff	                        (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-audio_out_ao_coreaudio_utils.c-add-missing-header-for-getpid.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -0,0 +1,10 @@
+--- audio/out/ao_coreaudio_utils.c.orig
++++ audio/out/ao_coreaudio_utils.c
+@@ -23,6 +23,7 @@
+  */
+ 
+ #include <CoreAudio/HostTime.h>
++#include <unistd.h>
+ 
+ #include "audio/out/ao_coreaudio_utils.h"
+ #include "audio/out/ao_coreaudio_properties.h"

Modified: trunk/dports/multimedia/mpv/files/patch-misc-import-CoreVideo.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-misc-import-CoreVideo.diff	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/patch-misc-import-CoreVideo.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -1,8 +1,8 @@
 --- video/out/cocoa_common.m.orig
 +++ video/out/cocoa_common.m
 @@ -22,6 +22,7 @@
- #import <IOKit/pwr_mgt/IOPMLib.h>
  #import <IOKit/IOKitLib.h>
+ #import <AppKit/AppKit.h>
  #include <mach/mach.h>
 +#import <CoreVideo/CoreVideo.h>
  

Modified: trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/patch-osdep_macosx_compat.m-add-subscripting-implementation.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -57,7 +57,7 @@
 +#endif
 --- wscript_build.py.orig
 +++ wscript_build.py
-@@ -378,6 +378,7 @@ def build(ctx):
+@@ -364,6 +364,7 @@ def build(ctx):
          ( "osdep/ar/HIDRemote.m",                "apple-remote" ),
          ( "osdep/macosx_application.m",          "cocoa" ),
          ( "osdep/macosx_events.m",               "cocoa" ),

Added: trunk/dports/multimedia/mpv/files/patch-video_decode_vda.c-disable-HAVE_VDA_DEFAULT_INIT2.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-video_decode_vda.c-disable-HAVE_VDA_DEFAULT_INIT2.diff	                        (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_decode_vda.c-disable-HAVE_VDA_DEFAULT_INIT2.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -0,0 +1,28 @@
+--- video/decode/vda.c.orig
++++ video/decode/vda.c
+@@ -19,6 +19,7 @@
+ 
+ #include <libavcodec/version.h>
+ #include <libavcodec/vda.h>
++#include <AvailabilityMacros.h>
+ 
+ #include "common/av_common.h"
+ #include "common/msg.h"
+@@ -76,6 +77,7 @@ static void print_vda_error(struct mp_lo
+ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
+ {
+     av_vda_default_free(ctx->avctx);
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ #if HAVE_VDA_DEFAULT_INIT2
+     AVVDAContext *vdactx = av_vda_alloc_context();
+     vdactx->cv_pix_fmt_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
+@@ -83,6 +85,9 @@ static int init_decoder(struct lavc_ctx 
+ #else
+     int err = av_vda_default_init(ctx->avctx);
+ #endif
++#else
++    int err = av_vda_default_init(ctx->avctx);
++#endif /* MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 */
+ 
+     if (err < 0) {
+         print_vda_error(ctx->log, MSGL_ERR, "failed to init VDA decoder", err);

Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-define-constants.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -1,17 +1,14 @@
 --- video/out/cocoa_common.m.orig
 +++ video/out/cocoa_common.m
-@@ -52,6 +52,14 @@
- #define cocoa_lock(s)    pthread_mutex_lock(&s->mutex)
- #define cocoa_unlock(s)  pthread_mutex_unlock(&s->mutex)
+@@ -50,6 +50,11 @@
  
+ #include "common/msg.h"
+ 
 +/* 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 int vo_cocoa_fullscreen(struct vo *vo);
  static void cocoa_rm_fs_screen_profile_observer(struct vo_cocoa_state *s);
  

Modified: trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_cocoa_common.m-port-lightsensor.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -1,15 +1,23 @@
 --- video/out/cocoa_common.m.orig
 +++ video/out/cocoa_common.m
-@@ -87,6 +87,7 @@ struct vo_cocoa_state {
+@@ -23,6 +23,7 @@
+ #import <AppKit/AppKit.h>
+ #include <mach/mach.h>
+ #import <CoreVideo/CoreVideo.h>
++#import <AvailabilityMacros.h>
+ 
+ #import "cocoa_common.h"
+ #import "video/out/cocoa/window.h"
+@@ -85,6 +86,7 @@ struct vo_cocoa_state {
      uint64_t last_lmuvalue;
      int last_lux;
      IONotificationPortRef light_sensor_io_port;
 +    CFRunLoopSourceRef light_sensor_notify_rl_source;
  
-     pthread_mutex_t mutex;
      struct mp_log *log;
-@@ -220,8 +221,18 @@ static void cocoa_init_light_sensor(stru
  
+@@ -226,8 +228,18 @@ static void cocoa_init_light_sensor(stru
+ 
          // subscribe to notifications from the light sensor driver
          s->light_sensor_io_port = IONotificationPortCreate(kIOMasterPortDefault);
 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
@@ -27,7 +35,7 @@
  
          io_object_t n;
          IOServiceAddInterestNotification(
-@@ -243,6 +254,11 @@ static void cocoa_init_light_sensor(stru
+@@ -249,6 +261,11 @@ static void cocoa_init_light_sensor(stru
  static void cocoa_uninit_light_sensor(struct vo_cocoa_state *s)
  {
      if (s->light_sensor_io_port) {

Deleted: trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -1,138 +0,0 @@
-Only in mpv-0.8.2/video/out: .gl_common.c.swp
-Only in mpv-0.8.2/video/out: .gl_utils.c.swp
---- video/out/gl_cocoa.c.orig
-+++ video/out/gl_cocoa.c
-@@ -61,12 +61,17 @@ static void *cocoa_glgetaddr(const char 
- 
- static CGLError test_gl_version(struct vo *vo,
-                                 CGLContextObj *ctx,
--                                CGLPixelFormatObj *pix,
--                                CGLOpenGLProfile version)
-+                                CGLPixelFormatObj *pix
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-+                                , CGLOpenGLProfile version
-+#endif
-+                               )
- {
-     CGLPixelFormatAttribute attrs[] = {
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-         kCGLPFAOpenGLProfile,
-         (CGLPixelFormatAttribute) version,
-+#endif
-         kCGLPFADoubleBuffer,
-         kCGLPFAAccelerated,
-         #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
-@@ -104,16 +109,22 @@ static bool create_gl_context(struct MPG
-     struct cgl_context *p = ctx->priv;
-     CGLError err;
- 
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-     CGLOpenGLProfile gl_versions[] = {
-         kCGLOGLPVersion_3_2_Core,
-         kCGLOGLPVersion_Legacy,
-     };
-+#endif
- 
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-     for (int n = 0; n < MP_ARRAY_SIZE(gl_versions); n++) {
-         err = test_gl_version(ctx->vo, &p->ctx, &p->pix, gl_versions[n]);
-         if (err == kCGLNoError)
-             break;
-     }
-+#else
-+    err = test_gl_version(ctx->vo, &p->ctx, &p->pix);
-+#endif
- 
-     if (err != kCGLNoError) {
-         MP_FATAL(ctx->vo, "error creating CGL context: %s (%d)\n",
---- video/out/gl_common.c.orig
-+++ video/out/gl_common.c
-@@ -372,6 +372,7 @@ void mpgl_load_functions2(GL *gl, void *
-     //       and above.
- 
-     bool has_legacy = false;
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-     if (gl->version >= 300) {
-         gl->GetStringi = get_fn(fn_ctx, "glGetStringi");
-         gl->GetIntegerv = get_fn(fn_ctx, "glGetIntegerv");
-@@ -392,12 +393,15 @@ void mpgl_load_functions2(GL *gl, void *
-         // includes legacy (except with CONTEXT_FORWARD_COMPATIBLE_BIT_ARB).
-         if (gl->version == 300)
-             has_legacy = true;
--    } else {
-+    } else
-+#else
-+    {
-         const char *ext = (char*)gl->GetString(GL_EXTENSIONS);
-         gl->extensions = talloc_asprintf_append(gl->extensions, " %s", ext);
- 
-         has_legacy = true;
-     }
-+#endif
- 
-     if (gl->es)
-         has_legacy = false;
---- video/out/gl_common.h.orig
-+++ video/out/gl_common.h
-@@ -39,7 +39,6 @@
- #if HAVE_GL_COCOA
- #define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED 1
- #include <OpenGL/gl.h>
--#include <OpenGL/gl3.h>
- #include <OpenGL/glext.h>
- #else
- #include <GL/gl.h>
---- video/out/gl_utils.c.orig
-+++ video/out/gl_utils.c
-@@ -84,14 +84,20 @@ int glFmt2bpp(GLenum format, GLenum type
-         return 2;
-     case GL_RGB:
-     case GL_BGR:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-     case GL_RGB_INTEGER:
-+#endif
-         return 3 * component_size;
-     case GL_RGBA:
-     case GL_BGRA:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-     case GL_RGBA_INTEGER:
-+#endif
-         return 4 * component_size;
-     case GL_RED:
-+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-     case GL_RED_INTEGER:
-+#endif
-         return component_size;
-     case GL_RG:
-     case GL_LUMINANCE_ALPHA:
---- video/out/gl_video.c.orig
-+++ video/out/gl_video.c
-@@ -277,10 +277,10 @@ static const struct fmt_entry gl_byte_fo
- };
- 
- static const struct fmt_entry gl_float16_formats[] = {
--    {0, GL_R16F,    GL_RED,     GL_FLOAT},              // 1 x f
--    {0, GL_RG16F,   GL_RG,      GL_FLOAT},              // 2 x f
--    {0, GL_RGB16F,  GL_RGB,     GL_FLOAT},              // 3 x f
--    {0, GL_RGBA16F, GL_RGBA,    GL_FLOAT},              // 4 x f
-+    {0, 0,    GL_RED,     GL_FLOAT},              // 1 x f
-+    {0, 0,   GL_RG,      GL_FLOAT},              // 2 x f
-+    {0, 0,  GL_RGB,     GL_FLOAT},              // 3 x f
-+    {0, 0, GL_RGBA,    GL_FLOAT},              // 4 x f
- };
- 
- static const struct fmt_entry gl_apple_formats[] = {
-@@ -416,12 +416,8 @@ const struct m_sub_options gl_video_conf
-                     {"rgb10",  GL_RGB10},
-                     {"rgb10_a2", GL_RGB10_A2},
-                     {"rgb16",  GL_RGB16},
--                    {"rgb16f", GL_RGB16F},
--                    {"rgb32f", GL_RGB32F},
-                     {"rgba12", GL_RGBA12},
--                    {"rgba16", GL_RGBA16},
--                    {"rgba16f", GL_RGBA16F},
--                    {"rgba32f", GL_RGBA32F})),
-+                    {"rgba16", GL_RGBA16})),
-         OPT_CHOICE_OR_INT("dither-depth", dither_depth, 0, -1, 16,
-                           ({"no", -1}, {"auto", 0})),
-         OPT_CHOICE("dither", dither_algo, 0,

Copied: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_cocoa.c-hardcode-OpenGL-2.diff (from rev 141221, trunk/dports/multimedia/mpv/files/patch-video_out_gl_cocoa.c-hardcode-OpenGL-2.diff)
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_cocoa.c-hardcode-OpenGL-2.diff	                        (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_cocoa.c-hardcode-OpenGL-2.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -0,0 +1,138 @@
+--- video/out/opengl/cocoa.c.orig
++++ video/out/opengl/cocoa.c
+@@ -61,12 +61,17 @@ static void *cocoa_glgetaddr(const char 
+ 
+ static CGLError test_gl_version(struct vo *vo,
+                                 CGLContextObj *ctx,
+-                                CGLPixelFormatObj *pix,
+-                                CGLOpenGLProfile version)
++                                CGLPixelFormatObj *pix
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
++                                , CGLOpenGLProfile version
++#endif
++                               )
+ {
+     CGLPixelFormatAttribute attrs[] = {
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+         kCGLPFAOpenGLProfile,
+         (CGLPixelFormatAttribute) version,
++#endif
+         kCGLPFADoubleBuffer,
+         kCGLPFAAccelerated,
+         #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
+@@ -104,16 +109,22 @@ static bool create_gl_context(struct MPG
+     struct cgl_context *p = ctx->priv;
+     CGLError err;
+ 
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+     CGLOpenGLProfile gl_versions[] = {
+         kCGLOGLPVersion_3_2_Core,
+         kCGLOGLPVersion_Legacy,
+     };
++#endif
+ 
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+     for (int n = 0; n < MP_ARRAY_SIZE(gl_versions); n++) {
+         err = test_gl_version(ctx->vo, &p->ctx, &p->pix, gl_versions[n]);
+         if (err == kCGLNoError)
+             break;
+     }
++#else
++    err = test_gl_version(ctx->vo, &p->ctx, &p->pix);
++#endif
+ 
+     if (err != kCGLNoError) {
+         MP_FATAL(ctx->vo, "error creating CGL context: %s (%d)\n",
+--- video/out/opengl/common.c.orig
++++ video/out/opengl/common.c
+@@ -356,6 +356,7 @@ void mpgl_load_functions2(GL *gl, void *
+     if (shader)
+         mp_verbose(log, "GL_SHADING_LANGUAGE_VERSION='%s'\n", shader);
+ 
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+     if (gl->version >= 300) {
+         gl->GetStringi = get_fn(fn_ctx, "glGetStringi");
+         gl->GetIntegerv = get_fn(fn_ctx, "glGetIntegerv");
+@@ -370,7 +371,9 @@ void mpgl_load_functions2(GL *gl, void *
+             gl->extensions = talloc_asprintf_append(gl->extensions, " %s", ext);
+         }
+ 
+-    } else {
++    } else
++#endif
++    {
+         const char *ext = (char*)gl->GetString(GL_EXTENSIONS);
+         gl->extensions = talloc_asprintf_append(gl->extensions, " %s", ext);
+     }
+--- video/out/opengl/common.h.orig
++++ video/out/opengl/common.h
+@@ -39,7 +39,6 @@
+ #if HAVE_GL_COCOA
+ #define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED 1
+ #include <OpenGL/gl.h>
+-#include <OpenGL/gl3.h>
+ #include <OpenGL/glext.h>
+ #else
+ #include <GL/gl.h>
+--- video/out/opengl/utils.c.orig
++++ video/out/opengl/utils.c
+@@ -27,6 +27,7 @@
+ #include <string.h>
+ #include <stdarg.h>
+ #include <assert.h>
++#include <AvailabilityMacros.h>
+ 
+ #include "stream/stream.h"
+ #include "common/common.h"
+@@ -85,14 +86,20 @@ int glFmt2bpp(GLenum format, GLenum type
+         return 2;
+     case GL_RGB:
+     case GL_BGR:
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+     case GL_RGB_INTEGER:
++#endif
+         return 3 * component_size;
+     case GL_RGBA:
+     case GL_BGRA:
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+     case GL_RGBA_INTEGER:
++#endif
+         return 4 * component_size;
+     case GL_RED:
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+     case GL_RED_INTEGER:
++#endif
+         return component_size;
+     case GL_RG:
+     case GL_LUMINANCE_ALPHA:
+--- video/out/opengl/video.c.orig
++++ video/out/opengl/video.c
+@@ -264,10 +264,10 @@ static const struct fmt_entry gl_byte_fo
+ };
+ 
+ static const struct fmt_entry gl_float16_formats[] = {
+-    {0, GL_R16F,    GL_RED,     GL_FLOAT},              // 1 x f
+-    {0, GL_RG16F,   GL_RG,      GL_FLOAT},              // 2 x f
+-    {0, GL_RGB16F,  GL_RGB,     GL_FLOAT},              // 3 x f
+-    {0, GL_RGBA16F, GL_RGBA,    GL_FLOAT},              // 4 x f
++    {0, 0,    GL_RED,     GL_FLOAT},              // 1 x f
++    {0, 0,   GL_RG,      GL_FLOAT},              // 2 x f
++    {0, 0,  GL_RGB,     GL_FLOAT},              // 3 x f
++    {0, 0, GL_RGBA,    GL_FLOAT},              // 4 x f
+ };
+ 
+ static const struct fmt_entry gl_apple_formats[] = {
+@@ -389,12 +389,8 @@ const struct m_sub_options gl_video_conf
+                     {"rgb10",  GL_RGB10},
+                     {"rgb10_a2", GL_RGB10_A2},
+                     {"rgb16",  GL_RGB16},
+-                    {"rgb16f", GL_RGB16F},
+-                    {"rgb32f", GL_RGB32F},
+                     {"rgba12", GL_RGBA12},
+-                    {"rgba16", GL_RGBA16},
+-                    {"rgba16f", GL_RGBA16F},
+-                    {"rgba32f", GL_RGBA32F})),
++                    {"rgba16", GL_RGBA16})),
+         OPT_CHOICE_OR_INT("dither-depth", dither_depth, 0, -1, 16,
+                           ({"no", -1}, {"auto", 0})),
+         OPT_CHOICE("dither", dither_algo, 0,

Added: trunk/dports/multimedia/mpv/files/patch-video_out_opengl_hwdec_vda.c-disable-NV12.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-video_out_opengl_hwdec_vda.c-disable-NV12.diff	                        (rev 0)
+++ trunk/dports/multimedia/mpv/files/patch-video_out_opengl_hwdec_vda.c-disable-NV12.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -0,0 +1,45 @@
+--- video/out/opengl/hwdec_vda.c.orig
++++ video/out/opengl/hwdec_vda.c
+@@ -23,6 +23,7 @@
+ #include <CoreVideo/CoreVideo.h>
+ #include <OpenGL/OpenGL.h>
+ #include <OpenGL/CGLIOSurface.h>
++#include <AvailabilityMacros.h>
+ 
+ #include "video/mp_image_pool.h"
+ #include "hwdec.h"
+@@ -54,7 +55,9 @@ static struct vda_format vda_formats[] =
+         .gl = {
+             { GL_RGB_422_APPLE, GL_UNSIGNED_SHORT_8_8_APPLE, GL_RGB }
+         }
+-    }, {
++    }
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
++    , {
+         .cvpixfmt = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange,
+         .imgfmt = IMGFMT_NV12,
+         .planes = 2,
+@@ -63,6 +66,7 @@ static struct vda_format vda_formats[] =
+             { GL_RG,  GL_UNSIGNED_BYTE, GL_RG } ,
+         }
+     }
++#endif /* MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 */
+ };
+ 
+ static struct vda_format *vda_get_gl_format(uint32_t cvpixfmt)
+@@ -159,11 +163,15 @@ static int create_common(struct gl_hwdec
+ static int create(struct gl_hwdec *hw)
+ {
+     // For videotoolbox, we always request NV12.
++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ #if HAVE_VDA_DEFAULT_INIT2
+     struct vda_format *f = vda_get_gl_format_from_imgfmt(IMGFMT_NV12);
+ #else
+     struct vda_format *f = vda_get_gl_format_from_imgfmt(IMGFMT_UYVY);
+ #endif
++#else
++    struct vda_format *f = vda_get_gl_format_from_imgfmt(IMGFMT_UYVY);
++#endif /* MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 */
+     if (create_common(hw, f))
+         return -1;
+ 

Modified: trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff
===================================================================
--- trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff	2015-10-13 03:20:09 UTC (rev 141221)
+++ trunk/dports/multimedia/mpv/files/patch-waftools_checks_custom.py-disable-libarclite.diff	2015-10-13 04:06:53 UTC (rev 141222)
@@ -1,6 +1,6 @@
 --- waftools/checks/custom.py.orig
 +++ waftools/checks/custom.py
-@@ -108,7 +108,6 @@ def check_cocoa(ctx, dependency_identifi
+@@ -107,7 +107,6 @@ def check_cocoa(ctx, dependency_identifi
          fragment         = load_fragment('cocoa.m'),
          compile_filename = 'test.m',
          framework_name   = ['Cocoa', 'IOKit', 'OpenGL', 'QuartzCore'],
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151012/9ba1a388/attachment-0001.html>


More information about the macports-changes mailing list