commit: f2a0fcd437ebcf92b336914f997cb26d8baaad4e Author: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> AuthorDate: Sun Jan 17 19:28:36 2021 +0000 Commit: Quentin Retornaz <gentoo <AT> retornaz <DOT> com> CommitDate: Sun Jan 17 19:28:36 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=f2a0fcd4
net-libs/libnice: new package Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com> net-libs/libnice/Manifest | 2 + .../libnice/files/libnice-0.1.13-gstreamer.patch | 40 +++++++++++++++ .../libnice/files/libnice-0.1.15-libressl.patch | 57 +++++++++++++++++++++ net-libs/libnice/libnice-0.1.13.ebuild | 57 +++++++++++++++++++++ net-libs/libnice/libnice-0.1.15.ebuild | 58 ++++++++++++++++++++++ net-libs/libnice/metadata.xml | 8 +++ 6 files changed, 222 insertions(+) diff --git a/net-libs/libnice/Manifest b/net-libs/libnice/Manifest new file mode 100644 index 0000000..35bfe6c --- /dev/null +++ b/net-libs/libnice/Manifest @@ -0,0 +1,2 @@ +DIST libnice-0.1.13.tar.gz 912374 BLAKE2B ae8ac3af7b5f355e3c7b961bfa60759ba71c8cc6ddb6cb5faaf1c6fe347785f36340a9f8977a1689595c265349a1b34305f41288cf951fa938b0411cec3acc0d SHA512 c9bb81e8cd0b4e3673dba07ce08a16dd8821831339b44f1006510cdc09f9ae4c6eb7d43230711a2509867acb8d7df71821c411830dbf71c5a5d7e802f14a32c1 +DIST libnice-0.1.15.tar.gz 1064100 BLAKE2B 81f06ba599b01084586a8d904b9ae513d6bc3531ec42674648fda320eea6cd9348acf423571922bab4e338bf135f85b292046352ed6f5e4fefba736d787b1ff1 SHA512 60a8bcca06c0ab300dfabbf13e45aeac2085d553c420c5cc4d2fdeb46b449b2b9c9aee8015b0662c16bd1cecf5a49824b7e24951a8a0b66a87074cb00a619c0c diff --git a/net-libs/libnice/files/libnice-0.1.13-gstreamer.patch b/net-libs/libnice/files/libnice-0.1.13-gstreamer.patch new file mode 100644 index 0000000..136d854 --- /dev/null +++ b/net-libs/libnice/files/libnice-0.1.13-gstreamer.patch @@ -0,0 +1,40 @@ +From 76ff4aee9fe963842dd17748d14c68552c5dcda3 Mon Sep 17 00:00:00 2001 +From: Timo Gurr <[email protected]> +Date: Mon, 1 Jun 2015 16:10:16 +0200 +Subject: [PATCH] configure: Fix configure failure when building without + gstreamer support + +Error introduced in 20ea22e0a11a9bdfe4d8125b68083249b694338a, resulting in a +configure/build error when building without gstreamer: + +configure: error: conditional "HAVE_GST_CHECK" was never defined. +Usually this means the macro was only invoked conditionally. +--- + configure.ac | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6031cec..64a571f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -231,9 +231,6 @@ AS_IF([test "$with_gstreamer" != no], [ + [ + have_gst_check=no + ]) +- +- AM_CONDITIONAL(HAVE_GST_CHECK, test "$have_gst_check" = yes) +- + ]) + + AS_IF([test "$with_gstreamer010" != no], [ +@@ -260,6 +257,7 @@ AC_SUBST(gstplugindir) + AC_SUBST(gstplugin010dir) + + AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes) ++AM_CONDITIONAL(HAVE_GST_CHECK, test "$have_gst_check" = yes) + AM_CONDITIONAL(WITH_GSTREAMER010, test "$with_gstreamer010" = yes) + + GUPNP_IGD_REQUIRED=0.2.4 +-- +2.4.1 + diff --git a/net-libs/libnice/files/libnice-0.1.15-libressl.patch b/net-libs/libnice/files/libnice-0.1.15-libressl.patch new file mode 100644 index 0000000..6c38069 --- /dev/null +++ b/net-libs/libnice/files/libnice-0.1.15-libressl.patch @@ -0,0 +1,57 @@ +From 926afef019ca9f297cebbe13479159ac5c087f00 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <[email protected]> +Date: Fri, 15 Feb 2019 20:45:34 +0200 +Subject: [PATCH] stun: Fix LibreSSL support + +Closes #71 +--- + stun/stunhmac.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/stun/stunhmac.c b/stun/stunhmac.c +index c7d1432..c9d183f 100644 +--- a/stun/stunhmac.c ++++ b/stun/stunhmac.c +@@ -75,7 +75,8 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha, + assert (ret == 1); + #endif + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + HMAC_CTX stackctx; + HMAC_CTX *ctx = &stackctx; + HMAC_CTX_init (ctx); +@@ -101,7 +102,8 @@ void stun_sha1 (const uint8_t *msg, size_t len, size_t msg_len, uint8_t *sha, + + TRY (HMAC_Final (ctx, sha, NULL)); + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + HMAC_CTX_cleanup (ctx); + #else + HMAC_CTX_free (ctx); +@@ -172,7 +174,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len, + #ifdef HAVE_OPENSSL + EVP_MD_CTX *ctx; + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + ctx = EVP_MD_CTX_create (); + #else + ctx = EVP_MD_CTX_new (); +@@ -186,7 +189,8 @@ void stun_hash_creds (const uint8_t *realm, size_t realm_len, + EVP_DigestUpdate (ctx, password_trimmed, password_len); + EVP_DigestFinal_ex (ctx, md5, NULL); + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL) + EVP_MD_CTX_destroy (ctx); + #else + EVP_MD_CTX_free (ctx); +-- +2.20.1 + diff --git a/net-libs/libnice/libnice-0.1.13.ebuild b/net-libs/libnice/libnice-0.1.13.ebuild new file mode 100644 index 0000000..90e98c9 --- /dev/null +++ b/net-libs/libnice/libnice-0.1.13.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools eutils ltprune multilib-minimal xdg-utils + +DESCRIPTION="An implementation of the Interactice Connectivity Establishment standard (ICE)" +HOMEPAGE="https://nice.freedesktop.org/wiki/" +SRC_URI="https://nice.freedesktop.org/releases/${P}.tar.gz" + +LICENSE="|| ( MPL-1.1 LGPL-2.1 )" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="+introspection +upnp" + +RDEPEND=" + >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] + introspection? ( >=dev-libs/gobject-introspection-1.30.0:= ) + upnp? ( >=net-libs/gupnp-igd-0.2.4:=[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + dev-util/gtk-doc-am + virtual/pkgconfig +" + +# Many tests fail from time to time, for example: +# https://bugs.freedesktop.org/show_bug.cgi?id=81691 +RESTRICT="test" + +src_prepare() { + xdg_environment_reset + + # https://bugs.freedesktop.org/show_bug.cgi?id=90801 + epatch "${FILESDIR}"/${P}-gstreamer.patch + eautoreconf +} + +multilib_src_configure() { + # gstreamer plugin split off into media-plugins/gst-plugins-libnice + ECONF_SOURCE=${S} \ + econf \ + --disable-static \ + --disable-static-plugins \ + --without-gstreamer \ + --without-gstreamer-0.10 \ + $(multilib_native_use_enable introspection) \ + $(use_enable upnp gupnp) + + if multilib_is_native_abi; then + ln -s {"${S}"/,}docs/reference/libnice/html || die + fi +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files --modules +} diff --git a/net-libs/libnice/libnice-0.1.15.ebuild b/net-libs/libnice/libnice-0.1.15.ebuild new file mode 100644 index 0000000..aee3c3f --- /dev/null +++ b/net-libs/libnice/libnice-0.1.15.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit multilib-minimal xdg + +DESCRIPTION="An implementation of the Interactice Connectivity Establishment standard (ICE)" +HOMEPAGE="https://nice.freedesktop.org/wiki/" +SRC_URI="https://nice.freedesktop.org/releases/${P}.tar.gz" + +LICENSE="|| ( MPL-1.1 LGPL-2.1 )" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="+gnutls +introspection libressl +upnp" + +RDEPEND=" + >=dev-libs/glib-2.48:2[${MULTILIB_USEDEP}] + introspection? ( >=dev-libs/gobject-introspection-1.30.0:= ) + gnutls? ( >=net-libs/gnutls-2.12.0:0=[${MULTILIB_USEDEP}] ) + !gnutls? ( + libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] ) + !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) ) + upnp? ( >=net-libs/gupnp-igd-0.2.4:=[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + dev-util/glib-utils + >=dev-util/gtk-doc-am-1.10 + virtual/pkgconfig +" + +PATCHES=( "${FILESDIR}/${P}-libressl.patch" ) # https://gitlab.freedesktop.org/libnice/libnice/merge_requests/50 + +multilib_src_configure() { + # gstreamer plugin split off into media-plugins/gst-plugins-libnice + ECONF_SOURCE=${S} \ + econf \ + --enable-compile-warnings=yes \ + --disable-static \ + --disable-static-plugins \ + --without-gstreamer \ + --without-gstreamer-0.10 \ + --with-crypto-library=$(usex gnutls gnutls openssl) \ + $(multilib_native_use_enable introspection) \ + $(use_enable upnp gupnp) + + if multilib_is_native_abi; then + ln -s {"${S}"/,}docs/reference/libnice/html || die + fi +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name '*.la' -delete || die +} + +multilib_src_test() { + emake -j1 check +} diff --git a/net-libs/libnice/metadata.xml b/net-libs/libnice/metadata.xml new file mode 100644 index 0000000..3998080 --- /dev/null +++ b/net-libs/libnice/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>[email protected]</email> + <name>Gentoo GNOME Desktop</name> +</maintainer> +</pkgmetadata>
