-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathPackage.swift
309 lines (284 loc) · 13.4 KB
/
Package.swift
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.8
import PackageDescription
let package = Package(
name: "MPVKit",
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13)],
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/0.39.0/Libmpv-GPL.xcframework.zip",
checksum: "04e16085c24ade3405d369b6accc8dceb5a85da10d2f8c1870bdee656f851ed2"
),
.binaryTarget(
name: "Libavcodec-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavcodec-GPL.xcframework.zip",
checksum: "52a618b72c0154ec5ae2f08320e0719d2d133d5a89706a4406b866580139e2e4"
),
.binaryTarget(
name: "Libavdevice-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavdevice-GPL.xcframework.zip",
checksum: "63ab64e4df521c7bbcc97dc606d1e155f3181ca364ec4937f3c7fd29a1815104"
),
.binaryTarget(
name: "Libavformat-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavformat-GPL.xcframework.zip",
checksum: "b6a611edefa59730720452283be6ddce83a4c41a1fcff078d84ab13231f89995"
),
.binaryTarget(
name: "Libavfilter-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavfilter-GPL.xcframework.zip",
checksum: "fcbc63a2989e918b3647b82a10488c69e7cb91903f9c699335df32874fb375e5"
),
.binaryTarget(
name: "Libavutil-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavutil-GPL.xcframework.zip",
checksum: "6a2d90a96cb1b77e7ec8951161afdcf3673dbf5169efb759ebfef86f21e01857"
),
.binaryTarget(
name: "Libswresample-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libswresample-GPL.xcframework.zip",
checksum: "f06f5d3484af8a500f771b40a62f8478662d94e57040765422dca63fb2eb3240"
),
.binaryTarget(
name: "Libswscale-GPL",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libswscale-GPL.xcframework.zip",
checksum: "e5714164e5f2e95c16d0f5b45b1b8ae4ea438aeed0b3480d813b471b09ba426c"
),
//AUTO_GENERATE_TARGETS_BEGIN//
.binaryTarget(
name: "Libcrypto",
url: "https://github.com/mpvkit/openssl-build/releases/download/3.2.0/Libcrypto.xcframework.zip",
checksum: "89989ea14f7297d98083eb8adfba9b389f5b4886cb54fb3d5b6e8b915b7adf1d"
),
.binaryTarget(
name: "Libssl",
url: "https://github.com/mpvkit/openssl-build/releases/download/3.2.0/Libssl.xcframework.zip",
checksum: "46ad8e8fa5a6efe7bd31c9b3c56b20c1bc29a581083588d86e941d261d7dbe98"
),
.binaryTarget(
name: "gmp",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.3/gmp.xcframework.zip",
checksum: "defd5623e6786543588001b8f33026395960a561540738deb6df6996d39f957d"
),
.binaryTarget(
name: "nettle",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.3/nettle.xcframework.zip",
checksum: "c3b8f506fa32bcb3f9bf65096b0556c4f5973f846ee964577d783edbe8e6969d"
),
.binaryTarget(
name: "hogweed",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.3/hogweed.xcframework.zip",
checksum: "47a34e7877f7ebd9175f5645059030e553276faa9a21b91e29fb7463b94e8daf"
),
.binaryTarget(
name: "gnutls",
url: "https://github.com/mpvkit/gnutls-build/releases/download/3.8.3/gnutls.xcframework.zip",
checksum: "5f5cf903a2d52157c29ad304260709f618ce086afea02061241982f8425a6fb0"
),
.binaryTarget(
name: "Libunibreak",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.3/Libunibreak.xcframework.zip",
checksum: "430ed1a8ff1a230bd93b6868021cde2aafb23c8cb2d586525836cac47c4f310f"
),
.binaryTarget(
name: "Libfreetype",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.3/Libfreetype.xcframework.zip",
checksum: "300d2966c914e06f0211d8da0ea6208a345709b888e9cbbf1cdd94df26330359"
),
.binaryTarget(
name: "Libfribidi",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.3/Libfribidi.xcframework.zip",
checksum: "4a3122a2027f021937ed0fa07173dca7f2c1c4c4202b7caf8043fa80408c0953"
),
.binaryTarget(
name: "Libharfbuzz",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.3/Libharfbuzz.xcframework.zip",
checksum: "f607773598caa72435d8b19ce6a9d54fa7f26cde126b6b66c0a3d2804f084c68"
),
.binaryTarget(
name: "Libass",
url: "https://github.com/mpvkit/libass-build/releases/download/0.17.3/Libass.xcframework.zip",
checksum: "af24cd1429069153f0ca5c650e0b374c27ae38283aca47cbbbc9edb3165b182e"
),
.binaryTarget(
name: "Libsmbclient",
url: "https://github.com/mpvkit/libsmbclient-build/releases/download/4.15.13/Libsmbclient.xcframework.zip",
checksum: "589db9c241e6cc274f2825bee542add273febd0666ebd7ea8a402574ed76e9af"
),
.binaryTarget(
name: "Libuavs3d",
url: "https://github.com/mpvkit/libuavs3d-build/releases/download/1.2.1/Libuavs3d.xcframework.zip",
checksum: "893257fc73c61b87fb45ee9de7df6ac4a6967062d7cac2c8d136cd2774a04971"
),
.binaryTarget(
name: "Libdovi",
url: "https://github.com/mpvkit/libdovi-build/releases/download/3.3.0/Libdovi.xcframework.zip",
checksum: "ca4382ea4e17103fbcc979d0ddee69a6eb8967c0ab235cb786ffa96da5f512ed"
),
.binaryTarget(
name: "MoltenVK",
url: "https://github.com/mpvkit/moltenvk-build/releases/download/1.2.9-fix/MoltenVK.xcframework.zip",
checksum: "63836d61deceb5721ff0790dac651890e44ef770ab7b971fb83cc1b2524d1025"
),
.binaryTarget(
name: "Libshaderc_combined",
url: "https://github.com/mpvkit/libshaderc-build/releases/download/2024.2.0/Libshaderc_combined.xcframework.zip",
checksum: "1ccd9fce68ea29af030dceb824716fc16d1f4dcdc0b912ba366d5cb91d7b1add"
),
.binaryTarget(
name: "lcms2",
url: "https://github.com/mpvkit/libplacebo-build/releases/download/7.349.0/lcms2.xcframework.zip",
checksum: "bd2c27366f8b7adfe7bf652a922599891c55b82f5c519bcc4eece1ccff57c889"
),
.binaryTarget(
name: "Libplacebo",
url: "https://github.com/mpvkit/libplacebo-build/releases/download/7.349.0/Libplacebo.xcframework.zip",
checksum: "f32d20351289a080cd7288742747cd927553fde8c217f63263b838083d07a01a"
),
.binaryTarget(
name: "Libdav1d",
url: "https://github.com/mpvkit/libdav1d-build/releases/download/1.4.3/Libdav1d.xcframework.zip",
checksum: "eccfe37da9418e350bc6c1566890fa5b9585fbb87b8ceb664de77800ef17fe04"
),
.binaryTarget(
name: "Libavcodec",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavcodec.xcframework.zip",
checksum: "60695e43fbfa84198b43fa5e211bcc1548f0d4255218a6397e7923a174e59f88"
),
.binaryTarget(
name: "Libavdevice",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavdevice.xcframework.zip",
checksum: "6c1e204541b4d871aeb2cce94c4bbe737c3d43fc8299e61d558cfd73eb8024ac"
),
.binaryTarget(
name: "Libavformat",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavformat.xcframework.zip",
checksum: "71510d05e433c86d3c1d0c1806d49381ec57ae544783528afab962e4c48e9ded"
),
.binaryTarget(
name: "Libavfilter",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavfilter.xcframework.zip",
checksum: "e28e76a0ecbe8fbf3d09cff61bce7044556f480a6b3557027c9806c31edf8c54"
),
.binaryTarget(
name: "Libavutil",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libavutil.xcframework.zip",
checksum: "a62ca08dae96690533065c6607e143b47aedd6e2bb39e7136e9a91630e47dd26"
),
.binaryTarget(
name: "Libswresample",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libswresample.xcframework.zip",
checksum: "463469f279a9c280f8a3abc1ce07e18ecde9df3fdd51200aa6334c9bb0419d4d"
),
.binaryTarget(
name: "Libswscale",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libswscale.xcframework.zip",
checksum: "6ceedcfb0223a11176b732f35eac993b50757c528af09cead7612763d3c088e9"
),
.binaryTarget(
name: "Libuchardet",
url: "https://github.com/mpvkit/libuchardet-build/releases/download/0.0.8/Libuchardet.xcframework.zip",
checksum: "80b14d8080c2531ced6d6b234a826c13f0be459a8c751815f68e0eefd34afa30"
),
.binaryTarget(
name: "Libluajit",
url: "https://github.com/mpvkit/libluajit-build/releases/download/2.1.0/Libluajit.xcframework.zip",
checksum: "3765d7c6392b4f9a945b334ed593747b8adb9345078717ecfb6d7d12114a0f9e"
),
.binaryTarget(
name: "Libbluray",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libbluray.xcframework.zip",
checksum: "7da1f8484447360452b3f24a1cd2d51773486b1c61eeb0215011c4cb07130856"
),
.binaryTarget(
name: "Libmpv",
url: "https://github.com/mpvkit/MPVKit/releases/download/0.39.0/Libmpv.xcframework.zip",
checksum: "2b31bd9ce180d96bf68232e72f6cce32696b770cb2370e63f307e8dd4ec7ec85"
),
//AUTO_GENERATE_TARGETS_END//
]
)