Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
309 lines (284 loc) · 13.5 KB
/
Copy pathPackage.swift
File metadata and controls
309 lines (284 loc) · 13.5 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "MPVKit",
platforms: [.macOS(.v12), .iOS(.v15), .tvOS(.v15), .visionOS(.v1)],
products: [
.library(
name: "MPVKit",
targets: ["_MPVKit"]
),
.library(
name: "MPVKit-GPL",
targets: ["_MPVKit-GPL"]
),
],
targets: [
.target(
name: "_MPVKit",
dependencies: [
"Libmpv", "_FFmpeg", "Libuchardet", "Libbluray",
.target(name: "Libluajit", condition: .when(platforms: [.macOS])),
],
path: "Sources/_MPVKit",
linkerSettings: [
.linkedFramework("AVFoundation"),
.linkedFramework("CoreAudio"),
]
),
.target(
name: "_FFmpeg",
dependencies: [
"Libavcodec", "Libavdevice", "Libavfilter", "Libavformat", "Libavutil", "Libswresample", "Libswscale",
"Libssl", "Libcrypto", "Libass", "Libfreetype", "Libfribidi", "Libharfbuzz",
"MoltenVK", "Libshaderc_combined", "lcms2", "Libplacebo", "Libdovi", "Libunibreak",
"gmp", "nettle", "hogweed", "gnutls", "Libdav1d", "Libuavs3d"
],
path: "Sources/_FFmpeg",
linkerSettings: [
.linkedFramework("AudioToolbox"),
.linkedFramework("CoreVideo"),
.linkedFramework("CoreFoundation"),
.linkedFramework("CoreMedia"),
.linkedFramework("Metal"),
.linkedFramework("VideoToolbox"),
.linkedLibrary("bz2"),
.linkedLibrary("iconv"),
.linkedLibrary("expat"),
.linkedLibrary("resolv"),
.linkedLibrary("xml2"),
.linkedLibrary("z"),
.linkedLibrary("c++"),
]
),
.target(
name: "_MPVKit-GPL",
dependencies: [
"Libmpv-GPL", "_FFmpeg-GPL", "Libuchardet", "Libbluray",
.target(name: "Libluajit", condition: .when(platforms: [.macOS])),
],
path: "Sources/_MPVKit-GPL",
linkerSettings: [
.linkedFramework("AVFoundation"),
.linkedFramework("CoreAudio"),
]
),
.target(
name: "_FFmpeg-GPL",
dependencies: [
"Libavcodec-GPL", "Libavdevice-GPL", "Libavfilter-GPL", "Libavformat-GPL", "Libavutil-GPL", "Libswresample-GPL", "Libswscale-GPL",
"Libssl", "Libcrypto", "Libass", "Libfreetype", "Libfribidi", "Libharfbuzz",
"MoltenVK", "Libshaderc_combined", "lcms2", "Libplacebo", "Libdovi", "Libunibreak",
"Libsmbclient", "gmp", "nettle", "hogweed", "gnutls", "Libdav1d", "Libuavs3d"
],
path: "Sources/_FFmpeg-GPL",
linkerSettings: [
.linkedFramework("AudioToolbox"),
.linkedFramework("CoreVideo"),
.linkedFramework("CoreFoundation"),
.linkedFramework("CoreMedia"),
.linkedFramework("Metal"),
.linkedFramework("VideoToolbox"),
.linkedLibrary("bz2"),
.linkedLibrary("iconv"),
.linkedLibrary("expat"),
.linkedLibrary("resolv"),
.linkedLibrary("xml2"),
.linkedLibrary("z"),
.linkedLibrary("c++"),
]
),
.binaryTarget(
name: "Libmpv-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libmpv-GPL.xcframework.zip",
checksum: "a556746596c0c6fe88b1ef6182e6ddc25504617eba2d9ac538159098ceca3fb5"
),
.binaryTarget(
name: "Libavcodec-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavcodec-GPL.xcframework.zip",
checksum: "51863fa4b96dccc350fe4e3b125b7b71cd3728039baa3af87c7ea8b24f2bf61d"
),
.binaryTarget(
name: "Libavdevice-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavdevice-GPL.xcframework.zip",
checksum: "9cf58860173bc4f18551c4311753451f6f7f9b43bf0c1f88baf90ffd71b006f5"
),
.binaryTarget(
name: "Libavformat-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavformat-GPL.xcframework.zip",
checksum: "c17b70aeeb684adc02c88f11e63c3cac6e010809e1906504956d72057bbeda1d"
),
.binaryTarget(
name: "Libavfilter-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavfilter-GPL.xcframework.zip",
checksum: "8e0c5c8786fe86d8c08d854447cc3f15f6b83d2ca80c3c81c857b58ed01cbaf4"
),
.binaryTarget(
name: "Libavutil-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavutil-GPL.xcframework.zip",
checksum: "0d67f42a2f03f9fdec65b014fb438063dcfafcad64244a2152b35285e56c0f2e"
),
.binaryTarget(
name: "Libswresample-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libswresample-GPL.xcframework.zip",
checksum: "faf081c9cf5b3e84c3a6ccdc076fca0f9e7db11b8c9713843bc91ccfad71ba7a"
),
.binaryTarget(
name: "Libswscale-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libswscale-GPL.xcframework.zip",
checksum: "cac0a48f8a8f3b7387042c0cdf9f642045c16d9fdad9e42280904040669d6e05"
),
//AUTO_GENERATE_TARGETS_BEGIN//
.binaryTarget(
name: "Libcrypto",
url: "https://github.com/mpvkit/openssl-build/releases/download/3.3.5/Libcrypto.xcframework.zip",
checksum: "593283be2a90f7fd66f6e6ed331b2f099cf403e0926fe3b4ac09a7062b793965"
),
.binaryTarget(
name: "Libssl",
url: "https://github.com/mpvkit/openssl-build/releases/download/3.3.5/Libssl.xcframework.zip",
checksum: "ff5ffd43d015d7285fd37e4a3145b25cbd8d2842740bd629a711c299a20e226a"
),
.binaryTarget(
name: "gmp",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.11/gmp.xcframework.zip",
checksum: "ad33c7a08f4cdcb9924c8f0e6d9a054dad33d7794b97667bf8b6fb2b236ae585"
),
.binaryTarget(
name: "nettle",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.11/nettle.xcframework.zip",
checksum: "0fdf3ebf8bd7b8bc8eee837cf27261cb4c52ae520b6576a2f468656aa1691e02"
),
.binaryTarget(
name: "hogweed",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.11/hogweed.xcframework.zip",
checksum: "25727c9fa67287fa0a4f4722f88bb8be669b23cd7e837e2d00870eb8a25d3f27"
),
.binaryTarget(
name: "gnutls",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.11/gnutls.xcframework.zip",
checksum: "3dbec5809339189bf9679e218c6cff387ebf8fb72745927835afc2678f5c9f4d"
),
.binaryTarget(
name: "Libunibreak",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.5/Libunibreak.xcframework.zip",
checksum: "940d9833cf4477d0a260d9f2b4066125bc0ff7bbc111ac3c90e774765b77a559"
),
.binaryTarget(
name: "Libfreetype",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.5/Libfreetype.xcframework.zip",
checksum: "496ca62488530e14b1e4624d20ee2b237c0bd675cd70c19da578a5768302d02d"
),
.binaryTarget(
name: "Libfribidi",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.5/Libfribidi.xcframework.zip",
checksum: "bc15e097b892f2f90424e4a27ba287070cc2f98a74a4da10e6d2481d15cf5ff9"
),
.binaryTarget(
name: "Libharfbuzz",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.5/Libharfbuzz.xcframework.zip",
checksum: "aa8e0b9ca0387dac74e3e93c86e34d11982bb013b28022d0e6966a8427a35b2e"
),
.binaryTarget(
name: "Libass",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.5/Libass.xcframework.zip",
checksum: "3f4c576d2818ceb4544aa2a20e1f55846511c5e706fd19adc3ea9fd842270498"
),
.binaryTarget(
name: "Libsmbclient",
url: "https://github.com/mpvkit/libsmbclient-build/releases/download/4.15.13-2512/Libsmbclient.xcframework.zip",
checksum: "3a53375fab11bc888cc553664ea5dd902208d04f0cc21ec746302bf356246b6f"
),
.binaryTarget(
name: "Libbluray",
url: "https://github.com/mpvkit/libbluray-build/releases/download/1.4.0/Libbluray.xcframework.zip",
checksum: "bc037d34e2b0b5ab7f202fb371f5fb298136cc66fdf406c2172185d06f53f18d"
),
.binaryTarget(
name: "Libuavs3d",
url: "https://github.com/mpvkit/libuavs3d-build/releases/download/1.2.1-fix/Libuavs3d.xcframework.zip",
checksum: "bd5256081486d16c51c868d755bf70266c424b54c895269580de44ec6707f789"
),
.binaryTarget(
name: "Libdovi",
url: "https://github.com/mpvkit/libdovi-build/releases/download/3.3.2/Libdovi.xcframework.zip",
checksum: "e693e239808350868e79c5448ef9f02e2716bc822dd8632a41a368a1eae5ca7d"
),
.binaryTarget(
name: "MoltenVK",
url: "https://github.com/mpvkit/moltenvk-build/releases/download/1.4.2/MoltenVK.xcframework.zip",
checksum: "aee189c54ad7c62bf734a3dc51eb4cfad5685d1d63b0ec519ecd1b437c332418"
),
.binaryTarget(
name: "Libshaderc_combined",
url: "https://github.com/mpvkit/libshaderc-build/releases/download/2025.5.0/Libshaderc_combined.xcframework.zip",
checksum: "758047b615708575b580eb960a2d083f760a29dc462d6eaa360416c946ce433b"
),
.binaryTarget(
name: "lcms2",
url: "https://github.com/mpvkit/lcms2-build/releases/download/2.17.0/lcms2.xcframework.zip",
checksum: "dc0dce0606f6ab6841a8ec5a6bd4448e2f3ef00661a050460f806c9393dc6982"
),
.binaryTarget(
name: "Libplacebo",
url: "https://github.com/mpvkit/libplacebo-build/releases/download/7.360.1/Libplacebo.xcframework.zip",
checksum: "2fa3d54cb81f302d6f11c7b2f509af30944381c3b11ee9d35096eb4637a6e2dd"
),
.binaryTarget(
name: "Libdav1d",
url: "https://github.com/mpvkit/libdav1d-build/releases/download/1.5.3/Libdav1d.xcframework.zip",
checksum: "d1a32ae6a1f0193e9f05c44c9176844af7f6d2a58cb33843f6f1b8dfd9224083"
),
.binaryTarget(
name: "Libavcodec",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavcodec.xcframework.zip",
checksum: "d516e904490c711c2875dd238d7d8d9f4f46e335829cb8ee7e0e1623e952e372"
),
.binaryTarget(
name: "Libavdevice",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavdevice.xcframework.zip",
checksum: "f29bde9d8f788337996f8b2759645a6e22e9056e4bc1e3494458193405f50a5d"
),
.binaryTarget(
name: "Libavformat",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavformat.xcframework.zip",
checksum: "0a840424d7a2d971687d6e96d995e21420cce1b27dae74687ff4f5f31dc36e73"
),
.binaryTarget(
name: "Libavfilter",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavfilter.xcframework.zip",
checksum: "e764dc3b3d36abb26d6d0ae2f0c6a1de0b80a453f3ca4bf2bb6596c0f6464b19"
),
.binaryTarget(
name: "Libavutil",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libavutil.xcframework.zip",
checksum: "0ca518d2a3eab22763310d8bcdc977494ddb3daf3dc3b73a2ed84c5eefc13f75"
),
.binaryTarget(
name: "Libswresample",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libswresample.xcframework.zip",
checksum: "49edabb3c2e7fb97e6458f2e6a2fea66ab567b55258141e598fecfcd29cd9eeb"
),
.binaryTarget(
name: "Libswscale",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libswscale.xcframework.zip",
checksum: "5aebc8107219d518d8e89f0af97365ff9758f91b3096a7d5c1a16e092745de39"
),
.binaryTarget(
name: "Libuchardet",
url: "https://github.com/mpvkit/libuchardet-build/releases/download/0.0.8/Libuchardet.xcframework.zip",
checksum: "ea4f548a230a755e059144657cc9e2ff563c1cdeae03974c38f8b6e1a40303fb"
),
.binaryTarget(
name: "Libluajit",
url: "https://github.com/mpvkit/libluajit-build/releases/download/2.1.0-fix/Libluajit.xcframework.zip",
checksum: "3a171ef1627fb88260893dc452f989bd93dd8510814771ba3aff7753470d3f3e"
),
.binaryTarget(
name: "Libmpv",
url: "https://github.com/mpvkit/MPVKit/releases/download/1.1.0-n9.0.2/Libmpv.xcframework.zip",
checksum: "1d8651bebfe467bd5408751647de692cdacb1d19ba825e11785d770bc88c3225"
),
//AUTO_GENERATE_TARGETS_END//
]
)