diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-12-15 00:22:25 +0800 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2023-12-15 01:03:03 +0800 |
commit | 6e980054b5f371e5d5512613fa79445863e90f68 (patch) | |
tree | c80986775237ce2a4fd716ce78c3fafe098b8ef6 /databases/mysql57-server | |
parent | databases/mysql-connector-c++: Fix build with protobuf 22+ (diff) |
databases/mysql57-{client,server}: Use bundled protobuf
- Bump PORTREVISION for dependency and package change
mysql57 failed to build with protobuf 22+. Since the maintainer already committed
a fix [1] on mysql80 to use bundled protobuf, we take the same approach to avoid
build error with protobuf 22+ from ports tree and potential issue.
PR: 270289
Reference: https://cgit.freebsd.org/ports/commit/?id=567557abbfc0a4deec492983ffc01da78c62bae4 [1]
Diffstat (limited to 'databases/mysql57-server')
-rw-r--r-- | databases/mysql57-server/Makefile | 8 | ||||
-rw-r--r-- | databases/mysql57-server/files/patch-protobuf | 32 |
2 files changed, 4 insertions, 36 deletions
diff --git a/databases/mysql57-server/Makefile b/databases/mysql57-server/Makefile index 12692e94682e..0aae5a5ded25 100644 --- a/databases/mysql57-server/Makefile +++ b/databases/mysql57-server/Makefile @@ -1,6 +1,6 @@ PORTNAME?= mysql PORTVERSION= 5.7.44 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= databases MASTER_SITES= MYSQL/MySQL-5.7 PKGNAMESUFFIX?= 57-server @@ -30,8 +30,7 @@ MY_TMPDIR= /var/db/mysql_tmpdir LIB_DEPENDS+= libcurl.so:ftp/curl \ libevent.so:devel/libevent \ - liblz4.so:archivers/liblz4 \ - libprotobuf.so:devel/protobuf + liblz4.so:archivers/liblz4 CMAKE_BUILD_TYPE= Release @@ -43,6 +42,7 @@ CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \ -DINSTALL_INCLUDEDIR="include/mysql" \ -DINSTALL_INFODIR="${INFO_PATH}" \ -DINSTALL_LIBDIR="lib/mysql" \ + -DINSTALL_PRIV_LIBDIR="lib/mysql/private" \ -DINSTALL_MANDIR="share/man" \ -DINSTALL_MYSQLDATADIR="${MY_DBDIR}" \ -DINSTALL_MYSQLKEYRINGDIR="etc/mysql/keyring" \ @@ -60,7 +60,7 @@ CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \ -DWITH_LIBEVENT=system \ -DWITH_LZ4=system \ -DWITH_ZLIB=system \ - -DWITH_PROTOBUF=system \ + -DWITH_PROTOBUF=bundled \ -DWITH_CURL=system \ -DINSTALL_MYSQLTESTDIR=0 \ -DWITH_DEBUG=0 diff --git a/databases/mysql57-server/files/patch-protobuf b/databases/mysql57-server/files/patch-protobuf deleted file mode 100644 index 4326fdb49df2..000000000000 --- a/databases/mysql57-server/files/patch-protobuf +++ /dev/null @@ -1,32 +0,0 @@ -Deprecated 2-parameter SetTotalBytesLimit() has be removed since protobuf 3.18.0. - -Reference: https://github.com/protocolbuffers/protobuf/commit/cda795437d00a15f375d3d5e2659adac715459c6 - ---- rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc.orig 2021-11-29 20:09:43 UTC -+++ rapid/plugin/x/mysqlxtest_src/mysqlxtest.cc -@@ -629,12 +629,12 @@ class ErrorDumper : public ::google::protobuf::io::Err - std::stringstream m_out; - - public: -- virtual void AddError(int line, int column, const string & message) -+ virtual void AddError(int line, int column, const std::string & message) - { - m_out << "ERROR in message: line " << line+1 << ": column " << column << ": " << message<<"\n"; - } - -- virtual void AddWarning(int line, int column, const string & message) -+ virtual void AddWarning(int line, int column, const std::string & message) - { - m_out << "WARNING in message: line " << line+1 << ": column " << column << ": " << message<<"\n"; - } ---- rapid/plugin/x/ngs/src/protocol_decoder.cc.orig 2021-11-29 20:09:43 UTC -+++ rapid/plugin/x/ngs/src/protocol_decoder.cc -@@ -123,7 +123,7 @@ Error_code Message_decoder::parse(Request &request) - google::protobuf::io::CodedInputStream stream(reinterpret_cast<const uint8_t*>(request.buffer()), - static_cast<int>(request.buffer_size())); - // variable 'mysqlx_max_allowed_packet' has been checked when buffer was filling by data -- stream.SetTotalBytesLimit(static_cast<int>(request.buffer_size()), -1 /*no warnings*/); -+ stream.SetTotalBytesLimit(static_cast<int>(request.buffer_size())); - // Protobuf limits the number of nested objects when decoding messages - // lets set the value in explicit way (to ensure that is set accordingly with - // out stack size) |