1 |
commit: 91664da1598843b863eedcd633c728fa53740a6a |
2 |
Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 29 11:26:10 2022 +0000 |
4 |
Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 29 20:15:28 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91664da1 |
7 |
|
8 |
net-libs/libsrtp: add 2.4.2 |
9 |
|
10 |
Move to meson build system. |
11 |
|
12 |
Closes: https://github.com/gentoo/gentoo/pull/27055 |
13 |
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org> |
14 |
|
15 |
net-libs/libsrtp/Manifest | 1 + |
16 |
net-libs/libsrtp/files/libsrtp-2.4.2-doc.patch | 42 +++++++++++++++ |
17 |
net-libs/libsrtp/libsrtp-2.4.2.ebuild | 72 ++++++++++++++++++++++++++ |
18 |
3 files changed, 115 insertions(+) |
19 |
|
20 |
diff --git a/net-libs/libsrtp/Manifest b/net-libs/libsrtp/Manifest |
21 |
index e077b2f0b4af..a4c4c10f5c91 100644 |
22 |
--- a/net-libs/libsrtp/Manifest |
23 |
+++ b/net-libs/libsrtp/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST libsrtp-1.6.0.tar.gz 1648862 BLAKE2B 5526d7659db160df3b6d9f14922bd731d083f04c6dd084ef473c439d720733d0fd8b38bdfe92e30e05a8a94c41df965d04bca52601b2644352428b49b1ed9093 SHA512 5ac712d0d343c3b63ed248503cc7d33c637895a274c4434c91f513be117836f27cd5daba83088b4647bbd9c82d841e216e6346af8d485cb9ddcd35dee21d4887 |
26 |
DIST libsrtp-2.3.0.tar.gz 633819 BLAKE2B 9ea40e9689fabc29b7a2c637bd4e4a2c44eec79205a6e5c5e5abf1069dfec7ba28d868ba620462205d61fdb28d0ca3b8532c1f59db704edd508e01afb551d255 SHA512 34b1a01cb9a75aed175be09aadd2827224203b9801becc3fbc5214667cce79c3b87b0f59e4315583863ab5a2cc4fc81d56ab604a5e4c984518b8a8a2a7b77461 |
27 |
+DIST libsrtp-2.4.2.tar.gz 631393 BLAKE2B a062fb7a92294c66f1876c66bf05d9b11412a170c5f7221089680770ab85a62eabb68f781e487981b28602b1f4f7dbba07ebd44ed0248deaf6b9b56061227534 SHA512 6e4805e6d34b2050a6f68f629b0b42356b1d27f2cbaa6cc6166e56957609c3d9aa6b723dcc674e5c74180d122d27badd2f9496639ccb1e0c210b9e1f7949d0e2 |
28 |
|
29 |
diff --git a/net-libs/libsrtp/files/libsrtp-2.4.2-doc.patch b/net-libs/libsrtp/files/libsrtp-2.4.2-doc.patch |
30 |
new file mode 100644 |
31 |
index 000000000000..571c3f3c5d44 |
32 |
--- /dev/null |
33 |
+++ b/net-libs/libsrtp/files/libsrtp-2.4.2-doc.patch |
34 |
@@ -0,0 +1,42 @@ |
35 |
+--- a/doc/Doxyfile.in |
36 |
++++ b/doc/Doxyfile.in |
37 |
+@@ -771,13 +771,13 @@ WARN_LOGFILE = |
38 |
+ # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING |
39 |
+ # Note: If this tag is empty the current directory is searched. |
40 |
+ |
41 |
+-INPUT = ../README.md \ |
42 |
+- ../include/srtp.h \ |
43 |
+- ../crypto/include/auth.h \ |
44 |
+- ../crypto/include/cipher.h \ |
45 |
+- ../crypto/include/crypto_types.h \ |
46 |
+- ../crypto/include/err.h \ |
47 |
+- crypto_kernel.txt |
48 |
++INPUT = @TOP_SRCDIR@/README.md \ |
49 |
++ @TOP_SRCDIR@/include/srtp.h \ |
50 |
++ @TOP_SRCDIR@/crypto/include/auth.h \ |
51 |
++ @TOP_SRCDIR@/crypto/include/cipher.h \ |
52 |
++ @TOP_SRCDIR@/crypto/include/crypto_types.h \ |
53 |
++ @TOP_SRCDIR@/crypto/include/err.h \ |
54 |
++ @TOP_SRCDIR@/doc/crypto_kernel.txt |
55 |
+ |
56 |
+ # This tag can be used to specify the character encoding of the source files |
57 |
+ # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses |
58 |
+@@ -1104,7 +1104,7 @@ HTML_FOOTER = |
59 |
+ # obsolete. |
60 |
+ # This tag requires that the tag GENERATE_HTML is set to YES. |
61 |
+ |
62 |
+-HTML_STYLESHEET = docs.css |
63 |
++HTML_STYLESHEET = @TOP_SRCDIR@/doc/docs.css |
64 |
+ |
65 |
+ # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined |
66 |
+ # cascading style sheets that are included after the standard style sheets |
67 |
+--- a/doc/meson.build |
68 |
++++ b/doc/meson.build |
69 |
+@@ -8,6 +8,7 @@ endif |
70 |
+ |
71 |
+ doc_config = configuration_data() |
72 |
+ doc_config.set('LIBSRTPVERSIONNUMBER', meson.project_version()) |
73 |
++doc_config.set('TOP_SRCDIR', meson.source_root()) |
74 |
+ |
75 |
+ doxyfile = configure_file(input: 'Doxyfile.in', |
76 |
+ output: 'Doxyfile', |
77 |
|
78 |
diff --git a/net-libs/libsrtp/libsrtp-2.4.2.ebuild b/net-libs/libsrtp/libsrtp-2.4.2.ebuild |
79 |
new file mode 100644 |
80 |
index 000000000000..593b1ed935be |
81 |
--- /dev/null |
82 |
+++ b/net-libs/libsrtp/libsrtp-2.4.2.ebuild |
83 |
@@ -0,0 +1,72 @@ |
84 |
+# Copyright 1999-2022 Gentoo Authors |
85 |
+# Distributed under the terms of the GNU General Public License v2 |
86 |
+ |
87 |
+EAPI=8 |
88 |
+ |
89 |
+inherit meson-multilib |
90 |
+ |
91 |
+DESCRIPTION="Open-source implementation of the Secure Real-time Transport Protocol (SRTP)" |
92 |
+HOMEPAGE="https://github.com/cisco/libsrtp" |
93 |
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
94 |
+ |
95 |
+LICENSE="BSD" |
96 |
+SLOT="2/1" |
97 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv -sparc ~x86 ~ppc-macos ~x64-macos" |
98 |
+IUSE="debug doc nss openssl static-libs test" |
99 |
+RESTRICT="!test? ( test )" |
100 |
+ |
101 |
+REQUIRED_USE="?? ( nss openssl )" |
102 |
+ |
103 |
+RDEPEND=" |
104 |
+ openssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) |
105 |
+ nss? ( >=dev-libs/nss-3.52[${MULTILIB_USEDEP}] ) |
106 |
+" |
107 |
+DEPEND="${RDEPEND}" |
108 |
+ |
109 |
+BDEPEND=" |
110 |
+ doc? ( app-doc/doxygen ) |
111 |
+ virtual/pkgconfig |
112 |
+" |
113 |
+ |
114 |
+PATCHES=( "${FILESDIR}"/libsrtp-2.4.2-doc.patch ) |
115 |
+ |
116 |
+multilib_src_configure() { |
117 |
+ local crypto_lib="none" |
118 |
+ use openssl && crypto_lib="openssl" |
119 |
+ use nss && crypto_lib="nss" |
120 |
+ |
121 |
+ # stdout: default error output for messages in debug |
122 |
+ # openssl-kdf: OpenSSL 1.1.0+ |
123 |
+ local emesonargs=( |
124 |
+ -Dcrypto-library=${crypto_lib} |
125 |
+ -Dcrypto-library-kdf=disabled |
126 |
+ -Dfuzzer=disabled |
127 |
+ -Dlog-stdout=true |
128 |
+ -Dpcap-tests=disabled |
129 |
+ -Ddefault_library=$(usex static-libs both shared) |
130 |
+ |
131 |
+ $(meson_feature test tests) |
132 |
+ $(meson_native_use_feature doc) |
133 |
+ $(meson_use debug debug-logging) |
134 |
+ ) |
135 |
+ meson_src_configure |
136 |
+} |
137 |
+ |
138 |
+multilib_src_compile() { |
139 |
+ meson_src_compile |
140 |
+ if multilib_is_native_abi && use doc; then |
141 |
+ meson_src_compile doc |
142 |
+ fi |
143 |
+} |
144 |
+ |
145 |
+multilib_src_install() { |
146 |
+ if multilib_is_native_abi && use doc; then |
147 |
+ dodoc -r html |
148 |
+ fi |
149 |
+ meson_src_install |
150 |
+} |
151 |
+ |
152 |
+multilib_src_install_all() { |
153 |
+ local DOCS=( CHANGES ) |
154 |
+ einstalldocs |
155 |
+} |