/[gentoo-x86]/net-libs/polarssl/polarssl-1.1.3.ebuild
Gentoo

Contents of /net-libs/polarssl/polarssl-1.1.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Tue Aug 28 18:05:16 2012 UTC (2 years, 2 months ago) by armin76
Branch: MAIN
Changes since 1.6: +2 -2 lines
sparc stable wrt #421479

(Portage version: 2.1.11.5/cvs/Linux ia64)

1 tommy 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 armin76 1.7 # $Header: /var/cvsroot/gentoo-x86/net-libs/polarssl/polarssl-1.1.3.ebuild,v 1.6 2012/06/25 19:10:04 maekke Exp $
4 tommy 1.1
5     EAPI=2
6    
7     inherit eutils toolchain-funcs
8    
9     DESCRIPTION="Cryptographic library for embedded systems"
10     HOMEPAGE="http://polarssl.org/"
11     SRC_URI="http://polarssl.org/code/download/${P}-gpl.tgz"
12    
13     LICENSE="GPL-2"
14     SLOT="0"
15 armin76 1.7 KEYWORDS="amd64 arm hppa ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
16 tommy 1.1 IUSE="examples sse2"
17    
18     src_prepare() {
19     # sed -i '/.SILENT:/d' Makefile */Makefile
20     epatch "${FILESDIR}"/${PN}-1.0.0-makefile.patch
21     cd library
22     if use sse2 ; then
23     sed -i '15iCFLAGS += -DHAVE_SSE2 -fPIC' Makefile
24     else
25     sed -i '15iCFLAGS += -fPIC' Makefile
26     fi
27     }
28    
29     src_compile() {
30     tc-export CC
31     emake -C library libpolarssl.so || die "emake failed"
32    
33     if use examples ; then
34     emake -C programs all || die "emake failed"
35     fi
36     ln -s libpolarssl.so library/libpolarssl.so.0
37     }
38    
39     src_test() {
40     cd programs
41     emake test/selftest || die "emake selftest failed"
42     LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../library" ./test/selftest || die "selftest failed"
43     cd "${S}"
44     LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../library" emake check || die
45     }
46    
47     src_install() {
48     insinto /usr/include/polarssl
49     doins include/polarssl/*.h || die
50     dolib.so library/libpolarssl.so || die
51     ln -s libpolarssl.so "${D}"usr/$(get_libdir)/libpolarssl.so.0
52     dolib.a library/libpolarssl.a || die
53    
54     if use examples ; then
55     for p in programs/*/* ; do
56     if [[ -x "${p}" && ! -d "${p}" ]] ; then
57     f=polarssl_`basename "${p}"`
58     newbin "${p}" "${f}" || die
59     fi
60     done
61     for e in aes hash pkey ssl test ; do
62     docinto "${e}"
63     dodoc programs/"${e}"/*.c || die
64     dodoc programs/"${e}"/*.txt || die
65     done
66     fi
67     }

  ViewVC Help
Powered by ViewVC 1.1.20