Files
MINGW-packages/mingw-w64-libbotan/003-enable-shared.patch
2021-09-23 22:06:18 +02:00

61 lines
2.5 KiB
Diff

--- Botan-2.18.1/src/build-data/os/mingw.txt.orig 2021-09-23 18:31:48.072000200 +0200
+++ Botan-2.18.1/src/build-data/os/mingw.txt 2021-09-23 18:33:01.963424400 +0200
@@ -8,6 +8,9 @@
lib_dir lib
doc_dir share/doc
+soname_pattern_base "{lib_prefix}{libname}.dll"
+shared_lib_symlinks no
+
# see https://sourceforge.net/p/mingw-w64/bugs/755/
use_stack_protector no
--- Botan-2.18.1/src/scripts/install.py.orig 2021-09-23 21:50:48.316660600 +0200
+++ Botan-2.18.1/src/scripts/install.py 2021-09-23 21:54:09.336719700 +0200
@@ -191,6 +191,13 @@
soname_base = libname + '.dll'
copy_executable(os.path.join(out_dir, soname_base),
prepend_destdir(os.path.join(bin_dir, soname_base)))
+ elif target_os == "mingw":
+ shared_lib_name = cfg['shared_lib_name']
+ copy_executable(os.path.join(out_dir, shared_lib_name),
+ prepend_destdir(os.path.join(bin_dir, shared_lib_name)))
+ implib_name = shared_lib_name + '.a'
+ copy_executable(os.path.join(out_dir, implib_name),
+ prepend_destdir(os.path.join(lib_dir, implib_name)))
else:
soname_patch = cfg['soname_patch']
soname_abi = cfg['soname_abi']
--- Botan-2.18.1/src/build-data/cc/clang.txt.orig 2021-09-23 20:56:10.946000000 +0200
+++ Botan-2.18.1/src/build-data/cc/clang.txt 2021-09-23 21:24:40.636537000 +0200
@@ -37,6 +37,8 @@
# The default works for GNU ld and several other Unix linkers
default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
+
+mingw -> "$(CXX) -shared -Wl,--out-implib,{shared_lib_name}.a"
</so_link_commands>
<binary_link_commands>
--- Botan-2.18.1/src/build-data/cc/gcc.txt.orig 2021-09-23 20:56:42.407808200 +0200
+++ Botan-2.18.1/src/build-data/cc/gcc.txt 2021-09-23 21:24:56.862519700 +0200
@@ -45,6 +45,8 @@
# AIX and OpenBSD don't use sonames at all
aix -> "$(CXX) -shared -fPIC"
openbsd -> "$(CXX) -shared -fPIC"
+
+mingw -> "$(CXX) -shared -Wl,--out-implib,{shared_lib_name}.a"
</so_link_commands>
<binary_link_commands>
--- Botan-2.18.1/src/python/botan2.py.orig 2021-09-23 22:05:38.880263000 +0200
+++ Botan-2.18.1/src/python/botan2.py 2021-09-23 22:05:45.327515900 +0200
@@ -56,6 +56,7 @@
if platform in ['win32', 'cygwin', 'msys']:
possible_dll_names.append('botan.dll')
+ possible_dll_names.append('libbotan-2.dll')
elif platform in ['darwin', 'macos']:
possible_dll_names.append('libbotan-2.dylib')
else: