Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/, ...
Date: Sat, 30 Nov 2019 07:50:19
Message-Id: 1575100136.90d194bc8a80a478c91f5196da9eac770a755ca2.juippis@gentoo
1 commit: 90d194bc8a80a478c91f5196da9eac770a755ca2
2 Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
3 AuthorDate: Mon Nov 18 09:45:56 2019 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 30 07:48:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d194bc
7
8 net-libs/pjproject: Bump to 2.9.
9
10 Drop libressl patches (upstream).
11 Rebase configure for --enable-ssl.
12 Pull in asterisk config_site.h file.
13 Remove blocked on mediastreamer-bcg729 (bcg729 and mediastreamer-bcg729
14 are the actual blockers and marked as such already).
15 Use ${ED} instead of ${D} on install
16 Correctly rm static libs if USE=-static-libs
17 Set the PJMEDIA_HAS_VIDEO #define as per https://bugs.gentoo.org/652196
18 Update package.use.mask for ppc to mask g729 for pjproject since
19 net-libs/bcg729 isn't available (yet) on ppc.
20
21 Closes: https://bugs.gentoo.org/609702
22 Closes: https://bugs.gentoo.org/618352
23 Closes: https://bugs.gentoo.org/652196
24 Closes: https://bugs.gentoo.org/650312
25 Closes: https://bugs.gentoo.org/653482
26 Closes: https://bugs.gentoo.org/657014
27 Closes: https://bugs.gentoo.org/686796
28 Package-Manager: Portage-2.3.76, Repoman-2.3.16
29 Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
30 Closes: https://github.com/gentoo/gentoo/pull/13712
31 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
32
33 net-libs/pjproject/Manifest | 1 +
34 .../pjproject/files/pjproject-2.9-config_site.h | 74 +++++++++++++
35 .../pjproject/files/pjproject-2.9-ssl-enable.patch | 100 +++++++++++++++++
36 net-libs/pjproject/metadata.xml | 3 +-
37 net-libs/pjproject/pjproject-2.9.ebuild | 120 +++++++++++++++++++++
38 .../linux/powerpc/ppc32/17.0/package.use.mask | 3 +
39 .../ppc64/17.0/32bit-userland/package.use.mask | 3 +
40 7 files changed, 303 insertions(+), 1 deletion(-)
41
42 diff --git a/net-libs/pjproject/Manifest b/net-libs/pjproject/Manifest
43 index 12e01535ff4..3131fb359e1 100644
44 --- a/net-libs/pjproject/Manifest
45 +++ b/net-libs/pjproject/Manifest
46 @@ -1,2 +1,3 @@
47 DIST pjproject-2.7.1.tar.bz2 4880007 BLAKE2B 33fca89f07abc0b9662b1070c96b903c236a60149734755286dad3111411dbeef5779077a77d21112be6db2957cb7e18c5c833b3c5fd32c26be44d4550fb215e SHA512 cd15afee2a02659668ff228b2652d2bd179393e3b5031afae1c326354fb9676babc08eb689e466165536abc360684299b4fdb41dbb1148aed89afe1ce7e5d979
48 DIST pjproject-2.7.2.tar.bz2 4994233 BLAKE2B 44ecaf0997d5dd9b18e0b811cead7c9104e63894fa06fb1d64e79b60fa4210968fd90ef47e5f5be3629675363c8756ce3bc1834caa9700654ab4c53efe676ee7 SHA512 3d355ffcbbeed62cfc711e574a987dc06043ccf4f2625820adffa89167022b8306fcee3fada71d3d45e7b902fc9c65ac8221de101cbafed25362a3921f702afd
49 +DIST pjproject-2.9.tar.bz2 5009546 BLAKE2B 853f86e57c0f58943e977856bebc7dc20684ac4a6a16a55f3fe4ddf58ca58187bdc1011c5df2bc72de690f1695484012b582e56dd0e88a624ef319a5f3623772 SHA512 a65823a86ad0cd76890cf7dd2485f7547fd90aea2ef631c5420c009b35f39eda3b78551a42fc2816c2470de9eb728c26497774a8494824472ecaa1d2889cc20b
50
51 diff --git a/net-libs/pjproject/files/pjproject-2.9-config_site.h b/net-libs/pjproject/files/pjproject-2.9-config_site.h
52 new file mode 100644
53 index 00000000000..d41ac1d1947
54 --- /dev/null
55 +++ b/net-libs/pjproject/files/pjproject-2.9-config_site.h
56 @@ -0,0 +1,74 @@
57 +/*
58 + * Based off of the Asterisk config_site.h file.
59 + *
60 + * In general it's the same with some removals due to being ebuild-managed.
61 + */
62 +
63 +#include <sys/select.h>
64 +
65 +/* handled by ebuild, default to disabled here */
66 +#ifndef PJMEDIA_HAS_SRTP
67 +#define PJMEDIA_HAS_SRTP 0
68 +#endif
69 +
70 +#define PJ_MAX_HOSTNAME (256)
71 +#define PJSIP_MAX_URL_SIZE (512)
72 +#ifdef PJ_HAS_LINUX_EPOLL
73 +#define PJ_IOQUEUE_MAX_HANDLES (5000)
74 +#else
75 +#define PJ_IOQUEUE_MAX_HANDLES (FD_SETSIZE)
76 +#endif
77 +#define PJ_IOQUEUE_HAS_SAFE_UNREG 1
78 +#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)
79 +
80 +#define PJ_SCANNER_USE_BITWISE 0
81 +#define PJ_OS_HAS_CHECK_STACK 0
82 +
83 +#ifndef PJ_LOG_MAX_LEVEL
84 +#define PJ_LOG_MAX_LEVEL 6
85 +#endif
86 +
87 +#define PJ_ENABLE_EXTRA_CHECK 1
88 +#define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
89 +#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
90 +#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
91 +#define PJSIP_UDP_SO_RCVBUF_SIZE (512*1024)
92 +#define PJSIP_SAFE_MODULE 0
93 +#define PJ_HAS_STRICMP_ALNUM 0
94 +
95 +/*
96 + * Do not ever enable PJ_HASH_USE_OWN_TOLOWER because the algorithm is
97 + * inconsistently used when calculating the hash value and doesn't
98 + * convert the same characters as pj_tolower()/tolower(). Thus you
99 + * can get different hash values if the string hashed has certain
100 + * characters in it. (ASCII '@', '[', '\\', ']', '^', and '_')
101 + */
102 +#undef PJ_HASH_USE_OWN_TOLOWER
103 +
104 +/*
105 + It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
106 + Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
107 +*/
108 +#undef PJSIP_UNESCAPE_IN_PLACE
109 +#define PJSIP_MAX_PKT_LEN 32000
110 +
111 +#undef PJ_TODO
112 +#define PJ_TODO(x)
113 +
114 +/* Defaults too low for WebRTC */
115 +#define PJ_ICE_MAX_CAND 32
116 +#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * PJ_ICE_MAX_CAND)
117 +
118 +/* Increase limits to allow more formats */
119 +#define PJMEDIA_MAX_SDP_FMT 64
120 +#define PJMEDIA_MAX_SDP_BANDW 4
121 +#define PJMEDIA_MAX_SDP_ATTR (PJMEDIA_MAX_SDP_FMT*2 + 4)
122 +#define PJMEDIA_MAX_SDP_MEDIA 16
123 +
124 +/*
125 + * Turn off the periodic sending of CRLNCRLN. Default is on (90 seconds),
126 + * which conflicts with the global section's keep_alive_interval option in
127 + * pjsip.conf.
128 + */
129 +#define PJSIP_TCP_KEEP_ALIVE_INTERVAL 0
130 +#define PJSIP_TLS_KEEP_ALIVE_INTERVAL 0
131
132 diff --git a/net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch b/net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch
133 new file mode 100644
134 index 00000000000..bb8a11d7f45
135 --- /dev/null
136 +++ b/net-libs/pjproject/files/pjproject-2.9-ssl-enable.patch
137 @@ -0,0 +1,100 @@
138 +From 2942c73cd3b3389ec1a35258f22ac9d0f0742de1 Mon Sep 17 00:00:00 2001
139 +From: Jaco Kroon <jaco@×××××××.za>
140 +Date: Thu, 24 May 2018 15:40:33 +0200
141 +Subject: [PATCH] Fix support for --enable-ssl.
142 +
143 +This change enables the explicit use of --enable-ssl in such a way that
144 +package managers such as portage (Gentoo) that explicitly does
145 +--enable-ssl or --disable-ssl will get the results that it's looking
146 +for.
147 +
148 +Without this specifying --enable-ssl would end up actually disabling it.
149 +
150 +Additionally, if --enable-ssl is specified but the script ends up being
151 +unable to enable ssl it will fail.
152 +---
153 + aconfigure | 16 ++++++++++++----
154 + aconfigure.ac | 15 ++++++++++++---
155 + 2 files changed, 24 insertions(+), 7 deletions(-)
156 +
157 +diff --git a/aconfigure b/aconfigure
158 +index 0cf17faae..57bdfba87 100755
159 +--- a/aconfigure
160 ++++ b/aconfigure
161 +@@ -8001,8 +8001,9 @@ if test "${enable_ssl+set}" = set; then :
162 + $as_echo "Checking if SSL support is disabled... yes" >&6; }
163 + fi
164 +
165 +-else
166 ++fi
167 +
168 ++if test "x$ac_no_ssl" != "x1"; then
169 + if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
170 + CFLAGS="$CFLAGS -I$with_ssl/include"
171 + CPPFLAGS="$CPPFLAGS -I$with_ssl/include"
172 +@@ -8317,16 +8318,23 @@ $as_echo "GnuTLS library found, SSL support enabled" >&6; }
173 +
174 + ac_ssl_backend="gnutls"
175 + else
176 +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found, disabling SSL support **" >&5
177 +-$as_echo "** No GnuTLS libraries found, disabling SSL support **" >&6; }
178 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ** No GnuTLS libraries found **" >&5
179 ++$as_echo "** No GnuTLS libraries found **" >&6; }
180 + fi
181 +
182 + fi
183 +
184 ++ if test "x$ac_ssl_backend" = "x"; then
185 ++ if test "x$enable_ssl" = "xyes"; then
186 ++ as_fn_error $? "SSL Support requested but neither OpenSSL nor GnuTLS operational" "$LINENO" 5
187 ++ else
188 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: No SSL detected, disabling SSL support" >&5
189 ++$as_echo "No SSL detected, disabling SSL support" >&6; }
190 ++ fi
191 ++ fi
192 + fi
193 +
194 +
195 +-
196 + # Check whether --with-opencore-amrnb was given.
197 + if test "${with_opencore_amrnb+set}" = set; then :
198 + withval=$with_opencore_amrnb; as_fn_error $? "This option is obsolete and replaced by --with-opencore-amr=DIR" "$LINENO" 5
199 +diff --git a/aconfigure.ac b/aconfigure.ac
200 +index 8d7d944a1..45c42756b 100644
201 +--- a/aconfigure.ac
202 ++++ b/aconfigure.ac
203 +@@ -1607,7 +1607,8 @@ AC_ARG_ENABLE(ssl,
204 + AC_MSG_RESULT([Checking if SSL support is disabled... yes])
205 + fi
206 + ],
207 +- [
208 ++ [])
209 ++if test "x$ac_no_ssl" != "x1"; then
210 + if test "x$with_ssl" != "xno" -a "x$with_ssl" != "x"; then
211 + CFLAGS="$CFLAGS -I$with_ssl/include"
212 + CPPFLAGS="$CPPFLAGS -I$with_ssl/include"
213 +@@ -1692,11 +1693,19 @@ AC_ARG_ENABLE(ssl,
214 + AC_DEFINE(PJ_SSL_SOCK_IMP, PJ_SSL_SOCK_IMP_GNUTLS)
215 + ac_ssl_backend="gnutls"
216 + else
217 +- AC_MSG_RESULT([** No GnuTLS libraries found, disabling SSL support **])
218 ++ AC_MSG_RESULT([** No GnuTLS libraries found **])
219 + fi
220 +
221 + fi
222 +- ])
223 ++
224 ++ if test "x$ac_ssl_backend" = "x"; then
225 ++ if test "x$enable_ssl" = "xyes"; then
226 ++ AC_MSG_ERROR([SSL Support requested but neither OpenSSL nor GnuTLS operational])
227 ++ else
228 ++ AC_MSG_RESULT([No SSL detected, disabling SSL support])
229 ++ fi
230 ++ fi
231 ++fi
232 +
233 + dnl # Obsolete option --with-opencore-amrnb
234 + AC_ARG_WITH(opencore-amrnb,
235 +--
236 +2.23.0
237 +
238
239 diff --git a/net-libs/pjproject/metadata.xml b/net-libs/pjproject/metadata.xml
240 index d5f49d1aa55..6d51c770dce 100644
241 --- a/net-libs/pjproject/metadata.xml
242 +++ b/net-libs/pjproject/metadata.xml
243 @@ -11,17 +11,18 @@
244 </maintainer>
245 <use>
246 <flag name="amr">Inlcude AMR codec in the build</flag>
247 - <flag name="v4l2">Include Video4Linux v2 support in the build</flag>
248 <flag name="epoll">Use /dev/epoll ioqueue on Linux (experimental)</flag>
249 <flag name="g711">Include G.711 codecs in the build</flag>
250 <flag name="g722">Include G.722 codec in the build</flag>
251 <flag name="g7221">Include G.722.1 codec in the build</flag>
252 + <flag name="g729">Include G.729 codec via net-libs/bcg729</flag>
253 <flag name="ilbc">Include iLBC codec in the build</flag>
254 <flag name="l16">Include Linear/L16 codec family in the build</flag>
255 <flag name="libyuv">Include libyuv in the build</flag>
256 <flag name="openh264">Include Open H.264 support in the build</flag>
257 <flag name="resample">Include resampling implementations in the build</flag>
258 <flag name="silk">Include SILK support in the build</flag>
259 + <flag name="v4l2">Include Video4Linux v2 support in the build</flag>
260 <flag name="webrtc">Enable WebRTC support</flag>
261 </use>
262 </pkgmetadata>
263
264 diff --git a/net-libs/pjproject/pjproject-2.9.ebuild b/net-libs/pjproject/pjproject-2.9.ebuild
265 new file mode 100644
266 index 00000000000..5a4d582b1e2
267 --- /dev/null
268 +++ b/net-libs/pjproject/pjproject-2.9.ebuild
269 @@ -0,0 +1,120 @@
270 +# Copyright 1999-2019 Gentoo Authors
271 +# Distributed under the terms of the GNU General Public License v2
272 +
273 +EAPI=7
274 +
275 +inherit autotools flag-o-matic
276 +
277 +DESCRIPTION="Open source SIP, Media, and NAT Traversal Library"
278 +HOMEPAGE="https://www.pjsip.org/"
279 +SRC_URI="https://www.pjsip.org/release/${PV}/${P}.tar.bz2"
280 +KEYWORDS="~amd64 ~ppc ~x86"
281 +
282 +LICENSE="GPL-2"
283 +SLOT="0"
284 +
285 +# g729 not included due to special bcg729 handling.
286 +CODEC_FLAGS="g711 g722 g7221 gsm ilbc speex l16"
287 +VIDEO_FLAGS="sdl ffmpeg v4l2 openh264 libyuv"
288 +SOUND_FLAGS="alsa portaudio"
289 +IUSE="amr debug epoll examples ipv6 libressl opus resample silk ssl static-libs webrtc
290 + ${CODEC_FLAGS} g729
291 + ${VIDEO_FLAGS}
292 + ${SOUND_FLAGS}"
293 +
294 +PATCHES=(
295 + "${FILESDIR}/pjproject-2.9-ssl-enable.patch"
296 +)
297 +
298 +RDEPEND="net-libs/libsrtp:=
299 +
300 + alsa? ( media-libs/alsa-lib )
301 + amr? ( media-libs/opencore-amr )
302 + ffmpeg? ( virtual/ffmpeg:= )
303 + g729? ( media-libs/bcg729 )
304 + gsm? ( media-sound/gsm )
305 + ilbc? ( dev-libs/ilbc-rfc3951 )
306 + openh264? ( media-libs/openh264 )
307 + opus? ( media-libs/opus )
308 + portaudio? ( media-libs/portaudio )
309 + resample? ( media-libs/libsamplerate )
310 + sdl? ( media-libs/libsdl )
311 + speex? ( media-libs/speexdsp )
312 + ssl? (
313 + !libressl? ( dev-libs/openssl:0= )
314 + libressl? ( dev-libs/libressl:0= )
315 + )
316 +"
317 +DEPEND="${RDEPEND}"
318 +BDEPEND="virtual/pkgconfig"
319 +
320 +src_prepare() {
321 + default
322 + rm configure || die "Unable to remove unwanted wrapper"
323 + mv aconfigure.ac configure.ac || die "Unable to rename configure script source"
324 + eautoreconf
325 +
326 + cp "${FILESDIR}/pjproject-2.9-config_site.h" "${S}/pjlib/include/pj/config_site.h" || die "Unable to create config_site.h"
327 +}
328 +
329 +src_configure() {
330 + local myconf=()
331 + local videnable="--disable-video"
332 + local t
333 +
334 + use debug || append-cflags -DNDEBUG=1
335 + use ipv6 && append-cflags -DPJ_HAS_IPV6=1
336 + append-cflags -DPJMEDIA_HAS_SRTP=1
337 +
338 + for t in ${CODEC_FLAGS}; do
339 + myconf+=( $(use_enable ${t} ${t}-codec) )
340 + done
341 + myconf+=( $(use_enable g729 bcg729) )
342 +
343 + for t in ${VIDEO_FLAGS}; do
344 + myconf+=( $(use_enable ${t}) )
345 + use "${t}" && videnable="--enable-video"
346 + done
347 +
348 + [ "${videnable}" = "--enable-video" ] && append-cflags -DPJMEDIA_HAS_VIDEO=1
349 +
350 + econf \
351 + --enable-shared \
352 + --with-external-srtp \
353 + ${videnable} \
354 + $(use_enable alsa sound) \
355 + $(use_enable amr opencore-amr) \
356 + $(use_enable epoll) \
357 + $(use_enable opus) \
358 + $(use_enable portaudio ext-sound) \
359 + $(use_enable resample libsamplerate) \
360 + $(use_enable resample resample-dll) \
361 + $(use_enable resample) \
362 + $(use_enable silk) \
363 + $(use_enable speex speex-aec) \
364 + $(use_enable ssl) \
365 + $(use_with gsm external-gsm) \
366 + $(use_with portaudio external-pa) \
367 + $(use_with speex external-speex) \
368 + $(usex webrtc '' --disable-libwebrtc) \
369 + "${myconf[@]}"
370 +}
371 +
372 +src_compile() {
373 + emake dep
374 + emake
375 +}
376 +
377 +src_install() {
378 + default
379 +
380 + newbin pjsip-apps/bin/pjsua-${CHOST} pjsua
381 + newbin pjsip-apps/bin/pjsystest-${CHOST} pjsystest
382 +
383 + if use examples; then
384 + insinto "/usr/share/doc/${PF}/examples"
385 + doins -r pjsip-apps/src/samples
386 + fi
387 +
388 + use static-libs || rm "${ED}/usr/$(get_libdir)"/*.a || die "Error removing static archives"
389 +}
390
391 diff --git a/profiles/default/linux/powerpc/ppc32/17.0/package.use.mask b/profiles/default/linux/powerpc/ppc32/17.0/package.use.mask
392 new file mode 100644
393 index 00000000000..577ff05bc45
394 --- /dev/null
395 +++ b/profiles/default/linux/powerpc/ppc32/17.0/package.use.mask
396 @@ -0,0 +1,3 @@
397 +# Jaco Kroon <jaco@××××××.za> (2019-11-28)
398 +# Unfortunately net-libs/bcg729 isn't available for ppc
399 +net-libs/pjproject g729
400
401 diff --git a/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/package.use.mask b/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/package.use.mask
402 new file mode 100644
403 index 00000000000..577ff05bc45
404 --- /dev/null
405 +++ b/profiles/default/linux/powerpc/ppc64/17.0/32bit-userland/package.use.mask
406 @@ -0,0 +1,3 @@
407 +# Jaco Kroon <jaco@××××××.za> (2019-11-28)
408 +# Unfortunately net-libs/bcg729 isn't available for ppc
409 +net-libs/pjproject g729