Files
MSYS2-packages/znc-git/znc-msysize.patch
T

58 lines
2.2 KiB
Diff

diff -Naur znc-orig/CMakeLists.txt znc/CMakeLists.txt
--- znc-orig/CMakeLists.txt 2020-07-20 12:53:05.176019800 +0300
+++ znc/CMakeLists.txt 2020-07-20 13:33:08.797221700 +0300
@@ -44,7 +44,7 @@
include(TestCXX11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED true)
-if(NOT CYGWIN)
+if(NOT CYGWIN AND NOT MSYS)
# We don't want to use -std=gnu++11 instead of -std=c++11, but among other
# things, -std=c++11 on cygwin defines __STRICT_ANSI__ which makes cygwin
# not to compile: undefined references to strerror_r, to fdopen, to
@@ -341,7 +341,7 @@
# Non-cygwin should link modules to /usr/bin/znc directly to prevent this:
# error while loading shared libraries: libznc.so: cannot open shared object file: No such file or directory
# Without need to touch LD_LIBRARY_PATH
-if(CYGWIN)
+if(CYGWIN OR MSYS)
set(znc_link "znclib")
set(lib_type "SHARED")
set(install_lib "znclib")
diff -Naur znc-orig/modules/modperl/CMakeLists.txt znc/modules/modperl/CMakeLists.txt
--- znc-orig/modules/modperl/CMakeLists.txt 2020-07-20 12:47:09.806861900 +0300
+++ znc/modules/modperl/CMakeLists.txt 2020-07-20 13:33:39.053903300 +0300
@@ -92,7 +92,7 @@
LINK_FLAGS "${PERL_LDFLAGS}")
target_compile_options(modperl_lib PRIVATE "${PERL_CFLAGS}")
target_compile_definitions(modperl_lib PRIVATE "SWIG_TYPE_TABLE=znc")
-if(CYGWIN)
+if(CYGWIN OR MSYS)
target_link_libraries(modperl_lib module_modperl)
endif()
diff -Naur znc-orig/modules/modpython/CMakeLists.txt znc/modules/modpython/CMakeLists.txt
--- znc-orig/modules/modpython/CMakeLists.txt 2020-07-20 12:47:09.838080300 +0300
+++ znc/modules/modpython/CMakeLists.txt 2020-07-20 13:33:58.803757900 +0300
@@ -82,7 +82,7 @@
OUTPUT_NAME "znc_core"
NO_SONAME true)
target_compile_definitions(modpython_lib PRIVATE "SWIG_TYPE_TABLE=znc")
-if(CYGWIN)
+if(CYGWIN OR MSYS)
target_link_libraries(modpython_lib module_modpython)
endif()
diff -Naur znc-orig/ZNCConfig.cmake.in znc/ZNCConfig.cmake.in
--- znc-orig/ZNCConfig.cmake.in 2020-07-20 12:47:09.521613800 +0300
+++ znc/ZNCConfig.cmake.in 2020-07-20 13:36:37.428420800 +0300
@@ -20,7 +20,7 @@
# For some reason cygwin fails to build modules if Threads::Threads
# is not found.
-if(NOT CYGWIN)
+if(NOT CYGWIN AND NOT MSYS)
set(ZNC_NO_INCLUDE_THREADS true)
endif()