Summary: | wxGTK needs to be slotted on the "gtk2" USE-flag | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | bdonlan |
Component: | New packages | Assignee: | Gentoo wxWidgets project <wxwidgets> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | alpeterson, flash3001, ghepeu, leio, mafteah, radek, removed_account |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 51749 | ||
Attachments: |
wxwidgets.eclass
wxGTK-2.4.2-r2.ebuild bochs-2.1.1-r1.ebuild audacity-1.2.1.ebuild wxwidgets.eclass wxGTK-2.4.2-r2.ebuild bochs-2.1.1-r1.ebuild audacity-1.2.1.ebuild amule-2.0.0_rc5.ebuild wxwidgets.eclass amule 2.0.0 rc5 ebuild amule-2.0.0_rc5.ebuild amule-2.0.0_rc5.ebuild |
Description
bdonlan
2004-01-30 20:23:51 UTC
changing a SLOT doesnt mean the package will magically start working the way you want it to ... we'd have to move around libraries so that the GTK1 ones dont overwrite the GTK2 ones ... why not re-emerge the ones that are breaking ? They already have different names - libwx_gtk_* vs libwx_gtk2_* IIRC. I don't know of a way to identify which *installed* packages depend on wxGTK, so I can't easily remerge them. For now, I've switched wxGTK and wxPython back to gtk [wxPython failed to tell me that changing wxGTK would break things when it told me to switch it...] The reason why you can't have multiple instances of wxWidgets (formerly known as wxWindows) easilly installed is wx-config. Maybe we could append the version to wx-config and write a wrapper named wx-config :? Though the possibility of a wrapper sounds quite impossible as configuration scripts just call it, perhaps we could sed/patch programs using wxGTK use a different wx-config, let's say wx-config-gtk2 if a gtk2 USE flag is there? The same goes for unicode builds too. wx-config-gtk2-uni, wx-config gtk1-uni, wx-config-gtk2, wx-config-gtk1 (default, wx-config symlinks to it?)... ? Actually, you _can_ have multiple wxWidgets libraries installed w/o any problems, _as_long_ as you do not install dynamic/static versions over each other. Proof: ls -l /data/wx/dynamic/2.5.2/bin lrwxr-xr-x 1 madcat users 21 Mar 26 07:26 wx-config -> wxx11univd-2.4-config -rwxr-xr-x 1 madcat users 5075 Mar 26 05:04 wxgtk-2.4-config -rwxr-xr-x 1 madcat users 5240 Mar 26 05:10 wxgtk2-2.4-config -rwxr-xr-x 1 madcat users 5239 Mar 26 05:24 wxgtk2d-2.4-config -rwxr-xr-x 1 madcat users 5245 Mar 26 05:15 wxgtk2u-2.4-config -rwxr-xr-x 1 madcat users 5244 Mar 26 05:28 wxgtk2ud-2.4-config -rwxr-xr-x 1 madcat users 5074 Mar 26 05:19 wxgtkd-2.4-config -rwxr-xr-x 1 madcat users 5087 Mar 26 07:26 wxx11univd-2.4-config All working together. There is no need to write some wrapper for wx-config script, since there already is separate wx**-config for each wxWidgets library installed. if someone can come up with a robust scheme for doing this. i'm not a fan of splitting it up into multiple packages. > if someone can come up with a robust scheme for doing this. i'm not a fan of > splitting it up into multiple packages. Why? It is still the same package, only configured differently. Why don't you install both (say) gtk1 and gtk2 versions side by side instead (only if gtk2 flag is used, of course)? There are packages that can work with *any* build of wxGTK, e.g. poEdit, and having multiple packages for same wxGTK library would make writing ebuilds for them quite a hell. That would take care of bug #55658 as well. I think I've come up with a solution. If any of you could test this out and give feedback, I'd appreciate it. I've attached a wxGTK-2.4.2-r2.ebuild which can build up to three libraries: gtk1, gtk2 or gtk2 with unicode. All three can be installed at once, or any 1 or 2, or their debug versions. To get all three versions compiled, emerge it with USE='gtk1 gtk2 unicode" (The gtk1 flag isn't official and will probably be changed soon) I've created a wxwidgets eclass (see attachment) and two test ebuilds that use the eclass. app-emulation/bochs and media-sound/audacity. To use the eclass you "inherit wxwidgets" then use one of the following: need-wxwidgets wx-gtk1 (for gtk) need-wxwidgets wx-gtk2 (for gtk2) need-wxwidgets wx-gtk2u (for gtk2 with unicode) This will then set $WX_CONFIG to the proper /usr/bin/wxgtk-*-config so most wxGTK apps' configure script will pick it up. If you only have debug versions installed, the eclass will find it automatically, theres no separate wx-gtk2d use flag etc. Created attachment 36345 [details]
wxwidgets.eclass
Created attachment 36346 [details]
wxGTK-2.4.2-r2.ebuild
Created attachment 36347 [details]
bochs-2.1.1-r1.ebuild
Created attachment 36348 [details]
audacity-1.2.1.ebuild
unicode is my concern Created attachment 36419 [details]
wxwidgets.eclass
Created attachment 36420 [details]
wxGTK-2.4.2-r2.ebuild
Created attachment 36421 [details]
bochs-2.1.1-r1.ebuild
Created attachment 36423 [details]
audacity-1.2.1.ebuild
Created attachment 36424 [details]
amule-2.0.0_rc5.ebuild
I've simplified wxwidgets.eclass to use the existing gtk, gtk2 or unicode flags instead of new USE flags. Installing wxGTK will always install the gtk version by default, and optionally gtk2 and gtk2+unicode. amule only works with gtk1, and simply needs: inherit wxwidgets need-wxwidgets gtk (in src_compile) Audacity and Bochs don't work with unicode but can use gtk or gtk2. Check the attached ebuilds for examples of using the wxwidgets eclass to take care of this. There are currently two USE flags in /usr/portage/profiles/use.desc, wxwin and wxwindows, both should be removed and replaced with 'wxwidgets'. Comments welcomed. aMule is being tested against gtk2 with masked development snapshot wxGTK 2.5.1 and it seems to work flawlessy for many users, so it could be useful to add a gtk2 USE with a dependency to wxGTK 2.5.1. Could this be done with this new eclass? I read a "export wxgtk_ver=2.4", could this cause problems? >> I read a "export wxgtk_ver=2.4", could this cause problems?
Yes, it will. Its easy to fix though since wxGTK-2.5 will install a /usr/bin/wxconfig-2.5-config. I'll add a function to the eclass to detect if you're running 2.4 or 2.5 and grab the right one.
p.s. I'll add a hard masked 2.5.2 since that is the current development version.
Created attachment 36442 [details]
wxwidgets.eclass
This will detect 2.4 or 2.5 now using:
local wxgtk_ver=`/usr/bin/wx-config --release`
instead of:
local wxgtk_ver='2.4'
Created attachment 36443 [details]
amule 2.0.0 rc5 ebuild
I haven't tried yet but it should be ok, amule-2.0.0_rc5.ebuild with gtk2 USE.
wxGTK 2.5.2 is very different from wxGTK 2.5.1 and AFAIK amule don't work with
it, so it would be better to leave 2.5.1 in portage too, and I I've made amule
depend from =x11-libs/wxGTK-2.5.1 instead of >=x11-libs/wxGTK-2.5.1
Created attachment 36448 [details]
amule-2.0.0_rc5.ebuild
Added a check in pkg_setup to avoid use of both remote and gtk2 USEs, but I'm
not so sure this is the best place to put it.
Created attachment 36552 [details]
amule-2.0.0_rc5.ebuild
fixed wxwidgets.eclass-compliant aMule 2.0.0rc5 ebuild.
tested with wxGTK 2.5.1
tested with wxGTK 2.4.2 too, at present I've got wxPython and vlc compiled with wxGTK linked to gtk2 and amule compiled with wxgtk linked to gtk1. No problem for now. P.S. for vlc no need of workaround like in amule ebuild, configure uses right version just adding "need-wxwidgets gtk" or "need-wxwidgets gtk2" to the ebuild. Ok, the new wxwidgets eclass and wxGTK-2.4.2-r2 are in CVS now. The eclass has more informative error messages. You can have these combinations installed: Just gtk: USE='-gtk2' gtk2 and gtk: USE='gtk2' gtk2 and unicode: USE='gtk2 unicode' If you don't want gtk use USE='no_wxgtk1'. (or alternately 'debug' versions) I added a local use flag to wxGTK (no_wxgtk1) which should give the ultimate flexibility without messing with the intent of the global gtk and gtk2 flags. Giacomo, your last version of amule doesn't look right. If you want to allow any of the three versions (gtk, gtk2 or unicode(gtk2)) change your src_compile like this: if ! use gtk2; then need-wxwidgets gtk || die "gtk version of wxGTK not emerged" elif use unicode; then need-wxwidgets unicode || die "unicode version of wxGTK not emerged" else use gtk2; then need-wxwidgets gtk2 || die "gtk2 version of wxGTK not emerged" fi Make sense? Yes, my fault. I'll submit an ebuild with all three cases in a new bug report. wxGTK 2.5.1 ebuild should be upgraded too. :) What about bittornado? i can't start the gui :( wxPython is either not installed or has not been installed properly. Traceback (most recent call last): File "/usr/bin/btdownloadgui.py", line 24, in ? sys.exit(1) NameError: name 'sys' is not defined try re-emerging wxpython with the USEs you prefer and then re-emerging bittornado +gtk2 works for me nope its not working :( Don't know why, it works for me, http://ghepeu.altervista.org/immagini/bittornado.jpg root@KazeNoTani ghepeu # etcat -u wxpython [ Colour Code : set unset ] [ Legend : (U) Col 1 - Current USE flags ] [ : (I) Col 2 - Installed With USE flags ] U I [ Found these USE variables in : dev-python/wxpython-2.4.2.4 ] + + gtk2 : Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports both. - - unicode : Adds support for Unicode + + opengl : Adds support for OpenGL + + tiff : Adds support for the tiff image format + + jpeg : Adds JPEG image support + + png : Adds support for libpng (PNG images) root@KazeNoTani ghepeu # etcat -u bittornado [ Colour Code : set unset ] [ Legend : (U) Col 1 - Current USE flags ] [ : (I) Col 2 - Installed With USE flags ] U I [ Found these USE variables in : net-p2p/bittornado-0.3.7 ] + + X : Adds support for X11 try a revdep-rebuild. Genady, what happens when you do this from the shell? Any error message? python -c "from wxPython.wx import *" Just a question: can these wxGTK improvements solve that bug ? (http://bugs.gentoo.org/show_bug.cgi?id=58284) I haven't been able to compile mkvtoolnix with a unicode-enabled wxGTK so far Jo Joël, I uploaded a new ebuild and patch for mkvtoolnix on bug #58284. Thanks for the info. nm I found the problem it was bad GTK Closing this. If you find any packages that should use the new wxwidgets eclass please file a separate bug. |