1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Fast SQL database server, derived from MySQL
8 HOMEPAGE= https://mariadb.org/
12 SITES[main]= https://downloads.mariadb.com/MariaDB/mariadb-10.4.17/source/
13 DISTFILE[1]= mariadb-10.4.17.tar.gz:main
15 SPKGS[standard]= complete
20 OPTIONS_AVAILABLE= none
21 OPTIONS_STANDARD= none
23 BUILD_DEPENDS= bison:primary:standard
24 BUILDRUN_DEPENDS= boost-libraries:rest:python_used
25 snappy:single:standard
26 msgpack:single:standard
32 USERGROUP_SPKG= server
34 USES= cmake zlib ssl readline ncurses shebangfix cpe
35 python:build perl:build pkgconfig iconv:translit
36 zstd lz4 lzo bz2 execinfo
37 GNOME_COMPONENTS= libxml2
39 DISTNAME= mariadb-10.4.17
42 LICENSE_TERMS= server:{{WRKDIR}}/TERMS
43 LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING
44 LICENSE_AWK= TERMS:"^\#include"
45 LICENSE_SOURCE= TERMS:{{WRKSRC}}/libmysqld/libmysqld.c
50 FPC_EQUIVALENT= databases/mariadb104-server
51 SHEBANG_FILES= scripts/*.sh
53 INSTALL_REQ_TOOLCHAIN= yes
55 CMAKE_ARGS= -DCOMPILATION_COMMENT="Ravenports"
56 -DINSTALL_INCLUDEDIR=include/mysql
57 -DINSTALL_PLUGINDIR=lib/mysql/plugin
58 -DINSTALL_SHAREDIR=share
59 -DINSTALL_SUPPORTFILESDIR=share/mysql
60 -DINSTALL_MYSQLSHAREDIR=share/mysql
61 -DINSTALL_DOCREADMEDIR=share/doc/mariadb104
62 -DINSTALL_DOCDIR=share/doc/mariadb104
63 -DINSTALL_LIBDIR=lib/mysql
64 -DINSTALL_MANDIR=share/man
65 -DINSTALL_SCRIPTDIR=bin
66 -DINSTALL_MYSQLTESTDIR=
67 -DINSTALL_SQLBENCHDIR=
68 -DDEFAULT_CHARSET=utf8mb4
69 -DDEFAULT_COLLATION=utf8mb4_unicode_ci
70 -DDEFAULT_SYSCONFDIR="{{PREFIX}}/etc"
71 -DENABLED_LOCAL_INFILE=ON
75 -DWITH_EMBEDDED_SERVER=ON
76 -DWITH_EXTRA_CHARSETS=complex
81 -DWITH_READLINE=system
82 -DWITH_SSL="{{OPENSSLBASE}}"
86 VAR_OPSYS[freebsd]= CXXFLAGS=-DHAVE_POSIX_MEMALIGN=1
89 ${REINPLACE_CMD} 's|/usr/bin/env python|${PYTHON_CMD}|' \
90 ${WRKSRC}/CMakeLists.txt
91 ${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' \
92 ${WRKSRC}/mysys/my_default.c
93 ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
94 ${WRKSRC}/scripts/mysql_config.sh \
95 ${WRKSRC}/scripts/CMakeLists.txt
96 ${CP} ${WRKSRC}/cmake/os/FreeBSD.cmake \
97 ${WRKSRC}/cmake/os/DragonFly.cmake
100 ${RM} ${STAGEDIR}${STD_DOCDIR}/COPYING
101 ${MV} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig/mariadb.pc \
102 ${STAGEDIR}${PREFIX}/lib/pkgconfig/
103 ${RMDIR} ${STAGEDIR}${PREFIX}/lib/mysql/pkgconfig
104 # strip plugins and libraries
105 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/libmariadb.so
106 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/libmariadbd.so
107 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/mysql/plugin/*.so
109 @flist=$$(${FIND} ${STAGEDIR}${PREFIX}/bin -type f -perm /111 -print) ;\
110 for f in $$flist; do \
111 (${FILE} $$f | ${GREP} -Fq ", not stripped")\
112 && ${ECHO_CMD} "Auto-stripping $$f"\
113 && ${STRIP_CMD} $$f || ${TRUE} ;\
117 ${REINPLACE_CMD} -Ee 's|(#define INCLUDE.*)"$$|\1 -I${PREFIX}/include"|' \
118 -e 's|(#define LIBS .*)"$$|\1 -L${PREFIX}/lib"|' \
119 ${BUILD_WRKSRC}/libmariadb/mariadb_config/mariadb_config.c
120 ${REINPLACE_CMD} -e 's| ${PREFIX}/lib/liblz4.so\(.* ${PREFIX}/lib/liblz4.so.*\)|\1|' \
121 -e 's| ${PREFIX}/lib/liblzo2.so\(.* ${PREFIX}/lib/liblzo2.so.*\)|\1|' \
122 -e 's| ${PREFIX}/lib/libsnappy.so\(.* ${PREFIX}/lib/libsnappy.so\)|\1|' \
123 -e 's| -llzma\(.* -llzma\)|\1|;s| -lbz2\(.* -lbz2\)|\1|;' \
124 ${BUILD_WRKSRC}/extra/mariabackup/CMakeFiles/mbstream.dir/link.txt
126 [FILE:807:descriptions/desc.server]
127 MariaDB Server is one of the most popular database servers in the world.
128 It's made by the original developers of MySQL and guaranteed to stay open
129 source. Notable users include Wikipedia, WordPress.com and Google.
131 MariaDB turns data into structured information in a wide array of
132 applications, ranging from banking to websites. It is an enhanced, drop-in
133 replacement for MySQL. MariaDB is used because it is fast, scalable and
134 robust, with a rich ecosystem of storage engines, plugins and many other
135 tools make it very versatile for a wide variety of use cases.
137 MariaDB is developed as open source software and as a relational database
138 it provides an SQL interface for accessing data. The latest versions of
139 MariaDB also include GIS and JSON features.
141 This package contains the server and related files.
144 [FILE:267:descriptions/desc.client]
145 MariaDB Server is one of the most popular database servers in the world.
146 It's made by the original developers of MySQL and guaranteed to stay open
147 source. Notable users include Wikipedia, WordPress.com and Google.
149 This package contains the client and related files.
153 a7b104e264311cd46524ae546ff0c5107978373e4a01cf7fd8a241454548d16e 80986181 mariadb-10.4.17.tar.gz
156 [FILE:10934:manifests/plist.server]
157 %%ONLY-LINUX%%lib/mysql/plugin/disks.so
168 mariadb-client-test-embedded
171 mariadb-fix-extensions
174 mariadb-secure-installation
176 mariadb-test-embedded
177 mariadb-tzinfo-to-sql
192 mysql_client_test_embedded
198 mysql_secure_installation
215 wsrep_sst_mariabackup
219 include/mysql/server/
222 byte_order_generic_x86.h
223 byte_order_generic_x86_64.h
265 include/mysql/server/mysql/
274 plugin_password_validation.h
278 service_encryption_scheme.h
280 service_kill_statement.h
284 service_my_print_error.h
285 service_my_snprintf.h
286 service_progress_report.h
290 service_thd_autoinc.h
291 service_thd_error_context.h
293 service_thd_specifics.h
294 service_thd_timezone.h
298 include/mysql/server/mysql/psi/
312 include/mysql/server/private/
332 event_db_repository.h
348 handle_connections_win.h
423 mysqld_default_groups.h
437 probes_mysql_nodtrace.h
464 semisync_master_ack_receiver.h
508 sql_expression_cache.h
509 sql_get_diagnostics.h
524 sql_partition_admin.h
581 welcome_copyright_notice.h
588 wsrep_client_service.h
590 wsrep_condition_variable.h
591 wsrep_high_priority_service.h
597 wsrep_server_service.h
600 wsrep_storage_service.h
602 wsrep_trans_observer.h
608 include/mysql/server/private/atomic/
623 auth_gssapi_client.so
625 caching_sha2_password.so
626 debug_key_management.so
628 example_key_management.so
629 file_key_management.so
640 ha_test_sql_discovery.so
644 metadata_lock_info.so
650 query_response_time.so
652 simple_password_check.so
656 share/aclocal/mysql.m4
660 share/groonga-normalizer-mysql/
669 galera_new_cluster.1.gz
674 mariadb-client-test-embedded.1.gz
675 mariadb-client-test.1.gz
676 mariadb-dumpslow.1.gz
677 mariadb-embedded.1.gz
678 mariadb-fix-extensions.1.gz
679 mariadb-install-db.1.gz
681 mariadb-secure-installation.1.gz
682 mariadb-service-convert.1.gz
683 mariadb-test-embedded.1.gz
685 mariadb-tzinfo-to-sql.1.gz
689 mariadbd-safe-helper.1.gz
692 my_print_defaults.1.gz
698 mysql_client_test.1.gz
699 mysql_client_test_embedded.1.gz
701 mysql_fix_extensions.1.gz
702 mysql_install_db.1.gz
704 mysql_secure_installation.1.gz
705 mysql_tzinfo_to_sql.1.gz
709 mysqld_safe_helper.1.gz
712 mysqltest_embedded.1.gz
714 resolve_stack_dump.1.gz
716 wsrep_sst_common.1.gz
717 wsrep_sst_mariabackup.1.gz
718 wsrep_sst_mysqldump.1.gz
720 wsrep_sst_rsync_wan.1.gz
731 maria_add_gis_sp_bootstrap.sql
734 mysql_performance_tables.sql
735 mysql_system_tables.sql
736 mysql_system_tables_data.sql
737 mysql_test_data_timezone.sql
743 share/mysql/charsets/
770 share/mysql/czech/errmsg.sys
771 share/mysql/danish/errmsg.sys
772 share/mysql/dutch/errmsg.sys
773 share/mysql/english/errmsg.sys
774 share/mysql/estonian/errmsg.sys
775 share/mysql/french/errmsg.sys
776 share/mysql/german/errmsg.sys
777 share/mysql/greek/errmsg.sys
778 share/mysql/hindi/errmsg.sys
779 share/mysql/hungarian/errmsg.sys
780 share/mysql/italian/errmsg.sys
781 share/mysql/japanese/errmsg.sys
782 share/mysql/korean/errmsg.sys
788 share/mysql/norwegian/errmsg.sys
789 share/mysql/norwegian-ny/errmsg.sys
790 share/mysql/policy/apparmor/
793 usr.sbin.mysqld.local
794 share/mysql/policy/selinux/
799 share/mysql/polish/errmsg.sys
800 share/mysql/portuguese/errmsg.sys
801 share/mysql/romanian/errmsg.sys
802 share/mysql/russian/errmsg.sys
803 share/mysql/serbian/errmsg.sys
804 share/mysql/slovak/errmsg.sys
805 share/mysql/spanish/errmsg.sys
806 share/mysql/swedish/errmsg.sys
807 share/mysql/ukrainian/errmsg.sys
810 [FILE:1879:manifests/plist.client]
817 mariadb-convert-table-format
823 mariadb-setpermission
830 mysql_convert_table_format
862 include/mysql/mariadb/ma_io.h
880 mysql_clear_password.so
890 mariadb-convert-table-format.1.gz
892 mariadb-find-rows.1.gz
896 mariadb-setpermission.1.gz
902 mysql-stress-test.pl.1.gz
903 mysql-test-run.pl.1.gz
906 mysql_convert_table_format.1.gz
909 mysql_setpermission.1.gz
923 [FILE:103:manifests/plist.docs]
924 share/doc/mariadb104/
933 [FILE:328:patches/patch-MDEV-20248]
934 --- storage/rocksdb/rocksdb/port/jemalloc_helper.h.orig 2020-11-10 10:29:18 UTC
935 +++ storage/rocksdb/rocksdb/port/jemalloc_helper.h
937 #include <jemalloc/jemalloc.h>
941 +#define JEMALLOC_USABLE_SIZE_CONST const
944 #ifndef JEMALLOC_CXX_THROW
945 #define JEMALLOC_CXX_THROW
949 [FILE:572:patches/patch-client_mysql.cc]
950 --- client/mysql.cc.orig 2020-11-10 10:29:17 UTC
952 @@ -61,8 +61,8 @@ static char *server_version= NULL;
955 #if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
958 +#include <ncurses/curses.h>
959 +#include <ncurses/term.h>
961 #if defined(HAVE_TERMIOS_H)
963 @@ -81,7 +81,7 @@ extern "C" {
965 #undef SYSV // hack to avoid syntax error
968 +#include <ncurses/term.h>
971 #endif /* defined(HAVE_CURSES_H) && defined(HAVE_TERM_H) */
974 [FILE:1958:patches/patch-cmake_readline.cmake]
975 --- cmake/readline.cmake.orig 2020-11-10 10:29:17 UTC
976 +++ cmake/readline.cmake
977 @@ -52,40 +52,17 @@ MACRO (MYSQL_CHECK_MULTIBYTE)
981 + SET(CURSES_NEED_NCURSES True)
983 MARK_AS_ADVANCED(CURSES_CURSES_H_PATH CURSES_FORM_LIBRARY CURSES_HAVE_CURSES_H)
985 SET(ERRORMSG "Curses library not found. Please install appropriate package,
986 remove CMakeCache.txt and rerun cmake.")
987 - IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
988 - SET(ERRORMSG ${ERRORMSG}
989 - "On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates "
990 - "it is ncurses-devel.")
992 MESSAGE(FATAL_ERROR ${ERRORMSG})
995 - IF(CURSES_HAVE_CURSES_H)
996 - SET(HAVE_CURSES_H 1 CACHE INTERNAL "")
998 - IF(CMAKE_SYSTEM_NAME MATCHES "HP")
999 - # CMake uses full path to library /lib/libcurses.sl
1000 - # On Itanium, it results into architecture mismatch+
1001 - # the library is for PA-RISC
1002 - SET(CURSES_LIBRARY "curses" CACHE INTERNAL "" FORCE)
1004 + SET(HAVE_CURSES_H 1 CACHE INTERNAL "")
1006 - IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
1007 - # -Wl,--as-needed breaks linking with -lcurses, e.g on Fedora
1008 - # Lower-level libcurses calls are exposed by libtinfo
1009 - CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} tputs "" HAVE_TPUTS_IN_CURSES)
1010 - IF(NOT HAVE_TPUTS_IN_CURSES)
1011 - CHECK_LIBRARY_EXISTS(tinfo tputs "" HAVE_TPUTS_IN_TINFO)
1012 - IF(HAVE_TPUTS_IN_TINFO)
1013 - SET(CURSES_LIBRARY tinfo)
1017 CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} setupterm "" HAVE_SETUPTERM)
1018 CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} vidattr "" HAVE_VIDATTR)
1020 @@ -220,6 +197,8 @@ MACRO (MYSQL_CHECK_READLINE)
1021 SET(CMAKE_REQUIRED_LIBRARIES)
1022 SET(CMAKE_REQUIRED_INCLUDES)
1024 + SET(CMAKE_REQUIRED_INCLUDES ${CURSES_INCLUDE_DIR}/ncurses)
1025 CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
1026 + SET(CMAKE_REQUIRED_INCLUDES)
1031 [FILE:349:patches/patch-extra_readline_CMakeLists.txt]
1032 --- extra/readline/CMakeLists.txt.orig 2020-11-10 10:29:17 UTC
1033 +++ extra/readline/CMakeLists.txt
1034 @@ -56,4 +56,4 @@ ADD_LIBRARY(readline STATIC
1036 # Declare dependency
1037 # so every executable that links with readline links with curses as well
1038 -TARGET_LINK_LIBRARIES(readline ${CURSES_LIBRARY})
1039 +TARGET_LINK_LIBRARIES(readline ${CURSES_LIBRARY} tinfo)
1042 [FILE:1672:patches/patch-mysys_my__default.c]
1043 --- mysys/my_default.c.orig 2020-11-10 10:29:18 UTC
1044 +++ mysys/my_default.c
1045 @@ -784,7 +784,7 @@ static int search_default_file_with_ext(
1048 if (!my_stat(name,&stat_info,MYF(0)))
1052 Ignore world-writable regular files.
1053 This is mainly done to protect us to not read a file created by
1054 @@ -802,6 +802,14 @@ static int search_default_file_with_ext(
1055 if (!(fp= mysql_file_fopen(key_file_cnf, name, O_RDONLY, MYF(0))))
1056 return 1; /* Ignore wrong files */
1058 + if (strstr(name, "/etc") == name)
1061 + "error: Config file %s in invalid location, please move to or merge with %%PREFIX%%%s\n",
1066 while (mysql_file_fgets(buff, sizeof(buff) - 1, fp))
1069 @@ -1076,7 +1084,8 @@ void my_print_default_files(const char *
1070 if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
1072 strxmov(end, conf_file, *ext, " ", NullS);
1073 - fputs(name, stdout);
1074 + if (strstr(name, "/etc") != name)
1075 + fputs(name, stdout);
1079 @@ -1203,13 +1212,10 @@ static const char **init_default_directo
1083 -#if defined(DEFAULT_SYSCONFDIR)
1084 - if (DEFAULT_SYSCONFDIR[0])
1085 - errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
1087 errors += add_directory(alloc, "/etc/", dirs);
1088 errors += add_directory(alloc, "/etc/mysql/", dirs);
1089 -#endif /* DEFAULT_SYSCONFDIR */
1090 + errors += add_directory(alloc, "%%PREFIX%%/etc/", dirs);
1091 + errors += add_directory(alloc, "%%PREFIX%%/etc/mysql/", dirs);
1097 [FILE:1167:patches/patch-oqgraph-MDEV-15291]
1098 --- storage/oqgraph/oqgraph_judy.cc.orig 2020-11-10 10:29:19 UTC
1099 +++ storage/oqgraph/oqgraph_judy.cc
1102 Currently the only active code that can return error is:
1103 judy_bitset::reset()/J1U()
1104 - judy_bitset::setbit()/J1S()
1105 + judy_bitset::jsetbit()/J1S()
1107 In most cases errors are either about wrong parameters passed to Judy
1108 functions or internal structures corruption. These definitely deserve
1109 @@ -60,7 +60,7 @@ bool open_query::judy_bitset::test(size_
1113 -open_query::judy_bitset& open_query::judy_bitset::setbit(size_type n)
1114 +open_query::judy_bitset& open_query::judy_bitset::jsetbit(size_type n)
1118 --- storage/oqgraph/oqgraph_judy.h.orig 2020-11-10 10:29:19 UTC
1119 +++ storage/oqgraph/oqgraph_judy.h
1120 @@ -63,7 +63,7 @@ namespace open_query
1125 + return jsetbit(n);
1128 judy_bitset& set(const judy_bitset& src);
1129 @@ -115,7 +115,7 @@ namespace open_query
1131 mutable void* array;
1133 - judy_bitset& setbit(size_type n);
1134 + judy_bitset& jsetbit(size_type n);
1140 [FILE:399:patches/patch-scripts_CMakeLists.txt]
1141 --- scripts/CMakeLists.txt.orig 2020-11-10 10:29:18 UTC
1142 +++ scripts/CMakeLists.txt
1143 @@ -121,11 +121,7 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles|Ni
1147 -IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
1148 - SET (PERL_PATH "/usr/local/bin/perl")
1150 - SET (PERL_PATH "/usr/bin/perl")
1152 +SET (PERL_PATH "%%LOCALBASE%%/bin/perl")
1155 # FIND_PROC and CHECK_PID are used by mysqld_safe
1158 [FILE:403:patches/patch-scripts_mysql__config.sh]
1159 --- scripts/mysql_config.sh.orig 2020-11-10 10:29:18 UTC
1160 +++ scripts/mysql_config.sh
1161 @@ -87,7 +87,9 @@ fi
1164 libs="-L$pkglibdir @RPATH_OPTION@ @LIBS_FOR_CLIENTS@"
1165 +libs="$libs -L%%LOCALBASE%%/lib "
1166 embedded_libs="-L$pkglibdir @RPATH_OPTION@ @EMB_LIBS_FOR_CLIENTS@"
1167 +embedded_libs="$embedded_libs -L%%LOCALBASE%%/lib "
1169 include="-I$pkgincludedir"
1170 if [ "$basedir" != "/usr" ]; then
1173 [FILE:446:patches/patch-scripts_mysqld__safe.sh]
1174 --- scripts/mysqld_safe.sh.orig 2020-11-10 10:29:18 UTC
1175 +++ scripts/mysqld_safe.sh
1176 @@ -555,11 +555,11 @@ fi
1178 if test -z "$MYSQL_HOME"
1180 - if test -r "$DATADIR/my.cnf"
1181 + if test -r "$DATADIR/etc/my.cnf"
1183 log_error "WARNING: Found $DATADIR/my.cnf
1184 The data directory is not a valid location for my.cnf, please move it to
1185 -$MY_BASEDIR_VERSION/my.cnf"
1186 +$MY_BASEDIR_VERSION/etc/my.cnf"
1188 MYSQL_HOME=$MY_BASEDIR_VERSION
1192 [FILE:437:patches/patch-scripts_wsrep__sst__mariabackup.sh]
1193 --- scripts/wsrep_sst_mariabackup.sh.orig 2020-11-10 10:29:18 UTC
1194 +++ scripts/wsrep_sst_mariabackup.sh
1195 @@ -613,7 +613,7 @@ recv_joiner()
1198 if [[ $tmt -gt 0 ]] && command -v timeout >/dev/null;then
1199 - if timeout --help | grep -q -- '-k';then
1200 + if timeout --help 2>&1 | grep -q -- '-k';then
1201 ltcmd="timeout -k $(( tmt+10 )) $tmt $tcmd"
1203 ltcmd="timeout -s9 $tmt $tcmd"
1206 [FILE:540:patches/patch-sql_mysqld.cc]
1207 --- sql/mysqld.cc.orig 2020-11-10 10:29:18 UTC
1209 @@ -3288,7 +3288,11 @@ pthread_handler_t signal_hand(void *arg
1214 if (!abort_loop && origin != SI_KERNEL)
1220 mysql_print_status(); // Print some debug info
1221 @@ -4757,8 +4761,9 @@ static void init_ssl()
1222 sql_print_warning("SSL error: %s",buf);
1227 ERR_remove_state(0);
1234 [FILE:1422:patches/patch-storage_innobase_lz4.cmake]
1235 --- storage/innobase/lz4.cmake.orig 2020-11-10 10:29:19 UTC
1236 +++ storage/innobase/lz4.cmake
1237 @@ -17,21 +17,29 @@ SET(WITH_INNODB_LZ4 AUTO CACHE STRING
1239 MACRO (MYSQL_CHECK_LZ4)
1240 IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO")
1241 - CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H)
1242 - CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB)
1243 - CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT)
1244 + find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
1245 + find_library(LZ4_LIBRARY NAMES lz4)
1247 + get_filename_component(LZ4_LIBDIR ${LZ4_LIBRARY} DIRECTORY)
1248 +#MESSAGE(STATUS "LZ4_INCLUDE_DIR=${LZ4_INCLUDE_DIR} LZ4_LIBRARY=${LZ4_LIBRARY} LZ4_LIBDIR=${LZ4_LIBDIR}")
1249 + IF (LZ4_INCLUDE_DIR)
1250 + SET(HAVE_LZ4_H YES)
1252 + CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput ${LZ4_LIBDIR} HAVE_LZ4_SHARED_LIB)
1253 + CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default ${LZ4_LIBDIR} HAVE_LZ4_COMPRESS_DEFAULT)
1255 IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H)
1256 ADD_DEFINITIONS(-DHAVE_LZ4=1)
1257 IF (HAVE_LZ4_COMPRESS_DEFAULT)
1258 ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1)
1260 - LINK_LIBRARIES(lz4)
1261 + LINK_LIBRARIES(innobase ${LZ4_LIBRARY})
1263 IF (WITH_INNODB_LZ4 STREQUAL "ON")
1264 MESSAGE(FATAL_ERROR "Required lz4 library is not found")
1273 [FILE:1513:patches/patch-storage_innobase_lzo.cmake]
1274 --- storage/innobase/lzo.cmake.orig 2020-11-10 10:29:19 UTC
1275 +++ storage/innobase/lzo.cmake
1276 @@ -17,12 +17,10 @@ SET(WITH_INNODB_LZO AUTO CACHE STRING
1278 MACRO (MYSQL_CHECK_LZO_STATIC)
1279 IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO")
1280 - CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
1281 - CHECK_LIBRARY_EXISTS(liblzo2.a lzo1x_1_compress "" HAVE_LZO_LIB)
1283 + CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "${LZO_LIBDIR}" HAVE_LZO_LIB)
1284 IF(HAVE_LZO_LIB AND HAVE_LZO_H)
1285 ADD_DEFINITIONS(-DHAVE_LZO=1)
1286 - LINK_LIBRARIES(liblzo2.a)
1287 + LINK_LIBRARIES(lzo2)
1289 IF (WITH_INNODB_LZO STREQUAL "ON")
1290 MESSAGE(FATAL_ERROR "Required lzo library is not found")
1291 @@ -33,12 +31,16 @@ ENDMACRO()
1293 MACRO (MYSQL_CHECK_LZO)
1294 IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO")
1295 - CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H)
1296 - CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB)
1298 + find_path(LZO_INCLUDE NAMES lzo/lzo1x.h)
1299 + find_library(LZO_LIBRARY NAMES lzo2)
1300 + get_filename_component(LZO_LIBDIR ${LZO_LIBRARY} DIRECTORY)
1304 + CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress ${LZO_LIBDIR} HAVE_LZO_SHARED_LIB)
1305 IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H)
1306 ADD_DEFINITIONS(-DHAVE_LZO=1)
1307 - LINK_LIBRARIES(lzo2)
1308 + LINK_LIBRARIES(${LZO_LIBRARY})
1310 IF (WITH_INNODB_LZO STREQUAL "ON")
1311 MESSAGE(FATAL_ERROR "Required lzo library is not found")
1314 [FILE:1855:patches/patch-storage_rocksdb_ha__rocksdb.cc]
1315 --- storage/rocksdb/ha_rocksdb.cc.orig 2020-11-10 10:29:19 UTC
1316 +++ storage/rocksdb/ha_rocksdb.cc
1317 @@ -260,7 +260,7 @@ Rdb_cf_manager cf_manager;
1318 Rdb_ddl_manager ddl_manager;
1319 Rdb_binlog_manager binlog_manager;
1321 -#if !defined(_WIN32) && !defined(__APPLE__)
1322 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__)
1323 Rdb_io_watchdog *io_watchdog = nullptr;
1326 @@ -842,7 +842,7 @@ static void rocksdb_set_io_write_timeout
1327 void *const var_ptr MY_ATTRIBUTE((__unused__)), const void *const save) {
1328 DBUG_ASSERT(save != nullptr);
1329 DBUG_ASSERT(rdb != nullptr);
1330 -#if !defined(_WIN32) && !defined(__APPLE__)
1331 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__)
1332 DBUG_ASSERT(io_watchdog != nullptr);
1335 @@ -851,7 +851,7 @@ static void rocksdb_set_io_write_timeout
1336 const uint32_t new_val = *static_cast<const uint32_t *>(save);
1338 rocksdb_io_write_timeout_secs = new_val;
1339 -#if !defined(_WIN32) && !defined(__APPLE__)
1340 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__)
1341 io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
1343 RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
1344 @@ -5741,7 +5741,7 @@ static int rocksdb_init_func(void *const
1345 directories.push_back(myrocks::rocksdb_wal_dir);
1348 -#if !defined(_WIN32) && !defined(__APPLE__)
1349 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__)
1350 io_watchdog = new Rdb_io_watchdog(std::move(directories));
1351 io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
1353 @@ -5848,7 +5848,7 @@ static int rocksdb_done_func(void *const
1354 delete commit_latency_stats;
1355 commit_latency_stats = nullptr;
1357 -#if !defined(_WIN32) && !defined(__APPLE__)
1358 +#if defined(HAVE_TIMER_DELETE) && !defined(_WIN32) && !defined(__APPLE__)
1360 io_watchdog = nullptr;
1364 [FILE:249:patches/patch-storage_rocksdb_rdb__buff.h]
1365 --- storage/rocksdb/rdb_buff.h.orig 2020-11-10 10:29:19 UTC
1366 +++ storage/rocksdb/rdb_buff.h
1368 #define be16toh(x) OSSwapBigToHostInt16(x)
1371 +#include "port/port_posix.h"
1373 /* MySQL header files */
1374 #include "./my_global.h"
1378 [FILE:493:patches/patch-storage_rocksdb_ut0counter.h]
1379 --- storage/rocksdb/ut0counter.h.orig 2020-11-10 10:29:19 UTC
1380 +++ storage/rocksdb/ut0counter.h
1381 @@ -30,6 +30,12 @@ Created 2012/04/12 by Sunny Bains
1384 #define get_curr_thread_id() GetCurrentThreadId()
1385 +#elif defined __FreeBSD__
1386 +#include <pthread_np.h>
1387 +#define get_curr_thread_id() pthread_getthreadid_np()
1388 +#elif defined __DragonFly__
1389 +#include <sys/syscall.h>
1390 +#define get_curr_thread_id() syscall(SYS_lwp_gettid)
1392 #define get_curr_thread_id() pthread_self()