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

Bug 97335

Summary: x11-libs/qt does not register with pkgconfig, need QT_CFLAGS and QT_LIBS
Product: Gentoo Linux Reporter: CJ Kucera <pez>
Component: New packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 97352    

Description CJ Kucera 2005-06-28 12:30:05 UTC
I'm attempting to write an ebuild for a package which relies on QT, and its
configure script checks pkgconfig for the presence of QT.  Here's the relevant
line from their configure.in:

PKG_CHECK_MODULES(QT, qt-mt >= 3.1.1)

It appears that the current QT builds (up through qt-3.3.4-r3, at least) don't
actually store the qt-mt.pc file anwhere where pkg-config can pick it up.  The
configure script says that if QT_CFLAGS and QT_LIBS are defined, then it'll skip
the pkg-config statement itself and just use those env vars, but in my mind it's
probably "best" to just have QT register itself with pkg-config.

The qt-mt.pc file does get generated in ${S}/lib during compilation, and I've
tried just putting that into /usr/lib/pkgconfig, and that seems to work fine for
this package.  I imagine that since QT is all SLOTted and stuff, it should be a
bit more intelligent than just putting it in that dir...  pkgconfig will look in
the env var PKG_CONFIG_PATH, so I was thinking that it would be pretty easy to
install the .pc file into ${QTDIR}/lib/pkgconfig, and then use, for instance,
/etc/env.d/45qt3 to add that path into PKG_CONFIG_PATH.  That way, different
SLOTs of QT should be able to live with each other, with the "main" version
defining PKG_CONFIG_PATH in the env.d vars.

Anyway, let me know what you think about that.  I'd be happy to write up a quick
patch to get that done, but I'd like to know if it's something that would be
likely to be included or not before I do that work.

Thanks!

Reproducible: Always
Steps to Reproduce:
Comment 1 Gregorio Guidi (RETIRED) gentoo-dev 2005-08-05 03:21:47 UTC
It seems Qt4 installs qt-mt.pc in /usr/lib/qt4/pkgconfig and does not set 
PKG_CONFIG_PATH. Probably this is the easiest way, we can just add it 
to /usr/qt/3/lib/pkgconfig and make ebuilds set PKG_CONFIG_PATH where needed, 
or leave it to the user for manually compiled packages. Is it ok? 
Comment 2 CJ Kucera 2005-08-05 06:55:01 UTC
Sure, that'd be fine.  Basically just anything that'll put qt-mt.pc somewhere it
can be picked up.  Thanks!
Comment 3 Gregorio Guidi (RETIRED) gentoo-dev 2005-08-08 03:58:35 UTC
Committed as in comment #1 in qt-3.3.4-r7.