aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2020-08-06 05:08:18 +0800
committerGitHub <noreply@github.com>2020-08-05 14:08:18 -0700
commit1ed263bc5237599365b29537ec526e640ce56f5b (patch)
tree95ee2b915ea941e750ceee6cdc2360cc74533bc5
parent4454f8fb9870102b85d9118ec2c2e80a08b8a474 (diff)
downloadvcpkg-1ed263bc5237599365b29537ec526e640ce56f5b.tar.gz
vcpkg-1ed263bc5237599365b29537ec526e640ce56f5b.zip
[mpir, gmp] Add message to handle the conflicts between these two ports. (#12664)
-rw-r--r--ports/gmp/CONTROL5
-rw-r--r--ports/gmp/portfile.cmake15
-rw-r--r--ports/gmp/vcpkg.json13
-rw-r--r--ports/mpir/portfile.cmake4
4 files changed, 26 insertions, 11 deletions
diff --git a/ports/gmp/CONTROL b/ports/gmp/CONTROL
deleted file mode 100644
index 3ffdd119a..000000000
--- a/ports/gmp/CONTROL
+++ /dev/null
@@ -1,5 +0,0 @@
-Source: gmp
-Version: 6.2.0-2
-Homepage: https://gmplib.org/
-Description: The GNU Multiple Precision Arithmetic Library
-Build-Depends: vs-yasm (windows) \ No newline at end of file
diff --git a/ports/gmp/portfile.cmake b/ports/gmp/portfile.cmake
index ee4b51c08..b8a289628 100644
--- a/ports/gmp/portfile.cmake
+++ b/ports/gmp/portfile.cmake
@@ -1,3 +1,7 @@
+if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/include/gmpxx.h")
+ message(FATAL_ERROR "Can't build ${PORT} if mpir is installed. Please remove mpir, and try install ${PORT} again if you need it.")
+endif()
+
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -5,9 +9,10 @@ if(VCPKG_TARGET_IS_WINDOWS)
REF e140dfc8668e96d7e56cbd46467945adcc6b3cc4 #v6.2.0
SHA512 3b646c142447946bb4556db01214ff130da917bc149946b8cf086f3b01e1cc3d664b941a30a42608799c14461b2f29e4b894b72915d723bd736513c8914729b7
HEAD_REF master
- PATCHES vs.build.patch
- runtime.patch
- prefix.patch
+ PATCHES
+ vs.build.patch
+ runtime.patch
+ prefix.patch
)
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_DIR "${YASM}" DIRECTORY)
@@ -102,6 +107,4 @@ else()
# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
-endif()
-
-
+endif() \ No newline at end of file
diff --git a/ports/gmp/vcpkg.json b/ports/gmp/vcpkg.json
new file mode 100644
index 000000000..77b237197
--- /dev/null
+++ b/ports/gmp/vcpkg.json
@@ -0,0 +1,13 @@
+{
+ "name": "gmp",
+ "version-string": "6.2.0",
+ "port-version": 3,
+ "description": "The GNU Multiple Precision Arithmetic Library",
+ "homepage": "https://gmplib.org",
+ "dependencies": [
+ {
+ "name": "vs-yasm",
+ "platform": "windows"
+ }
+ ]
+}
diff --git a/ports/mpir/portfile.cmake b/ports/mpir/portfile.cmake
index e3ef1dc9d..856e4e273 100644
--- a/ports/mpir/portfile.cmake
+++ b/ports/mpir/portfile.cmake
@@ -1,5 +1,9 @@
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
+if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/include/gmpxx.h")
+ message(FATAL_ERROR "Can't build ${PORT} if gmp is installed. Please remove gmp, and try to install ${PORT} again if you need it.")
+endif()
+
if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(FATAL_ERROR "${PORT} currently can only be built using the dynamic CRT when building DLLs")
endif()