Bug 212722

Summary: define QTINC/QTLIB in qt.sh/qt.csh
Product: Red Hat Enterprise Linux 4 Reporter: Rex Dieter <rdieter>
Component: qtAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: llim, pknirsch, riek, tao
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-22 15:47:54 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:
Bug Depends On: 169132    
Bug Blocks:    

Description Rex Dieter 2006-10-28 12:30:44 UTC
+++ This bug was initially created as a clone of Bug #169132 +++

A large class of kde applications have issues building properly on x86_64
because they have trouble finding qt (usually lib != lib64 assumptions, etc). 
The workaround is usually to either define env vars QTINC/QTLIB (or use
./configure --with-qt-includes/--with-qt-libraries) pointing to the right place.

A lot of duplicated/extra effort could be avoided if QTINC and QTLIB were
already (correctly) defined in /etc/profile.d/qt.(sh|csh), adding lines like
# Qt initialization script (sh)

if [ -z "$QTDIR" ] ; then
  QTDIR="`/usr/bin/pkg-config --variable=prefix qt-mt`"
  QTINC="`/usr/bin/pkg-config --variable=includedir qt-mt`"
  QTLIB="`/usr/bin/pkg-config --variable=libdir qt-mt`"

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

  export QTDIR QTINC QTLIB PATH
fi


# Qt initialization script (csh)

if ( $?QTDIR ) then
   exit
endif

setenv QTDIR `/usr/bin/pkg-config --variable=prefix qt-mt` 
setenv QTINC `/usr/bin/pkg-config --variable=includedir qt-mt` 
setenv QTLIB `/usr/bin/pkg-config --variable=libdir qt-mt` 

if ( "${path}" !~ *$QTDIR/bin* ) then
   set path = ( $QTDIR/bin $path )
endif

Comment 2 Rex Dieter 2007-10-05 13:20:44 UTC
I know updates for RHEL4 take longer, but gee wiz, it's now approaching a *year*
since filing this small, simple enhancement request.

Heck, now upstreams are using this as an excuse to not fix their configure
scripts ( see http://bugs.kde.org/136377 ).

Comment 12 errata-xmlrpc 2009-01-22 15:47:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0026.html