diff --git a/libass-0.17.2-Fix_checkasm_with_disable-static.patch b/libass-0.17.2-Fix_checkasm_with_disable-static.patch new file mode 100644 index 0000000..adb6be9 --- /dev/null +++ b/libass-0.17.2-Fix_checkasm_with_disable-static.patch @@ -0,0 +1,104 @@ +From 306bf76ca5ac05d936614e5c2ffc23aeac6dfb63 Mon Sep 17 00:00:00 2001 +From: Oneric +Date: Sat, 8 Jun 2024 01:44:45 +0200 +Subject: [PATCH] Fix checkasm with --disable-static + +checkasm tests internal libass functions, but linked to the public +libass library directly. Ths worked fine if a static lib is available, +but if only a shared lib was built, symbol export control hides required +functions leading to link-time failures. + +To workaround this create an internal static-only convenience library +encompassing all libass sources. The real library is now just a thin +linking wrapper around this. +--- + Makefile.am | 1 + + Makefile_util.am | 2 +- + libass/Makefile_library.am | 17 ++++++++++------- + 3 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 89e618f62..e224e5332 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,6 +20,7 @@ nasm_verbose_ = $(nasm_verbose_$(AM_DEFAULT_VERBOSITY)) + nasm_verbose_0 = @echo " NASM " $@; + + lib_LTLIBRARIES = ++noinst_LTLIBRARIES = + noinst_PROGRAMS = + check_PROGRAMS = + TESTS = +diff --git a/Makefile_util.am b/Makefile_util.am +index 52a4c6011..5880d3cba 100644 +--- a/Makefile_util.am ++++ b/Makefile_util.am +@@ -58,7 +58,7 @@ checkasm_checkasm_SOURCES = \ + libass/ass_rasterizer.h libass/ass_utils.h + + checkasm_checkasm_CPPFLAGS = -I$(top_srcdir)/libass +-checkasm_checkasm_LDADD = libass/libass.la ++checkasm_checkasm_LDADD = libass/libass_internal.la + checkasm_checkasm_LDFLAGS = $(AM_LDFLAGS) -static + + if X86 +diff --git a/libass/Makefile_library.am b/libass/Makefile_library.am +index e8431b7ea..05efae752 100644 +--- a/libass/Makefile_library.am ++++ b/libass/Makefile_library.am +@@ -5,8 +5,8 @@ LIBASS_LT_AGE = 2 + .asm.lo: + $(nasm_verbose)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(top_srcdir)/ltnasm.sh $(AS) $(ASFLAGS) -I$(top_srcdir)/libass/ -Dprivate_prefix=ass -o $@ $< + +-lib_LTLIBRARIES += libass/libass.la +-libass_libass_la_SOURCES = \ ++noinst_LTLIBRARIES += libass/libass_internal.la ++libass_libass_internal_la_SOURCES = \ + libass/ass_utils.h libass/ass_utils.c \ + libass/ass_string.h libass/ass_string.c \ + libass/ass_compat.h libass/ass_strtod.c \ +@@ -32,7 +32,7 @@ libass_libass_la_SOURCES = \ + + if ASM + if X86 +-libass_libass_la_SOURCES += \ ++libass_libass_internal_la_SOURCES += \ + libass/x86/rasterizer.asm \ + libass/x86/blend_bitmaps.asm \ + libass/x86/be_blur.asm \ +@@ -40,7 +40,7 @@ libass_libass_la_SOURCES += \ + libass/x86/cpuid.h libass/x86/cpuid.asm + endif + if AARCH64 +-libass_libass_la_SOURCES += \ ++libass_libass_internal_la_SOURCES += \ + libass/aarch64/rasterizer.S \ + libass/aarch64/blend_bitmaps.S \ + libass/aarch64/be_blur.S \ +@@ -50,20 +50,23 @@ endif + endif + + if FONTCONFIG +-libass_libass_la_SOURCES += libass/ass_fontconfig.h libass/ass_fontconfig.c ++libass_libass_internal_la_SOURCES += libass/ass_fontconfig.h libass/ass_fontconfig.c + endif + + if DIRECTWRITE +-libass_libass_la_SOURCES += \ ++libass_libass_internal_la_SOURCES += \ + libass/dwrite_c.h \ + libass/ass_directwrite_info_template.h \ + libass/ass_directwrite.h libass/ass_directwrite.c + endif + + if CORETEXT +-libass_libass_la_SOURCES += libass/ass_coretext.h libass/ass_coretext.c ++libass_libass_internal_la_SOURCES += libass/ass_coretext.h libass/ass_coretext.c + endif + ++lib_LTLIBRARIES += libass/libass.la ++libass_libass_la_LIBADD = libass/libass_internal.la ++libass_libass_la_SOURCES = + libass_libass_la_LDFLAGS = -no-undefined -version-info $(LIBASS_LT_CURRENT):$(LIBASS_LT_REVISION):$(LIBASS_LT_AGE) + libass_libass_la_LDFLAGS += -export-symbols $(top_srcdir)/libass/libass.sym + diff --git a/libass-0.17.2-checkasm_add_missing_headers_sources.patch b/libass-0.17.2-checkasm_add_missing_headers_sources.patch new file mode 100644 index 0000000..fc455b0 --- /dev/null +++ b/libass-0.17.2-checkasm_add_missing_headers_sources.patch @@ -0,0 +1,23 @@ +From 05e9d2e05664fd868a6054dacfc7c1bba9971494 Mon Sep 17 00:00:00 2001 +From: Oneric +Date: Sat, 8 Jun 2024 01:24:20 +0200 +Subject: [PATCH] build/checkasm: add missing header sources + +--- + Makefile_util.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile_util.am b/Makefile_util.am +index df89a9bc6..52a4c6011 100644 +--- a/Makefile_util.am ++++ b/Makefile_util.am +@@ -54,7 +54,8 @@ checkasm_checkasm_SOURCES = \ + checkasm/blend_bitmaps.c \ + checkasm/be_blur.c \ + checkasm/blur.c \ +- checkasm/checkasm.h checkasm/checkasm.c ++ checkasm/checkasm.h checkasm/checkasm.c \ ++ libass/ass_rasterizer.h libass/ass_utils.h + + checkasm_checkasm_CPPFLAGS = -I$(top_srcdir)/libass + checkasm_checkasm_LDADD = libass/libass.la diff --git a/libass.spec b/libass.spec index f559858..6b38070 100644 --- a/libass.spec +++ b/libass.spec @@ -1,12 +1,18 @@ Name: libass -Version: 0.17.1 -Release: 4%{?dist} +Version: 0.17.2 +Release: 1%{?dist} Summary: Portable library for SSA/ASS subtitles rendering License: ISC URL: https://github.com/libass Source0: https://github.com/%{name}/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz +# https://github.com/libass/libass/commit/05e9d2e05664fd868a6054dacfc7c1bba9971494 +Patch0: libass-0.17.2-checkasm_add_missing_headers_sources.patch +# https://github.com/libass/libass/commit/306bf76ca5ac05d936614e5c2ffc23aeac6dfb63 +Patch1: libass-0.17.2-Fix_checkasm_with_disable-static.patch + +BuildRequires: automake BuildRequires: gcc BuildRequires: nasm BuildRequires: pkgconfig(fontconfig) >= 2.10.92 @@ -14,7 +20,8 @@ BuildRequires: pkgconfig(freetype2) >= 9.10.3 BuildRequires: pkgconfig(fribidi) >= 0.19.0 BuildRequires: pkgconfig(harfbuzz) >= 0.9.5 BuildRequires: pkgconfig(libpng) >= 1.2.0 -BuildRequires: make +BuildRequires: pkgconfig(libunibreak) >= 1.1 +BuildRequires: make %description Libass is a portable library for SSA/ASS subtitles rendering. @@ -29,7 +36,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep -%autosetup +%autosetup -p1 %build %configure --disable-static @@ -55,6 +62,11 @@ make check %{_libdir}/pkgconfig/%{name}.pc %changelog +* Sat Jun 15 2024 Xavier Bachelot - 0.17.2-1 +- Update to 0.17.2 (RHBZ#2281493) +- Add upstream patches to fix %%check +- Add optional dependency on libunibreak + * Thu Jan 25 2024 Fedora Release Engineering - 0.17.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index b6fb50b..30c1cd3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libass-0.17.1.tar.xz) = 437b4b60db2626e48f438b5138ab4dbf2c2ab4c8f0b587a6e554510c6719544ef2235c601ff1e482d020410f9bab95ad1a9b176d19a3bd54880499a576b41f23 +SHA512 (libass-0.17.2.tar.xz) = adb868d1adc6bc661bb2ba701fc775f2db698e3eb933d6c98e7969c1c039fdbae01ef35ceda002c9bac3614bc60eba73d09c03f1764edafa32d036891cc10341