diff --git a/thirdparty/diff-match-patch-cpp-stl/HPKBUILD b/thirdparty/diff-match-patch-cpp-stl/HPKBUILD index 4a9c24fc91fd1e21cae2a1da5de192267d4c67f1..ce1301bc69338fb41a6ebadb69637a2ae5024b31 100644 --- a/thirdparty/diff-match-patch-cpp-stl/HPKBUILD +++ b/thirdparty/diff-match-patch-cpp-stl/HPKBUILD @@ -9,24 +9,43 @@ archs=("armeabi-v7a" "arm64-v8a") license=("Apache License 2.0") depends=() makedepends=() - -source="https://github.com/leutloff/$pkgname/archive/refs/heads/$pkgver.zip" - -autounpack=true -downloadpackage=true +source="https://gitee.com/lycium_pkg_mirror/$pkgname.git" +autounpack=false +downloadpackage=false buildtools="cmake" builddir=$pkgname-${pkgver} -packagename=$builddir.zip - +#packagename=$builddir.zip +commitid=673dfc9d4bcb8cd0234894f5a245e9824abf5fbc +cloneflag=true prepare() { - mkdir -p $builddir/$ARCH-build + + 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/ - ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 - make -j4 -C $ARCH-build >> `pwd`/$ARCH-build/build.log 2>&1 + 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