refactor: build libmpv on the LGPL license path

mpv is dual-licensed (LGPL-2.1+/GPL-2+). We build it with -Dgpl=false
and FFmpeg without --enable-gpl (every enabled feature - mjpeg/png
encoders, spdif muxer, libdav1d, all decoders - is LGPL-available), so
the resulting library is LGPL-2.1-or-later instead of GPL. That is the
license path applications embedding libmpv in-process (via JNA, as
jlibmpv does) need, since a GPL build's copyleft obligations would
reach into them.

Also ship a LICENSE-NOTICE.txt with each release and fix the release
workflow's reference to the reusable workflows' job outputs (needs.<id>.
<jobname>.outputs). Docs: README license section now states the LGPL
position explicitly.
This commit is contained in:
david
2026-10-02 19:59:21 +02:00
parent 8548d464e0
commit 4a0f1686b5
6 changed files with 85 additions and 11 deletions
+10 -1
View File
@@ -12,6 +12,7 @@ name: release
# mpv-natives-linux-x86_64-<ver>.so
# mpv-natives-windows-x86_64-<ver>.dll
# mpv-natives-macos-universal-<ver>.dylib
# LICENSE-NOTICE.txt
# checksums.txt
#
# jlibmpv's RemoteNativeLocator resolves the download URL deterministically
@@ -41,9 +42,16 @@ jobs:
with:
path: artifacts
- name: Check out mpv-natives (for LICENSE-NOTICE.txt)
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Assemble bare release assets
run: |
VER="${{ needs.build-linux.outputs.version }}"
# Reusable workflows expose their called job's outputs nested under
# the job name used in the called file (here: "linux").
VER="${{ needs.build-linux.linux.outputs.version }}"
[ -n "$VER" ] || { echo "ERROR: mpv version not set"; exit 1; }
mkdir -p release
# linux: single self-contained libmpv.so
@@ -55,6 +63,7 @@ jobs:
# macos: single universal libmpv.dylib
cp "artifacts/mpv-natives-macos-universal/libmpv.dylib" \
"release/mpv-natives-macos-universal-${VER}.dylib"
cp LICENSE-NOTICE.txt release/
(cd release && sha256sum * > checksums.txt)
echo "=== release assets ==="
ls -l release