Created attachment 434444 [details] scite-3.6.5.ebuild with gtk3 support I added gtk3 support as default as long as the gtk2 use flag is set. I hope that i adjusted the dependencies somehow right. additionally I added flog-o-matik to inherrit and a cd ${workdir} before eapply_user, since that seems to me the default path user_patches should be referenced to. Am I right? (bug #576162) Since switching to a major version of gtk is a big deal with the dependencies it should be revbumped. (bug #582548) ervin
Since scite uses now the gtk2 useflag, there should be a description: <use> <flag name="gtk2">Using gtk+2 instead of gtk+3 which is default as of scite-3.6.5-r1.</flag> <flag name="lua">Enables internal lua scripting extension.</flag> </use> ervin
Created attachment 434488 [details] scite-3.6.5-r1.ebuild with gtk3 default support (typos/comments) Updated ebuild with an comment added and a corrected die message.
I am not taken with the selection of gtk 2 3 from another ebuild gtk2? ( x11-libs/gtk+:2 ) gtk3? ( x11-libs/gtk+:3 ) so perhaps gtk2? ( >=x11-libs/gtk+-2.24:2= ) gtk3? ( x11-libs/gtk+:3 ) For other packages, each has an entry description for both gtk2 gtk3 within metadata. Rest should be fine
(In reply to Ian Delaney from comment #3) > I am not taken with the selection of gtk 2 3 > > from another ebuild > gtk2? ( x11-libs/gtk+:2 ) > gtk3? ( x11-libs/gtk+:3 ) > > so perhaps > > gtk2? ( >=x11-libs/gtk+-2.24:2= ) > gtk3? ( x11-libs/gtk+:3 ) > > For other packages, each has an entry description for both gtk2 gtk3 within > metadata. > > Rest should be fine Additionally there is a 3rd useflag: gtk I was thinking about 3 Situations: 1. gtk2 is set: "Prefer gtk2 over other versions" -> scite should use gtk+-2 2. gtk3 is set: "Prefer gtk3 over other versions" -> scite should use gtk+-2 3. gtk is set or not: No influence of choosing a version, because scite needs gtk+ -> implicit set 4. none of gtk2, gtk3 is set -> scite should use which version? Options: 3.1 The way of autotools: Determine which version of gtk+ is already installed? But how is that done in portage? 3.2 Choose on as default, either gtk2+ or gtk3. Gnome uses gtk3 so it seems best to me to choose gtk3 as default. And that leads to the proposed above use flag dependencies, because if default is gtk3 and gtk is implicit than the only option is gtk2 to force the use of gtk2+. Otherwise we could choose gtk2 as default, that leads to check the gtk3 useflag to force the use of gtk3+. Am I wrong? ervin Loving KISS :)
As I undestand, this requires GTK+ either way, so there are two reasonable ways to do it: either select a default (as you suggest, perhaps GTK+3 as that's the newer one and used with GNOME) and provide a USE=gtk2 to force the lower version, or provide both 'gtk2' and 'gtk3' flags, and make them require "exactly-one-of" with REQUIRED_USE="^^ ( gtk2 gtk3 )".
> or provide both 'gtk2' and 'gtk3' flags, and make them require > "exactly-one-of" with REQUIRED_USE="^^ ( gtk2 gtk3 )". that forces user interactions in any case, which IMHO isn't necessary. Gnome3 is default, gtk3 ist default so only those users should have interactions which do not use gnome or other gtk based software. Another step in beetween could be to find out which version is already available, to avoid compiling of unnessary software. Something like: 1. Is either gtk2 od gtk3 set? 2. is either gtk2 or gtk3 available? 3. choose default (gtk2, gtk3) ervin
3.1 The way of autotools: Determine which version of gtk+ is already installed? But how is that done in portage? NO This is termed automagic and is scorned in gentoo/ It means that the setup is not nailed down and prone to changes in a system down the track == breakage. Sam's suggestion is fine. Make a decision, but do not leave the decision making up to guess work by "if installed, then ..." . It will only be thrown out.
(In reply to Ian Delaney from comment #7) > 3.1 The way of autotools: Determine which version of gtk+ is already > installed? But how is that done in portage? > > NO > This is termed automagic and is scorned in gentoo/ It means that the setup > is not nailed down and prone to changes in a system down the track == > breakage. > > Sam's suggestion is fine. Make a decision, but do not leave the decision > making up to guess work by "if installed, then ..." . It will only be thrown > out. I know. I was going on thinking something like a more flexible dependency handling. Assume for a number of packages there are 2 dependencies available: each paket could specify a 'fits' dependency and a 'preferred' dependency. The paketmanager could decide to use the most preferred. Additionally he could add some 'costs' operators in this decision. e.g. From a minimal system scite with gtk2 needs around 12 dependency related paktets, and using gtk3, around 72. So it is cheaper and keeps the system smaller to use gtk2.... But I assume there is some other place to discuss things like that. Back to the scite ebuild, the conclusion seems to me: use gtk3+ as default if the useflag gtk2 is not set. with minimized user interaction in mind and avoiding to deal with the confusing useflag complexity. That's the logic in my initially proposed ebuild. Did everyone agree? ervin
It should be fairly straightfoward. You have a GTK software, so toggling a flag for gtk isn't necessary. Typically, in these cases, you have a flag (almost always "gtk3" from what I've seen) to mean "Build with GTK+3 instead of GTK+2". In this case, you'd be doing the same. Semantically, if ! use gtk3; then dogtk2stuff else dogtk3stuff fi Whether you choose to make gtk2 or 3 default is really up to you, though, personally, since upstream makes GTK2 default, IMO, it makes the most sense to keep in line with that. As such, your ebuild should set the deps based on the gtk3 USE flag, and then set the env var used by the build system accordingly.
Created attachment 434960 [details] scite-3.6.5-r1.ebuild with gtk2 default and gtk+3 support I prefer gtk+3 as default, but, if you like more using gtk+2 as default I prepared the according ebuild.
Created attachment 434962 [details] scite-3.6.5-r1.ebuild with gtk2 default and gtk+3 support
Another suggestion. WE could take a look at then gnome useflag and take it into 'default' calculation. If gnome is set then the gtk+ defaults to gtk+3 else gtk2+ because gnome is gnome3 with gtk+3. If gnome is not set it means there is another Desktop environment available which not necessarily depend on gtk3. In this case the gtk2+ default is less ressource consumtive. What do you think: DEPEND= "... >=x11-libs/gtk+-2.24:2= !gtk2? ( gnome? ( x11-libs/gtk+:3= ) ) ..." and: pkg_setup() { einfo "SCiTE now defaults to use gtk3+ when using gnome. If you'd like to use gtk2 then set the gtk2 useflag to force the use of gtk2+"; if use gtk2 || ! gnome ; then emake_pars="" else emake_pars="GTK3=1 " fi if ! use lua; then emake_pars+="NO_LUA=1 " fi } ebuild follows ervin
Created attachment 435158 [details] scite-3.6.5.ebuild with gtk3 default support when using gnome defaults to gtk+3 when gnome useflag is set, otherwise to gtk+2
Created attachment 435272 [details] scite-3.6.5-r1 update after some tests Because some conditions did not work as I expected I updated the ebuild. When gnome is set and gtk2 is not set than it defaults to gtk+3. In other cases it defaults to gtk+2. ervin
(In reply to Ervin Peters from comment #12) > Another suggestion. WE could take a look at then gnome useflag and take it > into 'default' calculation. If gnome is set then the gtk+ defaults to gtk+3 > else gtk2+ because gnome is gnome3 with gtk+3. If gnome is not set it means > there is another Desktop environment available which not necessarily depend > on gtk3. In this case the gtk2+ default is less ressource consumtive. > > What do you think: > > DEPEND= "... > >=x11-libs/gtk+-2.24:2= > !gtk2? ( gnome? ( x11-libs/gtk+:3= ) ) > ..." > > > and: > > pkg_setup() > { > einfo "SCiTE now defaults to use gtk3+ when using gnome. If you'd like to > use gtk2 then set the gtk2 useflag to force the use of gtk2+"; > > if use gtk2 || ! gnome ; then > emake_pars="" > else > emake_pars="GTK3=1 " > fi > if ! use lua; then > emake_pars+="NO_LUA=1 " > fi > } > > ebuild follows > > ervin Nope, that's not KISS and doesn't make much sense, IMO. Overengineering. Gnome users should be setting gtk3 anyway.
Gnome users using a gnome profile. in this profile gtk3 is not set. Gnome defaults to gnome 3 which uses gtk3. you shouln't bother users with not neccessary configuring tasks like this 'Gnome users should be setting gtk3 anyway.' because words like this would drive out users from using gentoo and contributing to it. I recognized much unessescary critism without constructive proposals and activities solving the issue. I made 3 'straight forward' proposals and decided that I'd like to set gtk3 as default for gnome users. Dear proxy-maintainers I'd like you kindly decide which approach/ebuild, general gtk3 default or gnome depending gtk3 default, to use and to put in the tree. Thanks Ervin See also bug #583924 the new version 3.6.6
Please don't use USE=gnome here for selecting gtk3 or gtk2. GNOME has nothing to do with whether an application is using an old practically upstream unmaintained version of gtk, or new gtk. Many other desktops are also converting away from old gtk2 to gtk3, they are just taking a lot of time with their manpower in achieving that. The GNOME teams policy is written out here about this: https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#gtk3 Based on that, you should choose which one is working better, and always use that, unconditionally. And you should strongly prefer gtk3 if it's as good as gtk2 by that version without any big regressions. But that's GNOME team policy, and this is not GNOME. But this has been followed by many, with various user backlash back in 2014, but this is 2016 now. gtk2 is almost not maintained at all upstream and everything should be gtk3. I would last-rite gtk2 tomorrow if we lived in an ideal world. We don't, and many packages still only support gtk2 or their gtk3 is yet still too buggy. My suggestion would be to only support gtk2 for now, if the gtk3 support is not quite yet ready (as familiar with upstream, one would know what the state really is; e.g why they haven't switched it by default yet - is it only because the upstream maintainers happen to use DEs stuck in gtk2 or prefer gtk2, or if it has some real issues with gtk3 still) and switch to only gtk3 in a newer version once it's stabilized good enough upstream. Or to support only gtk3 if it's ready already with that new 3.6.6 version and working good.
I understand this. The reason for gtk2 compatibility is the compatibility for old systems. Nothing more. So, I'd like to use the gtk3 default. ervin
(In reply to Ervin Peters from comment #18) > I understand this. > The reason for gtk2 compatibility is the compatibility for old systems. > Nothing more. > So, I'd like to use the gtk3 default. > > ervin Systems that require gtk2 are not as old as one might think. Even big projects like firefox and libreoffice still have gtk3 support falling behind gtk2 support in their most recent versions. Since we are still in transition towards gtk3 it would be nice to have optional support for gtk2 if you choose that gtk3 should be the default.
Created attachment 435484 [details] conclusion scite-3.6.5-r1.ebuild with gtk2/3 support and gtk3 default gnome is no good idea, gtk3 support works and should be default according to: https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#gtk3 Gtk+2 Support is available via the gtk2 useflag. ervin
(In reply to Ervin Peters from comment #20) > conclusion scite-3.6.5-r1.ebuild with gtk2/3 support and gtk3 default > > gnome is no good idea, gtk3 support works and should be default according to: > > https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#gtk3 > > Gtk+2 Support is available via the gtk2 useflag. According to that link, and as I described, it should only be having gtk2 support or gtk3 support, not both. I would personally keep 3.6.5 at gtk2 and switch to 3.6.6 to gtk3 if it works good. And I read from changelog it even has fixes for gtk 3.20 in there in 3.6.6 (gtk3.20 not being in tree yet precisely for things needing such fixes for gtk3.20, related to themeing and custom widgets). As GNOME team member, I would very strongly prefer this is done as such with no choice. gtk2 is essentially dead, having packages keep on supporting gtk2 when gtk3 support is as good only makes this corpse linger around as long as gtk1, and we would like to avoid that. USE=gtk2 isn't good here either really, as we consider gtk2 and gtk3 (especially gtk3, but gtk2 is so similar in naming) to be sort of meaning to "Also add gtk3 support in this library, in addition to gtk2 support". I suppose we'll need to raise this discussion globally again, as there's also bug 581662 going on again. Ultimately this is up for the package maintainers till then. Either way, if support for both is kept, I believe the conditionals can be simplified there. For example I don't think you need to say "using gtk2" or "using gtk3" in an einfo there. Maybe it can be just that longer sentence saying one or the other thing if you want to keep any information output at all. Also this emake_pars in global scope seems suspect. I don't think variables should be declared in global scope. Though I guess this has been the case before these changes as well, and is a point to improve on from old versions.
(In reply to Mart Raudsepp from comment #21) > (In reply to Ervin Peters from comment #20) > > conclusion scite-3.6.5-r1.ebuild with gtk2/3 support and gtk3 default > > > > gnome is no good idea, gtk3 support works and should be default according to: > > > > https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#gtk3 > > > > Gtk+2 Support is available via the gtk2 useflag. > > According to that link, and as I described, it should only be having gtk2 > support or gtk3 support, not both. That makes no sense to me. That seems to me an unnecessary limitation from the use flag semantic. And also a hyperfluid approach to limit the software build in case of flexibly software builds, like in this case, where both are working fine. I see the meaning of useflags as a 'prefered choice' when many similar options are available. If there are no choices, than useflags aren't necessary, because than there are dependencies. I don't think that it is useful to use the flags to specify semantics like "Do not use other similar options" - See also the throw out discussion of the 'no-' useflags... gtk means to me using gtk over qt and others. When gtk is set any gtk Version which is available could be supportet, but only on of them must. (gtk+2 || gtk+3) There is an implicit dependency to gtk (no choice) in this package and therefore need not to set via the gtk useflag. gtk2 and gtk3 useflags are a detail gtk+ specification They are clarifying which version to prefer. They include an implicit 'if use gtk then use ..." gtk2 means to me choose gtk+2 over gtk+3 if both are available and the package only supports one of them at a time. gtk3 means to me choose gtk+3 over gtk+2 if both are available and the package only supports one of them at a time. So it seems to me that the semantic and (semantic) useflag relations are not discussed to the end yet, even in this case. ervin > As GNOME team member, I would very strongly prefer this is done as such with > no choice. gtk2 is essentially dead, having packages keep on supporting gtk2 > when gtk3 support is as good only makes this corpse linger around as long as > gtk1, and we would like to avoid that. So there are political reassons which leads you to want an ebuild level choice of gtk+ instead of a useful default and a userlevel option to choose gtk+2. > USE=gtk2 isn't good here either really, as we consider gtk2 and gtk3 > (especially gtk3, but gtk2 is so similar in naming) to be sort of meaning to > "Also add gtk3 support in this library, in addition to gtk2 support". For this meaning it isn't the right useflag name. > I suppose we'll need to raise this discussion globally again, as there's also > bug 581662 going on again. Where it is discussed? > Either way, if support for both is kept, I believe the conditionals can be > simplified there. For example I don't think you need to say "using gtk2" or > "using gtk3" in an einfo there. OK. > Also this emake_pars in global scope seems suspect. I could move it bak to src_compile. ervin
Created attachment 435570 [details] scite-3.6.6.ebuild with gtk2 xor gtk3 support and gtk3 default moved emake_pars to src_compile to avoid a gloabal variable. Removed the einfo which version is used. Setting gtk3 as default and make gtk2 available through the gtk2 useflag. This seems best to me since the cut off of either gtk+2 or gtk+3 support makes unnecessary limitations to users. ervin
viewing the useflag descriptions the gtk2 useflag is mostly used to choose gtk+2 over gtk+3 while gtk+3 is default. So it seems to me the useful, common and straight forward semantic interpretation of gtk[23] useflags. ervin
Don't worry about it. We are discussing it on mailing list and between gnome and qa teams and hope to come to a conclusion this time how to do this. Till then, do what seems best I guess. Once we have a consistent way to do stuff like this (or disallow this still), we can come back to all the packages that do it different and fix things up with a spree of bug reports or fixes, including in scite then.
(In reply to Mart Raudsepp from comment #25) > Don't worry about it. We are discussing it on mailing list and between gnome > and qa teams and hope to come to a conclusion this time how to do this. Any progress? ervin
No, not really. Do as you find appropriate and find other stuff use. Just please don't make use of IUSE=gtk3 for this, as it's used by the gnome team for library cases only. We don't use IUSE=gtk2 for libraries, so that would be fine, but rather confusing, which is my issue here. The discussions died out, I will need to summarize things and move it along once I am done with some more important backlog.
Created attachment 440114 [details] scite-3.6.5-r1.ebuild using only gtk2 To get further on, here is the ebuild which does not allow to switsch gtk+ Version and default to gtk2+. Ervin
Dear Proxy Maintainers, I'd like someone responsible make some decisions. I had pointed out that I'd like to use gtk-3 as default, someone would prefer gtk-2 as default, since the gtk useflags shouldn't be used. We're at V 3.7.2 now. ervin
Upstream released 4.0.0. Both ebuilds should work. Would a proxy-Maintainer kindly decide which one to use? Or give a hint to get further? ervin
https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies stated to use gtk3 as default. An uptodate ebuild is provided in Bug #593542. I'd like to close this bug. ervin