# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/x11-libs/wxGTK/wxGTK-2.4.1-r1.ebuild,v 1.3 2003/10/04 14:01:08 agriffis Exp $ DESCRIPTION="GTK+ version of wxWindows, a cross-platform C++ GUI toolkit." SRC_URI="mirror://sourceforge/wxwindows/${P}.tar.bz2" HOMEPAGE="http://www.wxwindows.org/" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc ~alpha" IUSE="nls odbc opengl gtk2 unicode debug" DEPEND="virtual/x11 media-libs/netpbm media-libs/giflib media-libs/libpng media-libs/jpeg media-libs/tiff sys-libs/zlib odbc? ( dev-db/unixODBC ) opengl? ( virtual/opengl ) gtk2? ( >=x11-libs/gtk+-2.0* ) : ( =x11-libs/gtk+-1.2* ) unicode? ( dev-libs/libunicode )" RDEPEND="nls? ( sys-devel/gettext )" src_unpack() { unpack ${A} epatch ${FILESDIR}/${P}-wxpython1.patch epatch ${FILESDIR}/${P}-wxpython2.patch epatch ${FILESDIR}/${P}-contrib.patch } src_compile() { local myconf myconf="--enable-gif --with-libtiff --with-zlib --with-libpng \ --enable-png --with-libjpeg" #Note: pcx image support enabled by default if found. #Also, all wxWindows gui features are enabled by default. If you #want to build a smaller library you can disable features by adding #the appropriate flags to myconf (see INSTALL.txt). #The build tools include a --with-freetype option, however it doesn't #seem to be implemented in the source yet. # Note: ODBC support does not work with --enable-unicode # We only use --enable-unicode (if at all) when we use # gtk2. if [ `use odbc` ] && [ ! `use gtk2` ]; then myconf="${myconf} --with-odbc" elif [ `use odbc` ] && [ `use gtk2` ]; then ewarn "" einfo "you cannot specify both odbc and gtk2" einfo "Choosing gtk2 over odbc" einfo "re-run with USE=\"-gtk2\" to enable odbc" ewarn "" sleep 5 myconf="${myconf} --without-odbc" else myconf="${myconf} --without-odbc" fi use opengl \ && myconf="${myconf} --with-opengl" \ || myconf="${myconf} --without-opengl" myconf="${myconf} --with-gtk" use gtk2 && myconf="${myconf} --enable-gtk2" if [ `use unicode` ]; then if [ ! `use gtk2` ]; then ewarn "" einfo "Unicode support can be enabled only when compliling" einfo "for GTK2. You don't seem to be doing that, so I'm" einfo "continuing without unicode..." ewarn "" sleep 5 else myconf="${myconf} --enable-unicode" fi fi use debug && myconf="${myconf} --enable-debug" econf ${myconf} emake || die "make failed" cd ${S}/contrib/src emake || die "make contrib failed" } src_install() { einstall || die "install failed" dodoc *.txt cd ${S}/contrib/src einstall || die "install contrib failed" }