[Slackbuilds-users] QT4
Aleksandar B. Samardzic
asamardzic at gmail.com
Mon Aug 20 09:56:40 UTC 2007
On Sun, Aug 19, 2007 at 04:38:20PM -0400, Martin Lefebvre wrote:
> Hey fellow SlackBuilders.
>
> What would be the limitations on a QT4 SlackBuild? Does anyone know if it
> can co-exist with QT3? Normally we don't take on packages that are already
> included in Slackware, but a QT4 build would me nice... I could then sumbit
> an updated LyX buildscript.
>
I'm using Qt 4 compiled and installed from source on Slackware since
first betas, with some small care it works fine for me along with
existing Qt 3 installation. I was recently thinking about creating a
SlackBuild script too, however I need Qt 4 compiled with SQLite
support and SQLite is unfortunately not yet included by default with
Slackware, so I though I should keep working as is...
In any case, I'd start with stock Slackware qt.SlackBuild script, that
would (after updated for Qt 4) put everything into something like
/usr/lib/qt-4.x.y, but then I'd skip existing doinst.sh (it is not
possible to have say symlink /usr/bin/qmake to both Qt 3 and Qt 4
qmake), but instead I would carefully create /etc/profile.d/qt4.csh
and /etc/profile.d/qt4.sh to put Qt 4 bin subdirectory into PATH, as
well as to define QTDIR and add $QTDIR/lib into LD_LIBRARY_PATH. Then
I'd kept these files with 644 permissions, so that user willing to use
Qt 4 could source corresponding file and work with it. Basically,
this is kind of setup that works for me now - I have current Qt 4
version installed in /usr/local/Trolltech/Qt-4.3.1, and I have a
script /usr/local/Trolltech/qt4.sh:
#############
QTDIR=/usr/local/Trolltech/Qt-4.3.1
if [ -z "${LD_LIBRARY_PATH}" ]
then
LD_LIBRARY_PATH="$QTDIR/lib"
else
LD_LIBRARY_PATH="$QTDIR/lib:$LD_LIBRARY_PATH"
fi
if [ -z "${PATH}" ]
then
PATH="$QTDIR/bin"
else
PATH="$QTDIR/bin:$PATH"
fi
export QTDIR LD_LIBRARY_PATH PATH
#############
that I'm sourcing each time when I need to work with Qt 4. Once this
script sourced into a shell, the shell is unusable to work with Qt 3
(in the sense of developing Qt 3 applications, luckily library names
are different so existing Qt 3 applications will load right libraries
and work properly even when launched from that shell), but that works
fine for me.
Feel free to let me know if you need some help, or testing, if you
eventually decide to work on this SlackBuild.
Regards,
Alex
More information about the Slackbuilds-users
mailing list