Bug 259751

Summary: devel/qtcreator: update to newer version
Product: Ports & Packages Reporter: Peter TKATCHENKO <peter>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: adridg, dev, fernape, kde, peter
Priority: --- Keywords: needs-patch
Version: LatestFlags: fernape: maintainer-feedback? (kde)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix incomplete update to QtCreator 5.0.3 none

Description Peter TKATCHENKO 2021-11-10 11:07:21 UTC
The version of Qt Creator in the ports tree is really old, the 5.0 version is out a long time ago.
I tested a build of version 5.0.3 on FreeBSD 12.2 using LLVM 10.0 - this version builds correctly following the instructions from https://github.com/qt-creator/qt-creator
The first patch from the current ports tree seems to be outdated (llvm10_patch-src_shared_clang_clang__installation.pri), the second one (patch-src_libs_qmljs_qmljscontext.cpp) needs to be adjusted a bit (line numbers).

The compiled version seems to be working correctly.
Unfortunately, I have no FreeBSD 13.0 to test build on it.

Please, update the ports tree to include the current version of Qt Creator.
Comment 1 Fernando ApesteguĂ­a freebsd_committer freebsd_triage 2021-11-12 07:34:53 UTC
Hi Peter,

Thanks for the report. Would you be able to provide patch?

Thanks!
Comment 2 Peter TKATCHENKO 2021-11-12 10:08:53 UTC
Hi Fernando,
Unfortunately I have neither v13 nor v14 now to test build on another FreeBSD versions. And there are some points in Makefile of the port that I don't understand well. So IMHO it would be better that the person who manages the port prepares the patch (or at least someone who can correctly test it).
Comment 3 Florian Walpen 2021-11-15 21:35:04 UTC
Created attachment 229525 [details]
Fix incomplete update to QtCreator 5.0.3

It looks like an incomplete update to QtCreator 5.0.3 slipped in with the latest KDE framework update. Doesn't build and is missing pkg-plist changes.

The patch attached does:
 * Fix the internal sqlite3 build (define _POSIX_C_SOURCE and _BSD_SOURCE)
 * Fix missing ctype.h -> isascii() function (define __XSI_VISIBLE)
 * Use llvm11 by default for the build, as recommended by upstream
 * Adjust pkg-plist

This builds fine for me on FreeBSD 13.0, I did a short test drive and everything seems to be ok.

Please review, still has to be tested on FreeBSD 12.x.

Also that ctype.h -> isascii() needs a special define seems odd to me, but I don't see a better way to make the function accessible.
Comment 4 Adriaan de Groot freebsd_committer freebsd_triage 2021-11-15 22:56:56 UTC
That (landing KF5 updates from a dirty ports tree) was utterly bone-headed of me. Well, at least it moves this PR forward faster than I had planned :S
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-11-17 00:29:44 UTC
A commit in branch main references this bug:

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

commit cf29dd6e4661ca8eb4eedcd5e50021c56255fe7d
Author:     Florian Walpen <dev@submerge.ch>
AuthorDate: 2021-11-15 20:54:01 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2021-11-17 00:26:19 +0000

    devel/qtcreator: Fix incomplete update to 5.0.3.

    A partial update to qtcreator 5.0.3 snuck in with the update to
    KDE Frameworks. Thank you to Florian Walpen for finishing the work.
    Pointy hat:     adridg

    PR:             259751
    Reported by:    Peter TKATCHENKO

 devel/qtcreator/Makefile                           |   2 +-
 ...patch-src_libs_3rdparty_sqlite_sqlite.pri (new) |  10 +
 .../files/patch-src_libs_qmljs_qmljscontext.cpp    |   4 +-
 devel/qtcreator/pkg-plist                          | 320 +++++++++++++++------
 4 files changed, 251 insertions(+), 85 deletions(-)
Comment 6 Adriaan de Groot freebsd_committer freebsd_triage 2021-11-17 11:05:08 UTC
It built, and I did manage to edit code and build things with it; seems to be ok now. For some reason both llvm90 and llvm11 are dependencies, but that is something to chase in a next update.
Comment 7 Florian Walpen 2021-11-17 14:07:58 UTC
(In reply to Adriaan de Groot from comment #6)

Thanks for handling that - and for your contributions in general, including the update to KF5 ;-)

The dependency on llvm90 seems to come from devel/qt5-qdoc, the devel/qt5 metaport also depends on it. Originates from Mk/bsd.default-versions.mk in the ports tree.

A runtime dependency on llvm11 probably makes sense. It obsoletes a dependency on ancient llvm80 for me, which means progress.

AFAIK, QtCreator is transitioning its C/C++ code inspection model from an internal clang library to external clangd and language server protocol. That would make the runtime llvm dependency independent of the build llvm.

Maybe I'll have a look at the upcoming QtCreator 6.0 when I get around to it.