# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="1" inherit eutils subversion DESCRIPTION="OpenOCD - Open On-Chip Debugger" HOMEPAGE="http://openocd.berlios.de/web/" ESVN_REPO_URI="http://svn.berlios.de/svnroot/repos/${PN}/trunk" SRC_URI="" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="+ft2232 -libftdi +ftd2xx +parport -amontec -ep93 -at91 -usbprog -gw -presto -parport_ppdev -parport_giveio" S="${WORKDIR}/trunk" DEPEND="ftd2xx? ( dev-embedded/libftd2xx )" RDEPEND="libftdi? ( dev-embedded/libftdi )" pkg_setup () { if use libftdi && use ftd2xx; then eerror "openocd can't be built with both libftdi AND ftd2xx." eerror "please disable either one of those useflags and try again" die "Incomplatible useflags!" fi if use presto || use ft2232; then if ! use libftdi && ! use ftd2xx; then eerror "You must have either libftdi or ftd2xx enabled if" eerror "you want presto or ft2232!" die "Incompatible useflags!" fi fi ewarn "Checks are only made against libftdi and ftd2xx!" ewarn "You are responsible to verify you have the drivers" ewarn "for any other devices you enable!" } src_compile () { cd "${S}" ./bootstrap || die "Can't bootstrap!" # Check which interfaces are enabled: if use presto; then PRESTO="$(use_enable libftdi presto_libftdi) $(use_enable ftd2xx presto_ftd2xx)" fi if use ft2232; then F2232="$(use_enable libftdi ft2232_libftdi) $(use_enable ftd2xx ft2232_ftd2xx)" fi INTERFACES="$(use_enable oocd_trace) $(use_enable parport_ppdev) \ $(use_enable parport) $(use_enable amontec amtjtagaccel) \ $(use_enable ep93 ep93xx) $(use_enable at91 at91rm9200) \ $(use_enable gw gw16012) $(use_enable usbprog) $(use_enable parport_giveio) \ ${PRESTO} ${F2232}" econf ${INTERFACES} || die "Error in econf!" emake || die "Error in emake!" } src_install () { cd "${S}/build" emake DESTDIR="$D" install }