pkgsrc-WIP-changes archive

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

lldb-git: Sync six.py patch with upstream review



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Feb 3 21:20:11 2017 +0100
Changeset:	fd7cc716c1ce280b2f0501a0fbf13e7c7edcf1f0

Modified Files:
	lldb-git/PLIST
	lldb-git/distinfo
	lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py
Added Files:
	lldb-git/patches/patch-CMakeLists.txt
	lldb-git/patches/patch-scripts_finishSwigWrapperClasses.py
	lldb-git/patches/patch-scripts_utilsArgsParse.py
Removed Files:
	lldb-git/patches/patch-scripts_CMakeLists.txt

Log Message:
lldb-git: Sync six.py patch with upstream review

https://reviews.llvm.org/D29405

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=fd7cc716c1ce280b2f0501a0fbf13e7c7edcf1f0

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

diffstat:
 lldb-git/PLIST                                     | 13 ++---
 lldb-git/distinfo                                  |  6 ++-
 lldb-git/patches/patch-CMakeLists.txt              |  0
 lldb-git/patches/patch-scripts_CMakeLists.txt      | 23 ---------
 .../patch-scripts_Python_finishSwigPythonLLDB.py   | 57 +++-------------------
 .../patch-scripts_finishSwigWrapperClasses.py      | 44 +++++++++++++++++
 lldb-git/patches/patch-scripts_utilsArgsParse.py   | 19 ++++++++
 7 files changed, 82 insertions(+), 80 deletions(-)

diffs:
diff --git a/lldb-git/PLIST b/lldb-git/PLIST
index 2a810a4..3f31c40 100644
--- a/lldb-git/PLIST
+++ b/lldb-git/PLIST
@@ -99,7 +99,6 @@ include/lldb/Core/Broadcaster.h
 include/lldb/Core/ClangForward.h
 include/lldb/Core/Communication.h
 include/lldb/Core/Connection.h
-include/lldb/Core/ConstString.h
 include/lldb/Core/DataBuffer.h
 include/lldb/Core/DataBufferHeap.h
 include/lldb/Core/DataBufferMemoryMap.h
@@ -108,7 +107,6 @@ include/lldb/Core/DataExtractor.h
 include/lldb/Core/Debugger.h
 include/lldb/Core/Disassembler.h
 include/lldb/Core/EmulateInstruction.h
-include/lldb/Core/Error.h
 include/lldb/Core/Event.h
 include/lldb/Core/FastDemangle.h
 include/lldb/Core/FileLineResolver.h
@@ -133,21 +131,17 @@ include/lldb/Core/PluginInterface.h
 include/lldb/Core/PluginManager.h
 include/lldb/Core/RangeMap.h
 include/lldb/Core/RegisterValue.h
-include/lldb/Core/RegularExpression.h
 include/lldb/Core/STLUtils.h
 include/lldb/Core/Scalar.h
 include/lldb/Core/SearchFilter.h
 include/lldb/Core/Section.h
 include/lldb/Core/SourceManager.h
 include/lldb/Core/State.h
-include/lldb/Core/Stream.h
 include/lldb/Core/StreamAsynchronousIO.h
 include/lldb/Core/StreamBuffer.h
 include/lldb/Core/StreamCallback.h
 include/lldb/Core/StreamFile.h
 include/lldb/Core/StreamGDBRemote.h
-include/lldb/Core/StreamString.h
-include/lldb/Core/StreamTee.h
 include/lldb/Core/StringList.h
 include/lldb/Core/StructuredData.h
 include/lldb/Core/ThreadSafeDenseMap.h
@@ -461,7 +455,9 @@ include/lldb/Target/Unwind.h
 include/lldb/Target/UnwindAssembly.h
 include/lldb/Utility/AnsiTerminal.h
 include/lldb/Utility/CleanUp.h
+include/lldb/Utility/ConstString.h
 include/lldb/Utility/Either.h
+include/lldb/Utility/Error.h
 include/lldb/Utility/Iterable.h
 include/lldb/Utility/JSON.h
 include/lldb/Utility/LLDBAssert.h
@@ -470,10 +466,14 @@ include/lldb/Utility/ProcessStructReader.h
 include/lldb/Utility/PseudoTerminal.h
 include/lldb/Utility/Range.h
 include/lldb/Utility/RegisterNumber.h
+include/lldb/Utility/RegularExpression.h
 include/lldb/Utility/SafeMachO.h
 include/lldb/Utility/SelectHelper.h
 include/lldb/Utility/SharedCluster.h
 include/lldb/Utility/SharingPtr.h
+include/lldb/Utility/Stream.h
+include/lldb/Utility/StreamString.h
+include/lldb/Utility/StreamTee.h
 include/lldb/Utility/StringExtractor.h
 include/lldb/Utility/StringLexer.h
 include/lldb/Utility/TaskPool.h
@@ -594,3 +594,4 @@ ${PYSITELIB}/lldb/lldb-argdumper
 ${PYSITELIB}/lldb/runtime/__init__.py
 ${PYSITELIB}/lldb/utils/__init__.py
 ${PYSITELIB}/lldb/utils/symbolication.py
+${PYSITELIB}/six.py
diff --git a/lldb-git/distinfo b/lldb-git/distinfo
index 642f2bb..b39f91a 100644
--- a/lldb-git/distinfo
+++ b/lldb-git/distinfo
@@ -12,6 +12,8 @@ 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-CMakeLists.txt) = da39a3ee5e6b4b0d3255bfef95601890afd80709
 SHA1 (patch-cmake_modules_LLDBConfig.cmake) = f2f743a350afbaeeda30d87e08424def3ce70f0c
-SHA1 (patch-scripts_CMakeLists.txt) = 8e04d88d88fb1346d0e6824ec36f95ec3e811a6b
-SHA1 (patch-scripts_Python_finishSwigPythonLLDB.py) = 67fb908ec3d6312f9e014330dd4eb842aa8c21e4
+SHA1 (patch-scripts_Python_finishSwigPythonLLDB.py) = 68e6a027b746ceb6829ac9805be0e31ab10976c1
+SHA1 (patch-scripts_finishSwigWrapperClasses.py) = 453489318a5855e7d750903ab4f877ffb34d9652
+SHA1 (patch-scripts_utilsArgsParse.py) = b9b7a6f17b6e927882ad0aaffcbf5c53c1179499
diff --git a/lldb-git/patches/patch-CMakeLists.txt b/lldb-git/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000..e69de29
diff --git a/lldb-git/patches/patch-scripts_CMakeLists.txt b/lldb-git/patches/patch-scripts_CMakeLists.txt
deleted file mode 100644
index 2797e20..0000000
--- a/lldb-git/patches/patch-scripts_CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-$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
index c4fd322..7f63f18 100644
--- a/lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py
+++ b/lldb-git/patches/patch-scripts_Python_finishSwigPythonLLDB.py
@@ -2,55 +2,14 @@ $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):
+@@ -821,7 +821,9 @@ def main(vDictArgs):
+         bOk, strMsg = create_symlinks(
              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)
++    bUseSystemSix = "--useSystemSix" in vDictArgs
++
++    if not bUseSystemSix and bOk:
+         bOk, strMsg = copy_six(vDictArgs, strFrameworkPythonDir)
+ 
+     if bOk:
diff --git a/lldb-git/patches/patch-scripts_finishSwigWrapperClasses.py b/lldb-git/patches/patch-scripts_finishSwigWrapperClasses.py
new file mode 100644
index 0000000..ab19697
--- /dev/null
+++ b/lldb-git/patches/patch-scripts_finishSwigWrapperClasses.py
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- scripts/finishSwigWrapperClasses.py.orig	2016-09-10 17:36:23.000000000 +0000
++++ scripts/finishSwigWrapperClasses.py
+@@ -81,6 +81,7 @@ Args:   -h              (optional) Print
+                     created for a Windows build.\n\
+     --argsFile=         The args are read from a file instead of the\n\
+                     command line. Other command line args are ignored.\n\
++    --useSystemSix  Use system six.py version.\n\
+ \n\
+ Usage:\n\
+     finishSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\
+@@ -178,7 +179,8 @@ def validate_arguments(vArgv):
+         "prefix=",
+         "cmakeBuildConfiguration=",
+         "lldbLibDir=",
+-        "argsFile"]
++        "argsFile",
++        "useSystemSix"]
+     dictArgReq = {"-h": "o",          # o = optional, m = mandatory
+                   "-d": "o",
+                   "-m": "o",
+@@ -188,7 +190,8 @@ def validate_arguments(vArgv):
+                   "--prefix": "o",
+                   "--cmakeBuildConfiguration": "o",
+                   "--lldbLibDir": "o",
+-                  "--argsFile": "o"}
++                  "--argsFile": "o",
++                  "--useSystemSix": "o"}
+ 
+     # Check for mandatory parameters
+     nResult, dictArgs, strMsg = utilsArgsParse.parse(vArgv, strListArgs,
+@@ -376,9 +379,11 @@ def main(vArgv):
+             (optional)      "lib" by default.
+             --argsFile=     The args are read from a file instead of the
+                             command line. Other command line args are ignored.
++            --useSystemSix  Use system six.py version.
+     Usage:
+             finishSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath
+             --cfgBldDir=ADirPath --prefix=ADirPath --lldbLibDir=ADirPath -m -d
++            --useSystemSix
+ 
+     Results:    0 Success
+                 -1 Error - invalid parameters passed.
diff --git a/lldb-git/patches/patch-scripts_utilsArgsParse.py b/lldb-git/patches/patch-scripts_utilsArgsParse.py
new file mode 100644
index 0000000..f4728b3
--- /dev/null
+++ b/lldb-git/patches/patch-scripts_utilsArgsParse.py
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- scripts/utilsArgsParse.py.orig	2016-09-10 17:36:23.000000000 +0000
++++ scripts/utilsArgsParse.py
+@@ -113,12 +113,12 @@ def parse(vArgv, vstrListArgs, vListLong
+                 break
+         if match == 0:
+             for arg in vListLongArgs:
+-                argg = "--" + arg[:arg.__len__() - 1]
++                argg = "--" + arg.rstrip('=')
+                 if opt == argg:
+                     if "m" == vDictArgReq[opt]:
+                         countMandatoryOpts = countMandatoryOpts + 1
+                     dictArgs[opt] = val
+-                    if val.__len__() == 0:
++                    if arg[-1:] == '=' and val.__len__() == 0:
+                         bFoundNoInputValue = True
+                     break
+ 


Home | Main Index | Thread Index | Old Index