Unverified Commit d18cfb10 authored by Sam's avatar Sam
Browse files

swiftPackages.swiftpm: drop upstreamed patches

Some of these were not technically upstreamed but all have been fixed
parent 483fd74a
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ let
    propagatedBuildInputs = [ Foundation ];
    patches = [
      ./patches/cmake-disable-rpath.patch
      ./patches/cmake-fix-quoting.patch
      ./patches/disable-index-store.patch
      ./patches/disable-sandbox.patch
      ./patches/disable-xctest.patch
@@ -59,21 +58,6 @@ let
        --replace-fail \
          'librariesPath = applicationPath.parentDirectory' \
          "librariesPath = try AbsolutePath(validating: \"$out\")"

      # Fix case-sensitivity issues.
      # Upstream PR: https://github.com/apple/swift-package-manager/pull/6500
      substituteInPlace Sources/CMakeLists.txt \
        --replace \
          'packageCollectionsSigning' \
          'PackageCollectionsSigning'
      substituteInPlace Sources/PackageCollectionsSigning/CMakeLists.txt \
        --replace \
          'SubjectPublickeyInfo' \
          'SubjectPublicKeyInfo'
      substituteInPlace Sources/PackageCollections/CMakeLists.txt \
        --replace \
          'FilepackageCollectionsSourcesStorage' \
          'FilePackageCollectionsSourcesStorage'
    '';
  };

@@ -201,24 +185,10 @@ let
      '';
  };

  # Part of this patch fixes for glibc 2.39: glibc patch 64b1a44183a3094672ed304532bedb9acc707554
  # marks the `FILE*` argument to a few functions including `ferror` & `fread` as non-null. However
  # the code passes an `Optional<T>` to these functions.
  # This patch uses a `guard` which effectively unwraps the type (or throws an exception).
  swift-tools-support-core-glibc-fix = fetchpatch {
    url = "https://github.com/apple/swift-tools-support-core/commit/990afca47e75cce136d2f59e464577e68a164035.patch";
    hash = "sha256-PLzWsp+syiUBHhEFS8+WyUcSae5p0Lhk7SSRdNvfouE=";
    includes = [ "Sources/TSCBasic/FileSystem.swift" ];
  };

  swift-tools-support-core = mkBootstrapDerivation {
    name = "swift-tools-support-core";
    src = generated.sources.swift-tools-support-core;

    patches = [
      swift-tools-support-core-glibc-fix
    ];

    buildInputs = [
      swift-system
      sqlite
@@ -414,7 +384,6 @@ stdenv.mkDerivation (
      swiftpmMakeMutable swift-tools-support-core
      substituteInPlace .build/checkouts/swift-tools-support-core/Sources/TSCTestSupport/XCTestCasePerf.swift \
        --replace-fail 'canImport(Darwin)' 'false'
      patch -p1 -d .build/checkouts/swift-tools-support-core -i ${swift-tools-support-core-glibc-fix}

      # Prevent a warning about SDK directories we don't have.
      swiftpmMakeMutable swift-driver
+0 −12
Original line number Diff line number Diff line
--- a/Sources/PackageCollectionsSigning/CMakeLists.txt
+++ b/Sources/PackageCollectionsSigning/CMakeLists.txt
@@ -43,6 +43,7 @@ target_link_libraries(PackageCollectionsSigning PUBLIC
   PackageCollectionsModel
   TSCBasic)
 target_link_libraries(PackageCollectionsSigning PRIVATE
-  PackageCollectionsSigningLibc
-  $<$<PLATFORM_ID:Darwin>:SHELL:-Xlinker -framework -Xlinker Security>)
+  PackageCollectionsSigningLibc)
+target_link_options(PackageCollectionsSigning PRIVATE
+  "$<$<PLATFORM_ID:Darwin>:SHELL:-Xlinker -framework -Xlinker Security>")