Files
extra/vlc-legacy/PKGBUILD
2025-06-22 20:39:04 -05:00

236 lines
7.7 KiB
Bash

# Maintainer: Jesus E. <heckyel@riseup.net>
_realpkgname=vlc
pkgname=$_realpkgname-legacy
_vlcver=3.0.16
# optional fixup version including hyphen
_vlcfixupver=
pkgver=${_vlcver}${_vlcfixupver//-/.r}
_debver=3.0.16
_debrel=1
pkgrel=3
pkgdesc="Free, libre and generic media-player (legacy version)"
url='https://www.videolan.org/vlc/'
arch=('i686' 'x86_64')
license=('LGPL-2.1' 'GPL-2')
depends=('a52dec' 'libdvbpsi' 'libxpm' 'libdca' 'libproxy' 'lua' 'libidn'
'taglib' 'libmpcdec' 'ffmpeg' 'faad2' 'libmad'
'libmpeg2' 'xcb-util-keysyms' 'libtar' 'libxinerama'
'libupnp' 'libarchive' 'qt-base' 'qt-x11extras' 'qt-svg' 'freetype2'
'fribidi' 'harfbuzz' 'fontconfig' 'libxml2' 'gnutls' 'libplacebo' 'libmatroska')
makedepends=('gst-plugins-base-libs' 'flac' 'libcaca' 'gtk' 'librsvg-legacy' 'xosd'
'twolame' 'aalib' 'libmtp' 'libupnp' 'libmicrodns' 'libdvdcss'
'vcdimager' 'mesa' 'mpg123' 'libdvdread' 'libdvdnav' 'libogg' 'libmodplug'
'libvorbis' 'speex' 'opus' 'libtheora' 'libpng' 'libjpeg-turbo'
'x264' 'libass' 'libkate' 'libtiger'
'sdl_image' 'alsa-lib' 'jack' 'libjack' 'libsamplerate' 'libsoxr'
'libsndio' 'quilt')
optdepends=('gst-plugins-base-libs: for libgst plugins'
'libdvdcss: decoding encrypted DVDs'
'flac: Free Lossless Audio Codec plugin'
'twolame: TwoLAME mpeg2 encoder plugin'
'vcdimager: navigate VCD with libvcdinfo'
'libmtp: MTP devices discovery'
'libcdio: audio CD playback'
'ttf-dejavu: subtitle font'
'mpg123: mpg123 codec'
'libmicrodns: mDNS services discovery'
'lua-socket: http interface'
'libdvdread: DVD input module'
'libdvdnav: DVD with navigation input module'
'libogg: Ogg and OggSpots codec'
'libmodplug: MOD output plugin'
'libvorbis: Vorbis decoder/encoder'
'speex: Speex codec'
'opus: opus codec'
'libtheora: theora codec'
'libpng: PNG support'
'libjpeg-turbo: JPEG support'
'librsvg-legacy: SVG plugin'
'x264: H264 encoding'
'libass: Subtitle support'
'libkate: Kate codec'
'libtiger: Tiger rendering for Kate streams'
'sdl_image: SDL image support'
'aalib: ASCII art video output'
'libcaca: colored ASCII art video output'
'alsa-lib: ALSA audio output'
'jack: jack audio server'
'libsamplerate: audio Resampler'
'libsoxr: SoX audio Resampler'
'ncurses: ncurses interface'
'sndio: sndio audio output')
conflicts=('vlc-plugin')
replaces=('vlc-plugin')
options=('!emptydirs')
source=("https://download.videolan.org/${_realpkgname}/${_vlcver}/${_realpkgname}-${_vlcver}${_vlcfixupver}.tar.xz"
"https://repo.hyperbola.info:50000/sources/${_realpkgname}/${_realpkgname}_${_debver}-${_debrel}.debian.tar.xz"{,.sig}
"remove-internet-playlist.patch"
"remove-services.patch"
"update-vlc-plugin-cache.hook"
"vlc.desktop")
sha512sums=('35cdf191071224d0cf1b5a83c00773ff87b9e5bfcf0f5523f7edd53f75b23eda6b27bb49ffa97d69a1d176b8fe4786d959aeeb00d4380beab71c9f7e6b7c7298'
'68593981cbc9a4e85a45559950136751706aa20f5dc8da2a399ca2a52ea3ade815ec7edd2d6d4c6cd5be14b8b7e77212937ab7125a8fb8c663be9d52bf7da288'
'SKIP'
'b00d04b09ef39fd9889e5b1cccf8c839bc2a014bd222ee401c107fa7666ad8c1aa672f2fb8ce89b30e01f1db4fd70b7450143c1e061222ad0fe465211d1ff0c0'
'6a84e679466c53f0f64b9a26672d861610b79099bf4aecfb453767b51ee0c0385a634fbd464426012b44228ff7f66e9710196fa2149d95bffc712b23ce3522d8'
'80357bae69e32b353d3784932d854e294906798e14faffb87c3383c3b6f6bdc57cbabb9c6e3f3c1adf0f8ddbb24153e72104c963cf1934970c2983c96daef9df'
'd9512b74fceebf4bea2c3393bd361c020c58e9877114a5c423818b319df12b447d9f45574a4436c0b312632fa25c5d5825d7311f5568a59d279875f765bfd51a')
validpgpkeys=('C92BAA713B8D53D3CAE63FC9E6974752F9704456') # André Silva
prepare() {
cd ${_realpkgname}-${_vlcver}
sed -e 's|-Werror-implicit-function-declaration||g' -i configure
sed 's|whoami|echo builduser|g' -i configure
sed 's|hostname -f|echo arch|g' -i configure
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
# remove non-free service-definitions and inclusions
rm ./share/lua/meta/art/*.lua
rm ./share/lua/playlist/*.lua
rm ./share/lua/sd/*.lua
patch -Np1 -i ${srcdir}/remove-services.patch
patch -Np1 -i ${srcdir}/remove-internet-playlist.patch
autoreconf -vf
}
build() {
cd ${_realpkgname}-${_vlcver}
# setting compiler-flags
export CXXFLAGS+=" -std=c++11"
export LUAC=/usr/bin/luac
export LUA_LIBS="$(pkg-config --libs lua)"
export RCC=/usr/bin/rcc-qt5
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--disable-rpath \
--enable-nls \
--enable-archive \
--disable-live555 \
--disable-dc1394 \
--disable-dv1394 \
--enable-dvdread \
--enable-dvdnav \
--disable-bluray \
--disable-opencv \
--disable-smbclient \
--disable-sftp \
--disable-nfs \
--disable-realrtsp \
--enable-dvbpsi \
--disable-gme \
--enable-ogg \
--disable-shout \
--enable-matroska \
--enable-mod \
--enable-mpc \
--enable-mad \
--enable-mpg123 \
--enable-gst-decode \
--enable-avcodec \
--disable-libva \
--enable-avformat \
--enable-postproc \
--enable-faad \
--disable-vpx \
--enable-twolame \
--disable-fdkaac \
--enable-a52 \
--enable-dca \
--enable-flac \
--enable-libmpeg2 \
--enable-vorbis \
--enable-speex \
--enable-opus \
--enable-oggspots \
--disable-schroedinger \
--enable-png \
--enable-jpeg \
--enable-x264 \
--disable-x265 \
--disable-zvbi \
--enable-libass \
--enable-kate \
--enable-tiger \
--disable-vdpau \
--disable-wayland \
--enable-sdl-image \
--enable-freetype \
--enable-fribidi \
--enable-harfbuzz \
--enable-fontconfig \
--enable-svg \
--enable-svgdec \
--enable-aa \
--enable-caca \
--disable-pulse \
--enable-sndio \
--enable-alsa \
--enable-jack \
--enable-samplerate \
--enable-soxr \
--disable-chromaprint \
--disable-chromecast \
--enable-qt \
--enable-skins2 \
--enable-libtar \
--enable-ncurses \
--disable-lirc \
--disable-goom \
--disable-projectm \
--disable-avahi \
--enable-mtp \
--enable-upnp \
--enable-microdns \
--enable-libxml2 \
--disable-libgcrypt \
--enable-gnutls \
--enable-taglib \
--disable-secret \
--disable-kwallet \
--disable-update-check \
--disable-notify \
--disable-dbus \
--enable-libplacebo \
--enable-vlc \
--disable-aribsub \
--disable-aom \
--disable-srt \
--disable-dav1d
make
}
package() {
cd ${_realpkgname}-${_vlcver}
make DESTDIR="${pkgdir}" install
for res in 16 32 48 128 256; do
install -Dm 644 "${srcdir}/vlc-${_vlcver}/share/icons/${res}x${res}/vlc.png" \
"${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png"
done
# fix application-shortcut
rm "${pkgdir}/usr/share/applications/vlc.desktop"
install -Dm644 "${srcdir}/vlc.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm 644 "${srcdir}/update-vlc-plugin-cache.hook" -t "${pkgdir}/usr/share/libalpm/hooks"
for i in COPYING{,.LIB}; do
install -Dm 644 ${i} -t "${pkgdir}/usr/share/licenses/${pkgname}"
done
}