Skip to content

Commit a5c6cc6

Browse files
committed
Don't modify curses libraries that are only downloaded for llbuild/SwiftPM on the CI
Fixes #211
1 parent 5cffea9 commit a5c6cc6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

get-packages-and-swift-source.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,11 @@ for soFile in try fmd.contentsOfDirectory(atPath: libPath) {
245245
}
246246
}
247247

248-
// Rename ncurses for llbuild and add a symlink for SwiftPM
249-
try fmd.moveItem(atPath: libPath.appendingPathComponent("libncursesw.so"), toPath: libPath.appendingPathComponent("libcurses.so"))
250-
try fmd.createSymbolicLink(atPath: libPath.appendingPathComponent("libncurses.so"), withDestinationPath: "libcurses.so")
248+
if ProcessInfo.processInfo.environment["BUILD_SWIFT_PM"] != nil {
249+
// Rename ncurses for llbuild and add a symlink for SwiftPM
250+
try fmd.moveItem(atPath: libPath.appendingPathComponent("libncursesw.so"), toPath: libPath.appendingPathComponent("libcurses.so"))
251+
try fmd.createSymbolicLink(atPath: libPath.appendingPathComponent("libncurses.so"), withDestinationPath: "libcurses.so")
252+
}
251253

252254
// update the rpath to be $ORIGIN, set the soname, and update all the "needed" sections for each of the peer libraries
253255
for soFile in try fmd.contentsOfDirectory(atPath: libPath).filter({ $0.hasSuffix(".so")} ) {

0 commit comments

Comments
 (0)