libass: backport aarch64 asm build fix

This commit is contained in:
Christoph Reiter 2025-07-15 11:45:11 +02:00
parent 713dab3311
commit 0c9d513037
2 changed files with 78 additions and 10 deletions

View File

@ -0,0 +1,66 @@
From 3ac3cdf2d5125355a55edfb8e9d55ded64e41704 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Tue, 15 Jul 2025 10:57:57 +0200
Subject: [PATCH 1/3] build/meson: remove duplicated lib prefix from internal
static asm lib
For consistency, this avoids generating `liblibass_asm.a`. Meson adds
lib prefix automatically when needed.
---
libass/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libass/meson.build b/libass/meson.build
index 5251c2f95..c1a77a651 100644
--- a/libass/meson.build
+++ b/libass/meson.build
@@ -93,7 +93,7 @@ if enable_asm
libass_src += asm_sources
else
asm_lib = static_library(
- 'libass_asm',
+ 'ass_asm',
config_h,
sources: asm_sources,
c_args: asm_args,
From 77854003c610996aec8c2bf8a4091081775c5deb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Tue, 15 Jul 2025 11:02:34 +0200
Subject: [PATCH 2/3] build/meson: link missing asm lib for checkasm/compare
tools
On aarch64 target, asm code is compiled into internal static library
`asm_lib`. This hasn't been linked after changing to extract_all_objects.
Fixes: 157d90139931e6a6fb834fcc41f235b031eb5a8e
Fixes: #896
---
checkasm/meson.build | 1 +
compare/meson.build | 1 +
2 files changed, 2 insertions(+)
diff --git a/checkasm/meson.build b/checkasm/meson.build
index e9a79d03c..c8d8acfa1 100644
--- a/checkasm/meson.build
+++ b/checkasm/meson.build
@@ -27,6 +27,7 @@ libass_checkasm = executable(
include_directories: incs,
dependencies: deps,
objects: libass.extract_all_objects(recursive: true),
+ link_with: libass_link_with,
c_args: asm_args,
build_by_default: false,
)
diff --git a/compare/meson.build b/compare/meson.build
index b3edafcd9..4fbf90cd4 100644
--- a/compare/meson.build
+++ b/compare/meson.build
@@ -10,6 +10,7 @@ libass_compare = executable(
include_directories: incs,
dependencies: deps + png_deps,
objects: libass.extract_all_objects(recursive: true),
+ link_with: libass_link_with,
)
art_samples = get_option('art-samples')

View File

@ -4,7 +4,7 @@ _realname=libass
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=0.17.4
pkgrel=1
pkgrel=2
pkgdesc="A portable library for SSA/ASS subtitles rendering (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
@ -25,15 +25,19 @@ depends=("${MINGW_PACKAGE_PREFIX}-fribidi"
"${MINGW_PACKAGE_PREFIX}-libunibreak"
"${MINGW_PACKAGE_PREFIX}-libiconv"
"${MINGW_PACKAGE_PREFIX}-harfbuzz")
source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz)
sha256sums=('78f1179b838d025e9c26e8fef33f8092f65611444ffa1bfc0cfac6a33511a05a')
source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz
"897.patch")
sha256sums=('78f1179b838d025e9c26e8fef33f8092f65611444ffa1bfc0cfac6a33511a05a'
'24183b78eb6a16180c32f489c4d453b21b766d84b11feabfc4b61f3ec12e6def')
prepare() {
cd "${_realname}-${pkgver}"
# https://github.com/libass/libass/issues/896
patch -p1 -i "${srcdir}/897.patch"
}
build() {
declare -a extra_config
if [[ ${MSYSTEM} == CLANGARM64 ]]; then
extra_config+=("-Dasm=disabled" "-Dcheckasm=disabled")
fi
CPPFLAGS+=" -DFRIBIDI_LIB_STATIC" \
MSYS2_ARG_CONV_EXCL="--prefix=" \
meson setup \
@ -43,7 +47,6 @@ build() {
--buildtype=plain \
--default-library=static \
-Dcoretext=disabled \
"${extra_config[@]}" \
"build-${MSYSTEM}-static" \
"${_realname}-${pkgver}"
@ -57,7 +60,6 @@ build() {
--buildtype=plain \
--default-library=shared \
-Dcoretext=disabled \
"${extra_config[@]}" \
"build-${MSYSTEM}" \
"${_realname}-${pkgver}"