summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD35
-rwxr-xr-xfind-deps.py48
3 files changed, 83 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ab4d04294c54..50dec083d520 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Mon Mar 13 14:39:09 UTC 2017
+# Sun Apr 23 20:13:56 UTC 2017
pkgbase = vlc-nightly
pkgdesc = A multi-platform MPEG, VCD/DVD, and DivX player - nightly snapshot
- pkgver = 3.0.0v20170313
- pkgrel = 1
+ pkgver = 3.0.0v20170423
+ pkgrel = 2
url = http://www.videolan.org/vlc/
arch = i686
arch = x86_64
@@ -33,9 +33,12 @@ pkgbase = vlc-nightly
makedepends = xosd
makedepends = smbclient
depends = a52dec
+ depends = libaom-git
+ depends = libfdk-aac
depends = faad2
depends = ffmpeg
depends = libdca
+ depends = daala-git
depends = libdvbpsi
depends = libdvdnav
depends = libmad
@@ -99,12 +102,15 @@ pkgbase = vlc-nightly
options = !libtool
options = !emptydirs
options = !debug
- source = http://nightlies.videolan.org/build/source/vlc-3.0.0-20170313-0240-git.tar.xz
+ source = http://nightlies.videolan.org/build/source/vlc-3.0.0-20170423-0240-git.tar.xz
source = update-vlc-plugin-cache.hook
source = https://git.archlinux.org/svntogit/packages.git/plain/trunk/lua53_compat.patch?h=packages/vlc
- sha256sums = 846504ce9e74ef99dc0bdf5c78fa7b23dbb5ea2772b0c8b14f9ba482d9fa6dc1
+ source = find-deps.py
+ sha256sums = e50132842e22bcbd03de80b0d467716bf16b00e17c5d971fc5af089228ebc870
sha256sums = c6f60c50375ae688755557dbfc5bd4a90a8998f8cf4d356c10d872a1a0b44f3a
sha256sums = d1cb88a1037120ea83ef75b2a13039a16825516b776d71597d0e2eae5df2d8fa
+ sha256sums = 90b0e34d5772d2307ba07a1c2aa715db7488389003cfe6d3570b2a9c63061db7
pkgname = vlc-nightly
+ depends =
diff --git a/PKGBUILD b/PKGBUILD
index 2e1a7557ec42..c59272c699d9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,22 +4,23 @@
_appname_=vlc
pkgname=${_appname_}-nightly
-pkgver=3.0.0v20170313
+pkgver=3.0.0v20170423
_pkgver=3.0.0
-_snapshot_=20170313
+_snapshot_=20170423
_snapver_=0240
_nightly_=${_snapshot_}-${_snapver_}
-pkgrel=1
+pkgrel=2
+_undetected_depends=()
pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player - nightly snapshot"
arch=("i686" "x86_64")
url="http://www.videolan.org/vlc/"
license=("LGPL2.1" "GPL2")
-depends=('a52dec' 'faad2' 'ffmpeg' 'libdca' 'libdvbpsi'
+depends=('a52dec' 'libaom-git' 'libfdk-aac' 'faad2' 'ffmpeg' 'libdca' 'daala-git' 'libdvbpsi'
'libdvdnav' 'libmad' 'libmatroska' 'libmpcdec' 'libmpeg2'
'libproxy' 'libshout' 'libtar' 'libtiger' 'libupnp'
'libxinerama' 'libxpm' 'lua' 'sdl_image' 'mesa' 'wayland' 'wayland-protocols'
'taglib' 'xcb-util-keysyms' 'zvbi' 'libsecret' 'libarchive' 'qt5-base' 'libglvnd'
- 'hicolor-icon-theme' 'qt5-x11extras')
+ 'hicolor-icon-theme' 'qt5-x11extras' "${_undetected_depends[@]}")
makedepends=('aalib' 'flac' 'git'
'libavc1394' 'libbluray' 'libcaca' 'libdc1394' 'libdvdcss'
'libgme' 'libgoom2' 'libmtp' 'libnotify' 'librsvg'
@@ -58,7 +59,10 @@ conflicts=("${_appname_}-plugin" "${_appname_}")
provides=("${_appname_}")
replaces=("${_appname_}-plugin")
options=("!libtool" "!emptydirs" "!debug")
-source=("http://nightlies.videolan.org/build/source/vlc-${_pkgver}-${_nightly_}-git.tar.xz" "update-vlc-plugin-cache.hook" "https://git.archlinux.org/svntogit/packages.git/plain/trunk/lua53_compat.patch?h=packages/vlc")
+source=("http://nightlies.videolan.org/build/source/vlc-${_pkgver}-${_nightly_}-git.tar.xz"
+"update-vlc-plugin-cache.hook"
+"https://git.archlinux.org/svntogit/packages.git/plain/trunk/lua53_compat.patch?h=packages/vlc"
+'find-deps.py')
pkgver() {
printf 3.0.0v$_snapshot_
@@ -80,17 +84,18 @@ build() {
--enable-faad \
--enable-nls \
--enable-lirc \
- --enable-pvr \
--enable-ncurses \
--enable-realrtsp \
- --enable-xosd \
--enable-aa \
- --enable-vcdx \
--enable-upnp \
--enable-opus \
--enable-sftp \
--enable-fdkaac \
--enable-merge-ffmpeg \
+ --enable-archive \
+ --enable-bluray \
+ --enable-aom \
+ --enable-daala
LUAC=/usr/bin/luac LUA_LIBS="`pkg-config --libs lua`" \
RCC=/usr/bin/rcc-qt5
make -i
@@ -107,8 +112,16 @@ package() {
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/lib/vlc -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=('846504ce9e74ef99dc0bdf5c78fa7b23dbb5ea2772b0c8b14f9ba482d9fa6dc1'
+sha256sums=('e50132842e22bcbd03de80b0d467716bf16b00e17c5d971fc5af089228ebc870'
'c6f60c50375ae688755557dbfc5bd4a90a8998f8cf4d356c10d872a1a0b44f3a'
- 'd1cb88a1037120ea83ef75b2a13039a16825516b776d71597d0e2eae5df2d8fa')
+ 'd1cb88a1037120ea83ef75b2a13039a16825516b776d71597d0e2eae5df2d8fa'
+ '90b0e34d5772d2307ba07a1c2aa715db7488389003cfe6d3570b2a9c63061db7')
diff --git a/find-deps.py b/find-deps.py
new file mode 100755
index 000000000000..92095f934cfd
--- /dev/null
+++ b/find-deps.py
@@ -0,0 +1,48 @@
+#!/usr/bin/env python3
+
+"""
+Usage: find-deps.py <binary> [<binary> ...]
+
+Finds (pacman/ALPM) dependencies for a binary or set of binaries based
+on dynamically linked libraries.
+
+"""
+
+import sys
+import os
+import subprocess
+import re
+
+def subprocess_get_lines(args, fail_okay=False):
+ try:
+ output = subprocess.check_output(args)
+ except subprocess.CalledProcessError as e:
+ if fail_okay:
+ output = e.output
+ else:
+ raise
+ return output.decode().splitlines()
+
+# Get the filenames of the libs we need
+#del os.environ['LD_PRELOAD'] # otherwise fakeroot will interfere
+ldd_output = subprocess_get_lines(['ldd'] + sys.argv[1:])
+regex = re.compile(r' => (.*) \(0x[0-9a-f]+\)$')
+libs = set(match.group(1) for match in map(regex.search, ldd_output) if match)
+
+# Figure out which packages own them
+deps = set(subprocess_get_lines(
+ ['pacman', '--query', '--owns', '--quiet'] + list(libs),
+ fail_okay=True
+))
+
+# Remove redundant dependencies
+needed = set(deps)
+for pkg in deps:
+ if pkg not in needed:
+ continue # this subtree has already been pruned
+ redundant = subprocess_get_lines(
+ ['pactree', '--unique', pkg]
+ )[1:] # first line is pkg itself
+ needed.difference_update(redundant)
+
+print(' '.join(sorted(needed)))