22
33import PackageDescription
44
5+ let linuxPlatforms : [ Platform ] = [ . linux, . openbsd]
6+
57let package = Package (
68 name: " MachOKit " ,
79 platforms: [
@@ -35,7 +37,11 @@ let package = Package(
3537 ) ,
3638 . package (
3739 url: " https://github.com/p-x9/ObjectArchiveKit.git " ,
38- from: " 0.3.0 "
40+ from: " 0.5.0 "
41+ ) ,
42+ . package (
43+ url: " https://github.com/apple/swift-crypto.git " ,
44+ " 1.0.0 " ..< " 4.0.0 "
3945 ) ,
4046 ] ,
4147 targets: [
@@ -44,7 +50,12 @@ let package = Package(
4450 dependencies: [
4551 " MachOKitC " ,
4652 . product( name: " FileIO " , package : " swift-fileio " ) ,
47- . product( name: " FileIOBinary " , package : " swift-fileio-extra " )
53+ . product( name: " FileIOBinary " , package : " swift-fileio-extra " ) ,
54+ . product(
55+ name: " Crypto " ,
56+ package : " swift-crypto " ,
57+ condition: . when( platforms: linuxPlatforms)
58+ )
4859 ] ,
4960 swiftSettings: SwiftSetting . allCases + [
5061 . enableExperimentalFeature( " AccessLevelOnImport " , . when( configuration: . debug) )
@@ -102,23 +113,6 @@ if isForBinaryKitFramework {
102113 ]
103114}
104115
105- // MARK: - Crypto
106-
107- #if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && canImport(CommonCrypto)
108- /* Do Nothing */
109- #else
110- package . dependencies += [
111- . package ( url: " https://github.com/apple/swift-crypto.git " , " 1.0.0 " ..< " 4.0.0 " )
112- ]
113-
114- machOKit? . dependencies += [
115- . product(
116- name: " Crypto " ,
117- package : " swift-crypto "
118- )
119- ]
120- #endif
121-
122116// https://github.com/treastrain/swift-upcomingfeatureflags-cheatsheet
123117extension SwiftSetting {
124118 static let forwardTrailingClosures : Self = . enableUpcomingFeature( " ForwardTrailingClosures " ) // SE-0286, Swift 5.3, SwiftPM 5.8+
0 commit comments