pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lldb-git: Sync CMake patches with current needs



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun May 1 12:56:14 2016 +0200
Changeset:	cbe05c50011db6b3ebbd453dad54ac6e286ad2b6

Modified Files:
	lldb-git/distinfo
	lldb-git/patches/patch-scripts_CMakeLists.txt
Added Files:
	lldb-git/patches/patch-cmake_modules_LLDBStandalone.cmake

Log Message:
lldb-git: Sync CMake patches with current needs

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cbe05c50011db6b3ebbd453dad54ac6e286ad2b6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 lldb-git/distinfo                                  |   3 +-
 .../patch-cmake_modules_LLDBStandalone.cmake       | 152 +++++++++++++++++++++
 lldb-git/patches/patch-scripts_CMakeLists.txt      |   2 +-
 3 files changed, 155 insertions(+), 2 deletions(-)

diffs:
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index 1b7a5ed..1b52604 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/distinfo
@@ -12,13 +12,14 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
 SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-cmake_modules_LLDBStandalone.cmake) = 73c166ac5a1ea43e601919d1b42744f568adfb4a
 SHA1 (patch-include_lldb_Utility_regcclass.h) = 9ed649e8deb5924feaf82a6e675f5c596367b3d6
 SHA1 (patch-include_lldb_Utility_regcname.h) = b67145f0437d3c09adc33a925d49267cd9ba4fd7
 SHA1 (patch-include_lldb_Utility_regengine.inc) = a031c43a63acab80a97cfb7727326d610d4ad9ab
 SHA1 (patch-include_lldb_Utility_regex2.h) = 822a47b1221368ec5442bfbdbc20fe4e370c1a6b
 SHA1 (patch-include_lldb_Utility_regex__impl.h) = 4d99669a756bd662ae28abc8cefe6e1538ef84b6
 SHA1 (patch-include_lldb_Utility_regutils.h) = ea36409f8cd05dcf9b81144cbc136abc5fc3a190
-SHA1 (patch-scripts_CMakeLists.txt) = 91b2c8a999be1e285e5bea69fc4b5fc5fd260839
+SHA1 (patch-scripts_CMakeLists.txt) = 1f9515a9c615aab15ac6955894664e2187a5da88
 SHA1 (patch-source_Plugins_SymbolFile_PDB_CMakeLists.txt) = 3465152684eabea85f4ae6250db7bf01fe06cf90
 SHA1 (patch-source_Utility_CMakeLists.txt) = 5b10fe94d76135d8d5ba31862066841394dd45c1
 SHA1 (patch-source_Utility_regcomp.c) = bd315000773bab38b6fe6d119420afbcb5b83a59
diff --git a/lldb-git/patches/patch-cmake_modules_LLDBStandalone.cmake b/lldb-git/patches/patch-cmake_modules_LLDBStandalone.cmake
new file mode 100644
index 0000000..1af9270
--- /dev/null
+++ b/lldb-git/patches/patch-cmake_modules_LLDBStandalone.cmake
@@ -0,0 +1,152 @@
+$NetBSD$
+
+--- cmake/modules/LLDBStandalone.cmake.orig	2016-02-05 23:28:46.000000000 +0000
++++ cmake/modules/LLDBStandalone.cmake
+@@ -6,57 +6,78 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
+ 
+   option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
+ 
+-  set(LLDB_PATH_TO_LLVM_SOURCE "" CACHE PATH
+-    "Path to LLVM source code. Not necessary if using an installed LLVM.")
+-  set(LLDB_PATH_TO_LLVM_BUILD "" CACHE PATH
+-    "Path to the directory where LLVM was built or installed.")
+-
+-  set(LLDB_PATH_TO_CLANG_SOURCE "" CACHE PATH
+-    "Path to Clang source code. Not necessary if using an installed Clang.")
+-  set(LLDB_PATH_TO_CLANG_BUILD "" CACHE PATH
+-    "Path to the directory where Clang was built or installed.")
+-
+-  if (LLDB_PATH_TO_LLVM_SOURCE)
+-    if (NOT EXISTS "${LLDB_PATH_TO_LLVM_SOURCE}/cmake/config-ix.cmake")
+-      message(FATAL_ERROR "Please set LLDB_PATH_TO_LLVM_SOURCE to the root "
+-              "directory of LLVM source code.")
++  # Rely on llvm-config.
++  set(CONFIG_OUTPUT)
++  find_program(LLVM_CONFIG "llvm-config")
++  if(LLVM_CONFIG)
++    message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}")
++    set(CONFIG_COMMAND ${LLVM_CONFIG}
++      "--assertion-mode"
++      "--bindir"
++      "--libdir"
++      "--includedir"
++      "--prefix"
++      "--src-root")
++    execute_process(
++      COMMAND ${CONFIG_COMMAND}
++      RESULT_VARIABLE HAD_ERROR
++      OUTPUT_VARIABLE CONFIG_OUTPUT
++    )
++    if(NOT HAD_ERROR)
++      string(REGEX REPLACE
++        "[ \t]*[\r\n]+[ \t]*" ";"
++        CONFIG_OUTPUT ${CONFIG_OUTPUT})
++
+     else()
+-      get_filename_component(LLVM_MAIN_SRC_DIR ${LLDB_PATH_TO_LLVM_SOURCE}
+-                             ABSOLUTE)
+-      set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
+-      list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
++      string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}")
++      message(STATUS "${CONFIG_COMMAND_STR}")
++      message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
+     endif()
+-  endif()
+-
+-  if (LLDB_PATH_TO_CLANG_SOURCE)
+-      get_filename_component(CLANG_MAIN_SRC_DIR ${LLDB_PATH_TO_CLANG_SOURCE}
+-                             ABSOLUTE)
+-      set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
+-  endif()
+-
+-  list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+-
+-  if (LLDB_PATH_TO_LLVM_BUILD)
+-    get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
+-                           ABSOLUTE)
+   else()
+-    message(FATAL_ERROR "Please set LLDB_PATH_TO_LLVM_BUILD to the root "
+-            "directory of LLVM build or install site.")
++    message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}")
+   endif()
+ 
+-  if (LLDB_PATH_TO_CLANG_BUILD)
+-    get_filename_component(PATH_TO_CLANG_BUILD ${LLDB_PATH_TO_CLANG_BUILD}
+-                           ABSOLUTE)
++  list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS)
++  list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
++  list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
++  list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
++  list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
++  list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
++
++  if(NOT MSVC_IDE)
++    set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
++      CACHE BOOL "Enable assertions")
++    # Assertions should follow llvm-config's.
++    mark_as_advanced(LLVM_ENABLE_ASSERTIONS)
++  endif()
++
++  set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
++  set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
++  set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
++  set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
++  set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
++
++  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
++    NO_DEFAULT_PATH)
++
++  set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
++  set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
++  if(EXISTS ${LLVMCONFIG_FILE})
++    list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
++    include(${LLVMCONFIG_FILE})
+   else()
+-    message(FATAL_ERROR "Please set LLDB_PATH_TO_CLANG_BUILD to the root "
+-            "directory of Clang build or install site.")
++    message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
+   endif()
+ 
+-
+-  # These variables are used by add_llvm_library.
++  # They are used as destination of target generators.
+   set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+   set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+-  set(LLVM_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
++  if(WIN32 OR CYGWIN)
++    # DLL platform -- put DLLs into bin.
++    set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
++  else()
++    set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
++  endif()
+ 
+   include(AddLLVM)
+   include(HandleLLVMOptions)
+@@ -73,23 +94,16 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
+     message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
+   endif()
+   # Import CMake library targets from LLVM and Clang.
+-  include("${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
+-  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+-      include("${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+-  endif()
++  include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
++  include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+ 
+   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
+ 
+   set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
+ 
+   set(CMAKE_INCLUDE_CURRENT_DIR ON)
+-  include_directories("${PATH_TO_LLVM_BUILD}/include"
+-                      "${LLVM_MAIN_INCLUDE_DIR}"
+-                      "${PATH_TO_CLANG_BUILD}/include"
+-                      "${CLANG_MAIN_INCLUDE_DIR}"
+-                      "${CMAKE_CURRENT_SOURCE_DIR}/source")
+-  link_directories("${PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}"
+-                   "${PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}")
++  include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
++  link_directories("${LLVM_LIBRARY_DIR}")
+ 
+   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+   set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
diff --git a/lldb-git/patches/patch-scripts_CMakeLists.txt b/lldb-git/patches/patch-scripts_CMakeLists.txt
index 0c244a0..fd3acf6 100644
--- a/lldb-git/patches/patch-scripts_CMakeLists.txt
+++ b/lldb-git/patches/patch-scripts_CMakeLists.txt
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- scripts/CMakeLists.txt.orig	2016-04-27 00:55:50.000000000 +0000
+--- scripts/CMakeLists.txt.orig	2016-05-01 10:39:36.000000000 +0000
 +++ scripts/CMakeLists.txt
 @@ -9,6 +9,8 @@ set(SWIG_HEADERS
    ${LLDB_SOURCE_DIR}/include/lldb/lldb-versioning.h


Home | Main Index | Thread Index | Old Index