Broken DEPEND logic Just.. What is going on here? DEPEND="virtual/x11 gtk? ( =x11-libs/gtk+-1.2* nls? ( sys-devel/gettext ) ) || ( !nopixbuf? ( media-libs/gdk-pixbuf ) imlib? ( media-libs/imlib ) gtk2? ( =x11-libs/gtk+-2* ) virtual/x11 ) truetype? ( =media-libs/freetype-2* ) bidi? ( dev-libs/fribidi )" Explain please.
I committed mlterm-2.8.0.ebuild and it has following DEPEND: DEPEND="virtual/x11 gtk? ( gtk2? >=x11-libs/gtk+-2.0.8 : >=media-libs/gdk-pixbuf-0.18.0 ) !gtk? ( imlib? >=media-libs/imlib-1.9.14 ) truetype? ( >=media-libs/freetype-2.1.2 ) nls? ( >=dev-libs/fribidi-0.10.4 )" I think this is correct syntax for gtk (though gdk-pixbuf doesn't equal to gtk1 but pulls gtk1 in). mlterm-2.8.0_p1.ebuild was user submitted ebuild and I think corrupted DEPEND came from that. nakano, do you have any idea on it?
I talked to nakano yesterday and committed out the change in DEPEND. Now it has the following syntax: DEPEND="gnome? ( gtk? ( gtk2? ( =x11-libs/gtk+-2* ) ) : ( >=media-libs/gdk-pixbuf-0.18.0 ) ) !gnome? ( imlib? >=media-libs/imlib-1.9.14 : virtual/x11 )"
the : syntax is deprecated ( talk to carpaski )
I see. I recalled he talked about it on mailing list. I rewrite DEPEND to DEPEND="gnome? ( gtk? ( gtk2? ( =x11-libs/gtk+-2* ) !gtk2? ( >=media-libs/gdk-pixbuf-0.18.0 ) ) !gtk? ( >=media-libs/gdk-pixbuf-0.18.0 ) ) !gnome? ( imlib? ( >=media-libs/imlib-1.9.14 ) )" Is it okay?
you have to watch out that !gtk still pulls in gtk because gdk-pixbuf depends on gnome-base/gnome-libs which in turn depends on x11-libs/gtk+-1.2 i'm not familiar with mlterm, but why is there suddenly a usage of !gnome? does it pull anything extra if you have the "gnome" USE flag?
It's not semantically correct as you suggested. I intend to make mlterm depend on x11-libs/gtk+-2 (contains gdk-pixbuf2) only when you have USE="gtk gtk2 gnome". gdk-pixbuf is not "GTK+ Image Library" but "GNOME Image Library", I think mlterm should respect gnome USE flag rather than gtk USE flag. If I add gdk-pixbuf local USE flag and write in this way (we need to add gtk? and !gtk? around gtk2 USE flag to follow syntax strictly), does it make more sense? DEPEND="gdk-pixbuf? ( gtk2? ( =x11-libs/gtk+-2* ) !gtk2? ( >=media-libs/gdk-pixbuf-0.18.0 ) ) !gdk-pixbuf? ( imlib? ( >=media-libs/imlib-1.9.14 ) )" (mlterm could use either gdk-pixbuf2, gdk-pixbuf1 or imlib) Any comments?
I dislike the latter version because it obscures the gtk2 variable (you suddenly MUST set a local variable to get a gtk2 interface? erm , what? And the only reason why gdk-pixbuf is the "gnome" library right now (it isn't in reality) is because if it doesn't link to gnome-libs gnome software can't build to it, so its a hard dep because we cannot depend on "gdk-pixbuf compiled with gnome useflag" , therefore its a hard dep. This will be fixed as soon as carpaski unbreaks portage ;) Try this one instead : gtk? ( gtk2? ( >=x11-base/gtk+-2 ) !gtk2? ( media-libs/gdk-pixbuf ) ) !gtk ( >=media-libs/imlib-1.9.14 )
(( btw, the functionality that gdk provides is to embed image objects in gtk+ programs, nothing more really ))
Thanks for the comment. I basically follow your instruction, so DEPEND="gtk? ( gtk2? ( >=x11-libs/gtk+-2 ) !gtk2? ( media-libs/gdk-pixbuf ) =x11-libs/gtk+-1.2* ) !gtk? ( imlib? ( >=media-libs/imlib-1.9.14 ) )" is okay? The reason why I put =x11-libs/gtk+-1.2* is that mlterm configuration tool (mlconfig) depends on it (mlterm itself doesn't need =x11-libs/gtk+-1.2* if we configure mlterm with either gdk-pixbuf2, imlib or no imagelib).
that looks alright to me ... its unfortunate that it still depends on gtk+1, but you can't really do anything about that if upstream still uses gtk+1 for the config prog.
Yeah, too bad that the configure is broken in that sense.. However, for Runtime this isn't necessary, so Would this work properly: RDEPEND="gtk? ( gtk2? ( >=x11-libs/gtk+-2 ) !gtk2? ( media-libs/gdk-pixbuf ) ) !gtk? ( imlib? ( >=media-libs/imlib-1.9.14 ) )" DEPEND="gtk? ( =x11-libs/gtk+-1.2* ) ${RDEPEND}" Since that would eliminate the gtk-1.2 dependency for other than compilation. (Not that most users will note the difference though ;)
Hum, mlconfig is not a configure script but is invoked when you press Ctrl + Mouse right button. You can change encodings, XIM, fonts, bidi, background and many others with GUI on the fly (I'm sure mlconfig is one of the best features of mlterm). mlconfig depends on GTK+ 1 while mlterm depends either gdk-pixbuf2, gdk-pixbuf1 or imlib. I don't think we should remove GTK+ 1 dependency even if gtk2 is specified. rico% ldd /usr/bin/mlterm libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x4002c000) libm.so.6 => /lib/libm.so.6 (0x40041000) libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x40063000) libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x40098000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x4009c000) libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x40106000) libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x40118000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x4011f000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x413fe000) libz.so.1 => /usr/lib/libz.so.1 (0x40148000) libexpat.so.0 => /usr/lib/libexpat.so.0 (0x41496000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40158000) libmkf.so.13 => /usr/lib/libmkf.so.13 (0x40230000) libkik.so.9 => /usr/lib/libkik.so.9 (0x403ba000) libdl.so.2 => /lib/libdl.so.2 (0x403c3000) libutil.so.1 => /lib/libutil.so.1 (0x403c6000) libc.so.6 => /lib/libc.so.6 (0x403c9000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x404f6000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) rico% ldd /usr/libexec/mlconfig libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x4002c000) libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x40183000) libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x401c1000) libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x401c4000) libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x401ea000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x401f3000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40200000) libm.so.6 => /lib/libm.so.6 (0x402d7000) libkik.so.9 => /usr/lib/libkik.so.9 (0x402f9000) libdl.so.2 => /lib/libdl.so.2 (0x40302000) libutil.so.1 => /lib/libutil.so.1 (0x40305000) libc.so.6 => /lib/libc.so.6 (0x40309000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
okay, great. now its documented :) Can you please put a note on that in the ebuild so we won't have more confusion like this?
Sure. I put a comment in ebuilds and ChangeLog. Thanks for the guidance. (Now I realise why you felt confused ... I didn't mention mlconfig and the like before) Hope this will clarify the situation and the upstream authors write gtk+2 version of mlconfig ;-)