Gentoo Development Guide

WXWIDGETS.ECLASS

Section: portage (5)
Updated: Jul 2014
Index Return to Main Contents
 

NAME

wxwidgets.eclass - Manages build configuration for wxGTK-using packages.  

DESCRIPTION


 This eclass gives ebuilds the ability to build against a specific wxGTK
 SLOT and profile without interfering with the system configuration.  Any
 ebuild with a x11-libs/wxGTK dependency must use this eclass.


 There are two ways to do it:


   - set WX_GTK_VER before inheriting the eclass
   - set WX_GTK_VER and call need-wxwidgets from a phase function


 (where WX_GTK_VER is the SLOT you want)


 If your package has optional support for wxGTK (ie. by a USE flag) then
 you should use need-wxwidgets.  This is important because some packages
 will force-enable wxGTK if they find WX_CONFIG set in the environment.

     inherit wxwidgets

     IUSE="X wxwidgets"
     DEPEND="wxwidgets? ( x11-libs/wxGTK:2.8[X?] )"

     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
         econf --with-wx-config="${WX_CONFIG}"
     }

That's about as complicated as it gets. 99% of ebuilds can get away with:

     inherit wxwidgets
     DEPEND="wxwidgets? ( x11-libs/wxGTK:2.8[X] )
     ...
     WX_GTK_VER=2.8 need-wxwidgets unicode

Note: unless you know your package works with wxbase (which is very doubtful), always depend on wxGTK[X].  

FUNCTIONS

need-wxwidgets <profile>


 Available configurations are:


   unicode       (USE="X")
   base-unicode  (USE="-X")

 

MAINTAINERS

 wxwidgets@gentoo.org
 

REPORTING BUGS

Please report bugs via http://bugs.gentoo.org/  

FILES

/usr/portage/eclass/wxwidgets.eclass  

SEE ALSO

ebuild(5)
http://sources.gentoo.org/eclass/wxwidgets.eclass?view=log


 

Index

NAME
DESCRIPTION
FUNCTIONS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:25:08 GMT, July 22, 2014