Bug 283794 - audio/amarok: Ressurect KDE music player, update to v3.2.2, QT6
Summary: audio/amarok: Ressurect KDE music player, update to v3.2.2, QT6
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rainer Hurling
URL: https://blogs.kde.org/2024/12/29/amar...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-02 10:04 UTC by Martin Filla
Modified: 2025-03-08 13:29 UTC (History)
6 users (show)

See Also:


Attachments
0001-audio-amarok-new-port-3.2.0.patch (73.73 KB, patch)
2025-01-02 10:04 UTC, Martin Filla
no flags Details | Diff
0001-amarok-version-for-qt5-and-qt6.patch (118.52 KB, patch)
2025-01-03 13:56 UTC, Martin Filla
freebsd: maintainer-approval+
Details | Diff
0001-amarok-version-for-qt5-and-qt6.patch (118.60 KB, patch)
2025-01-03 19:32 UTC, Martin Filla
no flags Details | Diff
More adaptions to the Makefile (5.45 KB, patch)
2025-01-04 11:43 UTC, Rainer Hurling
no flags Details | Diff
0001-amarok-version-for-qt5.patch (47.84 KB, patch)
2025-01-06 20:49 UTC, Martin Filla
freebsd: maintainer-approval+
Details | Diff
patch for amarok v3.2.2 for Qt6 (75.15 KB, patch)
2025-02-20 17:24 UTC, Rainer Hurling
no flags Details | Diff
patch for amarok v3.2.2 for Qt6, v2 (75.02 KB, patch)
2025-02-22 08:19 UTC, Rainer Hurling
no flags Details | Diff
patch for amarok v3.2.2 for Qt6, v3 (75.01 KB, patch)
2025-03-08 13:29 UTC, Rainer Hurling
rhurlin: maintainer-approval? (kde)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Filla 2025-01-02 10:04:45 UTC
Created attachment 256342 [details]
0001-audio-amarok-new-port-3.2.0.patch

Hi,
this is a new version of Amarok 3.2.0, QT6 default, poudriere is ok.
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2025-01-02 21:31:11 UTC
It's fantastic that you are bringing Amarok for FreeBSD back to life! This player combines many good features that no one else offers in this bundle.

I would like to suggest that your port can also be built with Qt5/KDE5 (as a flavor). Two arguments for this:

- Under FreeBSD it is not possible to install a complete KDE5 and KDE6 at the same time, as far as I know. This leads to collisions for a number of KDE applications. And many users are dependent on KDE5 for the time being, as numerous other applications only run with it.

- The KDE Amarok project itself points out in its blog that support for KDE6 is still experimental[1]. Full support for all Amarok functionalities is currently only available for KDE5.


If you agree with these arguments, would you be willing to offer both (KDE5/KDE6) via flavors (or options) and set KDE5 as default? If desired, I can help with the porting.

And one more thought: Probably it would be good to revive the former Amarok port audio/amarok v2.9.71[2] and use it as a basis for a diff? Then there would be a history of the port commits ...

[1] https://blogs.kde.org/2024/12/29/amarok-3.2-punkadiddle-released/
[2] https://www.freshports.org/audio/amarok
Comment 2 Martin Filla 2025-01-02 23:27:10 UTC
(In reply to Rainer Hurling from comment #1)
I will work on Amarok flavor for qt5 and qt6.
Comment 3 Martin Filla 2025-01-03 13:56:08 UTC
Created attachment 256374 [details]
0001-amarok-version-for-qt5-and-qt6.patch

This is flavor version for Qt5 and Qt6
Comment 4 Rainer Hurling freebsd_committer freebsd_triage 2025-01-03 17:28:27 UTC
Wow, that's fast!

I tried your patch #256374 with Qt5 Flavor (default) and it builds and installs fine for me.

However, my running Amarok v3.2.0 is not able to capture (via MySQL) and use an existing collection. I do not get a collection list. Do you have the same problem? Which MySQL version are you using?

By the way: 
- In the new Makefile the lines DEPRECATED= and EXPIRATION_DATE= can be omitted, don't you think?
- After installing ports-mgmt/portfmt, 'portclippy Makefile' will show you which order individual entries should be in the Makefile ... ;)


[The people at freebsd-kde@ are often very busy, which can result in longer response times. Please be patient.]
Comment 5 Martin Filla 2025-01-03 19:32:30 UTC
Created attachment 256390 [details]
0001-amarok-version-for-qt5-and-qt6.patch

Hi,
i have a problem with phonom plugin and connecting to the database.

**********************************************************************************************
** AMAROK WAS STARTED IN NORMAL MODE. IF YOU WANT TO SEE DEBUGGING INFORMATION, PLEASE USE: **
** amarok --debug                                                                           **
**********************************************************************************************
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioOutput ( no objectName ).
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioDataOutput ( no objectName ).
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory
kf.kirigami: Failed to find a Kirigami platform plugin
file:///usr/local/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:97:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///usr/local/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:87:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<lfm status=\"failed\">\n  <error code=\"8\">Operation failed - Most likely the backend service failed. Please try again.</error>\n</lfm>\n"
^Cfile:///usr/local/share/kpackage/amarok/org.kde.amarok.currenttrack/contents/ui/main.qml:111: TypeError: Cannot call method 'renderSvg' of null
file:///usr/local/share/kpackage/amarok/org.kde.amarok.currenttrack/contents/ui/main.qml:154: TypeError: Cannot call method 'renderSvg' of null
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
Comment 6 Rainer Hurling freebsd_committer freebsd_triage 2025-01-04 10:23:52 UTC
A little more feedback from me:

My difficulties with using MySQL (comment #4) have been resolved, the collection is read in correctly now. Apparently I had forgotten to rebuild databases/qt5-sqldrivers-mysql after updating MySQL ...

The contact via the Last.fm plugin also works as expected.


On my side the Phonon plugin is loaded correctly and I can play music accordingly. Unfortunately, the only thing I can think of is to check whether you also installed multimedia/phonon-vlc (and multimedia/vlc) correctly?
Comment 7 Martin Filla 2025-01-04 11:05:55 UTC
(In reply to Rainer Hurling from comment #6)
I installed multimedia/phonon-vlc and it is ok. I reinstall databases/qt5-sqldrivers-mysql and it is ok. Amarok is ready now.
Comment 8 Rainer Hurling freebsd_committer freebsd_triage 2025-01-04 11:43:24 UTC
Created attachment 256409 [details]
More adaptions to the Makefile

(In reply to Martin Filla from comment #7)
Nice :D

And as already mentioned in comment #4, the Makefile should be supplemented a little and adapted to the conventions of FreeBSD. I have tried the following changes/additions locally:

- DEPRACATED and EXPIRATION_DATE removed
- added LIB_DEPENDS=libmtp.so:multimedia/libmtp
- USES=gl added
- added USE_KDE_qt[56]=kirigami-addons
- added USE_KDE_qt[56]=phonon-backend
- added USE_KDE_qt5=sql-mysql
- added USE_KDE_qt6=sqldriver-mysql
- Reordered the entries according to portclippy

In the attached patch my changes to the Makefile as a suggestion for further customization of the port. Presumably further improvements are possible ;)

If you agree with such changes and have tested them, please feel free to include them in the 'big patch'.
Comment 9 Rainer Hurling freebsd_committer freebsd_triage 2025-01-04 11:55:06 UTC
(In reply to Rainer Hurling from comment #8)
Oops, obviously the additions USE_KDE_qt5=sql-mysql and USE_KDE_qt6=sqldriver-mysql do not work. Please delete them, sorry.
Comment 10 Martin Filla 2025-01-04 12:32:39 UTC
(In reply to Rainer Hurling from comment #9)

Did you use new patch file for your patch ?

git apply patch.patch
error: patch failed: Makefile:11
error: Makefile: patch does not apply
Comment 11 Rainer Hurling freebsd_committer freebsd_triage 2025-01-04 12:48:26 UTC
(In reply to Martin Filla from comment #10)

No, I changed the Makefile bit by bit and then created a diff locally. The directory was not checked out via git. Sorry.
Comment 12 Martin Filla 2025-01-05 06:44:07 UTC
(In reply to Rainer Hurling from comment #11)
Did you try to use flavor qt6 ? I don't know but it is broken.
Comment 13 Rainer Hurling freebsd_committer freebsd_triage 2025-01-05 15:43:04 UTC
(In reply to Martin Filla from comment #12)
> Did you try to use flavor qt6 ? I don't know but it is broken.
I tried to get a bit behind the causes. That's my current status:

The configuration for Qt6/KDE6 also breaks for me. In a late phase of configure the following messages appear:

-- Building good old Qt5 version
-- Found PkgConfig: /usr/local/bin/pkgconf (found version “2.3.0”)
CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:14 (message):
  The imported target “Qt5::Core” references the file
     “/usr/local/lib/qt5/bin/qmake”
  but this file does not exist.  Possible reasons include:
  * The file was deleted, renamed, or moved to another location.
  * An install or uninstall procedure did not complete successfully.
  * The installation package was faulty and contained
     “/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake”
  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:9 (_qt5_Core_check_file_exists)
  /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:232 (include)
  /usr/local/share/ECM/modules/ECMQueryQt.cmake:49 (find_package)
  /usr/local/share/ECM/kde-modules/KDEInstallDirs5.cmake:241 (include)
  /usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
  CMakeLists.txt:24 (include)
-- Configuring incomplete, errors occurred!
*** Error code 1


This also happens with your own latest patch. 

So it looks like the Qt5 dependencies are still being included by mistake? I'm guessing that by using internal parameters (see Mk/Uses/qt.mk etc.) like _USE_QT_qt6 and _USE_KDE_qt6, also _CMAKE_*_qt6, some internals of the ports infrastructure are getting messed up? The culprit seems to be CMakeLists.txt?


Also, your LIB_DEPENDS still contains dependencies with hardcoded Qt5:
    liblastfm5.so:audio/liblastfm-qt5
    libqjson-qt5.so:devel/qjson

And, there is no BUILD_WITH_QT5 in the code ...


Possibly the most sensible thing to do at the moment is to commit the port for Qt5/KDE5 only? Then you can search for the causes of the misconfiguration under Qt6/KDE6 in peace? Just a thought from me ...
Comment 14 Martin Filla 2025-01-06 20:49:34 UTC
Created attachment 256480 [details]
0001-amarok-version-for-qt5.patch

I did the version for qt5 only.
Comment 15 Daniel Engberg freebsd_committer freebsd_triage 2025-01-06 21:15:36 UTC
Given that QT5 is going to be sunset soon-ish it'll just add more work adding additional QT5 ports to the tree so QT6 only please.
Comment 16 Rainer Hurling freebsd_committer freebsd_triage 2025-01-06 22:09:21 UTC
(In reply to Daniel Engberg from comment #15)
Hi Daniel,
In principle, you are right. However, in the case of Amarok, Qt6/KDE6 support is still explicitly described as experimental, see comment #1. In addition, the audio/liblastfm-qt5 and devel/qjson dependencies are only available for qt5 so far.

Since the conversion for Amarok is likely to take some time, wouldn't reviving the port for Qt5 be sufficient in this case? Then the next step could be to switch to Qt6.
Comment 17 Daniel Engberg freebsd_committer freebsd_triage 2025-01-06 22:14:25 UTC
(In reply to Rainer Hurling from comment #16)
In that case I'd say it's on hold, kde@ already have enough on their plate and  we have plenty of other options in terms of audio/multimedia players to choose from in ports.
Comment 18 Maxim Filimonov 2025-02-03 17:00:05 UTC
Hi, I just wanted to say I'd like to see amarok back as well. Wanted to start the resurrection progress myself, but found you people were already doing this.

Btw, how long do you think until Qt5 gets sunset-ed in the ports tree? Isn't it wise to add amarok with Qt5 only now, and then add Qt6 support once it's ready?
Comment 19 Rainer Hurling freebsd_committer freebsd_triage 2025-02-20 17:24:55 UTC
Created attachment 257701 [details]
patch for amarok v3.2.2 for Qt6

After FreeBSD switched from KDE5 to KDE6, and audio/lastfm switched to Qt6, here is new patch for audio/amarok:

- Update amarok to version 3.2.2
- switch to Qt6
- Add USE_KDE=phonon-backend for phonon-vlc
- pet portlint
Comment 20 Max Brazhnikov freebsd_committer freebsd_triage 2025-02-21 19:42:25 UTC
(In reply to Rainer Hurling from comment #19)
+LIB_DEPENDS=	libdbus-1.so:devel/dbus \
+		libKF6ColorScheme.so:x11-themes/kf6-kcolorscheme

This should be replaced with 'USE_KDE= colorscheme'.

+USES=		cmake compiler:c++11-lang cpe desktop-file-utils gettext gl \
+		kde:6 mysql:client pkgconfig qt:6 shebangfix ssl xorg

I don't see where 'shebangfix' is used. It is really needed?

+post-install:
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages

You probably won't need this and '@dir share/mime/packages' in the pkg-plist, if you add 'USES= shared-mime-info'.

Shall we continue review at Phabricator?
Comment 21 Rainer Hurling freebsd_committer freebsd_triage 2025-02-22 08:19:48 UTC
Created attachment 257730 [details]
patch for amarok v3.2.2 for Qt6, v2

(In reply to Max Brazhnikov from comment #20)
>LIB_DEPENDS=	libdbus-1.so:devel/dbus \
>+		libKF6ColorScheme.so:x11-themes/kf6-kcolorscheme
>This should be replaced with 'USE_KDE= colorscheme'.
Done.


>+USES=		cmake compiler:c++11-lang cpe desktop-file-utils gettext gl \
>+		kde:6 mysql:client pkgconfig qt:6 shebangfix ssl xorg
>I don't see where 'shebangfix' is used. It is really needed?
Seems not. Done.


>+post-install:
>+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages
>You probably won't need this and '@dir share/mime/packages' in the pkg-plist,
>if you add 'USES= shared-mime-info'.
Removed post-install target. Done.

Many thanks for these valuable suggestions for improving the port.


>Shall we continue review at Phabricator?
In my opinion, the submitter (Martin Filla) should decide whether a review in the Phabricator makes sense here?
Comment 22 Mark Linimon freebsd_committer freebsd_triage 2025-03-06 23:14:35 UTC
Comment on attachment 256409 [details]
More adaptions to the Makefile

^Triage: appears to be obsoleted by patch-audio_amarok-2.diff.
Comment 23 Mark Linimon freebsd_committer freebsd_triage 2025-03-06 23:15:00 UTC
Comment on attachment 256480 [details]
0001-amarok-version-for-qt5.patch

^Triage: appears to be obsolete by patch-audio_amarok-2.diff.
Comment 24 Martin Filla 2025-03-08 11:26:14 UTC
(In reply to Rainer Hurling from comment #21)
Did you test the last patch in poudriere?

===== env: DEVELOPER_MODE=yes DEVELOPER=1 STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  amarok-3.2.2 cannot be installed: unknown USE_KDE component
'phonon-backend'.
Comment 25 Rainer Hurling freebsd_committer freebsd_triage 2025-03-08 13:14:53 UTC
(In reply to Martin Filla from comment #24)

Hi Martin,
Thanks for the tip. phonon-backend was committed only a few hours after I submitted my updated patch [1].

Looks like the patch for amarok needs to be adjusted again. I will try to get that done this weekend.


[1] https://cgit.freebsd.org/ports/commit/?id=23baa5f9becf0240170f81bb616bae623d2c6bbf
Comment 26 Rainer Hurling freebsd_committer freebsd_triage 2025-03-08 13:29:34 UTC
Created attachment 258431 [details]
patch for amarok v3.2.2 for Qt6, v3

It turns out that I had already prepared the updated patch and just forgot to submit it. Sorry about that.