Skip to content

Commit 4f05ff5

Browse files
author
seydx
committed
fix libass
1 parent e500ab7 commit 4f05ff5

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

msys2/PKGBUILD/40-mingw-w64-libass/PKGBUILD

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ depends=("${MINGW_PACKAGE_PREFIX}-jellyfin-fribidi"
2323
"${MINGW_PACKAGE_PREFIX}-jellyfin-freetype"
2424
"${MINGW_PACKAGE_PREFIX}-jellyfin-libunibreak"
2525
"${MINGW_PACKAGE_PREFIX}-jellyfin-harfbuzz")
26-
source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz)
27-
sha256sums=('SKIP')
26+
source=(https://github.com/libass/${_realname}/releases/download/${pkgver}/${_realname}-${pkgver}.tar.xz
27+
fix-strndup-mingw.patch)
28+
sha256sums=('SKIP'
29+
'SKIP')
2830

2931
export MINGW_TOOLCHAIN_PREFIX="${MINGW_PREFIX}"
3032
export FF_MINGW_PREFIX="${MINGW_TOOLCHAIN_PREFIX}/ffbuild"
3133

3234
prepare() {
3335
cd "${srcdir}/${_realname}-${pkgver}"
36+
patch -p1 -i "${srcdir}/fix-strndup-mingw.patch"
3437
# autoreconf to get updated libtool for clang
3538
autoreconf -fiv
3639
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- a/libass/ass_compat.h
2+
+++ b/libass/ass_compat.h
3+
@@ -41,6 +41,9 @@
4+
#define strdup ass_strdup_fallback
5+
#endif
6+
7+
+#ifdef _WIN32
8+
+#undef HAVE_STRNDUP
9+
+#endif
10+
#ifndef HAVE_STRNDUP
11+
#include <stddef.h>
12+
char *ass_strndup_fallback(const char *s, size_t n); // definition in ass_utils.c

0 commit comments

Comments
 (0)