diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2016-10-22 22:23:58 +0300 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2016-10-22 22:58:07 +0300 |
commit | adcad61d879eb78cdff223356eee90d11f22d3f3 (patch) | |
tree | 19ad6075d42605de10b8b8120c3a8006bb4a51a4 /dev-libs/botan | |
parent | dev-python/bottle: 0.12.10 (diff) | |
download | gentoo-adcad61d879eb78cdff223356eee90d11f22d3f3.tar.gz gentoo-adcad61d879eb78cdff223356eee90d11f22d3f3.tar.bz2 gentoo-adcad61d879eb78cdff223356eee90d11f22d3f3.zip |
dev-libs/botan: version bump
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-libs/botan')
-rw-r--r-- | dev-libs/botan/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.10.13.ebuild | 150 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.11.32.ebuild | 141 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-1.11.32-urandom.patch | 26 |
4 files changed, 319 insertions, 0 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest index 8331908556bf..6a0114f8ddb8 100644 --- a/dev-libs/botan/Manifest +++ b/dev-libs/botan/Manifest @@ -1,2 +1,4 @@ DIST Botan-1.10.12.tgz 2707397 SHA256 affc3a79919577943f896e64d3e4a4dcc4970c5bf80cc98c7f3a3144745eac27 SHA512 074ed9c89d715ada53a3366139da3f0f2fd7ee01941d301b0a9c1a897927ed88c0ade32f66768091664e6b652b7921b3b4c513106ee6ce1942dece3a25216bf5 WHIRLPOOL bfe7029e5ebf660434b14cd49e0c9f4612e9ee88ad50803edfa589754bede01dc39d71542b62eaaa0f7e85dbf623b4b11a90528bcb903c2333103685ce91401f +DIST Botan-1.10.13.tgz 2710181 SHA256 23ec973d4b4a4fe04f490d409e08ac5638afe3aa09acd7f520daaff38ba19b90 SHA512 a09d2cb5dda21bf384b81675025f249abdfe232c95dc3383f0baebc2bf1603b2ed1e2aec9a81aae95df592ec2eeae8906c63474a6da42ad3701669a5d8f14656 WHIRLPOOL 4161d689205f02ed8b97bb371be47829d11dee744a024e24bb834264cfa6143c8a9fb7df969410975e4bf2b708063e3c05b6106c4dbe7f5566e3331ee5e901a9 DIST Botan-1.11.29.tgz 3137027 SHA256 e604eca7f0a733f6ef23ddd9209d82589728a4befd48dff3532740130ebaeb94 SHA512 c6ad6cf3d68c3524b9532e9f52e74d89cc2abfd093f1a46a44efa94a87b0fa50278f11dc5953225160d090cf8ae1c372f54c23b5dffd1f3dae79e210195cfd72 WHIRLPOOL f97f0a013c5ed3c7ec7403b8ae584b7396b91a8fcf9181d7e53f17cbd172301c1c228378e58d851fd591f2be9584b18e3eba05e5c5709750a3cf6cc6538f1bc7 +DIST Botan-1.11.32.tgz 4036606 SHA256 b6b579a08adc4005f7d026120152460e8d4c8656293f7760d38c29b33d7e9c2c SHA512 c9ceff4d4d73c8de2198ac94cd5d585280bc17349f97a9007ba878e8682e7650a598962d68a61ed2e87174c0880b6d162e47744ff6df3e4e110b625672f93f1e WHIRLPOOL c932be4335dfa298ca7379bc00899ea4fc61b5fc2265712e0057b544c9ed4eb5e3f81f9f29e229a2929f292af4568f563579dd270b9764555654d45d57a3b713 diff --git a/dev-libs/botan/botan-1.10.13.ebuild b/dev-libs/botan/botan-1.10.13.ebuild new file mode 100644 index 000000000000..b618b9b7e32a --- /dev/null +++ b/dev-libs/botan/botan-1.10.13.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) + +inherit eutils multilib python-r1 toolchain-funcs + +MY_PN="Botan" +MY_P="${MY_PN}-${PV}" +DESCRIPTION="A C++ crypto library" +HOMEPAGE="http://botan.randombit.net/" +SRC_URI="http://botan.randombit.net/releases/${MY_P}.tgz" + +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos" +SLOT="0" +LICENSE="BSD" +IUSE="bindist doc python bzip2 gmp ssl static-libs threads zlib" + +S="${WORKDIR}/${MY_P}" + +RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 ) + zlib? ( >=sys-libs/zlib-1.2.3 ) + python? ( ${PYTHON_DEPS} >=dev-libs/boost-1.48[python,${PYTHON_USEDEP}] ) + gmp? ( >=dev-libs/gmp-4.2.2:* ) + ssl? ( >=dev-libs/openssl-0.9.8g:*[bindist=] )" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx )" + +src_prepare() { + default + + sed -e "s/-Wl,-soname,\$@ //" -i src/build-data/makefile/python.in || die "sed failed" + sed \ + -e "/DOCDIR/d" \ + -e "/^install:/s/ docs//" \ + -i src/build-data/makefile/unix_shr.in || die "sed failed" + + # Fix ImportError with Python 3. + sed -e "s/_botan/.&/" -i src/wrap/python/__init__.py || die "sed failed" + + use python && python_copy_sources +} + +src_configure() { + local disable_modules="proc_walk,unix_procs" + use threads || disable_modules+=",pthreads" + use bindist && disable_modules+=",ecdsa" + elog "Disabling modules: ${disable_modules}" + + # Enable v9 instructions for sparc64 + if [[ "${PROFILE_ARCH}" = "sparc64" ]]; then + CHOSTARCH="sparc32-v9" + else + CHOSTARCH="${CHOST%%-*}" + fi + + local myos= + case ${CHOST} in + *-darwin*) myos=darwin ;; + *) myos=linux ;; + esac + + # foobared buildsystem, --prefix translates into DESTDIR, see also make + # install in src_install, we need the correct live-system prefix here on + # Darwin for a shared lib with correct install_name + ./configure.py \ + --prefix="${EPREFIX}/usr" \ + --libdir=$(get_libdir) \ + --docdir=share/doc \ + --cc=gcc \ + --os=${myos} \ + --cpu=${CHOSTARCH} \ + --with-endian="$(tc-endian)" \ + --without-sphinx \ + --with-tr1=system \ + $(use_with bzip2) \ + $(use_with gmp gnump) \ + $(use_with python boost-python) \ + $(use_with ssl openssl) \ + $(use_with zlib) \ + --disable-modules=${disable_modules} \ + || die "configure.py failed" +} + +src_compile() { + emake CXX="$(tc-getCXX)" AR="$(tc-getAR) crs" LIB_OPT="${CXXFLAGS}" MACH_OPT="" + + if use python; then + building() { + rm -fr build/python + ln -s "${BUILD_DIR}" build/python + cp Makefile.python build/python + sed -i \ + -e "s/-lboost_python/-lboost_python-$(echo ${EPYTHON} | sed 's/python//')/" \ + build/python/Makefile.python + emake -f build/python/Makefile.python \ + CXX="$(tc-getCXX)" \ + CFLAGS="${CXXFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + PYTHON_ROOT="/usr/$(get_libdir)" \ + PYTHON_INC="-I$(python_get_includedir)" + } + python_foreach_impl building + fi + + if use doc; then + einfo "Generation of documentation" + sphinx-build doc doc_output + fi +} + +src_test() { + chmod -R ugo+rX "${S}" + emake CXX="$(tc-getCXX)" CHECK_OPT="${CXXFLAGS}" check + LD_LIBRARY_PATH="${S}" ./check --validate || die "Validation tests failed" +} + +src_install() { + emake DESTDIR="${ED}usr" install + + if ! use static-libs; then + rm "${ED}usr/$(get_libdir)/libbotan"*.a || die 'remove of static libs failed' + fi + + # Add compatibility symlinks. + [[ -e "${ED}usr/bin/botan-config" ]] && die "Compatibility code no longer needed" + [[ -e "${ED}usr/$(get_libdir)/pkgconfig/botan.pc" ]] && die "Compatibility code no longer needed" + dosym botan-config-1.10 /usr/bin/botan-config + dosym botan-1.10.pc /usr/$(get_libdir)/pkgconfig/botan.pc + + if use python; then + installation() { + rm -fr build/python + ln -s "${BUILD_DIR}" build/python + emake -f Makefile.python \ + PYTHON_SITE_PACKAGE_DIR="${ED}$(python_get_sitedir)" \ + install + } + python_foreach_impl installation + fi + + if use doc; then + pushd doc_output > /dev/null + insinto /usr/share/doc/${PF}/html + doins -r [a-z]* _static + popd > /dev/null + fi +} diff --git a/dev-libs/botan/botan-1.11.32.ebuild b/dev-libs/botan/botan-1.11.32.ebuild new file mode 100644 index 000000000000..4e0c2eb76735 --- /dev/null +++ b/dev-libs/botan/botan-1.11.32.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) + +inherit eutils multilib python-r1 toolchain-funcs + +MY_PN="Botan" +MY_P="${MY_PN}-${PV}" +DESCRIPTION="A C++ crypto library" +HOMEPAGE="http://botan.randombit.net/" +SRC_URI="http://botan.randombit.net/releases/${MY_P}.tgz" + +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos" +SLOT="0" +LICENSE="BSD" +IUSE="bindist doc boost python bzip2 libressl lzma sqlite ssl static-libs zlib test" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE="python? ( boost )" + +RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 ) + zlib? ( >=sys-libs/zlib-1.2.3 ) + boost? ( ${PYTHON_DEPS} >=dev-libs/boost-1.48[python?,${PYTHON_USEDEP}] ) + lzma? ( app-arch/xz-utils ) + sqlite? ( dev-db/sqlite:3 ) + ssl? ( + !libressl? ( >=dev-libs/openssl-0.9.8g:0[bindist=] ) + libressl? ( dev-libs/libressl ) + )" +DEPEND="${RDEPEND} + test? ( app-misc/datefudge ) + doc? ( dev-python/sphinx )" + +PATCHES=( + "${FILESDIR}/${P}-urandom.patch" +) + +pkg_pretend() { + # Botan 1.11 requires -std=c++11 + if [[ ${MERGE_TYPE} != binary ]]; then + [[ $(gcc-major-version) -lt 4 ]] || \ + ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ) \ + && die "Sorry, but gcc 4.7 or higher is required." + fi +} + +src_prepare() { + default + sed \ + -e "/^install:/s/ docs//" \ + -i src/build-data/makefile/gmake.in || die "sed failed" + use python && python_copy_sources +} + +src_configure() { + local disable_modules=( proc_walk unix_procs ) + use boost || disable_modules+=( "boost" ) + use bindist && disable_modules+=( "ecdsa" ) + use python || disable_modules+=( "ffi" ) + elog "Disabling modules: ${disable_modules[@]}" + + # Enable v9 instructions for sparc64 + if [[ "${PROFILE_ARCH}" = "sparc64" ]]; then + CHOSTARCH="sparc32-v9" + else + CHOSTARCH="${CHOST%%-*}" + fi + + local myos= + case ${CHOST} in + *-darwin*) myos=darwin ;; + *) myos=linux ;; + esac + + local pythonvers=() + if use python; then + append() { + pythonvers+=( ${EPYTHON/python/} ) + } + python_foreach_impl append + fi + + ./configure.py \ + --prefix="${EPREFIX}/usr" \ + --destdir="${D}/${EPREFIX}/usr" \ + --libdir=$(get_libdir) \ + --docdir=share/doc \ + --cc=gcc \ + --os=${myos} \ + --cpu=${CHOSTARCH} \ + --with-endian="$(tc-endian)" \ + --without-sphinx \ + $(use_with bzip2) \ + $(use_with lzma) \ + $(use_with sqlite sqlite3) \ + $(use_with ssl openssl) \ + $(use_with zlib) \ + $(use_with boost) \ + --with-python-version=$(IFS=","; echo "${pythonvers[*]}" ) \ + --disable-modules=$(IFS=","; echo "${disable_modules[*]}" ) \ + || die "configure.py failed" +} + +src_compile() { + emake CXX="$(tc-getCXX) -pthread" AR="$(tc-getAR) crs" LIB_OPT="-c ${CXXFLAGS}" + if use doc; then + einfo "Generation of documentation" + sphinx-build doc doc_output + fi +} + +src_test() { + LD_LIBRARY_PATH="${S}" datefudge "2016-10-01 00:00" ./botan-test || die "Validation tests failed" +} + +src_install() { + emake install + + if ! use static-libs; then + rm "${ED}usr/$(get_libdir)/libbotan"*.a || die 'remove of static libs failed' + fi + + # Add compatibility symlinks. + [[ -e "${ED}usr/bin/botan-config" ]] && die "Compatibility code no longer needed" + [[ -e "${ED}usr/$(get_libdir)/pkgconfig/botan.pc" ]] && die "Compatibility code no longer needed" + dosym botan-config-1.11 /usr/bin/botan-config + dosym botan-1.11.pc /usr/$(get_libdir)/pkgconfig/botan.pc + + use python && python_foreach_impl python_optimize + + if use doc; then + pushd doc_output > /dev/null + insinto /usr/share/doc/${PF}/html + doins -r [a-z]* _static + popd > /dev/null + fi +} diff --git a/dev-libs/botan/files/botan-1.11.32-urandom.patch b/dev-libs/botan/files/botan-1.11.32-urandom.patch new file mode 100644 index 000000000000..6a4c53f79c12 --- /dev/null +++ b/dev-libs/botan/files/botan-1.11.32-urandom.patch @@ -0,0 +1,26 @@ +diff --git a/src/lib/rng/system_rng/system_rng.cpp b/src/lib/rng/system_rng/system_rng.cpp +index 135f4fa..3b44d5a 100644 +--- a/src/lib/rng/system_rng/system_rng.cpp ++++ b/src/lib/rng/system_rng/system_rng.cpp +@@ -74,7 +74,7 @@ System_RNG_Impl::System_RNG_Impl() + #define O_NOCTTY 0 + #endif + +- m_fd = ::open(BOTAN_SYSTEM_RNG_DEVICE, O_RDWR | O_NOCTTY); ++ m_fd = ::open(BOTAN_SYSTEM_RNG_DEVICE, O_RDONLY | O_NOCTTY); + if(m_fd < 0) + throw Exception("System_RNG failed to open RNG device"); + #endif +diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp +index d481116..5b9f5fd 100644 +--- a/src/tests/test_ffi.cpp ++++ b/src/tests/test_ffi.cpp +@@ -74,7 +74,7 @@ class FFI_Unit_Tests : public Test + if(TEST_FFI_OK(botan_rng_init, (&rng, "system"))) + { + TEST_FFI_OK(botan_rng_get, (rng, outbuf.data(), outbuf.size())); +- TEST_FFI_OK(botan_rng_reseed, (rng, 256)); ++ //TEST_FFI_OK(botan_rng_reseed, (rng, 256)); + TEST_FFI_OK(botan_rng_destroy, (rng)); + } + |