Le Mon, Aug 11, 2025 at 08:48:26AM +0200, Rafael Sadowski a écrit :
> On Sun Aug 10, 2025 at 08:56:49PM +0200, Denis Fondras wrote:
> > On Sun, Aug 10, 2025 at 08:15:37PM +0200, Rafael Sadowski wrote:
> > > On Sun Aug 10, 2025 at 07:57:04PM +0200, Matthias Kilian wrote:
> > > > Hi,
> > > > 
> > > > [cc'd rsadowski, because this may as well be a qt6 problem]
> > > > 
> > > > during my partial bulk build (with a ports tree from 8th august),
> > > > graphics/flameshot first failed during configure because it wanted git
> > > > installed. So I pkg_added git, removed the build dir and the dpb lock,
> > > > and now it tries to clone some stuff from gitlab.com (which isn't
> > > > allowed):
> > > 
> > > This is because flameshot 13 has been switched from Qt5 to Qt6 (see
> > > QT_DEFAULT_MAJOR_VERSION and QT_VERSION_MAJOR) but the port still
> > > uses Qt5.
> > > 
> > > I see the following options:
> > > 
> > > - Port https://gitlab.com/mattbas/Qt-Color-Widgets.git and switch
> > >   flameshot 13 to Qt6 and add qt-color-widgets as a new dependency.
> > > 
> > > - Get a second source of
> > >   https://gitlab.com/mattbas/Qt-Color-Widgets.git and extract it to
> > >   "${CMAKE_SOURCE_DIR}/external/Qt-Color-Widgets/"
> > > 
> > > - Backport to 12.
> > > 
> > > I would opt for the first option. Until then, we should mark
> > > flameshot as broken. The old one will still work.
> > > 
> > 
> > Would this work until I can make more tests ?
> > 
> 
> The update to 13 completely failed. This diff replaces the bundled
> QtColorWidgets and KDSingleApplication with our ports and switched
> flameshot to Qt6. Tested in KDE Plasma.
> 

Thank you Rafael. I am not sure we need Qt6Network since we disable update
checker and the upload feature has been removed.

Otherwise OK denis@

> diff --git a/graphics/flameshot/Makefile b/graphics/flameshot/Makefile
> index 25bf3cb3f73..497f247a402 100644
> --- a/graphics/flameshot/Makefile
> +++ b/graphics/flameshot/Makefile
> @@ -4,6 +4,7 @@ CATEGORIES =  graphics x11
>  GH_ACCOUNT = flameshot-org
>  GH_PROJECT = flameshot
>  GH_TAGNAME = v13.0.1
> +REVISION =   0
>  
>  HOMEPAGE =   https://flameshot.org/
>  MAINTAINER = Denis Fondras <de...@openbsd.org>
> @@ -11,18 +12,24 @@ MAINTAINER =      Denis Fondras <de...@openbsd.org>
>  # GPLv3+
>  PERMIT_PACKAGE =     Yes
>  
> -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5DBus Qt5Gui Qt5Network
> -WANTLIB += Qt5Svg Qt5Widgets c m
> +WANTLIB += ${COMPILER_LIBCXX} GL Qt6Core Qt6DBus Qt6Gui Qt6Network
> +WANTLIB += Qt6Svg Qt6Widgets QtColorWidgets c kdsingleapplication-qt6
> +WANTLIB += m
>  
>  MODULES =    devel/cmake \
> -             x11/qt5
> +             x11/qt6
>  
> -LIB_DEPENDS =        x11/qt5/qtsvg
> +LIB_DEPENDS =        x11/qt6/qtsvg \
> +             x11/kdsingleapplication \
> +             x11/qt-color-widgets
>  
>  RUN_DEPENDS =        devel/desktop-file-utils \
>               x11/gtk+4,-guic
>  
>  CONFIGURE_ARGS +=    -DENABLE_CACHE=OFF \
> +                     -DDISABLE_UPDATE_CHECKER=OFF
> +
> +CONFIGURE_ARGS +=    -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON \
>                       -Wno-dev
>  
>  NO_TEST =    Yes
> diff --git a/graphics/flameshot/patches/patch-CMakeLists_txt 
> b/graphics/flameshot/patches/patch-CMakeLists_txt
> new file mode 100644
> index 00000000000..d44a39e99a9
> --- /dev/null
> +++ b/graphics/flameshot/patches/patch-CMakeLists_txt
> @@ -0,0 +1,34 @@
> +Index: CMakeLists.txt
> +--- CMakeLists.txt.orig
> ++++ CMakeLists.txt
> +@@ -25,10 +25,14 @@ option(BUILD_SHARED_LIBS OFF)
> + set(CMAKE_POSITION_INDEPENDENT_CODE ON)
> + 
> + 
> +-# Dependency can be fetched via flatpak builder
> +-if(EXISTS "${CMAKE_SOURCE_DIR}/external/Qt-Color-Widgets/CMakeLists.txt")
> ++find_package(QtColorWidgets)
> ++
> ++if(QtColorWidgets_FOUND)
> ++    message(STATUS "Found system QtColorWidgets package")
> ++elseif(EXISTS 
> "${CMAKE_SOURCE_DIR}/external/Qt-Color-Widgets/CMakeLists.txt")
> +     add_subdirectory("${CMAKE_SOURCE_DIR}/external/Qt-Color-Widgets" 
> EXCLUDE_FROM_ALL)
> + else()
> ++    # Dependency can be fetched via flatpak builder
> +     FetchContent_Declare(
> +         qtColorWidgets
> +         GIT_REPOSITORY https://gitlab.com/mattbas/Qt-Color-Widgets.git
> +@@ -111,8 +115,12 @@ if (USE_KDSINGLEAPPLICATION)
> +   set(KDSingleApplication_EXAMPLES OFF CACHE BOOL "Don't build the 
> examples")
> +   set(KDSingleApplication_STATIC ON CACHE BOOL "Build static versions of 
> the libraries")
> + 
> ++  find_package(KDSingleApplication-qt6)
> ++
> ++  if(KDSingleApplication-qt6_FOUND)
> ++    message(STATUS "Found system KDSingleApplication package")
> +   # Check if KDSingleApplication is available locally
> +-  if(EXISTS 
> "${CMAKE_SOURCE_DIR}/external/KDSingleApplication/CMakeLists.txt")
> ++  elseif(EXISTS 
> "${CMAKE_SOURCE_DIR}/external/KDSingleApplication/CMakeLists.txt")
> +     add_subdirectory("${CMAKE_SOURCE_DIR}/external/KDSingleApplication")
> +   else()
> +     FetchContent_Declare(
> diff --git a/graphics/flameshot/patches/patch-src_CMakeLists_txt 
> b/graphics/flameshot/patches/patch-src_CMakeLists_txt
> index c274b9db0cc..32ad2428858 100644
> --- a/graphics/flameshot/patches/patch-src_CMakeLists_txt
> +++ b/graphics/flameshot/patches/patch-src_CMakeLists_txt
> @@ -3,6 +3,15 @@ Install manpage to correct location
>  Index: src/CMakeLists.txt
>  --- src/CMakeLists.txt.orig
>  +++ src/CMakeLists.txt
> +@@ -220,7 +220,7 @@ if (USE_KDSINGLEAPPLICATION)
> + 
> +   target_link_libraries(
> +           flameshot
> +-          kdsingleapplication
> ++          KDAB::kdsingleapplication
> +   )
> + endif()
> + 
>  @@ -362,7 +362,7 @@ if (UNIX)
>   
>       # Install man pages
> diff --git a/graphics/flameshot/pkg/PLIST b/graphics/flameshot/pkg/PLIST
> index 0cc7fae3a80..11cbada6708 100644
> --- a/graphics/flameshot/pkg/PLIST
> +++ b/graphics/flameshot/pkg/PLIST
> @@ -1,70 +1,10 @@
>  @bin bin/flameshot
> -include/QtColorWidgets/
> -include/QtColorWidgets/AbstractWidgetList
> -include/QtColorWidgets/BoundColorSelector
> -include/QtColorWidgets/ColorDelegate
> -include/QtColorWidgets/ColorDialog
> -include/QtColorWidgets/ColorListWidget
> -include/QtColorWidgets/ColorPreview
> -include/QtColorWidgets/ColorSelector
> -include/QtColorWidgets/ColorWheel
> -include/QtColorWidgets/GradientEditor
> -include/QtColorWidgets/GradientListModel
> -include/QtColorWidgets/GradientSlider
> -include/QtColorWidgets/HarmonyColorWheel
> -include/QtColorWidgets/HueSlider
> -include/QtColorWidgets/QtColorWidgets_version.h
> -include/QtColorWidgets/abstract_widget_list.hpp
> -include/QtColorWidgets/bound_color_selector.hpp
> -include/QtColorWidgets/color_2d_slider.hpp
> -include/QtColorWidgets/color_delegate.hpp
> -include/QtColorWidgets/color_dialog.hpp
> -include/QtColorWidgets/color_line_edit.hpp
> -include/QtColorWidgets/color_list_widget.hpp
> -include/QtColorWidgets/color_names.hpp
> -include/QtColorWidgets/color_palette.hpp
> -include/QtColorWidgets/color_palette_model.hpp
> -include/QtColorWidgets/color_palette_widget.hpp
> -include/QtColorWidgets/color_preview.hpp
> -include/QtColorWidgets/color_selector.hpp
> -include/QtColorWidgets/color_utils.hpp
> -include/QtColorWidgets/color_wheel.hpp
> -include/QtColorWidgets/color_wheel_private.hpp
> -include/QtColorWidgets/colorwidgets_global.hpp
> -include/QtColorWidgets/gradient_delegate.hpp
> -include/QtColorWidgets/gradient_editor.hpp
> -include/QtColorWidgets/gradient_helper.hpp
> -include/QtColorWidgets/gradient_list_model.hpp
> -include/QtColorWidgets/gradient_slider.hpp
> -include/QtColorWidgets/harmony_color_wheel.hpp
> -include/QtColorWidgets/hue_slider.hpp
> -include/QtColorWidgets/qt_compatibility.hpp
> -include/QtColorWidgets/swatch.hpp
> -include/kdsingleapplication-qt6/
> -include/kdsingleapplication-qt6/kdsingleapplication.h
> -include/kdsingleapplication-qt6/kdsingleapplication_lib.h
> -include/kdsingleapplication-qt6/kdsingleapplication_version.h
> -lib/cmake/KDSingleApplication-qt6/
> -lib/cmake/KDSingleApplication-qt6/KDSingleApplication-qt6Targets${MODCMAKE_BUILD_SUFFIX}
> -lib/cmake/KDSingleApplication-qt6/KDSingleApplication-qt6Targets.cmake
> -lib/cmake/QtColorWidgets/
> -lib/cmake/QtColorWidgets/QtColorWidgets${MODCMAKE_BUILD_SUFFIX}
> -lib/cmake/QtColorWidgets/QtColorWidgets.cmake
> -lib/cmake/QtColorWidgets/qtcolorwidgets-config-version.cmake
> -lib/cmake/QtColorWidgets/qtcolorwidgets-config.cmake
> -lib/cmake/QtColorWidgets/qtcolorwidgets-targets${MODCMAKE_BUILD_SUFFIX}
> -lib/cmake/QtColorWidgets/qtcolorwidgets-targets.cmake
> -@static-lib lib/libQtColorWidgets.a
> -@static-lib lib/libkdsingleapplication-qt6.a
> -lib/pkgconfig/QtColorWidgets.pc
>  @man man/man1/flameshot.1
>  share/applications/org.flameshot.Flameshot.desktop
>  share/bash-completion/completions/flameshot
>  share/dbus-1/interfaces/
>  share/dbus-1/interfaces/org.flameshot.Flameshot.xml
>  share/dbus-1/services/org.flameshot.Flameshot.service
> -share/fish/
> -share/fish/vendor_completions.d/
>  share/fish/vendor_completions.d/flameshot.fish
>  share/flameshot/
>  share/flameshot/translations/
> @@ -111,8 +51,6 @@ share/icons/hicolor/scalable/apps/flameshot.svg
>  share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg
>  share/metainfo/
>  share/metainfo/org.flameshot.Flameshot.metainfo.xml
> -share/zsh/
> -share/zsh/site-functions/
>  share/zsh/site-functions/_flameshot
>  @tag gtk-update-icon-cache %D/share/icons/hicolor
>  @tag update-desktop-database

Reply via email to