1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
3 # Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
4 # Contributor: Martin Sandsmark <martin.sandsmark@kde.org>
8 # optional fixup version including hyphen
10 pkgver=${_vlcver}${_vlcfixupver//-/.r}
12 pkgdesc='Multi-platform MPEG, VCD/DVD, and DivX player'
13 url='https://www.videolan.org/vlc/'
15 license=('LGPL2.1' 'GPL2')
16 # NOTE: switch to ffmpeg4.4, as ffmpeg >= 5 requires extensive changes disabling VAAPI (only supported with vlc >= 4)
17 depends=('a52dec' 'libdvbpsi' 'libxpm' 'libdca' 'libproxy' 'lua52' 'libidn'
18 'libmatroska' 'taglib' 'libmpcdec' 'ffmpeg4.4' 'faad2' 'libmad'
19 'libmpeg2' 'xcb-util-keysyms' 'libtar' 'libxinerama' 'libsecret'
20 'libupnp' 'libixml.so' 'libupnp.so' 'libarchive' 'qt5-base'
21 'qt5-x11extras' 'qt5-svg' 'freetype2' 'fribidi' 'harfbuzz'
22 'fontconfig' 'libxml2' 'gnutls' 'libplacebo' 'wayland-protocols')
23 makedepends=('gst-plugins-base-libs' 'live-media' 'libnotify' 'libbluray'
24 'flac' 'libdc1394' 'libavc1394' 'libcaca' 'gtk3'
25 'librsvg' 'libgme' 'xosd' 'twolame' 'aalib' 'avahi' 'systemd-libs'
26 'libmtp' 'libmicrodns' 'libdvdcss' 'smbclient'
27 'vcdimager' 'libssh2' 'mesa' 'protobuf' 'libnfs' 'mpg123'
28 'libdvdread' 'libdvdnav' 'libogg' 'libshout' 'libmodplug' 'libvpx'
29 'libvorbis' 'speex' 'opus' 'libtheora' 'libpng' 'libjpeg-turbo'
30 'libx265.so' 'libx264.so' 'zvbi' 'libass' 'libkate' 'libtiger'
31 'sdl_image' 'libpulse' 'alsa-lib' 'jack' 'libsamplerate' 'libsoxr'
32 'lirc' 'libgoom2' 'projectm' 'aom' 'srt' 'dav1d'
33 'aribb24' 'aribb25' 'pcsclite')
35 # 'chromaprint: Chromaprint audio fingerprinter'
36 optdepends=('avahi: service discovery using bonjour protocol'
38 'gst-plugins-base-libs: for libgst plugins'
39 'dav1d: dav1d AV1 decoder'
40 'libdvdcss: decoding encrypted DVDs'
41 'libavc1394: devices using the 1394ta AV/C'
42 'libdc1394: IEEE 1394 access plugin'
43 'kwallet: kwallet keystore'
44 'libva-vdpau-driver: vdpau backend nvidia'
45 'libva-intel-driver: video backend intel'
46 'libbluray: Blu-Ray video input'
47 'flac: Free Lossless Audio Codec plugin'
48 'twolame: TwoLAME mpeg2 encoder plugin'
49 'libgme: Game Music Emu plugin'
50 'vcdimager: navigate VCD with libvcdinfo'
51 'libmtp: MTP devices discovery'
52 'systemd-libs: udev services discovery'
53 'smbclient: SMB access plugin'
54 'libcdio: audio CD playback'
55 'gnu-free-fonts: subtitle font '
56 'ttf-dejavu: subtitle font'
57 'libssh2: sftp access'
59 'mpg123: mpg123 codec'
60 'protobuf: chromecast streaming'
61 'libmicrodns: mDNS services discovery (chromecast etc)'
62 'lua52-socket: http interface'
63 'libdvdread: DVD input module'
64 'libdvdnav: DVD with navigation input module'
65 'libogg: Ogg and OggSpots codec'
66 'libshout: shoutcast/icecast output plugin'
67 'libmodplug: MOD output plugin'
68 'libvpx: VP8 and VP9 codec'
69 'libvorbis: Vorbis decoder/encoder'
72 'libtheora: theora codec'
74 'libjpeg-turbo: JPEG support'
77 'x265: HEVC/H.265 encoder'
78 'zvbi: VBI/Teletext/webcam/v4l2 capture/decoding'
79 'libass: Subtitle support'
81 'libtiger: Tiger rendering for Kate streams'
82 'sdl_image: SDL image support'
83 'srt: SRT input/output plugin'
84 'aalib: ASCII art video output'
85 'libcaca: colored ASCII art video output'
86 'libpulse: PulseAudio audio output'
87 'alsa-lib: ALSA audio output'
88 'jack: jack audio server'
89 'libsamplerate: audio Resampler'
90 'libsoxr: SoX audio Resampler'
92 'libgoom2: Goom visualization'
93 'projectm: ProjectM visualisation'
94 'ncurses: ncurses interface'
95 'libnotify: notification plugin'
96 'gtk3: notification plugin'
97 'aribb24: aribsub support'
98 'aribb25: aribcam support'
99 'pcsclite: aribcam support')
100 conflicts=('vlc-plugin')
101 replaces=('vlc-plugin')
102 options=('debug' '!emptydirs')
103 source=(https://download.videolan.org/${pkgname}/${_vlcver}/${pkgname}-${_vlcver}${_vlcfixupver}.tar.xz{,.asc}
104 $pkgname-dav1d-1.0.patch::https://github.com/videolan/vlc/commit/2202c892c8dc.patch
105 update-vlc-plugin-cache.hook
106 caca-fix-to-newer-version.patch
107 vlc-live-media-2021.patch)
108 sha512sums=('dac14c6586603c064294672eb878253e52b3a7bef431fb10303345e5400591b5c1f2d452a2af03f503db0ca186582a84be06fdf05ab011c33f7b0bd5389c51fb'
110 '5f7aa43a7b248812758a8ef82d15d59fb566327fc3e837002a8f4741cabde09ed7caca905f6fe168554b9a4b7561816b3eff877f4dd6664ceaf0964281facb4f'
111 'b247510ffeadfd439a5dadd170c91900b6cdb05b5ca00d38b1a17c720ffe5a9f75a32e0cb1af5ebefdf1c23c5acc53513ed983a736e8fa30dd8fad237ef49dd3'
112 'ef479a246dc98f882a05ca56a1c2872cc67ced154c625790070b887858ddc250d55b1295db82c9122e5ecd3c2c9c712ec9718e28d0a9d21ff6a230eb6c5010ce'
113 'ad17d6f4f2cc83841c1c89623c339ec3ee94f6084ea980e2c8cbc3903854c85e5396e31bfd8dc90745b41794670903d854c4d282d8adec263087a9d47b226ccc')
114 validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key
117 cd ${pkgname}-${_vlcver}
118 sed -e 's:truetype/ttf-dejavu:TTF:g' -i modules/visualization/projectm.cpp
119 sed -e 's|-Werror-implicit-function-declaration||g' -i configure
120 sed 's|whoami|echo builduser|g' -i configure
121 sed 's|hostname -f|echo arch|g' -i configure
123 for src in "${source[@]}"; do
126 [[ $src = *.patch ]] || continue
127 echo "Applying patch $src..."
128 patch -Np1 < "../$src"
134 cd ${pkgname}-${_vlcver}
136 export CFLAGS+=" -I/usr/include/samba-4.0 -ffat-lto-objects"
137 export CPPFLAGS+=" -I/usr/include/samba-4.0"
138 export CXXFLAGS+=" -std=c++11"
139 # upstream doesn't support lua 5.4 yet: https://trac.videolan.org/vlc/ticket/25036
140 export LUAC=/usr/bin/luac5.2
141 export LUA_LIBS="$(pkg-config --libs lua5.2)"
142 export RCC=/usr/bin/rcc-qt5
143 export PKG_CONFIG_PATH="/usr/lib/ffmpeg4.4/pkgconfig/:$PKG_CONFIG_PATH"
148 --with-kde-solid=/usr/share/solid/actions/ \
172 --enable-gst-decode \
189 --disable-schroedinger \
204 --enable-fontconfig \
212 --enable-samplerate \
214 --disable-chromaprint \
215 --enable-chromecast \
228 --disable-libgcrypt \
233 --disable-update-check \
235 --enable-libplacebo \
243 # prevent excessive overlinking due to libtool
244 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
249 cd ${pkgname}-${_vlcver}
251 make DESTDIR="${pkgdir}" install
253 for res in 16 32 48 128 256; do
254 install -Dm 644 "${srcdir}/vlc-${_vlcver}/share/icons/${res}x${res}/vlc.png" \
255 "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png"
257 install -Dm 644 "${srcdir}/update-vlc-plugin-cache.hook" -t "${pkgdir}/usr/share/libalpm/hooks"