From 831290a360abb53867bf65dee8ad5b4f39f0ddfd Mon Sep 17 00:00:00 2001 From: cao-fei8 Date: Fri, 6 Jan 2023 18:37:20 +0800 Subject: [PATCH] fix fortran api installation when not main project Signed-off-by: cao-fei8 --- ...installation-when-not-main-project-2.patch | 29 +++++++++++++++++++ fftw.spec | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-fix-fortran-api-installation-when-not-main-project-2.patch diff --git a/0001-fix-fortran-api-installation-when-not-main-project-2.patch b/0001-fix-fortran-api-installation-when-not-main-project-2.patch new file mode 100644 index 0000000..37694df --- /dev/null +++ b/0001-fix-fortran-api-installation-when-not-main-project-2.patch @@ -0,0 +1,29 @@ +From 5ebbaaaac87ead8cf80a9106d31076768b3cd108 Mon Sep 17 00:00:00 2001 +From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> +Date: Thu, 23 Dec 2021 17:43:35 +0100 +Subject: [PATCH] fix fortran api installation when not main project (#211) + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b6e46667..298f830a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -369,10 +369,10 @@ install(TARGETS ${fftw3_lib} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + install (FILES api/fftw3.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-if (EXISTS ${CMAKE_SOURCE_DIR}/api/fftw3.f) ++if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/api/fftw3.f) + install (FILES api/fftw3.f api/fftw3l.f03 api/fftw3q.f03 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + endif () +-if (EXISTS ${CMAKE_SOURCE_DIR}/api/fftw3.f03.in) ++if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/api/fftw3.f03.in) + file (READ api/fftw3.f03.in FFTW3_F03_IN OFFSET 42) + file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/fftw3.f03 "! Generated automatically. DO NOT EDIT!\n\n") + file (APPEND ${CMAKE_CURRENT_BINARY_DIR}/fftw3.f03 " integer, parameter :: C_FFTW_R2R_KIND = ${C_FFTW_R2R_KIND}\n\n") +-- +2.33.0 + diff --git a/fftw.spec b/fftw.spec index b9c9372..847d897 100644 --- a/fftw.spec +++ b/fftw.spec @@ -11,11 +11,12 @@ Name: fftw Version: 3.3.10 -Release: 1 +Release: 2 Summary: A C subroutine library for computing the discrete Fourier transform License: GPLv2+ URL: http://www.fftw.org Source0: http://www.fftw.org/fftw-%{version}.tar.gz +Patch0: 0001-fix-fortran-api-installation-when-not-main-project-2.patch BuildRequires: gcc-gfortran autoconf automake libtool time perl-interpreter gcc_secure make %global quad 0 @@ -462,6 +463,9 @@ fi %endif %changelog +* Fri Jan 6 2023 caofei - 3.3.10-2 +- fix fortran api installation when not main project + * Thu Sep 15 2022 lutkunpeng - 3.3.10-1 - DESC: update to 3.3.10 -- Gitee