From d696ff270cf233e4542064f2cc87b7bae01948b3 Mon Sep 17 00:00:00 2001 From: Daeho Ro Date: Sun, 12 Jan 2025 22:30:54 +0900 Subject: [PATCH 1/2] ortp 5.3.102 ortp: remove alt-threading calls Signed-off-by: Rui Chen --- Formula/o/ortp.rb | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/Formula/o/ortp.rb b/Formula/o/ortp.rb index 03a37ff9426ff..20716fe9e1f5e 100644 --- a/Formula/o/ortp.rb +++ b/Formula/o/ortp.rb @@ -4,16 +4,18 @@ class Ortp < Formula license "GPL-3.0-or-later" stable do - url "https://gitlab.linphone.org/BC/public/ortp/-/archive/5.3.84/ortp-5.3.84.tar.bz2" - sha256 "e0b539a0021c8b6babca5efddc9362954148824f59c4c316d772a124ebbb51bd" + url "https://gitlab.linphone.org/BC/public/ortp/-/archive/5.3.102/ortp-5.3.102.tar.bz2" + sha256 "71af95cb7e383a308ec7a12aa52442b15d4135ed1168fecf9cccb7411be3da31" depends_on "mbedtls" # bctoolbox appears to follow ortp's version. This can be verified at the GitHub mirror: # https://github.com/BelledonneCommunications/bctoolbox resource "bctoolbox" do - url "https://gitlab.linphone.org/BC/public/bctoolbox/-/archive/5.3.84/bctoolbox-5.3.84.tar.bz2" - sha256 "1c9ec26a91e74f720b16416a0e9e5e84c8aeb04b3fc490c22a4b2fc10ab6d5e3" + url "https://gitlab.linphone.org/BC/public/bctoolbox/-/archive/5.3.102/bctoolbox-5.3.102.tar.bz2" + sha256 "5332dd2ad7e5b6f8e944d2fc002b72b0ed40a8210df1cd76e5f5458cff26adc2" + + patch :DATA end end @@ -29,8 +31,6 @@ class Ortp < Formula head do url "https://gitlab.linphone.org/BC/public/ortp.git", branch: "master" - depends_on "openssl@3" - resource "bctoolbox" do url "https://gitlab.linphone.org/BC/public/bctoolbox.git", branch: "master" end @@ -38,13 +38,17 @@ class Ortp < Formula depends_on "cmake" => :build depends_on "pkgconf" => :build + depends_on "mbedtls" def install odie "bctoolbox resource needs to be updated" if build.stable? && version != resource("bctoolbox").version resource("bctoolbox").stage do - args = ["-DENABLE_TESTS_COMPONENT=OFF", "-DBUILD_SHARED_LIBS=ON"] - args += ["-DENABLE_MBEDTLS=OFF", "-DENABLE_OPENSSL=ON"] if build.head? + args = %w[ + -DENABLE_TESTS_COMPONENT=OFF + -DBUILD_SHARED_LIBS=ON + -DENABLE_MBEDTLS=ON + ] system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args(install_prefix: libexec) system "cmake", "--build", "build" @@ -84,3 +88,26 @@ def install system "./test" end end + +__END__ +diff --git a/src/crypto/mbedtls.cc b/src/crypto/mbedtls.cc +index 4bc16d4..278c524 100644 +--- a/src/crypto/mbedtls.cc ++++ b/src/crypto/mbedtls.cc +@@ -106,8 +106,6 @@ public: + std::unique_ptr sRNG; + mbedtlsStaticContexts() { + #ifdef BCTBX_USE_MBEDTLS_PSA +- mbedtls_threading_set_alt(threading_mutex_init_cpp, threading_mutex_free_cpp, threading_mutex_lock_cpp, +- threading_mutex_unlock_cpp); + if (psa_crypto_init() != PSA_SUCCESS) { + bctbx_error("MbedTLS PSA init fail"); + } +@@ -120,7 +118,6 @@ public: + sRNG = nullptr; + #ifdef BCTBX_USE_MBEDTLS_PSA + mbedtls_psa_crypto_free(); +- mbedtls_threading_free_alt(); + #endif // BCTBX_USE_MBEDTLS_PSA + } + }; From 83f4b2293d23b1e6c3a3320f7de678f1b741e7d5 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sun, 12 Jan 2025 19:08:24 +0000 Subject: [PATCH 2/2] ortp: update 5.3.102 bottle. --- Formula/o/ortp.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Formula/o/ortp.rb b/Formula/o/ortp.rb index 20716fe9e1f5e..e0439d2a1ce60 100644 --- a/Formula/o/ortp.rb +++ b/Formula/o/ortp.rb @@ -20,12 +20,12 @@ class Ortp < Formula end bottle do - sha256 cellar: :any, arm64_sequoia: "4db45336c212cfb572b3ff42b878352733679fdbc11a79f6dc3dda037f220bab" - sha256 cellar: :any, arm64_sonoma: "4214e613d3563fdb8e737376eabc9576e7b01ec5d001082e19169f1b9b6dff0b" - sha256 cellar: :any, arm64_ventura: "9cd9109b254d1d76307bc9c779d6e2b6da0ed264297421aac06ba61fdf2a66a9" - sha256 cellar: :any, sonoma: "635f5d33e32f95b633923cbcb168f0be9705699b83da87a7fc3eb590f46de10c" - sha256 cellar: :any, ventura: "113dff9d0907b040807916b184d3c722be016f952f4b0f7ca895c4eb4332fe6b" - sha256 cellar: :any_skip_relocation, x86_64_linux: "4b2f06f9efd8c6b09a40b5cd555d1a1ce5c782463cf60a5ddd324885a272b124" + sha256 cellar: :any, arm64_sequoia: "9f8451964417d977ab4d252ca416e76ede9e4294b4de92f5d332d19a74cbbd14" + sha256 cellar: :any, arm64_sonoma: "693b5e8a276e4b5f65324d81f61b0bb1560bd2516cbafd59387a695953c74bc1" + sha256 cellar: :any, arm64_ventura: "ca57c1f9302f1209f5ebfaba01ca595262ce31153d26e72d7d97a0379ce39f98" + sha256 cellar: :any, sonoma: "563ab223194134cc1423253447783bc8fe89f09c563e061f5ec8d19a4e3a0fa2" + sha256 cellar: :any, ventura: "e551562d4d9a4a7b0cd9842b5e41aaa0d53c35e888d1b3fbae1629fb54fc5caf" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e733b02f34a805627c255b8a16f02070b55a804ddb054cc16069066bef762895" end head do