Skip to content

Commit

Permalink
[mpir, gmp] Add message to handle the conflicts between these two por…
Browse files Browse the repository at this point in the history
…ts. (#12664)
  • Loading branch information
NancyLi1013 authored Aug 5, 2020
1 parent 4454f8f commit 1ed263b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
5 changes: 0 additions & 5 deletions ports/gmp/CONTROL

This file was deleted.

15 changes: 9 additions & 6 deletions ports/gmp/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
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
REPO ShiftMediaProject/gmp
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)
Expand Down Expand Up @@ -102,6 +107,4 @@ else()

# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()


endif()
13 changes: 13 additions & 0 deletions ports/gmp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
4 changes: 4 additions & 0 deletions ports/mpir/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit 1ed263b

Please sign in to comment.