- Fix build with mpd 0.18+ [1]

- Support staging
- Use new options knobs

PR:		185060 [1]
Submitted by:	Matthieu Volat [1]
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2014-02-04 13:11:28 +00:00
parent 6932e35412
commit 654090d688
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342517
4 changed files with 39 additions and 177 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= sonata
PORTVERSION= 1.6.2.1
PORTREVISION= 8
PORTREVISION= 9
CATEGORIES= audio python
MASTER_SITES= http://codingteam.net/project/sonata/upload/releases/
@ -15,12 +15,10 @@ LICENSE= GPLv3
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mpd>=0.2.0:${PORTSDIR}/audio/py-mpd
USES= gettext pkgconfig
NO_STAGE= yes
USE_GNOME= pygtk2
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGNAME= Sonata
PYDISTUTILS_AUTOPLIST= yes
OPTIONS_DEFINE= DOCS MANPAGES MMKEYS MPD PYGNOMEEXTRAS TAGLIB ZSI
OPTIONS_DEFAULT= MPD
@ -29,43 +27,19 @@ MPD_DESC= Install Music Player Daemon
PYGNOMEEXTRAS_DESC= Use py-gnome-extras for enhanced system tray
TAGLIB_DESC= Install support for editing metadata
ZSI_DESC= Install support for automatic lyrics fetching
OPTIONS_SUB= yes
.include <bsd.port.options.mk>
REINPLACE_ARGS= -i.bak -e 's,%%DOCSDIR%%,${DOCSDIR},' \
-e 's,%%PREFIX%%,${PREFIX},'
MANPAGES_MAKE_ENV_OFF= NO_INSTALL_MANPAGES=${NO_INSTALL_MANPAGES}
DOCS_MAKE_ENV= NOPORTDOCS=${NOPORTDOCS}
MPD_RUN_DEPENDS+= musicpd:${PORTSDIR}/audio/musicpd
MMKEYS_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}dbus>=0.82.4:${PORTSDIR}/devel/py-dbus
PYGNOMEEXTRAS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gnome-extras>=2.25.3_4:${PORTSDIR}/x11-toolkits/py-gnome-extras
TAGLIB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tagpy>=0.94.5:${PORTSDIR}/audio/py-tagpy
ZSI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}zsi>=2.0,1:${PORTSDIR}/net/py-zsi
post-patch:
@${REINPLACE_CMD} ${WRKSRC}/${PYSETUP} ${WRKSRC}/sonata.py
.if ${PORT_OPTIONS:MMANPAGES}
MAN1= ${PORTNAME}.1
.else
MAKE_ENV= NO_INSTALL_MANPAGES=${NO_INSTALL_MANPAGES}
.endif
.if !${PORT_OPTIONS:MDOCS}
MAKE_ENV+= NOPORTDOCS=${NOPORTDOCS}
.endif
.if ${PORT_OPTIONS:MMPD}
RUN_DEPENDS+= musicpd:${PORTSDIR}/audio/musicpd
.endif
.if ${PORT_OPTIONS:MMMKEYS}
RUN_DEPENDS+=${PYTHON_PKGNAMEPREFIX}dbus>=0.82.4:${PORTSDIR}/devel/py-dbus
.endif
.if ${PORT_OPTIONS:MPYGNOMEEXTRAS}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}gnome-extras>=2.25.3_4:${PORTSDIR}/x11-toolkits/py-gnome-extras
.endif
.if ${PORT_OPTIONS:MTAGLIB}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tagpy>=0.94.5:${PORTSDIR}/audio/py-tagpy
.endif
.if ${PORT_OPTIONS:MZSI}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}zsi>=2.0,1:${PORTSDIR}/net/py-zsi
.endif
@${REINPLACE_CMD} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
-e 's,%%PREFIX%%,${PREFIX},' \
${WRKSRC}/${PYSETUP} ${WRKSRC}/sonata.py
.include <bsd.port.mk>

View file

@ -1,6 +1,28 @@
--- sonata/main.py.orig 2013-08-03 13:13:21.000000000 +0200
+++ sonata/main.py 2013-08-03 13:14:12.000000000 +0200
@@ -3400,4 +3400,7 @@ class Base(object):
--- sonata/main.py.orig 2009-09-21 23:02:16.000000000 +0200
+++ sonata/main.py 2013-12-21 09:55:28.000000000 +0100
@@ -989,13 +989,14 @@
self.repeatmenu.set_active(self.status['repeat'] == '1')
if not self.last_random or self.last_random != self.status['random']:
self.randommenu.set_active(self.status['random'] == '1')
- if self.status['xfade'] == '0':
- self.config.xfade_enabled = False
- else:
- self.config.xfade_enabled = True
- self.config.xfade = int(self.status['xfade'])
- if self.config.xfade > 30:
- self.config.xfade = 30
+ self.config.xfade_enabled = False
+ if 'xfade' in self.status:
+ xfade = int(self.status['xfade'])
+ if xfade != 0:
+ self.config.xfade_enabled = True
+ self.config.xfade = xfade
+ if self.config.xfade > 30:
+ self.config.xfade = 30
self.last_repeat = self.status['repeat']
self.last_random = self.status['random']
return
@@ -3400,4 +3401,7 @@
self.on_currsong_notify(force_popup=True)
def main(self):

View file

@ -20,4 +20,4 @@ FEATURES:
+ Commandline control
+ Available in 24 languages
WWW: http://sonata.berlios.de/index.html
WWW: http://sonata.berlios.de/index.html

View file

@ -1,134 +0,0 @@
bin/sonata
%%PYTHON_SITELIBDIR%%/mmkeys.so
%%PYTHON_SITELIBDIR%%/sonata/__init__.py
%%PYTHON_SITELIBDIR%%/sonata/__init__.pyc
%%PYTHON_SITELIBDIR%%/sonata/__init__.pyo
%%PYTHON_SITELIBDIR%%/sonata/about.py
%%PYTHON_SITELIBDIR%%/sonata/about.pyc
%%PYTHON_SITELIBDIR%%/sonata/about.pyo
%%PYTHON_SITELIBDIR%%/sonata/artwork.py
%%PYTHON_SITELIBDIR%%/sonata/artwork.pyc
%%PYTHON_SITELIBDIR%%/sonata/artwork.pyo
%%PYTHON_SITELIBDIR%%/sonata/audioscrobbler.py
%%PYTHON_SITELIBDIR%%/sonata/audioscrobbler.pyc
%%PYTHON_SITELIBDIR%%/sonata/audioscrobbler.pyo
%%PYTHON_SITELIBDIR%%/sonata/breadcrumbs.py
%%PYTHON_SITELIBDIR%%/sonata/breadcrumbs.pyc
%%PYTHON_SITELIBDIR%%/sonata/breadcrumbs.pyo
%%PYTHON_SITELIBDIR%%/sonata/cli.py
%%PYTHON_SITELIBDIR%%/sonata/cli.pyc
%%PYTHON_SITELIBDIR%%/sonata/cli.pyo
%%PYTHON_SITELIBDIR%%/sonata/config.py
%%PYTHON_SITELIBDIR%%/sonata/config.pyc
%%PYTHON_SITELIBDIR%%/sonata/config.pyo
%%PYTHON_SITELIBDIR%%/sonata/consts.py
%%PYTHON_SITELIBDIR%%/sonata/consts.pyc
%%PYTHON_SITELIBDIR%%/sonata/consts.pyo
%%PYTHON_SITELIBDIR%%/sonata/current.py
%%PYTHON_SITELIBDIR%%/sonata/current.pyc
%%PYTHON_SITELIBDIR%%/sonata/current.pyo
%%PYTHON_SITELIBDIR%%/sonata/dbus_plugin.py
%%PYTHON_SITELIBDIR%%/sonata/dbus_plugin.pyc
%%PYTHON_SITELIBDIR%%/sonata/dbus_plugin.pyo
%%PYTHON_SITELIBDIR%%/sonata/img.py
%%PYTHON_SITELIBDIR%%/sonata/img.pyc
%%PYTHON_SITELIBDIR%%/sonata/img.pyo
%%PYTHON_SITELIBDIR%%/sonata/info.py
%%PYTHON_SITELIBDIR%%/sonata/info.pyc
%%PYTHON_SITELIBDIR%%/sonata/info.pyo
%%PYTHON_SITELIBDIR%%/sonata/library.py
%%PYTHON_SITELIBDIR%%/sonata/library.pyc
%%PYTHON_SITELIBDIR%%/sonata/library.pyo
%%PYTHON_SITELIBDIR%%/sonata/main.py
%%PYTHON_SITELIBDIR%%/sonata/main.pyc
%%PYTHON_SITELIBDIR%%/sonata/main.pyo
%%PYTHON_SITELIBDIR%%/sonata/misc.py
%%PYTHON_SITELIBDIR%%/sonata/misc.pyc
%%PYTHON_SITELIBDIR%%/sonata/misc.pyo
%%PYTHON_SITELIBDIR%%/sonata/mpdhelper.py
%%PYTHON_SITELIBDIR%%/sonata/mpdhelper.pyc
%%PYTHON_SITELIBDIR%%/sonata/mpdhelper.pyo
%%PYTHON_SITELIBDIR%%/sonata/playlists.py
%%PYTHON_SITELIBDIR%%/sonata/playlists.pyc
%%PYTHON_SITELIBDIR%%/sonata/playlists.pyo
%%PYTHON_SITELIBDIR%%/sonata/plugins/__init__.py
%%PYTHON_SITELIBDIR%%/sonata/plugins/__init__.pyc
%%PYTHON_SITELIBDIR%%/sonata/plugins/__init__.pyo
%%PYTHON_SITELIBDIR%%/sonata/plugins/localmpd.py
%%PYTHON_SITELIBDIR%%/sonata/plugins/localmpd.pyc
%%PYTHON_SITELIBDIR%%/sonata/plugins/localmpd.pyo
%%PYTHON_SITELIBDIR%%/sonata/plugins/test.py
%%PYTHON_SITELIBDIR%%/sonata/plugins/test.pyc
%%PYTHON_SITELIBDIR%%/sonata/plugins/test.pyo
%%PYTHON_SITELIBDIR%%/sonata/pluginsystem.py
%%PYTHON_SITELIBDIR%%/sonata/pluginsystem.pyc
%%PYTHON_SITELIBDIR%%/sonata/pluginsystem.pyo
%%PYTHON_SITELIBDIR%%/sonata/preferences.py
%%PYTHON_SITELIBDIR%%/sonata/preferences.pyc
%%PYTHON_SITELIBDIR%%/sonata/preferences.pyo
%%PYTHON_SITELIBDIR%%/sonata/scrobbler.py
%%PYTHON_SITELIBDIR%%/sonata/scrobbler.pyc
%%PYTHON_SITELIBDIR%%/sonata/scrobbler.pyo
%%PYTHON_SITELIBDIR%%/sonata/streams.py
%%PYTHON_SITELIBDIR%%/sonata/streams.pyc
%%PYTHON_SITELIBDIR%%/sonata/streams.pyo
%%PYTHON_SITELIBDIR%%/sonata/svnversion.py
%%PYTHON_SITELIBDIR%%/sonata/svnversion.pyc
%%PYTHON_SITELIBDIR%%/sonata/svnversion.pyo
%%PYTHON_SITELIBDIR%%/sonata/tagedit.py
%%PYTHON_SITELIBDIR%%/sonata/tagedit.pyc
%%PYTHON_SITELIBDIR%%/sonata/tagedit.pyo
%%PYTHON_SITELIBDIR%%/sonata/tray.py
%%PYTHON_SITELIBDIR%%/sonata/tray.pyc
%%PYTHON_SITELIBDIR%%/sonata/tray.pyo
%%PYTHON_SITELIBDIR%%/sonata/ui.py
%%PYTHON_SITELIBDIR%%/sonata/ui.pyc
%%PYTHON_SITELIBDIR%%/sonata/ui.pyo
%%PYTHON_SITELIBDIR%%/sonata/version.py
%%PYTHON_SITELIBDIR%%/sonata/version.pyc
%%PYTHON_SITELIBDIR%%/sonata/version.pyo
share/applications/sonata.desktop
%%PORTDOCS%%%%DOCSDIR%%/README
share/locale/ar/LC_MESSAGES/sonata.mo
share/locale/be@latin/LC_MESSAGES/sonata.mo
share/locale/ca/LC_MESSAGES/sonata.mo
share/locale/cs/LC_MESSAGES/sonata.mo
share/locale/da/LC_MESSAGES/sonata.mo
share/locale/de/LC_MESSAGES/sonata.mo
share/locale/el_GR/LC_MESSAGES/sonata.mo
share/locale/es/LC_MESSAGES/sonata.mo
share/locale/et/LC_MESSAGES/sonata.mo
share/locale/fi/LC_MESSAGES/sonata.mo
share/locale/fr/LC_MESSAGES/sonata.mo
share/locale/it/LC_MESSAGES/sonata.mo
share/locale/ja/LC_MESSAGES/sonata.mo
share/locale/nl/LC_MESSAGES/sonata.mo
share/locale/pl/LC_MESSAGES/sonata.mo
share/locale/pt_BR/LC_MESSAGES/sonata.mo
share/locale/ru/LC_MESSAGES/sonata.mo
share/locale/sk/LC_MESSAGES/sonata.mo
share/locale/sl/LC_MESSAGES/sonata.mo
share/locale/sv/LC_MESSAGES/sonata.mo
share/locale/tr/LC_MESSAGES/sonata.mo
share/locale/uk/LC_MESSAGES/sonata.mo
share/locale/zh_CN/LC_MESSAGES/sonata.mo
share/locale/zh_TW/LC_MESSAGES/sonata.mo
share/pixmaps/sonata-album.png
share/pixmaps/sonata-artist.png
share/pixmaps/sonata-case.png
share/pixmaps/sonata-stock_volume-max.png
share/pixmaps/sonata-stock_volume-med.png
share/pixmaps/sonata-stock_volume-min.png
share/pixmaps/sonata-stock_volume-mute.png
share/pixmaps/sonata.png
share/pixmaps/sonata_disconnect.png
share/pixmaps/sonata_large.png
share/pixmaps/sonata_pause.png
share/pixmaps/sonata_play.png
share/pixmaps/sonatacd.png
share/pixmaps/sonatacd_large.png
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrmtry share/locale/el_GR/LC_MESSAGES
@dirrmtry share/locale/el_GR
@dirrm %%PYTHON_SITELIBDIR%%/sonata/plugins
@dirrm %%PYTHON_SITELIBDIR%%/sonata