Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libshout/, media-libs/libshout/files/
Date: Thu, 13 Sep 2018 15:34:57
Message-Id: 1536852885.ded87ac360dd80ae69eb86dfb02183c4ceaf4652.polynomial-c@gentoo
1 commit: ded87ac360dd80ae69eb86dfb02183c4ceaf4652
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 13 15:34:27 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 13 15:34:45 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ded87ac3
7
8 media-libs/libshout: Fixed compilation with openssl-1.1
9
10 Closes: https://bugs.gentoo.org/655688
11 Package-Manager: Portage-2.3.49, Repoman-2.3.10
12
13 ...hout-2.4.1-tls-compile-with-OpenSSL-1.1.0.patch | 58 +++++++++++++++++++++
14 media-libs/libshout/libshout-2.4.1-r2.ebuild | 59 ++++++++++++++++++++++
15 2 files changed, 117 insertions(+)
16
17 diff --git a/media-libs/libshout/files/libshout-2.4.1-tls-compile-with-OpenSSL-1.1.0.patch b/media-libs/libshout/files/libshout-2.4.1-tls-compile-with-OpenSSL-1.1.0.patch
18 new file mode 100644
19 index 00000000000..befd16e3846
20 --- /dev/null
21 +++ b/media-libs/libshout/files/libshout-2.4.1-tls-compile-with-OpenSSL-1.1.0.patch
22 @@ -0,0 +1,58 @@
23 +From 01fafc449f0de56743d08e7976933c49e2915bfa Mon Sep 17 00:00:00 2001
24 +From: Sebastian Andrzej Siewior <sebastian@××××××××××.cc>
25 +Date: Wed, 15 Nov 2017 12:46:25 +0000
26 +Subject: [PATCH] tls: compile with OpenSSL 1.1.0
27 +
28 +The init functions are not longer required in OpenSSL 1.1 so I dropped
29 +them.
30 +
31 +TLSv1_client_method() should not be used because it enables only the
32 +TLSv1.0 protocol. Better is to use SSLv23_client_method() which enable
33 +all the protocols including TLSv1.2. With this functions SSLv2 and SSLv3
34 +is theoretically possible but as of today those protocols are usually
35 +build-time disabled.
36 +To avoid all this OpenSSL 1.1 provides TLS_client_method() which is aim
37 +to provide to highest TLS protocol version (same as
38 +SSLv23_client_method() but it is deprecated in 1.1).
39 +
40 +Signed-off-by: Sebastian Andrzej Siewior <sebastian@××××××××××.cc>
41 +---
42 + src/tls.c | 12 ++++++++----
43 + 1 file changed, 8 insertions(+), 4 deletions(-)
44 +
45 +diff --git a/src/tls.c b/src/tls.c
46 +index 4562c7327077..e0e5c1a5f079 100644
47 +--- a/src/tls.c
48 ++++ b/src/tls.c
49 +@@ -24,6 +24,7 @@
50 + #endif
51 +
52 + #include <shout/shout.h>
53 ++#include <string.h>
54 + #include "shout_private.h"
55 +
56 + #ifndef XXX_HAVE_X509_check_host
57 +@@ -61,14 +62,17 @@ shout_tls_t *shout_tls_new(shout_t *self, sock_t socket)
58 +
59 + static inline int tls_setup(shout_tls_t *tls)
60 + {
61 +- SSL_METHOD *meth;
62 +-
63 ++ const SSL_METHOD *meth;
64 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
65 + SSL_library_init();
66 + SSL_load_error_strings();
67 + SSLeay_add_all_algorithms();
68 +- SSLeay_add_ssl_algorithms();
69 ++ SSLeay_add_ssl_algorithms();
70 +
71 +- meth = TLSv1_client_method();
72 ++ meth = SSLv23_client_method();
73 ++#else
74 ++ meth = TLS_client_method();
75 ++#endif
76 + if (!meth)
77 + goto error;
78 +
79 +--
80 +2.15.0
81
82 diff --git a/media-libs/libshout/libshout-2.4.1-r2.ebuild b/media-libs/libshout/libshout-2.4.1-r2.ebuild
83 new file mode 100644
84 index 00000000000..be0811811b8
85 --- /dev/null
86 +++ b/media-libs/libshout/libshout-2.4.1-r2.ebuild
87 @@ -0,0 +1,59 @@
88 +# Copyright 1999-2018 Gentoo Foundation
89 +# Distributed under the terms of the GNU General Public License v2
90 +
91 +EAPI=7
92 +
93 +inherit autotools multilib-minimal
94 +
95 +DESCRIPTION="library for connecting and sending data to icecast servers"
96 +HOMEPAGE="http://www.icecast.org/"
97 +SRC_URI="http://downloads.xiph.org/releases/${PN}/${P}.tar.gz"
98 +
99 +LICENSE="LGPL-2"
100 +SLOT="0"
101 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
102 +IUSE="libressl speex static-libs theora"
103 +
104 +RDEPEND="
105 + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
106 + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
107 + !libressl? ( dev-libs/openssl:0= )
108 + libressl? ( dev-libs/libressl )
109 + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
110 + theora? ( >=media-libs/libtheora-1.1.1[${MULTILIB_USEDEP}] )
111 +"
112 +DEPEND="${RDEPEND}
113 + virtual/pkgconfig
114 +"
115 +
116 +MULTILIB_WRAPPED_HEADERS=(
117 + /usr/include/shout/shout.h
118 +)
119 +
120 +DOCS=( README examples/example.c )
121 +
122 +PATCHES=(
123 + "${FILESDIR}"/${PN}-2.4.1-underlinking.patch
124 + "${FILESDIR}"/${PN}-2.4.1-tls-compile-with-OpenSSL-1.1.0.patch
125 +)
126 +
127 +src_prepare() {
128 + default
129 + eautoreconf
130 + multilib_copy_sources
131 +}
132 +
133 +multilib_src_configure() {
134 + local myeconfargs=(
135 + $(use_enable static-libs static)
136 + $(use_enable theora)
137 + $(use_enable speex)
138 + )
139 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
140 +}
141 +
142 +multilib_src_install_all() {
143 + einstalldocs
144 + rm -rf "${ED%/}"/usr/share/doc/${PN} || die
145 + find "${D}" -name '*.la' -delete || die
146 +}