Bug 263541

Summary: science/massxpert: Fails to build with GCC 11: error: 'Qt::MidButton' is deprecated: MidButton is deprecated. Use MiddleButton instead [-Werror=deprecated-declarations]
Product: Ports & Packages Reporter: Lorenzo Salvadore <salvadore>
Component: Individual Port(s)Assignee: Lorenzo Salvadore <salvadore>
Status: Closed FIXED    
Severity: Affects Some People CC: gerald
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: http://package18.nyi.freebsd.org/data/122amd64-default-foo/2021-09-18_18h41m21s/logs/errors/massxpert-3.6.1_1.log, https://reviews.freebsd.org/D35072
Bug Depends on:    
Bug Blocks: 258378    

Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-04-24 22:06:51 UTC
Updating GCC_DEFAULT from GCC 10 to GCC 11 is blocked by the fact that building this port with GCC 11 gives the following error (full log in URL):

/wrkdirs/usr/ports/science/massxpert/work/massxpert-c229f4a1abde3c20b83a90e50f9c5d79104dfa5f/gui/sequenceEditorGraphicsView.cpp:1936:32: error: 'Qt::MidButton' is deprecated: MidButton is deprecated. Use MiddleButton instead [-Werror=deprecated-declarations]
 1936 |     if (event->buttons() & Qt::MidButton)
      |                                ^~~~~~~~~
In file included from /usr/local/include/qt5/QtCore/qobjectdefs.h:48,
                 from /usr/local/include/qt5/QtGui/qwindowdefs.h:44,
                 from /usr/local/include/qt5/QtWidgets/qwidget.h:44,
                 from /usr/local/include/qt5/QtWidgets/qscrollbar.h:44,
                 from /usr/local/include/qt5/QtWidgets/QScrollBar:1,
                 from /wrkdirs/usr/ports/science/massxpert/work/massxpert-c229f4a1abde3c20b83a90e50f9c5d79104dfa5f/gui/sequenceEditorGraphicsView.cpp:39:
/usr/local/include/qt5/QtCore/qnamespace.h:132:9: note: declared here
  132 |         MidButton Q_DECL_ENUMERATOR_DEPRECATED_X("MidButton is deprecated. Use MiddleButton instead") = MiddleButton,
      |         ^~~~~~~~~
cc1plus: all warnings being treated as errors

Also, it should be checked if USE_GCC is still needed and that the default clang compiler can't be used instead.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-04-26 22:17:14 UTC
The problem should be solved soon with https://reviews.freebsd.org/D35072 .
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-04-26 22:53:19 UTC
A commit in branch main references this bug:

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

commit c768cdd4fe7da71dfdaca6afd93278c44e2b0243
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2022-04-26 20:17:48 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2022-04-26 22:51:47 +0000

    science/massxpert: Update to 6.0.3 and adopt

    Summary:
    - Update to 6.0.3
    - Remove unneeded dependency on GCC, fixing [1]
    - Style improvements
    - Adopt

    PR:             263541 [1]
    Approved by:    gerald (mentor)
    Differential Revision:  https://reviews.freebsd.org/D35072

 science/massxpert/Makefile                         |  26 +-
 science/massxpert/distinfo                         |   6 +-
 .../massxpert/files/patch-CMakeLists.txt (gone)    |  40 --
 science/massxpert/pkg-plist                        | 548 +++++++++++++--------
 4 files changed, 354 insertions(+), 266 deletions(-)