@@ -45,7 +45,7 @@ class PerconaServerAT80 < Formula
4545 depends_on "lz4"
4646 depends_on "openldap" # Needs `ldap_set_urllist_proc`, not provided by LDAP.framework
4747 depends_on "openssl@3"
48- depends_on "protobuf@29 "
48+ depends_on "protobuf"
4949 depends_on "zlib" # Zlib 1.2.13+
5050 depends_on "zstd"
5151
@@ -70,58 +70,22 @@ class PerconaServerAT80 < Formula
7070 end
7171 end
7272
73- # Patch out check for Homebrew `boost`.
74- # This should not be necessary when building inside `brew`.
75- # https://github.com/Homebrew/homebrew-test-bot/pull/820
76- patch do
77- url "https://raw.githubusercontent.com/Homebrew/homebrew-core/1cf441a0/Patches/mysql/boost-check.patch"
78- sha256 "af27e4b82c84f958f91404a9661e999ccd1742f57853978d8baec2f993b51153"
79- end
80-
8173 # Fix for system ssl add_library error
8274 # Issue ref: https://perconadev.atlassian.net/jira/software/c/projects/PS/issues/PS-9641
8375 patch do
8476 url "https://github.com/percona/percona-server/commit/a693e5d67abf6f27f5284c86361604babec529c6.patch?full_index=1"
8577 sha256 "d4afcdfb0dd8dcb7c0f7e380a88605b515874628107295ab5b892e8f1e019604"
8678 end
8779
88- # FreeBSD patches for fixing build failure with newer clang
89- patch :p0 do
90- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_binlog__ostream.cc"
91- sha256 "16f86edd2daf5f6c87616781c9f51f76d4a695d55b354e44d639a823b1c3f681"
92- end
93-
94- patch :p0 do
95- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_mdl__context__backup.cc"
96- sha256 "501646e1cb6ac2ddc5eb42755d340443e4655741d6e76788f48751a2fb8f3775"
97- end
98-
99- patch :p0 do
100- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a72b413508501423ddfa576f6f50681cef398fa/databases/mysql80-server/files/patch-sql_mdl__context__backup.h"
101- sha256 "69be131aca93a8a263a394d61e8f388a9f560d1b19fa0fe8a2f2609bbc9b817d"
102- end
103-
104- patch :p0 do
105- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_rpl__log__encryption.cc"
106- sha256 "bdadcf4317295d1847283e20dd7fbfa2df2c4acebf45d5a13d0670bc7311f7ba"
107- end
108-
109- patch :p0 do
110- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-sql_stream__cipher.cc"
111- sha256 "ac74c60f6051223993c88e7a11ddd9512c951ac1401d719a2c3377efe1bee3cf"
112- end
113-
114- patch :p0 do
115- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a72b413508501423ddfa576f6f50681cef398fa/databases/mysql80-server/files/patch-sql_stream__cipher.h"
116- sha256 "ab29351becd9ff8a6a3fcc37abcdfaace5dbc7176b776bce95e6679ee9f81efb"
117- end
118-
119- patch :p0 do
120- url "https://raw.githubusercontent.com/freebsd/freebsd-ports/1a02a961a2d53f21bf208f07903a97cc46f43e17/databases/mysql80-server/files/patch-unittest_gunit_stream__cipher-t.cc"
121- sha256 "9e7629a2174e754487737ef0d73c79fc1ed47ba54a982a3a4803e19c72c5dc0f"
80+ # Apply MySQL commit to support Protobuf >= 30
81+ patch do
82+ url "https://github.com/mysql/mysql-server/commit/4c1fdd1fb34a9a80a062357a54afe134a92f8abc.patch?full_index=1"
83+ sha256 "8943cf092d31f2ed788f9a86b11b27973ec310d53718f15f6d2dac618696e1a3"
12284 end
12385
124- # More fixes for new clang not covered by the FreeBSD patches.
86+ # Patch out check for Homebrew `boost`.
87+ # This should not be necessary when building inside `brew`.
88+ # https://github.com/Homebrew/homebrew-test-bot/pull/820
12589 patch :DATA
12690
12791 def datadir
@@ -300,16 +264,39 @@ def caveats
300264end
301265
302266__END__
303- diff --git i/sql/mf_iocache.cc w/sql/mf_iocache.cc
304- index 4a7695ff..f640f5a5 100644
305- --- i/sql/mf_iocache.cc
306- +++ w/sql/mf_iocache.cc
307- @@ -110,7 +110,7 @@ bool open_cached_file_encrypted(IO_CACHE *cache, const char *dir,
308-
309- /* Generate password, it is a random string. */
310- if (my_rand_buffer(password, sizeof(password)) != 0) DBUG_RETURN(true);
311- - password_str.append(password, sizeof(password));
312- + password_str.insert(password_str.end(), password, password + sizeof(password));
313-
314- auto encryptor = std::make_unique<Aes_ctr_encryptor>();
315- if (encryptor->open(password_str, 0)) DBUG_RETURN(true);
267+ diff --git a/CMakeLists.txt b/CMakeLists.txt
268+ index 22fa212..ad5f90e 100644
269+ --- a/CMakeLists.txt
270+ +++ b/CMakeLists.txt
271+ @@ -1927,31 +1927,6 @@ MYSQL_CHECK_RAPIDJSON()
272+ MYSQL_CHECK_FIDO()
273+ MYSQL_CHECK_FIDO_DLLS()
274+
275+ -IF(APPLE)
276+ - GET_FILENAME_COMPONENT(HOMEBREW_BASE ${HOMEBREW_HOME} DIRECTORY)
277+ - IF(EXISTS ${HOMEBREW_BASE}/include/boost)
278+ - FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO)
279+ - IF(WITH_${SYSTEM_LIB} STREQUAL "system")
280+ - MESSAGE(FATAL_ERROR
281+ - "WITH_${SYSTEM_LIB}=system is not compatible with Homebrew boost\n"
282+ - "MySQL depends on ${BOOST_PACKAGE_NAME} with a set of patches.\n"
283+ - "Including headers from ${HOMEBREW_BASE}/include "
284+ - "will break the build.\n"
285+ - "Please use WITH_${SYSTEM_LIB}=bundled\n"
286+ - "or do 'brew uninstall boost' or 'brew unlink boost'"
287+ - )
288+ - ENDIF()
289+ - ENDFOREACH()
290+ - ENDIF()
291+ - # Ensure that we look in /usr/local/include or /opt/homebrew/include
292+ - FOREACH(SYSTEM_LIB ICU LIBEVENT LZ4 PROTOBUF ZSTD FIDO)
293+ - IF(WITH_${SYSTEM_LIB} STREQUAL "system")
294+ - INCLUDE_DIRECTORIES(SYSTEM ${HOMEBREW_BASE}/include)
295+ - BREAK()
296+ - ENDIF()
297+ - ENDFOREACH()
298+ -ENDIF()
299+ -
300+ IF(WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_CLIENT_PLUGINS)
301+ IF(WITH_FIDO STREQUAL "system" AND
302+ NOT WITH_SSL STREQUAL "system")
0 commit comments