Installation problems | Problèmes à l'installation
V10lator, Friday 30 November 2012 à 22:29
|
|
Subscription date : 21 October 2012
Messages : 39
|
@aCOSwt Could you give me a look?
in cores src_configure I do this:
src_configure() {
if use gtk ; then
mycmakeargs=("-Dforce-gtk2=yes")
fi
cmake-utils_src_configure
}
So you can switch between gtk2 and 3 with USE flags (there's a gtk and a gtk3 USE flag. One of it must be set but you can set one only. That's what the REQUIRED_USE line is for).
In src_unpack for plugins (3.1.1.1) I just correct the path, else building fails cause it looks into the wrong path. This is because the unpacked path is cairo-dock-plugins-3.1.1 while portage expects it to be in cairo-dock-plugins-3.1.1.1
in src_prepare I patch it. The first patch is for sandbox, the second changes the cmake file so we can use cmake-utils for mapping USE flags. How does yours handle USE flags? |
aCOSwt, Friday 30 November 2012 à 23:15
|
|
Subscription date : 07 October 2012
Messages : 22
|
@v10lator :
1/ Don't get gtk and gtk3 useflags.
Look how other Gentoo ebuilds do !
Either you choose to depend on gtk2 exclusive or gtk3 => A single use flag is necessary : gtk3
And then in your dependency list :
gtk3? ( x11-libs/gtk+:3 )
!gtk3? ( x11-libs/gtk+:2 )
And of course no need at all to force whatever REQUIRED_USE
I still do not understand the need for force_gtk2
2/ cmake-utils_src_configure...
Well... I cannot really understand why this is needed... anyway... this sort of instruction has nothing to do in an ebuild.
Check by running repoman full in your x11-misc/cairo-dock directory. I would be surprised it his happy.
3/ About the same things with plugins. PLUS :
- What the hell are you unpacking by yourself in src_unpack ? If you need to fiddle the extra .1, fiddle it elsewhere (in SRC_URI for example)
- I really doubt that the gtk dependency is needed you know. Plugins already depends on core and you launch core, so, you'll load gtk.
All this being very quickly said. There might be a little more. |
V10lator, Friday 30 November 2012 à 23:42
|
|
Subscription date : 21 October 2012
Messages : 39
|
aCOSwt : @v10lator :
1/ Don't get gtk and gtk3 useflags.
Look how other Gentoo ebuilds do !
Either you choose to depend on gtk2 exclusive or gtk3 => A single use flag is necessary : gtk3
And then in your dependency list :
gtk3? ( x11-libs/gtk+:3 )
!gtk3? ( x11-libs/gtk+:2 )
And of course no need at all to force whatever REQUIRED_USE
I actually stole that part from other ebuilds that are in the official tree. Can't remember which through.
I still do not understand the need for force_gtk2
Simple: If you have both, gtk2 and gtk3 installed cmake will use gtk3 by default, no matter what your USE flags are. The force flag is in the cmake file for exactly that reason, so we use it.
2/ cmake-utils_src_configure...
Well... I cannot really understand why this is needed... anyway... this sort of instruction has nothing to do in an ebuild.
Check by running repoman full in your x11-misc/cairo-dock directory. I would be surprised it his happy.
Again: How do you handle USE flags? All other ebuilds for cairo-dock don't handle USE flags at all. They have some, but no matter to what you set them, cairo-dock will compile exactly the same (from what is installed, not what USE flags tell).
3/ About the same things with plugins. PLUS :
- What the hell are you unpacking by yourself in src_unpack ? If you need to fiddle the extra .1, fiddle it elsewhere (in SRC_URI for example)
- I really doubt that the gtk dependency is needed you know. Plugins already depends on core and you launch core, so, you'll load gtk.
- I'm unpacking there cause I'm not experienced with ebuilds and that seemed to be a good way to me. If I change SRC_URI I download a different file, which isn't what I want...
- Maybe, but it looks more nice and makes sure the user knows what he does/wants. [EDIT]Also other plugin ebuilds do the same. See media-plugins/audacious-plugins for example.[/EDIT] |
aCOSwt, Saturday 01 December 2012 à 15:42
|
|
Subscription date : 07 October 2012
Messages : 22
|
Fair enough V10lator. I do not want to argue about this.
What I wrote is not to be taken as more than "my 2cts"
If this works for you then great. That is indeed the best that could be written for you.
What I just wanted to highlight is :
1/ If what you make the ebuild do is what I read then : You should write these instructions as part of a bash script and get rid of an EAPI=4 ebuild specification. An EAPI=4 ebuild brings helpers. Either they help or they do not. If they do not (And, in your case, I even think that they add extra constraints you are trying to workaround) then it's better to completely get rid of helpers.
2/ The gtk story is... mmmm... like usual in the open world.
gtk devs want gtk3 to be the standard and default and to drop support for gtk2 as soon as possible.
Many Gentoo ebuilds are written gtk3 only.
Many famous apps remain gtk2.
So..., you want to offer the choice to make your app depend on gtk2 or gtk3.
Why, as an end user, would I want to build a gtk3 compatible app gtk2 ? (Providing no particular bug is noticed under gtk3)
Because I made so that all my apps depend on gtk2 and I do not want all the gtk3 stuff for the sole interest of a single package !
=> In the early days of gtk3, many things were broken... building gtk3 was a possible option and gtk2 the default.
Now things have changed. gtk3 is default and gtk2 an option.
So I mean that if one gets gtk3 installed on his system there is absolutely no sensible reason for him to force the cairo-docks dependency on gtk2. I would even say that it would be stupid.
Then if he decides he absolutely wants this package to depend on gtk2 it is because he does not get gtk3 installed on his system and does not want the ebuild to push it as a dependency. |
V10lator, Saturday 01 December 2012 à 17:12
|
|
Subscription date : 21 October 2012
Messages : 39
|
As told before: I am not that experienced with ebuilds. In fact these are the first ones I really worked with (other than making small changes like adding patches). Also my time is very limited, so I'm glad about any help. We shouldn't try to concurrent, we should try to work together by joining our ebuilds an then resolving errors / design flaws.
Well, my informations may be outdated but AFAIK even GTK devs want to get rid of GTK3 and develop GTK4 as soon as possible cause of various unresolvable flaws in GTK3. So I would bet that there are many people who try to build apps for GTK2 if possible and only use GTK3 for apps that don't support 2 anymore. AFAIK this is also the main reason why so many apps don't support GTK3 at all. Also I think if cairo-dock gives you the choice to choose we shouldn't take it away, choices are always a good thing. |
aCOSwt, Saturday 01 December 2012 à 21:20
|
|
Installation problems | Problèmes à l'installation
|