mpc: update to 0.31.

This commit is contained in:
maxice8 2018-10-24 12:06:22 -03:00 committed by maxice8
parent 149842e8fe
commit f96c22f23b
2 changed files with 4 additions and 89 deletions

View file

@ -1,85 +0,0 @@
From a338ce20f68ecff14600b30b946d07c8e8ec11e2 Mon Sep 17 00:00:00 2001
From: maxice8 <thinkabit.ukim@gmail.com>
Date: Sat, 25 Aug 2018 17:56:48 -0300
Subject: [PATCH] meson: add docs combo switch.
---
doc/meson.build | 40 ++++++++++++++++++----------------------
meson.build | 13 ++++++++++++-
meson_options.txt | 4 ++++
3 files changed, 34 insertions(+), 23 deletions(-)
--- doc/meson.build
+++ doc/meson.build
@@ -1,23 +1,19 @@
-sphinx = find_program('sphinx-build', required:false)
+custom_target(
+ 'HTML documentation',
+ output: 'html',
+ input: ['index.rst', 'conf.py'],
+ command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
+ build_by_default: true,
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
+)
-if sphinx.found()
- custom_target(
- 'HTML documentation',
- output: 'html',
- input: ['index.rst', 'conf.py'],
- command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@'],
- build_by_default: true,
- install: true,
- install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
- )
-
- custom_target(
- 'Manpage documentation',
- output: 'man',
- input: ['index.rst', 'conf.py'],
- command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'],
- build_by_default: true,
- install: true,
- install_dir: get_option('datadir'),
- )
-endif
+custom_target(
+ 'Manpage documentation',
+ output: 'man',
+ input: ['index.rst', 'conf.py'],
+ command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/doctrees', meson.current_source_dir(), '@OUTPUT@/man1'],
+ build_by_default: true,
+ install: true,
+ install_dir: get_option('datadir'),
+)
--- meson.build
+++ meson.build
@@ -114,4 +114,15 @@ if get_option('test')
subdir('test')
endif
-subdir('doc')
+with_docs = get_option('docs')
+sphinx = find_program('sphinx-build', required: false)
+
+if with_docs == 'auto' and sphinx.found()
+ subdir('doc')
+elif with_docs == 'true'
+ if not sphinx.found()
+ error('docs enabled but sphinx-build not found')
+ endif
+ subdir('doc')
+endif
+
--- meson_options.txt
+++ meson_options.txt
@@ -6,3 +6,7 @@ option('iconv', type: 'combo',
option('test', type: 'boolean',
value: false,
description: 'Enable unit tests')
+
+option('docs', type: 'combo',
+ choices: ['true', 'false', 'auto'], value: 'auto',
+ description: 'Build documentation and manpage with Sphinx')

View file

@ -1,9 +1,9 @@
# Template file for 'mpc' # Template file for 'mpc'
pkgname=mpc pkgname=mpc
version=0.30 version=0.31
revision=2 revision=1
build_style=meson build_style=meson
configure_args="-Dtest=true -Ddocs=true" configure_args="-Dtest=true -Ddocumentation=enabled"
hostmakedepends="pkg-config python3-Sphinx" hostmakedepends="pkg-config python3-Sphinx"
makedepends="libmpdclient-devel check-devel" makedepends="libmpdclient-devel check-devel"
short_desc="Minimalist command line interface to MPD" short_desc="Minimalist command line interface to MPD"
@ -12,7 +12,7 @@ license="GPL-2.0-or-later"
homepage="http://www.musicpd.org/clients/mpc/" homepage="http://www.musicpd.org/clients/mpc/"
#changelog="https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/master/NEWS" #changelog="https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/master/NEWS"
distfiles="http://www.musicpd.org/download/mpc/${version%.*}/mpc-${version}.tar.xz" distfiles="http://www.musicpd.org/download/mpc/${version%.*}/mpc-${version}.tar.xz"
checksum=65fc5b0a8430efe9acbe6e261127960682764b20ab994676371bdc797d867fce checksum=62373e83a8a165b2ed43967975efecd3feee530f4557d6b861dd08aa89d52b2d
post_install() { post_install() {
vinstall contrib/mpc-completion.bash 644 usr/share/bash-completion/completions mpc vinstall contrib/mpc-completion.bash 644 usr/share/bash-completion/completions mpc