Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610380 - dev-util/eric-17.02.1: ebuild bump with qt5 support
Summary: dev-util/eric-17.02.1: ebuild bump with qt5 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-21 16:07 UTC by Fabio Rossi
Modified: 2017-03-04 05:46 UTC (History)
0 users

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


Attachments
eric-17.02.1.ebuild (eric-17.02.1.ebuild,1.87 KB, text/plain)
2017-02-21 16:07 UTC, Fabio Rossi
Details
eric.diff (eric.diff,1.07 KB, patch)
2017-02-21 16:35 UTC, Fabio Rossi
Details | Diff
eric.diff (eric.diff,1.04 KB, patch)
2017-02-22 13:18 UTC, Fabio Rossi
Details | Diff
eric.diff (eric.diff,696 bytes, patch)
2017-02-26 13:22 UTC, Fabio Rossi
Details | Diff
eric.diff (eric.diff,691 bytes, patch)
2017-02-26 16:05 UTC, Fabio Rossi
Details | Diff
eric.diff (eric.diff,688 bytes, patch)
2017-02-26 16:06 UTC, Fabio Rossi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2017-02-21 16:07:02 UTC
Created attachment 464544 [details]
eric-17.02.1.ebuild

Latest version of eric is 17.02.1.

Eric both works with qt4 and qt5 but currently the ebuild supports only qt4. One of the deps is qscintilla-python (and then qscintilla) which are built with +qt4. This conflicts with other packages (e.g. octave[gui]) which require qscintilla to be built with +qt5.

I have changed the ebuild to have the change to select both qt4 or qt5, please evaluate it.
Comment 1 Andreas Sturmlechner gentoo-dev 2017-02-21 16:24:25 UTC
Thanks for your work, please attach a diff over the latest ebuild instead.
Comment 2 Fabio Rossi 2017-02-21 16:33:41 UTC
Here is the diff

--- /usr/portage/dev-util/eric/eric-17.01.ebuild        2017-01-21 23:07:36.000000000 +0100
+++ /var/lib/layman/__mine__/dev-util/eric/eric-17.02.1.ebuild  2017-02-21 16:34:43.913918782 +0100
@@ -17,13 +17,20 @@
 MY_P=${PN}${SLOT}-${PV}
 SRC_URI="mirror://sourceforge/eric-ide/${PN}${SLOT}/stable/${PV}/${MY_P}.tar.gz"
 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE=""
+IUSE="qt4 qt5"
+REQUIRED_USE="^^ (qt4 qt5)"

 DEPEND="
        ${PYTHON_DEPS}
        >=dev-python/sip-4.14.3[${PYTHON_USEDEP}]
-       >=dev-python/PyQt4-4.10[${PYTHON_USEDEP},X,help,sql,svg,webkit]
-       >=dev-python/qscintilla-python-2.8[qt4(+),${PYTHON_USEDEP}]
+       qt4? (
+               >=dev-python/PyQt4-4.10[${PYTHON_USEDEP},X,help,sql,svg,webkit]
+               >=dev-python/qscintilla-python-2.8[qt4(+),-qt5,${PYTHON_USEDEP}]
+       )
+       qt5? (
+               >=dev-python/PyQt5-5.5.1[${PYTHON_USEDEP},help,sql,svg,webkit]
+               >=dev-python/qscintilla-python-2.8[-qt4,qt5(+),${PYTHON_USEDEP}]
+       )
 "
 RDEPEND="${DEPEND}
        >=dev-python/chardet-2.3.0[${PYTHON_USEDEP}]
@@ -60,7 +67,7 @@
                -i "${D}" \
                -c \
                -z \
-               --pyqt=4 \
+               $(use qt4 && echo --pyqt=4) \
                || die

        python_optimize
Comment 3 Fabio Rossi 2017-02-21 16:35:10 UTC
Created attachment 464548 [details, diff]
eric.diff
Comment 4 Andreas Sturmlechner gentoo-dev 2017-02-21 22:20:48 UTC
You're introducing two use flags when one is enough. ;) If there is any compelling reason to keep the Qt4 option, then just add USE=+qt5 and let the Qt4 magic happen if "-qt5" is set.

qscintilla-python ebuild already requires "^^ ( qt4 qt5 )" so you don't have to juggle with both flags.

Re configure, the default is Qt5 if --pyqt is not passed at all?
Comment 5 Fabio Rossi 2017-02-21 23:19:04 UTC
(In reply to Andreas Sturmlechner from comment #4)
> You're introducing two use flags when one is enough. ;) If there is any
> compelling reason to keep the Qt4 option, then just add USE=+qt5 and let the
> Qt4 magic happen if "-qt5" is set.

I have followed other ebuilds where there is a mutually exclusive qt4 vs qt5 distinction. I like more the explicit version which clearly states if qt4 or qt5 is used, IMHO if -qt5 is set it's not evident that qt4 will be used until emerge is run.

> qscintilla-python ebuild already requires "^^ ( qt4 qt5 )" so you don't have
> to juggle with both flags.
> 
> Re configure, the default is Qt5 if --pyqt is not passed at all?

It seems that PtQy5 is the first option with autodetection
Comment 6 Andreas Sturmlechner gentoo-dev 2017-02-21 23:32:32 UTC
(In reply to Fabio Rossi from comment #5)
> I have followed other ebuilds where there is a mutually exclusive qt4 vs qt5
> distinction. I like more the explicit version which clearly states if qt4 or
> qt5 is used, IMHO if -qt5 is set it's not evident that qt4 will be used
> until emerge is run.

Qt project policy: https://wiki.gentoo.org/wiki/Project:Qt/Policies#Requires_one_of_two_Qt_versions

I only except ^^ ( qt4 qt5 ) for libraries that have existing reverse dependencies. That is painful enough, but we need not bother users with an emerge blocker that can be so easily avoided.
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2017-02-22 00:56:13 UTC
just drop qt4 altogether and keep only the qt5 "option"
Comment 8 Fabio Rossi 2017-02-22 13:18:04 UTC
Created attachment 464674 [details, diff]
eric.diff

Here is a new version using only the qt5 useflag
Comment 9 Davide Pesavento (RETIRED) gentoo-dev 2017-02-26 05:34:01 UTC
Sorry, I meant drop qt4 support completely, and only allow building against qt5. I don't see any reasons to keep qt4 around.
Comment 10 Fabio Rossi 2017-02-26 13:22:36 UTC
Created attachment 465268 [details, diff]
eric.diff
Comment 11 Andreas Sturmlechner gentoo-dev 2017-02-26 15:51:13 UTC
(In reply to Andreas Sturmlechner from comment #4)
> qscintilla-python ebuild already requires "^^ ( qt4 qt5 )" so you don't have
> to juggle with both flags.

Please fix the qscintilla-python use deps as described above. qscintilla-python is handling qt4 vs. 5 itself, so there's no need for you to force off qt4; should it be possible at some point for both flags to be enabled, eric shall not stand in its way.
Comment 12 Andreas Sturmlechner gentoo-dev 2017-02-26 15:52:33 UTC
Also, qt5(+) is wrong in that context, as previous qscintilla-python versions clearly did not have qt5 support if they were lacking the use flag. 'qt5' is enough.
Comment 13 Fabio Rossi 2017-02-26 16:05:01 UTC
Created attachment 465288 [details, diff]
eric.diff
Comment 14 Fabio Rossi 2017-02-26 16:06:02 UTC
Created attachment 465290 [details, diff]
eric.diff

hopefully last :-)
Comment 15 Michael Palimaka (kensington) gentoo-dev 2017-03-04 05:46:21 UTC
Thanks, bumped in git. I saw there was a new version so bumped straight to that, and added a couple of extra USE flags for PyQt5 that I noticed in the install file.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41b48133d6c301cd411b3637689a3abfdf5e43a0