Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2023 21:50:45 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 64a65d814b71 - main - devel/llvm11: Use swig40 instead of swig
Message-ID:  <202304182150.33ILojHT054662@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=64a65d814b715524ecea8cff715b09f21b674b43

commit 64a65d814b715524ecea8cff715b09f21b674b43
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-04-18 21:39:17 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-04-18 21:39:17 +0000

    devel/llvm11: Use swig40 instead of swig
    
    Some issues for swig 4.1.1 has been fixed in patch-swig. However, it still does
    not build successfully, Therefore, use swig40 instead of swig for now.
    
    PR:             270720
---
 devel/llvm11/Makefile         |  3 +-
 devel/llvm11/files/patch-swig | 90 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 92 insertions(+), 1 deletion(-)

diff --git a/devel/llvm11/Makefile b/devel/llvm11/Makefile
index e8653ba9472e..ea0b2fd7e677 100644
--- a/devel/llvm11/Makefile
+++ b/devel/llvm11/Makefile
@@ -133,7 +133,8 @@ LIT_DESC=		Install lit and FileCheck test tools
 LIT_VARS=		_USES_PYTHON=python
 LLD_DESC=		Install lld, the LLVM linker
 LLD_DISTFILES=		lld-${DISTVERSION}.src${EXTRACT_SUFX}
-LLDB_BUILD_DEPENDS=	swig:devel/swig
+LLDB_BINARY_ALIAS=	swig=swig40
+LLDB_BUILD_DEPENDS=	swig40:devel/swig40
 LLDB_CMAKE_ON=		-DLUA_INCLUDE_DIR=${LOCALBASE}/include/lua${LUA_VER_STR} \
 			-DLUA_LIBRARY=${LOCALBASE}/lib/liblua-${LUA_VER}.so \
 			-DCURSES_INCLUDE_PATH=/usr/include \
diff --git a/devel/llvm11/files/patch-swig b/devel/llvm11/files/patch-swig
new file mode 100644
index 000000000000..0cf6d81819ed
--- /dev/null
+++ b/devel/llvm11/files/patch-swig
@@ -0,0 +1,90 @@
+--- tools/lldb/bindings/CMakeLists.txt.orig	2020-12-18 19:57:38 UTC
++++ tools/lldb/bindings/CMakeLists.txt
+@@ -26,8 +26,6 @@ set(SWIG_COMMON_FLAGS
+   -features autodoc
+   -I${LLDB_SOURCE_DIR}/include
+   -I${CMAKE_CURRENT_SOURCE_DIR}
+-  -D__STDC_LIMIT_MACROS
+-  -D__STDC_CONSTANT_MACROS
+   ${DARWIN_EXTRAS}
+   -outdir ${CMAKE_CURRENT_BINARY_DIR}
+ )
+--- tools/lldb/bindings/interface/SBAddress.i.orig	2020-12-18 19:57:38 UTC
++++ tools/lldb/bindings/interface/SBAddress.i
+@@ -17,9 +17,10 @@ libraries, bundles, frameworks) being loaded at differ
+ addresses than the addresses found in the object file that
+ represents them on disk. There are currently two types of addresses
+ for a section:
+-    o file addresses
+-    o load addresses
+ 
++* file addresses
++* load addresses
++
+ File addresses represents the virtual addresses that are in the 'on
+ disk' object files. These virtual addresses are converted to be
+ relative to unique sections scoped to the object file so that
+@@ -108,18 +109,17 @@ class SBAddress (public)
+     An address might refer to code or data from an existing module, or it
+     might refer to something on the stack or heap. The following functions
+     will only return valid values if the address has been resolved to a code
+-    or data address using 'void SBAddress::SetLoadAddress(...)' or
+-    'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.") GetSymbolContext;
++    or data address using :py:class:`SBAddress.SetLoadAddress' or
++    :py:class:`SBTarget.ResolveLoadAddress`.") GetSymbolContext;
+     lldb::SBSymbolContext
+     GetSymbolContext (uint32_t resolve_scope);
+ 
+     %feature("docstring", "
+     GetModule() and the following grab individual objects for a given address and
+     are less efficient if you want more than one symbol related objects.
+-    Use one of the following when you want multiple debug symbol related
+-    objects for an address:
+-       lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
+-       lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
++    Use :py:class:`SBAddress.GetSymbolContext` or
++    :py:class:`SBTarget.ResolveSymbolContextForAddress` when you want multiple
++    debug symbol related objects for an address.
+     One or more bits from the SymbolContextItem enumerations can be logically
+     OR'ed together to more efficiently retrieve multiple symbol objects.") GetModule;
+     lldb::SBModule
+--- tools/lldb/bindings/interface/SBValueList.i.orig	2020-12-18 19:57:38 UTC
++++ tools/lldb/bindings/interface/SBValueList.i
+@@ -102,7 +102,6 @@ class SBValueList (public)
+     GetFirstValueByName (const char* name) const;
+ 
+     %extend {
+-       %nothreadallow;
+        std::string lldb::SBValueList::__str__ (){
+            lldb::SBStream description;
+            const size_t n = $self->GetSize();
+@@ -121,7 +120,6 @@ class SBValueList (public)
+                --desc_len;
+            return std::string(desc, desc_len);
+        }
+-       %clearnothreadallow;
+     }
+ 
+ #ifdef SWIGPYTHON
+--- tools/lldb/bindings/interfaces.swig.orig	2020-12-18 19:57:38 UTC
++++ tools/lldb/bindings/interfaces.swig
+@@ -1,8 +1,5 @@
+ /* Various liblldb typedefs that SWIG needs to know about.  */
+ #define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
+-/* The ISO C99 standard specifies that in C++ implementations limit macros such
+-   as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
+-#define __STDC_LIMIT_MACROS
+ %include "stdint.i"
+ 
+ %include "lldb/lldb-defines.h"
+--- tools/lldb/bindings/python/python-typemaps.swig.orig	2020-12-18 19:57:38 UTC
++++ tools/lldb/bindings/python/python-typemaps.swig
+@@ -433,7 +433,7 @@ bool SetNumberFromPyObject<double>(double &number, PyO
+ 
+ %typemap(out) lldb::FileSP {
+   $result = nullptr;
+-  lldb::FileSP &sp = $1;
++  const lldb::FileSP &sp = $1;
+   if (sp) {
+     PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp));
+     if (!pyfile.IsValid())



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304182150.33ILojHT054662>