diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-10-13 16:20:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-13 16:20:22 -0700 |
| commit | a8ac019a32a734c9329c09929832e70f17b157a8 (patch) | |
| tree | b454d4826aa9df85af8ce39073bc925c3249a6de | |
| parent | 50fb30f84c87a1cf30949fa840eb7c75123879a0 (diff) | |
| download | vcpkg-a8ac019a32a734c9329c09929832e70f17b157a8.tar.gz vcpkg-a8ac019a32a734c9329c09929832e70f17b157a8.zip | |
[metis] Fix redefinition with msvc header file (#13778)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
| -rw-r--r-- | ports/metis/CONTROL | 3 | ||||
| -rw-r--r-- | ports/metis/fix-INT_MIN_define.patch | 34 | ||||
| -rw-r--r-- | ports/metis/portfile.cmake | 5 |
3 files changed, 38 insertions, 4 deletions
diff --git a/ports/metis/CONTROL b/ports/metis/CONTROL index c47b9d85e..8feca5689 100644 --- a/ports/metis/CONTROL +++ b/ports/metis/CONTROL @@ -1,4 +1,5 @@ Source: metis
-Version: 5.1.0-6
+Version: 5.1.0
+Port-Version: 7
Homepage: https://glaros.dtc.umn.edu/gkhome/metis/metis/overview
Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering
diff --git a/ports/metis/fix-INT_MIN_define.patch b/ports/metis/fix-INT_MIN_define.patch new file mode 100644 index 000000000..97d7881f5 --- /dev/null +++ b/ports/metis/fix-INT_MIN_define.patch @@ -0,0 +1,34 @@ +diff --git a/include/metis.h b/include/metis.h +index dc5406a..7732437 100644 +--- a/include/metis.h ++++ b/include/metis.h +@@ -72,10 +72,14 @@ typedef __int64 int64_t; + #define PRId64 "I64d" + #define SCNd32 "ld" + #define SCNd64 "I64d" ++#ifdef _WIN32 ++#include <stdint.h> ++#else + #define INT32_MIN ((int32_t)_I32_MIN) + #define INT32_MAX _I32_MAX + #define INT64_MIN ((int64_t)_I64_MIN) + #define INT64_MAX _I64_MAX ++#endif + #else + #include <inttypes.h> + #endif +diff --git a/GKlib/gk_arch.h b/GKlib/gk_arch.h +index 78b1431..7258763 100644 +--- a/GKlib/gk_arch.h ++++ b/GKlib/gk_arch.h +@@ -32,8 +32,8 @@ + + + #ifdef __MSC__ +- #include "ms_stdint.h" +- #include "ms_inttypes.h" ++ #include <stdint.h> ++ #include <inttypes.h> + #include "ms_stat.h" + #else + #ifndef SUNOS diff --git a/ports/metis/portfile.cmake b/ports/metis/portfile.cmake index 1ba641bcb..07f5d0257 100644 --- a/ports/metis/portfile.cmake +++ b/ports/metis/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
set(OPTIONS -DSHARED=OFF)
@@ -23,6 +21,7 @@ vcpkg_extract_source_archive_ex( fix-gklib-vs14-math.patch
fix-linux-build-error.patch
install-metisConfig.patch
+ fix-INT_MIN_define.patch
)
vcpkg_configure_cmake(
@@ -39,4 +38,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/metis)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/metis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/metis/copyright)
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
