summaryrefslogtreecommitdiffstats
path: root/third_party/libsrtp/src/moz.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/libsrtp/src/moz.build
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libsrtp/src/moz.build')
-rw-r--r--third_party/libsrtp/src/moz.build77
1 files changed, 77 insertions, 0 deletions
diff --git a/third_party/libsrtp/src/moz.build b/third_party/libsrtp/src/moz.build
new file mode 100644
index 0000000000..e145c63350
--- /dev/null
+++ b/third_party/libsrtp/src/moz.build
@@ -0,0 +1,77 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# we don't use mbedtls
+
+UNIFIED_SOURCES += [
+ 'crypto/cipher/aes_gcm_nss.c',
+ 'crypto/cipher/aes_icm_nss.c',
+ 'crypto/cipher/cipher.c',
+ 'crypto/cipher/cipher_test_cases.c',
+ 'crypto/cipher/null_cipher.c',
+ 'crypto/hash/auth.c',
+ 'crypto/hash/auth_test_cases.c',
+ 'crypto/hash/hmac.c',
+ 'crypto/hash/null_auth.c',
+ 'crypto/hash/sha1.c',
+ 'crypto/kernel/alloc.c',
+ 'crypto/kernel/crypto_kernel.c',
+ 'crypto/kernel/err.c',
+ 'crypto/kernel/key.c',
+ 'crypto/math/datatypes.c',
+ 'crypto/replay/rdb.c',
+ 'crypto/replay/rdbx.c',
+ 'srtp/srtp.c',
+]
+
+Library('nksrtp_s')
+
+include('/ipc/chromium/chromium-config.mozbuild')
+
+FINAL_LIBRARY = 'xul'
+
+LOCAL_INCLUDES += [
+ 'crypto/include',
+ 'include',
+]
+
+DEFINES['PACKAGE_STRING'] = '"libsrtp2 2.2.0-pre"'
+DEFINES['PACKAGE_VERSION'] = '"2.2.0-pre"'
+
+# This is needed to enable the be32_to_cpu and be64_to_cpu
+# macro's in datatypes.h
+DEFINES['HAVE_CONFIG_H'] = 1
+
+# We know stdint.h will define uint8/16/32/64_t, so we don't need
+# to define SIZEOF_UNSIGNED_LONG/SIZEOF_UNSIGNED_LONG_LONG
+for var in ('HAVE_STDLIB_H', 'HAVE_UINT8_T', 'HAVE_UINT16_T',
+ 'HAVE_INT32_T', 'HAVE_UINT32_T', 'HAVE_UINT64_T'):
+ DEFINES[var] = 1
+
+# Enable AES-GCM cipher suite in libsrtp
+DEFINES['GCM'] = 1
+# Let libsrtp use NSS instead of build-in crypto
+DEFINES['NSS'] = 1
+
+# XXX while arm is not a CISC architecture, the code guarded by CPU_RISC makes
+# (at least) the AES ciphers fail their self-tests on ARM, so for now we're
+# falling back to the (presumably) slower-on-this-architecture but working
+# code path. https://bugzilla.mozilla.org/show_bug.cgi?id=822380 has been filed
+# to make the right and more performant fix and push it back upstream.
+if CONFIG['CPU_ARCH'] in ('arm', 'x86', 'x86_64', 'mips', 'mips64'):
+ DEFINES['CPU_CISC'] = 1
+else:
+ # best guess
+ DEFINES['CPU_RISC'] = 1
+
+if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'):
+ DEFINES['HAVE_X86'] = True
+
+if CONFIG['OS_TARGET'] == 'WINNT':
+ DEFINES['HAVE_WINSOCK2_H'] = True
+ DEFINES['inline'] = '__inline'
+else:
+ DEFINES['HAVE_NETINET_IN_H'] = 1