removed obsolete python requirement; added patches from Arch Linux; added debug package [release 0.8.3-3mamba;Sun Oct 31 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 04:27:39 +01:00
parent 73b4a08cdd
commit 9198f78b8e
5 changed files with 117 additions and 34 deletions

View File

@ -0,0 +1,43 @@
From 8dc5015ae036b219c4c9579a156886aa3a722aa5 Mon Sep 17 00:00:00 2001
From: phantomjinx <p.g.richardson@phantomjinx.co.uk>
Date: Sat, 9 Aug 2014 19:57:10 +0100
Subject: [PATCH] #323 Segmentation fault when opening ipod
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Patch submitted in bug report from François Melchior / James Burton
---
src/itdb_itunesdb.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 4cc771a..1e85476 100644
--- 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;
@@ -1175,11 +1176,12 @@ static gboolean playcounts_plist_read (FImport *fimp, GValue *plist_data)
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;
--
2.12.2

View File

@ -0,0 +1,11 @@
diff -up libgpod-0.8.2/libgpod-1.0.pc.in.pkgconfig_overlinking libgpod-0.8.2/libgpod-1.0.pc.in
--- libgpod-0.8.2/libgpod-1.0.pc.in.pkgconfig_overlinking 2011-04-15 03:37:34.000000000 -0500
+++ libgpod-0.8.2/libgpod-1.0.pc.in 2012-08-10 13:53:00.294631805 -0500
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: libgpod
Description: A library to manipulate songs and playlists stored on an ipod
Version: @VERSION@
-Requires: glib-2.0 >= 2.8.0 gobject-2.0 @GDKPIXBUF_REQ@ @LIBIMOBILEDEVICE_REQ@
+Requires.private: glib-2.0 >= 2.8.0 gobject-2.0 @GDKPIXBUF_REQ@ @LIBIMOBILEDEVICE_REQ@
Libs: -L${libdir} -lgpod
Cflags: -I${includedir}/gpod-1.0

14
libgpod-0.8.3-swig.patch Normal file
View File

@ -0,0 +1,14 @@
--- libgpod-0.8.3/bindings/python/gpod.i.in 2015-02-12 08:43:11.058975384 +0100
+++ libgpod-0.8.3/bindings/python/gpod.i.in.orig 2015-02-12 08:44:08.185561253 +0100
@@ -298,9 +298,11 @@ PyObject* sw_get_photo(GList *list, gint
%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.
+*/
typedef char gchar;
%typemap(in) time_t {

15
libgpod-0.8.3-udev.patch Normal file
View File

@ -0,0 +1,15 @@
--- tools/90-libgpod.rules.in~ 2011-07-24 06:03:29.000000000 -0500
+++ tools/90-libgpod.rules.in 2019-10-15 15:50:28.279770507 -0500
@@ -16,10 +16,10 @@
# "iPods" using the afc protocol (iPhone, iPod Touch, ...)
-ACTION=="add|change", ENV{USBMUX_SUPPORTED}=="1", IMPORT{program}+="@udevdir@/iphone-set-info", GOTO="libgpod_end"
+ACTION=="add|change", ENV{USBMUX_SUPPORTED}=="1", IMPORT{program}=="@udevdir@/iphone-set-info", GOTO="libgpod_end"
# with a new enough usbmuxd, the rule below is not useful since it will
# take care of setting USBMUX_SUPPORTED for all supported devices. Keep
# this rule for now until distros ship a new enough usbmuxd
-ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9a]", IMPORT{program}+="@udevdir@/iphone-set-info"
+ACTION=="add|change", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9a]", IMPORT{program}=="@udevdir@/iphone-set-info"
LABEL="libgpod_end"

View File

@ -1,44 +1,38 @@
%define majver %(echo %version | cut -d. -f1-2) %define majver %(echo %version | cut -d. -f1-2)
Name: libgpod Name: libgpod
Version: 0.8.3 Version: 0.8.3
Release: 2mamba Release: 3mamba
Summary: A shared library to access the contents of an iPod Summary: A shared library to access the contents of an iPod
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.gtkpod.org/libgpod.html URL: https://github.com/fadingred/libgpod
Source: http://downloads.sourceforge.net/project/gtkpod/libgpod/libgpod-%{majver}/libgpod-%{version}.tar.bz2 Source: http://downloads.sourceforge.net/project/gtkpod/libgpod/libgpod-%{majver}/libgpod-%{version}.tar.bz2
Patch0: %{name}-0.8.0-blue_nano_8g.patch Patch0: libgpod-0.8.0-blue_nano_8g.patch
Patch1: libgpod-0.8.3-Segmentation-fault-when-opening-ipod.patch
Patch2: libgpod-0.8.3-pkgconfig_overlinking.patch
Patch3: libgpod-0.8.3-swig.patch
Patch4: libgpod-0.8.3-udev.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: gtk-doc BuildRequires: gtk-sharp2-devel
BuildRequires: gtk-sharp-devel BuildRequires: libgdk-pixbuf-devel
BuildRequires: libdbus-devel
BuildRequires: libgcrypt-devel
BuildRequires: libglib-devel BuildRequires: libglib-devel
BuildRequires: libgnutls-devel
BuildRequires: libgpg-error-devel
BuildRequires: libgtk-devel
BuildRequires: libimobiledevice-devel BuildRequires: libimobiledevice-devel
BuildRequires: liblzma-devel
BuildRequires: libopenssl-devel
BuildRequires: libplist-devel BuildRequires: libplist-devel
BuildRequires: libpython-devel BuildRequires: libsg3_utils-devel
BuildRequires: libselinux-devel
%ifarch %{ix86} x86_64
BuildRequires: libsmbios-devel
%endif
BuildRequires: libsqlite-devel BuildRequires: libsqlite-devel
BuildRequires: libstdc++6-devel BuildRequires: libudev-devel
BuildRequires: libtasn1-devel
BuildRequires: libusb-devel BuildRequires: libusb-devel
BuildRequires: libusbmuxd-devel BuildRequires: libusbmuxd-devel
BuildRequires: libuuid-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: libz-devel BuildRequires: libz-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libplist-devel >= 1.11-1mamba BuildRequires: libplist-devel >= 2.2.0
BuildConflicts:hal-devel
BuildRequires: libimobiledevice-devel >= 1.1.4 BuildRequires: libimobiledevice-devel >= 1.1.4
BuildRequires: intltool BuildRequires: intltool
BuildRequires: gettext-devel BuildRequires: gettext-devel
@ -46,10 +40,8 @@ BuildRequires: libgdk-pixbuf-devel
BuildRequires: perl-XML-Parser BuildRequires: perl-XML-Parser
BuildRequires: libtag-devel BuildRequires: libtag-devel
BuildRequires: libffi-devel BuildRequires: libffi-devel
BuildRequires: python-mutagen
BuildRequires: mono-devel BuildRequires: mono-devel
BuildRequires: swig BuildRequires: swig
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
libgpod is a shared library to access the contents of an iPod. libgpod is a shared library to access the contents of an iPod.
@ -72,17 +64,24 @@ Requires: gtk-doc
%description apidocs %description apidocs
Libgpod API documentation. Libgpod API documentation.
%debug_package
%prep %prep
%setup -q %setup -q
#%patch0 -p1 #%patch0 -p1
%patch1 -p1 -b .Segmentation-fault-when-opening-ipod
%patch2 -p1 -b .pkgconfig_overlinking
%patch3 -p1 -b .swig
%patch4 -p0 -b .udev
sed -e 's|libplist >= 1.0|libplist-2.0 >= 2.2|' -i configure.ac # support libplist 2.2
autoreconf -f -i
%build %build
# FIXME: mono bindings don't build on x86_64 %configure \
#./autogen.sh --enable-gtk-doc \
%configure --enable-gtk-doc \ --with-udev-dir=%{_prefix}/lib/udev \
%ifarch x86_64 --enable-udev \
--without-mono --with-python=no
%endif
%make %make
@ -104,14 +103,12 @@ rm -f %{buildroot}%{_libdir}/libgpod.a
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/ipod-read-sysinfo-extended %{_bindir}/ipod-read-sysinfo-extended
%{_libdir}/libgpod.so.* %{_libdir}/libgpod.so.*
%ifnarch x86_64
%{_libdir}/libgpod/libgpod-sharp-test.exe* %{_libdir}/libgpod/libgpod-sharp-test.exe*
%{_libdir}/libgpod/libgpod-sharp.dll* %{_libdir}/libgpod/libgpod-sharp.dll*
%endif %{_prefix}/lib/udev/iphone-set-info
/lib/udev/iphone-set-info %{_prefix}/lib/udev/ipod-set-info
/lib/udev/ipod-set-info %{_prefix}/lib/udev/rules.d/90-libgpod.rules
/lib/udev/rules.d/90-libgpod.rules #%{python_sitearch}/gpod/*
%{python_sitearch}/gpod/*
%doc AUTHORS COPYING %doc AUTHORS COPYING
%files devel %files devel
@ -129,6 +126,9 @@ rm -f %{buildroot}%{_libdir}/libgpod.a
%{_datadir}/gtk-doc/html/libgpod/ %{_datadir}/gtk-doc/html/libgpod/
%changelog %changelog
* Sun Oct 31 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.3-3mamba
- removed obsolete python requirement; added patches from Arch Linux; added debug package
* Fri Sep 05 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.3-2mamba * Fri Sep 05 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.3-2mamba
- rebuilt by autoport with build requirements: libplist-devel>=1.11-1mamba - rebuilt by autoport with build requirements: libplist-devel>=1.11-1mamba