From nobody Thu Oct 5 12:14:47 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S1VqW4wNMz4wVYM; Thu, 5 Oct 2023 12:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S1VqW3y7zz3bsW; Thu, 5 Oct 2023 12:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696508087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZiMkL9+leb8tyzAd17uFFRFxapU/udw4N0404WKXXFg=; b=giJuzWHIKM0ApEEYdTCo0hIq4gb72txnk99wRH7C1mc6ldPrekCvlfx2NT7OFByqt6nhIQ EePSZfY3lOisny0tSDmT8zIAzDTcGt4n4huoL3JMwoRd6AsTF7B8g+ZUHjFAjvoK2nvoSE NKDtJelbXuHGRGZKCdVNwUu9anwJtL7v+ebVJ4dC8IQLYggC9No60u/JB3aP2ZIf1EeEtU Yw8PWC48Rr53O6ZcjcYYMO5cNzRx7RzDObzBQYXlQMuol/I8okICkuNYkhe743e+fZc2wO 1TLacGQqvY9pFhrKkS0p/DRYQ2sRhujOHbEZDuqSTW5K/0xO13DPvX1lo105vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696508087; a=rsa-sha256; cv=none; b=I1CrbcnOrB9bc+itaOwspwZV4ibOPjfq4uyl/QPgZCbl8yFyKwbOh3vvjI5UriwEAFF7VW Icsb15MV8t8waGj54fW6FqPZ8AORoOTvpZlQaDNq4QwZHReZnE5X454mmBKxFncLVUQdIV xPHWImNKHI1wO1anN/lfaC2hvGxYkNJgKaBAZYtbbQ4+hG1qa75EQtdUsyygO31SCdFFB6 ISOJzXKzkvrx6SeRmKCrEWGG5W3JJkE+vMglc3RyjcPkyLoS5SJlyep/JUOawpWdDwbPuk KXCh4UtMABFEIF7XqPJg+3suCYDrjIyFSwZQK3+Li5jIGGmwuMJiI/w4iP/e0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696508087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZiMkL9+leb8tyzAd17uFFRFxapU/udw4N0404WKXXFg=; b=KmKLvW87z7AJkHn82Muklaqyg+VGEgYg89LCHgCodyiEjinvTnNUhE/r9ZaC9ZKnegn2cG aQ1kSmdbeqSk6a5KEsKQFYDA9OzpNuqLk/8szLFGwfmcHKw541D4lc8PQnSN3lLq7SL9aV C0gAYXa7X6uvzMAET2dUBR1SelgGUCY4ehE3DO+4OqbaF7oc+E9bClt6VwHtf37vgJUK3u LULcfP4x41klG+N7GhzgRVNzl6qSXcJ6zr5hJSQSRVt291c809ny1HZGxs/tyPUF1hGuok FHJgjIASoVChxPZ1zlTnU8PWVmMi57aS2JrBCJpyRZcQRgQ0O7e0KAmAyQmJlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S1VqW32d0z1JFb; Thu, 5 Oct 2023 12:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 395CElHv077877; Thu, 5 Oct 2023 12:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395CEl1a077874; Thu, 5 Oct 2023 12:14:47 GMT (envelope-from git) Date: Thu, 5 Oct 2023 12:14:47 GMT Message-Id: <202310051214.395CEl1a077874@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: a3fad805f59b - main - math/fftw3: Add missing FFTW3LibraryDepends.cmake List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3fad805f59b0c4f5ab2a3339fac490b54a1bb79 Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=a3fad805f59b0c4f5ab2a3339fac490b54a1bb79 commit a3fad805f59b0c4f5ab2a3339fac490b54a1bb79 Author: Jason E. Hale AuthorDate: 2023-10-05 04:20:41 +0000 Commit: Jason E. Hale CommitDate: 2023-10-05 12:13:50 +0000 math/fftw3: Add missing FFTW3LibraryDepends.cmake This file would normally be generated by cmake, but since we're using the more feature-complete and stable autotools configure, instead of pulling in cmake, just provide a pre-generated template file. This fixes finding fftw3 with future krita. Install the cmake configuration files in separate directories for each flavor so that the exported targets are correctly defined. See: https://github.com/FFTW/fftw3/issues/130 --- math/fftw3/Makefile | 18 ++++++- math/fftw3/files/FFTW3LibraryDepends.cmake.in | 68 +++++++++++++++++++++++++++ math/fftw3/pkg-plist | 21 +++++---- 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