Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 479638 - >=dev-qt/qt-creator-3.3: build against qt5
Summary: >=dev-qt/qt-creator-3.3: build against qt5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Davide Pesavento
URL:
Whiteboard:
Keywords: PATCH
: 511148 524016 (view as bug list)
Depends on: qt5-porting
Blocks: 476256 528436
  Show dependency tree
 
Reported: 2013-08-03 13:02 UTC by Alexander Mezin
Modified: 2015-01-18 04:59 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for qml2puppet (qml2puppet-2.8.0.ebuild,1015 bytes, text/plain)
2013-08-03 13:02 UTC, Alexander Mezin
Details
qt-creator-3.2.2.ebuild.patch (qtcreator-3.2.2.ebuild.patch,2.41 KB, patch)
2014-11-06 23:44 UTC, Paweł Stankowski
Details | Diff
qt-creator-3.2.2.ebuild.patch (qtcreator-3.2.2.ebuild.patch,2.39 KB, patch)
2014-11-07 00:17 UTC, Paweł Stankowski
Details | Diff
qt-creator-3.3.0_beta1.ebuild (qt-creator-3.3.0_beta1.ebuild,3.42 KB, text/plain)
2014-11-08 01:39 UTC, Paweł Stankowski
Details
qtcore-5.3.2 with global_docs use flag (file_479638.txt,486 bytes, patch)
2014-11-08 01:44 UTC, Paweł Stankowski
Details | Diff
qt-creator-3.3.0_beta1.ebuild (qt-creator-3.3.0_beta1.ebuild,3.42 KB, text/plain)
2014-11-08 01:48 UTC, Paweł Stankowski
Details
qt-creator-3.3.0_beta1.ebuild (qt-creator-3.3.0_beta1.ebuild.patch,3.25 KB, patch)
2014-11-14 21:40 UTC, Paweł Stankowski
Details | Diff
qt-creator-3.3.0_beta1.ebuild (qt-creator-3.3.0_beta1.ebuild.patch,3.81 KB, patch)
2014-11-24 23:57 UTC, Paweł Stankowski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Mezin 2013-08-03 13:02:18 UTC
Created attachment 355026 [details]
Ebuild for qml2puppet

Qt creator is built with qt4, so designer doesn't work for qtquick 2.
Building qml2puppet with qt5 solves the problem.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-04 14:32:31 UTC
Why does the ebuild say "qt creator" everywhere? Is this supposed to be an ebuild for dev-qt/qt-creator or a new package?
Comment 2 Alexander Mezin 2013-08-04 23:09:34 UTC
(In reply to Jeroen Roovers from comment #1)
> Why does the ebuild say "qt creator" everywhere? Is this supposed to be an
> ebuild for dev-qt/qt-creator or a new package?

It's part of qt creator
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-06 11:48:34 UTC
So wouldn't a USE flag suffice to make it part of a dev-qt/qt-creator ebuild?
Comment 4 Alexander Mezin 2013-08-06 14:19:42 UTC
(In reply to Jeroen Roovers from comment #3)
> So wouldn't a USE flag suffice to make it part of a dev-qt/qt-creator ebuild?

Maybe. I only found a solution that just works, and shared it.
However, with an use-flag qt creator will have qt 5 in dependencies, so you'll have different ebuilds for overlay and for main tree.
Comment 5 Davide Pesavento gentoo-dev 2013-08-06 16:31:45 UTC
(In reply to Alexander Mezin from comment #4)
> (In reply to Jeroen Roovers from comment #3)
> > So wouldn't a USE flag suffice to make it part of a dev-qt/qt-creator ebuild?
> 
> Maybe. I only found a solution that just works, and shared it.
> However, with an use-flag qt creator will have qt 5 in dependencies, so
> you'll have different ebuilds for overlay and for main tree.

use.mask qt5
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-23 23:07:12 UTC
*** Bug 511148 has been marked as a duplicate of this bug. ***
Comment 7 Davide Pesavento gentoo-dev 2014-09-29 16:32:15 UTC
*** Bug 524016 has been marked as a duplicate of this bug. ***
Comment 8 Davide Pesavento gentoo-dev 2014-09-29 16:44:00 UTC
http://lists.qt-project.org/pipermail/qt-creator/2014-July/003803.html

Qt Creator 3.3 (currently in development) requires to be built against qt >= 5.3.1
Qt4 support has been dropped completely.
Comment 9 Paweł Stankowski 2014-11-06 23:44:51 UTC
Created attachment 388714 [details, diff]
qt-creator-3.2.2.ebuild.patch

I created patch for QtCreator 3.2.2 to make it possible to compile it against Qt5 by adding 'qt5' use flag to it.

You still can use that patch for QtCreator 3.3 and newer, but then you would have to remove "!qt5" blocks and make "qt5" blocks unconditional.
Comment 10 Paweł Stankowski 2014-11-07 00:17:06 UTC
Created attachment 388716 [details, diff]
qt-creator-3.2.2.ebuild.patch

Patch with minor fixes attached.

The only problem that remains is build error when 'doc' use flag is enabled.

It is because of this line in doc/qtcreator.qdocconf file:
include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)

In Ubuntu qt-html-templates-offline.qdocconf is included in qtbase5-dev package, so I suppose that we should have some new use flag in qtcore package that would result in these templates being copied.
Comment 11 Davide Pesavento gentoo-dev 2014-11-07 02:37:46 UTC
(In reply to Paweł Stankowski from comment #9)
> You still can use that patch for QtCreator 3.3 and newer, but then you would
> have to remove "!qt5" blocks and make "qt5" blocks unconditional.

I'm going to keep 3.2 qt4-only, and add qt5 support starting with 3.3 (beta1 is already out). Would you mind amending your patch to make qt5 deps unconditional? By the way, I believe the minimum required version is 5.3.1 or something like that... just put 5.3.2 since there's nothing else in portage.

(In reply to Paweł Stankowski from comment #10)
> The only problem that remains is build error when 'doc' use flag is enabled.
> 
> It is because of this line in doc/qtcreator.qdocconf file:
> include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)
> 
> In Ubuntu qt-html-templates-offline.qdocconf is included in qtbase5-dev
> package, so I suppose that we should have some new use flag in qtcore
> package that would result in these templates being copied.

Yeah, doc support is missing from Qt5 packages at the moment (see bug 457028). Is there any pre-built doc in qt-creator tarball (either in html or qch format)?
Comment 12 Paweł Stankowski 2014-11-08 00:09:11 UTC
(In reply to Davide Pesavento from comment #11)
> (In reply to Paweł Stankowski from comment #9)
> > You still can use that patch for QtCreator 3.3 and newer, but then you would
> > have to remove "!qt5" blocks and make "qt5" blocks unconditional.
> 
> I'm going to keep 3.2 qt4-only, and add qt5 support starting with 3.3 (beta1
> is already out). Would you mind amending your patch to make qt5 deps
> unconditional? By the way, I believe the minimum required version is 5.3.1
> or something like that... just put 5.3.2 since there's nothing else in
> portage.
Yeah, no problem - I can leave 3.2 as it is. I am testing 3.3.0_beta1 ebuild at the moment. Indeed qt-creator 3.3 requires Qt 5.3.1 or newer, but qt-creator 3.2 could be used with any Qt5 version.

> 
> (In reply to Paweł Stankowski from comment #10)
> > The only problem that remains is build error when 'doc' use flag is enabled.
> > 
> > It is because of this line in doc/qtcreator.qdocconf file:
> > include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)
> > 
> > In Ubuntu qt-html-templates-offline.qdocconf is included in qtbase5-dev
> > package, so I suppose that we should have some new use flag in qtcore
> > package that would result in these templates being copied.
> 
> Yeah, doc support is missing from Qt5 packages at the moment (see bug
> 457028). Is there any pre-built doc in qt-creator tarball (either in html or
> qch format)?
Ok, so I will try to use this little patch from the bug you mentioned:
https://457028.bugs.gentoo.org/attachment.cgi?id=338736

That small patch creates 'doc' use flag that may be used to install documentation templates and few PNG files. It needs some corrections, but is so small that possibly could be merged without resolving whole bug, right?
I will change 'doc' use flag name into 'global_docs', because I think current name is misleading.
Comment 13 Paweł Stankowski 2014-11-08 01:39:50 UTC
Created attachment 388806 [details]
qt-creator-3.3.0_beta1.ebuild

Ebuild for QtCreator 3.3 attached. I had to fix one bug that new plugin QmakeAndroidSupport requires Android plugin, so build failed when android use flag was disabled. Now both plugins are disabled using android use flag. We will have to check other plugins dependencies.

About 'doc' use flag:
Patching qtcore ebuild fixed problem with qtcreator documentation not being created. However I have to manually add QCH files in QtCreator Options, because it is not found automatically. I think that this is because QCH files are installed in /usr/share/doc/qtcreator-${PV} and default path is /usr/shared/doc/qtcreator. Maybe patching ICore::documentationPath() function would do the trick. Currently it looks like that:
QString ICore::documentationPath()
{
const QString docPath = QLatin1String(Utils::HostOsInfo::isMacHost()
? "/../Resources/doc" : "/../share/doc/qtcreator");
return QDir::cleanPath(QCoreApplication::applicationDirPath() + docPath);
}

Do you think it is worth trying?
Comment 14 Paweł Stankowski 2014-11-08 01:44:30 UTC
Created attachment 388808 [details, diff]
qtcore-5.3.2 with global_docs use flag
Comment 15 Paweł Stankowski 2014-11-08 01:48:21 UTC
Created attachment 388810 [details]
qt-creator-3.3.0_beta1.ebuild

Changed name of 'doc' use flag to 'global_docs'
Comment 16 Davide Pesavento gentoo-dev 2014-11-08 02:22:24 UTC
(In reply to Paweł Stankowski from comment #12)
> Ok, so I will try to use this little patch from the bug you mentioned:
> https://457028.bugs.gentoo.org/attachment.cgi?id=338736
> 
> That small patch creates 'doc' use flag that may be used to install
> documentation templates and few PNG files. It needs some corrections, but is
> so small that possibly could be merged without resolving whole bug, right?
> I will change 'doc' use flag name into 'global_docs', because I think
> current name is misleading.

How much stuff are we talking about here? If they're small enough, I'd prefer installing those files unconditionally rather than introducing yet another obscure USE flag.

Also, please don't mix bugs... attach the updated doc patch to the original bug. And explain why '-make docs' is no longer needed.
Comment 17 Davide Pesavento gentoo-dev 2014-11-08 02:29:13 UTC
(In reply to Paweł Stankowski from comment #13)
> About 'doc' use flag:
[...]
> Do you think it is worth trying?

Probably not. Install the qch into /usr/share/doc/${PN} instead, where qtcreator expects it, and add a comment in the ebuild explaining why we're doing that.
Comment 18 Paweł Stankowski 2014-11-14 21:40:08 UTC
Created attachment 389332 [details, diff]
qt-creator-3.3.0_beta1.ebuild

> We will have to check other plugins dependencies.
I've checked other plugins and found that very basic ones (as Welcome plugin) are using qtquickcontrols and qtxml, so I've added these packages to dependencies.

> Install the qch into /usr/share/doc/${PN} instead, where
> qtcreator expects it, and add a comment in the ebuild explaining why we're
> doing that.
Done. Documentation now works out of the box. When qtcreator was already run, removal of ~/.config/QtProject may be needed.
Comment 19 Paweł Stankowski 2014-11-24 23:57:08 UTC
Created attachment 390232 [details, diff]
qt-creator-3.3.0_beta1.ebuild

- fixed docs path
- doc use flag now has dependency on >=dev-qt/qtcore-5.3.2-r1 instead of dev-qt/qtcore[global_docs]
- added runtime dependency dev-qt/qttranslations when any LINGUAS use flag is enabled (w/o this dependency, translations file were installed but could not be used).
Comment 20 Franz Trischberger 2014-11-29 20:47:49 UTC
Thx for the ebuild!
Just wanted to say that I used it without any modifications to install qt-creator-3.3.0_rc1. Works very well (compilation and tested features like C++ code completion (clang), qml editor, compilation, ...)
Comment 21 Paweł Stankowski 2015-01-17 21:57:50 UTC
I found another (minor) problem with this ebuild. Directory with syntax highlighthing definitions (Tools->Options->Text Editor->Generic Highlighter) by default points to subdirectory of my $HOME dir, but it should point to /usr/share/qtcreator/generic-highlighter. Have not found this bug earlier, because Kate's highlighting definitions were used as fallback and they were working well in most of cases.

Any progress on merging that into portage? I spent a lot of time on that, so it would be great if users may make use of it. QtCreator 3.3 was officially released over a month ago.
Comment 22 Davide Pesavento gentoo-dev 2015-01-18 04:59:49 UTC
(In reply to Paweł Stankowski from comment #21)
> Any progress on merging that into portage? I spent a lot of time on that, so
> it would be great if users may make use of it. QtCreator 3.3 was officially
> released over a month ago.

Sorry, I forgot about this. Fixed in tree with 3.3.0, thanks a lot!

*qt-creator-3.3.0 (18 Jan 2015)

  18 Jan 2015; Davide Pesavento <pesa@gentoo.org> +qt-creator-3.3.0.ebuild,
  metadata.xml, qt-creator-2.8.1.ebuild, qt-creator-3.2.2.ebuild:
  Version bump (bug 528436). Build against Qt5 as now required by upstream,
  thanks to Paweł Stankowski in bug 479638 for the initial patch. Add support
  for qbs and winrt plugins (bug 476256).