1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-22 04:17:44 +00:00

audio/sonata: Update to 1.7b1-22 which supports Python 3.

PR:		243725
Submitted by:	Greg V
Approved by:	maintainer timeout (nivit, 20+ days)
This commit is contained in:
Rene Ladan 2020-03-21 01:48:23 +00:00
parent dfda5fb760
commit b9349270a6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=528820
5 changed files with 16 additions and 145 deletions

View File

@ -1,45 +1,35 @@
# Created by: Nicola Vitale <nivit@FreeBSD.org>
# $FreeBSD$
PORTNAME= sonata
PORTVERSION= 1.6.2.1
PORTREVISION= 12
CATEGORIES= audio python
MASTER_SITES= http://codingteam.net/project/sonata/upload/releases/
PORTNAME= sonata
DISTVERSION= 1.7b1-22
DISTVERSIONSUFFIX= -gcee3555
CATEGORIES= audio python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= nivit@FreeBSD.org
COMMENT= Elegant music player for MPD
LICENSE= GPLv3
DEPRECATED= Old, uses EOLed python27
EXPIRATION_DATE= 2020-03-01
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-mpd2>=0.4.6:audio/py-python-mpd2@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mpd>=0.2.0:audio/py-mpd@${PY_FLAVOR}
USES= gettext gnome pkgconfig python:3.5+
USES= gettext gnome pkgconfig python:2.7
USE_GNOME= pygtk2
USE_GITHUB= yes
GH_ACCOUNT= multani
USE_GNOME= pygobject3
USE_PYTHON= distutils autoplist
OPTIONS_DEFINE= DOCS MANPAGES MMKEYS MPD PYGNOMEEXTRAS TAGLIB
OPTIONS_DEFINE= DOCS MMKEYS MPD TAGLIB
OPTIONS_DEFAULT= MPD
MMKEYS_DESC= Enable instance single support for mmkeys
MPD_DESC= Install Music Player Daemon
PYGNOMEEXTRAS_DESC= Use py-gnome-extras for enhanced system tray
TAGLIB_DESC= Install support for editing metadata
OPTIONS_SUB= yes
MANPAGES_MAKE_ENV_OFF= NO_INSTALL_MANPAGES=yes
DOCS_MAKE_ENV= NOPORTDOCS=${NOPORTDOCS}
MPD_RUN_DEPENDS+= musicpd:audio/musicpd
MMKEYS_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}dbus>=0.82.4:devel/py-dbus@${PY_FLAVOR}
PYGNOMEEXTRAS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gnome-extras>=2.25.3_4:x11-toolkits/py-gnome-extras@${PY_FLAVOR}
PYGNOMEEXTRAS_IGNORE= Dependency py-gnome-extras gone.
TAGLIB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tagpy>=0.94.5:audio/py-tagpy@${PY_FLAVOR}
post-patch:
@${REINPLACE_CMD} -e 's,%%DOCSDIR%%,${DOCSDIR},' \
-e 's,%%PREFIX%%,${PREFIX},' \
${WRKSRC}/${PYSETUP} ${WRKSRC}/sonata.py
MMKEYS_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}dbus>=0.82.4:devel/py-dbus@${FLAVOR}
TAGLIB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tagpy>=0.94.5:audio/py-tagpy@${FLAVOR}
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (sonata-1.6.2.1.tar.gz) = 89aa311286edc4f390061c479894835789259b9c76c944f18187374ba8e53dbf
SIZE (sonata-1.6.2.1.tar.gz) = 454757
TIMESTAMP = 1580382764
SHA256 (multani-sonata-1.7b1-22-gcee3555_GH0.tar.gz) = ac28360a5c576ad40c6fdf591de30ed90c4a5f63a366254794ac2a646d3ae680
SIZE (multani-sonata-1.7b1-22-gcee3555_GH0.tar.gz) = 2258513

View File

@ -1,77 +0,0 @@
--- setup.py.orig 2009-09-21 21:02:16 UTC
+++ setup.py
@@ -54,6 +54,38 @@ VERSION = %r
""" % sonata.svnversion.VERSION)
versionfile.close()
+port_data_files=[('share/applications', ['sonata.desktop']),
+ ('share/pixmaps', glob.glob('sonata/pixmaps/*')),
+ ('share/locale/de/LC_MESSAGES', ['mo/de/sonata.mo']),
+ ('share/locale/pl/LC_MESSAGES', ['mo/pl/sonata.mo']),
+ ('share/locale/ru/LC_MESSAGES', ['mo/ru/sonata.mo']),
+ ('share/locale/fr/LC_MESSAGES', ['mo/fr/sonata.mo']),
+ ('share/locale/zh_CN/LC_MESSAGES', ['mo/zh_CN/sonata.mo']),
+ ('share/locale/sv/LC_MESSAGES', ['mo/sv/sonata.mo']),
+ ('share/locale/es/LC_MESSAGES', ['mo/es/sonata.mo']),
+ ('share/locale/fi/LC_MESSAGES', ['mo/fi/sonata.mo']),
+ ('share/locale/nl/LC_MESSAGES', ['mo/nl/sonata.mo']),
+ ('share/locale/it/LC_MESSAGES', ['mo/it/sonata.mo']),
+ ('share/locale/cs/LC_MESSAGES', ['mo/cs/sonata.mo']),
+ ('share/locale/da/LC_MESSAGES', ['mo/da/sonata.mo']),
+ ('share/locale/ca/LC_MESSAGES', ['mo/ca/sonata.mo']),
+ ('share/locale/ar/LC_MESSAGES', ['mo/ar/sonata.mo']),
+ ('share/locale/pt_BR/LC_MESSAGES', ['mo/pt_BR/sonata.mo']),
+ ('share/locale/et/LC_MESSAGES', ['mo/et/sonata.mo']),
+ ('share/locale/tr/LC_MESSAGES', ['mo/tr/sonata.mo']),
+ ('share/locale/be@latin/LC_MESSAGES', ['mo/be@latin/sonata.mo']),
+ ('share/locale/el_GR/LC_MESSAGES', ['mo/el_GR/sonata.mo']),
+ ('share/locale/sk/LC_MESSAGES', ['mo/sk/sonata.mo']),
+ ('share/locale/ja/LC_MESSAGES', ['mo/ja/sonata.mo']),
+ ('share/locale/sl/LC_MESSAGES', ['mo/sl/sonata.mo']),
+ ('share/locale/zh_TW/LC_MESSAGES', ['mo/zh_TW/sonata.mo']),
+ ('share/locale/uk/LC_MESSAGES', ['mo/uk/sonata.mo'])]
+
+if not os.environ.has_key('NOPORTDOCS'):
+ port_data_files.append(('share/doc/sonata',['README',]))
+if not os.environ.has_key('NO_INSTALL_MANPAGES'):
+ port_data_files.append(('man/man1', ['sonata.1']))
+
setup(name='Sonata',
version="1.6.2.1",
description='GTK+ client for the Music Player Daemon (MPD).',
@@ -77,34 +109,7 @@ setup(name='Sonata',
extra_link_args=capture("pkg-config --libs gtk+-2.0 pygtk-2.0").split()
),],
scripts = ['sonata/sonata'],
- data_files=[('share/sonata', ['README', 'CHANGELOG', 'TODO', 'TRANSLATORS']),
- ('share/applications', ['sonata.desktop']),
- ('share/pixmaps', glob.glob('sonata/pixmaps/*')),
- ('share/man/man1', ['sonata.1']),
- ('share/locale/de/LC_MESSAGES', ['mo/de/sonata.mo']),
- ('share/locale/pl/LC_MESSAGES', ['mo/pl/sonata.mo']),
- ('share/locale/ru/LC_MESSAGES', ['mo/ru/sonata.mo']),
- ('share/locale/fr/LC_MESSAGES', ['mo/fr/sonata.mo']),
- ('share/locale/zh_CN/LC_MESSAGES', ['mo/zh_CN/sonata.mo']),
- ('share/locale/sv/LC_MESSAGES', ['mo/sv/sonata.mo']),
- ('share/locale/es/LC_MESSAGES', ['mo/es/sonata.mo']),
- ('share/locale/fi/LC_MESSAGES', ['mo/fi/sonata.mo']),
- ('share/locale/nl/LC_MESSAGES', ['mo/nl/sonata.mo']),
- ('share/locale/it/LC_MESSAGES', ['mo/it/sonata.mo']),
- ('share/locale/cs/LC_MESSAGES', ['mo/cs/sonata.mo']),
- ('share/locale/da/LC_MESSAGES', ['mo/da/sonata.mo']),
- ('share/locale/ca/LC_MESSAGES', ['mo/ca/sonata.mo']),
- ('share/locale/ar/LC_MESSAGES', ['mo/ar/sonata.mo']),
- ('share/locale/pt_BR/LC_MESSAGES', ['mo/pt_BR/sonata.mo']),
- ('share/locale/et/LC_MESSAGES', ['mo/et/sonata.mo']),
- ('share/locale/tr/LC_MESSAGES', ['mo/tr/sonata.mo']),
- ('share/locale/be@latin/LC_MESSAGES', ['mo/be@latin/sonata.mo']),
- ('share/locale/el_GR/LC_MESSAGES', ['mo/el_GR/sonata.mo']),
- ('share/locale/sk/LC_MESSAGES', ['mo/sk/sonata.mo']),
- ('share/locale/ja/LC_MESSAGES', ['mo/ja/sonata.mo']),
- ('share/locale/sl/LC_MESSAGES', ['mo/sl/sonata.mo']),
- ('share/locale/zh_TW/LC_MESSAGES', ['mo/zh_TW/sonata.mo']),
- ('share/locale/uk/LC_MESSAGES', ['mo/uk/sonata.mo'])],
+ data_files=port_data_files,
)
# Cleanup (remove /build, /mo, and *.pyc files:

View File

@ -1,11 +0,0 @@
--- sonata.py.orig 2009-09-21 21:02:16 UTC
+++ sonata.py
@@ -59,6 +59,8 @@ except ImportError:
# https://bugs.launchpad.net/ubuntu/+source/zsi/+bug/208855
sys.path.append('/usr/lib/python2.5/site-packages/oldxml')
+sys.path.remove('%%PREFIX%%/bin')
+
# hint for gnome.init to set the process name to 'sonata'
if platform.system() == 'Linux':
sys.argv[0] = 'sonata'

View File

@ -1,32 +0,0 @@
--- sonata/main.py.orig 2009-09-21 21:02:16 UTC
+++ sonata/main.py
@@ -989,13 +989,14 @@ class Base(object):
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 @@ class Base(object):
self.on_currsong_notify(force_popup=True)
def main(self):
+ gtk.gdk.threads_init()
+ gtk.gdk.threads_enter()
gtk.main()
+ gtk.gdk.threads_leave()