diff options
Diffstat (limited to 'dev-libs/botan')
-rw-r--r-- | dev-libs/botan/Manifest | 15 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.10.15-r1.ebuild | 157 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.10.16.ebuild | 157 | ||||
-rw-r--r-- | dev-libs/botan/botan-1.10.17.ebuild | 158 | ||||
-rw-r--r-- | dev-libs/botan/botan-2.3.0.ebuild | 113 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-1.10.15-c++11.patch | 36 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-1.10.17-build.patch | 25 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-1.10.17-libressl.patch | 40 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-2.3.0-build.patch | 22 | ||||
-rw-r--r-- | dev-libs/botan/metadata.xml | 23 |
10 files changed, 746 insertions, 0 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest new file mode 100644 index 000000000000..0e10bfd7ddf2 --- /dev/null +++ b/dev-libs/botan/Manifest @@ -0,0 +1,15 @@ +AUX botan-1.10.15-c++11.patch 1265 SHA256 242e3d14d39b59a00a50a5a849f11287ca1af3c2ea96f636bdb9ed3b658a16ea SHA512 8d32ee575ad78d0c4182bfbac878fefde43af5180c9d8dc61e8d927682c6dc4d5d321517c1628abc8b2f74d04b9d5bb44756310d9074fffc6b2080ef00911779 WHIRLPOOL ca2a264cf22e3ba5422942fa516289d3d01d895729b1113b096c7dfc5dee55161b2054746d7453d6ec50d6248ca896594d0466721e41ce4eb30fbc2ecb5d4ba1 +AUX botan-1.10.17-build.patch 874 SHA256 cdd8c2d7ce8208a318efb7a7c34e6ecc742dedabe427d99a97d87c43898cfdf4 SHA512 bccb615e832ef31381afd0996a06cfb4c37f29bd8d7691435d592f2ec88f525f3e9e19adf84c78ebd6f24f60e407e29ef99bdff11103ef1344250fe5251fca0a WHIRLPOOL 4e648feefc39c7c22c526dc406dbed70d054979328f1c7926c8dc8fedecc09604797db570cb1686fa7c09808e23ca5869c0e583281e0493eae4351e38f4a4ff4 +AUX botan-1.10.17-libressl.patch 1344 SHA256 a35ae28f74476a9e13a308eedf88aeb875dbb1b19d44378739bd38ea54bf22b9 SHA512 dee61a141a10572c4d4c111527bbca3bd77808a2642ddb9cb105785badc10babd0406b1634c62c355e5361b9281c989666851d0fb81b3e000b62570e429fd642 WHIRLPOOL da49b3f304752d1e4bedd819028b4abb799ed3364dd8e0487c6a2adb181589b5b7fd337fd41bbf502ea45a12c415ac9bd0b06f19124981a00841e0a6e0240532 +AUX botan-2.3.0-build.patch 696 SHA256 e772c61aa125e49d64aa5ae16d7fe6177ce3846656329b430922e74158b30d23 SHA512 1df49a92a4b2e32265db00f09bc7113a5a928d7514f3af40a7e20aadb88188783cc1c2f79b955252bfe05fded51e36b8eaccd26b4b2ddc0caa1108d24edebaf3 WHIRLPOOL 3db9957d5f677dfbb4eb28eecdc6c3c1b5d0b6cc797de00900ccd403bf935fa54d7e15d245cf7a4abf89a6f7d6d208f396af67dcb57d65af64c180e61f4feb7a +DIST Botan-1.10.15.tgz 2711022 SHA256 c0cc8ffd470fda4b257c3ef9faf5cf93751f4c283dfba878148acafedfab70fe SHA512 c3b93f44ad0de9758af11557833ee570aa0724c8b57c9a576b56ab439a7819e0f71a10857ad367b486716164dd4ff551cab2036ecbbbedd75db4b8dc93416bc8 WHIRLPOOL 834cad8b38787581d8d967b2fa6ffb6164e2bf8a124d993733a7d55202439ec543c18cb6cb03721c0e8eb67cbe2a486b8199b3b8784645e0033be298f36640b9 +DIST Botan-1.10.16.tgz 2711177 SHA256 6c5472401d06527e87adcb53dd270f3c9b1fb688703b04dd7a7cfb86289efe52 SHA512 967137c89484630806e828c3902fe27c28dae17e6a3aeae7c542093de356545be4fcbe4325afd9fb40093a10ac409244e4e6503364858facb59057a5dfd61c03 WHIRLPOOL 86ec99dbadcdf1ff27d1b11a133a15be8385f32cf7f456afa9ca0756e3e0c8e640fff3e5d2753d508cf1136268ae5912b3c610a75d30cf07f206896fb8b5e6a8 +DIST Botan-1.10.17.tgz 2706678 SHA256 6847ffb64b8d2f939dccfecc17bd2c80385d08f7621e2c56d3a335118e823613 SHA512 a47cab3af113652247c8efc8b0f043eb62175eaa8554833d5fc3016ea94dbdd8aa722ab9b5226cc5f133afbcc088d54362111630eaa4594812c39925cc3c8649 WHIRLPOOL b2d82fb18ad7f69e26325c797cee939f65211e3b09c7058881633d410acd88e1839960c4be65637b00714b19d06a1c181704a5d184c1890cd7ee75b0e90a301b +DIST Botan-2.3.0.tgz 5947072 SHA256 39f970fee5986a4c3e425030aef50ac284da18596c004d1a9cce7688c4e6d47c SHA512 a8575bdb2eaa01fb45d8565bea0b54ddf47a21d2fb761fc0a286373b09d51e5a00e84d5cefc51040c5720db66f5625c6bc73ab09cffa9cd42472545610f9892a WHIRLPOOL 295965db5d6d0f21511a6a49f79a80cc7adffb8c67e05c6c09081eae233e2bb5abe506147a7e84ded9ddd1e29faba3276527449da3484e0b07e8bdc03018e211 +EBUILD botan-1.10.15-r1.ebuild 4167 SHA256 8415e0ac517d9ca554cad8c79ad7943c164440e6d503e8b580bb6e11d57ee5e3 SHA512 10d45dab21e759e203167e34fb008c2cb99cc5e2ac8cadd234184c6336538e3c7f4a345edeb949b53479dfae95e151f75b683b45ae56915c39c3a597b6cc6135 WHIRLPOOL 8e1b552f0099ba2a1757487f372382bb32d34524fb4b24e35423ecaec8644db6da93941a899914d5db289c371b50f84aaedd6cc30f945a41f37f0baf442372c4 +EBUILD botan-1.10.16.ebuild 4176 SHA256 ce46692d9b44a2a5b09bfab5dea4ca530cf1fff19c13560b85b31f460d36f4e6 SHA512 0b81973ff69dc5c46a57f98091af521a5cbd3dba43ce7d7264352c3d3a3bf8df61038096c60b028486b9d0cdccc9d3b2d9cf1b724419a439e13f03cae0003389 WHIRLPOOL 23f8d3df49680fe9cd4dbc1c8bb6ecb3917a0448f4370c9ca4409f1d1e63aa4a733f609d6f435a732c9825125aef57bad3aeb784df2a0a642d1d51d112cd7030 +EBUILD botan-1.10.17.ebuild 4217 SHA256 5b53794f8ff42967224e6b35da1f8fb350110938aef5ff009d35a8be0616b9c3 SHA512 1e46a63244df0439619e50ed30ca2cba3e9cd25f741f0732beff4e538c4845e2cd8929f6b37c8ca147496d7eb146f6a4c86c929e4701c7e5c8cd9702fbf955ee WHIRLPOOL 4b966152dacfd9757ebf8d3b36a949a8a7f6161ff1d17ee944f2b619e39f9d52012779ea72f43fa3e37690ec296795600bdae8356aa545c93b1084d68c104b13 +EBUILD botan-2.3.0.ebuild 2785 SHA256 b124c8615b58a04ea31ab6f6d09e86ee6044e3d3ae4e0e018eb5b596c3070153 SHA512 f222c6c03ea2bd0d6c3e2eb1f692379533992d217e7e2a277b0af293d72b0a4689bc784def9c02b58138ea683e97df9ac8f7ee7c63815e010ccfde1244891466 WHIRLPOOL 9f100014fc46860ee502069d5cecd5dd8779181b8d2cfc75a4154a0f7e1b51ae30f0bf7ad9c997d656c35cee518c440060384bc4119b7e41478784419cac2efc +MISC ChangeLog 6990 SHA256 f7855ce06f452ae297417cfd5f5db8b33910da4bfd5d82615df64c73c82b07bf SHA512 55758698c3013d9a58546846d5fcb05bd0ec3552a027a7f398c35074b4ab06194f19282b59bccff11610f5fcf044a96ea5d96d32ea4bc19f4b12e4739cca61a5 WHIRLPOOL 83a724604833f2521a1eec7cfa512a952a020313e0d8492babe0a18a8108dd43b5869315433092fcb34ea3cea2fc50cd77000c689969e9d3c988086ef81f25f5 +MISC ChangeLog-2015 14001 SHA256 3965f2c6b8727a5d23738c6a204c1786dedff49d5c4ed7a0d5e310993a10dee4 SHA512 89e3c0d3264354d2b926f971a3a86df4eba9961b680e55e951d2fcb17a1c9b02dedb3d098e90502be6c1b4152e0adbd5cf55d2e56ee5904403c1d6d8b2ee1603 WHIRLPOOL 66370d148c79167a19afe2af5061ce9f7d59b36e9d490adf0ed2d6d871c24cba770a3ce077c8f3b5fe9fc8b95fae66966fce151c41f2b5db5b7df2c9361df031 +MISC metadata.xml 683 SHA256 b7e03ba1e71b686705d8e94a7245cdd5d0fb48c96d7a2a792b012ad84650bcc4 SHA512 792021073ffb70c832f90e572949a89c8c0c0b310dc564def23018024ec38c9d23ec932378e124ca5aa4331d509abce73df53e2a9f44a9eea3a2def55cf72f95 WHIRLPOOL 303d50a9a55ab25fb61326f3443a0cfb105285ee292597c8138c4d1db26d167e35115d5b70ae317a72840c426275a7bd32489bbbcf8d3feac593b403a036efba diff --git a/dev-libs/botan/botan-1.10.15-r1.ebuild b/dev-libs/botan/botan-1.10.15-r1.ebuild new file mode 100644 index 000000000000..6d62a12760ff --- /dev/null +++ b/dev-libs/botan/botan-1.10.15-r1.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit 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 libressl ssl static-libs threads zlib" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +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? ( + !libressl? ( dev-libs/openssl:0=[bindist=] ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx )" + +PATCHES=( + "${FILESDIR}/${P}-c++11.patch" +) + +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.10.16.ebuild b/dev-libs/botan/botan-1.10.16.ebuild new file mode 100644 index 000000000000..5cbafc9aab1f --- /dev/null +++ b/dev-libs/botan/botan-1.10.16.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit 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 libressl ssl static-libs threads zlib" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +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? ( + !libressl? ( dev-libs/openssl:0=[bindist=] ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx )" + +PATCHES=( + "${FILESDIR}/${PN}-1.10.15-c++11.patch" +) + +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.10.17.ebuild b/dev-libs/botan/botan-1.10.17.ebuild new file mode 100644 index 000000000000..6736b8cefc1d --- /dev/null +++ b/dev-libs/botan/botan-1.10.17.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit 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 libressl ssl static-libs threads zlib" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +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? ( + !libressl? ( <dev-libs/openssl-1.1:0=[bindist=] ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx )" + +PATCHES=( + "${FILESDIR}/${P}-build.patch" + "${FILESDIR}/${P}-libressl.patch" +) + +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 || die + 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-2.3.0.ebuild b/dev-libs/botan/botan-2.3.0.ebuild new file mode 100644 index 000000000000..0891fa18dafe --- /dev/null +++ b/dev-libs/botan/botan-2.3.0.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit 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="2/3" # soname version +LICENSE="BSD" +IUSE="bindist doc boost python bzip2 libressl lzma sqlite ssl static-libs zlib" +REQUIRED_USE="python? ( boost ) boost? ( ${PYTHON_REQUIRED_USE} )" + +S="${WORKDIR}/${MY_P}" + +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=[bindist=] ) + libressl? ( dev-libs/libressl:0= ) + )" +DEPEND="${RDEPEND} + dev-lang/python:* + doc? ( dev-python/sphinx )" + +PATCHES=( + "${FILESDIR}/${P}-build.patch" +) + +src_prepare() { + default + use doc || sed \ + -e "/^install:/s/ docs//" \ + -i src/build-data/makefile/gmake.in + 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" \ + --libdir=$(get_libdir) \ + --docdir=share/doc \ + --cc=gcc \ + --os=${myos} \ + --cpu=${CHOSTARCH} \ + --with-endian="$(tc-endian)" \ + --without-doxygen \ + $(use_with doc 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" CXXFLAGS="-std=c++11 -D_REENTRANT ${CXXFLAGS}" +} + +src_test() { + LD_LIBRARY_PATH="${S}" ./botan-test || die "Validation tests failed" +} + +src_install() { + default + + if ! use static-libs; then + rm "${ED}usr/$(get_libdir)/libbotan"*.a || die 'remove of static libs failed' + fi + + use python && python_foreach_impl python_optimize +} diff --git a/dev-libs/botan/files/botan-1.10.15-c++11.patch b/dev-libs/botan/files/botan-1.10.15-c++11.patch new file mode 100644 index 000000000000..e47b56600fe1 --- /dev/null +++ b/dev-libs/botan/files/botan-1.10.15-c++11.patch @@ -0,0 +1,36 @@ +From dc2834f708a6d857b1a7f9587d5a28af271103e5 Mon Sep 17 00:00:00 2001 +From: Peter-Levine <plevine457@gmail.com> +Date: Mon, 20 Mar 2017 22:13:21 -0400 +Subject: [PATCH] Allow destructor to throw when building with >=C++11 + +After C++11, destructors default to `noexcept(true)`. Thus, any throw statements in destructors become calls to `std::terminate()`. To enable the intended throw statement, the destructor must be explicitly marked `noexcept(false)`. +--- + src/alloc/alloc_mmap/mmap_mem.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/alloc/alloc_mmap/mmap_mem.cpp b/src/alloc/alloc_mmap/mmap_mem.cpp +index 17c189e..2637533 100644 +--- a/src/alloc/alloc_mmap/mmap_mem.cpp ++++ b/src/alloc/alloc_mmap/mmap_mem.cpp +@@ -21,6 +21,12 @@ + #define MAP_FAILED -1 + #endif + ++#if __cplusplus >= 201103L ++#define NOEXCEPT noexcept(false) ++#else ++#define NOEXCEPT ++#endif ++ + namespace Botan { + + namespace { +@@ -66,7 +72,7 @@ void* MemoryMapping_Allocator::alloc_block(size_t n) + throw MemoryMapping_Failed("Could not unlink temporary file"); + } + +- ~TemporaryFile() ++ ~TemporaryFile() NOEXCEPT + { + /* + * We can safely close here, because post-mmap the file diff --git a/dev-libs/botan/files/botan-1.10.17-build.patch b/dev-libs/botan/files/botan-1.10.17-build.patch new file mode 100644 index 000000000000..43877972211a --- /dev/null +++ b/dev-libs/botan/files/botan-1.10.17-build.patch @@ -0,0 +1,25 @@ +From c7963d28d03e5f65f4021a5b764dc4bff9417eda Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Wed, 4 Oct 2017 01:50:33 +0300 +Subject: [PATCH] gost_3411: use correct type for build to pass + +--- + src/hash/gost_3411/gost_3411.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp +index 97aa399..7ca22dc 100644 +--- a/src/hash/gost_3411/gost_3411.cpp ++++ b/src/hash/gost_3411/gost_3411.cpp +@@ -91,7 +91,7 @@ void GOST_34_11::compress_n(const byte input[], size_t blocks) + // P transformation + for(size_t k = 0; k != 4; ++k) + { +- const uint64_t UVk = U[k] ^ V[k]; ++ const u64bit UVk = U[k] ^ V[k]; + for(size_t l = 0; l != 8; ++l) + key[4*l+k] = get_byte(l, UVk); + } +-- +2.13.6 + diff --git a/dev-libs/botan/files/botan-1.10.17-libressl.patch b/dev-libs/botan/files/botan-1.10.17-libressl.patch new file mode 100644 index 000000000000..5913bfd30494 --- /dev/null +++ b/dev-libs/botan/files/botan-1.10.17-libressl.patch @@ -0,0 +1,40 @@ +From e61a5f56fb404db3655909be4ce23c3a816cbb60 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <alon.barlev@gmail.com> +Date: Wed, 4 Oct 2017 22:16:31 +0300 +Subject: [PATCH] openssl: support libressl + +Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> +--- + src/engine/openssl/ossl_bc.cpp | 2 +- + src/engine/openssl/ossl_md.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp +index 74660c7b5..cb184c202 100644 +--- a/src/engine/openssl/ossl_bc.cpp ++++ b/src/engine/openssl/ossl_bc.cpp +@@ -8,7 +8,7 @@ + #include <botan/internal/openssl_engine.h> + #include <openssl/evp.h> + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + #error "OpenSSL 1.1 API not supported in Botan 1.10, upgrade to 2.x" + #endif + +diff --git a/src/engine/openssl/ossl_md.cpp b/src/engine/openssl/ossl_md.cpp +index 2fcb2b0e5..9c43d616e 100644 +--- a/src/engine/openssl/ossl_md.cpp ++++ b/src/engine/openssl/ossl_md.cpp +@@ -8,7 +8,7 @@ + #include <botan/internal/openssl_engine.h> + #include <openssl/evp.h> + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) + #error "OpenSSL 1.1 API not supported in Botan 1.10, upgrade to 2.x" + #endif + +-- +2.13.6 + diff --git a/dev-libs/botan/files/botan-2.3.0-build.patch b/dev-libs/botan/files/botan-2.3.0-build.patch new file mode 100644 index 000000000000..b4d4ca6e694f --- /dev/null +++ b/dev-libs/botan/files/botan-2.3.0-build.patch @@ -0,0 +1,22 @@ +From 9e28eac720176ecb9b784510d352aa0ac38d0b56 Mon Sep 17 00:00:00 2001 +From: Jack Lloyd <jack@randombit.net> +Date: Wed, 4 Oct 2017 13:59:21 -0400 +Subject: [PATCH] Add limits.h header for INT_MAX + +Gentoo bug https://bugs.gentoo.org/633468 +--- + src/lib/prov/openssl/openssl_mode.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/lib/prov/openssl/openssl_mode.cpp b/src/lib/prov/openssl/openssl_mode.cpp +index 9580bc9c5..fabaccb18 100644 +--- a/src/lib/prov/openssl/openssl_mode.cpp ++++ b/src/lib/prov/openssl/openssl_mode.cpp +@@ -10,6 +10,7 @@ + #include <botan/internal/rounding.h> + #include <botan/internal/openssl.h> + #include <openssl/evp.h> ++#include <limits.h> + + namespace Botan { + diff --git a/dev-libs/botan/metadata.xml b/dev-libs/botan/metadata.xml new file mode 100644 index 000000000000..2ca55344e897 --- /dev/null +++ b/dev-libs/botan/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>lloyd@randombit.net</email> + <name>Jack Lloyd </name> + <description>Ebuild contributor and botan author</description> + </maintainer> + <maintainer type="project"> + <email>crypto@gentoo.org</email> + <name>Crypto</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers Project</name> + </maintainer> + <use> + <flag name="boost">use <pkg>dev-libs/boost</pkg></flag> + </use> + <slots> + <subslots>botan soname version</subslots> + </slots> +</pkgmetadata> |