forked from superuser404notfound/AetherEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
96 lines (94 loc) · 4.84 KB
/
Copy pathPackage.swift
File metadata and controls
96 lines (94 loc) · 4.84 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
// swift-tools-version: 6.0
import PackageDescription
let package = Package(
name: "AetherEngine",
platforms: [
.iOS(.v16),
.tvOS(.v17),
.macOS(.v14),
.visionOS(.v1),
],
products: [
.library(
name: "AetherEngine",
targets: ["AetherEngine"]
),
.library(
name: "AetherEngineSMB",
targets: ["AetherEngineSMB"]
),
// aetherctl is intentionally not exposed as a product. The target
// uses Foundation.Process, which is unavailable on tvOS/iOS, so
// exposing it would force SPM consumers to compile it on those
// platforms. The target is preserved below so `swift build` on
// macOS still produces the CLI for upstream development.
],
dependencies: [
// Minimal FFmpeg build (avcodec, avformat, avutil, swresample only).
// No network stack, we use custom AVIO + URLSession for HTTP streams.
// Resolved over Git rather than a local path so consumers (and
// Xcode Cloud) can build without a sibling FFmpegBuild checkout.
// Pinned to the minor rather than `from:`: this package ships the
// prebuilt decode stack, so a floating minor silently changes which
// FFmpeg a released engine tag runs (2.3.0 -> 2.4.0 did exactly that
// under 5.28.0), and a minor that raises a platform floor retroactively
// breaks every tag that floats onto it (LibDovi 1.1.0, below). Patch
// rebuilds still reach existing tags, which is where a pure rebuild
// belongs; anything that adds slices or enables a component is a minor
// and reaches consumers through an engine release.
.package(url: "https://github.com/superuser404notfound/FFmpegBuild", .upToNextMinor(from: "2.4.0")), // 2.4.0: visionOS (xros) device + simulator slices; 2.3.0: webvtt demuxer (standalone .vtt sidecars, plus the cue settings as packet side data); 2.2.0: matroska TTS warn-only per RFC 9559 (#145 rework); 2.1.3: sup demuxer (raw PGS sidecars); 2.1.2: matroska TrackTimestampScale clamp (#145, dropped in 2.2.0); 2.1.1: pgssubdec Epoch-Continue retain (#142); 2.1.0: yadif_videotoolbox + hwupload (Metal GPU deinterlace); 2.0.0: dynamic frameworks (LGPL), zvbi GPL excision
// Pure-Swift SMB2 client (MIT) that speaks the protocol over
// NWConnection. Replaces AMSMB2/libsmb2, which EPERMs on tvOS/iOS.
// Pinned to the 0.3.x minor: SMBClient is pre-1.0 with an actively
// moving API, so allow patch updates but not a minor bump.
.package(url: "https://github.com/kishikawakatsumi/SMBClient", .upToNextMinor(from: "0.3.1")),
// libdovi (Dolby Vision RPU parser/converter). Resolved over Git like
// FFmpegBuild so consumers (and Xcode Cloud) build without a sibling
// LibDovi checkout; the prebuilt xcframework needs no Rust at build time.
// Pinned to the minor for the same reason as FFmpegBuild above, with a
// worked example: 1.1.0 shipped a tvOS floor raise as a minor, SwiftPM
// floated every `from: "1.0.x"` consumer onto it and then failed on the
// floor instead of backing off, so all of 5.x stopped resolving.
.package(url: "https://github.com/superuser404notfound/LibDovi", .upToNextMinor(from: "2.0.0")), // 2.0.0: visionOS (xros) device + simulator slices, declared tvOS floor corrected to 17.0 (was published as 1.1.0, withdrawn: a floor raise is breaking and broke every 5.x pin that floated onto it); 1.0.2: iOS slices + x86_64 (Intel Macs)
],
targets: [
.target(
name: "AetherEngine",
dependencies: [
.product(name: "FFmpegBuild", package: "FFmpegBuild"),
.product(name: "Dovi", package: "LibDovi"),
],
linkerSettings: [
.linkedFramework("AVFoundation"),
.linkedFramework("AVKit"),
.linkedFramework("CoreMedia"),
.linkedFramework("CoreVideo"),
.linkedFramework("VideoToolbox"),
.linkedFramework("AudioToolbox"),
]
),
.target(
name: "AetherEngineSMB",
dependencies: [
"AetherEngine",
.product(name: "SMBClient", package: "SMBClient"),
],
path: "Sources/AetherEngineSMB"
),
.executableTarget(
name: "aetherctl",
dependencies: ["AetherEngine", "AetherEngineSMB"],
path: "Sources/aetherctl"
),
.testTarget(
name: "AetherEngineTests",
dependencies: ["AetherEngine"],
path: "Tests/AetherEngineTests"
),
.testTarget(
name: "AetherEngineSMBTests",
dependencies: ["AetherEngineSMB"],
path: "Tests/AetherEngineSMBTests"
),
]
)