From 9366fce05e4bf9d391396b56f62558a907bf23f1 Mon Sep 17 00:00:00 2001 From: kangxiangjuan <1799721749@qq.com> Date: Thu, 25 Apr 2024 20:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=89=E6=96=B9=E5=BA=93st?= =?UTF-8?q?lport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: kangxiangjuan <1799721749@qq.com> --- thirdparty/stlport/HPKBUILD | 60 ++++++++++++++++++++++++ thirdparty/stlport/OAT.xml | 16 +++++++ thirdparty/stlport/README.OpenSource | 11 +++++ thirdparty/stlport/README_zh.md | 11 +++++ thirdparty/stlport/SHA512SUM | 1 + thirdparty/stlport/docs/hap_integrate.md | 45 ++++++++++++++++++ 6 files changed, 144 insertions(+) create mode 100644 thirdparty/stlport/HPKBUILD create mode 100644 thirdparty/stlport/OAT.xml create mode 100644 thirdparty/stlport/README.OpenSource create mode 100644 thirdparty/stlport/README_zh.md create mode 100644 thirdparty/stlport/SHA512SUM create mode 100644 thirdparty/stlport/docs/hap_integrate.md diff --git a/thirdparty/stlport/HPKBUILD b/thirdparty/stlport/HPKBUILD new file mode 100644 index 00000000..a726f6ec --- /dev/null +++ b/thirdparty/stlport/HPKBUILD @@ -0,0 +1,60 @@ +# 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: zhengxiaoqing +# Maintainer: zhengxiaoqing + +pkgname=STLport +pkgver=5.2.1 +pkgrel=0 +pkgdesc="STLport is a full ANSI C++ Standard library." +url="https://github.com/frida/stlport" +archs=("armeabi-v7a" "arm64-v8a") +license=() +depends=() +makedepends=() +source="https://sourceforge.net/projects/stlport/files/STLport/STLport-5.2.1/STLport-5.2.1.tar.gz" + +downloadpackage=true +autounpack=true +buildtools="configure" + +builddir=$pkgname-$pkgver +packagename=$builddir.tar.gz +cloneflag=true + +# 此三方库原库编译需要依赖gcc-5.4.6版本过低,但OH工具链提供的版本较高,无法编译,故此脚本不进行编译,只需要下载需要移植的源码即可。 +prepare() { + cd $builddir + cd $OLDPWD +} + +build() { + cd $builddir + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" +} + +cleanbuild(){ + rm -rf ${PWD}/$builddir #${PWD}/$packageName +} \ No newline at end of file diff --git a/thirdparty/stlport/OAT.xml b/thirdparty/stlport/OAT.xml new file mode 100644 index 00000000..eeb1f946 --- /dev/null +++ b/thirdparty/stlport/OAT.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/thirdparty/stlport/README.OpenSource b/thirdparty/stlport/README.OpenSource new file mode 100644 index 00000000..ed8f5513 --- /dev/null +++ b/thirdparty/stlport/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "stlport", + "License": "Apache License", + "License File": "LICENSE", + "Version Number": "5.2.1", + "Owner": "xiafeng@huawei.com", + "Upstream URL": "https://github.com/frida/stlport", + "Description": "stlport is a full ANSI C++ Standard library." + } +] \ No newline at end of file diff --git a/thirdparty/stlport/README_zh.md b/thirdparty/stlport/README_zh.md new file mode 100644 index 00000000..a6ef2618 --- /dev/null +++ b/thirdparty/stlport/README_zh.md @@ -0,0 +1,11 @@ +# stlport三方库说明 +## 功能简介 +stlport是一个多平台C++标准库,支持许多编译器和操作环境库。 +## 使用约束 +- IDE版本:DevEco Studio 3.1 Release +- SDK版本:ohos_sdk_public 4.0.8.1 (API Version 10 Release) +- 三方库版本:5.2.1 +- 当前适配的功能:是一个多平台C++标准库,支持许多编译器和操作环境库。 + +## 集成方式 ++ [应用hap包集成](docs/hap_integrate.md) diff --git a/thirdparty/stlport/SHA512SUM b/thirdparty/stlport/SHA512SUM new file mode 100644 index 00000000..66102d4d --- /dev/null +++ b/thirdparty/stlport/SHA512SUM @@ -0,0 +1 @@ +f2959fa0124161dff1ef5fddab8f79bab1335fe640938bb6aa2d9a644998607a4016febccae83fc57a5744f2af310a6beee66fcbec9522c173a99e2d5a452481 STLport-5.2.1.tar.gz \ No newline at end of file diff --git a/thirdparty/stlport/docs/hap_integrate.md b/thirdparty/stlport/docs/hap_integrate.md new file mode 100644 index 00000000..b861b533 --- /dev/null +++ b/thirdparty/stlport/docs/hap_integrate.md @@ -0,0 +1,45 @@ +# stlport 集成到应用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/stlport #三方库stlport的目录结构如下 + ├── docs #三方库相关文档的文件夹 + ├── HPKBUILD #构建脚本 + ├── SHA512SUM #三方库校验文件 + ├── OAT.xml #OAT开源审查文本文件 + ├── README.OpenSource #说明三方库源码的下载地址,版本,license等信息 + ├── README_zh.md #三方库简介 + ``` + +- 在lycium目录下编译三方库 + + 编译环境的搭建参考[准备三方库构建环境](../../../lycium/README.md#1编译环境准备) + + ```shell + cd lycium + ./build.sh stlport + ``` + +# 此三方库原库编译需要依赖gcc-5.4.6版本过低,但OH工具链提供的版本较高,无法编译,故此脚本不进行编译,只需要下载需要移植的源码即可。 + +## 参考资料 + +- [润和RK3568开发板标准系统快速上手](https://gitee.com/openharmony-sig/knowledge_demo_temp/tree/master/docs/rk3568_helloworld) +- [OpenHarmony三方库地址](https://gitee.com/openharmony-tpc) +- [OpenHarmony知识体系](https://gitee.com/openharmony-sig/knowledge) +- [通过DevEco Studio开发一个NAPI工程](https://gitee.com/openharmony-sig/knowledge_demo_temp/blob/master/docs/napi_study/docs/hello_napi.md) \ No newline at end of file -- Gitee