Opened 6 months ago
Last modified 6 months ago
#70024 new request
attica-qt5: add a Qt5-based version
Reported by: | barracuda156 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | RJVB (René Bertin) | |
Port: | attica-qt5 |
Description
To be clear, Qt4-based version is required, so we do not need to replace it, but rather add a subport.
Change History (11)
comment:1 follow-up: 2 Changed 6 months ago by RJVB (René Bertin)
comment:2 Changed 6 months ago by barracuda156
Replying to RJVB:
kf5-attica
would be the more appropriate name IMHO, as this is KDE software and part of their frameworks.What's your reason for requesting this port?
tomahawk
player needs it: https://github.com/tomahawk-player/tomahawk
And since Qt4 is broken on arm64
, I cannot use Qt4 build there (though I will need to use it on older systems).
comment:3 Changed 6 months ago by RJVB (René Bertin)
Bummer that they made it a required dependency (I have no idea what they need an "open collaboration services API" for).
It's not a difficult port to implement: https://github.com/RJVB/macstrop/blob/bf9aa65160e3dfef4d83133b657a4c1ef7659555/kf5/KF5-Frameworks/Portfile#L470
(but there's a bunch of hidden code there of course). There's only a patch to prevent headerfile/directory aliasing on case-insensitive filesystems.
Qt4 being broken on arm64 may not be unfixable: Apple aren't the first to use that architecture in "real" computers and DebUntu have been providing Qt4 packages for it: https://launchpad.net/ubuntu/+source/qt4-x11/4:4.8.7+dfsg-7ubuntu1 . Maybe you'll find your fix in their patches.
comment:4 Changed 6 months ago by barracuda156
I could try asking the upstream if attica can be moved to optional deps. Fixing Qt4 must be doable, of course, but benefit is questionable, to be honest, considering required efforts. It will make it easier for me to test some Qt4-based ports, but perhaps there is not much software which cannot be built with Qt5, and there is no reason to prefer Qt4 when Qt5 is available.
comment:5 follow-up: 7 Changed 6 months ago by RJVB (René Bertin)
You could already have a look at the code to see how intricately woven Attica classes are throughout.
Yes, there seems to be little benefit to using Qt4 when Qt5 alternatives are available, but KF5 never made it into the tree and the KDE4 ports mostly (still) work just fine so there's that. (I'm still using KDE4's PIM myself, for instance.) I have no idea how much effort is required to get Qt4 to build on Apple arm64. That will depend on how well "generic" arm64 code builds on Apple's version, and on how much the Apple-specific APIs Qt use have changed. Does Qt4 still build on the x86_64 Mac OS versions that also support arm64?
BTW, aren't those Apple silicon slices (seems an appropriate term for their laptops ) so powerful that you won't even notice if they're running Linux in a VM? ;)
Re: Tomahawk: I saw it also requires QtWebkit (kudos for not chosing the QtWebengine resource hog). As you may know there's a rebooted version of it that's more modern than the community version available through Qt, but last time I checked the Qt5 port maintainer had still not based the QtWebkit port on it. I do have a separate port for it, which should provide pretty much the latest version of the code from around when the developer gave up (collateral damage from political sanctions agains Russia).
comment:6 follow-up: 8 Changed 6 months ago by RJVB (René Bertin)
Re: Qt4 : I think it must be broken across the board right now as it still claims to depend on port:openssl
. While it has been patched to work with OpenSSL 1.1 it does not (AFAIK) work with OpenSSL 3.
comment:7 Changed 6 months ago by barracuda156
Replying to RJVB:
You could already have a look at the code to see how intricately woven Attica classes are throughout.
Yes, there seems to be little benefit to using Qt4 when Qt5 alternatives are available, but KF5 never made it into the tree and the KDE4 ports mostly (still) work just fine so there's that. (I'm still using KDE4's PIM myself, for instance.)
KDE4 is totally broken, AFAIK, due to a broken soprano
, which is required for nearly anything.
https://trac.macports.org/ticket/68452
comment:8 Changed 6 months ago by barracuda156
Replying to RJVB:
Re: Qt4 : I think it must be broken across the board right now as it still claims to depend on
port:openssl
. While it has been patched to work with OpenSSL 1.1 it does not (AFAIK) work with OpenSSL 3.
Well, Qt4 itself certainly works, however OpenSSL in may have issues, judging from https://github.com/smplayer-dev/smtube/issues/28
However, at the same time at least some Qt4-based ports, I think, are able to use the web.
But you bring up an interesting point. Maybe we could fix OpenSSL properly for it, and some ports get fixed along.
comment:9 follow-ups: 10 11 Changed 6 months ago by RJVB (René Bertin)
I'm not certain if all Qt4 applications use the QSsl functions, and as long as Qt4 *links* against OpenSSL 3 those applications will be able to use https etc.
Fixing the port should be as easy as using the openssl PG, setting the proper branch. Unset the openssl.configure feature and add the proper magic in OPENSSL_LIBS via configure.env . I just made those changes myself but haven't yet done a full test of them as I didn't feel like rebuilding the entire port.
There's a securesocket client example in the Qt4 demos/examples that can serve as a test app. If it connects all is fine, if it doesn't you can start hunting down the reason because it won't tell you ;)
comment:10 Changed 6 months ago by RJVB (René Bertin)
Replying to RJVB:
I'm not certain if all Qt4 applications use the QSsl functions, and as long as Qt4 *links* against OpenSSL 3 those applications will be able to use https etc.
I meant of course that they can use Qt4 at all.
I just forced Qt4Network to build against the current OpenSSL 3 port. It builds and links OK, but as I expected the securesocketclient example application fails to connect with any server, without any error message. That usually means that the QSsl classes couldn't set up OpenSSL as they deem fit.
Fun fact: connecting to imap.gmail.com:993 using that example app is done with a lesser cipher on my Mac than on my Linux rig (both with OpenSSL 1.1.1w). I'm using a different OpenSSL 1.1 support patch for Qt4 on Linux though; maybe that's why.
(Not really a problem for me; I basically only use encrypted network connections through Qt4 in KMail, which I currently usually run on Linux only ... and email is an inherently insecure medium anyway.)
EDIT: nope, I had made another change for some reason, allowing QSsl::SecureProtocols
and QSsl::TlsV1SslV3
via TLSv1 rather than SSLv23. That change had remained confined to my Qt4 sources and was never committed to my patchfile so I have no idea what the purpose was.
comment:11 Changed 6 months ago by RJVB (René Bertin)
Replying to RJVB:
add the proper magic in OPENSSL_LIBS via configure.env .
NB: using just -L[openssl::libdir] -lssl -lcrypto
isn't reliable because clang (some versions?) will reorganise the arguments and you'll still end up linking the libraries in $prefix/lib (i.e. symlinks to the OpenSSL3 libs).
Use [openssl::libdir]/libssl.dylib [openssl::libdir]/libcrypto.dylib
instead.
kf5-attica
would be the more appropriate name IMHO, as this is KDE software and part of their frameworks.What's your reason for requesting this port? I'm only aware of it being used in 2 other frameworks plus by the Plasma5 desktop component:
Of the frameworks only kf5-kxmlgui is of real interest but since both are Tier3 frameworks you end up having to implement a large part of the other frameworks.
Diving into creating KF5 ports with retro-computing spectacles on is going to be a nightmare I'm afraid. Even I simply stopped upgrading the vast majority of my KF5 ports because of their Qt5 requirements. KDE use "family versioning", and my ports use that by having a central set of version variables set through the KF5 PortGroup (and which several override, evidently). Those central versions could be
os.major
dependent, but individual ports will need to use the version-selectiveplatform
functionality to define the appropriate patches.