# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /var/www/www.gentoo.org/raw_cvs/gentoo-x86/net-p2p/amule/amule-1.2.6.ebuild,v 1.4 2004/03/23 16:46:08 augustus Exp $ MY_P=${P/m/M} MY_P=${MY_P/_/} S=${WORKDIR}/${MY_P} DESCRIPTION="aNOTHER wxWindows based eMule P2P Client" HOMEPAGE="http://www.amule.org" SRC_URI="http://download.berlios.de/${PN}/${MY_P}.tar.bz2" RESTRICT="nomirror" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 amd64" IUSE="nls" EXTRA_ECONF="--enable-optimise --disable-debug" DEPEND=">=x11-libs/wxGTK-2.4.2 >=net-ftp/curl-7.11.0 >=dev-libs/crypto++-5.1 >=sys-libs/zlib-1.2.1" pkg_setup() { # GTK2 is unstable and not supported by aMule developers if wx-config --cppflags | grep gtk2 >& /dev/null; then einfo "Compiling ${PN} against wxGTK2 is not supported." die "wxGTK must be re-emerged with USE=-gtk2." fi # aMule doesn't compile against unicoded wxGTK at all. if wx-config --cppflags | grep gtk2u >& /dev/null; then einfo "${PN} will not build if wxGTK was compiled" einfo "with unicode support. If you are using a version of" einfo "wxGTK <= 2.4.2, you must set USE=-gtk2. In newer versions," einfo "you must set USE=-unicode." die "wxGTK must be re-emerged without unicode suport" fi } src_unpack() { unpack ${A} # Official patch from aMule devs: # Fixes serious networking-related crashes EPATCH_OPTS="-d ${S}/src" epatch ${FILESDIR}/${PN}-2.0.0_rc1-crashfix.patch } src_compile() { econf `use_enable nls` || die emake -j1 || die } src_install() { make DESTDIR=${D} install || die }