From 0bd7c065e5ac349c327e39d30dfc63d3934adeef Mon Sep 17 00:00:00 2001 From: xuwenlong Date: Sat, 26 Aug 2023 19:32:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9harfbuzz?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuwenlong --- thirdparty/harfbuzz/HPKBUILD | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/thirdparty/harfbuzz/HPKBUILD b/thirdparty/harfbuzz/HPKBUILD index a76d17bf..dd33ff1a 100644 --- a/thirdparty/harfbuzz/HPKBUILD +++ b/thirdparty/harfbuzz/HPKBUILD @@ -1,3 +1,16 @@ +# 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: 小肉头君 # Maintainer: 小肉头君 @@ -8,7 +21,7 @@ pkgdesc="HarfBuzz text shaping engine." url="https://github.com/harfbuzz/harfbuzz" archs=("armeabi-v7a" "arm64-v8a") license=("Old MIT") -depends=() +depends=("freetype2") makedepends=() source="https://github.com/$pkgname/$pkgname/archive/refs/tags/$pkgver.tar.gz" @@ -20,11 +33,9 @@ builddir=$pkgname-$pkgver packagename=$builddir.tar.gz source envset.sh -autogenflag=true host= prepare() { - mkdir -p $builddir/$ARCH-build if [ $ARCH == "armeabi-v7a" ] then setarm32ENV @@ -35,18 +46,17 @@ prepare() { setarm64ENV host=aarch64-linux fi - if $autogenflag - then - cd $builddir - ./autogen.sh > `pwd`/build.log 2>&1 - cd $OLDPWD - autogenflag=false - fi + mkdir -p $builddir/$ARCH-build + # autogen可直接生产Makefile, 应直接生成到编译目录 + cd $builddir/$ARCH-build + ../autogen.sh > `pwd`/build.log 2>&1 + cd $OLDPWD } build() { cd $builddir/$ARCH-build - ../configure "$@" --host=$host --with-freetype=no --with-icu=no --with-glib=no -with-cairo=no --enable-static > `pwd`/build.log 2>&1 + # freetype2 功能选项需要打开,其他库需要 + PKG_CONFIG_PATH="${pkgconfigpath}" ../configure "$@" --host=$host --with-freetype=yes --with-icu=no --with-glib=no -with-cairo=no --enable-static > `pwd`/build.log 2>&1 make -j4 >> `pwd`/build.log 2>&1 ret=$? cd $OLDPWD -- Gitee From 13c4e217852bb880836e53bffd090e5935e931c1 Mon Sep 17 00:00:00 2001 From: xuwenlong Date: Mon, 28 Aug 2023 14:55:56 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuwenlong --- thirdparty/freetype2/HPKBUILD | 17 +++++++++++++++-- thirdparty/harfbuzz/HPKBUILD | 26 +++++++++++++++----------- thirdparty/harfbuzz/SHA512SUM | 2 +- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/thirdparty/freetype2/HPKBUILD b/thirdparty/freetype2/HPKBUILD index 86a35a69..1441ecef 100644 --- a/thirdparty/freetype2/HPKBUILD +++ b/thirdparty/freetype2/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: tyBrave # Maintainer: tyBrave + pkgname=freetype2 pkgver=2.13.0 pkgrel=0 @@ -7,7 +21,7 @@ pkgdesc="" url="https://sourceforge.net/projects/freetype" archs=("armeabi-v7a" "arm64-v8a") license=("GPL FTL") -depends=("zlib" "bzip2" "brotli" "libpng" "harfbuzz") +depends=("zlib" "bzip2" "brotli" "libpng") makedepends=() source="https://sourceforge.net/projects/freetype/files/$pkgname/$pkgver/freetype-$pkgver.tar.xz" @@ -53,7 +67,6 @@ check() { add_executable(freetype-cmake-test main.c)\n target_link_libraries(freetype-cmake-test PUBLIC $LYCIUM_ROOT/usr/$pkgname/$ARCH/lib/libfreetype.a)\n - target_link_libraries(freetype-cmake-test PUBLIC $LYCIUM_ROOT/usr/harfbuzz/$ARCH/lib/libharfbuzz.so)\n target_link_libraries(freetype-cmake-test PUBLIC $LYCIUM_ROOT/usr/brotli/$ARCH/lib/libbrotlidec.so)\n target_link_libraries(freetype-cmake-test PUBLIC $LYCIUM_ROOT/usr/bzip2/$ARCH/lib/libbz2.a)\n target_link_libraries(freetype-cmake-test PUBLIC $LYCIUM_ROOT/usr/libpng/$ARCH/lib/libpng.a)\n diff --git a/thirdparty/harfbuzz/HPKBUILD b/thirdparty/harfbuzz/HPKBUILD index dd33ff1a..8a9fee0e 100644 --- a/thirdparty/harfbuzz/HPKBUILD +++ b/thirdparty/harfbuzz/HPKBUILD @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Contributor: 小肉头君 +# Contributor: 小肉头君 , 城meto # Maintainer: 小肉头君 pkgname=harfbuzz @@ -23,19 +23,22 @@ archs=("armeabi-v7a" "arm64-v8a") license=("Old MIT") depends=("freetype2") makedepends=() -source="https://github.com/$pkgname/$pkgname/archive/refs/tags/$pkgver.tar.gz" +# 原仓地址: https://github.com/$pkgname/$pkgname/archive/refs/tags/$pkgver.tar.gz, 因网络原因使用镜像 +source="https://gitee.com/lycium_pkg_mirror/$pkgname/repository/archive/$pkgver.zip" autounpack=true downloadpackage=true buildtools="configure" builddir=$pkgname-$pkgver -packagename=$builddir.tar.gz +packagename=$builddir.zip source envset.sh +autogenflag=true host= prepare() { + mkdir -p $builddir/$ARCH-build if [ $ARCH == "armeabi-v7a" ] then setarm32ENV @@ -46,18 +49,19 @@ prepare() { setarm64ENV host=aarch64-linux fi - mkdir -p $builddir/$ARCH-build - # autogen可直接生产Makefile, 应直接生成到编译目录 - cd $builddir/$ARCH-build - ../autogen.sh > `pwd`/build.log 2>&1 - cd $OLDPWD + if $autogenflag + then + cd $builddir + ./autogen.sh > `pwd`/build.log 2>&1 + cd $OLDPWD + autogenflag=false + fi } build() { cd $builddir/$ARCH-build - # freetype2 功能选项需要打开,其他库需要 - PKG_CONFIG_PATH="${pkgconfigpath}" ../configure "$@" --host=$host --with-freetype=yes --with-icu=no --with-glib=no -with-cairo=no --enable-static > `pwd`/build.log 2>&1 - make -j4 >> `pwd`/build.log 2>&1 + PKG_CONFIG_PATH=${pkgconfigpath} ../configure "$@" --host=$host --with-freetype=yes --with-icu=no --with-glib=no -with-cairo=no --enable-static > `pwd`/build.log 2>&1 + make -j4 VERBOSE=1 >> `pwd`/build.log 2>&1 ret=$? cd $OLDPWD return $ret diff --git a/thirdparty/harfbuzz/SHA512SUM b/thirdparty/harfbuzz/SHA512SUM index 4ef71985..63c1d0a8 100644 --- a/thirdparty/harfbuzz/SHA512SUM +++ b/thirdparty/harfbuzz/SHA512SUM @@ -1 +1 @@ -aaef6801c73492624f19dececd956c03fda82a441b81553dfcd0bd47e5120b1d61acfef422a6cd0ded490d16ee4ee9088abdc0faba2a84884905e7cd63fe59d6 harfbuzz-7.1.0.tar.gz +7a51be0c3ac58731505878d9b2b656c7daece0b5151e5da7025a6b21c375de65b21df53622961cb747bac5e0d69b7045396334263706c56c4d4c97f7b7b2ef1e harfbuzz-7.1.0.zip -- Gitee From 4e8b34bbaf8a11b8c69a0e4afa9dbc00a4e96278 Mon Sep 17 00:00:00 2001 From: xuwenlong Date: Mon, 28 Aug 2023 15:08:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuwenlong --- thirdparty/harfbuzz/HPKBUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/thirdparty/harfbuzz/HPKBUILD b/thirdparty/harfbuzz/HPKBUILD index 8a9fee0e..9fa4edc0 100644 --- a/thirdparty/harfbuzz/HPKBUILD +++ b/thirdparty/harfbuzz/HPKBUILD @@ -23,6 +23,7 @@ archs=("armeabi-v7a" "arm64-v8a") license=("Old MIT") depends=("freetype2") makedepends=() + # 原仓地址: https://github.com/$pkgname/$pkgname/archive/refs/tags/$pkgver.tar.gz, 因网络原因使用镜像 source="https://gitee.com/lycium_pkg_mirror/$pkgname/repository/archive/$pkgver.zip" -- Gitee