mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
175 lines
6.9 KiB
Diff
175 lines
6.9 KiB
Diff
# Various Swift components require linking against `curses`; Gentoo doesn't use
|
|
# `curses` as an alias for `ncurses`, so we have to link against `ncurses`
|
|
# explicitly. `ncurses` on Gentoo also doesn't expose the `curses` terminfo
|
|
# database interface (e.g., `set_curterm`, `del_curterm`, etc.), so we have to
|
|
# also explicitly link against `tinfo`.
|
|
|
|
--- a/swift/utils/test-clustered-bit-vector/Makefile
|
|
+++ b/swift/utils/test-clustered-bit-vector/Makefile
|
|
@@ -5,7 +5,7 @@ HEADERS=${SRCROOT}/tools/swift/include/swift/Basic/ClusteredBitVector.h
|
|
SOURCES=${SRCROOT}/tools/swift/lib/Basic/ClusteredBitVector.cpp
|
|
|
|
generator: generator.cpp ${HEADERS} ${SOURCES}
|
|
- xcrun clang++ -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lcurses generator.cpp ${SOURCES} -o generator
|
|
+ xcrun clang++ -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lncurses -ltinfo generator.cpp ${SOURCES} -o generator
|
|
|
|
test: test.cpp ${HEADERS} ${SOURCES}
|
|
- xcrun clang++ -g -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lcurses test.cpp ${SOURCES} -o test
|
|
+ xcrun clang++ -g -std=c++11 -stdlib=libc++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I${OBJROOT}/include -I${SRCROOT}/include -I${SRCROOT}/tools/swift/include -L${OBJROOT}/lib -lLLVMSupport -lncurses -ltinfo test.cpp ${SOURCES} -o test
|
|
--- a/swift/utils/test-prefix-map/Makefile
|
|
+++ b/swift/utils/test-prefix-map/Makefile
|
|
@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
|
|
-I$(objroot)/tools/clang/include \
|
|
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
|
|
|
|
-LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lcurses
|
|
+LDFLAGS = -L$(objroot)/lib -lswiftBasic -lLLVMSupport -lncurses -ltinfo
|
|
|
|
main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/PrefixMap.h
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
|
|
--- a/swift/utils/test-successor-map/Makefile
|
|
+++ b/swift/utils/test-successor-map/Makefile
|
|
@@ -11,7 +11,7 @@ CXXFLAGS = -std=c++11 \
|
|
-I$(objroot)/tools/clang/include \
|
|
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS
|
|
|
|
-LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lcurses
|
|
+LDFLAGS = -L$(objroot)/Debug+Asserts/lib -lLLVMSupport -lncurses -ltinfo
|
|
|
|
main: main.cpp $(srcroot)/tools/swift/include/swift/Basic/SuccessorMap.h
|
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o main main.cpp
|
|
--- a/llbuild/Package.swift
|
|
+++ b/llbuild/Package.swift
|
|
@@ -31,7 +31,10 @@ let terminfoLibraries: [LinkerSetting] = {
|
|
#if os(FreeBSD) || os(OpenBSD)
|
|
return [.linkedLibrary("ncurses")]
|
|
#else
|
|
- return [.linkedLibrary("ncurses", .when(platforms: [.linux, .macOS]))]
|
|
+ return [
|
|
+ .linkedLibrary("ncurses", .when(platforms: [.linux, .macOS])),
|
|
+ .linkedLibrary("tinfo", .when(platforms: [.linux]))
|
|
+ ]
|
|
#endif
|
|
}()
|
|
|
|
--- a/llbuild/lib/llvm/Support/CMakeLists.txt
|
|
+++ b/llbuild/lib/llvm/Support/CMakeLists.txt
|
|
@@ -65,7 +65,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|OpenBSD")
|
|
endif()
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Android|Darwin|Linux|FreeBSD")
|
|
- target_link_libraries(llvmSupport PRIVATE curses)
|
|
+ target_link_libraries(llvmSupport PRIVATE ncurses tinfo)
|
|
endif()
|
|
|
|
set_property(GLOBAL APPEND PROPERTY LLBuild_EXPORTS llvmSupport)
|
|
--- a/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
|
|
+++ b/llbuild/perftests/Xcode/PerfTests/CMakeLists.txt
|
|
@@ -33,7 +33,8 @@ target_link_libraries(XcodePerfTests PRIVATE
|
|
llbuildNinja
|
|
llbuildBuildSystem
|
|
llbuildCommands
|
|
- curses
|
|
+ ncurses
|
|
+ tinfo
|
|
SQLite::SQLite3
|
|
"${MACOSX_SDK_PATH}/System/Library/Frameworks/Foundation.framework"
|
|
"${MACOSX_PLATFORM_PATH}/Developer/Library/Frameworks/XCTest.framework"
|
|
--- a/llbuild/products/libllbuild/CMakeLists.txt
|
|
+++ b/llbuild/products/libllbuild/CMakeLists.txt
|
|
@@ -23,7 +23,7 @@ target_link_libraries(llbuild PRIVATE
|
|
|
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
|
|
target_link_libraries(llbuild PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
|
|
target_include_directories(llbuild
|
|
--- a/llbuild/products/llbuild/CMakeLists.txt
|
|
+++ b/llbuild/products/llbuild/CMakeLists.txt
|
|
@@ -15,5 +15,5 @@ set_target_properties(llbuild-tool PROPERTIES
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(llbuild-tool PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
--- a/llbuild/products/swift-build-tool/CMakeLists.txt
|
|
+++ b/llbuild/products/swift-build-tool/CMakeLists.txt
|
|
@@ -10,7 +10,7 @@ target_link_libraries(swift-build-tool PRIVATE
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(swift-build-tool PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
|
|
install(TARGETS swift-build-tool
|
|
--- a/llbuild/tests/lit.site.cfg.in
|
|
+++ b/llbuild/tests/lit.site.cfg.in
|
|
@@ -21,7 +21,7 @@ config.sqlite_library = "@SQLite3_LIBRARY@"
|
|
if sys.platform == 'Windows':
|
|
config.curses_library = ''
|
|
else:
|
|
- config.curses_library = '-lcurses'
|
|
+ config.curses_library = '-lncurses -ltinfo'
|
|
config.threads_library = "@CMAKE_THREAD_LIBS_INIT@"
|
|
if "@CMAKE_DL_LIBS@":
|
|
config.dl_library = "-l@CMAKE_DL_LIBS@"
|
|
--- a/llbuild/unittests/Basic/CMakeLists.txt
|
|
+++ b/llbuild/unittests/Basic/CMakeLists.txt
|
|
@@ -14,5 +14,5 @@ target_link_libraries(BasicTests PRIVATE
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(BasicTests PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
--- a/llbuild/unittests/BuildSystem/CMakeLists.txt
|
|
+++ b/llbuild/unittests/BuildSystem/CMakeLists.txt
|
|
@@ -16,5 +16,5 @@ target_link_libraries(BuildSystemTests PRIVATE
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(BuildSystemTests PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
--- a/llbuild/unittests/CAPI/CMakeLists.txt
|
|
+++ b/llbuild/unittests/CAPI/CMakeLists.txt
|
|
@@ -15,5 +15,5 @@ target_link_libraries(CAPITests PRIVATE
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(CAPITests PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
--- a/llbuild/unittests/Core/CMakeLists.txt
|
|
+++ b/llbuild/unittests/Core/CMakeLists.txt
|
|
@@ -15,6 +15,6 @@ target_link_libraries(CoreTests PRIVATE
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(CoreTests PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
|
|
--- a/llbuild/unittests/Ninja/CMakeLists.txt
|
|
+++ b/llbuild/unittests/Ninja/CMakeLists.txt
|
|
@@ -8,5 +8,5 @@ target_link_libraries(NinjaTests PRIVATE
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(NinjaTests PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|
|
--- a/llbuild/utils/adjust-times/CMakeLists.txt
|
|
+++ b/llbuild/utils/adjust-times/CMakeLists.txt
|
|
@@ -7,5 +7,5 @@ target_link_libraries(adjust-times PRIVATE llvmSupport)
|
|
|
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
|
target_link_libraries(adjust-times PRIVATE
|
|
- curses)
|
|
+ ncurses tinfo)
|
|
endif()
|