aegisub-karaskel-fix

LOW
maintainer sitiyou 0 votes scanned 2026-08-24 13:22:51.972535
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: sitiyou <sitiyou7@gmail.com>
2#
3# Builds a libass metrics module that measures text width, plus Aegisub
4# scripts that use it to fix karaoke templater widths. libass is built
5# statically, so the system libass stays untouched.
6
7pkgname=aegisub-karaskel-fix
8pkgver=0.17.5
9pkgrel=2
10# version of Aegisub whose stock automation scripts are patched
11_aegisubver=3.4.2
12pkgdesc="Temporary workaround that overrides Aegisub's karaskel text_extents with a libass-metrics width, fixing its inaccurate results (metrics POC #856, arch1t3cht)"
13arch=(x86_64)
14url=https://github.com/libass/libass
15license=('ISC')
16depends=(aegisub glibc fontconfig fribidi harfbuzz freetype2 libpng libunibreak)
17makedepends=(git nasm autoconf automake libtool pkgconf)
18source=(
19 "libass-$pkgver.tar.gz::https://github.com/libass/libass/archive/refs/tags/$pkgver.tar.gz"
20 "001-libass-metrics-api.patch"
21 "002-libass-metrics-crashfix.patch"
22 "libass_width.c"
23 "libass_width.map"
24 "karaskel-auto4-fix.lua"
25 "kara-templater-fix.lua"
26)
27sha256sums=('fa286fc9ee1ba3b932703a3df7b8474d01dc8abe29ec69b6fa68781dc4bf7acc'
28 '9204fb649e493426a67f5a4a8bd656d186e4a36684c66e2692facb7a85fd89d8'
29 '844bb5dc06f4344bd6e7bdd112188f3b2fb3b9a58440224bda8d977ac7d116a1'
30 'edaa3b714fcd1ebdedb183b3569c2a50f811895f6fdec83ef75aedf028e8ff2f'
31 '628983ab3f264d43bba3806242351d3b92918e7a0fe155c3df6a85daf70311dc'
32 'd1292b3054ff7972bb2c14469df88b14fffe4da696078a82637e23f74b4f485b'
33 'caa93a7d45f56988a44f156755a5619eb561643cb5f96fbcc2d7679bbccea28a')
34
35prepare() {
36 cd "libass-$pkgver"
37 # Apply the metrics API patch (libass#856), then the crash fix on top.
38 patch -Np1 -i "$srcdir/001-libass-metrics-api.patch"
39 patch -Np1 -i "$srcdir/002-libass-metrics-crashfix.patch"
40 ./autogen.sh
41}
42
43build() {
44 cd "libass-$pkgver"
45 ./configure \
46 --prefix=/usr \
47 --disable-shared \
48 --enable-static \
49 --with-pic \
50 --enable-fontconfig \
51 --enable-libunibreak
52 make -j"$(nproc)"
53
54 # Build the module with static libass, hiding its symbols so they
55 # don't clash with the host's libass.so.
56 gcc -O2 -shared -fPIC -o "$srcdir/libass_width.so" \
57 "$srcdir/libass_width.c" \
58 -I"$srcdir/libass-$pkgver/libass" \
59 -Wl,-Bsymbolic-functions \
60 -Wl,--version-script="$srcdir/libass_width.map" \
61 libass/.libs/libass.a \
62 $(pkg-config --cflags --libs freetype2 harfbuzz fribidi fontconfig libpng libunibreak) -lm
63}
64
65package() {
66 # Shared libass module and the -fix scripts
67 install -Dm755 "$srcdir/libass_width.so" \
68 "$pkgdir/usr/share/aegisub/automation/include/libass_width.so"
69 install -Dm644 "$srcdir/karaskel-auto4-fix.lua" \
70 "$pkgdir/usr/share/aegisub/automation/include/karaskel-auto4-fix.lua"
71 install -Dm644 "$srcdir/kara-templater-fix.lua" \
72 "$pkgdir/usr/share/aegisub/automation/autoload/kara-templater-fix.lua"
73
74 install -Dm644 "$srcdir/libass-$pkgver/COPYING" \
75 "$pkgdir/usr/share/licenses/$pkgname/COPYING"
76}
77

Scan history

Scanned at (UTC)SeverityRules
2026-08-24 13:22:51 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion