[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-ports
Subject:    Re: [wip] devel/swig 4.1.0
From:       Landry Breuil <landry () openbsd ! org>
Date:       2022-10-31 16:39:43
Message-ID: Y1/6T2Md3KmEbGI7 () twilight ! rhaalovely ! net
[Download RAW message or body]

Le Sun, Oct 30, 2022 at 10:36:42PM +0100, Landry Breuil a écrit :
> Le Sat, Oct 29, 2022 at 06:34:21PM +0200, Landry Breuil a écrit :
> > hi,
> > 
> > here's a wip update to swig 4.1.0, cf
> > https://swig.org/Release/RELEASENOTES for relnotes, mostly adding
> > support for javascript via nodejs, switch to pcre2, and integrate the
> > support for php8 i already backported for mapserver.
> > 
> > almost all tests but some in guile pass, i've added nodejs & go to
> > TEST_DEPENDS to avoid kicking swig from archs that dont have them.
> > 
> > tests from exotic archs much welcome (eg those not having go/node), so
> > far:
> > - tested on amd64
> > - built subversion & graphviz without issues
> > - some patches needed for lldb in devel/llvm, attached too
> 
> new diff with patch-configure readded, should fix guile tests which
> otherwise fails with:
> 
> ld: error: unknown argument '-I/usr/local/include'
> ld: error: unknown argument '-pthread'
> ld: error: unknown argument '-pthread'
> ld: error: unable to find library -lm
> 
> known breakage in kicad & llvm have pending diffs.

Those were the only fallouts, i have diffs to fix them (attached below).

Ran swig regress tests on amd64/i386/arm64, they all need the nodejs
headers tweak but that's mostly it.

ok for swig ? or someone wants to run sparc64/macppc/riscv64 tests ?

Landry

["kicad-fix-swig-4.1.0.diff" (text/plain)]

Index: patches/patch-pcbnew_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/cad/kicad/patches/patch-pcbnew_CMakeLists_txt,v
retrieving revision 1.8
diff -u -r1.8 patch-pcbnew_CMakeLists_txt
--- patches/patch-pcbnew_CMakeLists_txt	29 Aug 2022 16:50:34 -0000	1.8
+++ patches/patch-pcbnew_CMakeLists_txt	30 Oct 2022 17:46:08 -0000
@@ -1,7 +1,18 @@
+chunk 1: remove unneeded bits to fix build with swig 4.1
+from https://gitlab.com/kicad/code/kicad/-/issues/12414
+
 Index: pcbnew/CMakeLists.txt
 --- pcbnew/CMakeLists.txt.orig
 +++ pcbnew/CMakeLists.txt
-@@ -495,7 +495,7 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}
+@@ -487,15 +487,11 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}
+     COMMAND ${SWIG_EXECUTABLE}
+         ${SWIG_OPTS} -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_wrap.cxx \
${CMAKE_SOURCE_DIR}/pcbnew/python/swig/pcbnew.i + 
+-    COMMAND ${PYTHON_EXECUTABLE}
+-        ${CMAKE_SOURCE_DIR}/scripting/build_tools/fix_swig_imports.py
+-        ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
+-
+     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
      )
  
  if( UNIX AND NOT APPLE )


["llvm-fix-swig-4.1.0.dif" (text/plain)]

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/llvm/Makefile,v
retrieving revision 1.293
diff -u -r1.293 Makefile
--- Makefile	21 Jul 2022 13:04:32 -0000	1.293
+++ Makefile	29 Oct 2022 15:39:25 -0000
@@ -16,6 +16,7 @@
 PKGNAME-python =	py3-llvm-${LLVM_V}
 PKGNAME-lldb =	lldb-${LLVM_V}
 REVISION-main =	3
+REVISION-lldb =	0
 
 CATEGORIES =	devel
 
Index: patches/patch-tools_lldb_bindings_CMakeLists_txt
===================================================================
RCS file: patches/patch-tools_lldb_bindings_CMakeLists_txt
diff -N patches/patch-tools_lldb_bindings_CMakeLists_txt
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-tools_lldb_bindings_CMakeLists_txt	29 Oct 2022 15:39:25 -0000
@@ -0,0 +1,15 @@
+Fix build with swig 4.1.0
+cf https://reviews.llvm.org/D134877
+cf https://bugzilla.redhat.com/show_bug.cgi?id=2128646
+Index: tools/lldb/bindings/CMakeLists.txt
+--- tools/lldb/bindings/CMakeLists.txt.orig
++++ 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}
+ )
+ 
Index: patches/patch-tools_lldb_bindings_interfaces_swig
===================================================================
RCS file: patches/patch-tools_lldb_bindings_interfaces_swig
diff -N patches/patch-tools_lldb_bindings_interfaces_swig
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-tools_lldb_bindings_interfaces_swig	29 Oct 2022 15:39:25 -0000
@@ -0,0 +1,15 @@
+Fix build with swig 4.1.0
+cf https://reviews.llvm.org/D134877
+cf https://bugzilla.redhat.com/show_bug.cgi?id=2128646
+Index: tools/lldb/bindings/interfaces.swig
+--- tools/lldb/bindings/interfaces.swig.orig
++++ 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"
Index: patches/patch-tools_lldb_bindings_python_python-typemaps_swig
===================================================================
RCS file: patches/patch-tools_lldb_bindings_python_python-typemaps_swig
diff -N patches/patch-tools_lldb_bindings_python_python-typemaps_swig
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-tools_lldb_bindings_python_python-typemaps_swig	29 Oct 2022 15:39:25 -0000
@@ -0,0 +1,15 @@
+fix build with swig 4.1.0
+https://github.com/llvm/llvm-project/commit/f0a25fe0b746f56295d5c02116ba28d2f965c175
+
+Index: tools/lldb/bindings/python/python-typemaps.swig
+--- tools/lldb/bindings/python/python-typemaps.swig.orig
++++ tools/lldb/bindings/python/python-typemaps.swig
+@@ -439,7 +439,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())


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic