Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/botan/
Date: Thu, 08 Oct 2020 23:12:03
Message-Id: 1602198715.a6e120bd426b5f8f4d7f015a2a8515c86c3369c0.sam@gentoo
1 commit: a6e120bd426b5f8f4d7f015a2a8515c86c3369c0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 8 23:11:12 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 8 23:11:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6e120bd
7
8 dev-libs/botan: bump to 2.16.0
9
10 Package-Manager: Portage-3.0.4, Repoman-3.0.1
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-libs/botan/Manifest | 1 +
14 dev-libs/botan/botan-2.16.0.ebuild | 130 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 131 insertions(+)
16
17 diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest
18 index a5442d2b4ff..e546b0b57c9 100644
19 --- a/dev-libs/botan/Manifest
20 +++ b/dev-libs/botan/Manifest
21 @@ -1,2 +1,3 @@
22 DIST Botan-2.14.0.tar.xz 5958948 BLAKE2B 90e73945b22f6e4e8d6163bfb45eca153eb1495448f8bf35514b780fd12bb1b81c822314e1f598c7625277f1e9cf7a6265387cca80ffd4c2664c681b9d4807fd SHA512 ee15928ecdb0127720b444b0207d46fd68fe3007125b0deb8bdd32f96e9befb684ad54009354da4f6a3c48b9698693b46223710a47fd644da8760dda53d40d34
23 DIST Botan-2.15.0.tar.xz 5920688 BLAKE2B 1bbb9cadb0f754194851bddf8b14dbcd291285c5f3fbaad35920277a11c3d9e1b1e5cc484c0d37b1c7999b3084a1c90da56631df0b07e788372b95aff5197031 SHA512 0965a0a6141df44e38bd7da038b89dd2b3808ed9a4ebaafbf089abf60718e62cba78d7b64eaf272b5df8c5a489222e4cad4fb511cde38e76cdaed87f35896c18
24 +DIST Botan-2.16.0.tar.xz 5938644 BLAKE2B a4b7bb48aee0dbf0f8b81a407b6a39707c3e6040a2bb93f9c34208ab87ea64879b2e56af66f090a73d66b64156e333c89e490d206e666e665a5eb4fbcd98d13e SHA512 12550425c695119d7f448a47b7956565de373e1bc86b8fdfa0a2a5b9fed1ef93a36101b6480e7a2f78e9262c988904c353fa021b681543691d09bf5b00495bd4
25
26 diff --git a/dev-libs/botan/botan-2.16.0.ebuild b/dev-libs/botan/botan-2.16.0.ebuild
27 new file mode 100644
28 index 00000000000..17cef74104b
29 --- /dev/null
30 +++ b/dev-libs/botan/botan-2.16.0.ebuild
31 @@ -0,0 +1,130 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{7,8} )
38 +
39 +inherit python-r1 toolchain-funcs
40 +
41 +MY_P="Botan-${PV}"
42 +
43 +DESCRIPTION="C++ crypto library"
44 +HOMEPAGE="https://botan.randombit.net/"
45 +SRC_URI="https://botan.randombit.net/releases/${MY_P}.tar.xz"
46 +S="${WORKDIR}/${MY_P}"
47 +
48 +LICENSE="BSD-2"
49 +SLOT="2/$(ver_cut 1-2)" # soname version
50 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos"
51 +IUSE="bindist bzip2 boost doc libressl lzma python sqlite ssl static-libs zlib"
52 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
53 +
54 +BDEPEND="
55 + ${PYTHON_DEPS}
56 + $(python_gen_any_dep '
57 + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
58 + ')
59 +"
60 +
61 +# NOTE: Boost is needed at runtime too for the CLI tool.
62 +DEPEND="
63 + boost? ( >=dev-libs/boost-1.48:= )
64 + bzip2? ( >=app-arch/bzip2-1.0.5:= )
65 + lzma? ( app-arch/xz-utils:= )
66 + python? ( ${PYTHON_DEPS} )
67 + ssl? (
68 + !libressl? ( dev-libs/openssl:0=[bindist=] )
69 + libressl? ( dev-libs/libressl:0= )
70 + )
71 + sqlite? ( dev-db/sqlite:3= )
72 + zlib? ( >=sys-libs/zlib-1.2.3:= )
73 +"
74 +
75 +RDEPEND="${DEPEND}"
76 +
77 +# NOTE: Considering patching Botan?
78 +# Please see upstream's guidance:
79 +# https://botan.randombit.net/handbook/packaging.html#minimize-distribution-patches
80 +
81 +python_check_deps() {
82 + if use doc ; then
83 + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" || return 1
84 + fi
85 +}
86 +
87 +src_configure() {
88 + local disable_modules=()
89 + use boost || disable_modules+=( "boost" )
90 + use bindist && disable_modules+=( "ecdsa" )
91 + elog "Disabling module(s): ${disable_modules[@]}"
92 +
93 + # Enable v9 instructions for sparc64
94 + local chostarch="${CHOST%%-*}"
95 + if [[ "${PROFILE_ARCH}" = "sparc64" ]] ; then
96 + chostarch="sparc32-v9"
97 + fi
98 +
99 + local myos=
100 + case ${CHOST} in
101 + *-darwin*) myos=darwin ;;
102 + *) myos=linux ;;
103 + esac
104 +
105 + case ${CHOST} in
106 + hppa*) chostarch=parisc ;;
107 + esac
108 +
109 + local pythonvers=()
110 + if use python ; then
111 + _append() {
112 + pythonvers+=( ${EPYTHON/python/} )
113 + }
114 +
115 + python_foreach_impl _append
116 + fi
117 +
118 + # Don't install Python bindings automatically
119 + # (do it manually later in the right place)
120 + # https://bugs.gentoo.org/723096
121 + local myargs=(
122 + $(use_enable static-libs static-library)
123 + $(use_with boost)
124 + $(use_with bzip2)
125 + $(use_with doc documentation)
126 + $(use_with doc sphinx)
127 + $(use_with lzma)
128 + $(use_with sqlite sqlite3)
129 + $(use_with ssl openssl)
130 + $(use_with zlib)
131 + $(usex hppa --without-stack-protector '')
132 + --cpu=${chostarch}
133 + --disable-modules=$( IFS=","; echo "${disable_modules[*]}" )
134 + --docdir=share/doc
135 + --libdir=$(get_libdir)
136 + --os=${myos}
137 + --distribution-info="Gentoo ${PVR}"
138 + --prefix="${EPREFIX}/usr"
139 + --with-endian="$(tc-endian)"
140 + --with-python-version=$( IFS=","; echo "${pythonvers[*]}" )
141 + --without-doxygen
142 + --no-install-python-module
143 + )
144 +
145 + tc-export CC CXX AR
146 +
147 + ./configure.py "${myargs[@]}" || die "configure.py failed"
148 +}
149 +
150 +src_test() {
151 + LD_LIBRARY_PATH="${S}" ./botan-test || die "Validation tests failed"
152 +}
153 +
154 +src_install() {
155 + default
156 +
157 + # Manually install the Python bindings (bug #723096)
158 + if use python ; then
159 + python_foreach_impl python_domodule src/python/botan2.py
160 + fi
161 +}