diff options
author | Alon Bar-Lev <alonbl@gentoo.org> | 2015-09-15 00:41:27 +0300 |
---|---|---|
committer | Alon Bar-Lev <alonbl@gentoo.org> | 2015-09-15 00:42:25 +0300 |
commit | 4af0457d86ca573a1bc0424f2e1b01f0da130c43 (patch) | |
tree | 43908e33568762925ecd39632d4f5f35924003d6 /dev-libs/botan | |
parent | sys-apps/pciutils: Removed old. (diff) | |
download | gentoo-4af0457d86ca573a1bc0424f2e1b01f0da130c43.tar.gz gentoo-4af0457d86ca573a1bc0424f2e1b01f0da130c43.tar.bz2 gentoo-4af0457d86ca573a1bc0424f2e1b01f0da130c43.zip |
dev-libs/botan: version bump
Bug: 560338
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'dev-libs/botan')
-rw-r--r-- | dev-libs/botan/Manifest | 2 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.10.10.ebuild | 148 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.11.20.ebuild | 132 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-1.11.20-build-python.patch | 35 | ||||
-rw-r--r-- | dev-libs/botan/metadata.xml | 3 |
5 files changed, 320 insertions, 0 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest index 866013e2b43a..f65ec868cf79 100644 --- a/dev-libs/botan/Manifest +++ b/dev-libs/botan/Manifest @@ -1,3 +1,5 @@ +DIST Botan-1.10.10.tgz 2706592 SHA256 6b67b14746410461fe4a8ce6a625e7eef789243454fe30eab7329d5984be4163 SHA512 8f1aab5dde0191e8347ae98e265ffe799699f9ab6377a81acdb13ddabb8e025ab129b55dbc484796ddcd21c9997dde6e39ec080ad815472cb1e2857007744c9b WHIRLPOOL 3fe729adef417e5cf6af0748985324315d18ec1681ace8c00734c68043682888e29faed1bbd40e68f8f7a923f638f343368c97a89262e649d03360b361a79411 DIST Botan-1.10.5.tbz 2214817 SHA256 2934c00533847dc93c485081d3ce6aae4a110151a69b587b895241159da77cf3 SHA512 7456eaf2bbdabac9438cdd28dbc0735924480034d848c40039b5b58d52924b4cb065316989d6902201bc62fb5c19cba109b550b6865ca4d11748e3a3a1ececa6 WHIRLPOOL 7fd3de981d55a03925e78a4afcee55c0f3cf7e2dc88bd503f9c5705e5cc73293cf3bdcf3c3fdf54b6d1b77ba7dc32cf6fa46720635b922e368aaf12a39339fcd +DIST Botan-1.11.20.tgz 2916027 SHA256 60a02717983535215822bbb1d6ae3c97cf517874d4e48808c6fbfd5c3b112d9c SHA512 0d8f0b66d1fc753381d141da96f859d30301f5e4ea74e21dbd8a787020c186a814fc485bd5055589a06f6556c860dcd39a9ba3af662b63ccf71b6cf41d805137 WHIRLPOOL 31a7df028405df2b364f47b9f7c28a8408f06d9c3600cbb7fe058bd0f8015929ca2191053a43cd16c4fa8487ff175cc7e1f17dc16f4d8c70655fbaa56b44513c DIST Botan-1.11.4.tbz 2346343 SHA256 ebbcc493ef2f13f536597b72e317462e1503c83f7e18e1fe10887f16b5f4da0f SHA512 c5c521a78b50de6c6e2bba912f0697e507a8432bd7f348e3e41856cc2ed60fea5877df4957d74887419208f8df63224a4c6726c94eef58fc1b255133b1f0ee22 WHIRLPOOL 41a024e3698fa2ede2a5124b6c5d2400e969f2cddfec6e7e9e43e549097dd606d105d6e02d6268e322d98e83300c76eb4f7783ee54699a7fa85addcf9adc3aa2 DIST Botan-1.11.8.tbz 2193897 SHA256 5c3a5485dd8f2b5e690bdc73d5848b1f436a090e7fc521c66920f34d6af68efd SHA512 2d3f5d77687ed56be39c88fe7ffdb27ebda573650f164b8681864cff0ca8b0a0bd56f9749f3695e4240a68bfa1483565c854ff4f9d8a7460de0883255a917e26 WHIRLPOOL c9eaeb2d2da10bc61eb704beb9025fada4f16ec4e82a7845cdc465295d05ad070e73d289abdc30fc96f5b43778c87f31ea4cb66c6706cb822ceb2adba0354d41 diff --git a/dev-libs/botan/botan-1.10.10.ebuild b/dev-libs/botan/botan-1.10.10.ebuild new file mode 100644 index 000000000000..43ef09848939 --- /dev/null +++ b/dev-libs/botan/botan-1.10.10.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +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() { + 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.20.ebuild b/dev-libs/botan/botan-1.11.20.ebuild new file mode 100644 index 000000000000..4a5bc47218c6 --- /dev/null +++ b/dev-libs/botan/botan-1.11.20.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +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 lzma sqlite ssl static-libs zlib" + +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? ( >=dev-libs/openssl-0.9.8g:*[bindist=] )" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx )" + +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() { + epatch "${FILESDIR}/${P}-build-python.patch" + 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" ) + 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}" ./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.20-build-python.patch b/dev-libs/botan/files/botan-1.11.20-build-python.patch new file mode 100644 index 000000000000..ae858856864c --- /dev/null +++ b/dev-libs/botan/files/botan-1.11.20-build-python.patch @@ -0,0 +1,35 @@ +From 5bb0b47e608e083dda5e39132174b840f3b091cf Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Tue, 15 Sep 2015 00:18:19 +0300 +Subject: [PATCH] build: support multiple python versions + +Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> +--- + src/scripts/install.py | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/scripts/install.py b/src/scripts/install.py +index 2c69213..d1d62b6 100755 +--- a/src/scripts/install.py ++++ b/src/scripts/install.py +@@ -181,11 +181,12 @@ def main(args = None): + os.path.join(pkgconfig_dir, os.path.basename(cfg['botan_pkgconfig']))) + + if 'ffi' in cfg['mod_list'].split('\n'): +- py_lib_path = os.path.join(lib_dir, 'python%s' % (cfg['python_version']), 'site-packages') +- logging.debug('Installing python module to %s' % (py_lib_path)) +- makedirs(py_lib_path) +- for py in ['botan.py']: +- copy_file(os.path.join(cfg['python_dir'], py), os.path.join(py_lib_path, py)) ++ for ver in cfg['python_version'].split(','): ++ py_lib_path = os.path.join(lib_dir, 'python%s' % (ver), 'site-packages') ++ logging.debug('Installing python module to %s' % (py_lib_path)) ++ makedirs(py_lib_path) ++ for py in ['botan.py']: ++ copy_file(os.path.join(cfg['python_dir'], py), os.path.join(py_lib_path, py)) + + shutil.rmtree(target_doc_dir, True) + shutil.copytree(cfg['doc_output_dir'], target_doc_dir) +-- +2.4.6 + diff --git a/dev-libs/botan/metadata.xml b/dev-libs/botan/metadata.xml index d246b1b3784f..b639324ed94e 100644 --- a/dev-libs/botan/metadata.xml +++ b/dev-libs/botan/metadata.xml @@ -8,4 +8,7 @@ <name>Jack Lloyd </name> <description>Ebuild contributor and botan author</description> </maintainer> +<use> + <flag name="boost">use <pkg>dev-libs/boost</pkg></flag> +</use> </pkgmetadata> |