On Sun Feb 16, 2020 at 02:35:13PM -0500, Brian Callahan wrote:
> Hi ports --
> 
> Attached is an update to graphics/drawpile.
> However, I'm looking for cmake/qt5 experts for help with the update.
> Something in the configure stage isn't quite right.
> 
> I get the following CMake warning:
> ---
> CMake Warning (dev) at src/desktop/CMakeLists.txt:243 (add_executable):
>   Policy CMP0028 is not set: Double colon in target name means ALIAS or
>   IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
>   Use the cmake_policy command to set the policy and suppress this warning.
> 
>   Target "drawpile" links to target "Qt5::DBus" but the target was not
> found.
>   Perhaps a find_package() call is missing for an IMPORTED target, or an
>   ALIAS target is missing?
> This warning is for project developers.  Use -Wno-dev to suppress it.
> ---
> 
> This can be worked around with the post-configure target in the patch, but
> it would be better to fix whatever this warning is.
> 
> ~Brian
> 

The issue comes from qtkeychain. In Qt5KeychainLibraryDepends-release.cmake you 
can find
following lines:

set_target_properties(qt5keychain PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "Qt5::Core;Qt5::DBus"
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libqt5keychain.so.1.0"
  IMPORTED_SONAME_RELEASE "libqt5keychain.so.1.0"
  )

I think "Qt5::Core;Qt5::DBus" is not a valid libname. Anyway the diff below fix
the target properties for qt5keychain and your drawpile issue. I see debian  is
doing something similar.

BTW, you can drop cmake from the MODULES line in drawpile, kf5 does it for you.


Index: Makefile
===================================================================
RCS file: /cvs/ports/security/qtkeychain/Makefile,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 Makefile
--- Makefile    7 Feb 2020 07:13:40 -0000       1.14
+++ Makefile    22 Feb 2020 05:07:39 -0000
@@ -5,7 +5,7 @@ COMMENT =               Qt API to store passwords and
 GH_ACCOUNT =           frankosterfeld
 GH_PROJECT =           qtkeychain
 GH_TAGNAME =           v0.7.0
-REVISION =             4
+REVISION =             5
 
 SHARED_LIBS +=         qt5keychain     1.0 # 0.4
 
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt        22 Feb 2020 05:07:39 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -149,7 +149,7 @@ set(QTKEYCHAIN_TARGET_NAME qt${QTKEYCHAIN_VERSION_INFI
+ if(NOT QTKEYCHAIN_STATIC)
+     add_library(${QTKEYCHAIN_TARGET_NAME} SHARED ${qtkeychain_SOURCES} 
${qtkeychain_MOC_OUTFILES} ${qtkeychain_QM_FILES})
+     set_target_properties(${QTKEYCHAIN_TARGET_NAME} PROPERTIES 
COMPILE_DEFINITIONS QKEYCHAIN_BUILD_QKEYCHAIN_LIB)
+-    target_link_libraries(${QTKEYCHAIN_TARGET_NAME} ${qtkeychain_LIBRARIES})
++    target_link_libraries(${QTKEYCHAIN_TARGET_NAME} PUBLIC 
${QTCORE_LIBRARIES} PRIVATE ${QTDBUS_LIBRARIES})
+ else()
+     add_library(${QTKEYCHAIN_TARGET_NAME} STATIC ${qtkeychain_SOURCES} 
${qtkeychain_MOC_OUTFILES} ${qtkeychain_QM_FILES})
+     set_target_properties(${QTKEYCHAIN_TARGET_NAME} PROPERTIES 
COMPILE_DEFINITIONS QKEYCHAIN_STATICLIB)

Reply via email to