0004-Add-support-SWIG-4.1.0-drop-support-for-4.0.1.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From fecdd9895894b3afe903021b0843a422eb4d3308 Mon Sep 17 00:00:00 2001
  2. From: Alexey Sokolov <alexey+znc@asokolov.org>
  3. Date: Sat, 5 Nov 2022 12:54:40 +0000
  4. Subject: [PATCH] Add support SWIG 4.1.0, drop support for < 4.0.1
  5. https://bugs.gentoo.org/878587
  6. Upstream: https://github.com/znc/znc/commit/fecdd9895894b3afe903021b0843a422eb4d3308
  7. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  8. ---
  9. CMakeLists.txt | 2 +-
  10. modules/modperl/CMakeLists.txt | 1 -
  11. modules/modpython/CMakeLists.txt | 1 -
  12. 3 files changed, 1 insertion(+), 3 deletions(-)
  13. diff --git a/CMakeLists.txt b/CMakeLists.txt
  14. index 9d43578e0e..efab0ee1ee 100644
  15. --- a/CMakeLists.txt
  16. +++ b/CMakeLists.txt
  17. @@ -173,7 +173,7 @@ if(WANT_PYTHON AND NOT EXISTS
  18. endif()
  19. endif()
  20. if(search_swig)
  21. - find_package(SWIG 3.0.0)
  22. + find_package(SWIG 4.0.1)
  23. if(NOT SWIG_FOUND)
  24. message(FATAL_ERROR
  25. "Can't find SWIG, therefore Perl and Python aren't supported. "
  26. diff --git a/modules/modperl/CMakeLists.txt b/modules/modperl/CMakeLists.txt
  27. index e18fe47644..a87f74e478 100644
  28. --- a/modules/modperl/CMakeLists.txt
  29. +++ b/modules/modperl/CMakeLists.txt
  30. @@ -53,7 +53,6 @@ if(SWIG_FOUND)
  31. "-I${PROJECT_SOURCE_DIR}/include"
  32. "-I${CMAKE_CURRENT_SOURCE_DIR}/.."
  33. "-I${CMAKE_CURRENT_SOURCE_DIR}/include"
  34. - -DZNC_EXPORT_LIB_EXPORT
  35. -outdir "${CMAKE_CURRENT_BINARY_DIR}"
  36. -o "${CMAKE_CURRENT_BINARY_DIR}/modperl_biglib.cpp"
  37. "${CMAKE_CURRENT_SOURCE_DIR}/modperl.i"
  38. diff --git a/modules/modpython/CMakeLists.txt b/modules/modpython/CMakeLists.txt
  39. index edbeb41ed5..36a2e649f0 100644
  40. --- a/modules/modpython/CMakeLists.txt
  41. +++ b/modules/modpython/CMakeLists.txt
  42. @@ -50,7 +50,6 @@ if(SWIG_FOUND)
  43. "-I${PROJECT_BINARY_DIR}/include"
  44. "-I${PROJECT_SOURCE_DIR}/include"
  45. "-I${CMAKE_CURRENT_SOURCE_DIR}/.."
  46. - -DZNC_EXPORT_LIB_EXPORT
  47. -outdir "${CMAKE_CURRENT_BINARY_DIR}"
  48. -o "${CMAKE_CURRENT_BINARY_DIR}/modpython_biglib.cpp"
  49. "${CMAKE_CURRENT_SOURCE_DIR}/modpython.i"