Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 450412 - [kde overlay] app-office/akonadi-server-1.9.0: add Qt 5 support
Summary: [kde overlay] app-office/akonadi-server-1.9.0: add Qt 5 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on: qt5-porting
Blocks:
  Show dependency tree
 
Reported: 2013-01-05 16:07 UTC by Michael Palimaka (kensington)
Modified: 2014-05-15 14:38 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Palimaka (kensington) gentoo-dev 2013-01-05 16:07:09 UTC
Upstream supports build with Qt 5, but we do not handle this in the ebuild which is causing problems.

Did we ever agree on how we are going to handle this? I seem to remember talk of qt4 and qt5 USE flags. In any case I imagine we will need a patch to avoid the current automagic situation, which I can take care of and push upstream.

CMakeLists.txt:
> find_package(Qt5Core QUIET)
> if (Qt5Core_FOUND)
>   find_package(Qt5Gui REQUIRED)
>   find_package(Qt5Widgets REQUIRED)
>   find_package(Qt5Sql REQUIRED)
>   find_package(Qt5Network REQUIRED)
>   find_package(Qt5Xml REQUIRED)
>   find_package(Qt5DBus REQUIRED)
>   find_package(Qt5Test REQUIRED)
>   set(QT5_BUILD TRUE)
> 
>   include("cmake/modules/ECMQt4To5Porting.cmake")
>   include_directories(${QT_INCLUDES}) # TODO: Port away from this.
> 
>   if (CMAKE_VERSION VERSION_LESS 2.8.9)
>     message(FATAL_ERROR "Akonadi Qt 5 build requires at least CMake version 2.8.9")
>   endif()
> 
>   set(QT_QTTEST_LIBRARIES Qt5::Test)
> else()
>   find_package(Qt4 REQUIRED)
>   include(${QT_USE_FILE})
> endif()
Comment 1 Michael Palimaka (kensington) gentoo-dev 2013-01-05 17:11:36 UTC
As a side note, FindQt5Transitional.cmake which is bundled by a number of packages is also automagic so we need to patch that. Sput says that lives in either kdelibs (frameworks) or extra-cmake-modules.
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2013-01-05 21:25:40 UTC
(In reply to comment #1)
> As a side note, FindQt5Transitional.cmake which is bundled by a number of
> packages is also automagic so we need to patch that. Sput says that lives in
> either kdelibs (frameworks) or extra-cmake-modules.

Hmmm...I thought qt5 shipped the "official" cmake files itself, so what is FindQt5Transitional exactly and why are they bundling it?
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2013-01-05 21:28:19 UTC
(In reply to comment #0)
> Did we ever agree on how we are going to handle this? I seem to remember
> talk of qt4 and qt5 USE flags.

Yeah I think we need to introduce qt4 and qt5 USE flags for packages supporting both versions.
Comment 4 Francesco Riosa 2013-01-06 09:09:21 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > Did we ever agree on how we are going to handle this? I seem to remember
> > talk of qt4 and qt5 USE flags.
> 
> Yeah I think we need to introduce qt4 and qt5 USE flags for packages
> supporting both versions.

seconded, especially because it's not possible to link a library to qt5 and it's consumer to qt4 or vice-versa.

Additionally I've seen weird behaviour with akonadi-server; it was linked to qt-core4 and other pieces of qt-5. It compiled but obviously nothing worked.
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2013-01-06 09:44:57 UTC
(In reply to comment #4)
> seconded, especially because it's not possible to link a library to qt5 and
> it's consumer to qt4 or vice-versa.
> 

Yep, so we need something like
  (R)DEPEND="dev-libs/libfoo[qt4(+)=,qt5(-)=]"

and
  REQUIRED_USE="^^ ( qt4 qt5 )"

or, if qt support is optional
  REQUIRED_USE="?? ( qt4 qt5 )"
Comment 6 Michael Palimaka (kensington) gentoo-dev 2013-01-06 14:24:48 UTC
I wonder, is it necessary to introduce both qt4 and qt5 flags? Could we not just assume qt4 if the qt5 flag is not enabled?
Comment 7 Chris Reffett (RETIRED) gentoo-dev Security 2013-01-06 15:04:17 UTC
Strictly speaking, that would work, but we have a qt4 USE already, and I think it's better if the user explicitly rather than implicitly selects the Qt version.
Comment 8 Michael Palimaka (kensington) gentoo-dev 2013-01-06 15:06:29 UTC
We must be sure to set a default then.
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2013-01-06 20:24:30 UTC
(In reply to comment #8)
> We must be sure to set a default then.

+1
Comment 10 Chris Reffett (RETIRED) gentoo-dev Security 2013-01-21 01:39:24 UTC
Qt team said that there should be separate qt4 and qt5 flags, with "select only one" logic where appropriate for the package.