diff --git a/thirdparty/pcre2/HPKBUILD b/thirdparty/pcre2/HPKBUILD new file mode 100755 index 0000000000000000000000000000000000000000..c1f8998edc4d1d54680f0c5be429d17260440063 --- /dev/null +++ b/thirdparty/pcre2/HPKBUILD @@ -0,0 +1,61 @@ +# 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: 城meto +# Maintainer: 城meto + +pkgname=pcre2 +pkgver=pcre2-10.42 +pkgrel=0 +pkgdesc="The PCRE2 library is a set of C functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5." +url="https://github.com/PCRE2Project/pcre2" +archs=("armeabi-v7a" "arm64-v8a") +license=("BSD license") +depends=() +makedepends=() +source="https://github.com/PCRE2Project/$pkgname/archive/refs/tags/$pkgver.tar.gz" + +autounpack=true +downloadpackage=true + +builddir=$pkgname-$pkgver +packagename=$pkgname-$pkgver.tar.gz + +prepare() { + mkdir -p $builddir/$ARCH-build +} + +build() { + cd $builddir + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" \ + -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > $ARCH-build/build.log 2>&1 + make -j4 -C $ARCH-build VERBOSE=1 >> $ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + make -C $ARCH-build install VERBOSE=1 >> $ARCH-build/build.log 2>&1 + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" + # TODO +} + +# 清理环境 +cleanbuild(){ + rm -rf ${PWD}/$builddir #${PWD}/$packagename +} \ No newline at end of file diff --git a/thirdparty/pcre2/SHA512SUM b/thirdparty/pcre2/SHA512SUM new file mode 100755 index 0000000000000000000000000000000000000000..be41128dacf8831a72f9105b1624f9a33d7e4232 --- /dev/null +++ b/thirdparty/pcre2/SHA512SUM @@ -0,0 +1 @@ +3d0ee66e23809d3da2fe2bf4ed6e20b0fb96c293a91668935f6319e8d02e480eeef33da01e08a7436a18a1a85a116d83186b953520f394c866aad3cea73c7f5c pcre2-pcre2-10.42.tar.gz