From 612f8c6bf4baac9f4cce92c457989e73cb799042 Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Sun, 15 Sep 2019 01:30:41 +0200 Subject: [PATCH] picard: Final 2.2.0 release (#4175) --- .../picard/patches/picard-2.1.3.patchset | 103 -------------- .../picard/patches/picard-2.2.0.patchset | 128 ++++++++++++++++++ ...icard-2.1.3.recipe => picard-2.2.0.recipe} | 8 +- 3 files changed, 132 insertions(+), 107 deletions(-) delete mode 100644 media-sound/picard/patches/picard-2.1.3.patchset create mode 100644 media-sound/picard/patches/picard-2.2.0.patchset rename media-sound/picard/{picard-2.1.3.recipe => picard-2.2.0.recipe} (90%) diff --git a/media-sound/picard/patches/picard-2.1.3.patchset b/media-sound/picard/patches/picard-2.1.3.patchset deleted file mode 100644 index 982954c26..000000000 --- a/media-sound/picard/patches/picard-2.1.3.patchset +++ /dev/null @@ -1,103 +0,0 @@ -From b1cea68f3484eba249e6e2db8d7b6220e7601984 Mon Sep 17 00:00:00 2001 -From: Philipp Wolfer -Date: Tue, 29 Jan 2019 11:33:18 +0000 -Subject: [PATCH 1/2] Haiku: Avoid using locale.strxfrm - ---- - picard/ui/options/interface.py | 2 +- - picard/ui/options/releases.py | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/picard/ui/options/interface.py b/picard/ui/options/interface.py -index 08fd264c..9ae9ed4b 100644 ---- a/picard/ui/options/interface.py -+++ b/picard/ui/options/interface.py -@@ -138,7 +138,7 @@ class InterfaceOptionsPage(OptionsPage): - self.ui.ui_language.addItem(_('System default'), '') - language_list = [(l[0], l[1], _(l[2])) for l in UI_LANGUAGES] - -- def fcmp(x): return locale.strxfrm(x[2]) -+ def fcmp(x): return x[2] - for lang_code, native, translation in sorted(language_list, key=fcmp): - if native and native != translation: - name = '%s (%s)' % (translation, native) -diff --git a/picard/ui/options/releases.py b/picard/ui/options/releases.py -index 117391fc..839a2f20 100644 ---- a/picard/ui/options/releases.py -+++ b/picard/ui/options/releases.py -@@ -255,7 +255,7 @@ class ReleasesOptionsPage(OptionsPage): - else: - source_list = [(c[0], _(c[1])) for c in source.items()] - -- def fcmp(x): return strxfrm(x[1]) -+ def fcmp(x): return x[1] - source_list.sort(key=fcmp) - saved_data = config.setting[setting] - move = [] --- -2.21.0 - -From 43065c9cfaed92f68d8c80aed220016e5815d260 Mon Sep 17 00:00:00 2001 -From: Philipp Wolfer -Date: Tue, 29 Jan 2019 11:35:33 +0000 -Subject: [PATCH 2/3] Haiku: open URLs with default browser - -Try opening with "open", fall back to WebPositive ---- - picard/util/webbrowser2.py | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/picard/util/webbrowser2.py b/picard/util/webbrowser2.py -index 7d003ccf..3c1c9c2a 100644 ---- a/picard/util/webbrowser2.py -+++ b/picard/util/webbrowser2.py -@@ -17,7 +17,7 @@ - # along with this program; if not, write to the Free Software - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - --from sys import version_info -+from sys import platform, version_info - import webbrowser - - from PyQt5 import QtWidgets -@@ -32,6 +32,13 @@ in PyQt and also adds a utility function for opening Picard URLS. - """ - - -+if platform == "haiku1": -+ haiku_default = webbrowser.GenericBrowser("open") -+ webbrowser.register("haiku-default", None, haiku_default, True) -+ webpositive = webbrowser.GenericBrowser("WebPositive") -+ webbrowser.register("webpositive", None, webpositive) -+ -+ - def open(url): - try: - webbrowser.open(url) --- -2.21.0 - -From b9e96ea8fd0907c797b2424986023941ee8e1474 Mon Sep 17 00:00:00 2001 -From: Philipp Wolfer -Date: Fri, 19 Jul 2019 10:37:17 +0000 -Subject: [PATCH 4/4] Haiku: use Haiku Qt style - ---- - picard/tagger.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/picard/tagger.py b/picard/tagger.py -index f3f0ff85..daf76a41 100644 ---- a/picard/tagger.py -+++ b/picard/tagger.py -@@ -130,7 +130,7 @@ class Tagger(QtWidgets.QApplication): - - # Use the new fusion style from PyQt5 for a modern and consistent look - # across all OSes. -- if sys.platform != "darwin": -+ if sys.platform not in ("darwin", "haiku1"): - self.setStyle('Fusion') - - # Set the WM_CLASS to 'MusicBrainz-Picard' so desktop environments --- -2.21.0 diff --git a/media-sound/picard/patches/picard-2.2.0.patchset b/media-sound/picard/patches/picard-2.2.0.patchset new file mode 100644 index 000000000..30fafa715 --- /dev/null +++ b/media-sound/picard/patches/picard-2.2.0.patchset @@ -0,0 +1,128 @@ +From 30d08591efc2b98e9c969a78d16756ae1767a320 Mon Sep 17 00:00:00 2001 +From: Philipp Wolfer +Date: Tue, 29 Jan 2019 11:33:18 +0000 +Subject: [PATCH 3/6] Haiku: Avoid using locale.strxfrm + +--- + picard/ui/options/interface.py | 2 +- + picard/ui/options/releases.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/picard/ui/options/interface.py b/picard/ui/options/interface.py +index 16e6f49e..2ed78c80 100644 +--- a/picard/ui/options/interface.py ++++ b/picard/ui/options/interface.py +@@ -141,7 +141,7 @@ class InterfaceOptionsPage(OptionsPage): + language_list = [(l[0], l[1], _(l[2])) for l in UI_LANGUAGES] + + def fcmp(x): +- return locale.strxfrm(x[2]) ++ return x[2] + for lang_code, native, translation in sorted(language_list, key=fcmp): + if native and native != translation: + name = '%s (%s)' % (translation, native) +diff --git a/picard/ui/options/releases.py b/picard/ui/options/releases.py +index 857b7850..d3decda5 100644 +--- a/picard/ui/options/releases.py ++++ b/picard/ui/options/releases.py +@@ -261,7 +261,7 @@ class ReleasesOptionsPage(OptionsPage): + source_list = [(c[0], _(c[1])) for c in source.items()] + + def fcmp(x): +- return strxfrm(x[1]) ++ return x[1] + source_list.sort(key=fcmp) + saved_data = config.setting[setting] + move = [] +-- +2.23.0 + +From 6410e8e4d8826bb0fd1e9caa819bc566af3334e2 Mon Sep 17 00:00:00 2001 +From: Philipp Wolfer +Date: Fri, 19 Jul 2019 10:36:05 +0000 +Subject: [PATCH 4/6] Haiku: introduce IS_HAIKU variable + +--- + picard/const/sys.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/picard/const/sys.py b/picard/const/sys.py +index baa80732..177fbe4b 100644 +--- a/picard/const/sys.py ++++ b/picard/const/sys.py +@@ -23,6 +23,7 @@ import sys + IS_WIN = sys.platform == 'win32' + IS_LINUX = sys.platform == 'linux' + IS_MACOS = sys.platform == 'darwin' ++IS_HAIKU = sys.platform == 'haiku1' + + # These variables are set by pyinstaller if running from a packaged build + # See http://pyinstaller.readthedocs.io/en/stable/runtime-information.html +-- +2.23.0 + +From 58b389cffecca65ef916aa4986424e4c413e436f Mon Sep 17 00:00:00 2001 +From: Philipp Wolfer +Date: Tue, 29 Jan 2019 11:35:33 +0000 +Subject: [PATCH 5/6] Haiku: open URLs with default browser Try opening URLs + with "open", fall back to WebPositive + +--- + picard/util/webbrowser2.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/picard/util/webbrowser2.py b/picard/util/webbrowser2.py +index c7426918..f087b462 100644 +--- a/picard/util/webbrowser2.py ++++ b/picard/util/webbrowser2.py +@@ -29,6 +29,14 @@ from PyQt5 import QtWidgets + + from picard import log + from picard.const import PICARD_URLS ++from picard.const.sys import IS_HAIKU ++ ++ ++if IS_HAIKU: ++ haiku_default = webbrowser.GenericBrowser("open") ++ webbrowser.register("haiku-default", None, haiku_default, True) ++ webpositive = webbrowser.GenericBrowser("WebPositive") ++ webbrowser.register("webpositive", None, webpositive) + + + def open(url): +-- +2.23.0 + +From e5107f049ebc63248912ccea78ed88f2d5de5c73 Mon Sep 17 00:00:00 2001 +From: Philipp Wolfer +Date: Fri, 19 Jul 2019 10:37:17 +0000 +Subject: [PATCH 6/6] Haiku: use Haiku Qt style + +--- + picard/tagger.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/picard/tagger.py b/picard/tagger.py +index a5aeb6e3..0c081850 100644 +--- a/picard/tagger.py ++++ b/picard/tagger.py +@@ -66,6 +66,7 @@ from picard.const import ( + ) + from picard.const.sys import ( + IS_FROZEN, ++ IS_HAIKU, + IS_MACOS, + IS_WIN, + ) +@@ -137,7 +138,7 @@ class Tagger(QtWidgets.QApplication): + + # Use the new fusion style from PyQt5 for a modern and consistent look + # across all OSes. +- if not IS_MACOS: ++ if not IS_MACOS and not IS_HAIKU: + self.setStyle('Fusion') + + # Set the WM_CLASS to 'MusicBrainz-Picard' so desktop environments +-- +2.23.0 + diff --git a/media-sound/picard/picard-2.1.3.recipe b/media-sound/picard/picard-2.2.0.recipe similarity index 90% rename from media-sound/picard/picard-2.1.3.recipe rename to media-sound/picard/picard-2.2.0.recipe index dedff40e7..349dd47df 100644 --- a/media-sound/picard/picard-2.1.3.recipe +++ b/media-sound/picard/picard-2.2.0.recipe @@ -1,4 +1,4 @@ -SUMMARY="MusicBrainz music tagger" +SUMMARY="MusicBrainz Picard music tagger" DESCRIPTION="Tag your music with the next generation MusicBrainz tagger. * Multiple formats - Picard supports all popular music formats, including MP3, \ @@ -12,9 +12,9 @@ HOMEPAGE="https://picard.musicbrainz.org/" COPYRIGHT="2004-2019 Robert Kaye, Lukas Lalinsky, Laurent Monin, \ Sambhav Kothari, Philipp Wolfer and others" LICENSE="GNU GPL v2" -REVISION="7" -SOURCE_URI="ftp://ftp.eu.metabrainz.org/pub/musicbrainz/picard/picard-$portVersion.tar.gz" -CHECKSUM_SHA256="8e044fe68c44d345c19f98952c3c7f20c72da74dbac9ce7c7b0621e2d69885a7" +REVISION="1" +SOURCE_URI="https://github.com/metabrainz/picard/archive/release-$portVersion.tar.gz" +CHECKSUM_SHA256="53a2e298398e8ca5ba8e7771c59ff4caf9cdc73be2d6092c4cad6734bd4a8116" SOURCE_DIR="picard-release-$portVersion" PATCHES="picard-$portVersion.patchset" ADDITIONAL_FILES="picard.rdef.in"