Skip to content

Commit 7284430

Browse files
cfsmp3claude
andcommitted
fix(build): Preserve FFmpeg libs with -system-libs -hardsubx
The -system-libs mode was overwriting BLD_LINKER and losing the FFmpeg libraries that -hardsubx adds. This fix preserves the FFmpeg libraries when both flags are used together. Also add permissions: contents: write to the workflow to allow uploading assets to releases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 68d0d40 commit 7284430

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/build_linux_systemlibs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
- '.github/workflows/build_linux_systemlibs.yml'
1818
- 'linux/build'
1919

20+
permissions:
21+
contents: write
22+
2023
jobs:
2124
build-systemlibs:
2225
runs-on: ubuntu-22.04

linux/build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ if [ "$USE_SYSTEM_LIBS" = true ]; then
143143
$UTF8PROC_COMPAT $PKG_CFLAGS $LEPTONICA_CFLAGS $TESSERACT_CFLAGS $GPAC_CFLAGS"
144144

145145
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_HASH"
146-
BLD_LINKER="$PKG_LIBS -ltesseract -lleptonica -lgpac -lpthread -ldl -lm"
146+
# Preserve FFmpeg libraries if -hardsubx was specified
147+
FFMPEG_LIBS=""
148+
if [ "$HARDSUBX" = true ]; then
149+
FFMPEG_LIBS="-lswscale -lavutil -pthread -lavformat -lavcodec -lavfilter -lxcb-shm -lxcb -lX11 -llzma -lswresample"
150+
fi
151+
BLD_LINKER="$PKG_LIBS -ltesseract -lleptonica -lgpac -lpthread -ldl -lm $FFMPEG_LIBS"
147152
fi
148153

149154

0 commit comments

Comments
 (0)