ports/www/qt5-webkit/files/pkg-install.in
Raphael Kubo da Costa e9a6c165fa 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>
2017-08-27 14:06:05 +00:00

11 lines
396 B
Bash

#!/bin/sh
# Before r448361, QtWebKit had QT_DEFINES, which caused qconfig-modules.h to
# include qconfig-webkit.h, which we no longer set. We no longer ship
# qconfig-webkit.h, we need to make sure qconfig-modules.h no longer includes
# it (see bug 221828).
if [ "$2" = "POST-INSTALL" ]; then
sed -i "" '/qconfig-webkit.h/d' \
%%QT_INCDIR%%/QtCore/qconfig-modules.h 2>/dev/null || true
fi