summaryrefslogtreecommitdiff
path: root/net-libs
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/mbedtls/Manifest2
-rw-r--r--net-libs/mbedtls/mbedtls-2.6.1.ebuild93
2 files changed, 95 insertions, 0 deletions
diff --git a/net-libs/mbedtls/Manifest b/net-libs/mbedtls/Manifest
index f901e1acf7c5..c59996501398 100644
--- a/net-libs/mbedtls/Manifest
+++ b/net-libs/mbedtls/Manifest
@@ -1,4 +1,6 @@
DIST mbedtls-2.6.0.tar.gz 1912899 SHA256 8ed1e4ef5831968847565e7da1ed9cc0e9aea419da324326ae24912a03c12a1b SHA512 d03c7adace6647d7d4700bf45becde9d31144bd2adf10cc7f2a73d19fd338c8b81ab8373a81400d74818fd99ce1661979bc5386760b7a68d263fb67406ee2641 WHIRLPOOL 066dbe141c7a23ce8ba96f2b39f56b0092309a86fc6a2dab05666ab15bc66a2266a7f1341074bcdc9991b71fda5b5c0b953df13da5b87709ceaa8bc7148b634d
+DIST mbedtls-2.6.1.tar.gz 1912980 SHA256 d064a8a3babab9ea2ac33675cc843606dbb7a11511fed96fb70aa3189dd64519 SHA512 06f8ba2a453164bac01d20ca6f5c80e691857977ef501d56685e81a0e90dddae1bedeab46c18c22f9a3b72894d45d7466f76a5c404417b6613ddae0ee4a881c8 WHIRLPOOL cbb8564c65ac8fc31c402bb1651faaf7abde90877c367229b6f098d3dae71b8569bb27dc2b0b818e2dc515c381912912063f0ca049e36e65f5afaf8ac0a45be3
EBUILD mbedtls-2.6.0.ebuild 2417 SHA256 7d94927c880ea7a276933e46d36fca677c62455b1a81f83ecbcf4a4a08c5a631 SHA512 3640d53989a58dd4731afe8050c73baa3880825b1c171c345451da4db76f6231c802ed6b21afe62d33b4111db295a4d29f5cc3737a34b0d955b2cea20979d5bb WHIRLPOOL a0ce0af7ab830f955e74a8e158317ca31b4eccb9164f86bb4b88366fa4ba4f0e7774fcd3b6ad2ee7c48d6d859d313b493747352a50fe1509f17c5ff74f06f6ca
+EBUILD mbedtls-2.6.1.ebuild 2426 SHA256 74e809ceeb3239531f2e4203e1b246f3745ecc9556fef44c2f98c53cdbf9152a SHA512 38486a58add1060c65a0f190cb7b9e7327da8dfa9a3c05f93ee149b5e68ea9bf02d0acff502264d0314986e00a18ca3247f39adf4c6272fc1f6c0dd0cc0248de WHIRLPOOL b1c638071d99ed679d192ee3b70e26e420fe4e4b2fdcb3251b05c476e3e60773866fd4d2f81388fab3dc781278d1544788675b32e963edc7d7d2052d2d55632a
MISC ChangeLog 6039 SHA256 c575c5dc1af37ede6489df3efe11e98febbc7aba2bf22d3e610829f161f4fcaa SHA512 35f3431da691f6206451ec7d55a01771d0864b55309b4c928e3f4ccb8ae3b4d012899b13c7dc799d9e5e7d3c2ba18f071b09cd30b6218e84d198ff5ca2e149d8 WHIRLPOOL aea7dfd2ce6a86846deaae7ef90d4d3991cb3c234b958497d11148d50dbc2be983ceb92bc722823d551e061792f38476c235c5304c7f1375322a5c271999165d
MISC metadata.xml 749 SHA256 0af074ed1ca5da0d2fd64ba023bbeee23e071e6c318eeede1b1009e9200ff0c2 SHA512 b1d9eb197d6c904a964bc21fadb939a2cdffaab0990c2254ed57e4dcf123353762c860ce36109072a192b3b31dec25b9c1236d209f42b2e95bcedb1e9342e3e5 WHIRLPOOL 615c4a87ecffe3ead89c1ef5022dd415fb67b6646a9f16c5a06cac6d7ed45a0da739dd8aad416f12a1de161ea4421045c5a215b3cb89f14177082c352f2c3c7f
diff --git a/net-libs/mbedtls/mbedtls-2.6.1.ebuild b/net-libs/mbedtls/mbedtls-2.6.1.ebuild
new file mode 100644
index 000000000000..a5f6f23f8553
--- /dev/null
+++ b/net-libs/mbedtls/mbedtls-2.6.1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils multilib-minimal
+
+DESCRIPTION="Cryptographic library for embedded systems"
+HOMEPAGE="https://tls.mbed.org/"
+SRC_URI="https://github.com/ARMmbed/mbedtls/archive/${P}.tar.gz"
+S=${WORKDIR}/${PN}-${P}
+
+LICENSE="Apache-2.0"
+SLOT="0/10" # slot for libmbedtls.so
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="cpu_flags_x86_sse2 doc havege libressl programs test threads zlib"
+
+RDEPEND="
+ programs? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen media-gfx/graphviz )
+ test? ( dev-lang/perl )"
+
+enable_mbedtls_option() {
+ local myopt="$@"
+ # check that config.h syntax is the same at version bump
+ sed -i \
+ -e "s://#define ${myopt}:#define ${myopt}:" \
+ include/mbedtls/config.h || die
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse2 && enable_mbedtls_option MBEDTLS_HAVE_SSE2
+ use zlib && enable_mbedtls_option MBEDTLS_ZLIB_SUPPORT
+ use havege && enable_mbedtls_option MBEDTLS_HAVEGE_C
+ use threads && enable_mbedtls_option MBEDTLS_THREADING_C
+ use threads && enable_mbedtls_option MBEDTLS_THREADING_PTHREAD
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DENABLE_PROGRAMS=$(multilib_native_usex programs)
+ -DENABLE_ZLIB_SUPPORT=$(usex zlib)
+ -DUSE_STATIC_MBEDTLS_LIBRARY=OFF
+ -DENABLE_TESTING=$(usex test)
+ -DUSE_SHARED_MBEDTLS_LIBRARY=ON
+ -DINSTALL_MBEDTLS_HEADERS=ON
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+ use doc && multilib_is_native_abi && emake apidoc
+}
+
+multilib_src_test() {
+ LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}/library" \
+ cmake-utils_src_test
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ use doc && HTML_DOCS=( apidoc )
+
+ einstalldocs
+
+ if use programs ; then
+ # avoid file collisions with sys-apps/coreutils
+ local p e
+ for p in "${ED%/}"/usr/bin/* ; do
+ if [[ -x "${p}" && ! -d "${p}" ]] ; then
+ mv "${p}" "${ED%/}"/usr/bin/mbedtls_${p##*/} || die
+ fi
+ done
+ for e in aes hash pkey ssl test ; do
+ docinto "${e}"
+ dodoc programs/"${e}"/*.c
+ dodoc programs/"${e}"/*.txt
+ done
+ fi
+}