summaryrefslogtreecommitdiff
path: root/multimedia/intel-media-sdk/files/patch-unix
blob: 65b0ddf167c2a71bc2a30b97b5a90f0b3737301d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Relax Linux checks for the code works on any non-Windows platform.

In file included from _studio/shared/umc/core/umc/src/umc_va_base.cpp:21:
In file included from _studio/shared/umc/core/umc/include/umc_va_base.h:25:
In file included from _studio/shared/include/mfx_common.h:27:
In file included from _studio/shared/include/mfx_utils.h:29:
_studio/shared/umc/core/umc/include/umc_structures.h:658:11: error: unknown type name 'vm_char'
    const vm_char* GetErrString(Status ErrCode);
          ^
_studio/shared/umc/core/umc/include/umc_structures.h:659:11: error: unknown type name 'vm_char'
    const vm_char* GetStreamTypeString(SystemStreamType Code);
          ^
_studio/shared/umc/core/umc/include/umc_structures.h:660:11: error: unknown type name 'vm_char'
    const vm_char* GetFormatTypeString(ColorFormat Code);
          ^
_studio/shared/umc/core/umc/include/umc_structures.h:661:11: error: unknown type name 'vm_char'
    const vm_char* GetAudioTypeString(AudioStreamType Code);
          ^
_studio/shared/umc/core/umc/include/umc_structures.h:662:11: error: unknown type name 'vm_char'
    const vm_char* GetVideoTypeString(VideoStreamType Code);
          ^
_studio/shared/umc/core/umc/include/umc_structures.h:663:11: error: unknown type name 'vm_char'
    const vm_char* GetVideoRenderTypeString(VideoRenderType Code);
          ^
_studio/shared/umc/core/umc/include/umc_structures.h:664:11: error: unknown type name 'vm_char'
    const vm_char* GetAudioRenderTypeString(AudioRenderType Code);
          ^
In file included from _studio/shared/umc/core/umc/src/umc_va_base.cpp:21:
_studio/shared/umc/core/umc/include/umc_va_base.h:36:6: error: unsupported platform
    #error unsupported platform
     ^
_studio/shared/umc/core/umc/include/umc_va_base.h:48:10: fatal error: 'va/va.h' file not found
#include <va/va.h>
         ^~~~~~~~~

--- CMakeLists.txt.orig	2019-10-30 19:56:10 UTC
+++ CMakeLists.txt
@@ -57,7 +57,7 @@ option( ENABLE_OPENCL "Build targets dependent on Open
 #
 option( ENABLE_ALL "Enable all dependencies and features?" OFF )
 
-if( CMAKE_SYSTEM_NAME MATCHES Linux )
+if( UNIX AND NOT APPLE )
   option( ENABLE_X11_DRI3 "Build X11 DRI3 versions of the targets?" ${ENABLE_ALL} )
   option( ENABLE_WAYLAND "Build WAYLAND versions of the targets?" ${ENABLE_ALL} )
 endif()
@@ -191,7 +191,7 @@ message("  CMAKE_INSTALL_FULL_LIBDIR               : $
 message("  CMAKE_INSTALL_FULL_DATADIR              : ${CMAKE_INSTALL_FULL_DATADIR}")
 message("Enable:")
 message("  ENABLE_OPENCL                           : ${ENABLE_OPENCL}")
-if( CMAKE_SYSTEM_NAME MATCHES Linux )
+if( UNIX AND NOT APPLE )
   message("  ENABLE_X11                              : ${ENABLE_X11}")
   message("  ENABLE_X11_DRI3                         : ${ENABLE_X11_DRI3}")
   message("  ENABLE_WAYLAND                          : ${ENABLE_WAYLAND}")
--- _studio/mfx_lib/shared/include/mediasdk_version.h.orig	2019-10-30 19:56:10 UTC
+++ _studio/mfx_lib/shared/include/mediasdk_version.h
@@ -23,7 +23,7 @@
 #pragma once
 
 /* These string constants set Media SDK version information for Linux, Android, OSX. */
-#ifdef __linux__
+#if !defined(__APPLE__) && !defined(_WIN32)
 #include "va/va.h"
 
 #ifndef MFX_API_VERSION
@@ -55,4 +55,4 @@ const char* g_MfxGitCommit       = "mediasdk_git_commi
 const char* g_MfxBuildInfo       = "mediasdk_build_info: " MFX_BUILD_INFO;
 const char* g_MfxLibvaVersion    = "mediasdk_libva_version: " VA_VERSION_S;
 
-#endif // __linux__
+#endif // #if !__APPLE__ && !_WIN32
--- api/include/mfxdefs.h.orig	2019-10-30 19:56:10 UTC
+++ api/include/mfxdefs.h
@@ -79,7 +79,7 @@ extern "C"
     #define MFX_PACK_BEGIN_STRUCT_W_PTR()    MFX_PACK_BEGIN_X(8)
     #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8)
 /* 32-bit ILP32 data model Windows (Intel architecture) */
-#elif defined(_WIN32) || defined(_M_IX86) && !defined(__linux__)
+#elif defined(_WIN32)
     #define MFX_PACK_BEGIN_STRUCT_W_PTR()    MFX_PACK_BEGIN_X(4)
     #define MFX_PACK_BEGIN_STRUCT_W_L_TYPE() MFX_PACK_BEGIN_X(8)
 /* 32-bit ILP32 data model Linux */
--- api/mfx_dispatch/linux/CMakeLists.txt.orig	2019-10-30 19:56:10 UTC
+++ api/mfx_dispatch/linux/CMakeLists.txt
@@ -58,7 +58,7 @@ message( STATUS "MFX_MODULES_DIR=${MFX_MODULES_DIR}" )
 
 add_definitions(-DUNIX)
 
-if( CMAKE_SYSTEM_NAME MATCHES Linux )
+if( UNIX AND NOT APPLE )
   add_definitions(-D__USE_LARGEFILE64 -D_FILE_OFFSET_BITS=64 -DLINUX -DLINUX32)
 
   if(CMAKE_SIZEOF_VOID_P EQUAL 8)
--- builder/FindFunctions.cmake.orig	2019-10-30 19:56:10 UTC
+++ builder/FindFunctions.cmake
@@ -29,14 +29,14 @@ function( collect_oses )
     set( NotLinux   true PARENT_SCOPE )
     set( NotDarwin  true PARENT_SCOPE )
 
-  elseif( CMAKE_SYSTEM_NAME MATCHES Linux )
-    set( Linux      true PARENT_SCOPE )
-    set( NotDarwin  true PARENT_SCOPE )
-    set( NotWindows true PARENT_SCOPE )
-
   elseif( CMAKE_SYSTEM_NAME MATCHES Darwin )
     set( Darwin     true PARENT_SCOPE )
     set( NotLinux   true PARENT_SCOPE )
+    set( NotWindows true PARENT_SCOPE )
+
+  else()
+    set( Linux      true PARENT_SCOPE )
+    set( NotDarwin  true PARENT_SCOPE )
     set( NotWindows true PARENT_SCOPE )
 
   endif()
--- tutorials/common/cmd_options.cpp.orig	2019-10-30 19:56:10 UTC
+++ tutorials/common/cmd_options.cpp
@@ -24,7 +24,7 @@
 
 #if defined(_WIN32) || defined(_WIN64)
 #include "bits/windows_defs.h"
-#elif defined(__linux__)
+#else
 #include "bits/linux_defs.h"
 #endif
 
--- tutorials/common/common_utils.h.orig	2019-10-30 19:56:10 UTC
+++ tutorials/common/common_utils.h
@@ -32,7 +32,7 @@
 //  - MSDK_SLEEP
 #if defined(_WIN32) || defined(_WIN64)
 #include "bits/windows_defs.h"
-#elif defined(__linux__)
+#else
 #include "bits/linux_defs.h"
 #endif
 
--- samples/CMakeLists.txt.orig	2019-10-30 19:56:10 UTC
+++ samples/CMakeLists.txt
@@ -30,4 +30,6 @@ add_subdirectory(sample_misc/wayland)
 add_subdirectory(sample_plugins/rotate_cpu)
 add_subdirectory(sample_plugins/rotate_opencl)
 add_subdirectory(sample_plugins/vpp_plugin)
+if( CMAKE_SYSTEM_NAME MATCHES Linux )
 add_subdirectory(metrics_monitor)
+endif()