diff --git a/thirdparty/cairo/HPKBUILD b/thirdparty/cairo/HPKBUILD new file mode 100644 index 0000000000000000000000000000000000000000..3f8ab78ff3616710bdf5d285e5c22d3c8b967e46 --- /dev/null +++ b/thirdparty/cairo/HPKBUILD @@ -0,0 +1,85 @@ +# 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=cairo +pkgver=1.17.8 +pkgrel=0 +pkgdesc="Cairo is a 2D graphics library with support for multiple output devices." +url="https://gitlab.freedesktop.org/cairo/cairo" +archs=("armeabi-v7a" "arm64-v8a") +license=("LGPL-2.1" "MPL 1.1") +depends=("glib" "freetype2" "fontconfig" "libpng" "zlib" "pixman" "libxml2" "libffi" "pcre2") +makedepends=("meson" "ninja") + +# 原仓地址: https://gitlab.freedesktop.org/cairo/$pkgname/-/archive/$pkgver/$pkgname-$pkgver.tar.gz ,因网络原因使用镜像 +source="https://gitee.com/mirrors/$pkgname/repository/archive/$pkgver.zip" + +buildtools="meson" +downloadpackage=true +autounpack=true + +builddir=$pkgname-$pkgver +packagename=$pkgname-$pkgver.zip + +pkgconfigpath= + +prepare() { + # meson 编译没有配置pkgconfigpath,需自己配置 + for depend in ${depends[@]} + do + dependpath=$LYCIUM_ROOT/usr/$depend/$ARCH/lib/pkgconfig + if [ ! -d ${dependpath} ] + then + continue + fi + pkgconfigpath=$pkgconfigpath"${dependpath}:" + done + pkgconfigpath=${pkgconfigpath%:*} + + mkdir -p $builddir/$ARCH-build + cp $ARCH-cross-file.txt ./$builddir +} + +build() { + cd $builddir + ohos_sdk_path=${OHOS_SDK//\//\\\/} + sed -i 's/ohos_sdk/'"$ohos_sdk_path"'/g' $ARCH-cross-file.txt + + meson setup $ARCH-build --cross-file $ARCH-cross-file.txt \ + --pkg-config-path=$pkgconfigpath \ + --prefix=$LYCIUM_ROOT/usr/$pkgname/$ARCH > $ARCH-build/build.log 2>&1 + ninja -v -C $ARCH-build >> $ARCH-build/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir + ninja -v -C $ARCH-build install >> $ARCH-build/build.log 2>&1 + unset pkgconfigpath + cd $OLDPWD +} + +check() { + echo "The test must be on an OpenHarmony device!" + # TODO +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir +} diff --git a/thirdparty/cairo/SHA512SUM b/thirdparty/cairo/SHA512SUM new file mode 100644 index 0000000000000000000000000000000000000000..e94f290ba3cce90ebb8c3cbd0fa10779bfa4c1bc --- /dev/null +++ b/thirdparty/cairo/SHA512SUM @@ -0,0 +1 @@ +7dca5536b57e7569084ce848b881f81efbe2a58b3fee951894808b6d6c142571741651040d2d16ca773778ec0b98890c9f32cfa1b448f45ed0a0c62d945e14ca cairo-1.17.8.zip diff --git a/thirdparty/cairo/arm64-v8a-cross-file.txt b/thirdparty/cairo/arm64-v8a-cross-file.txt new file mode 100644 index 0000000000000000000000000000000000000000..34ad3f25276acd1c3503e23ce42157e33c4375b3 --- /dev/null +++ b/thirdparty/cairo/arm64-v8a-cross-file.txt @@ -0,0 +1,26 @@ +[binaries] +c = 'ohos_sdk/native/llvm/bin/aarch64-linux-ohos-clang' +cpp = 'ohos_sdk/native/llvm/bin/aarch64-linux-ohos-clang++' +ar = 'ohos_sdk/native/llvm/bin/llvm-ar' +strip = 'ohos_sdk/native/llvm/bin/llvm-strip' +ld = 'ohos_sdk/native/llvm/bin/ld.lld' +pkgconfig = '/usr/bin/pkg-config' + +[host_machine] +system = 'linux' +cpu_family = 'aarch64' +cpu = 'arm64-v8a' +endian = 'little' + +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +sys_root = '' +platform = 'generic' +pkg_config_libdir = '' + +[built-in options] +c_args = ['-D__MUSL__=1', '-mfpu=neon'] +cpp_args = ['-D__MUSL__=1', '-mfpu=neon'] +c_link_args = [] +cpp_link_args = [] diff --git a/thirdparty/cairo/armeabi-v7a-cross-file.txt b/thirdparty/cairo/armeabi-v7a-cross-file.txt new file mode 100644 index 0000000000000000000000000000000000000000..2b6e25f2eeb4d8fad8f02a2cb527e68f26461ef8 --- /dev/null +++ b/thirdparty/cairo/armeabi-v7a-cross-file.txt @@ -0,0 +1,26 @@ +[binaries] +c = 'ohos_sdk/native/llvm/bin/arm-linux-ohos-clang' +cpp = 'ohos_sdk/native/llvm/bin/arm-linux-ohos-clang++' +ar = 'ohos_sdk/native/llvm/bin/llvm-ar' +strip = 'ohos_sdk/native/llvm/bin/llvm-strip' +ld = 'ohos_sdk/native/llvm/bin/ld.lld' +pkgconfig = '/usr/bin/pkg-config' + +[host_machine] +system = 'linux' +cpu_family = 'arm' +cpu = 'armeabi-v7a' +endian = 'little' + +[properties] +needs_exe_wrapper = true +skip_sanity_check = true +sys_root = '' +platform = 'generic' +pkg_config_libdir = '' + +[built-in options] +c_args = ['-fPIC', '-march=armv7a', '-mfloat-abi=softfp', '-mfpu=neon', '-D__MUSL__=1'] +cpp_args = ['-fPIC', '-march=armv7a', '-mfloat-abi=softfp', '-mfpu=neon', '-D__MUSL__=1'] +c_link_args = [] +cpp_link_args = [] diff --git a/thirdparty/fontconfig/HPKBUILD b/thirdparty/fontconfig/HPKBUILD index 8b5d7ab74ea79be8ee1b146fbf6889042e659381..94f2d4e34a84ebd5c5676aafb056bbfdefae9e2c 100644 --- a/thirdparty/fontconfig/HPKBUILD +++ b/thirdparty/fontconfig/HPKBUILD @@ -1,4 +1,17 @@ -# Contributor: 小肉头君 +# 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: 小肉头君 pkgname=fontconfig @@ -10,14 +23,16 @@ archs=("armeabi-v7a" "arm64-v8a") license=("MIT License") depends=("freetype2" "libxml2" "libpng" "json-c") makedepends=("gperf" "gettextize" "autopoint" "libtool") -source="https://gitlab.freedesktop.org/fontconfig/${pkgname}/-/archive/2.14.2/${pkgname}-${pkgver}.tar.gz" + +# 原仓地址: https://gitlab.freedesktop.org/fontconfig/${pkgname}/-/archive/2.14.2/${pkgname}-${pkgver}.tar.gz, 因网络原因使用镜像 +source="https://gitee.com/mirrors_community_gitlab_freedesktop/$pkgname/repository/archive/$pkgver.zip" autounpack=true downloadpackage=true buildtools="configure" builddir=$pkgname-$pkgver -packagename=$builddir.tar.gz +packagename=$builddir.zip autogenflag=true testpatch=true diff --git a/thirdparty/fontconfig/SHA512SUM b/thirdparty/fontconfig/SHA512SUM index 0a94efdad4fe76e658f3a37bfc6d21e61a12b7ee..5399c75feb716c387c01bcf178328a69344358da 100644 --- a/thirdparty/fontconfig/SHA512SUM +++ b/thirdparty/fontconfig/SHA512SUM @@ -1 +1 @@ -b6cbb4ad7db224dabfb8a96c1d0743bab5bbe8f403e49d9b9a44effd161fd97062a2f7205a700308a1f805655038538ba2fb1b65169faa2d69ea88e477230849 fontconfig-2.14.2.tar.gz +55442bc402e4f2ae14de11c3c9671cbca555aad13a3acaf2aad927b897db765ac3848e8d4172ccf98ffe85a7737a19d80224c6acb5590bc7b5cc174db3ec8368 fontconfig-2.14.2.zip diff --git a/thirdparty/libpng/HPKBUILD b/thirdparty/libpng/HPKBUILD index 2945160e48ad6100c6761598b356bae91b0f35c9..f89e12f803c9a6616b3a32ba2c81f14b1807d3dd 100644 --- a/thirdparty/libpng/HPKBUILD +++ b/thirdparty/libpng/HPKBUILD @@ -1,5 +1,19 @@ +# 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: Jeff Han # Maintainer: Jeff Han + pkgname=libpng pkgver=v1.6.39 pkgrel=0 @@ -11,14 +25,14 @@ depends=() makedepends=() install= -# 官方下载地址source="https://sourceforge.net/projects/$pkgname/files/libpng16/$pkgver/$pkgname-$pkgver.tar.xz"受网络影响可能存在下载失败的情况,现使用gitee镜像可以与官方仓库保持同步 -source="https://gitee.com/mirrors/$pkgname/repository/archive/$pkgver.zip" +# 原仓地址: https://sourceforge.net/projects/$pkgname/files/libpng16/$pkgver/$pkgname-$pkgver.tar.xz, 因网络原因使用镜像 +source="https://gitee.com/mirrors/$pkgname/repository/archive/v$pkgver.zip" autounpack=true downloadpackage=true buildtools="configure" -builddir=$pkgname-${pkgver} +builddir=$pkgname-v$pkgver packagename=$builddir.zip source envset.sh diff --git a/thirdparty/libpng/SHA512SUM b/thirdparty/libpng/SHA512SUM index 860f3fa773ac1c9dba9572179a530d27944e8190..18118aa1085af9ad70986703f1376d8a1fe2fd2f 100644 --- a/thirdparty/libpng/SHA512SUM +++ b/thirdparty/libpng/SHA512SUM @@ -1 +1 @@ -f37af87d972edf218867f4592959bdcd6bd79d22e8bc52ded30bd5555c02793fb8f4f4ca169edfa4917b89bc28ed3fe895f510ae51f1e228fa0532a65b78aed4 libpng-v1.6.39.zip +f37af87d972edf218867f4592959bdcd6bd79d22e8bc52ded30bd5555c02793fb8f4f4ca169edfa4917b89bc28ed3fe895f510ae51f1e228fa0532a65b78aed4 libpng-1.6.39.zip diff --git a/thirdparty/libxml2/HPKBUILD b/thirdparty/libxml2/HPKBUILD index 73d4f90413012d63f3ebfbfcbdc9b84496adb23a..5f9c323b7c69f48dcfac2aa51ed3a5beee687831 100644 --- a/thirdparty/libxml2/HPKBUILD +++ b/thirdparty/libxml2/HPKBUILD @@ -1,5 +1,19 @@ -# Contributor: Jeff Han +# 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: Jeff Han , 城meto # Maintainer: Jeff Han + pkgname=libxml2 pkgver=v2.11.3 pkgrel=0 @@ -10,13 +24,13 @@ license=("MIT") depends=("xz" "zlib") makedepends=() -# 官方下载地址source="https://github.com/GNOME/$pkgname/archive/refs/tags/$pkgver.tar.gz"受网络影响可能存在下载失败的情况,现使用gitee镜像可以与官方仓库保持同步 +# 原仓地址: https://github.com/GNOME/$pkgname/archive/refs/tags/$pkgver.tar.gz, 因网络原因使用镜像 source="https://gitee.com/lycium_pkg_mirror/$pkgname/repository/archive/$pkgver.zip" autounpack=true downloadpackage=true -builddir=$pkgname-${pkgver} +builddir=$pkgname-$pkgver packagename=$builddir.zip prepare() { diff --git a/thirdparty/libxml2/SHA512SUM b/thirdparty/libxml2/SHA512SUM index 3da3c4c8b9b137aca6fdb085d7318998d507aa5b..89e9d0eed863ab556bc84e4798a492ce02938ca7 100644 --- a/thirdparty/libxml2/SHA512SUM +++ b/thirdparty/libxml2/SHA512SUM @@ -1 +1 @@ -2a7f52ca623e99741f09a10a6059f4eb653c9077f3dc05bebb9f640eb7aff1ea58a06b9907e8fba5b5ff5b57ac548243a3fff762ab5d5906d57391171f5496b2 libxml2-v2.11.3.zip +2a7f52ca623e99741f09a10a6059f4eb653c9077f3dc05bebb9f640eb7aff1ea58a06b9907e8fba5b5ff5b57ac548243a3fff762ab5d5906d57391171f5496b2 libxml2-2.11.3.zip