From 13da141b82c5fcdde34b28de535b2da0e51f1436 Mon Sep 17 00:00:00 2001 From: Frank <65999885+FrankXie05@users.noreply.github.com> Date: Thu, 7 Sep 2023 04:05:14 +0800 Subject: [PATCH] [mpir] Build include files even when building static (#33547) --- ports/mpir/fix-static-include-files.patch | 69 +++++++++++++++++++++++ ports/mpir/portfile.cmake | 4 +- ports/mpir/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/m-/mpir.json | 5 ++ 5 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 ports/mpir/fix-static-include-files.patch diff --git a/ports/mpir/fix-static-include-files.patch b/ports/mpir/fix-static-include-files.patch new file mode 100644 index 0000000000..5ae30734b6 --- /dev/null +++ b/ports/mpir/fix-static-include-files.patch @@ -0,0 +1,69 @@ +diff --git a/build.vc/postbuild.bat b/build.vc/postbuild.bat +index de1ed08..e4ecceb 100644 +--- a/build.vc/postbuild.bat ++++ b/build.vc/postbuild.bat +@@ -37,12 +37,10 @@ set bin_dir="..\%extn%\%plat%\%conf%\" + set hdr_dir="..\%extn%\%plat%\%conf%\" + + rem output parametrers for the MPIR tests +-if /i "%filename%" EQU "mpirxx" goto skip + echo (set ldir=%loc%) > output_params.bat + echo (set libr=%extn%) >> output_params.bat + echo (set plat=%plat%) >> output_params.bat + echo (set conf=%conf%) >> output_params.bat +-:skip + + echo copying outputs from %tgt_dir% to %bin_dir% + if not exist %bin_dir% md %bin_dir% +diff --git a/build.vc15/lib_mpir_cxx/lib_mpir_cxx.vcxproj b/build.vc15/lib_mpir_cxx/lib_mpir_cxx.vcxproj +index 3a23f01..1f44b22 100644 +--- a/build.vc15/lib_mpir_cxx/lib_mpir_cxx.vcxproj ++++ b/build.vc15/lib_mpir_cxx/lib_mpir_cxx.vcxproj +@@ -70,6 +70,11 @@ + mpirxx + + ++ ++ cd ..\..\build.vc ++prebuild gc Win32 15 ++ ++ + + ..\..\ + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) +@@ -82,6 +87,11 @@ postbuild "$(TargetPath)" 15 + + + ++ ++ cd ..\..\build.vc ++prebuild gc Win32 15 ++ ++ + + ..\..\ + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) +@@ -94,6 +104,11 @@ postbuild "$(TargetPath)" 15 + + + ++ ++ cd ..\..\build.vc ++prebuild gc Win32 15 ++ ++ + + ..\..\ + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;_WIN64;%(PreprocessorDefinitions) +@@ -106,6 +121,11 @@ postbuild "$(TargetPath)" 15 + + + ++ ++ cd ..\..\build.vc ++prebuild gc Win32 15 ++ ++ + + ..\..\ + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;_WIN64;%(PreprocessorDefinitions) diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake index da15230015..3ce9ca3b2f 100644 --- a/ports/mpir/portfile.cmake +++ b/ports/mpir/portfile.cmake @@ -8,7 +8,9 @@ vcpkg_from_github( REF cdd444aedfcbb190f00328526ef278428702d56e # 3.0.0 SHA512 f46e45bdba27c9f89953ba23186b694486fd3010bd370ea2de71a4649a2816e716a6520c9baa96936f1884437ef03f92b21c0b1fb5b757beba5a05fed30b2bfc HEAD_REF master - PATCHES enable-runtimelibrary-toggle.patch + PATCHES + enable-runtimelibrary-toggle.patch + fix-static-include-files.patch ) if(NOT VCPKG_TARGET_IS_WINDOWS) diff --git a/ports/mpir/vcpkg.json b/ports/mpir/vcpkg.json index ee62b8d044..9df67f4e5c 100644 --- a/ports/mpir/vcpkg.json +++ b/ports/mpir/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mpir", "version-date": "2022-03-02", - "port-version": 2, + "port-version": 3, "description": "Multiple Precision Integers and Rationals", "homepage": "https://github.com/wbhart/mpir", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index 8128abc694..15b158779a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5506,7 +5506,7 @@ }, "mpir": { "baseline": "2022-03-02", - "port-version": 2 + "port-version": 3 }, "mpmcqueue": { "baseline": "2021-12-01", diff --git a/versions/m-/mpir.json b/versions/m-/mpir.json index 01b9fa4059..5b4626a44d 100644 --- a/versions/m-/mpir.json +++ b/versions/m-/mpir.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "66630c57080280e1089146536f7d5d21c7504600", + "version-date": "2022-03-02", + "port-version": 3 + }, { "git-tree": "de9b5962358546e5cc0d7ac9b6dd9bfba95e1763", "version-date": "2022-03-02",