From 5c415ff8a0aad831ee90ee4327f26992d5fe3fb3 Mon Sep 17 00:00:00 2001 From: nicole mazzuca Date: Wed, 4 Mar 2020 13:52:00 -0800 Subject: [superlu] Add new port (#9930) --- ports/superlu/CONTROL | 5 +++++ ports/superlu/fix-libm.patch | 17 +++++++++++++++++ ports/superlu/portfile.cmake | 29 +++++++++++++++++++++++++++++ ports/superlu/remove-make.inc.patch | 12 ++++++++++++ scripts/ci.baseline.txt | 3 +++ 5 files changed, 66 insertions(+) create mode 100644 ports/superlu/CONTROL create mode 100644 ports/superlu/fix-libm.patch create mode 100644 ports/superlu/portfile.cmake create mode 100644 ports/superlu/remove-make.inc.patch diff --git a/ports/superlu/CONTROL b/ports/superlu/CONTROL new file mode 100644 index 000000000..69d67385c --- /dev/null +++ b/ports/superlu/CONTROL @@ -0,0 +1,5 @@ +Source: superlu +Version: 2020-01-07 +Build-Depends: openblas +Description: Supernodal sparse direct solver. +Homepage: https://github.com/xiaoyeli/superlu diff --git a/ports/superlu/fix-libm.patch b/ports/superlu/fix-libm.patch new file mode 100644 index 000000000..a356bbda2 --- /dev/null +++ b/ports/superlu/fix-libm.patch @@ -0,0 +1,17 @@ +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index e627f06..9aa8949 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -232,7 +232,11 @@ if(enable_complex16) + endif() + + add_library(superlu ${sources} ${HEADERS}) +-target_link_libraries(superlu PUBLIC ${BLAS_LIB} m) ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ target_link_libraries(superlu PUBLIC ${BLAS_LIB}) ++else() ++ target_link_libraries(superlu PUBLIC ${BLAS_LIB} m) ++endif() + target_include_directories(superlu PUBLIC + $ + $ diff --git a/ports/superlu/portfile.cmake b/ports/superlu/portfile.cmake new file mode 100644 index 000000000..807981f5d --- /dev/null +++ b/ports/superlu/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiaoyeli/superlu + REF a3d5233770f0caad4bc4578b46d3b26af99e9c19 + SHA512 c07e64be51ddef7774a367e1309ef4e596e93571531ec58a0c7b9db60a3db8b3a4a8b1262d66fcd512ad467db5df59a3726db342b259e392a08f56f5dd67c6ef + HEAD_REF master + PATCHES + fix-libm.patch + remove-make.inc.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DXSDK_ENABLE_Fortran=OFF + -Denable_tests=OFF + -Denable_blaslib=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/superlu/remove-make.inc.patch b/ports/superlu/remove-make.inc.patch new file mode 100644 index 000000000..8f7716aad --- /dev/null +++ b/ports/superlu/remove-make.inc.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b414f5f..22f29ce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,7 +155,6 @@ endif() + # file(WRITE "make.defs" "# can be exposed to users" + # ${CMAKE_C_COMPILER} ) + # configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_SOURCE_DIR}/make.inc) +-configure_file(${SuperLU_SOURCE_DIR}/make.inc.in ${SuperLU_SOURCE_DIR}/make.inc) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu.pc.in ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 6e7c8dfcf..8b3586d8d 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1670,6 +1670,9 @@ stormlib:arm-uwp=fail stormlib:x64-uwp=fail stxxl:arm-uwp=fail stxxl:x64-uwp=fail +superlu:arm64-windows=fail +superlu:arm-uwp=fail +superlu:x64-uwp=fail systemc:arm64-windows=fail systemc:arm-uwp=fail systemc:x64-uwp=fail -- cgit v1.2.3