#!/bin/bash # NovArc's one change to VideoLAN's libvlcjni build script: VLC modules whose source is GPL (not LGPL) # are left out of libvlc.so, like the modules VideoLAN already leaves out (batch 4 review L1). The list # comes from license-audit.py, which checks every VLC source file and header compiled into each module # (from the build's own dependency files). VLC's own source is unchanged. # Lua plugin, RealRTSP access, headphone and mono audio filters, the dummy interface, the file and syslog # loggers, the RTSP VoD server, the RTP and cycle stream outputs, the Dolby Surround decoder, the hqdn3d # and rotate filters, the deinterlace filter (its yadif mode is GPL), the MMX I420-to-RGB converter (x86; # the SSE2 one does the same), and the zvbi teletext decoder (libzvbi's packet-830 and pdc are GPL-2; # VLC's LGPL telx decoder still shows teletext subtitles). set -euo pipefail ROOT="${ROOT:-$HOME/builds/libvlc-lgpl}" JNI="$ROOT/vlc-android/libvlcjni" F=buildsystem/compile-libvlc.sh # Always from VideoLAN's own file, so the list here is the whole change. git -c safe.directory='*' -C "$JNI" checkout -- "$F" python3 - "$JNI/$F" <<'PY' import sys path = sys.argv[1] s = open(path).read() anchor = 'VLC_MODULE_BLACKLIST="\n' assert s.count(anchor) == 1, 'anchor' extra = ''.join(f' {m}\n' for m in [ 'lua', 'access_realrtsp', 'headphone_channel_mixer', 'mono', 'dummy', 'file_logger', 'syslog', 'vod_rtsp', 'stream_out_rtp', 'stream_out_cycle', 'dolby_surround_decoder', 'hqdn3d', 'rotate', 'deinterlace', 'i420_rgb_mmx', 'zvbi', ]) s = s.replace(anchor, anchor + extra, 1) open(path, 'w').write(s) PY git -c safe.directory='*' -C "$JNI" diff > "$ROOT/libvlcjni-novarc.patch" echo "patched:"; cat "$ROOT/libvlcjni-novarc.patch"