aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/superlu
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/superlu
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/superlu')
-rw-r--r--vcpkg/ports/superlu/portfile.cmake32
-rw-r--r--vcpkg/ports/superlu/remove-make.inc.patch12
-rw-r--r--vcpkg/ports/superlu/superfluous-configure.patch12
-rw-r--r--vcpkg/ports/superlu/vcpkg.json18
4 files changed, 74 insertions, 0 deletions
diff --git a/vcpkg/ports/superlu/portfile.cmake b/vcpkg/ports/superlu/portfile.cmake
new file mode 100644
index 0000000..a7618fb
--- /dev/null
+++ b/vcpkg/ports/superlu/portfile.cmake
@@ -0,0 +1,32 @@
+if(VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xiaoyeli/superlu
+ REF "v${VERSION}"
+ SHA512 d2b35ccfd4bee6f5967a1a65edc07d32a7d842aa3f623494de78cf69dc5f4819d82f675d6b2aec035fcbca0a8a3966ab76fa105e6162e8242eb6a56870e41cba
+ HEAD_REF master
+ PATCHES
+ remove-make.inc.patch
+ superfluous-configure.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DXSDK_ENABLE_Fortran=OFF
+ -Denable_tests=OFF
+ -Denable_internal_blaslib=OFF
+ -Denable_doc=OFF
+ -Denable_examples=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt")
diff --git a/vcpkg/ports/superlu/remove-make.inc.patch b/vcpkg/ports/superlu/remove-make.inc.patch
new file mode 100644
index 0000000..3652520
--- /dev/null
+++ b/vcpkg/ports/superlu/remove-make.inc.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d059e89..fb0fb46 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -234,7 +234,6 @@ add_subdirectory(DOC)
+ # 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/vcpkg/ports/superlu/superfluous-configure.patch b/vcpkg/ports/superlu/superfluous-configure.patch
new file mode 100644
index 0000000..3505f0b
--- /dev/null
+++ b/vcpkg/ports/superlu/superfluous-configure.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fb0fb46..772f56c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -240,7 +240,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+
+ configure_file(${SuperLU_SOURCE_DIR}/SRC/superlu_config.h.in ${SuperLU_BINARY_DIR}/SRC/superlu_config.h)
+-configure_file(${SuperLU_SOURCE_DIR}/SRC/superlu_config.h.in ${SuperLU_SOURCE_DIR}/SRC/superlu_config.h)
+
+ # Following is to configure a header file for FORTRAN code
+ configure_file(${SuperLU_SOURCE_DIR}/SRC/superlu_config.h.in ${SuperLU_BINARY_DIR}/FORTRAN/superlu_config.h)
diff --git a/vcpkg/ports/superlu/vcpkg.json b/vcpkg/ports/superlu/vcpkg.json
new file mode 100644
index 0000000..ca70591
--- /dev/null
+++ b/vcpkg/ports/superlu/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "superlu",
+ "version": "7.0.0",
+ "description": "Supernodal sparse direct solver.",
+ "homepage": "https://github.com/xiaoyeli/superlu",
+ "license": "BSD-3-Clause-LBNL",
+ "dependencies": [
+ "blas",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}