diff options
author | 2010-08-27 14:25:23 +0000 | |
---|---|---|
committer | 2010-08-27 14:25:23 +0000 | |
commit | 644a904c9ab385da2bd92ad76b6abe87d05c0857 (patch) | |
tree | 9293d31c80cd2259bbcf8bc79b3b2dd8657ea5f1 /net-libs/polarssl/polarssl-0.14.0.ebuild | |
parent | Automated update of use.local.desc (diff) | |
download | gentoo-2-644a904c9ab385da2bd92ad76b6abe87d05c0857.tar.gz gentoo-2-644a904c9ab385da2bd92ad76b6abe87d05c0857.tar.bz2 gentoo-2-644a904c9ab385da2bd92ad76b6abe87d05c0857.zip |
Version bump, fixes bug 334803
(Portage version: 2.2_rc69-r1/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/polarssl/polarssl-0.14.0.ebuild')
-rw-r--r-- | net-libs/polarssl/polarssl-0.14.0.ebuild | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/net-libs/polarssl/polarssl-0.14.0.ebuild b/net-libs/polarssl/polarssl-0.14.0.ebuild new file mode 100644 index 000000000000..22edb000997d --- /dev/null +++ b/net-libs/polarssl/polarssl-0.14.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/polarssl/polarssl-0.14.0.ebuild,v 1.1 2010/08/27 14:25:23 tommy Exp $ + +EAPI=2 + +inherit eutils + +DESCRIPTION="Cryptographic library for embedded systems" +HOMEPAGE="http://polarssl.org/" +SRC_URI="http://polarssl.org/code/download/${P}-gpl.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="examples sse2" + +src_prepare() { + cd library + if use sse2 ; then + sed -i '15iCFLAGS += -DHAVE_SSE2 -fPIC' Makefile + else + sed -i '15iCFLAGS += -fPIC' Makefile + fi + sed -i "s:-shared:-shared ${LDFLAGS}:g" library/Makefile + epatch "${FILESDIR}"/${P}-{makefile,ldflags}.patch +} + +src_compile() { + cd library + emake libpolarssl.so || die "emake failed" + + if use examples ; then + cd programs + emake all || die "emake failed" + fi +} + +src_test() { + cd "${S}"/programs + emake test/selftest || die "emake selftest failed" + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../library" ./test/selftest || die "selftest failed" + cd "${S}" + emake check || die +} + +src_install() { + insinto /usr/include/polarssl + doins include/polarssl/*.h || die + dolib.so library/libpolarssl.so || die + dolib.a library/libpolarssl.a || die + + if use examples ; then + for p in programs/*/* ; do + if [[ -x "${p}" && ! -d "${p}" ]] ; then + f=polarssl_`basename "${p}"` + newbin "${p}" "${f}" || die + fi + done + for e in aes hash pkey ssl test ; do + docinto "${e}" + dodoc programs/"${e}"/*.c || die + dodoc programs/"${e}"/*.txt || die + done + fi +} |