diff --git a/config/patches/openssl/openssl-1.0.2zi-freebsd-nocryptodev.patch b/config/patches/openssl/openssl-1.0.2zi-freebsd-nocryptodev.patch new file mode 100644 index 000000000..759892bac --- /dev/null +++ b/config/patches/openssl/openssl-1.0.2zi-freebsd-nocryptodev.patch @@ -0,0 +1,11 @@ +--- openssl-1.0.2zi/crypto/engine/eng_cryptodev.c.orig 2017-07-06 01:00:00 UTC ++++ openssl-1.0.2zi/crypto/engine/eng_cryptodev.c +@@ -35,7 +35,7 @@ + #if (defined(__unix__) || defined(unix)) && !defined(USG) && \ + (defined(OpenBSD) || defined(__FreeBSD__)) + # include +-# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041) ++# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || (__FreeBSD_version >= 500041 && __FreeBSD_version < 1300000)) + # define HAVE_CRYPTODEV + # endif + # if (OpenBSD >= 200110) \ No newline at end of file diff --git a/config/patches/ruby/ruby-3.0.3-maybe_unused.h.patch b/config/patches/ruby/ruby-3.0.3-maybe_unused.h.patch new file mode 100644 index 000000000..ac9e52125 --- /dev/null +++ b/config/patches/ruby/ruby-3.0.3-maybe_unused.h.patch @@ -0,0 +1,11 @@ +--- "a/include/ruby/internal/attr/maybe_unused.h" ++++ "b/include/ruby/internal/attr/maybe_unused.h" +@@ -27,7 +27,7 @@ + /** Wraps (or simulates) `[[maybe_unused]]` */ + #if RBIMPL_HAS_CPP_ATTRIBUTE(maybe_unused) + # define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]] +-#elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused) ++#elif RBIMPL_HAS_C_ATTRIBUTE(maybe_unused) && (__STDC_VERSION__ >= 202000L) + # define RBIMPL_ATTR_MAYBE_UNUSED() [[maybe_unused]] + #elif RBIMPL_HAS_ATTRIBUTE(unused) + # define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__)) diff --git a/config/software/openssl.rb b/config/software/openssl.rb index 249006919..c0526308e 100644 --- a/config/software/openssl.rb +++ b/config/software/openssl.rb @@ -161,6 +161,7 @@ if version.start_with? "1.0" patch source: "openssl-1.0.1f-do-not-build-docs.patch", env: patch_env + patch source: "openssl-1.0.2zi-freebsd-nocryptodev.patch", env: patch_env elsif version.start_with? "1.1" patch source: "openssl-1.1.0f-do-not-install-docs.patch", env: patch_env elsif version.start_with? "3.0" diff --git a/config/software/ruby.rb b/config/software/ruby.rb index 432bab093..fd663c822 100644 --- a/config/software/ruby.rb +++ b/config/software/ruby.rb @@ -224,6 +224,10 @@ end end + if freebsd? && version.satisfies?("~> 3.0.3") + patch source: "ruby-3.0.3-maybe_unused.h.patch", plevel: 1, env: patch_env + end + # disable libpath in mkmf across all platforms, it trolls omnibus and # breaks the postgresql cookbook. i'm not sure why ruby authors decided # this was a good idea, but it breaks our use case hard. AIX cannot even