Gentoo Development Guide
WXWIDGETS.ECLASS
Section: portage (5)Updated: May 2013
Index Return to Main Contents
NAME
wxwidgets.eclass - Manages build configuration for wxGTK-using packages.DESCRIPTION
The wxGTK libraries come in several different possible configurations
(release, debug, ansi, unicode, etc.) most of which can be installed
side-by-side. The purpose of this eclass is to provide ebuilds the ability
to build against a specific type of profile without interfering with the
user-set system configuration.
Ebuilds that use wxGTK _must_ inherit this eclass.
- Using this eclass -
1. set WX_GTK_VER to a valid wxGTK SLOT
2. inherit wxwidgets
3. add an appropriate DEPEND
4. done
WX_GTK_VER="2.8"
inherit wxwidgets
DEPEND="x11-libs/wxGTK:2.8[X]"
RDEPEND="${DEPEND}"
[...]
This will get you the default configuration, which is what you want 99%
of the time (in 2.6 the default is "ansi", all other versions default to
"unicode").
If your package has optional wxGTK support controlled by a USE flag or you
need to use the wxBase libraries (USE="-X") then you should not set
WX_GTK_VER before inherit and instead refer to the need-wxwidgets function
below.
The variable WX_CONFIG is exported, containing the absolute path to the
wx-config file to use. Most configure scripts use this path if it's set in
the environment or accept --with-wx-config="${WX_CONFIG}".
FUNCTIONS
- wxwidgets_pkg_setup
-
It's possible for wxGTK to be installed with USE="-X", resulting in something
called wxBase. There's only ever been a couple packages in the tree that use
wxBase so this is probably not what you want. Whenever possible, use EAPI 2
USE dependencies(tm) to ensure that wxGTK was built with USE="X". This
function is only exported for EAPI 0 or 1 and catches any remaining cases.
If you do use wxBase, don't set WX_GTK_VER before inherit. Use
need-wxwidgets() instead. - need-wxwidgets <configuration>
-
Available configurations are:
[2.6] ansi [>=2.8] unicode
unicode base-unicode
base
base-unicode
If your package has optional wxGTK support controlled by a USE flag, set
WX_GTK_VER inside a conditional rather than before inherit. Some broken
configure scripts will force wxGTK on if they find ${WX_CONFIG} set.src_configure() { if use wxwidgets; then WX_GTK_VER="2.8" if use X; then need-wxwidgets unicode else need-wxwidgets base-unicode fi fi - check_wxuse <USE flag>
-
Provides a consistant way to check if wxGTK was built with a particular USE
flag enabled. A better way is EAPI 2 USE dependencies (hint hint).
MAINTAINERS
wxwidgets@gentoo.org
REPORTING BUGS
Please report bugs via http://bugs.gentoo.org/FILES
/usr/portage/eclass/wxwidgets.eclassSEE ALSO
ebuild(5)http://sources.gentoo.org/eclass/wxwidgets.eclass?view=log
Index
This document was created by man2html, using the manual pages.
Time: 03:25:02 GMT, May 21, 2013