PKGBUILDs/vlc/nightly/PKGBUILD

157 lines
5.9 KiB
Bash
Raw Normal View History

# $Id$
# Maintainer: Sebastian Weiland <sebastianweiland97@gmail.com>
# Contributor: Martchus <martchus@gmx.net>
# Original package: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
_appname_=vlc
pkgname=${_appname_}-nightly
2018-02-28 18:04:38 +01:00
pkgver=4.0.0v20180228
2017-11-30 20:52:20 +01:00
_pkgver=4.0.0
2018-02-28 18:04:38 +01:00
_snapshot_=20180228
_snapver_=0238
2017-12-09 21:24:30 +01:00
_suffix_=dev
_nightly_=${_snapshot_}-${_snapver_}
pkgrel=1
2017-11-30 20:52:20 +01:00
pkgdesc='Multi-platform MPEG, VCD/DVD, and DivX player - nightly snapshot'
url='https://www.videolan.org/vlc/'
arch=('x86_64')
license=('LGPL2.1' 'GPL2')
_undetected_depends=()
depends=('a52dec' 'libdvbpsi' 'libxpm' 'libdca' 'libproxy' 'sdl_image' 'libdvdnav'
'libtiger' 'lua' 'libmatroska' 'zvbi' 'taglib' 'libmpcdec' 'ffmpeg'
'faad2' 'libupnp' 'libshout' 'libmad' 'libmpeg2' 'xcb-util-keysyms'
'libtar' 'libxinerama' 'wayland-protocols' 'libsecret' 'libarchive'
'qt5-base' 'qt5-x11extras' 'qt5-svg' "${_detected_depends[@]}")
makedepends=('live-media' 'libnotify' 'libbluray' 'flac' 'kdelibs' 'libdc1394'
'libavc1394' 'lirc' 'libcaca' 'gtk3' 'librsvg' 'portaudio'
'libgme' 'xosd' 'projectm' 'twolame' 'aalib' 'libmtp' 'libdvdcss'
'smbclient' 'libgoom2' 'vcdimager' 'opus' 'libssh2' 'mesa' 'protobuf'
'opencv' 'libnfs' 'mpg123' 'schroedinger' 'gst-plugins-base-libs'
'sidplay2-libs' 'libfdk-aac' 'daala-git' 'sndio')
optdepends=('avahi: for service discovery using bonjour protocol'
'libnotify: notification plugin'
'gtk3: notification plugin'
'ncurses: for ncurses interface support'
'gst-plugins-base-libs: for libgst plugins'
'libdvdcss: for decoding encrypted DVDs'
'lirc: lirc control plugin'
'libavc1394: for devices using the 1394ta AV/C'
'libdc1394: for IEEE 1394 plugin'
'kdelibs: KDE Solid hardware integration'
'libva-vdpau-driver: vdpau back-end for nvidia'
'libva-intel-driver: back-end for intel cards'
'libbluray: for Blu-Ray support'
'flac: for Free Lossless Audio Codec plugin'
'portaudio: portaudio support'
'twolame: for TwoLAME mpeg2 encoder plugin'
'projectm: for ProjectM visualisation plugin'
'libcaca: for colored ASCII art video output'
'libgme: for libgme plugin'
'librsvg: for SVG plugin'
'libgoom2: for libgoom plugin'
'vcdimager: navigate VCD with libvcdinfo'
'aalib: for ASCII art plugin'
'libmtp: for MTP devices support'
'smbclient: for SMB access plugin'
'libcdio: for audio CD playback support'
'ttf-freefont: for subtitle font'
'ttf-dejavu: for subtitle font'
'opus: for opus support'
'libssh2: for sftp support'
'opencv: opencv video support'
'libnfs: NFS access support'
'mpg123: mpg123 codec support'
'schroedinger: schroedinger codec support'
'protobuf: chromecast support'
'lua-socket: for http interface'
'sidplay2-libs: for C64 sid demuxer'
'libfdk-aac: for FDK-AAC Audio encoder'
'daala-git: for Daala video support'
'sndio: for OpenBSD sndio audio output')
conflicts=("${_appname_}-plugin" "${_appname_}")
provides=("${_appname_}")
replaces=("${_appname_}-plugin")
2017-11-30 20:52:20 +01:00
options=('!emptydirs')
2017-12-09 21:24:30 +01:00
source=("http://nightlies.videolan.org/build/source/vlc-${_pkgver}-${_nightly_}-${_suffix_}.tar.xz"
'update-vlc-plugin-cache.hook'
'lua53_compat.patch'
'fribidi_compat.patch'
'find-deps.py')
pkgver() {
2017-11-30 20:52:20 +01:00
printf ${_pkgver}v$_snapshot_
}
prepare() {
2017-12-09 21:24:30 +01:00
cd "${_appname_}-${_pkgver}-${_suffix_}"
./bootstrap
patch -Np1 -i "${srcdir}/lua53_compat.patch"
patch -Np1 -i "${srcdir}/fribidi_compat.patch"
sed -i -e 's:truetype/ttf-dejavu:TTF:g' modules/visualization/projectm.cpp
sed -i -e 's:truetype/freefont:TTF:g' modules/text_renderer/freetype/freetype.c
sed 's|whoami|echo builduser|g' -i configure
sed 's|hostname -f|echo arch|g' -i configure
}
build() {
2017-12-09 21:24:30 +01:00
cd "${_appname_}-${_pkgver}-${_suffix_}"
export CFLAGS+=" -I/usr/include/samba-4.0"
export CPPFLAGS+=" -I/usr/include/samba-4.0"
export CXXFLAGS+=" -std=gnu++11"
export LUAC=/usr/bin/luac
export LUA_LIBS="`pkg-config --libs lua`"
export RCC=/usr/bin/rcc-qt5
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--libexecdir=/usr/lib \
--disable-rpath \
--enable-aa \
--enable-archive \
--enable-bluray \
--enable-daala \
--enable-faad \
--enable-fdkaac \
--enable-lirc \
--enable-ncurses \
--enable-nls \
--enable-opus \
--enable-realrtsp \
--enable-sftp \
--enable-upnp \
--enable-vcdx \
--enable-wayland
./compile
}
package() {
2017-12-09 21:24:30 +01:00
cd "${_appname_}-${_pkgver}-${_suffix_}"
make -i DESTDIR="${pkgdir}" install
for res in 16 32 48 128; do
2017-12-09 21:24:30 +01:00
install -D -m644 "${srcdir}/${_appname_}-${_pkgver}-${_suffix_}/share/icons/${res}x${res}/${_appname_}.png" \
"${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/${_appname_}.png"
done
install -Dm644 "$srcdir"/update-vlc-plugin-cache.hook "$pkgdir"/usr/share/libalpm/hooks/update-vlc-plugin-cache.hook
# Update dependencies automatically based on dynamic libraries
# _detected_depends=($(find "$pkgdir"/usr -name "*.so" | xargs python "$srcdir"/find-deps.py))
# msg 'Auto-detected dependencies:'
# echo "${_detected_depends[@]}" | fold -s -w 79 | sed 's/^/ /'
# depends=("${_detected_depends[@]}" "${_undetected_depends[@]}")
}
sha256sums=('29bf008daa301b204c90fda129d95440f374224d3fecb956c052a945c8d636f2'
'c6f60c50375ae688755557dbfc5bd4a90a8998f8cf4d356c10d872a1a0b44f3a'
'75ad8802bad1a79754e40fd107f5a6922c54f7467dadef8b439b49d410c8f7d2'
'a5273ca82c95a3b70573f9b71ad4fd49d970e78fc5a3cc7970648474d00df5d5'
'90b0e34d5772d2307ba07a1c2aa715db7488389003cfe6d3570b2a9c63061db7')