diff --git a/thirdparty/gc/OAT.xml b/thirdparty/gc/OAT.xml index 211b81fb607ad0792b29636251094bacd2736f2d..eeb1f946d683c0b81976cd06522096062a6901b9 100644 --- a/thirdparty/gc/OAT.xml +++ b/thirdparty/gc/OAT.xml @@ -4,11 +4,9 @@ - - diff --git a/thirdparty/qhull/HPKBUILD b/thirdparty/qhull/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..176cfbdc4309256ebd0aa644d469d55185019cea --- /dev/null +++ b/thirdparty/qhull/HPKBUILD @@ -0,0 +1,65 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: Jeff Han ,li-santian <2372581223@qq.com> +# Maintainer: Jeff Han + +pkgname=qhull +pkgver=8.1-alpha3 +pkgrel=0 +pkgdesc="Qhull is a general dimension code for computing convex hulls, Delaunay triangulations, halfspace intersections about a point, Voronoi diagrams, furthest-site Delaunay triangulations, and furthest-site Voronoi diagrams." +url="https://github.com/qhull/qhull" +archs=("armeabi-v7a" "arm64-v8a") +license=("Qhull Libre Software License") +depends=() +makedepends=() + +source="https://codeload.github.com/$pkgname/$pkgname/zip/refs/tags/v8.1-alpha3" +downloadpackage=true +autounpack=true + +builddir=$pkgname-${pkgver} +packagename=$builddir.zip + +source envset.sh +prepare() { + mkdir -p $builddir/$ARCH-build +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \ + -DBUILD_STATIC_LIBS=ON \ + -B$ARCH-build -S./ > $buildlog 2>&1 + $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1 + ret=$? + cd $OLDPWD + return $ret + return 0 +} + +package() { + cd $builddir + $MAKE -C $ARCH-build install >> $buildlog 2>&1 + cd $OLDPWD + return 0 +} + +check() { + echo "The test must be on an OpenHarmony device!" +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir +} diff --git a/thirdparty/qhull/HPKCHECK b/thirdparty/qhull/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..94fbb5eb98ae558ee59c83a920abca399650e5fa --- /dev/null +++ b/thirdparty/qhull/HPKCHECK @@ -0,0 +1,36 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: Jeff Han ,li-santian <2372581223@qq.com> +# Maintainer: Jeff Han + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +checkprepare(){ + return 0 +} + +# 在OH环境执行测试的接口 +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ctest > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ];then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + return $res +} diff --git a/thirdparty/qhull/OAT.xml b/thirdparty/qhull/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9 --- /dev/null +++ b/thirdparty/qhull/OAT.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/qhull/README.OpenSource b/thirdparty/qhull/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..fdcd1eb9ee40b943e19ca76e9f1c42ad14433d0a --- /dev/null +++ b/thirdparty/qhull/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "qhull", + "License": "Qhull Libre Software License", + "License File": "COPYING", + "Version Number": "qhull-v8.1-alpha3", + "Owner": "huangminzhong2@huawei.com", + "Upstream URL": "https://codeload.github.com/$pkgname/$pkgname/zip/refs/tags/v8.1-alpha3", + "Description": "qhull is a general dimension code for computing convex hulls, Delaunay triangulations, halfspace intersections about a point, Voronoi diagrams, furthest-site Delaunay triangulations, and furthest-site Voronoi diagrams. " + } +] diff --git a/thirdparty/qhull/README_zh.md b/thirdparty/qhull/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..b014795066deb645a4c725889cd91d7d0a10b900 --- /dev/null +++ b/thirdparty/qhull/README_zh.md @@ -0,0 +1,14 @@ +# qhull 三方库说明 + +## 功能简介 + +qhull 是一个用于计算凸包、Delaunay 三角剖分和 Voronoi 图等计算几何问题的开源库。 + +## 使用约束 + +- SDK版本:ohos_sdk_linux 5.0.3.100 +- 三方库版本:qhull-v8.1-alpha3 + +## 集成方式 + ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/qhull/SHA512SUM b/thirdparty/qhull/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..df82b18927489b6964364b013878fc553d188db9 --- /dev/null +++ b/thirdparty/qhull/SHA512SUM @@ -0,0 +1 @@ +2e4964279e983ff70b5d9509a76e5e5c3cb8c20badfc4bf10275f66142ab57c53a9ac95c48b9f415f2d39d5be387c45294532ce9b698c3ac484ff853fff7f9e0 qhull-8.1-alpha3.zip diff --git a/thirdparty/qhull/docs/hap_integrate.md b/thirdparty/qhull/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..2fd37cabd20031ac703b338d04e3a2b7c71a4d73 --- /dev/null +++ b/thirdparty/qhull/docs/hap_integrate.md @@ -0,0 +1,84 @@ +# qhull集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- [开发环境准备](../../../docs/hap_integrate_environment.md) + +## 编译三方库 + +* 下载本仓库 + + ```shell + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +* 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/qhull #三方库qhull的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── HPKCHECK #测试脚本 + ├── OAT.xml #扫描结果文件 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md #三方库简介 + ``` + +* 在lycium目录下编译三方库 + + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + + ```shell + cd lycium + ./build.sh qhull + ``` + +* 三方库头文件及生成的库 + + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + + ```shell + qhull/arm64-v8a qhull/armeabi-v7a + ``` + +* [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下; +- 在IDE的entry目录下新增libs目录,将编译生成的.a文件拷贝到该目录下。如下图所示: + + ![thirdparty_install_dir](pic/qhull-dev.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```cmake + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libqhullcpp.a) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libqhullstatic.a) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/libqhullstatic_r.a) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/qhull/${OHOS_ARCH}/include/libqhull) + ``` + +## 测试三方库 + +- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) + +- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示 + + ``` + cd /data/tpc_c_cplusplus/thirdparty/qhull/qhull-8.1-alpha3/armeabi-v7a-build + ctest + ``` + + ![libqhull_test](pic/test-cmd-ret.png) + +## 参考资料 + +* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +* [libqhull三方库地址](https://github.com/qhull/qhull) diff --git a/thirdparty/qhull/docs/pic/qhull-dev.png b/thirdparty/qhull/docs/pic/qhull-dev.png new file mode 100644 index 0000000000000000000000000000000000000000..b7cff73c37ffa95a111350e1b7091b2961c10d68 Binary files /dev/null and b/thirdparty/qhull/docs/pic/qhull-dev.png differ diff --git a/thirdparty/qhull/docs/pic/test-cmd-ret.png b/thirdparty/qhull/docs/pic/test-cmd-ret.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4cd8df1b7346b2f7d9d2635d6cfe7f16e91305 Binary files /dev/null and b/thirdparty/qhull/docs/pic/test-cmd-ret.png differ diff --git a/thirdparty/uriparser/HPKBUILD b/thirdparty/uriparser/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..6555b0c81e35be095d77a0c4689003271d8e40a3 --- /dev/null +++ b/thirdparty/uriparser/HPKBUILD @@ -0,0 +1,66 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: Jeff Han ,li-santian <2372581223@qq.com> +# Maintainer: Jeff Han + +pkgname=uriparser +pkgver=uriparser-0.9.8 +pkgrel=0 +pkgdesc="uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C89." +url="https://github.com/uriparser/uriparser" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD 3-Clause License") +depends=("googletest") +makedepends=() + +source="https://codeload.github.com/$pkgname/$pkgname/zip/refs/tags/$pkgver" +downloadpackage=true +autounpack=true + +builddir=$pkgname-${pkgver} +packagename=$builddir.zip + +source envset.sh +prepare() { + mkdir -p $builddir/$ARCH-build +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \ + -DCAMEK_BUILD_TYPE=Release \ + -DURIPARSER_BUILD_DOCS:BOOL=OFF \ + -DCMAKE_INSTALL_PREFIX=${PWD}/../../../lycium/usr/$pkgname/$ARCH \ + -B$ARCH-build -S./ > $buildlog 2>&1 + $MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + $MAKE -C $ARCH-build install >> $buildlog 2>&1 + cd $OLDPWD + return 0 +} + +check() { + echo "The test must be on an OpenHarmony device!" +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir +} diff --git a/thirdparty/uriparser/HPKCHECK b/thirdparty/uriparser/HPKCHECK new file mode 100644 index 0000000000000000000000000000000000000000..ebb241c6e0a39027898798cbe23b485e05c47bc3 --- /dev/null +++ b/thirdparty/uriparser/HPKCHECK @@ -0,0 +1,36 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: Jeff Han ,li-santian <2372581223@qq.com> +# Maintainer: Jeff Han + +source HPKBUILD > /dev/null 2>&1 +logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log + +checkprepare(){ + return 0 +} + +# OHִвԵĽӿ +openharmonycheck() { + res=0 + cd ${builddir}/${ARCH}-build + ./testrunner > ${logfile} 2>&1 + res=$? + if [ $res -ne 0 ];then + mkdir ${LYCIUM_FAULT_PATH}/${pkgname} + cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + fi + cd $OLDPWD + return $res +} diff --git a/thirdparty/uriparser/OAT.xml b/thirdparty/uriparser/OAT.xml new file mode 100644 index 0000000000000000000000000000000000000000..eeb1f946d683c0b81976cd06522096062a6901b9 --- /dev/null +++ b/thirdparty/uriparser/OAT.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/uriparser/README.OpenSource b/thirdparty/uriparser/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..2951885b1bd9c8f782586f2d5eff1b4742e26870 --- /dev/null +++ b/thirdparty/uriparser/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "uriparser", + "License": "BSD 3-Clause License", + "License File": "COPYING", + "Version Number": "uriparser-uriparser-0.9.8", + "Owner": "huangminzhong2@huawei.com", + "Upstream URL": "https://github.com/uriparser/uriparser", + "Description": "uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C89." + } +] diff --git a/thirdparty/uriparser/README_zh.md b/thirdparty/uriparser/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..9f39c3f5b76c8e3f7ca6f1eb13ffe1eab2dc9d96 --- /dev/null +++ b/thirdparty/uriparser/README_zh.md @@ -0,0 +1,14 @@ +# uriparser 三方库说明 + +## 功能简介 + +uriparser 是一个开源的 URI(统一资源标识符)解析库,用于解析和处理 URI。 + +## 使用约束 + +- SDK版本:ohos_sdk_linux 5.0.3.100 +- 三方库版本:uriparser-uriparser-0.9.8 + +## 集成方式 + ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/uriparser/SHA512SUM b/thirdparty/uriparser/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..c091590089e6caf48bad4a0da0a8e7e5ea89bbd9 --- /dev/null +++ b/thirdparty/uriparser/SHA512SUM @@ -0,0 +1 @@ +1230d91159f2f05c96cc733e59dbf9ba181d0698fc6323a61f4b3249c2936e6e83e4c5c3d668c57738cbf46e44efd14a55cf165d757457e8a7975127b16f4723 uriparser-uriparser-0.9.8.zip diff --git a/thirdparty/uriparser/docs/hap_integrate.md b/thirdparty/uriparser/docs/hap_integrate.md new file mode 100644 index 0000000000000000000000000000000000000000..a2d9283c8347f23168ba4162187b09475b088e8b --- /dev/null +++ b/thirdparty/uriparser/docs/hap_integrate.md @@ -0,0 +1,85 @@ +# uriparser集成到应用hap + +本库是在RK3568开发板上基于OpenHarmony3.2 Release版本的镜像验证的,如果是从未使用过RK3568,可以先查看[润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld)。 + +## 开发环境 + +- [开发环境准备](../../../docs/hap_integrate_environment.md) + +## 编译三方库 + +* 下载本仓库 + + ```shell + git clone https://gitee.com/openharmony-sig/tpc_c_cplusplus.git --depth=1 + ``` + +* 三方库目录结构 + + ```shell + tpc_c_cplusplus/thirdparty/uriparser #三方库uriparser的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── HPKCHECK #测试脚本 + ├── OAT.xml #扫描结果文件 + ├── SHA512SUM #三方库校验文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md #三方库简介 + ``` + +* 在lycium目录下编译三方库 + + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + + ```shell + cd lycium + ./build.sh uriparser + ``` + +* 三方库头文件及生成的库 + + 在lycium目录下会生成usr目录,该目录下存在已编译完成的32位和64位三方库 + + ```shell + uriparser/arm64-v8a uriparser/armeabi-v7a + ``` + +* [测试三方库](#测试三方库) + +## 应用中使用三方库 + +- 在IDE的cpp目录下新增thirdparty目录,将编译生成的头文件拷贝到该目录下; +- 在IDE的entry目录下新增libs目录,将编译生成的.so文件拷贝到该目录下。如下图所示: + + ![thirdparty_install_dir](pic/uriparser-dev.png) + +- 在最外层(cpp目录下)CMakeLists.txt中添加如下语句 + + ```cmake + #将三方库加入工程中 + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liburiparser.so) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liburiparser.so.1) + target_link_libraries(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH}/liburiparser.so.1.0.31) + #将三方库的头文件加入工程中 + target_include_directories(entry PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/uriparser/${OHOS_ARCH}/include/uriparser) + ``` + + +## 测试三方库 + +- 编译出可执行的文件进行测试,[准备三方库测试环境](../../../lycium/README.md#3ci环境准备) + +- 进入到构建目录运行测试用例(注意arm64-v8a为构建64位的目录,armeabi-v7a为构建32位的目录),执行结果如图所示 +``` + cd /data/tpc_c_cplusplus/ thirdparty/uriparser/uriparser-uriparser-0.9.8/armeabi-v7a-build + ./testrunner +``` + + ![liburiparser_test](pic/test-cmd-ret.png) + +## 参考资料 + +* [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +* [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +* [liburiparser三方库地址](https://github.com/uriparser/uriparser) + diff --git a/thirdparty/uriparser/docs/pic/test-cmd-ret.png b/thirdparty/uriparser/docs/pic/test-cmd-ret.png new file mode 100644 index 0000000000000000000000000000000000000000..bb01f545e29c8d0e1b999b05b3de98d07f4adf3e Binary files /dev/null and b/thirdparty/uriparser/docs/pic/test-cmd-ret.png differ diff --git a/thirdparty/uriparser/docs/pic/uriparser-dev.png b/thirdparty/uriparser/docs/pic/uriparser-dev.png new file mode 100644 index 0000000000000000000000000000000000000000..0833736312e0d112bdbc883d5def62f956878f30 Binary files /dev/null and b/thirdparty/uriparser/docs/pic/uriparser-dev.png differ