# Copyright 2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ # Comments/fixes to lloyd@randombit.net DESCRIPTION="A C++ crypto library" HOMEPAGE="http://botan.randombit.net/" SRC_URI="http://botan.randombit.net/files/Botan-${PV}.tgz" # Since right now it doesn't exist on the mirrors RESTRICT="nomirror" KEYWORDS="~x86" SLOT="0" LICENSE="BSD" IUSE="ssl zlib debug" S="${WORKDIR}/Botan-${PV}" RDEPEND="virtual/glibc >=app-arch/bzip2-1.0.1 zlib? ( >=sys-libs/zlib-1.1.4 ) gmp? ( >=dev-libs/gmp-4.1.2 ) ssl? ( >=dev-libs/openssl-0.9.7d )" # configure.pl requires DirHandle, Getopt::Long, File::Spec, and File::Copy; # all seem included in dev-lang/perl ATM. DEPEND="virtual/glibc >=app-arch/bzip2-1.0.1 zlib? ( >=sys-libs/zlib-1.1.4 ) gmp? ( >=dev-libs/gmp-4.1.2 ) ssl? ( >=dev-libs/openssl-0.9.7d ) dev-lang/perl" src_compile() { # Modules that should work under any semi-modern Unix modules="alloc_mmap,es_egd,es_ftw,es_unix,fd_unix,ml_unix,tm_unix" # Modules that should work under any semi-recent Linux kernel/glibc combo, # plus bzip2, which we assume/force to be installed. modules="$modules,tm_posix,mux_pthr,comp_bzip2" if [ `use zlib` ]; then modules="$modules,comp_zlib" fi if [ `use gmp` ]; then modules="$modules,eng_gmp" fi if [ `use ssl` ]; then modules="$modules,eng_ossl" fi # Also supported on i586+, sparcv9 - how to test for these? #if [ ${ARCH} = 'alpha' -o ${ARCH} = 'amd64' ]; then # modules="$modules,tm_hard" #fi # Also works on mips64 if [ ${ARCH} = 'alpha' -o ${ARCH} = 'amd64' -o \ ${ARCH} = 'ia64' -o ${ARCH} = 'ppc64' ]; then modules="$modules,mp_asm64" fi # This may not work right, depending on what CHOST is. Works for i?86 and # many others though. CHOSTARCH=$(echo ${CHOST} | cut -d - -f 1) cd ${S} einfo "Enabling modules: " $(echo $modules | sed 's/,/ /g') ./configure.pl --noauto gcc-linux-$CHOSTARCH --modules=$modules || die "configure.pl failed" emake "LIB_OPT=${CXXFLAGS}" "MACH_OPT=" || die "emake failed" # 1.3.13, check --validate doesn't return a useful error code; 1.3.14+ will # if use debug; then # ./check --validate || die "./check --validate failed" # fi } src_install() { make INSTALLROOT="${D}/usr" install || die "make install failed" }