From a64b56f636595d2e0b9207ba4bb70a350d130537 Mon Sep 17 00:00:00 2001 From: wuguangzhao Date: Fri, 20 Dec 2024 09:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlibid3tag=E7=9A=84arm64?= =?UTF-8?q?=E6=9E=B6=E6=9E=84=E7=BC=96=E8=AF=91=E4=B8=8D=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wuguangzhao --- thirdparty/libid3tag/HPKBUILD | 8 ++++-- thirdparty/libid3tag/libid3tag_oh_gperf.patch | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 thirdparty/libid3tag/libid3tag_oh_gperf.patch diff --git a/thirdparty/libid3tag/HPKBUILD b/thirdparty/libid3tag/HPKBUILD index 6997d24e..fd128864 100644 --- a/thirdparty/libid3tag/HPKBUILD +++ b/thirdparty/libid3tag/HPKBUILD @@ -8,7 +8,7 @@ url="https://github.com/audacity/libid3tag" archs=("armeabi-v7a" "arm64-v8a") license=("GPL-2.0-only") depends=() -makedepends=("wget") +makedepends=("wget" "gperf") source="https://launchpadlibrarian.net/414577184/"$pkgname"_"$pkgver".orig.tar.gz" @@ -28,6 +28,10 @@ host= prepare() { if [ $patchflag == true ];then cd $builddir + # 删除两个c文件,该c文件会使用gperf生成 + rm frametype.c compat.c + # 打patch修复头文件函数参数与源文件函数参数不一致的问题 + patch -p1 < $PKGBUILD_ROOT/libid3tag_oh_gperf.patch > $publicbuildlog 2>&1 # 该库由于没有测试用例,所以打patch新增测试用例 patch -p1 < $PKGBUILD_ROOT/libid3tag_oh_pkg.patch > $publicbuildlog 2>&1 # patch只需要打一次,关闭打patch @@ -65,7 +69,7 @@ prepare() { build() { cd $pkgname-$ARCH-build - ./configure "$@" --host=$host --enable-static --enable-profiling > $buildlog 2>&1 + ./configure "$@" --host=$host --enable-static > $buildlog 2>&1 $MAKE VERBOSE=1 >> $buildlog 2>&1 ret=$? cd $OLDPWD diff --git a/thirdparty/libid3tag/libid3tag_oh_gperf.patch b/thirdparty/libid3tag/libid3tag_oh_gperf.patch new file mode 100644 index 00000000..588bde9c --- /dev/null +++ b/thirdparty/libid3tag/libid3tag_oh_gperf.patch @@ -0,0 +1,25 @@ +Index: libid3tag-0.15.1b/frametype.h +=================================================================== +--- libid3tag-0.15.1b.orig/frametype.h ++++ libid3tag-0.15.1b/frametype.h +@@ -37,6 +37,6 @@ extern struct id3_frametype const id3_fr + extern struct id3_frametype const id3_frametype_obsolete; + + struct id3_frametype const *id3_frametype_lookup(register char const *, +- register unsigned int); ++ register size_t); + + # endif +Index: libid3tag-0.15.1b/compat.h +=================================================================== +--- libid3tag-0.15.1b.orig/compat.h ++++ libid3tag-0.15.1b/compat.h +@@ -34,7 +34,7 @@ struct id3_compat { + }; + + struct id3_compat const *id3_compat_lookup(register char const *, +- register unsigned int); ++ register size_t); + + int id3_compat_fixup(struct id3_tag *); + -- Gitee