当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
31 Star 196 Fork 200

OpenHarmony-SIG/tpc_c_cplusplus
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
HPKBUILD 1.86 KB
一键复制 编辑 原始数据 按行查看 历史
# Contributor: tvBrave<tianyong13@huawei.com>
# Maintainer: tvBrave <tianyong13@huawei.com>
pkgname=diff-match-patch-cpp-stl
pkgver=master
pkgrel=0
pkgdesc="C++ STL variant of https://code.google.com/p/google-diff-match-patch."
url="https://github.com/leutloff/diff-match-patch-cpp-stl"
archs=("armeabi-v7a" "arm64-v8a")
license=("Apache License 2.0")
depends=()
makedepends=()
source="https://gitee.com/lycium_pkg_mirror/$pkgname.git"
autounpack=false
downloadpackage=false
buildtools="cmake"
builddir=$pkgname-${pkgver}
#packagename=$builddir.zip
commitid=673dfc9d4bcb8cd0234894f5a245e9824abf5fbc
cloneflag=true
prepare() {
if [ $cloneflag == true ]
then
mkdir $builddir
git clone -b $pkgver $source $builddir > $publicbuildlog 2>&1
if [ $? != 0 ]
then
return -1
fi
cd $builddir
git reset --hard $commitid > $publicbuildlog 2>&1
if [ $? != 0 ]
then
return -1
fi
cd $OLDPWD
cloneflag=false
fi
mkdir -p $builddir/$ARCH-build
}
build() {
cd $builddir
PKG_CONFIG_LIBDIR="${pkgconfigpath}" ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \
-DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > $buildlog 2>&1
$MAKE VERBOSE=1 -C $ARCH-build >> $buildlog 2>&1
ret=$?
cd $OLDPWD
return $ret
}
package() {
install_dir=${LYCIUM_ROOT}/usr/${pkgname}/${ARCH}
mkdir -p ${install_dir}/bin
cd ${builddir}/$ARCH-build/
cp -af diff_match_patch_test_string ${install_dir}/bin
cp -af diff_match_patch_test_wstring ${install_dir}/bin
cd ${OLDPWD}
return 0
}
check() {
echo "The test must be on an OpenHarmony device!"
# 在OpenHarmony开发板中执行用例
# ./diff_match_patch_test_string
# ./diff_match_patch_test_wstring
}
# 清理环境
cleanbuild(){
rm -rf ${PWD}/$builddir #${PWD}/$packagename
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony-sig/tpc_c_cplusplus.git
git@gitee.com:openharmony-sig/tpc_c_cplusplus.git
openharmony-sig
tpc_c_cplusplus
tpc_c_cplusplus
master

搜索帮助