-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPackage.swift
More file actions
93 lines (91 loc) · 3.34 KB
/
Copy pathPackage.swift
File metadata and controls
93 lines (91 loc) · 3.34 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
// swift-tools-version:6.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Munin",
platforms: [
.macOS(.v14)
],
products: [
.executable(
name: "munin",
targets: ["Munin"]
),
.library(
name: "MuninKit",
targets: ["MuninKit"]
),
],
dependencies: [
.package(url: "https://github.com/kradalby/SwiftExif.git", from: "0.1.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.12.0"),
// vapor/console-kit provides the progress/activity indicator UI that
// replaced swift-tools-support-core's PercentProgressAnimation.
.package(url: "https://github.com/vapor/console-kit.git", from: "4.16.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.7.1"),
// apple/swift-system provides FilePath for typed path handling. Used
// internally in MuninKit's `Paths` helpers; public API is still String.
.package(url: "https://github.com/apple/swift-system.git", from: "1.6.4"),
// apple/swift-crypto provides SHA256 on Linux (mirroring CryptoKit's API
// on Darwin). Used both in MuninKit proper (for source-file content
// hashing) and in the test support layer (for filesystem snapshots).
.package(url: "https://github.com/apple/swift-crypto.git", "3.0.0"..<"5.0.0"),
],
targets: [
// libvips itself. `pkgConfig` is read by SwiftPM's own .pc parser, not by
// pkg-config(1), and that parser reads `Libs` but not `Requires.private` —
// so a static link comes up short by every transitive archive. nix/
// munin-static.nix runs `pkg-config --static` itself and passes the result
// through -Xlinker.
.systemLibrary(
name: "Cvips",
pkgConfig: "vips",
providers: [.apt(["libvips-dev"]), .brew(["vips"])]
),
// Fixed-arity wrappers for the libvips operations Munin performs. They
// exist only because those entry points are NULL-terminated C variadics,
// which Swift cannot call. See Sources/MuninVipsShim/include.
.target(
name: "MuninVipsShim",
dependencies: ["Cvips"]
),
// The Swift binding. A target of its own rather than a file in MuninKit
// so that touching libvips requires `import MuninVips`: MuninKit depends
// on this and not on Cvips/MuninVipsShim, and ImagingFacadeTests fails
// any import outside the Imaging facade.
.target(
name: "MuninVips",
dependencies: ["Cvips", "MuninVipsShim"]
),
.executableTarget(
name: "Munin",
dependencies: [
"MuninKit",
.product(name: "Logging", package: "swift-log"),
.product(name: "ArgumentParser", package: "swift-argument-parser"),
]
),
.target(
name: "MuninKit",
dependencies: [
.product(name: "Logging", package: "swift-log"),
"MuninVips",
.product(name: "ConsoleKitTerminal", package: "console-kit"),
.product(name: "SystemPackage", package: "swift-system"),
.product(name: "Crypto", package: "swift-crypto"),
"SwiftExif",
]
),
.testTarget(
name: "MuninTests",
dependencies: ["Munin"]
),
.testTarget(
name: "MuninKitTests",
dependencies: [
"MuninKit",
.product(name: "Crypto", package: "swift-crypto"),
]
),
]
)