Subject: [alpine-aports] [PATCH] testing/mbedtls: update to 2.2.0 + fix for Hiawatha

From: Stuart Cardall <[email-masked]>
Date: Tue, 22 Dec 2015 21:30:36 +0000

this also closes the Hiawatha bug:

ns2.alpinelinux.org/issues/4537
---
 testing/mbedtls/APKBUILD | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/testing/mbedtls/APKBUILD b/testing/mbedtls/APKBUILD
index a24df56..e1739c4 100644
--- a/testing/mbedtls/APKBUILD
+++ b/testing/mbedtls/APKBUILD
@@ -1,7 +1,7 @@
 # Contributor: Łukasz Jendrysik <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=mbedtls
-pkgver=2.1.2
+pkgver=2.2.0
 pkgrel=0
 pkgdesc="Light-weight cryptographic and SSL/TLS library"
 url="https://tls.mbed.org/"
@@ -9,24 +9,17 @@ arch="all"
 license="GPLv2+ with exceptions"
 depends=""
 depends_dev=""
-makedepends="$depends_dev cmake perl"
-install=""
+makedepends="$depends_dev cmake perl" # libpthread-stubs"
 subpackages="$pkgname-static $pkgname-dev $pkgname-utils"
 source="https://tls.mbed.org/download/mbedtls-$pkgver-gpl.tgz"
 
-_builddir="$srcdir"/mbedtls-2.1.2
-prepare() {
-	local i
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
+_builddir="$srcdir"/mbedtls-$pkgver
 
 build() {
 	cd "$_builddir"
+	# enable flags for non-embedded systems
+	sed -i 's|//\(#define MBEDTLS_THREADING_C\)|\1|' include/mbedtls/config.h
+	sed -i 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' include/mbedtls/config.h
 	cmake . \
 		-DCMAKE_INSTALL_PREFIX=/usr \
 		-DCMAKE_BUILD_TYPE="Release" \
@@ -52,6 +45,6 @@ static() {
 	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
 }
 
-md5sums="38b7baae95d6b0826605a1edfffeebe4  mbedtls-2.1.2-gpl.tgz"
-sha256sums="0dcca471d1f76352af5e26d64880ef6a30963ad6474a78c0d8e7fbb6dd691fa4  mbedtls-2.1.2-gpl.tgz"
-sha512sums="b5869896dd66a4c0493f84dd01b9eb1f134ee4ab6fc559b260400d733f3c8a02a8b9fe50cdad6367c95a0a34995ca4d09270087e659552fcf264995d34d0b261  mbedtls-2.1.2-gpl.tgz"
+md5sums="69165befb762895234c7600cd5cdb789  mbedtls-2.2.0-gpl.tgz"
+sha256sums="451c1b864b5d07df9830f67af600ea6d53629df4484d38e86b2edc7a7526077c  mbedtls-2.2.0-gpl.tgz"
+sha512sums="1522305abae952ac07a9f5d2f8ef9530ab86e1ce5867e5b5d18e15150bf8b0db2834cbd1bea98448ddcc0136bba325675efc66117d775bd52b848a97a04ce258  mbedtls-2.2.0-gpl.tgz"
-- 
2.6.4

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---