Bug 284648 - graphics/digikam hasn't been updated for QT6/KF6 transition and is uninstalled by standard pkg upgrade
Summary: graphics/digikam hasn't been updated for QT6/KF6 transition and is uninstalle...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
: 284649 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-02-07 22:04 UTC by tjlegg
Modified: 2025-02-15 10:08 UTC (History)
3 users (show)

See Also:
jhale: maintainer-feedback+


Attachments
digikam qt6 kf6 pkg-plist (2.34 KB, patch)
2025-02-08 16:06 UTC, tjlegg
no flags Details | Diff
digikam qt6 kf6 Makefile patch (3.13 KB, patch)
2025-02-08 16:07 UTC, tjlegg
no flags Details | Diff
digikam qt6 kf6 Makefile v2 (3.21 KB, patch)
2025-02-09 12:30 UTC, tjlegg
no flags Details | Diff
digikam qt6 kf6 Makefile v3 (3.20 KB, patch)
2025-02-09 16:22 UTC, tjlegg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tjlegg 2025-02-07 22:04:45 UTC
I'm trying to work on a fix for this but once I've converted the Makefile to use QT6 and KF6, the Qt6 cmake config fails with this error while the file it says doesn't exist actually does exist:

-- Could NOT find Qt6StateMachine (missing: Qt6StateMachine_DIR)
CMake Error at core/cmake/rules/RulesQtFramework.cmake:35 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find required Qt component "StateMachine".

  Expected Config file at
  "/usr/local/lib/cmake/Qt6StateMachine/Qt6StateMachineConfig.cmake" does NOT
  exist
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2025-02-07 22:48:17 UTC
*** Bug 284649 has been marked as a duplicate of this bug. ***
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-02-08 00:49:37 UTC
Try to install devel/qt6-scxml.
Comment 3 tjlegg 2025-02-08 11:57:22 UTC
Added qt5-scxml and it builds in poudriere.

Now working on sorting out the pkg.plist
Comment 4 tjlegg 2025-02-08 15:12:59 UTC
Have a package that builds, installs, and launches showing my photos.

Running through make testports to iron out any wrinkles in the Makefile before posting the diff here.
Comment 5 elwood 2025-02-08 15:28:45 UTC
digikam is not built because the libksane library is not found:

[16:17 /<1>ports/graphics/digikam] # make
===>  License GPLv2 accepted by the user
===>   digikam-8.5.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by digikam-8.5.0 for building
===>  Extracting for digikam-8.5.0
=> SHA256 Checksum OK for KDE/digikam/digiKam-8.5.0.tar.xz.
=> SHA256 Checksum OK for KDE/digikam/classification_classes_ILSVRC2012.txt.
=> SHA256 Checksum OK for KDE/digikam/coco.names.
=> SHA256 Checksum OK for KDE/digikam/resnet50.onnx.
=> SHA256 Checksum OK for KDE/digikam/yolov5n_batch_16_s320.onnx.
=> SHA256 Checksum OK for KDE/digikam/yolov5x_batch_16_s320.onnx.
=> SHA256 Checksum OK for KDE/digikam/weights_inceptionv3_299.pb.
=> SHA256 Checksum OK for KDE/digikam/deploy.prototxt.
=> SHA256 Checksum OK for KDE/digikam/face_recognition_sface_2021dec.onnx.
=> SHA256 Checksum OK for KDE/digikam/openface_nn4.small2.v1.t7.

[...]

-- Installing: /usr/ports/graphics/libksane/work/stage/usr/local/share/locale/ia/LC_MESSAGES
-- Installing: /usr/ports/graphics/libksane/work/stage/usr/local/share/locale/ia/LC_MESSAGES/libksane.mo
-- Up-to-date: /usr/ports/graphics/libksane/work/stage/usr/local/share/locale/en_GB
-- Up-to-date: /usr/ports/graphics/libksane/work/stage/usr/local/share/locale/en_GB/LC_MESSAGES
-- Installing: /usr/ports/graphics/libksane/work/stage/usr/local/share/locale/en_GB/LC_MESSAGES/libksane.mo
====> Compressing man pages (compress-man)
===>  Installing for libksane-24.12.0
===>  Checking if libksane is already installed
===>   Registering installation for libksane-24.12.0 as automatic
Installing libksane-24.12.0...
==> Running trigger: gtk-update-icon-cache.ucl
Generating GTK icon cache for /usr/local/share/icons/hicolor
===>   digikam-8.5.0 depends on shared library: libKF5Sane.so - not found
*** Error code 1
Comment 6 tjlegg 2025-02-08 16:05:18 UTC
Latest poudriere testport qa on my patches:

====> Compressing man pages (compress-man)
===========================================================================
====> Running Q/A tests (stage-qa)
Warning: you might not need LIB_DEPENDS on libpng.so
Warning: you might not need LIB_DEPENDS on libQt6Scxml.so
Warning: you might not need LIB_DEPENDS on libvdpau.so
Warning: you might not need LIB_DEPENDS on libintl.so
Warning: you might not need LIB_DEPENDS on libintl.so
Warning: you might not need LIB_DEPENDS on libKPim6AkonadiPrivate.so
Warning: you might not need LIB_DEPENDS on libKF6AuthCore.so
Warning: you might not need LIB_DEPENDS on libKF6Codecs.so
Warning: you might not need LIB_DEPENDS on libQt6Location.so
Notice: You have some Perl modules as dependencies but you do not have devel/p5-Module-CoreList installed, the perlcore QA check gets better results when using it, especially with older Perl versions.
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
=>> Checking for staging violations... done
=======================<phase: package        >============================
Comment 7 tjlegg 2025-02-08 16:06:24 UTC
Created attachment 257328 [details]
digikam qt6 kf6 pkg-plist

This is one of two patches to the port needed to build. Not run through portlint to minimize changes. Apologies for indentation issues.
Comment 8 tjlegg 2025-02-08 16:07:07 UTC
Created attachment 257329 [details]
digikam qt6 kf6 Makefile patch

This is one of two patches to the port needed to build. Not run through portlint to minimize changes. Apologies for indentation issues.
Comment 9 elwood 2025-02-08 18:32:12 UTC
(In reply to tjlegg from comment #7 & #8)

These patches works for me!

Thx!
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2025-02-08 20:21:28 UTC
(In reply to tjlegg from comment #8)
Remove space in BUILD_DEPENDS - last symbol.
Use TABs instead of SPACEes for indentation - several lines.
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2025-02-08 20:38:03 UTC
2. Use
USE_KDE=	colorscheme libksane texttemplate
USE_QT=		scxml
instead of
LIB_DEPENDS=	libKSaneWidgets6.so:graphics/libksane \
                libQt6Scxml.so:devel/qt6-scxml \
                libKF6TextTemplate.so:devel/kf6-ktexttemplate \
                libKF6ColorScheme.so:x11-themes/kf6-kcolorscheme

3. Maybe gettext-tools instead of gettext in USES?

4. Are you sure it build in poudriere without "buildtools:build qmake:build"?

5. This line:
CMAKE_ON=	BUILD_WITH_CCACHE BUILD_WITH_QT6 DIGIKAMSC_COMPILE_DIGIKAM ENABLE_KFILEMETADATASUPPORT \
is too long.
Move last option to next line.
Comment 12 tjlegg 2025-02-09 12:30:50 UTC
Created attachment 257347 [details]
digikam qt6 kf6 Makefile v2

This is the updated Makefile patch altered for style and replacing uses:gettext with uses:gettext-tools
Comment 13 tjlegg 2025-02-09 12:31:52 UTC
Have changed uses:gettext to uses:gettext-tools and made the other changes that you've asked for. It builds and runs.
Comment 14 tjlegg 2025-02-09 16:22:46 UTC
Created attachment 257353 [details]
digikam qt6 kf6 Makefile v3

Installed portlint and found one spaces/tabs issue remaining. Not looking for port committer bit, just a working photo management program
Comment 15 Vladimir Druzenko freebsd_committer freebsd_triage 2025-02-10 01:25:51 UTC
(In reply to tjlegg from comment #14)
In line:
LIB_DEPENDS=    libexiv2.so:graphics/exiv2 \
Spaces here ^^^^. :-D
Comment 16 tjlegg 2025-02-10 07:24:40 UTC
Ooops. Forgot that I had no-tab-mode set up in my .mg config. Closed. Won't fix.
Comment 17 Jason E. Hale freebsd_committer freebsd_triage 2025-02-13 03:55:17 UTC
There is a little bit of clean-up to do. This also needs an upstream patch to fix the detection of libksane. I'll take care of the rest. Should have it committed soon.
Comment 18 commit-hook freebsd_committer freebsd_triage 2025-02-13 09:44:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d42218a45aa1bffb6d8b535ed9921056615e3436

commit d42218a45aa1bffb6d8b535ed9921056615e3436
Author:     tjlegg <tjlegg@gmail.com>
AuthorDate: 2025-02-13 09:06:39 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-02-13 09:43:02 +0000

    graphics/digikam: Build against Qt6/KF6

    PR:             284648

 graphics/digikam/Makefile  | 37 +++++++++++++++++++------------------
 graphics/digikam/distinfo  |  4 +++-
 graphics/digikam/pkg-plist |  7 +------
 3 files changed, 23 insertions(+), 25 deletions(-)
Comment 19 Jason E. Hale freebsd_committer freebsd_triage 2025-02-13 09:45:01 UTC
Committed with minor changes, thanks!
Comment 20 tjlegg 2025-02-14 19:46:41 UTC
Found this while running through your patch. This is why I had added uses:gettext-tools, which is missing from yours. Perhaps kf6-solid is pulled in via a non-default option I've used, but not sure.

-- Found KF6WindowSystem: /usr/local/lib/cmake/KF6WindowSystem/KF6WindowSystemConfig.cmake (found version "6.10.0")
-- Found KF6Solid: /usr/local/lib/cmake/KF6Solid/KF6SolidConfig.cmake (found version "6.10.0")
CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE
  GETTEXT_MSGFMT_EXECUTABLE)
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake/Modules/FindGettext.cmake:81 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /usr/local/lib/cmake/KF6I18n/KF6I18nMacros.cmake:5 (find_package)
  /usr/local/lib/cmake/KF6I18n/KF6I18nConfig.cmake:39 (include)
  /usr/local/share/ECM/find-modules/FindKF6.cmake:53 (find_package)
  core/cmake/rules/RulesKDEFramework.cmake:7 (find_package)
  core/CMakeLists.txt:41 (include)


-- Configuring incomplete, errors occurred!
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/digikam
=>> Cleaning up wrkdir
===>  Cleaning for digikam-8.5.0_1
build of graphics/digikam | digikam-8.5.0_1 ended at Fri Feb 14 20:04:53 HKT 2025
build time: 00:09:11
!!! build failure encountered !!!
Comment 21 Jason E. Hale freebsd_committer freebsd_triage 2025-02-14 20:34:04 UTC
(In reply to tjlegg from comment #20)
gettext-tools is added in the NLS option. I admittedly didn’t test with the NLS option off, though.
Comment 22 Jason E. Hale freebsd_committer freebsd_triage 2025-02-14 21:19:48 UTC
Just realized there’s a duplicate USE_KDE=i18n too. I’ll fix this up when I get home from work.
Comment 23 tjlegg 2025-02-14 21:50:08 UTC
Ah.... nls off. It bites me with audio/exaile as well.
Comment 24 commit-hook freebsd_committer freebsd_triage 2025-02-15 10:00:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0764846b210123a04e16860ad95cf93da62b6b89

commit 0764846b210123a04e16860ad95cf93da62b6b89
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-02-15 09:36:38 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-02-15 10:00:09 +0000

    graphics/digikam: Remove broken NLS option

    KDE apps typically build unconditionially multilingual. DigiKam
    is no exception as it hard requires devel/kf6-i18n which requires
    devel/gettext-tools.

    PR:             284648

 graphics/digikam/Makefile  |  14 ++----
 graphics/digikam/pkg-plist | 122 ++++++++++++++++++++++-----------------------
 2 files changed, 66 insertions(+), 70 deletions(-)
Comment 25 Jason E. Hale freebsd_committer freebsd_triage 2025-02-15 10:08:35 UTC
Should be good now. Contact rm@FreeBSD.org for problems with audio/exiale.