Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions mingw-w64-arpack/0002-parpack-optional-installation.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
From f76b9267392f77716d205394108e1d9fe156c416 Mon Sep 17 00:00:00 2001
From de353fb99b35ee15bc652c217a7475590ac56612 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <markus.muetzel@gmx.de>
Date: Sat, 5 Sep 2026 18:42:19 +0200
Subject: [PATCH] parpack: optional installation
Subject: [PATCH] Support optional installation of parpack in CMake config
files

In MSYS2, the parpack library is split into a separate package.
Some distributions (e.g., Debian/Ubuntu or MSYS2) split the parpack library into
a separate package.
That leads to issues if their arpack package is installed but their parpack
package is not.

Support using the CMake config files in the case where the parpack package is
not installed.
Auto-generated CMake target files check whether the respective files actually
exist on disc. Because both the arpack import target and the parpack import
target are included in the same auto-generated CMake target file of arpack-ng
(if it was configured to be built parpack), that leads to a fatal error when
attempting to import the arpack CMake target in downstream projects while the
parpack files are not installed.

Support using the CMake config files in the case where distributions split
parpack into a separate package, and that package is not installed.
That is done by auto-generating a separate CMake target file for parpack,
and checking whether it exists before including it in the CMake config file.
Distributors can then move the CMake target file for parpack to their
separate package.
---
CHANGES | 1 +
CMakeLists.txt | 7 ++++++-
cmake/arpackng-config.cmake.in | 4 ++++
2 files changed, 10 insertions(+), 1 deletion(-)
cmake/arpackng-config.cmake.in | 6 +++++-
3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d15ff0e..c46b63f 100644
index d15ff0ecf..7a3273f83 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -860,7 +860,7 @@ install(FILES "${PROJECT_BINARY_DIR}/SRC/arpack${LIBSUFFIX}${ITF64SUFFIX}.pc"
Expand All @@ -32,26 +48,32 @@ index d15ff0e..c46b63f 100644
+if (MPI)
+ install(EXPORT parpackngTargets
+ DESTINATION "${ARPACK_INSTALL_CMAKEDIR}"
+)
+ )
+endif()
# Provide find_package for arpack-ng to users.
configure_file(cmake/arpackng-config.cmake.in "${PROJECT_BINARY_DIR}/arpackng-config.cmake" @ONLY)
configure_file(cmake/arpackng-config-version.cmake.in "${PROJECT_BINARY_DIR}/arpackng-config-version.cmake" @ONLY)
diff --git a/cmake/arpackng-config.cmake.in b/cmake/arpackng-config.cmake.in
index bafa3fe..72e5458 100644
index bafa3fed1..968ff6f4c 100644
--- a/cmake/arpackng-config.cmake.in
+++ b/cmake/arpackng-config.cmake.in
@@ -24,7 +24,7 @@ if (NOT @BUILD_SHARED_LIBS@)
if (@ICB@)
enable_language(Fortran)
endif()
- if (@MPI@)
+ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/parpackngTargets.cmake")
include(FindMPI)
if (NOT TARGET MPI::Fortran)
find_dependency(MPI REQUIRED COMPONENTS Fortran)
@@ -34,6 +34,10 @@ endif()

include("${CMAKE_CURRENT_LIST_DIR}/arpackngTargets.cmake")

+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/parpackngTargets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/parpackngTargets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/parpackngTargets.cmake")
+endif()
+
add_library(ARPACK::ARPACK ALIAS arpack)
if (TARGET parpack)
add_library(PARPACK::PARPACK ALIAS parpack)
--
2.51.0.windows.2

4 changes: 2 additions & 2 deletions mingw-w64-arpack/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-${_realname}64"
$([[ "${CARCH}" != "x86_64" ]] || echo "${MINGW_PACKAGE_PREFIX}-p${_realname}"))
pkgver=3.9.1
pkgrel=8
pkgrel=9
pkgdesc="Fortran77 subroutines designed to solve large scale eigenvalue problems (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -31,7 +31,7 @@ source=(https://github.com/opencollab/arpack-ng/archive/${pkgver}/${_realname}-$
0002-parpack-optional-installation.patch)
sha256sums=('f6641deb07fa69165b7815de9008af3ea47eb39b2bb97521fbf74c97aba6e844'
'8bf923fb87d51bb313fc154d070941b932e74d6b7094e699fa84da6a913e3817'
'4247a559c9cf6c158107648534c56af756013dc4ba9bbdbd6741f0618084a849')
'2e7abfbd58eaab150e097d2c9787ee83b2da43bfa9f6d0e4a5425d3dd46a86f1')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
Expand Down
Loading