|
From: Petr M. <mi...@ph...> - 2012-08-22 12:19:51
|
> > $ pkg-config --variable=rcc_location QtCore
> > /usr/src/packages/BUILD/qt-everywhere-opensource-src-4.7.1/bin/rcc
>
> I get (properly)
> /opt/local/bin/rcc
> on Mac. The file
> /opt/local/lib/pkgconfig/QtCore.pc
> defines
> prefix=/opt/local
> rcc_location=${prefix}/bin/rcc
>
> This means that there's a bug in your linux distribution, specifically
> in the qt package. My guess is that QtCore.pc uses wrong settings. Can
> you please send the contents of that file?
less /usr/lib/pkgconfig/QtCore.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include/QtCore
qt_config=lex yacc warn_on uic resources qt warn_on release incremental
link_prl def_files_disabled exceptions no_mocdepend release stl
qt_no_framewo
rk system-sqlite release shared dll largefile stl mmx 3dnow sse sse2 sse3
ssse3 sse4_1 sse4_2 dylib create_prl link_prl depend_includepath QTDIR_buil
d nostrip qt_install_headers qt warn_on depend_includepath qmake_cache
target_qt hide_symbols bsymbolic_functions create_libtool create_pc
explicitli
b moc thread shared dll
moc_location=/usr/bin/moc
uic_location=/usr/bin/uic
rcc_location=${prefix}/src/packages/BUILD/qt-everywhere-opensource-src-4.7.1/bin/rcc
lupdate_location=${prefix}/src/packages/BUILD/qt-everywhere-opensource-src-4.7.1/bin/lupdate
lrelease_location=${prefix}/src/packages/BUILD/qt-everywhere-opensource-src-4.7.1/bin/lrelease
Name: Qtcore
Description: Qtcore Library
Version: 4.7.1
Libs: -L${libdir} -lQtCore
Libs.private: -L/usr/lib -L/usr/lib -lpthread -lz -lm -ldl -pthread
-lgthread-2.0 -lrt -lglib-2.0
Cflags: -DQT_SHARED -I/usr/include -I${includedir}
It seems that the rcc&lrelease location points to the temporary rpmbuild
location instead of the installation one. That's probably a bug indeed, but
I think gnuplot can easily deal with it:
> But I definitely don't agree with this code:
>
> > if "$QT4LOC/bin/rcc exists"
> > then RCC=$QT4LOC/bin/rcc
> > else RCC=rcc
>
> Imagine a properly configured QtCore.pc listing:
> prefix=/usr
> exec_prefix=${prefix}
> rcc_location=${prefix}/bin/rcc-4.8
> In this case your proposal wouldn't work properly, while current
> implementation would be ok.
I see, so I propose the following patch (3 lines added):
RCC=`$PKG_CONFIG --variable=rcc_location QtCore`
if test x"$RCC" = x ; then
if test x"$QT4LOC" != x ; then
RCC=$QT4LOC/bin/rcc
else
RCC=rcc
fi
fi
if ! test -f $RCC ; then
RCC=rcc
fi
---
Petr
|