diff options
author | Philip Sequeira | 2017-05-29 18:55:30 -0400 |
---|---|---|
committer | Philip Sequeira | 2017-05-29 18:55:30 -0400 |
commit | 1eb1c1d0eb12ac902bfe17ab361d265c5b74cc9c (patch) | |
tree | 7869e12f04d812d2e67e7bccee3afe92622ae5b3 | |
parent | edf14fd0ace17afe5bd1e267b2f1331055743a31 (diff) | |
download | aur-1eb1c1d0eb12ac902bfe17ab361d265c5b74cc9c.tar.gz |
basic build options system
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 97 |
2 files changed, 92 insertions, 9 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Sun Apr 2 01:04:58 UTC 2017 +# Mon May 29 22:54:45 UTC 2017 pkgbase = mpv-git pkgdesc = Video player based on MPlayer/mplayer2 (git version) - pkgver = 0.24.0.r189.gdc7d71fc8e + pkgver = 0.25.0.r92.gbc3365b169 pkgrel = 1 url = https://mpv.io install = mpv.install @@ -3,15 +3,51 @@ # Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> # Contributor: Eivind Uggedal <eivind@uggedal.com> -# WARNING: The configure script will automatically enable any optional -# features it finds support for on your system. If you want to avoid -# linking against something you have installed, you'll have to disable -# it in the configure below. The package() script will attempt to -# update the dependencies based on dynamic libraries when packaging. +_opt_features=( + + # Disabled by default, need to be enabled every build: + + #dvd + #cd + #smb + #libarchive + + # Lua is automatically detected, so you don't need to enable these if you + # already have it installed. If you have both lua52 and luajit installed, mpv + # will use the former. Uncommenting luajit below will tell mpv to use that + # even if lua52 is also installed. + + #lua + #luajit + + # The rest of these are autodetected, and are just provided to set + # dependencies the first time you build. If you have the dependencies + # installed, subsequent builds will pick them up automatically. + + #x11 + #wayland + + #uchardet + #rubberband + + # Features disabled by default, but don't require any extra dependencies on an + # Arch system: (should these just be default?) + + #cplugins + #vf-dlopen-filters + #dvbin + +) + +# Note: The configure script will automatically enable most optional features it +# finds support for on your system. The dependencies of the built package will +# be updated based on dynamic libraries, but if you want to avoid linking +# against something you have installed, you'll have to disable it in the +# configure below. pkgname=mpv-git _gitname=mpv -pkgver=0.24.0.r189.gdc7d71fc8e +pkgver=0.25.0.r92.gbc3365b169 pkgrel=1 pkgdesc='Video player based on MPlayer/mplayer2 (git version)' arch=('i686' 'x86_64' 'armv6h' 'armv7h') @@ -32,6 +68,52 @@ md5sums=('SKIP' sha256sums=('SKIP' 'ce974e160347202e0dc63f6a7a5a89e52d2cc1db2d000c661fddb9dc1d007c02') +_opt_extra_flags=() + +for feature in "${_opt_features[@]}"; do + case "$feature" in + dvd) + depends+=('libdvdnav') + _opt_extra_flags+=('--enable-dvdread' '--enable-dvdnav') + ;; + cd) + depends+=('libcdio-paranoia') + _opt_extra_flags+=('--enable-cdda') + ;; + smb) + depends+=('smbclient') + _opt_extra_flags+=('--enable-libsmbclient') + ;; + libarchive) + depends+=('libarchive') + _opt_extra_flags+=('--enable-libarchive') + ;; + lua) + depends+=('lua52') + _opt_extra_flags+=('--lua=52arch') + ;; + luajit) + depends+=('luajit') + _opt_extra_flags+=('--lua=luajit') + ;; + x11) + depends+=('libxinerama' 'libxrandr' 'libxss') + ;; + wayland) + depends+=('wayland' 'libxkbcommon') + ;; + uchardet|rubberband) + depends+=("$feature") + ;; + cplugins|vf-dlopen-filters|dvbin) + _opt_extra_flags+=("--enable-$feature") + ;; + *) + echo "ERROR: Unknown feature option: $feature" >&2 + exit 1 + esac +done + pkgver() { cd "$srcdir/$_gitname" _curtag="$(git rev-list --tags --max-count=1)" @@ -54,7 +136,8 @@ build() { ./waf configure --prefix=/usr \ --confdir=/etc/mpv \ --enable-zsh-comp \ - --enable-libmpv-shared + --enable-libmpv-shared \ + "${_opt_extra_flags[@]}" ./waf build } |