From 7436bbf153be9e559ab24f45f0c0343566b9b4c9 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 29 Jun 2016 13:58:37 +0200 Subject: [PATCH] dev-libs/mbedtls: bump to 2.3.0 --- .../mbedtls-2.3.0-platform-include.patch | 15 +++++++++ ....2.1.exheres-0 => mbedtls-2.3.0.exheres-0} | 33 +++++++++++++++++-- 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 packages/dev-libs/mbedtls/files/mbedtls-2.3.0-platform-include.patch rename packages/dev-libs/mbedtls/{mbedtls-2.2.1.exheres-0 => mbedtls-2.3.0.exheres-0} (80%) diff --git a/packages/dev-libs/mbedtls/files/mbedtls-2.3.0-platform-include.patch b/packages/dev-libs/mbedtls/files/mbedtls-2.3.0-platform-include.patch new file mode 100644 index 0000000..42ab9b3 --- /dev/null +++ b/packages/dev-libs/mbedtls/files/mbedtls-2.3.0-platform-include.patch @@ -0,0 +1,15 @@ +Author: James Cowgill +Reason: fix missing include +Upstream: reported, https://github.com/ARMmbed/mbedtls/issues/522 + +--- a/include/mbedtls/ssl.h ++++ b/include/mbedtls/ssl.h +@@ -52,7 +52,7 @@ + #endif + + #if defined(MBEDTLS_HAVE_TIME) +-#include ++#include "platform.h" + #endif + + /* diff --git a/packages/dev-libs/mbedtls/mbedtls-2.2.1.exheres-0 b/packages/dev-libs/mbedtls/mbedtls-2.3.0.exheres-0 similarity index 80% rename from packages/dev-libs/mbedtls/mbedtls-2.2.1.exheres-0 rename to packages/dev-libs/mbedtls/mbedtls-2.3.0.exheres-0 index 6b692ec..ca0f92a 100644 --- a/packages/dev-libs/mbedtls/mbedtls-2.2.1.exheres-0 +++ b/packages/dev-libs/mbedtls/mbedtls-2.3.0.exheres-0 @@ -14,6 +14,7 @@ SLOT="0" PLATFORMS="~amd64 ~x86" MYOPTIONS=" + doc havege [[ description = [ Enable the HAVEGE random generator, not suitable for virtualized environments! ] ]] threads [[ description = [ Enables the threading abstraction layer @@ -24,6 +25,11 @@ MYOPTIONS=" " DEPENDENCIES=" + build: + doc? ( + app-doc/doxygen[>=1.8.4] + media-gfx/graphviz + ) build+run: sys-libs/zlib test: @@ -43,6 +49,10 @@ CMAKE_SRC_CONFIGURE_TESTS=( '-DENABLE_TESTING=ON' ) +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/${PNV}-platform-include.patch +) + enable_mbedtls_option() { local myopt="$@" # check that config.h syntax is the same at version bump @@ -60,8 +70,25 @@ src_prepare() { cmake_src_prepare } -src_test() { - LD_LIBRARY_PATH="${ECMAKE_BUILD_DIR}/library" \ - cmake_src_test +src_compile() { + default + + if option doc ; then + emake apidoc + fi +} + +src_test() { + LD_LIBRARY_PATH="${ECMAKE_BUILD_DIR}/library" \ + emake test +} + +src_install() { + cmake_src_install + + if option doc ; then + docinto html + dodoc -r "${CMAKE_SOURCE}"/apidoc/* + fi }