From 653577d9cbeae723fe7ee2eefafacddc53a53170 Mon Sep 17 00:00:00 2001 From: lxh Date: Fri, 15 Nov 2024 15:25:14 +0800 Subject: [PATCH] =?UTF-8?q?agg=E5=BA=93=E7=9A=84hpkbuild=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=E8=A7=84=E8=8C=83=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lxh --- thirdparty/agg/HPKBUILD | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/thirdparty/agg/HPKBUILD b/thirdparty/agg/HPKBUILD index f0292a3f..c4d2b717 100644 --- a/thirdparty/agg/HPKBUILD +++ b/thirdparty/agg/HPKBUILD @@ -11,20 +11,39 @@ license=("BSD License") depends=() makedepends=() -source="https://github.com/ghaerr/${pkgname}-${pkgver}/archive/refs/heads/master.zip" - +#source="https://github.com/ghaerr/${pkgname}-${pkgver}/archive/refs/heads/master.zip" +source="https://gitee.com/lycium_pkg_mirror/agg-2.6.git" builddir=${pkgname}-${pkgver}-master -packagename=${builddir}.zip -autounpack=true -downloadpackage=true +#packagename=${builddir}.zip +autounpack=false +downloadpackage=false buildtools="make" cc= ar= - +commitid=b289c3cc11162cb4712eddc855ee8a321dfe93f0 +cloneflag=true source envset.sh # agg 采用makefile编译构建,为了保留构建环境(方便测试)。因此同一份源码在解压后分为两份,各自编译互不干扰 prepare() { + if [ $cloneflag == true ] + then + mkdir $builddir + git clone $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 + cp -rf ${builddir} $builddir-${ARCH}-build if [ $ARCH == "armeabi-v7a" ]; then cc=${OHOS_SDK}/native/llvm/bin/arm-linux-ohos-clang @@ -40,7 +59,7 @@ prepare() { build() { cd $builddir-${ARCH}-build/agg-src - make C="$cc" LIB="$ar cr" CXX="$cc" -j4 > build.log 2>&1 + ${MAKE} VERBOSE=1 C="$cc" LIB="$ar cr" CXX="$cc" > $buildlog 2>&1 ret=$? cd $OLDPWD return $ret -- Gitee