# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-libs/beecrypt/beecrypt-4.1.2-r2.ebuild,v 1.3 2007/02/07 19:47:17 sanchan Exp $ inherit flag-o-matic eutils multilib autotools java-pkg-opt-2 DESCRIPTION="general-purpose cryptography library" HOMEPAGE="http://sourceforge.net/projects/beecrypt" SRC_URI="mirror://sourceforge/beecrypt/${P}.tar.gz" LICENSE="LGPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" IUSE="java nocxx python threads doc" COMMONDEPEND="python? ( >=dev-lang/python-2.2 ) ! epatch "${FILESDIR}/${P}-base64.patch" eautoreconf } src_compile() { local myarch=$(get-flag march) [[ -z ${myarch} ]] && myarch=${CHOST%%-*} [[ ${myarch} == "athlon64" || ${myarch} == "k8" || ${myarch} == "opteron" || ${myarch} == "athlon-fx" ]] && \ [[ ${CHOST%%-*} != "x86_64" ]] && myarch=${CHOST%%-*} replace-flags pentium4m pentium4 econf \ $(use_enable threads) \ $(use_with !nocxx cplusplus) \ $(use_with java) \ $(use_with python) \ --with-arch=${myarch} \ --libdir=/usr/$(get_libdir) \ || die emake || die "emake failed" use doc && doxygen } src_test() { export BEECRYPT_CONF_FILE=${T}/beecrypt-test.conf echo provider.1=${S}/c++/provider/.libs/base.so > ${BEECRYPT_CONF_FILE} make check || die "self test failed" make bench || die "self benchmark test failed" } src_install() { emake DESTDIR="${D}" install || die "make install failed" # Not needed rm -f "${D}"/usr/$(get_libdir)/python*/site-packages/_bc.*a dodoc BUGS README BENCHMARKS NEWS || die "dodoc failed" if use doc ; then dohtml -r docs/html/. || die "dohtml failed" fi }