[MacPorts] #32975: pkg-config returns wrong cflags for qt4-mac

MacPorts noreply at macports.org
Sat Jan 21 13:25:16 PST 2012


#32975: pkg-config returns wrong cflags for qt4-mac
--------------------------------------------+-------------------------------
 Reporter:  mojca.miklavec.lists@…          |       Owner:  macports-tickets@…                   
     Type:  defect                          |      Status:  new                                  
 Priority:  Normal                          |   Milestone:                                       
Component:  ports                           |     Version:  2.0.3                                
 Keywords:  Qt4 pkg-config cflags           |        Port:  qt4-mac                              
--------------------------------------------+-------------------------------
 When calling
 {{{
 > pkg-config --cflags "QtCore >= 4.5 QtGui >= 4.5 QtNetwork >= 4.5 QtSvg
 >= 4.5"
 }}}
 with qt4-mac installed, I get
 {{{
 -DQT_SHARED -I/opt/local/include -I/opt/local/include/QtCore
 -I/opt/local/include/QtGui -I/opt/local/include/QtNetwork
 -I/opt/local/include/QtSvg
 }}}
 but /opt/local/include/QtCore doesn't really exist. It should probably be
 /opt/local/lib/QtCore.framework/Headers or
 /opt/local/lib/QtCore.framework/Versions/4/Headers instead.

 The problem seems to be in /opt/local/lib/pkgconfig/QtCore.pc which
 includes
 {{{
 includedir=${prefix}/include/QtCore
 ...
 Cflags: -DQT_SHARED -I/opt/local/include -I${includedir}
 }}}
 which is wrong. In particular, /opt/local should probably not be hardcoded
 in Cflags and includedir should be changed. An alternative is to make a
 symlink like Homebrew does
 {{{
 /opt/homebrew/Cellar/qt/4.8.0/include/QtCore ->
 /opt/homebrew/Cellar/qt/4.8.0/lib/QtCore.framework/Versions/4/Headers
 }}}
 I didn't try it out yet, but I speculate that qt4-mac-devel might have the
 same problem.

 Out of curiosity and independent of the bug - why aren't QtCore.framework
 and other frameworks put under ${prefix}/Library/Frameworks
 (${frameworks_dir}) instead of ${prefix}/lib like they are for AquaTerm,
 Python etc.?

-- 
Ticket URL: <https://trac.macports.org/ticket/32975>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list