aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2019-12-21 03:57:17 +0800
committerdan-shaw <51385773+dan-shaw@users.noreply.github.com>2019-12-20 11:57:17 -0800
commit7d21ab542d7f163541e8a86bceb1ac5a29be3e8a (patch)
tree8a22e388a3d06fe4d3b87a6dd942154b03d9aa34
parentb630f9b40da3276643d6aa6c846109e06190f90f (diff)
downloadvcpkg-7d21ab542d7f163541e8a86bceb1ac5a29be3e8a.tar.gz
vcpkg-7d21ab542d7f163541e8a86bceb1ac5a29be3e8a.zip
[botan] Fix unrecognized compile flag MT/MD (#9335)
-rw-r--r--ports/botan/CONTROL2
-rw-r--r--ports/botan/fix-msvc-build.patch17
-rw-r--r--ports/botan/portfile.cmake4
3 files changed, 21 insertions, 2 deletions
diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL
index 11ac954f8..e38a27bbb 100644
--- a/ports/botan/CONTROL
+++ b/ports/botan/CONTROL
@@ -1,4 +1,4 @@
Source: botan
-Version: 2.12.1
+Version: 2.12.1-1
Homepage: https://botan.randombit.net
Description: A cryptography library written in C++11
diff --git a/ports/botan/fix-msvc-build.patch b/ports/botan/fix-msvc-build.patch
new file mode 100644
index 000000000..a884b621d
--- /dev/null
+++ b/ports/botan/fix-msvc-build.patch
@@ -0,0 +1,17 @@
+diff --git a/configure.py b/configure.py
+index cfec5bb..0fad6ce 100644
+--- a/configure.py
++++ b/configure.py
+@@ -2146,6 +2146,12 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch,
+
+ 'mod_list': sorted([m.basename for m in modules])
+ }
++
++ if cc.basename == 'msvc' and variables['cxx_abi_flags'] != '':
++ # MSVC linker doesn't support/need the ABI options,
++ # just transfer them over to just the compiler invocations
++ variables['cc_compile_flags'] = '%s %s' % (variables['cxx_abi_flags'], variables['cc_compile_flags'])
++ variables['cxx_abi_flags'] = ''
+
+ variables['lib_flags'] = cc.gen_lib_flags(options, variables)
+ variables['cmake_lib_flags'] = cmake_escape(variables['lib_flags'])
diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake
index f77c315b4..7343046b4 100644
--- a/ports/botan/portfile.cmake
+++ b/ports/botan/portfile.cmake
@@ -6,7 +6,9 @@ vcpkg_from_github(
REF 1a6ad661ce64287ccbe26460ccc3aa4247d86ba8 # 2.12.1
SHA512 7a774f325c85761e2d076847f1fc8bc67592d696c4ebde839928591f7c85352e2df6032c122bdcc603adf84d76f5a1897c7118aa3859d38f79e474f27bc3b588
HEAD_REF master
- PATCHES fix-generate-build-path.patch
+ PATCHES
+ fix-generate-build-path.patch
+ fix-msvc-build.patch # Remove this patch on next update
)
if(CMAKE_HOST_WIN32)