Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 388675

Summary: >=dev-qt/qtcore-4.7: qmake does not parse correctly spaces before ! operator
Product: Gentoo Linux Reporter: Davide Pesavento <pesa>
Component: [OLD] LibraryAssignee: Qt Bug Alias <qt>
Status: RESOLVED UPSTREAM    
Severity: normal CC: kde, ossi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugreports.qt-project.org/browse/QTBUG-22443
Whiteboard: tracking upstream, fixed in qt-5
Package list:
Runtime testing required: ---

Description Davide Pesavento (RETIRED) gentoo-dev 2011-10-27 16:40:31 UTC
phonon installs a broken /usr/share/qt4/mkspecs/modules/qt_phonon.pri
When qmake reads that file, it prints the following error:

/usr/share/qt4/mkspecs/modules/qt_phonon.pri:8: Unknown test function: !contains

It seems qmake doesn't like the backslashes used to escape the newlines. Indeed if the file content is changed to:

if(!exists($$_QMAKE_CACHE_)|!contains($$list($$fromfile($$_QMAKE_CACHE_, CONFIG)), QTDIR_build)) {
    QT_CONFIG += phonon
}

(where the two conditions are both on the same line), qmake no longer throws the above error.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2011-10-30 10:37:59 UTC
Oswald, would you mind having a quick look at this please?

(In reply to comment #0)
> phonon installs a broken /usr/share/qt4/mkspecs/modules/qt_phonon.pri
> When qmake reads that file, it prints the following error:
> 
> /usr/share/qt4/mkspecs/modules/qt_phonon.pri:8: Unknown test function:
> !contains
> 
> It seems qmake doesn't like the backslashes used to escape the newlines. Indeed
> if the file content is changed to:
> 
> if(!exists($$_QMAKE_CACHE_)|!contains($$list($$fromfile($$_QMAKE_CACHE_,
> CONFIG)), QTDIR_build)) {
>     QT_CONFIG += phonon
> }
> 
> (where the two conditions are both on the same line), qmake no longer throws
> the above error.
Comment 2 Oswald Buddenhagen 2011-10-30 11:45:14 UTC
https://bugreports.qt.nokia.com/browse/QTBUG-22443
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2011-10-30 23:26:35 UTC
Davide, I've added a workaround in phonon-4.5.0-r2 and phonon-4.5.1-r1. 
Could you please verify if that helps?

Anyway, seems this is a qt-core bug (thanks Oswald for identifying this!!!)
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2011-11-12 16:13:07 UTC
(In reply to comment #3)
> Davide, I've added a workaround in phonon-4.5.0-r2 and phonon-4.5.1-r1. 
> Could you please verify if that helps?
> 

Yes, the workaround works. Thanks!
I'll keep this bug open until qmake is properly fixed though.
Comment 5 Michael Palimaka (kensington) gentoo-dev 2013-01-02 16:18:17 UTC
(In reply to comment #4)
> Yes, the workaround works. Thanks!
> I'll keep this bug open until qmake is properly fixed though.

According to the upstream bug report, this is fixed in 5.0.0 RC 1. Do you still want to track this bug for 4.x (I don't know what the possibility of backporting is?)
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2013-03-03 21:15:05 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Yes, the workaround works. Thanks!
> > I'll keep this bug open until qmake is properly fixed though.
> 
> According to the upstream bug report, this is fixed in 5.0.0 RC 1. Do you
> still want to track this bug for 4.x (I don't know what the possibility of
> backporting is?)

Right. I don't think this will ever be fixed in qt4.