Bug 193369

Summary: qt4-config: assumes pkgconfig files present
Product: [Fedora] Fedora Reporter: Kevin Kofler <kevin>
Component: qt4Assignee: Rex Dieter <rdieter>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-30 17:19:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Kofler 2006-05-27 21:02:49 UTC
Description of problem:
The /usr/bin/qt4config script from the qt4-config package assumes the 
pkgconfig files from qt4-devel are installed, but qt4-config does not (and 
IMHO should not have to) require qt4-devel.

Version-Release number of selected component (if applicable):
qt4-config-4.1.3-5.fc5

How reproducible:
Always

Steps to Reproduce:
1. Run qt4config.
  
Actual results:
/usr/bin/qt4config: line 13: /bin/qt4config: No such file or directory
/usr/bin/qt4config: line 13: exec: /bin/qt4config: cannot execute: No such 
file or directory

Expected results:
The qt4config tool fires up normally.

Workaround:
QT4DIR=/usr/lib/qt4 qt4config

Additional info:
This is the offending portion of the script:
if [ -z "$QT4DIR" ] ; then
  QT4DIR="`/usr/bin/pkg-config --variable=prefix QtCore`"

  if ! echo ${PATH} | /bin/grep -q $QT4DIR/bin ; then
   PATH=${QT4DIR}/bin:${PATH}
  fi

  export QT4DIR PATH
fi

This tries to use pkg-config to find QT4DIR, but the required pkgconfig files 
are only installed in the -devel package.

Comment 1 Rex Dieter 2006-05-27 23:38:23 UTC
Ouch, bad oversight.  Will fix asap.

Comment 2 Rex Dieter 2006-05-30 17:19:36 UTC
* Mon May 29 2006 Rex Dieter <rexdieter[AT]users.sf.net> 4.1.3-6
- make qt4-wrapper.sh use rpm when pkg-config/qt4-devel isn't
  installed (#193369)

Ie, fallback to using (something like)
QT4DIR=`rpm --eval "%{_libdir}"`/qt4
when pkg-config isn't available.  Not sure if it's the best fix, but it works
(and hopefully everybody at least has rpm installed).