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/, dev-libs/botan/files/
Date: Thu, 01 Dec 2016 19:09:30
Message-Id: 1480619358.14ab24951ea392b9e8c62aa3441ac050d6ecdf58.alonbl@gentoo
1 commit: 14ab24951ea392b9e8c62aa3441ac050d6ecdf58
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 1 19:07:58 2016 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 1 19:09:18 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14ab2495
7
8 dev-libs/botan: version bump
9
10 Bug: 601344
11
12 Package-Manager: portage-2.3.0
13
14 dev-libs/botan/Manifest | 1 +
15 dev-libs/botan/botan-1.10.14.ebuild | 154 +++++++++++++++++++++++++
16 dev-libs/botan/files/botan-1.10.14-build.patch | 26 +++++
17 3 files changed, 181 insertions(+)
18
19 diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest
20 index de8009a..d5f8885 100644
21 --- a/dev-libs/botan/Manifest
22 +++ b/dev-libs/botan/Manifest
23 @@ -1,3 +1,4 @@
24 DIST Botan-1.10.12.tgz 2707397 SHA256 affc3a79919577943f896e64d3e4a4dcc4970c5bf80cc98c7f3a3144745eac27 SHA512 074ed9c89d715ada53a3366139da3f0f2fd7ee01941d301b0a9c1a897927ed88c0ade32f66768091664e6b652b7921b3b4c513106ee6ce1942dece3a25216bf5 WHIRLPOOL bfe7029e5ebf660434b14cd49e0c9f4612e9ee88ad50803edfa589754bede01dc39d71542b62eaaa0f7e85dbf623b4b11a90528bcb903c2333103685ce91401f
25 DIST Botan-1.10.13.tgz 2710181 SHA256 23ec973d4b4a4fe04f490d409e08ac5638afe3aa09acd7f520daaff38ba19b90 SHA512 a09d2cb5dda21bf384b81675025f249abdfe232c95dc3383f0baebc2bf1603b2ed1e2aec9a81aae95df592ec2eeae8906c63474a6da42ad3701669a5d8f14656 WHIRLPOOL 4161d689205f02ed8b97bb371be47829d11dee744a024e24bb834264cfa6143c8a9fb7df969410975e4bf2b708063e3c05b6106c4dbe7f5566e3331ee5e901a9
26 +DIST Botan-1.10.14.tgz 2710757 SHA256 10ed0b394db165733ac9557d8656356b7e9744d38c61c2b9c44cba6d84ff4c1c SHA512 ae524653a99b02d6d8d7bb2b88a446c066fe1044d8fd2708ea2a4cd5aafbe2b0d165d2ce1730669a4df18013cf5b6540bb5944bafea512b4957e3417de512e95 WHIRLPOOL 51aa1d68757ad515f65c255c585be8050efed085800340d43fa068b48647ef8c50fc9e284ac16d0cef3d874f5fa44f143210dcc004561807e1d1b307d89cff9d
27 DIST Botan-1.11.33.tgz 4329671 SHA256 d65f95399dc5710aea90d682d65e554fed4571115f1382416e9142370a47e949 SHA512 49bb4485663897dd07bb7982771befacc50bfabef5806dc802cbd4d39f5d641b08a264824b5b1b96421e810811353deea15e728c5d08ce2932cf0e4602ae099d WHIRLPOOL 86154158915e29eef7753797df037d560078bda4ecfaafffba1064a238618b1ec10e0712b85cd64537ca3dfbac5ce38bf1323456d30b2bd5a51c0dae7f81d339
28
29 diff --git a/dev-libs/botan/botan-1.10.14.ebuild b/dev-libs/botan/botan-1.10.14.ebuild
30 new file mode 100644
31 index 00000000..1150e0d
32 --- /dev/null
33 +++ b/dev-libs/botan/botan-1.10.14.ebuild
34 @@ -0,0 +1,154 @@
35 +# Copyright 1999-2016 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +# $Id$
38 +
39 +EAPI="6"
40 +PYTHON_COMPAT=( python{2_7,3_4} )
41 +
42 +inherit eutils multilib python-r1 toolchain-funcs
43 +
44 +MY_PN="Botan"
45 +MY_P="${MY_PN}-${PV}"
46 +DESCRIPTION="A C++ crypto library"
47 +HOMEPAGE="http://botan.randombit.net/"
48 +SRC_URI="http://botan.randombit.net/releases/${MY_P}.tgz"
49 +
50 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos"
51 +SLOT="0"
52 +LICENSE="BSD"
53 +IUSE="bindist doc python bzip2 gmp ssl static-libs threads zlib"
54 +
55 +S="${WORKDIR}/${MY_P}"
56 +
57 +RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 )
58 + zlib? ( >=sys-libs/zlib-1.2.3 )
59 + python? ( ${PYTHON_DEPS} >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}] )
60 + gmp? ( >=dev-libs/gmp-4.2.2:* )
61 + ssl? ( >=dev-libs/openssl-0.9.8g:*[bindist=] )"
62 +DEPEND="${RDEPEND}
63 + doc? ( dev-python/sphinx )"
64 +
65 +PATCHES=(
66 + "${FILESDIR}/${P}-build.patch"
67 +)
68 +
69 +src_prepare() {
70 + default
71 +
72 + sed -e "s/-Wl,-soname,\$@ //" -i src/build-data/makefile/python.in || die "sed failed"
73 + sed \
74 + -e "/DOCDIR/d" \
75 + -e "/^install:/s/ docs//" \
76 + -i src/build-data/makefile/unix_shr.in || die "sed failed"
77 +
78 + # Fix ImportError with Python 3.
79 + sed -e "s/_botan/.&/" -i src/wrap/python/__init__.py || die "sed failed"
80 +
81 + use python && python_copy_sources
82 +}
83 +
84 +src_configure() {
85 + local disable_modules="proc_walk,unix_procs"
86 + use threads || disable_modules+=",pthreads"
87 + use bindist && disable_modules+=",ecdsa"
88 + elog "Disabling modules: ${disable_modules}"
89 +
90 + # Enable v9 instructions for sparc64
91 + if [[ "${PROFILE_ARCH}" = "sparc64" ]]; then
92 + CHOSTARCH="sparc32-v9"
93 + else
94 + CHOSTARCH="${CHOST%%-*}"
95 + fi
96 +
97 + local myos=
98 + case ${CHOST} in
99 + *-darwin*) myos=darwin ;;
100 + *) myos=linux ;;
101 + esac
102 +
103 + # foobared buildsystem, --prefix translates into DESTDIR, see also make
104 + # install in src_install, we need the correct live-system prefix here on
105 + # Darwin for a shared lib with correct install_name
106 + ./configure.py \
107 + --prefix="${EPREFIX}/usr" \
108 + --libdir=$(get_libdir) \
109 + --docdir=share/doc \
110 + --cc=gcc \
111 + --os=${myos} \
112 + --cpu=${CHOSTARCH} \
113 + --with-endian="$(tc-endian)" \
114 + --without-sphinx \
115 + --with-tr1=system \
116 + $(use_with bzip2) \
117 + $(use_with gmp gnump) \
118 + $(use_with python boost-python) \
119 + $(use_with ssl openssl) \
120 + $(use_with zlib) \
121 + --disable-modules=${disable_modules} \
122 + || die "configure.py failed"
123 +}
124 +
125 +src_compile() {
126 + emake CXX="$(tc-getCXX)" AR="$(tc-getAR) crs" LIB_OPT="${CXXFLAGS}" MACH_OPT=""
127 +
128 + if use python; then
129 + building() {
130 + rm -fr build/python
131 + ln -s "${BUILD_DIR}" build/python
132 + cp Makefile.python build/python
133 + sed -i \
134 + -e "s/-lboost_python/-lboost_python-$(echo ${EPYTHON} | sed 's/python//')/" \
135 + build/python/Makefile.python
136 + emake -f build/python/Makefile.python \
137 + CXX="$(tc-getCXX)" \
138 + CFLAGS="${CXXFLAGS}" \
139 + LDFLAGS="${LDFLAGS}" \
140 + PYTHON_ROOT="/usr/$(get_libdir)" \
141 + PYTHON_INC="-I$(python_get_includedir)"
142 + }
143 + python_foreach_impl building
144 + fi
145 +
146 + if use doc; then
147 + einfo "Generation of documentation"
148 + sphinx-build doc doc_output
149 + fi
150 +}
151 +
152 +src_test() {
153 + chmod -R ugo+rX "${S}"
154 + emake CXX="$(tc-getCXX)" CHECK_OPT="${CXXFLAGS}" check
155 + LD_LIBRARY_PATH="${S}" ./check --validate || die "Validation tests failed"
156 +}
157 +
158 +src_install() {
159 + emake DESTDIR="${ED}usr" install
160 +
161 + if ! use static-libs; then
162 + rm "${ED}usr/$(get_libdir)/libbotan"*.a || die 'remove of static libs failed'
163 + fi
164 +
165 + # Add compatibility symlinks.
166 + [[ -e "${ED}usr/bin/botan-config" ]] && die "Compatibility code no longer needed"
167 + [[ -e "${ED}usr/$(get_libdir)/pkgconfig/botan.pc" ]] && die "Compatibility code no longer needed"
168 + dosym botan-config-1.10 /usr/bin/botan-config
169 + dosym botan-1.10.pc /usr/$(get_libdir)/pkgconfig/botan.pc
170 +
171 + if use python; then
172 + installation() {
173 + rm -fr build/python
174 + ln -s "${BUILD_DIR}" build/python
175 + emake -f Makefile.python \
176 + PYTHON_SITE_PACKAGE_DIR="${ED}$(python_get_sitedir)" \
177 + install
178 + }
179 + python_foreach_impl installation
180 + fi
181 +
182 + if use doc; then
183 + pushd doc_output > /dev/null
184 + insinto /usr/share/doc/${PF}/html
185 + doins -r [a-z]* _static
186 + popd > /dev/null
187 + fi
188 +}
189
190 diff --git a/dev-libs/botan/files/botan-1.10.14-build.patch b/dev-libs/botan/files/botan-1.10.14-build.patch
191 new file mode 100644
192 index 00000000..73ee70b
193 --- /dev/null
194 +++ b/dev-libs/botan/files/botan-1.10.14-build.patch
195 @@ -0,0 +1,26 @@
196 +From d8cb9d52a7e7e7e20cd371349583794e17fd0778 Mon Sep 17 00:00:00 2001
197 +From: Alon Bar-Lev <alon.barlev@×××××.com>
198 +Date: Thu, 1 Dec 2016 20:50:35 +0200
199 +Subject: [PATCH] utils: safeint.h: use botan's to_string
200 +
201 +Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com>
202 +---
203 + src/utils/safeint.h | 2 +-
204 + 1 file changed, 1 insertion(+), 1 deletion(-)
205 +
206 +diff --git a/src/utils/safeint.h b/src/utils/safeint.h
207 +index e0bd662..0a03e4e 100644
208 +--- a/src/utils/safeint.h
209 ++++ b/src/utils/safeint.h
210 +@@ -17,7 +17,7 @@ class Integer_Overflow_Detected : public Exception
211 + {
212 + public:
213 + Integer_Overflow_Detected(const std::string& file, int line) :
214 +- Exception("Integer overflow detected at " + file + ":" + std::to_string(line))
215 ++ Exception("Integer overflow detected at " + file + ":" + to_string(line))
216 + {}
217 + };
218 +
219 +--
220 +2.7.3
221 +