Ticket #58206: port:VLC.patch

File port:VLC.patch, 6.3 KB (added by RJVB (René Bertin), 5 years ago)

tentative fix (to be applied to the ports tree)

  • multimedia/VLC/Portfile

    diff --git a/multimedia/VLC/Portfile b/multimedia/VLC/Portfile
    index c33a65a5103e63f0109a0b2afcf6b1c98a731213..ab88e8095c5da12343c7d6bb24354e80d2066432 100644
    a b platform darwin { 
    172172            configure.args-append \
    173173                    --with-macosx-sdk=${result}
    174174        }
     175        patchfiles-append \
     176                    patch-build-on-darwin13.diff
     177    }
     178    if {${os.major} <= 15} {
    175179        post-extract {
    176180            xinstall -m 755 -d ${worksrcpath}/include/os
    177181            xinstall -m 755 ${filespath}/lock.h ${worksrcpath}/include/os/lock.h
    178182        }
    179         patchfiles-append \
    180                     patch-build-on-darwin13.diff
    181183    }
     184    patchfiles-append \
     185                    patch-build-on-pre-1014.diff
    182186}
    183187
    184188depends_lib-append  port:lua
  • multimedia/VLC/files/patch-build-on-darwin13.diff

    diff --git a/multimedia/VLC/files/patch-build-on-darwin13.diff b/multimedia/VLC/files/patch-build-on-darwin13.diff
    index 3c7d7f47aebbf7b29efde3efd69106e9e957b98c..438d315da2dd737c25d7c26a8ca71b6b703572e5 100644
    a b index af190d1..3f0fc4f 100644 
    167167 video_filter_LTLIBRARIES += libci_filters_plugin.la
    168168 endif
    169169 
    170 diff --git modules/access/qtsound.m modules/access/qtsound.m
    171 index af190d1..3f0fc4f 100644
    172 --- modules/access/orig.qtsound.m       2018-10-28 12:11:19.000000000 +0100
    173 +++ modules/access/qtsound.m    2019-02-18 00:41:40.000000000 +0100
    174 @@ -45,6 +45,7 @@
    175  #import <QTKit/QTKit.h>
    176  #import <AVFoundation/AVFoundation.h>
    177  
    178 +#ifdef MAC_OS_X_VERSION_10_13
    179  #ifndef MAC_OS_X_VERSION_10_14
    180  @interface AVCaptureDevice (AVCaptureDeviceAuthorizationSince10_14)
    181  
    182 @@ -52,6 +53,7 @@
    183  
    184  @end
    185  #endif
    186 +#endif
    187  
    188  /*****************************************************************************
    189   * Local prototypes.
    190 @@ -318,6 +320,7 @@
    191              goto error;
    192          }
    193  
    194 +#ifdef MAC_OS_X_VERSION_10_13
    195          if (@available(macOS 10.14, *)) {
    196              msg_Dbg(p_demux, "Check user consent for access to the audio device");
    197  
    198 @@ -334,6 +337,7 @@
    199                  goto error;
    200              }
    201          }
    202 +#endif
    203  
    204          audioInput = [[QTCaptureDeviceInput alloc] initWithDevice: p_sys->audiodevice];
    205          if(!audioInput) {
    206 diff --get modules/access/avcapture.m modules/access/avcapture.m
    207 index af190d1..3f0fc4f 100644
    208 --- modules/access/orig.avcapture.m     2018-10-28 12:11:19.000000000 +0100
    209 +++ modules/access/avcapture.m  2019-02-18 00:27:36.000000000 +0100
    210 @@ -43,13 +43,15 @@
    211  #import <AVFoundation/AVFoundation.h>
    212  #import <CoreMedia/CoreMedia.h>
    213  
    214 +#ifdef MAC_OS_X_VERSION_10_13
    215  #ifndef MAC_OS_X_VERSION_10_14
    216  @interface AVCaptureDevice (AVCaptureDeviceAuthorizationSince10_14)
    217  
    218 -+ (void)requestAccessForMediaType:(AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
    219 ++ (void)requestAccessForMediaType:(struct AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
    220  
    221  @end
    222  #endif
    223 +#endif
    224  
    225  /*****************************************************************************
    226  * Local prototypes
    227 @@ -334,6 +336,7 @@
    228              goto error;
    229          }
    230  
    231 +#ifdef MAC_OS_X_VERSION_10_13
    232          if (@available(macOS 10.14, *)) {
    233              msg_Dbg(p_demux, "Check user consent for access to the video device");
    234  
    235 @@ -350,6 +353,7 @@
    236                  goto error;
    237              }
    238          }
    239 +#endif
    240  
    241          input = [AVCaptureDeviceInput deviceInputWithDevice:(__bridge AVCaptureDevice *)p_sys->device error:&o_returnedError];
    242  
  • new file multimedia/VLC/files/patch-build-on-pre-1014.diff

    diff --git a/multimedia/VLC/files/patch-build-on-pre-1014.diff b/multimedia/VLC/files/patch-build-on-pre-1014.diff
    new file mode 100644
    index 0000000000000000000000000000000000000000..0dbf064606b54bb4d52e93dd324e40b0b1360837
    - +  
     1diff --git modules/access/qtsound.m modules/access/qtsound.m
     2index af190d1..3f0fc4f 100644
     3--- modules/access/orig.qtsound.m       2018-10-28 12:11:19.000000000 +0100
     4+++ modules/access/qtsound.m    2019-02-18 00:41:40.000000000 +0100
     5@@ -45,6 +45,7 @@
     6 #import <QTKit/QTKit.h>
     7 #import <AVFoundation/AVFoundation.h>
     8 
     9+#ifdef MAC_OS_X_VERSION_10_13
     10 #ifndef MAC_OS_X_VERSION_10_14
     11 @interface AVCaptureDevice (AVCaptureDeviceAuthorizationSince10_14)
     12 
     13@@ -52,6 +53,7 @@
     14 
     15 @end
     16 #endif
     17+#endif
     18 
     19 /*****************************************************************************
     20  * Local prototypes.
     21@@ -318,6 +320,7 @@
     22             goto error;
     23         }
     24 
     25+#ifdef MAC_OS_X_VERSION_10_13
     26         if (@available(macOS 10.14, *)) {
     27             msg_Dbg(p_demux, "Check user consent for access to the audio device");
     28 
     29@@ -334,6 +337,7 @@
     30                 goto error;
     31             }
     32         }
     33+#endif
     34 
     35         audioInput = [[QTCaptureDeviceInput alloc] initWithDevice: p_sys->audiodevice];
     36         if(!audioInput) {
     37diff --get modules/access/avcapture.m modules/access/avcapture.m
     38index af190d1..3f0fc4f 100644
     39--- modules/access/orig.avcapture.m     2018-10-28 12:11:19.000000000 +0100
     40+++ modules/access/avcapture.m  2019-02-18 00:27:36.000000000 +0100
     41@@ -43,13 +43,15 @@
     42 #import <AVFoundation/AVFoundation.h>
     43 #import <CoreMedia/CoreMedia.h>
     44 
     45+#ifdef MAC_OS_X_VERSION_10_13
     46 #ifndef MAC_OS_X_VERSION_10_14
     47 @interface AVCaptureDevice (AVCaptureDeviceAuthorizationSince10_14)
     48 
     49-+ (void)requestAccessForMediaType:(AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
     50++ (void)requestAccessForMediaType:(struct AVMediaType)mediaType completionHandler:(void (^)(BOOL granted))handler API_AVAILABLE(macos(10.14), ios(7.0));
     51 
     52 @end
     53 #endif
     54+#endif
     55 
     56 /*****************************************************************************
     57 * Local prototypes
     58@@ -334,6 +336,7 @@
     59             goto error;
     60         }
     61 
     62+#ifdef MAC_OS_X_VERSION_10_13
     63         if (@available(macOS 10.14, *)) {
     64             msg_Dbg(p_demux, "Check user consent for access to the video device");
     65 
     66@@ -350,6 +353,7 @@
     67                 goto error;
     68             }
     69         }
     70+#endif
     71 
     72         input = [AVCaptureDeviceInput deviceInputWithDevice:(__bridge AVCaptureDevice *)p_sys->device error:&o_returnedError];
     73 
     74