[scribus] Compiling Scribus for Qt5
williambader at hotmail.com
Wed Mar 2 22:06:37 UTC 2016
> Date: Wed, 2 Mar 2016 18:05:22 +0100
> From: eilert-sprachen at t-online.de
> To: scribus at lists.scribus.net
> Subject: Re: [scribus] Compiling Scribus for Qt5
> Am 01.03.2016 21:43, schrieb Craig Bradney:
> >> On 01 Mar 2016, at 15:30, William Bader <williambader at hotmail.com> wrote:
> >>> Date: Tue, 1 Mar 2016 12:40:41 +0100
> >>> From: eilert-sprachen at t-online.de
> >>> To: scribus at lists.scribus.net
> >>> Subject: [scribus] Compiling Scribus for Qt5
> >>> This is purely "just for fun", so just tell me if I try something
> >>> impossible.
> >>> As I was interested in Qt5 libraries for my somewhat older Linux, I
> >>> downloaded the sources and browsed the documentation. The first thing I
> >>> found was how to compile the source statically into $HOME/qt5.
> >>> Having done so, I wonder how to compile and link the Scribus 1.5 source
> >>> to this version.
> >>> Compiling Qt5,
> >>> - "make" ran through flawlessly
> >>> - I have not yet issued "make install" because it wasn't mentioned - is
> >>> it necessary, anyway?
> >>> If I am not completely on the wrong path up to here, what would be the
> >>> necessary options to give for linking the Scribus sources to my personal
> >>> qt5?
> >>> Thanks for your advice!
> >>> Regards
> >>> Rolf
> >> I think that if the qt5 build works, you can get by without installing it, but the Scribus build scripts need to be able to find the qt5 build area. You will probably need to add the qt5 pkconfig directory to PKG_CONFIG_PATH and the qt5 bin directory to PATH. On a Linux distribution that did not already include qt5, I ended up faking the installation with a few sym links, but it didn't work well: ln -s /home/build/qt5/qtbase/include /usr/include/qt5; ln -s /home/build/qt5/qtbase /usr/lib64/qt5; ln -s /home/build/qt5/qtbase/libexec/ /usr/libexec/qt5; ln -s /home/build/qt5/qtbase/bin /usr/bin/qt5; mkdir /usr/share/qt5; ln -s /home/build/qt5/qtbase/translations /usr/share/qt5/translations; ln -s /home/build/qt5/qttools/src/linguist/phrasebooks /usr/share/qt5/phrasebooks
> >> William
> > All you need is this on your cmake line:
> > -DQT_PREFIX=“/path/to/your/qt”
> > Craig
> Thank you both for the advice. It doesn't sound so complicated. The only
> thing is, I have no experience with the cmake options, i. e. the only
> thing I know for sure is ./config, make, make install :)
> I took a look into my $HOME/qt5, it is empty. I guess it means I have to
> issue a "make install" to have the readily compiled libraries installed
> into this directory, and I hope it won't try to write them into the
> /usr/lib etc... (Although it would fail anyway as long as I give no
> sudo, right?)
> When this is done, shouldn't I invoke ./config with the prefix you gave
> me above, Craig? Or would it be
> make -DQT_PREFIX=/home/myHome/qt5
> Before I do anything wrong, I wait for your answers...
It has been a long time since I tried building qt5, and as Craig mentioned, I didn't do it the best way. In any case, I ran
git clone git://gitorious.org/qt/qt5.git qt5
perl init-repository -f
./configure -developer-build -opensource -nomake examples -nomake tests -no-gtkstyle -confirm-license
That left all of the qt5 binaries under a "qtbase" subdirectory. That directory might work as the QT_PREFIX. If it doesn't work, then you might need to do a "make distclean" and the rerun configure with the additional option "-prefix $HOME/qt5" as documented in http://doc.qt.io/qt-5/configure-options.html Then you will be able to do a "make install" to put the qt5 files in $HOME/qt5 instead of under /usr or /usr/local.
You should always do the builds as yourself and not as root. As long as you do the build as yourself, if you left the installation path as /usr, the "make install" won't be able to damage anything because the system files in /usr and /usr/local should be writable only be root.
Regards, William Bader, Director of Research and Development at SCS, http://www.newspapersystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the scribus