aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/fftw3/Makefile18
-rw-r--r--math/fftw3/files/FFTW3LibraryDepends.cmake.in68
-rw-r--r--math/fftw3/pkg-plist21
3 files changed, 95 insertions, 12 deletions
diff --git a/math/fftw3/Makefile b/math/fftw3/Makefile
index e3065aeb5488..25ef2e136f04 100644
--- a/math/fftw3/Makefile
+++ b/math/fftw3/Makefile
@@ -1,6 +1,6 @@
PORTNAME= fftw3
DISTVERSION= 3.3.10
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= math
MASTER_SITES= http://www.fftw.org/ \
ftp://ftp.fftw.org/pub/fftw/
@@ -29,6 +29,17 @@ USE_LDCONFIG= yes
CONFIGURE_ARGS= --enable-shared --enable-threads --disable-fortran
MPIDIR?= ${LOCALBASE}/mpi/openmpi
+SHLIB_VER_MAJ= ${DISTVERSION:R:R}
+SHLIB_VER_MIN= 6
+SHLIB_VER_PAT= ${DISTVERSION:E}
+SHLIB_VER= ${SHLIB_VER_MAJ}.${SHLIB_VER_MIN}.${SHLIB_VER_PAT}
+PLIST_SUB= SHLIB_VER=${SHLIB_VER} \
+ SHLIB_VER_MAJ=${SHLIB_VER_MAJ}
+SUB_FILES= FFTW3LibraryDepends.cmake
+SUB_LIST= FFTW3_SUFX=${FFTW3_SUFX} \
+ SHLIB_VER=${SHLIB_VER} \
+ SHLIB_VER_MAJ=${SHLIB_VER_MAJ}
+
.if ${FFTW3_FLAVOR} == "default"
INFO= fftw3
.else
@@ -145,6 +156,8 @@ post-patch:
${WRKSRC}/api/import-system-wisdom.c \
${WRKSRC}/doc/fftw3* \
${WRKSRC}/tools/*
+ @${REINPLACE_CMD} -e '/^cmakedir/s|fftw3|fftw3@PREC_SUFFIX@|' \
+ ${WRKSRC}/Makefile.in
.if ${FFTW3_FLAVOR} != "default"
@${REINPLACE_CMD} -E \
-e '/(DIST_COMMON|bin_SCRIPTS|BUILT_SOURCES|EXTRA_DIST) =/,\
@@ -164,8 +177,9 @@ post-configure:
post-configure-G77_WRAPPERS-on:
@${ECHO_CMD} "#define WITH_G77_WRAPPERS 1" >> ${WRKSRC}/config.h
-.if ${FFTW3_FLAVOR} != "default"
post-install:
+ ${INSTALL_DATA} ${WRKDIR}/FFTW3LibraryDepends.cmake ${STAGEDIR}${PREFIX}/lib/cmake/fftw3${FFTW3_SUFX}
+.if ${FFTW3_FLAVOR} != "default"
${INSTALL_MAN} ${WRKSRC}/tools/fftw${FFTW3_SUFX}-wisdom.1 ${STAGEDIR}${PREFIX}/man/man1
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib*.so
.endif
diff --git a/math/fftw3/files/FFTW3LibraryDepends.cmake.in b/math/fftw3/files/FFTW3LibraryDepends.cmake.in
new file mode 100644
index 000000000000..1d2febfcd35b
--- /dev/null
+++ b/math/fftw3/files/FFTW3LibraryDepends.cmake.in
@@ -0,0 +1,68 @@
+# Generated by CMake
+
+if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
+ message(FATAL_ERROR "CMake >= 2.8.0 required")
+endif()
+if(CMAKE_VERSION VERSION_LESS "2.8.3")
+ message(FATAL_ERROR "CMake >= 2.8.3 required")
+endif()
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.8.3...3.25)
+#----------------------------------------------------------------
+# Generated CMake target import file.
+#----------------------------------------------------------------
+
+# Commands may need to know the format version.
+set(CMAKE_IMPORT_FILE_VERSION 1)
+
+# Protect against multiple inclusion, which would fail when already imported targets are added once more.
+set(_cmake_targets_defined "")
+set(_cmake_targets_not_defined "")
+set(_cmake_expected_targets "")
+foreach(_cmake_expected_target IN ITEMS FFTW3::fftw3%%FFTW3_SUFX%%)
+ list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
+ if(TARGET "${_cmake_expected_target}")
+ list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
+ else()
+ list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
+ endif()
+endforeach()
+unset(_cmake_expected_target)
+if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
+ unset(_cmake_targets_defined)
+ unset(_cmake_targets_not_defined)
+ unset(_cmake_expected_targets)
+ unset(CMAKE_IMPORT_FILE_VERSION)
+ cmake_policy(POP)
+ return()
+endif()
+if(NOT _cmake_targets_defined STREQUAL "")
+ string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
+ string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
+ message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
+endif()
+unset(_cmake_targets_defined)
+unset(_cmake_targets_not_defined)
+unset(_cmake_expected_targets)
+
+
+# Create imported target FFTW3::fftw3%%FFTW3_SUFX%%
+add_library(FFTW3::fftw3%%FFTW3_SUFX%% SHARED IMPORTED)
+
+set_target_properties(FFTW3::fftw3%%FFTW3_SUFX%% PROPERTIES
+ INTERFACE_LINK_LIBRARIES "m"
+)
+
+# Import target "FFTW3::fftw3%%FFTW3_SUFX%%" for configuration "Release"
+set_property(TARGET FFTW3::fftw3%%FFTW3_SUFX%% APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+set_target_properties(FFTW3::fftw3%%FFTW3_SUFX%% PROPERTIES
+ IMPORTED_LOCATION_RELEASE "%%LOCALBASE%%/lib/libfftw3%%FFTW3_SUFX%%.so.%%SHLIB_VER_MAJ%%"
+ IMPORTED_SONAME_RELEASE "libfftw3%%FFTW3_SUFX%%.so.%%SHLIB_VER%%"
+ )
+
+# This file does not depend on other imported targets which have
+# been exported from the same project but in a separate export set.
+
+# Commands beyond this point should not need to know the version.
+set(CMAKE_IMPORT_FILE_VERSION)
+cmake_policy(POP)
diff --git a/math/fftw3/pkg-plist b/math/fftw3/pkg-plist
index d6e240c6bb7f..637afd9007cb 100644
--- a/math/fftw3/pkg-plist
+++ b/math/fftw3/pkg-plist
@@ -8,24 +8,25 @@ bin/fftw%%FFTW3_SUFX%%-wisdom
%%DEF%%%%OPENMPI%%include/fftw3l-mpi.f03
%%DEF%%include/fftw3l.f03
%%DEF%%include/fftw3q.f03
-lib/cmake/fftw3/FFTW3%%FFTW3_SUFX%%Config.cmake
-lib/cmake/fftw3/FFTW3%%FFTW3_SUFX%%ConfigVersion.cmake
+lib/cmake/fftw3%%FFTW3_SUFX%%/FFTW3%%FFTW3_SUFX%%Config.cmake
+lib/cmake/fftw3%%FFTW3_SUFX%%/FFTW3%%FFTW3_SUFX%%ConfigVersion.cmake
+lib/cmake/fftw3%%FFTW3_SUFX%%/FFTW3LibraryDepends.cmake
lib/libfftw3%%FFTW3_SUFX%%.a
lib/libfftw3%%FFTW3_SUFX%%.so
-lib/libfftw3%%FFTW3_SUFX%%.so.3
-lib/libfftw3%%FFTW3_SUFX%%.so.3.6.10
+lib/libfftw3%%FFTW3_SUFX%%.so.%%SHLIB_VER_MAJ%%
+lib/libfftw3%%FFTW3_SUFX%%.so.%%SHLIB_VER%%
%%OPENMPI%%lib/libfftw3%%FFTW3_SUFX%%_mpi.a
%%OPENMPI%%lib/libfftw3%%FFTW3_SUFX%%_mpi.so
-%%OPENMPI%%lib/libfftw3%%FFTW3_SUFX%%_mpi.so.3
-%%OPENMPI%%lib/libfftw3%%FFTW3_SUFX%%_mpi.so.3.6.10
+%%OPENMPI%%lib/libfftw3%%FFTW3_SUFX%%_mpi.so.%%SHLIB_VER_MAJ%%
+%%OPENMPI%%lib/libfftw3%%FFTW3_SUFX%%_mpi.so.%%SHLIB_VER%%
%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.a
%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.so
-%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.so.3
-%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.so.3.6.10
+%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.so.%%SHLIB_VER_MAJ%%
+%%OPENMP%%lib/libfftw3%%FFTW3_SUFX%%_omp.so.%%SHLIB_VER%%
lib/libfftw3%%FFTW3_SUFX%%_threads.a
lib/libfftw3%%FFTW3_SUFX%%_threads.so
-lib/libfftw3%%FFTW3_SUFX%%_threads.so.3
-lib/libfftw3%%FFTW3_SUFX%%_threads.so.3.6.10
+lib/libfftw3%%FFTW3_SUFX%%_threads.so.%%SHLIB_VER_MAJ%%
+lib/libfftw3%%FFTW3_SUFX%%_threads.so.%%SHLIB_VER%%
libdata/pkgconfig/fftw3%%FFTW3_SUFX%%.pc
%%DEF%%man/man1/fftw-wisdom.1.gz
%%DEF%%man/man1/fftw-wisdom-to-conf.1.gz