Skip to content

Commit

Permalink
media-sound/xmms2: adapt to mac-3 -> mac-4 API change
Browse files Browse the repository at this point in the history
Picked patch sas-is from:
xmms2/xmms2-devel#2

Package-Manager: Portage-2.3.13, Repoman-2.3.4
  • Loading branch information
Sergei Trofimovich committed Nov 4, 2017
1 parent aafb51b commit c2395af
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
50 changes: 50 additions & 0 deletions media-sound/xmms2/files/xmms2-0.8_p20161122-mac-4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From e87745721deaf46d7054ac40cc55838561c9f552 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Carretero?= <cJ@zougloub.eu>
Date: Tue, 24 Oct 2017 18:43:26 -0400
Subject: [PATCH] plugins: mac: support newer mac API version

---
src/plugins/mac/mac.cpp | 6 +++++-
src/plugins/mac/source_adapter.h | 8 +++++++-
2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/plugins/mac/mac.cpp b/src/plugins/mac/mac.cpp
index cec43e52..d8d3d1b9 100644
--- a/src/plugins/mac/mac.cpp
+++ b/src/plugins/mac/mac.cpp
@@ -210,8 +210,12 @@ xmms_mac_get_media_info (xmms_xform_t *xform)
gchar *name;

field_name = pTagField->GetFieldName ();
- name = (gchar *)GetUTF8FromUTF16 (field_name);

+#if MAC_DLL_INTERFACE_VERSION_NUMBER >= 1000
+ name = (gchar *)CAPECharacterHelper::GetUTF8FromUTF16 (field_name);
+#else
+ name = (gchar *)GetUTF8FromUTF16 (field_name);
+#endif
memset (field_value, 0, 255);
int size = 255;
p_ape_tag->GetFieldString (field_name, (char *)field_value, &size, TRUE);
diff --git a/src/plugins/mac/source_adapter.h b/src/plugins/mac/source_adapter.h
index 94f75359..70617514 100644
--- a/src/plugins/mac/source_adapter.h
+++ b/src/plugins/mac/source_adapter.h
@@ -38,7 +38,13 @@ public:
~CSourceAdapter () {};

// open / close
- int Open (const wchar_t * pName) { return ERROR_SUCCESS; }
+#if MAC_DLL_INTERFACE_VERSION_NUMBER >= 1000
+ int Open (const wchar_t * pName, BOOL bOpenReadOnly = FALSE)
+#else
+ int Open (const wchar_t * pName)
+#endif
+ { return ERROR_SUCCESS; }
+
int Close () { return ERROR_SUCCESS; }

// read / write
--
2.15.0

3 changes: 3 additions & 0 deletions media-sound/xmms2/xmms2-0.8_p20161122-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ src_prepare() {
# fix hash to be the same on LE/BE platforms
eapply "${FILESDIR}/${P}"-be-hash.patch

# handle mac-3 -> -4 API change
eapply "${FILESDIR}/${P}"-mac-4.patch

eapply_user
}

Expand Down

0 comments on commit c2395af

Please sign in to comment.