From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 326871384AE for ; Sun, 20 Sep 2015 17:35:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22E3921C055; Sun, 20 Sep 2015 17:35:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7D9A121C055 for ; Sun, 20 Sep 2015 17:35:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A9541340754 for ; Sun, 20 Sep 2015 17:35:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DECBB207 for ; Sun, 20 Sep 2015 17:35:19 +0000 (UTC) From: "Julian Ospald" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Julian Ospald" Message-ID: <1442770505.7cd05a3946ad74ca363fdb31183aaa21c4170c70.hasufell@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/mbedtls/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-libs/mbedtls/mbedtls-2.1.1-r1.ebuild X-VCS-Directories: net-libs/mbedtls/ X-VCS-Committer: hasufell X-VCS-Committer-Name: Julian Ospald X-VCS-Revision: 7cd05a3946ad74ca363fdb31183aaa21c4170c70 X-VCS-Branch: master Date: Sun, 20 Sep 2015 17:35:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fa4d13d3-7dc8-4cc4-838a-0db02c7f44b5 X-Archives-Hash: 0fcb56945c8b91271c1d7a736602a98a commit: 7cd05a3946ad74ca363fdb31183aaa21c4170c70 Author: Julian Ospald gentoo org> AuthorDate: Sun Sep 20 17:34:29 2015 +0000 Commit: Julian Ospald gentoo org> CommitDate: Sun Sep 20 17:35:05 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cd05a39 net-libs/mbedtls: add libressl support net-libs/mbedtls/mbedtls-2.1.1-r1.ebuild | 94 ++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/net-libs/mbedtls/mbedtls-2.1.1-r1.ebuild b/net-libs/mbedtls/mbedtls-2.1.1-r1.ebuild new file mode 100644 index 0000000..58b18a5 --- /dev/null +++ b/net-libs/mbedtls/mbedtls-2.1.1-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit multilib cmake-utils multilib-minimal + +DESCRIPTION="Cryptographic library for embedded systems" +HOMEPAGE="https://tls.mbed.org/" +SRC_URI="https://github.com/ARMmbed/mbedtls/archive/mbedtls-${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/10" # slot for libmbedtls.so +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~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 ) + ) + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen media-gfx/graphviz ) + test? ( dev-lang/perl )" + +S=${WORKDIR}/${PN}-${P} + +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 +} + +multilib_src_configure() { + local mycmakeargs=( + $(multilib_is_native_abi && cmake-utils_use_enable programs PROGRAMS \ + || echo -DENABLE_PROGRAMS=OFF) + $(cmake-utils_use_enable zlib ZLIB_SUPPORT) + -DUSE_STATIC_MBEDTLS_LIBRARY=OFF + $(cmake-utils_use_enable test TESTING) + -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() { + einstalldocs + + use doc && dohtml -r apidoc + + 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 +}