1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-17 08:01:36 +00:00

audio/ncmpc: Update to 0.30

- Laurent takes maintainership
- Add DOCS option to install the HTML manual
- Add a MANPAGES option; the man page now has to be generated with
  sphinx as well

PR:		230721
Submitted by:	Laurent Cimon <laurent@nuxi.ca>
Approved by:	henrik@affekt.org (maintainer)
This commit is contained in:
Tobias Kortkamp 2018-09-11 11:42:52 +00:00
parent 116ff37469
commit be779ef84e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=479523
6 changed files with 164 additions and 42 deletions

View File

@ -2,11 +2,11 @@
# $FreeBSD$
PORTNAME= ncmpc
PORTVERSION= 0.29
PORTVERSION= 0.30
CATEGORIES= audio
MASTER_SITES= http://www.musicpd.org/download/ncmpc/0/
MAINTAINER= henrik@affekt.org
MAINTAINER= laurent@nuxi.ca
COMMENT= Ncurses client for the musicpd
LICENSE= GPLv2+
@ -14,50 +14,27 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libmpdclient.so:audio/libmpdclient
USES= iconv localbase meson ncurses pkgconfig tar:xz
USES= compiler:c++14-lang gnome iconv localbase meson ncurses pkgconfig tar:xz
USE_GNOME= glib20
OPTIONS_DEFINE= NLS LYRICS
OPTIONS_DEFAULT= LYRICS
LYRICS_DESC= Compile with lyrics screen
OPTIONS_DEFINE= DOCS LYRICS MANPAGES NLS
OPTIONS_DEFAULT= LYRICS MANPAGES
OPTIONS_SUB= yes
PLIST_FILES= bin/ncmpc \
man/man1/ncmpc.1.gz \
${EXAMPLESDIR}/config \
${EXAMPLESDIR}/keys \
${EXAMPLESDIR}/ncmpc.lirc
LYRICS_DESC= Compile with lyrics screen
NLS_USES= gettext
NLS_MESON_TRUE= nls
LANGUAGES=cs da de eo es fi fr gl he hu it ko nb nl pl pt_BR ru sk sv uk zh_CN
.for language in ${LANGUAGES}
NLS_PLIST_FILES+=share/locale/${language}/LC_MESSAGES/ncmpc.mo
.endfor
DOCS_IMPLIES= MANPAGES
DOCS_MESON_TRUE= html_manual
LYRICS_MESON_TRUE= lyrics_screen
LYRICS_PLIST_FILES= lib/ncmpc/lyrics/10-hd.sh \
lib/ncmpc/lyrics/20-lyricwiki.rb
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/_build/ncmpc ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/config.sample ${STAGEDIR}${EXAMPLESDIR}/config
${INSTALL_DATA} ${WRKSRC}/doc/keys.sample ${STAGEDIR}${EXAMPLESDIR}/keys
${INSTALL_DATA} ${WRKSRC}/doc/ncmpc.lirc ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_MAN} ${WRKSRC}/doc/ncmpc.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
MANPAGES_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR}
MANPAGES_MAKE_ENV= PYTHON=${PYTHON_CMD} \
SPHINX=sphinx-build-${PYTHON_VER}
MANPAGES_MESON_TRUE= manual
MANPAGES_USES= python:build
do-install-NLS-on:
.for language in ${LANGUAGES}
@${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${language}/LC_MESSAGES
${INSTALL_DATA} ${WRKSRC}/po/${language}.po \
${STAGEDIR}${PREFIX}/share/locale/${language}/LC_MESSAGES/ncmpc.mo
.endfor
do-install-LYRICS-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/ncmpc/lyrics
(cd ${WRKSRC}/lyrics && ${INSTALL_SCRIPT} \
10-hd.sh 20-lyricwiki.rb \
${STAGEDIR}${PREFIX}/lib/ncmpc/lyrics)
NLS_MESON_TRUE= nls
NLS_USES= gettext
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1515767012
SHA256 (ncmpc-0.29.tar.xz) = ef68a9b67172383ea80ee46579015109433fa058728812d2b0ebede660d85f12
SIZE (ncmpc-0.29.tar.xz) = 233876
TIMESTAMP = 1534510290
SHA256 (ncmpc-0.30.tar.xz) = e3fe0cb58b8a77f63fb1645c2f974b334f1614efdc834ec698ee7d861f1b12a3
SIZE (ncmpc-0.30.tar.xz) = 245212

View File

@ -0,0 +1,50 @@
--- doc/meson.build.orig 2018-04-04 08:23:50 UTC
+++ doc/meson.build
@@ -1,24 +1,28 @@
sphinx = find_program('sphinx-build', required:false)
-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()),
- )
+if sphinx.found() and get_option('manual')
+ if get_option('html_manual')
+ custom_target(
+ 'HTML documentation',
+ output: 'html',
+ input: ['index.rst', 'conf.py'],
+ command: [sphinx, '-q', '-b', 'html', '-d', '@OUTDIR@/html_doctrees', meson.current_source_dir(), '@OUTPUT@'],
+ build_by_default: true,
+ install: true,
+ install_dir: join_paths(get_option('datadir'), 'doc', meson.project_name()),
+ )
+ 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'),
- )
+ if get_option('manual')
+ custom_target(
+ 'Manpage documentation',
+ output: 'man1',
+ input: ['index.rst', 'conf.py'],
+ command: [sphinx, '-q', '-b', 'man', '-d', '@OUTDIR@/man_doctrees', meson.current_source_dir(), '@OUTPUT@'],
+ build_by_default: true,
+ install: true,
+ install_dir: get_option('mandir'),
+ )
+ endif
endif
if get_option('documentation')

View File

@ -0,0 +1,14 @@
--- meson_options.txt.orig 2018-04-04 08:23:50 UTC
+++ meson_options.txt
@@ -83,3 +83,11 @@ option('chat_screen', type: 'boolean',
option('documentation', type: 'boolean',
value: false,
description: 'Build API documentation')
+
+option('manual', type: 'boolean',
+ value: true,
+ description: 'Build the manual')
+
+option('html_manual', type: 'boolean',
+ value: true,
+ description: 'Build the HTML manual')

View File

@ -0,0 +1,21 @@
--- src/screen.hxx.orig 2018-04-04 08:23:50 UTC
+++ src/screen.hxx
@@ -82,8 +82,7 @@ class ScreenManager { (public)
StatusBar status_bar;
private:
- using PageMap = std::map<const struct screen_functions *,
- std::unique_ptr<Page>>;
+ using PageMap = std::map<const struct screen_functions *, Page *>;
PageMap pages;
PageMap::iterator current_page = pages.begin();
@@ -120,7 +119,7 @@ class ScreenManager { (public)
gcc_pure
bool IsVisible(const Page &page) const {
- return &page == current_page->second.get();
+ return &page == current_page->second;
}
void Switch(const struct screen_functions &sf, struct mpdclient &c);

60
audio/ncmpc/pkg-plist Normal file
View File

@ -0,0 +1,60 @@
bin/ncmpc
%%MANPAGES%%man/man1/ncmpc.1.gz
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
%%PORTDOCS%%%%DOCSDIR%%/README.rst
%%PORTDOCS%%%%DOCSDIR%%/keys.sample
%%PORTDOCS%%%%DOCSDIR%%/ncmpc.lirc
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/config.sample
%%PORTDOCS%%%%DOCSDIR%%/html/searchindex.js
%%PORTDOCS%%%%DOCSDIR%%/html/objects.inv
%%PORTDOCS%%%%DOCSDIR%%/html/_sources/index.rst.txt
%%PORTDOCS%%%%DOCSDIR%%/html/search.html
%%PORTDOCS%%%%DOCSDIR%%/html/_static/minus.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/file.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/ajax-loader.gif
%%PORTDOCS%%%%DOCSDIR%%/html/_static/underscore.js
%%PORTDOCS%%%%DOCSDIR%%/html/_static/basic.css
%%PORTDOCS%%%%DOCSDIR%%/html/_static/alabaster.css
%%PORTDOCS%%%%DOCSDIR%%/html/_static/searchtools.js
%%PORTDOCS%%%%DOCSDIR%%/html/_static/underscore-1.3.1.js
%%PORTDOCS%%%%DOCSDIR%%/html/_static/doctools.js
%%PORTDOCS%%%%DOCSDIR%%/html/_static/jquery-3.1.0.js
%%PORTDOCS%%%%DOCSDIR%%/html/_static/up-pressed.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/websupport.js
%%PORTDOCS%%%%DOCSDIR%%/html/_static/down.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/plus.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/pygments.css
%%PORTDOCS%%%%DOCSDIR%%/html/_static/down-pressed.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/comment.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/comment-close.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/comment-bright.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/up.png
%%PORTDOCS%%%%DOCSDIR%%/html/_static/jquery.js
%%PORTDOCS%%%%DOCSDIR%%/html/.buildinfo
%%PORTDOCS%%%%DOCSDIR%%/html/genindex.html
%%PORTDOCS%%%%DOCSDIR%%/html/index.html
%%LYRICS%%lib/ncmpc/lyrics/10-hd.sh
%%LYRICS%%lib/ncmpc/lyrics/20-lyricwiki.rb
%%NLS%%share/locale/he/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/cs/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/nl/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/fr/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/nb/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/gl/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/hu/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/pl/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/es/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/eo/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/it/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/da/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/sk/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/uk/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/de/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/ru/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/ko/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/fi/LC_MESSAGES/ncmpc.mo
%%NLS%%share/locale/sv/LC_MESSAGES/ncmpc.mo