From d2702a44b5bfa01c38567f51a60fe3226b53dbbb Mon Sep 17 00:00:00 2001 From: Socrates Date: Tue, 25 Mar 2025 10:15:26 +0800 Subject: [PATCH] [enhance](third-party) Add pugixml library (#49238) Add third party library [pugixml](https://github.com/zeux/pugixml) to impl functions xpath_string --- dist/LICENSE-dist.txt | 1 + dist/licenses/LICENSE-pugixml.txt | 24 ++++++++++++++++++++++++ thirdparty/CHANGELOG.md | 4 ++++ thirdparty/build-thirdparty.sh | 18 ++++++++++++++++++ thirdparty/vars.sh | 7 +++++++ 5 files changed, 54 insertions(+) create mode 100644 dist/licenses/LICENSE-pugixml.txt diff --git a/dist/LICENSE-dist.txt b/dist/LICENSE-dist.txt index 512897abb8f0f0..edcdc388417cb0 100644 --- a/dist/LICENSE-dist.txt +++ b/dist/LICENSE-dist.txt @@ -1537,3 +1537,4 @@ Other dependencies: * concurrentqueue: 1.0.3 -- licenses/LICENSE-concurrentqueue.txt * FlameGraph -- licenses/LICENSE-CDDL-1.0.txt * icu 75.1 -- licenses/LICENSE-icu.txt + * pugixml 1.15 -- licenses/LICENSE-pugixml.txt diff --git a/dist/licenses/LICENSE-pugixml.txt b/dist/licenses/LICENSE-pugixml.txt new file mode 100644 index 00000000000000..8cb76c9df6d17a --- /dev/null +++ b/dist/licenses/LICENSE-pugixml.txt @@ -0,0 +1,24 @@ +MIT License + +Copyright (c) 2006-2025 Arseny Kapoulkine + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/thirdparty/CHANGELOG.md b/thirdparty/CHANGELOG.md index 5caba7e28bce21..350e914572d539 100644 --- a/thirdparty/CHANGELOG.md +++ b/thirdparty/CHANGELOG.md @@ -14,6 +14,10 @@ This file contains version of the third-party dependency libraries in the build- - Added: icu 75-1, develop ICU tokenizer based on ICU library. +## 20250324 + +- Added: pugixml 1.15, a C++ XML processing library. + ## 20250225 - Modified: hadoop-libs 3.3.6.4 -> 3.3.6.5 diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh index 60975266880613..5d9141b6e7aba0 100755 --- a/thirdparty/build-thirdparty.sh +++ b/thirdparty/build-thirdparty.sh @@ -1863,6 +1863,23 @@ build_jindofs() { cp -r ${TP_SOURCE_DIR}/${JINDOFS_SOURCE}/* "${TP_INSTALL_DIR}/jindofs_libs/" } +# pugixml +build_pugixml() { + check_if_source_exist "${PUGIXML_SOURCE}" + cd "${TP_SOURCE_DIR}/${PUGIXML_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 + + cp "${TP_SOURCE_DIR}/${PUGIXML_SOURCE}/src/pugixml.hpp" "${TP_INSTALL_DIR}/include/" + cp "${TP_SOURCE_DIR}/${PUGIXML_SOURCE}/src/pugiconfig.hpp" "${TP_INSTALL_DIR}/include/" +} + if [[ "${#packages[@]}" -eq 0 ]]; then packages=( jindofs @@ -1934,6 +1951,7 @@ if [[ "${#packages[@]}" -eq 0 ]]; then dragonbox brotli icu + pugixml ) if [[ "$(uname -s)" == 'Darwin' ]]; then read -r -a packages <<<"binutils gettext ${packages[*]}" diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh index 69969256f890b6..d694968d86dcbb 100644 --- a/thirdparty/vars.sh +++ b/thirdparty/vars.sh @@ -532,6 +532,12 @@ JINDOFS_NAME=jindofs-6.8.2-libs-0.1.tar.gz JINDOFS_SOURCE=jindofs-6.8.2-libs-0.1 JINDOFS_MD5SUM="0e5b0f71e636b8ed3f09e0bf16208fd1" +# pugixml +PUGIXML_DOWNLOAD="https://github.com/zeux/pugixml/releases/download/v1.15/pugixml-1.15.tar.gz" +PUGIXML_NAME=pugixml-1.15.tar.gz +PUGIXML_SOURCE=pugixml-1.15 +PUGIXML_MD5SUM="3b894c29455eb33a40b165c6e2de5895" + # all thirdparties which need to be downloaded is set in array TP_ARCHIVES export TP_ARCHIVES=( 'LIBEVENT' @@ -611,6 +617,7 @@ export TP_ARCHIVES=( 'DRAGONBOX' 'ICU' 'JINDOFS' + 'PUGIXML' ) if [[ "$(uname -s)" == 'Darwin' ]]; then