Bug 221828 - bsd.qt.mk: Rework qt-post-install
Summary: bsd.qt.mk: Rework qt-post-install
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-26 11:58 UTC by Raphael Kubo da Costa
Modified: 2018-09-11 10:46 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa freebsd_committer freebsd_triage 2017-08-26 11:58:54 UTC
Right now, we use the QT_DEFINES variable to help split a Qt module coming from a single tarball into multiple ports.

Part of the process is done with the qt-post-install target to use the definitions from QT_DEFINES to define some Qt macros in qconfig-<portname>.h, and cause qconfig-modules.h to include it.

Problems I can think of:
* We need to account for changes such as ports r448361, which dropped QT_DEFINES and QT_DIST. This stopped installing qconfig-webkit.h while not dropping the corresponding #include's from qconfig-modules.h.
* We end up with multiple duplicated includes in qconfig-modules.h.
* Knowing when to set QT_DEFINES and which values to pass is not intuitive and is mostly a manual process.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-08-27 14:06:55 UTC
A commit references this bug:

Author: rakuco
Date: Sun Aug 27 14:06:06 UTC 2017
New revision: 448821
URL: https://svnweb.freebsd.org/changeset/ports/448821

Log:
  Ensure qconfig-modules.h does not include qconfig-webkit.h

  r448361 updated Qt WebKit and dropped QT_DIST and QT_DEFINES, which led to
  existing installations being upgraded to remove qconfig-webkit.h while not
  removing the corresponding #include <QtCore/modules/qconfig-webkit.h> from
  qconfig-modules.h.

  Consequently, any build that uses existing Qt5 ports (i.e. building a port
  locally, or any project using Qt5) fails with errors like:

      /usr/local/include/qt5/QtCore/qconfig-modules.h:8:10: fatal error:
      'QtCore/modules/qconfig-webkit.h' file not found

  Add a pkg-install that takes care of removing any offending lines from
  qconfig-modules.h.

  PR:		221828
  Reviewed by:	tcberner, Adriaan de Groot <groot@kde.org>

Changes:
  head/www/qt5-webkit/Makefile
  head/www/qt5-webkit/files/pkg-install.in
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-16 15:40:45 UTC
Forgotten to close?
Comment 3 Raphael Kubo da Costa freebsd_committer freebsd_triage 2018-01-16 15:46:34 UTC
Nope, this still needs to be done.

The commit in comment #1 was just addressing the immediate issue we had in qt5-webkit (it also reminds me a similar problem appeared in qt5-multimedia and was "fixed" differently in ports r458882).
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-01-16 15:51:53 UTC
Ok, thanks for reply.
Comment 5 Adriaan de Groot freebsd_committer freebsd_triage 2018-09-11 10:46:55 UTC
This is now done elsewhere in the framework (Uses/qt.mk)