PKGBUILDs/community/percona-server/rocksdb-systemlibs.patch

53 lines
2.5 KiB
Diff
Raw Normal View History

diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 2a0a612..8424184 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -114,38 +114,11 @@ EXECUTE_PROCESS(
# split the list into lines
STRING(REGEX MATCHALL "[^\n]+" ROCKSDB_LIB_SOURCES ${SCRIPT_OUTPUT})
-# add bundled compression code
-SET(ROCKSDB_LIB_SOURCES
- ${ROCKSDB_LIB_SOURCES}
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lz4/lib/lz4.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lz4/lib/lz4hc.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lz4/lib/lz4frame.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/entropy_common.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/error_private.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/fse_decompress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/pool.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/threading.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/xxhash.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common/zstd_common.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/fse_compress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/huf_compress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstd_compress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/compress/zstdmt_compress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/decompress/huf_decompress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/decompress/zstd_decompress.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder/divsufsort.c
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder/zdict.c
-)
-
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/include
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/include/rocksdb
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/third-party/gtest-1.7.0/fused-src
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lz4/lib
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/common
- ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zstd/lib/dictBuilder
)
ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX -DZLIB -DLZ4
@@ -177,7 +150,7 @@ SET(ROCKSDB_SOURCES
${ROCKSDB_LIB_SOURCES}
)
-SET(rocksdb_static_libs ${rocksdb_static_libs} ${ZLIB_LIBRARY} "-lrt")
+SET(rocksdb_static_libs ${rocksdb_static_libs} ${ZLIB_LIBRARY} "-lrt -llz4 -lzstd")
MYSQL_ADD_PLUGIN(rocksdb ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT MODULE_ONLY
LINK_LIBRARIES ${rocksdb_static_libs}