wok-current rev 25718

Add miss openssl-3.0.patch for ruby
author Stanislas Leduc <shann@slitaz.org>
date Fri Jun 14 18:20:53 2024 +0000 (5 months ago)
parents 04e93fb7932a
children d97d78e26e6d
files ruby/stuff/openssl-3.0.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ruby/stuff/openssl-3.0.patch	Fri Jun 14 18:20:53 2024 +0000
     1.3 @@ -0,0 +1,42 @@
     1.4 +From 28f3e038805a4f396f228c6884c531677c075867 Mon Sep 17 00:00:00 2001
     1.5 +From: Kazuki Yamaguchi <k@rhe.jp>
     1.6 +Date: Mon, 9 Mar 2020 15:23:32 +0900
     1.7 +Subject: [PATCH] digest: do not depend on ext/openssl/deprecation.rb
     1.8 +
     1.9 +ext/openssl/deprecation.rb has been removed in ext/openssl upstream[1].
    1.10 +
    1.11 +It was originally introduced to detect and prevent linking against
    1.12 +Apple's bundled (and very outdated) version of OpenSSL. It is long gone
    1.13 +and the header files do not exist in current versions of macOS.
    1.14 +
    1.15 +The dependency in ext/digest was introduced by commit 26e258c807c2.
    1.16 +Note that the original issue[2] is resolved without this dependency.
    1.17 +The commit also added the pkg_config("openss") call to match what
    1.18 +ext/openssl does.
    1.19 +
    1.20 +[1] https://github.com/ruby/openssl/pull/333
    1.21 +[2] https://bugs.ruby-lang.org/issues/6379
    1.22 +---
    1.23 + ext/digest/digest_conf.rb | 3 +--
    1.24 + 1 file changed, 1 insertion(+), 2 deletions(-)
    1.25 +
    1.26 +diff --git a/ext/digest/digest_conf.rb b/ext/digest/digest_conf.rb
    1.27 +index 915b61877f97f..1af401a06b0c7 100644
    1.28 +--- a/ext/digest/digest_conf.rb
    1.29 ++++ b/ext/digest/digest_conf.rb
    1.30 +@@ -65,13 +65,12 @@ def digest_conf(name, hdr = name, funcs = nil, types = nil)
    1.31 + 
    1.32 +     dir_config("openssl")
    1.33 +     pkg_config("openssl")
    1.34 +-    require File.expand_path('../../openssl/deprecation', __FILE__)
    1.35 +     if find_openssl_library
    1.36 +       funcs ||= name.upcase
    1.37 +       funcs = Array(funcs)
    1.38 +       types ||= funcs
    1.39 +       hdr = "openssl/#{hdr}.h"
    1.40 +-      if funcs.all? {|func| OpenSSL.check_func("#{func}_Transform", hdr)} &&
    1.41 ++      if funcs.all? {|func| have_func("#{func}_Transform", hdr)} &&
    1.42 +          types.all? {|type| have_type("#{type}_CTX", hdr)}
    1.43 +         $defs << "-D#{name.upcase}_USE_OPENSSL"
    1.44 +         $headers << "#{name}ossl.h"
    1.45 +