From c12125be6fbcd2e3b162eb6c3ffdc71270a28709 Mon Sep 17 00:00:00 2001 From: Daniel Alm Date: Tue, 29 May 2018 14:24:25 +0200 Subject: [PATCH] Re-add swift-nio-zlib-support for macOS builds. --- Package.swift | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/Package.swift b/Package.swift index ad4ced6e8..a7f9abb2b 100644 --- a/Package.swift +++ b/Package.swift @@ -17,39 +17,23 @@ */ import PackageDescription -var dependencies: [Package.Dependency] = [ - .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.0.2"), - .package(url: "https://github.com/kylef/Commander.git", from: "0.8.0") -] - var cGRPCDependencies: [Target.Dependency] = [] -#if os(Linux) +#if !os(Linux) // On Linux, Foundation links with openssl, so we'll need to use that instead of BoringSSL. // See https://github.com/apple/swift-nio-ssl/issues/16#issuecomment-392705505 for details. -dependencies.append(.package(url: "https://github.com/apple/swift-nio-ssl-support.git", from: "1.0.0")) -#else cGRPCDependencies.append("BoringSSL") #endif -/* - * `swift-nio-zlib-support` uses `pkgConfig` to find `zlib` on - * non-Apple platforms. Details here: - * https://github.com/apple/swift-nio-zlib-support/issues/2#issuecomment-384681975 - * - * This doesn't play well with Macports, so require it only for non-Apple - * platforms, until there is a better solution. - * Issue: https://github.com/grpc/grpc-swift/issues/220 - */ -#if !os(macOS) -dependencies.append(.package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0")) -#endif - let package = Package( name: "SwiftGRPC", products: [ .library(name: "SwiftGRPC", targets: ["SwiftGRPC"]), ], - dependencies: dependencies, + dependencies: [ + .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.0.2"), + .package(url: "https://github.com/kylef/Commander.git", from: "0.8.0"), + .package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0") + ], targets: [ .target(name: "SwiftGRPC", dependencies: ["CgRPC", "SwiftProtobuf"]),