Bug 270690

Summary: deskutils/fet: Update to 6.9.0/Add flavor qt6
Product: Ports & Packages Reporter: Zsolt Udvari <uzsolt>
Component: Individual Port(s)Assignee: Nuno Teixeira <eduardo>
Status: Closed FIXED    
Severity: Affects Only Me CC: eduardo, uzsolt
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://lalescu.ro/liviu/fet/news.html
Bug Depends on: 270664    
Bug Blocks:    
Attachments:
Description Flags
patch to 6.9.0
uzsolt: maintainer-approval+
update/add flavors
none
update/add flavors v1
eduardo: maintainer-approval? (uzsolt)
qt5-qt6 flavors, remove onlycl option uzsolt: maintainer-approval+

Description Zsolt Udvari freebsd_committer freebsd_triage 2023-04-07 17:23:56 UTC
Created attachment 241340 [details]
patch to 6.9.0

Simple update to 6.9.0.
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-07 17:54:21 UTC
Hello,

I've noticed that upstream supports qt6.
Is there any plans to add qt6 build/flavor to port?

Cheers
Comment 2 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-07 18:11:24 UTC
I didn't plan it yet.

Do you think it would be nice?
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-07 18:36:38 UTC
(In reply to Zsolt Udvari from comment #2)

Sure!

There are ports building only with qt5 or qt6 depending on upstream but when support is available for both qt5 and qt6, I think is a good idea to use port flavors.

Please take a look at:
https://docs.freebsd.org/en/books/porters-handbook/book/#flavors-using

and a example port:
deskutils/copyq
Comment 4 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-08 11:20:09 UTC
I'm trying introduce qt-flavors but I can't build qt6-base:

ld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow tex
t relocations in the output
>>> defined in /usr/local/lib/libzstd.a(zstd_common.o)
>>> referenced by zstd_common.c
>>>               zstd_common.o:(ZSTD_versionString) in archive /usr/local/lib/libzstd.a

ld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow tex
t relocations in the output
>>> defined in /usr/local/lib/libzstd.a(error_private.o)
>>> referenced by error_private.c
>>>               error_private.o:(ERR_getErrorString) in archive /usr/local/lib/libzstd.a


I think it's same as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270664 bug.
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-08 15:15:24 UTC
Created attachment 241352 [details]
update/add flavors

Success builds with flavors: (131 logs)
https://people.freebsd.org/~eduardo/logs/fet/

While I'm still waiting on upstream reply, I think it's better to have qt5 as default build for now but it's up to you to decide since I've did not make a run test.

Cheers
Comment 6 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-08 15:25:34 UTC
I think should wait the qt6-base fix so don't receive message about FET's failed builds.
Comment 7 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-08 15:41:12 UTC
(In reply to Zsolt Udvari from comment #6)

Sure, let's wait.
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-08 20:42:06 UTC
From Volker Dirr:
---
Qt 5 is (nearly) at the end of its life.
Liviu added Qt 6 support already in November 2020. So the default FET
windows user uses Qt 6 now already a long time. Liviu is also using by
default always the the latest Qt version under Linux for developing.
I was using Qt 5 only up to a few days ago, but i am currently
converting all my other software projects to Qt 6.
So for FET I recommend Qt 6 as default.
(I might recommend only different if it is a Qt software with special
---

So I might be a good idea to use qt6 flavor as default.
Comment 9 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-09 08:15:35 UTC
(In reply to Nuno Teixeira from comment #8)
Okay, agree.
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-16 10:35:37 UTC
Created attachment 241526 [details]
update/add flavors v1

- set qt6 as default flavor
Comment 11 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-16 12:35:06 UTC
Comment on attachment 241526 [details]
update/add flavors v1

Maybe plus CONFLICTS with (flavor-free, old) deskutils/fet?
Comment 12 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-16 14:06:05 UTC
(In reply to Zsolt Udvari from comment #11)

I think thas's not needed as system detects it:
---
===>  Installing for fet-qt6-6.9.0
===>  Checking if fet-qt6 is already installed
===>   Registering installation for fet-qt6-6.9.0
Installing fet-qt6-6.9.0...
pkg-static: fet-qt6-6.9.0 conflicts with fet-6.8.7 (installs files into the same place).  Problematic file: /usr/local/bin/fet
---

Same happens between qt5 and qt6:
---
===>  Installing for fet-qt6-6.9.0
===>  Checking if fet-qt6 is already installed
===>   Registering installation for fet-qt6-6.9.0
Installing fet-qt6-6.9.0...
pkg-static: fet-qt6-6.9.0 conflicts with fet-qt5-6.9.0 (installs files into the same place).  Problematic file: /usr/local/bin/fet
---
Comment 13 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-16 14:15:00 UTC
(In reply to Nuno Teixeira from comment #12)
In this case the system detects the conflict of fet-qt5 and fet-qt6 so doesn't need any *CONFLICT. Or not?
Comment 14 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-16 19:31:39 UTC
(In reply to Zsolt Udvari from comment #13)

Porter's handbook say it must be used within port flavours.
https://docs.freebsd.org/en/books/porters-handbook/book/#conflicts

Old pkg name (without flavour) shouldn't be a problem.
Comment 15 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-17 06:33:55 UTC
(In reply to Nuno Teixeira from comment #14)
But I think it's enough only CONFLICTS: CONFLICTS_INSTALL=fet-qt5 fet-qt6, because "Each space-separated item in the CONFLICTS* variable values is matched against packages except the one being built, using shell globbing rules. This allows listing all flavors of a port in a conflict list instead of having to take pains to exclude the flavor being built from that list."

Or with make's variable modifiers: CONFLICTS= ${FLAVORS:@fl@fet-${fl}@}

Another thing: as I see the qt6 flavor needs only one package so the ONLY_CL option is useless in qt6 (the number of dependencies don't decrease). I suggest to remove it because (as I understand) qt5 will be outdated soon.
Comment 16 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-17 06:34:51 UTC
Created attachment 241537 [details]
qt5-qt6 flavors, remove onlycl option
Comment 17 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-17 07:30:17 UTC
(In reply to Zsolt Udvari from comment #15)

For my understanding CONFLICTS_INSTALL list apply to external ports.

For this particular case, flavors, we need to setup {qt5,qt6}_CONFLICTS_INSTALL:
"(...)Without that feature, the Makefile would need one _flavor__CONFLICTS_INSTALL for each flavor, listing every other flavor.

The most common content of one of these variable is the package base of another port. The package base is the package name without the appended version, it can be obtained by running make -V PKGBASE."

Please take a look at devel/cmake-gui
Comment 18 Zsolt Udvari freebsd_committer freebsd_triage 2023-04-17 07:38:06 UTC
(In reply to Nuno Teixeira from comment #17)
"Without that feature" - IMHO the "that feature" is "except the one being built", but this feature is present.
And the handbook says too: "This allows listing all flavors of a port in a conflict list instead of having to take pains to exclude the flavor being built from that list." This is exactly what I would do.
Comment 19 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-17 09:20:57 UTC
(In reply to Zsolt Udvari from comment #18)

Ok, finally get it understand after a better reading.
Comment 20 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-17 11:00:43 UTC
(In reply to Nuno Teixeira from comment #19)
(...)

And the meaning of use make ':@temp@string@'
Comment 21 commit-hook freebsd_committer freebsd_triage 2023-04-17 11:15:27 UTC
A commit in branch main references this bug:

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

commit 099afdf238ea2f7b4979d9f4143c8a855e793a5a
Author:     Zsolt Udvari <uzsolt@uzsolt.hu>
AuthorDate: 2023-04-17 11:00:55 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2023-04-17 11:14:28 +0000

    deskutils/fet: Update to 6.9.0/Add flavors qt5 and qt6

    - qt6 as default flavor as recommended by upstream

    - Remove ONLY_CL option: qt6 flavor needs only one package so the ONLY_CL
      option is useless in qt6 (the number of dependencies don't decrease).
      I suggest to remove it because (as I understand) qt5 will be outdated soon.

    ChangeLog:      https://lalescu.ro/liviu/fet/news.html
    PR:             270690

 deskutils/fet/Makefile  | 25 ++++++++++++-------------
 deskutils/fet/distinfo  |  6 +++---
 deskutils/fet/pkg-plist |  2 +-
 3 files changed, 16 insertions(+), 17 deletions(-)
Comment 22 Nuno Teixeira freebsd_committer freebsd_triage 2023-04-17 11:16:33 UTC
Committed, thanks!