代码拉取完成,页面将自动刷新
# 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
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。