pkgsrc-WIP-changes archive

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

lldb-git: Add option to install (or not) six.py



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Feb 2 16:59:11 2017 +0100
Changeset:	34b1447bdd51c5f32dd5ca91f5d1f4dc8993ce31

Modified Files:
	lldb-git/distinfo
Added Files:
	lldb-git/patches/patch-cmake_modules_LLDBConfig.cmake
	lldb-git/patches/patch-scripts_CMakeLists.txt
	lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py

Log Message:
lldb-git: Add option to install (or not) six.py

Prototype new generation of patch.

Sponsored by <The NetBSD Foundation>

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

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

diffstat:
 lldb-git/distinfo                                  |  3 ++
 .../patches/patch-cmake_modules_LLDBConfig.cmake   | 14 ++++++
 lldb-git/patches/patch-scripts_CMakeLists.txt      | 23 +++++++++
 .../patch-scripts_Python_finishSwigPythonLLDB.py   | 56 ++++++++++++++++++++++
 4 files changed, 96 insertions(+)

diffs:
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index 7931384..642f2bb 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/distinfo
@@ -12,3 +12,6 @@ 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_LLDBConfig.cmake) = f2f743a350afbaeeda30d87e08424def3ce70f0c
+SHA1 (patch-scripts_CMakeLists.txt) = 8e04d88d88fb1346d0e6824ec36f95ec3e811a6b
+SHA1 (patch-scripts_Python_finishSwigPythonLLDB.py) = 67fb908ec3d6312f9e014330dd4eb842aa8c21e4
diff --git a/lldb-git/patches/patch-cmake_modules_LLDBConfig.cmake b/lldb-git/patches/patch-cmake_modules_LLDBConfig.cmake
new file mode 100644
index 0000000..5068d8c
--- /dev/null
+++ b/lldb-git/patches/patch-cmake_modules_LLDBConfig.cmake
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- cmake/modules/LLDBConfig.cmake.orig	2017-01-28 19:35:14.000000000 +0000
++++ cmake/modules/LLDBConfig.cmake
+@@ -29,6 +29,9 @@ set(LLDB_DISABLE_CURSES ${LLDB_DEFAULT_D
+ set(LLDB_RELOCATABLE_PYTHON 0 CACHE BOOL
+   "Causes LLDB to use the PYTHONHOME environment variable to locate Python.")
+ 
++set(LLDB_USE_SYSTEM_SIX 0 CACHE BOOL
++  "Use six.py shipped with system and do not install a copy of it")
++
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+   set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL
+     "Causes lldb to export all symbols when building liblldb.")
diff --git a/lldb-git/patches/patch-scripts_CMakeLists.txt b/lldb-git/patches/patch-scripts_CMakeLists.txt
new file mode 100644
index 0000000..2797e20
--- /dev/null
+++ b/lldb-git/patches/patch-scripts_CMakeLists.txt
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- scripts/CMakeLists.txt.orig	2017-01-28 19:35:15.000000000 +0000
++++ scripts/CMakeLists.txt
+@@ -56,5 +56,18 @@ add_custom_target(swig_wrapper ALL DEPEN
+ # Install the LLDB python module
+ install(DIRECTORY ${SWIG_PYTHON_DIR} DESTINATION ${SWIG_INSTALL_DIR})
+ 
++execute_process(
++  COMMAND "${PYTHON_EXECUTABLE}" -c "if True:
++    from distutils import sysconfig as sc
++    print(sc.get_python_lib(prefix='', plat_specific=True))"
++  OUTPUT_VARIABLE PYTHON_SITE
++  OUTPUT_STRIP_TRAILING_WHITESPACE)
++
++if(NOT LLDB_USE_SYSTEM_SIX)
++  install(FILES
++    ${LLDB_SOURCE_DIR}/third_party/Python/module/six/six.py
++    DESTINATION ${PYTHON_SITE}/)
++endif()
++
+ # build Python modules
+ add_subdirectory(Python/modules)
diff --git a/lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py b/lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py
new file mode 100644
index 0000000..c4fd322
--- /dev/null
+++ b/lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py
@@ -0,0 +1,56 @@
+$NetBSD$
+
+--- scripts/Python/finishSwigPythonLLDB.py.orig	2016-12-14 14:10:24.000000000 +0000
++++ scripts/Python/finishSwigPythonLLDB.py
+@@ -70,7 +70,6 @@ strErrMsgCreatePyPkgMissingSlash = "Para
+ strErrMsgMkLinkExecute = "Command mklink failed: %s"
+ strErrMsgMakeSymlink = "creating symbolic link"
+ strErrMsgUnexpected = "Unexpected error: %s"
+-strMsgCopySixPy = "Copying six.py from '%s' to '%s'"
+ strErrMsgCopySixPyFailed = "Unable to copy '%s' to '%s'"
+ 
+ 
+@@ -527,33 +526,6 @@ def create_symlinks(vDictArgs, vstrFrame
+     return (bOk, strErrMsg)
+ 
+ 
+-def copy_six(vDictArgs, vstrFrameworkPythonDir):
+-    dbg = utilsDebug.CDebugFnVerbose("Python script copy_six()")
+-    bDbg = "-d" in vDictArgs
+-    bOk = True
+-    strMsg = ""
+-    site_packages_dir = os.path.dirname(vstrFrameworkPythonDir)
+-    six_module_filename = "six.py"
+-    src_file = os.path.join(
+-        vDictArgs['--srcRoot'],
+-        "third_party",
+-        "Python",
+-        "module",
+-        "six",
+-        six_module_filename)
+-    src_file = os.path.normpath(src_file)
+-    target = os.path.join(site_packages_dir, six_module_filename)
+-
+-    if bDbg:
+-        print((strMsgCopySixPy % (src_file, target)))
+-    try:
+-        shutil.copyfile(src_file, target)
+-    except:
+-        bOk = False
+-        strMsg = strErrMsgCopySixPyFailed % (src_file, target)
+-
+-    return (bOk, strMsg)
+-
+ #++---------------------------------------------------------------------------
+ # Details:  Look for the directory in which to put the Python files if it
+ #           does not already exist, attempt to make it.
+@@ -822,9 +794,6 @@ def main(vDictArgs):
+             vDictArgs, strFrameworkPythonDir, strLldbLibDir)
+ 
+     if bOk:
+-        bOk, strMsg = copy_six(vDictArgs, strFrameworkPythonDir)
+-
+-    if bOk:
+         bOk, strMsg = copy_lldbpy_file_to_lldb_pkg_dir(vDictArgs,
+                                                        strFrameworkPythonDir,
+                                                        strCfgBldDir)


Home | Main Index | Thread Index | Old Index