db-move: moved polari from [testing] to [extra] (x86_64)
[arch-packages.git] / vlc / trunk / PKGBUILD
blob0238b48cb7aaa731588b2a3bc0b1ef9f23ceeb99
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>
6 pkgname=vlc
7 _vlcver=3.0.18
8 # optional fixup version including hyphen
9 _vlcfixupver=
10 pkgver=${_vlcver}${_vlcfixupver//-/.r}
11 pkgrel=9
12 pkgdesc='Multi-platform MPEG, VCD/DVD, and DivX player'
13 url='https://www.videolan.org/vlc/'
14 arch=('x86_64')
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'
37             'aom: AOM AV1 codec'
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'
58             'libnfs: NFS 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'
70             'speex: Speex codec'
71             'opus: opus codec'
72             'libtheora: theora codec'
73             'libpng: PNG support'
74             'libjpeg-turbo: JPEG support'
75             'librsvg: SVG plugin'
76             'x264: H264 encoding'
77             'x265: HEVC/H.265 encoder'
78             'zvbi: VBI/Teletext/webcam/v4l2 capture/decoding'
79             'libass: Subtitle support'
80             'libkate: Kate codec'
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'
91             'lirc: lirc control'
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}
105         libplacebo-5.patch
106         update-vlc-plugin-cache.hook
107         c2dd4bfe.patch)
108 sha512sums=('6fc8fdaa7e8862ad7133d69b3dab99ab9cd3945846a6ce5e2379b7f68ee9accd385c53b8573fc7c82f732c24678b4932b1154d2ad8accf06305f2f578d6fcd8e'
109             'SKIP'
110             'a06b04a8b059dbbef77d27435bd5bec3c26f937390bd112b0843385587e866e617c3dd0e66f99eed5fa4a91bc5f0fd9b5623f65b2f2435a54456dde2aa96209b'
111             'b247510ffeadfd439a5dadd170c91900b6cdb05b5ca00d38b1a17c720ffe5a9f75a32e0cb1af5ebefdf1c23c5acc53513ed983a736e8fa30dd8fad237ef49dd3'
112             '10801260f94c38b57d1c5666dc1772296537dbfd11d132e46fce98c3b185d9c3861a0b4e9076091990bf035525ed4f67376d4766eae63059f025c76251b6379b')
113 validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key
115 prepare() {
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
121   local src
122   for src in "${source[@]}"; do
123     src="${src%%::*}"
124     src="${src##*/}"
125     [[ $src = *.patch ]] || continue
126     echo "Applying patch $src..."
127     patch -Np1 < "../$src"
128   done
129   autoreconf -vf
132 build() {
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"
145   ./configure \
146     --prefix=/usr \
147     --sysconfdir=/etc \
148     --with-kde-solid=/usr/share/solid/actions/ \
149     --disable-rpath \
150     --enable-nls \
151     --enable-archive \
152     --enable-live555 \
153     --enable-dc1394 \
154     --enable-dv1394 \
155     --enable-dvdread \
156     --enable-dvdnav \
157     --enable-bluray \
158     --disable-opencv \
159     --enable-smbclient \
160     --enable-sftp \
161     --enable-nfs \
162     --enable-realrtsp \
163     --enable-dvbpsi \
164     --enable-gme \
165     --enable-ogg \
166     --enable-shout \
167     --enable-matroska \
168     --enable-mod \
169     --enable-mpc \
170     --enable-mad \
171     --enable-mpg123 \
172     --enable-gst-decode \
173     --enable-avcodec \
174     --enable-libva \
175     --enable-avformat \
176     --enable-postproc \
177     --enable-faad \
178     --enable-vpx \
179     --enable-twolame \
180     --disable-fdkaac \
181     --enable-a52 \
182     --enable-dca \
183     --enable-flac \
184     --enable-libmpeg2 \
185     --enable-vorbis \
186     --enable-speex \
187     --enable-opus \
188     --enable-oggspots \
189     --disable-schroedinger \
190     --enable-png \
191     --enable-jpeg \
192     --enable-x264 \
193     --enable-x265 \
194     --enable-zvbi \
195     --enable-libass \
196     --enable-kate \
197     --enable-tiger \
198     --enable-vdpau \
199     --enable-wayland \
200     --enable-sdl-image \
201     --enable-freetype \
202     --enable-fribidi \
203     --enable-harfbuzz \
204     --enable-fontconfig \
205     --enable-svg \
206     --enable-svgdec \
207     --enable-aa \
208     --enable-caca \
209     --enable-pulse \
210     --enable-alsa \
211     --enable-jack \
212     --enable-samplerate \
213     --enable-soxr \
214     --disable-chromaprint \
215     --enable-chromecast \
216     --enable-qt \
217     --enable-skins2 \
218     --enable-libtar \
219     --enable-ncurses \
220     --enable-lirc \
221     --enable-goom \
222     --enable-projectm \
223     --enable-avahi \
224     --enable-mtp \
225     --enable-upnp \
226     --enable-microdns \
227     --enable-libxml2 \
228     --disable-libgcrypt \
229     --enable-gnutls \
230     --enable-taglib \
231     --enable-secret \
232     --enable-kwallet \
233     --disable-update-check \
234     --enable-notify \
235     --enable-libplacebo \
236     --enable-vlc \
237     --enable-aribsub \
238     --enable-aribcam \
239     --enable-aom \
240     --enable-srt \
241     --enable-dav1d
243   # prevent excessive overlinking due to libtool
244   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
245   make
248 package() {
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"
256   done
257   install -Dm 644 "${srcdir}/update-vlc-plugin-cache.hook" -t "${pkgdir}/usr/share/libalpm/hooks"
260 # vim: ts=2 sw=2 et: