diff --git a/thirdparty/libid3tag/HPKBUILD b/thirdparty/libid3tag/HPKBUILD index 6997d24e7ba5f5185da38becdd8ed9816d88cb3c..fd128864c63d8ab3288b107eb456823cb5dd3642 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 0000000000000000000000000000000000000000..588bde9c3d41c04c7ea1101decc0417b2cbad9be --- /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 *); +