Gentoo Archives: gentoo-commits

From: Alon Bar-Lev <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/botan/
Date: Sat, 02 Dec 2017 19:17:14
Message-Id: 1512242224.cd809379af788713dd6525d4603d35d11705b298.alonbl@gentoo
1 commit: cd809379af788713dd6525d4603d35d11705b298
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 2 19:16:39 2017 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 2 19:17:04 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd809379
7
8 dev-libs/botan: add live ebuild
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.3
11
12 dev-libs/botan/botan-9999.ebuild | 96 ++++++++++++++++++++++++++++++++++++++++
13 1 file changed, 96 insertions(+)
14
15 diff --git a/dev-libs/botan/botan-9999.ebuild b/dev-libs/botan/botan-9999.ebuild
16 new file mode 100644
17 index 00000000000..b0a36a56bd4
18 --- /dev/null
19 +++ b/dev-libs/botan/botan-9999.ebuild
20 @@ -0,0 +1,96 @@
21 +# Copyright 1999-2017 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI="6"
25 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
26 +
27 +inherit multilib python-r1 toolchain-funcs
28 +inherit git-r3
29 +
30 +DESCRIPTION="A C++ crypto library"
31 +HOMEPAGE="http://botan.randombit.net/"
32 +EGIT_REPO_URI="https://github.com/randombit/botan"
33 +
34 +KEYWORDS=""
35 +SLOT="2/3" # soname version
36 +LICENSE="BSD"
37 +IUSE="bindist doc boost python bzip2 libressl lzma sqlite ssl static-libs zlib"
38 +REQUIRED_USE="python? ( boost ) boost? ( ${PYTHON_REQUIRED_USE} )"
39 +
40 +RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 )
41 + zlib? ( >=sys-libs/zlib-1.2.3 )
42 + boost? ( ${PYTHON_DEPS} >=dev-libs/boost-1.48[python?,${PYTHON_USEDEP}] )
43 + lzma? ( app-arch/xz-utils )
44 + sqlite? ( dev-db/sqlite:3 )
45 + ssl? (
46 + !libressl? ( dev-libs/openssl:0=[bindist=] )
47 + libressl? ( dev-libs/libressl:0= )
48 + )"
49 +DEPEND="${RDEPEND}
50 + dev-lang/python:*
51 + doc? ( dev-python/sphinx )"
52 +
53 +src_prepare() {
54 + default
55 + use python && python_copy_sources
56 +}
57 +
58 +src_configure() {
59 + local disable_modules=( proc_walk unix_procs )
60 + use boost || disable_modules+=( "boost" )
61 + use bindist && disable_modules+=( "ecdsa" )
62 + use python || disable_modules+=( "ffi" )
63 + elog "Disabling modules: ${disable_modules[@]}"
64 +
65 + # Enable v9 instructions for sparc64
66 + if [[ "${PROFILE_ARCH}" = "sparc64" ]]; then
67 + CHOSTARCH="sparc32-v9"
68 + else
69 + CHOSTARCH="${CHOST%%-*}"
70 + fi
71 +
72 + local myos=
73 + case ${CHOST} in
74 + *-darwin*) myos=darwin ;;
75 + *) myos=linux ;;
76 + esac
77 +
78 + local pythonvers=()
79 + if use python; then
80 + append() {
81 + pythonvers+=( ${EPYTHON/python/} )
82 + }
83 + python_foreach_impl append
84 + fi
85 +
86 + CXX="$(tc-getCXX)" AR="$(tc-getAR)" ./configure.py \
87 + --prefix="${EPREFIX}/usr" \
88 + --libdir=$(get_libdir) \
89 + --docdir=share/doc \
90 + --cc=gcc \
91 + --os=${myos} \
92 + --cpu=${CHOSTARCH} \
93 + --with-endian="$(tc-endian)" \
94 + --without-doxygen \
95 + $(use_with bzip2) \
96 + $(use_with lzma) \
97 + $(use_with sqlite sqlite3) \
98 + $(use_with ssl openssl) \
99 + $(use_with zlib) \
100 + $(use_with boost) \
101 + $(use_with doc sphinx) \
102 + $(use_with doc documentation) \
103 + $(use_enable static-libs static-library) \
104 + --with-python-version=$(IFS=","; echo "${pythonvers[*]}" ) \
105 + --disable-modules=$(IFS=","; echo "${disable_modules[*]}" ) \
106 + || die "configure.py failed"
107 +}
108 +
109 +src_test() {
110 + LD_LIBRARY_PATH="${S}" ./botan-test || die "Validation tests failed"
111 +}
112 +
113 +src_install() {
114 + default
115 + use python && python_foreach_impl python_optimize
116 +}