diff options
author | Philip Sequeira | 2015-08-20 16:50:18 -0400 |
---|---|---|
committer | Philip Sequeira | 2015-08-20 16:50:18 -0400 |
commit | 57295dcdc4aa7fb73f421a62eb8d774cf96e294a (patch) | |
tree | e9609a8af1bd3ae60af8c8441a276ffb50bfcc54 | |
parent | aaea11ae0976f2b8e16c2ffbd27c9b874b062059 (diff) | |
download | aur-57295dcdc4aa7fb73f421a62eb8d774cf96e294a.tar.gz |
message on first install about installing optional features
Also, use a better (?) way to avoid the false fakeroot dependency, and
print detected dependencies when packaging.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rwxr-xr-x | find-deps.py | 5 | ||||
-rw-r--r-- | mpv.install | 14 |
4 files changed, 26 insertions, 11 deletions
@@ -1,6 +1,6 @@ pkgbase = mpv-git pkgdesc = Video player based on MPlayer/mplayer2 (git version) - pkgver = 0.9.2_955_gf72028d + pkgver = 0.9.2_1355_gb144da6 pkgrel = 1 url = http://mpv.io install = mpv.install @@ -20,9 +20,9 @@ pkgbase = mpv-git source = git+https://github.com/mpv-player/mpv source = find-deps.py md5sums = SKIP - md5sums = ddbaa32dbb359220e9f62b925152c015 + md5sums = ffb774b13decbefc62908dda0332046b sha256sums = SKIP - sha256sums = 9b0a338b4621c5d0d101009b0195a801e8e773811ec3a47dbf1cc339e9f16e99 + sha256sums = ce974e160347202e0dc63f6a7a5a89e52d2cc1db2d000c661fddb9dc1d007c02 pkgname = mpv-git @@ -11,7 +11,7 @@ pkgname=mpv-git _gitname=mpv -pkgver=0.9.2_955_gf72028d +pkgver=0.9.2_1355_gb144da6 pkgrel=1 pkgdesc='Video player based on MPlayer/mplayer2 (git version)' arch=('i686' 'x86_64') @@ -28,9 +28,9 @@ install=mpv.install source=('git+https://github.com/mpv-player/mpv' 'find-deps.py') md5sums=('SKIP' - 'ddbaa32dbb359220e9f62b925152c015') + 'ffb774b13decbefc62908dda0332046b') sha256sums=('SKIP' - '9b0a338b4621c5d0d101009b0195a801e8e773811ec3a47dbf1cc339e9f16e99') + 'ce974e160347202e0dc63f6a7a5a89e52d2cc1db2d000c661fddb9dc1d007c02') pkgver() { cd "$srcdir/$_gitname" @@ -70,6 +70,8 @@ package() { "$pkgdir"/usr/share/doc/mpv # Update dependencies automatically based on dynamic libraries - depends=("${_undetected_depends[@]}" - $("$srcdir"/find-deps.py "$pkgdir"/usr/{bin/mpv,lib/libmpv.so})) + _detected_depends=($("$srcdir"/find-deps.py "$pkgdir"/usr/{bin/mpv,lib/libmpv.so})) + echo 'Auto-detected dependencies:' + echo "${_detected_depends[@]}" | fold -s -w 79 | sed 's/^/ /' + depends=("${_detected_depends[@]}" "${_undetected_depends[@]}") } diff --git a/find-deps.py b/find-deps.py index 809bdf9d35f8..d6761f0a40fd 100755 --- a/find-deps.py +++ b/find-deps.py @@ -9,6 +9,7 @@ on dynamically linked libraries. """ import sys +import os import subprocess import re @@ -23,6 +24,7 @@ def subprocess_get_lines(args, fail_okay=False): return output.decode().splitlines() # Get the filenames of the libs we need +del os.environ['LD_LIBRARY_PATH'], 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) @@ -33,9 +35,6 @@ deps = set(subprocess_get_lines( fail_okay=True )) -# fakeroot will be linked when building with makepkg, but isn't really needed -deps.discard('fakeroot') - # Remove redundant dependencies needed = set(deps) for pkg in deps: diff --git a/mpv.install b/mpv.install index 5c501dc49916..8c482fc0989f 100644 --- a/mpv.install +++ b/mpv.install @@ -1,3 +1,17 @@ +pre_install() { + cat <<'EOF' +NOTE: mpv has several optional features that are automatically enabled if the +required libraries are present at configure time. This package does not include +any of the optional features as dependencies by default (but it does add depends +for whatever is linked against when building the package). If you want to use +any optional features that require libraries you don't currently have installed, +please install the relevant libraries and rebuild the package. A frequently +desired optional feature is Lua support, which is necessary for the on-screen +controller "GUI", youtube-dl integration, and other extension scripts. Lua +support can be provided by lua52 or luajit. +EOF +} + post_install() { xdg-icon-resource forceupdate --theme hicolor &> /dev/null update-desktop-database -q |