From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-966412-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id C9F5B1396D0
	for <garchives@archives.gentoo.org>; Fri, 11 Aug 2017 13:21:06 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A59071FC054;
	Fri, 11 Aug 2017 13:21:05 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 78A861FC04E
	for <gentoo-commits@lists.gentoo.org>; Fri, 11 Aug 2017 13:21:05 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id BD877341754
	for <gentoo-commits@lists.gentoo.org>; Fri, 11 Aug 2017 13:21:04 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 17E627601
	for <gentoo-commits@lists.gentoo.org>; Fri, 11 Aug 2017 13:21:02 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1502457641.594ae1a45e2227f1c5daaef5d0ab74510ef8441d.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libsrtp/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
X-VCS-Directories: net-libs/libsrtp/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 594ae1a45e2227f1c5daaef5d0ab74510ef8441d
X-VCS-Branch: master
Date: Fri, 11 Aug 2017 13:21:02 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 0206decc-0687-42d9-b4c8-e6ab076527d4
X-Archives-Hash: 8c253575540e3406cf45883e105dc388

commit:     594ae1a45e2227f1c5daaef5d0ab74510ef8441d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug  9 15:40:37 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug 11 13:20:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=594ae1a4

net-libs/libsrtp: Enable multilib build in :2

 net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild | 75 ++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild b/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
new file mode 100644
index 00000000000..c15b98e7a29
--- /dev/null
+++ b/net-libs/libsrtp/libsrtp-2.0.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal
+
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)"
+HOMEPAGE="https://github.com/cisco/libsrtp"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2/1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 -sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="aesicm console debug doc libressl openssl static-libs syslog test"
+
+RDEPEND="
+	openssl? (
+		!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+		libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+	)
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( CHANGES README TODO )
+
+PATCHES=( "${FILESDIR}/${PN}-pcap-automagic-r0.patch" )
+
+src_prepare() {
+	default
+
+	# test/rtpw.c is using /usr/share/dict/words assuming it exists
+	# using test/rtpw.c guaratees the file exists in any case
+	sed -i -e "s:/usr/share/dict/words:rtpw.c:" test/rtpw.c || die
+
+	eautoreconf
+
+	# sadly, tests are too broken to even consider using work-arounds
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	# stdout: default error output for messages in debug
+	# pcap: seems to be test-only
+	# openssl-kdf: OpenSSL 1.1.0+
+	econf \
+		--enable-stdout \
+		--disable-pcap \
+		--disable-openssl-kdf \
+		$(use_enable aesicm generic-aesicm) \
+		$(use_enable console) \
+		$(use_enable debug) \
+		$(use_enable openssl)
+}
+
+multilib_src_compile() {
+	use static-libs && emake ${PN}.a
+	emake shared_library
+	use test && emake test
+}
+
+multilib_src_test() {
+	LD_LIBRARY_PATH="${BUILD_DIR}" emake -j1 runtest
+
+	# Makefile.in has '$(testapp): libsrtp2.a'
+	if use !static-libs; then
+		rm libsrtp2.a || die
+	fi
+}
+
+multilib_src_install_all() {
+	# libsrtp.pdf can be generated with doxygen, but it seems to be broken.
+	use doc && DOCS+=( doc/*.txt )
+	einstalldocs
+}