On Fri Jun 03, 2022 at 06:07:45PM +0200, Caspar Schutijser wrote: > Hi, > > On a snapshot of two weeks old, the below command sequence (to compile > trojita outside the ports tree) succeeds successfully. However, on a > machine updated to today's snapshot, this fails with the error message > shown below. I assume it has something to do with the update to > CMake 3.23 (and perhaps specifically with the > "Fix build with CMake 3.23" commit on 2022-05-28) but I don't know for > sure. Do you know what's going on? > > Thanks, > Caspar > > > $ cd /tmp > $ git clone https://invent.kde.org/pim/trojita > $ cd trojita > $ echo "set(CMAKE_PREFIX_PATH /usr/local/lib/qt5/cmake)" >new > $ cat CMakeLists.txt >>new > $ mv new CMakeLists.txt > $ mkdir _build > $ cd _build > $ cmake .. > [snip] > -- Configuring done > CMake Error at /usr/local/lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake:67 > (set_target_properties): > The link interface of target "Qt5::WebCore" contains: > > Qt5::Sensors > > but the target was not found. Possible reasons include: > > * There is a typo in the target name. > * A find_package call is missing for an IMPORTED target. > * An ALIAS target is missing. > > Call Stack (most recent call first): > /usr/local/lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake:87 (include) > /usr/local/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 > (find_package) > /usr/local/lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake:83 > (find_dependency) > CMakeLists.txt:52 (find_package) > > > CMake Error at /usr/local/lib/qt5/cmake/Qt5WebKit/WebKitTargets.cmake:83 > (set_target_properties): > The link interface of target "Qt5::WebKit2" contains: > > Qt5::Positioning > > but the target was not found. Possible reasons include: > > * There is a typo in the target name. > * A find_package call is missing for an IMPORTED target. > * An ALIAS target is missing. > > Call Stack (most recent call first): > /usr/local/lib/qt5/cmake/Qt5WebKit/Qt5WebKitConfig.cmake:87 (include) > /usr/local/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 > (find_package) > /usr/local/lib/qt5/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake:83 > (find_dependency) > CMakeLists.txt:52 (find_package) > > > -- Generating done > CMake Generate step failed. Build files cannot be regenerated correctly.
I think I forgot about this patch. This is a nasty Qt5WebKit issue. Qt5::WebKit2 depends on Sensors, Positioning, Quick and WebChannel but it is not defined in the WebKit2 cmake module as a dependency (/usr/local/lib/qt5/cmake/Qt5WebKit/*). I have also not found a solution to fix this in x11/qt5/qtwebkit (ugly deadbeef). This is the "workaround" we use in other cases. OK? Index: Makefile =================================================================== RCS file: /cvs/ports/mail/trojita/Makefile,v retrieving revision 1.39 diff -u -p -u -p -r1.39 Makefile --- Makefile 28 May 2022 06:20:02 -0000 1.39 +++ Makefile 4 Jun 2022 07:28:57 -0000 @@ -3,7 +3,7 @@ USE_WXNEEDED = Yes COMMENT = fast Qt IMAP e-mail client DISTNAME = trojita-0.7 -REVISION = 15 +REVISION = 16 SHARED_LIBS = trojita_plugins 2.0 # 2.0 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: /cvs/ports/mail/trojita/patches/patch-CMakeLists_txt,v retrieving revision 1.4 diff -u -p -u -p -r1.4 patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 11 Mar 2022 19:35:02 -0000 1.4 +++ patches/patch-CMakeLists_txt 4 Jun 2022 07:28:57 -0000 @@ -12,7 +12,18 @@ Index: CMakeLists.txt if(WIN32) trojita_option(WITH_NSIS "Build Windows NSIS installer" AUTO "WITH_DESKTOP") -@@ -94,8 +96,13 @@ trojita_plugin_option(WITH_QTKEYCHAIN_PLUGIN "Build Qt +@@ -81,6 +83,10 @@ find_package(Qt5WebKitWidgets REQUIRED) + find_package(Qt5Widgets REQUIRED) + find_package(Qt5LinguistTools) + find_package(Qt5Svg REQUIRED) ++find_package(Qt5Sensors REQUIRED) ++find_package(Qt5Positioning REQUIRED) ++find_package(Qt5Quick REQUIRED) ++find_package(Qt5WebChannel REQUIRED) + trojita_find_package(Qt5DBus "" "http://qt-project.org" "Qt5 D-Bus support" "Needed for IPC and for some plugins" WITH_DBUS) + trojita_find_package(Qt5Test "" "http://qt-project.org" "Qt5 QTest library" "Needed for automated tests" WITH_TESTS) + if(Qt5LinguistTools_FOUND) +@@ -94,8 +100,13 @@ trojita_plugin_option(WITH_QTKEYCHAIN_PLUGIN "Build Qt trojita_find_package(Git "" "" "" "") trojita_find_package(Mimetic "" "http://www.codesink.org/mimetic_mime_library.html" "C++ MIME Library" "Required for client-side MIME parsing" WITH_MIMETIC) @@ -28,7 +39,7 @@ Index: CMakeLists.txt if(WIN32) trojita_find_package(MakeNSIS "" "http://nsis.sourceforge.net" "Nullsoft Scriptable Install System" "Needed for building Windows installer" WITH_NSIS) -@@ -154,14 +161,6 @@ else() +@@ -154,14 +165,6 @@ else() set(CMAKE_CXX_FLAGS_DEBUG "-Werror ${CMAKE_CXX_FLAGS_DEBUG}") # Also see CMP0043... @@ -43,7 +54,7 @@ Index: CMakeLists.txt # Build warnings are useful tools (and Trojita should be warning-free anyway), enable them on all # configurations. They are warnings, not errors. set(CMAKE_CXX_FLAGS "-Wall -Wsign-compare ${CMAKE_CXX_FLAGS}") -@@ -207,7 +206,7 @@ else() +@@ -207,7 +210,7 @@ else() set(TROJITA_HAVE_MIMETIC False) endif() @@ -52,7 +63,7 @@ Index: CMakeLists.txt set(TROJITA_HAVE_GPGMEPP True) else() set(TROJITA_HAVE_GPGMEPP False) -@@ -321,12 +320,10 @@ if(WITH_MIMETIC) +@@ -321,12 +324,10 @@ if(WITH_MIMETIC) ) endif() if(WITH_CRYPTO_MESSAGES) @@ -65,7 +76,7 @@ Index: CMakeLists.txt endif() if(WITH_ZLIB) -@@ -622,16 +619,20 @@ set_property(TARGET Cryptography APPEND PROPERTY COMPI +@@ -622,16 +623,20 @@ set_property(TARGET Cryptography APPEND PROPERTY COMPI target_link_libraries(Cryptography Common Imap) if(WITH_MIMETIC) target_link_libraries(Cryptography ${MIMETIC_LIBRARIES}) @@ -93,7 +104,7 @@ Index: CMakeLists.txt endif() ## ClearText password plugin -@@ -786,32 +787,6 @@ if(WITH_TESTS) +@@ -786,32 +791,6 @@ if(WITH_TESTS) trojita_test(Imap Imap_Offline) trojita_test(Imap Imap_CopyAndFlagOperations) trojita_test(Cryptography Cryptography_MessageModel)