This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 56d1fbf5309 [deps](compression) Opt gzip decompress by libdeflate on 
X86 and X86_64 platforms: 1. Add libdeflate lib.  (#27542) (#27711)
56d1fbf5309 is described below

commit 56d1fbf5309929ac8ceb868f1805273bb023d023
Author: Qi Chen <kaka11.c...@gmail.com>
AuthorDate: Thu Nov 30 13:56:00 2023 +0800

    [deps](compression) Opt gzip decompress by libdeflate on X86 and X86_64 
platforms: 1. Add libdeflate lib.  (#27542) (#27711)
    
    Backport from #27542.
---
 thirdparty/build-thirdparty.sh | 15 +++++++++++++++
 thirdparty/vars.sh             |  7 +++++++
 2 files changed, 22 insertions(+)

diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index 2a911ed27bb..7cb2b0b12c9 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -1633,6 +1633,20 @@ build_dragonbox() {
     "${BUILD_SYSTEM}" install
 }
 
+# libdeflate
+build_libdeflate() {
+    check_if_source_exist "${LIBDEFLATE_SOURCE}"
+    cd "${TP_SOURCE_DIR}/${LIBDEFLATE_SOURCE}"
+
+    rm -rf "${BUILD_DIR}"
+    mkdir -p "${BUILD_DIR}"
+    cd "${BUILD_DIR}"
+
+    "${CMAKE_CMD}" -G "${GENERATOR}" 
-DCMAKE_INSTALL_PREFIX="${TP_INSTALL_DIR}" -DCMAKE_BUILD_TYPE=Release ..
+    "${BUILD_SYSTEM}" -j "${PARALLEL}"
+    "${BUILD_SYSTEM}" install
+}
+
 if [[ "${#packages[@]}" -eq 0 ]]; then
     packages=(
         libunixodbc
@@ -1694,6 +1708,7 @@ if [[ "${#packages[@]}" -eq 0 ]]; then
         fast_float
         libunwind
         dragonbox
+        libdeflate
     )
     if [[ "$(uname -s)" == 'Darwin' ]]; then
         read -r -a packages <<<"binutils gettext ${packages[*]}"
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index e9e891059e8..33d956ac484 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -470,6 +470,12 @@ DRAGONBOX_NAME=dragonbox-1.1.3.tar.gz
 DRAGONBOX_SOURCE=dragonbox-1.1.3
 DRAGONBOX_MD5SUM="889dc00db9612c6949a4ccf8115e0e6a"
 
+# libdeflate
+LIBDEFLATE_DOWNLOAD="https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz";
+LIBDEFLATE_NAME=libdeflate-1.19.tar.gz
+LIBDEFLATE_SOURCE=libdeflate-1.19
+LIBDEFLATE_MD5SUM="c69e9193d2975a729068ffa862c81fb6"
+
 # all thirdparties which need to be downloaded is set in array TP_ARCHIVES
 export TP_ARCHIVES=(
     'LIBEVENT'
@@ -539,6 +545,7 @@ export TP_ARCHIVES=(
     'FAST_FLOAT'
     'HADOOP_LIBS'
     'DRAGONBOX'
+    'LIBDEFLATE'
 )
 
 if [[ "$(uname -s)" == 'Darwin' ]]; then


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to