aboutsummaryrefslogtreecommitdiff
path: root/ports/suitesparse
diff options
context:
space:
mode:
authorArkady Shapkin <arkady.shapkin@gmail.com>2017-07-05 12:52:10 +0300
committerArkady Shapkin <arkady.shapkin@gmail.com>2017-07-11 02:09:05 +0300
commit83e3a296dc6921b2371b12dde004b6d7a4d11dd6 (patch)
tree3eba841b3a843d157df934ba9c13d2920497d487 /ports/suitesparse
parent88fdd8d75c95ed80db470b766cf3d998ca05639f (diff)
downloadvcpkg-83e3a296dc6921b2371b12dde004b6d7a4d11dd6.tar.gz
vcpkg-83e3a296dc6921b2371b12dde004b6d7a4d11dd6.zip
[suitesparse] Porfile fix
Diffstat (limited to 'ports/suitesparse')
-rw-r--r--ports/suitesparse/CONTROL2
-rw-r--r--ports/suitesparse/portfile.cmake22
-rw-r--r--ports/suitesparse/remove-debug-postfix.patch11
3 files changed, 14 insertions, 21 deletions
diff --git a/ports/suitesparse/CONTROL b/ports/suitesparse/CONTROL
index 74491898e..000132c37 100644
--- a/ports/suitesparse/CONTROL
+++ b/ports/suitesparse/CONTROL
@@ -1,4 +1,4 @@
Source: suitesparse
-Version: 4.5.5-1
+Version: 4.5.5-2
Build-Depends: metis, clapack
Description: algebra library
diff --git a/ports/suitesparse/portfile.cmake b/ports/suitesparse/portfile.cmake
index 737561f9f..ce97c4b9f 100644
--- a/ports/suitesparse/portfile.cmake
+++ b/ports/suitesparse/portfile.cmake
@@ -42,6 +42,7 @@ vcpkg_extract_source_archive(${SUITESPARSE} ${SUITESPARSEWIN_PATH})
vcpkg_apply_patches(
SOURCE_PATH ${SUITESPARSEWIN_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-suitesparse.patch"
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/remove-debug-postfix.patch"
)
vcpkg_configure_cmake(
@@ -63,11 +64,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/suitesparse/)
-
-file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SuiteSparse-config.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake)
-file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SuiteSparse-config-release.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-release.cmake)
-file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SuiteSparse-config-debug.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake)
+vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
file(RENAME ${CURRENT_PACKAGES_DIR}/UseSuiteSparse.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/UseSuiteSparse.cmake)
file(RENAME ${CURRENT_PACKAGES_DIR}/SuiteSparseConfig.cmake ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake)
@@ -77,24 +74,9 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/SuiteSparseConfig.cmake)
# Update paths in SuiteSparseConfig.cmake
file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake _contents)
string(REPLACE "set(SuiteSparse_LIB_POSTFIX \"64\")" "set(SuiteSparse_LIB_POSTFIX \"\")" _contents "${_contents}")
-string(REPLACE "\#\# do nothing, it's OK" "include(${USE_SuiteSparse})" _contents "${_contents}")
-
file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparseConfig.cmake "${_contents}")
-# Update paths in SuiteSparse-config.cmake
-file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake _contents)
-string(REPLACE "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)"
- "get_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)" _contents "${_contents}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config.cmake "${_contents}")
-
-# Update paths in SuiteSparse-config-debug.cmake
-file(READ ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake _contents)
-string(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/debug/lib/" _contents "${_contents}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/suitesparse/SuiteSparse-config-debug.cmake "${_contents}")
-
#clean folders
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright of suitesparse and suitesparse-metis-for-windows
diff --git a/ports/suitesparse/remove-debug-postfix.patch b/ports/suitesparse/remove-debug-postfix.patch
new file mode 100644
index 000000000..1b41139da
--- /dev/null
+++ b/ports/suitesparse/remove-debug-postfix.patch
@@ -0,0 +1,11 @@
+--- CMakeLists.txt Mon Feb 22 22:18:25 2016
++++ CMakeLists.txt Wed Jul 05 14:14:21 2017
+@@ -35,7 +35,7 @@
+
+ # We want libraries to be named "libXXX" and "libXXXd" in all compilers:
+ # ------------------------------------------------------------------------
+-set(CMAKE_DEBUG_POSTFIX "d")
++#set(CMAKE_DEBUG_POSTFIX "d")
+ IF(MSVC)
+ set(SP_LIB_PREFIX "lib") # Libs are: "libXXX"
+ ENDIF(MSVC)