Hi, I just noticed that the USE of gtk and gtk2 USE flags is wrong in freeciv. From use.desc: gtk - Adds support for x11-libs/gtk+ (The GIMP Toolkit) gtk2 - Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports both. And here's what happens (gtk2 is already installed on my system): root@mel freeciv # USE="gtk gtk2" emerge -p freeciv These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild N ] x11-libs/gtk+-1.2.10-r10 [ebuild N ] media-libs/giflib-4.1.0-r3 [ebuild N ] media-libs/tiff-3.6.0 [ebuild N ] media-libs/imlib-1.9.14-r1 [ebuild N ] games-strategy/freeciv-1.14.1_beta1 root@mel freeciv # USE="gtk" emerge -p freeciv These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild N ] x11-libs/gtk+-1.2.10-r10 [ebuild N ] media-libs/giflib-4.1.0-r3 [ebuild N ] media-libs/tiff-3.6.0 [ebuild N ] media-libs/imlib-1.9.14-r1 [ebuild N ] games-strategy/freeciv-1.14.1_beta1 ^[[Aroot@mel freeciv # USE="-gtk gtk2" emerge -p freeciv These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild N ] games-strategy/freeciv-1.14.1_beta1 root@mel freeciv # Expected result is: USE="gtk" emerge freeciv should emerge with gtk 1.x interface USE="gtk2" emerge freeciv should emerge with no interface (server only mode) USE="gtk gtk2" emerge freeciv should emerge with gtk 2.x interface USE="-gtk gtk2" emerge freeciv should emerge with no interface (server only mode) USE="-gtk -gtk2" emerge freeciv should emerge with no interface (server only mode)
Created attachment 19148 [details, diff] Freeciv-gtk.patch This is a patch against the ebuild that should fix the logic. The flow diagram for depencenies in this case are : want gtk? do I prefer gtk2? -- enable gtk2 , disable gtk 1.2 do I not prefer gtk2? -- enable gtk 1.2 , disable gtk2 not? disable both.
I was informed once when I asked Lisa to do the same on the distcc ebuild that it is, the by the developers, preferred way of doing things. gtk to indicated gtk support gtk2 to indicated preference of gtk2 over gtk1 when you have a choice. Thus we can't set -gtk +gtk2 to get a gtk1 free system, since we use gtk to indicate the use of any kind of gtk and only gtk2 when there's a doubt which version the user wants. I tried lobbying at that time to have it changed but I didn't have much luck sadly. Sorry, - Lovechild
yeah, it does seem the current gtk1/gtk2 setup is a little screwy ... i think a better definition would be to have 3 gtk USE flags: gtk: i want gtk baby ! gtk1: i prefer gtk1 gtk2: i prefer gtk2 if you feel like lobbying for something, i would suggest that ... start it up on the gentoo-dev mailing list for now, freeciv wont change ... that is, if you have gtk2 in your USE flags, you're gonna get gtk2 support
Actually This is just the case where we want gtk2 USE flag to work as documented. In cases where -multiple- gtk interfaces are avaiable, the gtk2 flag decides -which- of the two to be installed. In cases where there just is gtk 2 or nothing, it will do just nothing, because the gtk USE flag will decide which of them to use. prettier logic would be this: use gtk && use gtk2 \ && myconf="${myconf} --enable-client=gtk-2.0" \ || myconf="${myconf} --disable-client=gtk-2.0" use gtk \ && myconf="${myconf} --enable-client=gtk --enable-gtktest" \ || myconf="${myconf} --disable-client=gtk --disable-gtktest"
>for now, freeciv wont change ... that is, if you have gtk2 in your USE flags, >you're gonna get gtk2 support You noticed that you _have_ to set '-gtk gtk2' to get gtk2 in freeciv? That breaks almost all other apps I have installed here which support either two gtk version or gtk2 as an additional interface. Best example: distcc If I set USE='-gtk gtk2' to get a updated freeciv (with gtk2), I have to change my USE flags again to get the gtk2 GUI in distcc. Doesnt sound like the best solution IMO.
fixed in cvs then ... if [ `use gtk2` ] ; then myconf="${myconf} --enable-client=gtk-2.0 --enable-gtktest" elif [ `use gtk` ] ; then myconf="${myconf} --enable-client=gtk --enable-gtktest" else myconf="${myconf} --disable-client --disable-gtktest" fi