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')
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' 'wayland-protocols')
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 'live-media: streaming over RTSP')
101 conflicts=('vlc-plugin')
102 replaces=('vlc-plugin')
103 options=('!emptydirs')
104 source=(https://download.videolan.org/${pkgname}/${_vlcver}/${pkgname}-${_vlcver}${_vlcfixupver}.tar.xz{,.asc}
106 update-vlc-plugin-cache.hook
108 sha512sums=('6fc8fdaa7e8862ad7133d69b3dab99ab9cd3945846a6ce5e2379b7f68ee9accd385c53b8573fc7c82f732c24678b4932b1154d2ad8accf06305f2f578d6fcd8e'
110 'a06b04a8b059dbbef77d27435bd5bec3c26f937390bd112b0843385587e866e617c3dd0e66f99eed5fa4a91bc5f0fd9b5623f65b2f2435a54456dde2aa96209b'
111 'b247510ffeadfd439a5dadd170c91900b6cdb05b5ca00d38b1a17c720ffe5a9f75a32e0cb1af5ebefdf1c23c5acc53513ed983a736e8fa30dd8fad237ef49dd3'
112 '10801260f94c38b57d1c5666dc1772296537dbfd11d132e46fce98c3b185d9c3861a0b4e9076091990bf035525ed4f67376d4766eae63059f025c76251b6379b')
113 validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key
116 cd ${pkgname}-${_vlcver}
117 sed -e 's:truetype/ttf-dejavu:TTF:g' -i modules/visualization/projectm.cpp
118 sed -e 's|-Werror-implicit-function-declaration||g' -i configure
119 sed 's|whoami|echo builduser|g' -i configure
120 sed 's|hostname -f|echo arch|g' -i configure
122 for src in "${source[@]}"; do
125 [[ $src = *.patch ]] || continue
126 echo "Applying patch $src..."
127 patch -Np1 < "../$src"
133 cd ${pkgname}-${_vlcver}
135 export CFLAGS+=" -I/usr/include/samba-4.0 -ffat-lto-objects"
136 export CPPFLAGS+=" -I/usr/include/samba-4.0"
137 export CXXFLAGS+=" -std=c++11"
138 export PKG_CONFIG_PATH="/usr/lib/ffmpeg4.4/pkgconfig"
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"