From ffb75042abbfddb4095b8e8bf2132572870f993e Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 15 May 2006 21:05:18 +0000 Subject: [PATCH] fix multilib issue --- qt.csh | 15 +++++++++++++++ qt.sh | 15 +++++++++++++++ qt.spec | 50 +++++++------------------------------------------- 3 files changed, 37 insertions(+), 43 deletions(-) create mode 100755 qt.csh create mode 100755 qt.sh diff --git a/qt.csh b/qt.csh new file mode 100755 index 0000000..9b24e92 --- /dev/null +++ b/qt.csh @@ -0,0 +1,15 @@ +# Qt initialization script (csh) + +set qt_prefix = `/usr/bin/pkg-config --variable=prefix qt-mt` + +if ( "${path}" !~ *$qt_prefix/bin* ) then + set path = ( $qt_prefix/bin $path ) +endif + +if ( $?QTDIR ) then + exit +endif + +setenv QTDIR $qt_prefix +setenv QTINC $qt_prefix/include +setenv QTLIB $qt_prefix/lib diff --git a/qt.sh b/qt.sh new file mode 100755 index 0000000..33331c4 --- /dev/null +++ b/qt.sh @@ -0,0 +1,15 @@ +# Qt initialization script (sh) + +qt_prefix=`/usr/bin/pkg-config --variable=prefix qt-mt` + +if ! echo ${PATH} | /bin/grep -q $qt_prefix/bin ; then + PATH=$qt_prefix/bin:${PATH} +fi + +if [ -z "$QTDIR" ] ; then + QTDIR="$qt_prefix" + QTINC="$qt_prefix/include" + QTLIB="$qt_prefix/lib" +fi + +export QTDIR QTINC QTLIB PATH diff --git a/qt.spec b/qt.spec index fa6f615..416a12b 100644 --- a/qt.spec +++ b/qt.spec @@ -94,6 +94,8 @@ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root Url: http://www.troll.no Source: ftp://ftp.troll.no/qt/source/qt-x11-free-%{version}.tar.bz2 Source1: qtrc +Source2: qt.sh +Source3: qt.csh Patch1: qt-3.3.4-print-CJK.patch Patch2: qt-3.0.5-nodebug.patch @@ -211,7 +213,7 @@ Requires: xorg-x11-proto-devel Requires: libpng-devel Requires: libjpeg-devel Requires: libmng-devel - +Requires: pkgconfig %package devel-docs Summary: Documentation for the Qt GUI toolkit. @@ -506,14 +508,10 @@ for i in findtr qt20fix qtrename140 lrelease lupdate ; do install bin/$i %{buildroot}%{qtdir}/bin/ done -%if ! %{pkg_config} - rm -rf %{buildroot}%{_libdir}/pkgconfig -%else - mkdir -p %{buildroot}%{_libdir}/pkgconfig - pushd %{buildroot}%{_libdir}/pkgconfig - ln -sf ../%{qt_dirname}/lib/pkgconfig/* . +mkdir -p %{buildroot}%{_libdir}/pkgconfig +pushd %{buildroot}%{_libdir}/pkgconfig +ln -sf ../%{qt_dirname}/lib/pkgconfig/* . popd -%endif # install man pages %if %{installman} @@ -541,27 +539,7 @@ for a in */*/Makefile ; do done mkdir -p %{buildroot}/etc/profile.d -cat > %{buildroot}/etc/profile.d/%{name}.sh < %{buildroot}/etc/profile.d/%{name}.csh <