summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-libs/polarssl
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-libs/polarssl')
-rw-r--r--net-libs/polarssl/Manifest2
-rw-r--r--net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch40
-rw-r--r--net-libs/polarssl/files/polarssl-1.3.9-respect-cflags.patch15
-rw-r--r--net-libs/polarssl/metadata.xml18
-rw-r--r--net-libs/polarssl/polarssl-1.3.8.ebuild91
-rw-r--r--net-libs/polarssl/polarssl-1.3.9.ebuild91
6 files changed, 257 insertions, 0 deletions
diff --git a/net-libs/polarssl/Manifest b/net-libs/polarssl/Manifest
new file mode 100644
index 000000000000..c71837e3c470
--- /dev/null
+++ b/net-libs/polarssl/Manifest
@@ -0,0 +1,2 @@
+DIST polarssl-1.3.8-gpl.tgz 1725531 SHA256 318171db41335cacbb5b0047c94f1faf91442ab70a223b5223436703c9406ff1 SHA512 e1bf2b111510582ebf071b11d9d0663fbd02ac61f6ded9611e2f0eb5ff64b421d72768dd94ec5e52353d3bde06bc62d673211c26debab2cd7b3c86108d2de627 WHIRLPOOL ac482015949417b44b8d2800acdf042d8cfd217e3ab8d9aef17f3ef2f3bee8802f7413fd48d613bb1b61cbb13c0a3a71ad1f6a8de98a026de6730f9d2d74f126
+DIST polarssl-1.3.9-gpl.tgz 1741396 SHA256 d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36755 SHA512 e8958f834fd80ac996ac58152a0a5d4e31449e8b7b79ee6daac6f45bed60c5c5ad31f84b211d5e36ad0d6c82a742841e986a738735af048c286bce0e8fe4d62d WHIRLPOOL 21f27e50a8563df18c9b27a595da47715b1f04114d900dee2dfac3de51db58e4094da680a44007cf9f02fcc30689bca02d79a957509d1715dce1673d7713fa93
diff --git a/net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch b/net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch
new file mode 100644
index 000000000000..0c6ca92773e0
--- /dev/null
+++ b/net-libs/polarssl/files/polarssl-1.3.8-ssl_pthread_server.patch
@@ -0,0 +1,40 @@
+diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c
+index cc6ad89..019e4e8 100644
+--- a/programs/ssl/ssl_pthread_server.c
++++ b/programs/ssl/ssl_pthread_server.c
+@@ -129,6 +129,10 @@ static void *handle_ssl_connection( void *data )
+ ssl_context ssl;
+ ctr_drbg_context ctr_drbg;
+
++ /* Make sure memory references are valid */
++ memset( &ssl, 0, sizeof( ssl_context ) );
++ memset( &ctr_drbg, 0, sizeof( ctr_drbg_context ) );
++
+ snprintf( pers, sizeof(pers), "SSL Pthread Thread %d", thread_id );
+ printf( " [ #%d ] Client FD %d\n", thread_id, client_fd );
+ printf( " [ #%d ] Seeding the random number generator...\n", thread_id );
+@@ -176,7 +180,7 @@ static void *handle_ssl_connection( void *data )
+ if( ( ret = ssl_set_own_cert( &ssl, thread_info->server_cert, thread_info->server_key ) ) != 0 )
+ {
+ printf( " failed\n ! ssl_set_own_cert returned %d\n\n", ret );
+- goto exit;
++ goto thread_exit;
+ }
+
+ printf( " [ #%d ] ok\n", thread_id );
+@@ -308,6 +312,7 @@ thread_exit:
+ #endif
+
+ net_close( client_fd );
++ ctr_drbg_free( &ctr_drbg );
+ ssl_free( &ssl );
+
+ thread_info->thread_complete = 1;
+@@ -492,7 +497,6 @@ exit:
+ #if defined(POLARSSL_SSL_CACHE_C)
+ ssl_cache_free( &cache );
+ #endif
+- ctr_drbg_free( &ctr_drbg );
+ entropy_free( &entropy );
+
+ polarssl_mutex_free( &debug_mutex );
diff --git a/net-libs/polarssl/files/polarssl-1.3.9-respect-cflags.patch b/net-libs/polarssl/files/polarssl-1.3.9-respect-cflags.patch
new file mode 100644
index 000000000000..45dffd53041c
--- /dev/null
+++ b/net-libs/polarssl/files/polarssl-1.3.9-respect-cflags.patch
@@ -0,0 +1,15 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Oct 25 17:12:43 UTC 2014
+Subject: respect system cflags
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,7 +4,7 @@
+ string(REGEX MATCH "Clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER_ID}")
+
+ if(CMAKE_COMPILER_IS_GNUCC)
+- set(CMAKE_C_FLAGS "-Wall -Wextra -W -Wdeclaration-after-statement -Wlogical-op -Wwrite-strings")
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -W -Wdeclaration-after-statement -Wlogical-op -Wwrite-strings")
+ set(CMAKE_C_FLAGS_RELEASE "-O2")
+ set(CMAKE_C_FLAGS_DEBUG "-g3 -O0")
+ set(CMAKE_C_FLAGS_COVERAGE "-g3 -O0 --coverage")
diff --git a/net-libs/polarssl/metadata.xml b/net-libs/polarssl/metadata.xml
new file mode 100644
index 000000000000..807a87415f43
--- /dev/null
+++ b/net-libs/polarssl/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tommy@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ The aim of the PolarSSL project is to provide a quality, open-source
+ cryptographic library written in C and targeted at embedded systems.
+ </longdescription>
+ <use>
+ <flag name="havege">Enable the HAVEGE random generator.
+ Warning: the HAVEGE random generator is not suitable for
+ virtualized environments
+ </flag>
+ <flag name='programs'>Build PolarSSL programs</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-libs/polarssl/polarssl-1.3.8.ebuild b/net-libs/polarssl/polarssl-1.3.8.ebuild
new file mode 100644
index 000000000000..b991111ad29b
--- /dev/null
+++ b/net-libs/polarssl/polarssl-1.3.8.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib cmake-utils multilib-minimal
+
+DESCRIPTION="Cryptographic library for embedded systems"
+HOMEPAGE="http://polarssl.org/"
+SRC_URI="http://polarssl.org/download/${P}-gpl.tgz"
+
+LICENSE="GPL-2"
+SLOT="0/7"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc havege programs cpu_flags_x86_sse2 static-libs test threads zlib"
+
+RDEPEND="
+ programs? ( dev-libs/openssl: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_polarssl_option() {
+ local myopt="$@"
+ # check that config.h syntax is the same at version bump
+ sed -i \
+ -e "s://#define ${myopt}:#define ${myopt}:" \
+ include/polarssl/config.h || die
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse2 && enable_polarssl_option POLARSSL_HAVE_SSE2
+ use zlib && enable_polarssl_option POLARSSL_ZLIB_SUPPORT
+ use havege && enable_polarssl_option POLARSSL_HAVEGE_C
+ use threads && enable_polarssl_option POLARSSL_THREADING_C
+ use threads && enable_polarssl_option POLARSSL_THREADING_PTHREAD
+
+ epatch "${FILESDIR}"/${P}-ssl_pthread_server.patch
+}
+
+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)
+ $(cmake-utils_use_use static-libs STATIC_POLARSSL_LIBRARY)
+ $(cmake-utils_use_enable test TESTING)
+ -DUSE_SHARED_POLARSSL_LIBRARY=ON
+ -DINSTALL_POLARSSL_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/polarssl_${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
+}
diff --git a/net-libs/polarssl/polarssl-1.3.9.ebuild b/net-libs/polarssl/polarssl-1.3.9.ebuild
new file mode 100644
index 000000000000..14654d0367aa
--- /dev/null
+++ b/net-libs/polarssl/polarssl-1.3.9.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib cmake-utils multilib-minimal
+
+DESCRIPTION="Cryptographic library for embedded systems"
+HOMEPAGE="http://polarssl.org/"
+SRC_URI="http://polarssl.org/download/${P}-gpl.tgz"
+
+LICENSE="GPL-2"
+SLOT="0/7"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="doc havege programs cpu_flags_x86_sse2 static-libs test threads zlib"
+
+RDEPEND="
+ programs? ( dev-libs/openssl: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_polarssl_option() {
+ local myopt="$@"
+ # check that config.h syntax is the same at version bump
+ sed -i \
+ -e "s://#define ${myopt}:#define ${myopt}:" \
+ include/polarssl/config.h || die
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse2 && enable_polarssl_option POLARSSL_HAVE_SSE2
+ use zlib && enable_polarssl_option POLARSSL_ZLIB_SUPPORT
+ use havege && enable_polarssl_option POLARSSL_HAVEGE_C
+ use threads && enable_polarssl_option POLARSSL_THREADING_C
+ use threads && enable_polarssl_option POLARSSL_THREADING_PTHREAD
+
+ epatch "${FILESDIR}"/${PN}-1.3.9-respect-cflags.patch
+}
+
+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)
+ $(cmake-utils_use_use static-libs STATIC_POLARSSL_LIBRARY)
+ $(cmake-utils_use_enable test TESTING)
+ -DUSE_SHARED_POLARSSL_LIBRARY=ON
+ -DINSTALL_POLARSSL_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/polarssl_${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
+}