forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/libgpod: Fix segfault (#565052 by Julien Papasian) and bui…
…ld failure (#537968 by Toralf Förster). Package-Manager: portage-2.2.28
- Loading branch information
Showing
3 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- a/bindings/python/gpod.i.in.orig 2015-06-20 23:15:41.000000000 -0700 | ||
+++ b/bindings/python/gpod.i.in 2015-06-20 23:16:28.000000000 -0700 | ||
@@ -298,9 +298,9 @@ | ||
%include "gpod_doc.i" | ||
%include "@top_builddir@/config.h" | ||
|
||
-# be nicer to decode these utf8 strings into Unicode objects in the C | ||
-# layer. Here we are leaving it to the Python side, and just giving | ||
-# them utf8 encoded Strings. | ||
+// be nicer to decode these utf8 strings into Unicode objects in the C | ||
+// layer. Here we are leaving it to the Python side, and just giving | ||
+// them utf8 encoded Strings. | ||
typedef char gchar; | ||
|
||
%typemap(in) time_t { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Patch from James Burton - https://github.com/jburton/libgpod/commit/342d49c5577682dd4fba35bfd5fb15f7287c7d5a | ||
--- a/src/itdb_itunesdb.c | ||
+++ b/src/itdb_itunesdb.c | ||
@@ -1156,6 +1156,7 @@ static gboolean playcounts_plist_read (FImport *fimp, GValue *plist_data) | ||
GHashTable *pc_dict, *track_dict; | ||
GValue *to_parse; | ||
GArray *array; | ||
+ GValue value; | ||
gint i; | ||
guint32 mac_time; | ||
guint64 *dbid; | ||
@@ -1174,13 +1175,14 @@ static gboolean playcounts_plist_read (FImport *fimp, GValue *plist_data) | ||
playcounts = g_hash_table_new_full (g_int64_hash, g_int64_equal, g_free, g_free); | ||
|
||
array = (GArray*)g_value_get_boxed (to_parse); | ||
for (i = 0; i < array->len; i++) { | ||
- if (!G_VALUE_HOLDS (g_array_index (array, GValue *, i), G_TYPE_HASH_TABLE)) { | ||
+ value = g_array_index (array, GValue, i); | ||
+ if (!G_VALUE_HOLDS (&value, G_TYPE_HASH_TABLE)) { | ||
continue; | ||
} | ||
|
||
- track_dict = g_value_get_boxed (g_array_index (array, GValue *, i)); | ||
+ track_dict = g_value_get_boxed (&value); | ||
if (track_dict == NULL) | ||
continue; | ||
|
||
to_parse = g_hash_table_lookup (track_dict, "persistentID"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 1999-2014 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
PYTHON_COMPAT=( python2_7 ) | ||
|
||
inherit eutils mono-env python-single-r1 udev | ||
|
||
DESCRIPTION="Shared library to access the contents of an iPod" | ||
HOMEPAGE="http://www.gtkpod.org/libgpod/" | ||
SRC_URI="mirror://sourceforge/gtkpod/${P}.tar.bz2" | ||
|
||
LICENSE="LGPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
|
||
IUSE="+gtk python +udev ios mono static-libs" | ||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" | ||
|
||
RDEPEND=" | ||
>=app-pda/libplist-1.0:= | ||
>=dev-db/sqlite-3:3 | ||
>=dev-libs/glib-2.16:2 | ||
dev-libs/libxml2:2 | ||
sys-apps/sg3_utils | ||
gtk? ( x11-libs/gdk-pixbuf:2 ) | ||
ios? ( app-pda/libimobiledevice:= ) | ||
python? ( | ||
${PYTHON_DEPS} | ||
>=media-libs/mutagen-1.8[${PYTHON_USEDEP}] | ||
>=dev-python/pygobject-2.8:2[${PYTHON_USEDEP}] | ||
) | ||
udev? ( virtual/udev ) | ||
mono? ( | ||
>=dev-lang/mono-1.9.1 | ||
>=dev-dotnet/gtk-sharp-2.12 | ||
) | ||
" | ||
DEPEND="${RDEPEND} | ||
python? ( >=dev-lang/swig-1.3.24:0 ) | ||
dev-libs/libxslt | ||
dev-util/intltool | ||
dev-util/gtk-doc-am | ||
sys-devel/gettext | ||
virtual/pkgconfig | ||
" | ||
|
||
DOCS="AUTHORS NEWS README* TROUBLESHOOTING" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-comment.patch #537968 | ||
"${FILESDIR}"/${P}-segfault.patch #565052 | ||
) | ||
|
||
pkg_setup() { | ||
use mono && mono-env_pkg_setup | ||
use python && python-single-r1_pkg_setup | ||
} | ||
|
||
src_configure() { | ||
econf \ | ||
$(use_enable static-libs static) \ | ||
$(use_enable udev) \ | ||
$(use_enable gtk gdk-pixbuf) \ | ||
$(use_enable python pygobject) \ | ||
--without-hal \ | ||
$(use_with ios libimobiledevice) \ | ||
--with-udev-dir="$(get_udevdir)" \ | ||
$(use_with python) \ | ||
$(use_with mono) | ||
} | ||
|
||
src_install() { | ||
default | ||
rmdir "${ED}"/tmp | ||
prune_libtool_files --modules | ||
} |