From 56472f62e40a2acb22cf99a8703fb16782e49e89 Mon Sep 17 00:00:00 2001 From: ckuethe Date: Thu, 22 Nov 2007 22:46:42 +0000 Subject: [PATCH] Update to gtkpod 0.99.10. New eyecandy, but the key feature is that it works with apple's serial number silliness. "it pulls up my shuffle just fine" okan@ --- audio/gtkpod/Makefile | 20 +++-- audio/gtkpod/distinfo | 10 +-- audio/gtkpod/patches/patch-src_file_c | 70 ---------------- audio/gtkpod/patches/patch-src_file_convert_c | 81 +++++++++++++++++++ .../gtkpod/patches/patch-src_file_itunesdb_c | 35 +++----- audio/gtkpod/patches/patch-src_info_c | 10 +-- audio/gtkpod/pkg/MESSAGE | 21 +++++ audio/gtkpod/pkg/PLIST | 59 +++++++++----- 8 files changed, 176 insertions(+), 130 deletions(-) delete mode 100644 audio/gtkpod/patches/patch-src_file_c create mode 100644 audio/gtkpod/patches/patch-src_file_convert_c create mode 100644 audio/gtkpod/pkg/MESSAGE diff --git a/audio/gtkpod/Makefile b/audio/gtkpod/Makefile index ca9e8fb5e64..84dd28bef05 100644 --- a/audio/gtkpod/Makefile +++ b/audio/gtkpod/Makefile @@ -1,8 +1,7 @@ -# $OpenBSD: Makefile,v 1.23 2007/11/13 12:44:23 steven Exp $ +# $OpenBSD: Makefile,v 1.24 2007/11/22 22:46:42 ckuethe Exp $ COMMENT= GTK+2 program to synchronize an Apple iPod -DISTNAME= gtkpod-0.99.8 -PKGNAME= ${DISTNAME}p5 +DISTNAME= gtkpod-0.99.10 CATEGORIES= audio x11 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gtkpod/} @@ -17,22 +16,29 @@ PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes USE_X11= Yes +USE_GMAKE= Yes LIB_DEPENDS= id3tag.>=2::audio/libid3tag \ - gpod.>=402.0::audio/libgpod \ + gpod.>=600.0::audio/libgpod \ gdk-x11-2.0,gdk_pixbuf-2.0,gtk-x11-2.0::x11/gtk+2 \ glade-2.0.>=0.4::devel/libglade2 \ - mp4v2::audio/faad + art_lgpl_2.>=5::graphics/libart \ + curl.::net/curl \ + gnomevfs-2::x11/gnome/vfs2 \ + gconf-2.>=5::devel/gconf2 \ + gnomecanvas-2::x11/gnome/libgnomecanvas \ + ORBit-2.>=2::devel/ORBit2 WANTLIB= X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr Xrender \ Xcomposite Xdamage c cairo expat fontconfig freetype m \ - pthread z \ + pthread z gailutil \ xml2 glitz png glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 \ - pango-1.0 pangoft2-1.0 pangocairo-1.0 atk-1.0 + pango-1.0 pangoft2-1.0 pangocairo-1.0 atk-1.0 art_lgpl_2 MODULES= devel/gettext CONFIGURE_STYLE=gnu +CONFIGURE_ARGS+=--without-hal # trampolines needed for display_playlists.c CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \ CFLAGS="${CFLAGS} -ftrampolines" \ diff --git a/audio/gtkpod/distinfo b/audio/gtkpod/distinfo index 2c943a06c06..dc3ddc2bbd1 100644 --- a/audio/gtkpod/distinfo +++ b/audio/gtkpod/distinfo @@ -1,5 +1,5 @@ -MD5 (gtkpod-0.99.8.tar.gz) = 8EtnYFIE2QdtMNg7creEYw== -RMD160 (gtkpod-0.99.8.tar.gz) = atYwU5PWb3qEzBHkdQRcgTeiDIA= -SHA1 (gtkpod-0.99.8.tar.gz) = AjtVvDzZ77qfx6oBauY1OKmM8c8= -SHA256 (gtkpod-0.99.8.tar.gz) = 90r+/jHesR3CNbHTYd9nMpZv4ro+rd+5YMab8NFh4W0= -SIZE (gtkpod-0.99.8.tar.gz) = 1074007 +MD5 (gtkpod-0.99.10.tar.gz) = y8LQNYWq9BkV4mx8g6rUEg== +RMD160 (gtkpod-0.99.10.tar.gz) = maBqnluMrR48G0iiIClvF5bLqPY= +SHA1 (gtkpod-0.99.10.tar.gz) = NQpRzk6Nrk65wvIkeZBE+qqY8+A= +SHA256 (gtkpod-0.99.10.tar.gz) = zY7CJYqj53TvH3QxF93Ibn2JvD9A/ANJK3sIk/lmns4= +SIZE (gtkpod-0.99.10.tar.gz) = 1068561 diff --git a/audio/gtkpod/patches/patch-src_file_c b/audio/gtkpod/patches/patch-src_file_c deleted file mode 100644 index a580a03cd62..00000000000 --- a/audio/gtkpod/patches/patch-src_file_c +++ /dev/null @@ -1,70 +0,0 @@ -$OpenBSD: patch-src_file_c,v 1.1 2007/03/17 21:55:40 ckuethe Exp $ ---- src/file.c.orig Thu Mar 15 08:43:16 2007 -+++ src/file.c Thu Mar 15 08:48:50 2007 -@@ -851,7 +851,7 @@ static void copy_new_info (Track *from, - to->time_modified = from->time_modified; - to->year = from->year; - to->compilation = from->compilation; -- to->unk208 = from->unk208; -+ to->mediatype = from->mediatype; - to->lyrics_flag = from->lyrics_flag; - to->movie_flag = from->movie_flag; - } -@@ -1069,25 +1069,25 @@ static Track *get_track_info_from_file ( - { - case FILE_TYPE_MP3: - nti = mp3_get_file_info (name); -- /* Set unk208 to audio */ -- if (nti) nti->unk208 = 0x00000001; -+ /* Set mediatype to audio */ -+ if (nti) nti->mediatype = 0x00000001; - break; - case FILE_TYPE_M4A: - case FILE_TYPE_M4P: - case FILE_TYPE_M4B: - nti = mp4_get_file_info (name); -- /* Set unk208 to audio */ -+ /* Set mediatype to audio */ - if (nti) - { -- nti->unk208 = 0x00000001; -+ nti->mediatype = 0x00000001; - } - break; - case FILE_TYPE_WAV: - nti = wav_get_file_info (name); -- /* Set unk208 to audio */ -+ /* Set mediatype to audio */ - if (nti) - { -- nti->unk208 = 0x00000001; -+ nti->mediatype = 0x00000001; - } - break; - case FILE_TYPE_M4V: -@@ -1096,10 +1096,10 @@ static Track *get_track_info_from_file ( - this. Let's see if someone complains. */ - nti = mp4_get_file_info (name); - if (!nti) video_get_file_info (name); -- /* Set unk208 to video */ -+ /* Set mediatype to video */ - if (nti) - { -- nti->unk208 = 0x00000002; -+ nti->mediatype = 0x00000002; - nti->movie_flag = 0x01; - } - break; -@@ -1107,10 +1107,10 @@ static Track *get_track_info_from_file ( - case FILE_TYPE_MPG: - /* for now treat all the same */ - nti = video_get_file_info (name); -- /* Set unk208 to video */ -+ /* Set mediatype to video */ - if (nti) - { -- nti->unk208 = 0x00000002; -+ nti->mediatype = 0x00000002; - nti->movie_flag = 0x01; - } - break; diff --git a/audio/gtkpod/patches/patch-src_file_convert_c b/audio/gtkpod/patches/patch-src_file_convert_c new file mode 100644 index 00000000000..c9efb488ea5 --- /dev/null +++ b/audio/gtkpod/patches/patch-src_file_convert_c @@ -0,0 +1,81 @@ +$OpenBSD: patch-src_file_convert_c,v 1.1 2007/11/22 22:46:42 ckuethe Exp $ +--- src/file_convert.c.orig Sun Nov 18 11:25:06 2007 ++++ src/file_convert.c Sun Nov 18 11:34:35 2007 +@@ -33,6 +33,10 @@ + # include + #endif + ++#include ++#include ++#include ++#include + #include "display_itdb.h" + #include "file_convert.h" + #include "info.h" +@@ -43,9 +47,6 @@ + #include + #include + #include +-#include +-#include +-#include + #include + + #undef DEBUG_CONV +@@ -216,7 +217,7 @@ struct _ConvTrack + gchar *fname_root; /* filename root of converted file */ + gchar *fname_extension; /* filename extension of converted file */ + GPid pid; /* PID of child doing the conversion */ +- gint stderr; /* stderr of child doing the conversion */ ++ gint mystderr; /* stderr of child doing the conversion */ + Track *track; /* for reference, don't access inside threads! */ + iTunesDB *itdb; /* for reference, don't access inside threads! */ + gint threadnum; /* number of thread working on this track */ +@@ -624,6 +625,8 @@ static void conversion_prefs_changed (Conversion *conv + gboolean background_transfer; + gdouble maxsize; + GList *gl; ++ int mib[2], ncpus; ++ size_t len; + + g_return_if_fail (conv); + +@@ -645,13 +648,16 @@ static void conversion_prefs_changed (Conversion *conv + } + + conv->max_threads_num = prefs_get_int (FILE_CONVERT_MAX_THREADS_NUM); ++ mib[0] = CTL_HW; ++ mib[1] = HW_NCPU; ++ len = sizeof(ncpus); + if (conv->max_threads_num == 0) + { /* set to maximum available number of processors */ +- conv->max_threads_num = sysconf (_SC_NPROCESSORS_ONLN); +- /* paranoia mode on */ +- if (conv->max_threads_num <= 0) +- { ++ if ((sysctl(mib, 2, &ncpus, &len, NULL, 0) == -1) || (ncpus < 1)){ ++ /* paranoia mode on */ + conv->max_threads_num = 1; ++ } else { ++ conv->max_threads_num = ncpus; + } + } + +@@ -2296,7 +2302,7 @@ static gboolean conversion_convert_track (Conversion * + &ctr->pid, /* child's PID */ + NULL, /* child's stdin */ + NULL, /* child's stdout */ +- &ctr->stderr, /* child's stderr */ ++ &ctr->mystderr, /* child's stderr */ + &error); + + child_pid = ctr->pid; +@@ -2322,7 +2328,7 @@ static gboolean conversion_convert_track (Conversion * + gint status; + + /* set up i/o channel to main thread */ +- ctr->gio_channel = g_io_channel_unix_new (ctr->stderr); ++ ctr->gio_channel = g_io_channel_unix_new (ctr->mystderr); + g_io_channel_set_flags (ctr->gio_channel, + G_IO_FLAG_NONBLOCK, NULL); + g_io_channel_set_close_on_unref (ctr->gio_channel, TRUE); diff --git a/audio/gtkpod/patches/patch-src_file_itunesdb_c b/audio/gtkpod/patches/patch-src_file_itunesdb_c index 87cbf949670..cee03b11f20 100644 --- a/audio/gtkpod/patches/patch-src_file_itunesdb_c +++ b/audio/gtkpod/patches/patch-src_file_itunesdb_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ ---- src/file_itunesdb.c.orig Sun Jun 25 10:08:22 2006 -+++ src/file_itunesdb.c Thu Mar 15 08:49:17 2007 -@@ -547,7 +547,7 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ +$OpenBSD: patch-src_file_itunesdb_c,v 1.3 2007/11/22 22:46:42 ckuethe Exp $ +--- src/file_itunesdb.c.orig Wed Jun 27 13:29:33 2007 ++++ src/file_itunesdb.c Sun Nov 18 11:19:49 2007 +@@ -563,7 +563,7 @@ iTunesDB *gp_import_itdb (iTunesDB *old_itdb, const gi gp_itdb_add_extra_full (itdb); eitdb = itdb->userdata; @@ -10,9 +10,9 @@ $OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ eitdb->offline = offline; -@@ -571,9 +571,9 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ - { +@@ -588,9 +588,9 @@ iTunesDB *gp_import_itdb (iTunesDB *old_itdb, const gi Track *track = gl->data; + ExtraTrackData *etr; - g_return_val_if_fail (track, (release_widgets(), NULL)); + g_return_val_if_fail (track, (release_widgets(), (iTunesDB *)NULL)); @@ -22,20 +22,7 @@ $OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ fill_in_extended_info (track, total, num); gp_track_validate_entries (track); /* properly set value for has_artwork */ -@@ -589,9 +589,9 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ - track->has_artwork = 0x02; - } - -- /* set unk208 to audio if unset (important only for iPod Video) */ -- if (track->unk208 == 0) -- track->unk208 = 0x00000001; -+ /* set mediatype to audio if unset (important only for iPod Video) */ -+ if (track->mediatype == 0) -+ track->mediatype = 0x00000001; - /* restore deleted thumbnails */ - if ((track->artwork->thumbnails == NULL) && - (strlen (etr->thumb_path_locale) != 0)) -@@ -609,7 +609,7 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ +@@ -630,7 +630,7 @@ iTunesDB *gp_import_itdb (iTunesDB *old_itdb, const gi while (extendeddeletion) { Track *track = extendeddeletion->data; @@ -44,7 +31,7 @@ $OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ mark_track_for_deletion (itdb, track); extendeddeletion = g_list_delete_link (extendeddeletion, extendeddeletion); -@@ -632,15 +632,15 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ +@@ -654,15 +654,15 @@ iTunesDB *gp_import_itdb (iTunesDB *old_itdb, const gi GHashTable *track_hash = g_hash_table_new (g_direct_hash, g_direct_equal); Playlist *mpl = itdb_playlist_mpl (itdb); @@ -63,7 +50,7 @@ $OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ duptr = itdb_track_duplicate (track); /* add to database -- if duplicate detection is on and the same track already exists in the database, the already -@@ -659,15 +659,15 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ +@@ -681,15 +681,15 @@ iTunesDB *gp_import_itdb (iTunesDB *old_itdb, const gi GList *glm; Playlist *duppl; Playlist *pl = gl->next->data; /* skip MPL */ @@ -82,7 +69,7 @@ $OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ glm->data = newtr; } /* if it's the podcasts list, don't add the list again if -@@ -678,7 +678,7 @@ iTunesDB *gp_import_itdb (iTunesDB *old_ +@@ -700,7 +700,7 @@ iTunesDB *gp_import_itdb (iTunesDB *old_itdb, const gi Playlist *podcasts = itdb_playlist_podcasts (itdb); for (glm=duppl->members; glm; glm=glm->next) { @@ -91,7 +78,7 @@ $OpenBSD: patch-src_file_itunesdb_c,v 1.2 2007/03/17 21:55:40 ckuethe Exp $ itdb_playlist_add_track (podcasts, glm->data, -1); } itdb_playlist_free (duppl); -@@ -740,9 +740,9 @@ iTunesDB *gp_merge_itdb (iTunesDB *old_i +@@ -779,9 +779,9 @@ iTunesDB *gp_merge_itdb (iTunesDB *old_itdb) ExtraiTunesDBData *old_eitdb; iTunesDB *new_itdb; diff --git a/audio/gtkpod/patches/patch-src_info_c b/audio/gtkpod/patches/patch-src_info_c index a8f6fb89243..6e0449a45a1 100644 --- a/audio/gtkpod/patches/patch-src_info_c +++ b/audio/gtkpod/patches/patch-src_info_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-src_info_c,v 1.1 2006/10/15 22:44:35 ckuethe Exp $ ---- src/info.c.orig Tue Oct 3 12:05:13 2006 -+++ src/info.c Tue Oct 3 12:07:38 2006 -@@ -576,14 +576,17 @@ gboolean ipod_connected (void) +$OpenBSD: patch-src_info_c,v 1.2 2007/11/22 22:46:42 ckuethe Exp $ +--- src/info.c.orig Wed Jun 27 13:29:33 2007 ++++ src/info.c Sun Nov 18 11:21:32 2007 +@@ -579,14 +579,17 @@ gboolean ipod_connected (void) /* we'll use statvfs to determine free space on the iPod where available, df otherwise */ @@ -22,7 +22,7 @@ $OpenBSD: patch-src_info_c,v 1.1 2006/10/15 22:44:35 ckuethe Exp $ int status; g_mutex_lock (space_mutex); -@@ -595,13 +598,13 @@ static void th_space_update (void) +@@ -598,13 +601,13 @@ static void th_space_update (void) } if (mp) { diff --git a/audio/gtkpod/pkg/MESSAGE b/audio/gtkpod/pkg/MESSAGE new file mode 100644 index 00000000000..085bbceaaf8 --- /dev/null +++ b/audio/gtkpod/pkg/MESSAGE @@ -0,0 +1,21 @@ +Newer ipods attempt to tie the song database to the hardware with the device +serial number. This foolish behaviour has of course been defeated. In order +for libgpod to write an appropriately keyed database, you will need your ipod's +"firewire id." + +One way to get this number is using usbctl from the sysutils/usbutil port: + usbctl -f /dev/usb0 -a 2 | grep Serial +... assuming that your ipod is at address 2 on the first usb bus. + +The firewire id a 16 character long string like 00A1234567891231. For an iPod +Touch, this number will be much longer than 16 characters, the firewire ID is +constituted by the first 16 characters. + +Once you have that number, create/edit /mnt/iPod_Control/Device/SysInfo (if +your iPod is mounted at /mnt/), and add following line: +FirewireGuid: 0xffffffffffffffff +where ffffffffffffffff your ipod's id number. The "0x" prefix is required. + +Gtkpod should now be able to write a valid database to your ipod. + +(Based heavily on the libgpod "README.SysInfo" file) diff --git a/audio/gtkpod/pkg/PLIST b/audio/gtkpod/pkg/PLIST index 98fe388cb5d..36b0419bc30 100644 --- a/audio/gtkpod/pkg/PLIST +++ b/audio/gtkpod/pkg/PLIST @@ -1,25 +1,32 @@ -@comment $OpenBSD: PLIST,v 1.4 2006/03/18 07:08:21 sturm Exp $ +@comment $OpenBSD: PLIST,v 1.5 2007/11/22 22:46:42 ckuethe Exp $ bin/gtkpod +share/applications/ +share/applications/gtkpod.desktop share/gtkpod/ -share/gtkpod/gtkpod.glade -share/gtkpod/gtkpod.gladep -share/gtkpod/pixmaps/ -share/gtkpod/pixmaps/gtkpod-add-dirs.png -share/gtkpod/pixmaps/gtkpod-add-files.png -share/gtkpod/pixmaps/gtkpod-add-playlists.png -share/gtkpod/pixmaps/gtkpod-icon-32.png -share/gtkpod/pixmaps/gtkpod-icon-32x32-2.png -share/gtkpod/pixmaps/gtkpod-icon-32x32.png -share/gtkpod/pixmaps/gtkpod-icon-48.png -share/gtkpod/pixmaps/gtkpod-icon-48x48.png -share/gtkpod/pixmaps/gtkpod-icon-64x64.png -share/gtkpod/pixmaps/gtkpod-logo.png -share/gtkpod/pixmaps/gtkpod-new-playlist.png -share/gtkpod/pixmaps/gtkpod-read.png -share/gtkpod/pixmaps/gtkpod-sync.png -share/gtkpod/pixmaps/gtkpod.glade -share/gtkpod/pixmaps/gtkpod.gladep +share/gtkpod/data/ +share/gtkpod/data/cdshine.png +share/gtkpod/data/cdshine_main.png +share/gtkpod/data/default-cover.png +share/gtkpod/data/gtkpod-add-dirs.png +share/gtkpod/data/gtkpod-add-files.png +share/gtkpod/data/gtkpod-add-playlists.png +share/gtkpod/data/gtkpod-icon-32-2.png +share/gtkpod/data/gtkpod-icon-32.png +share/gtkpod/data/gtkpod-icon-48.png +share/gtkpod/data/gtkpod-logo.png +share/gtkpod/data/gtkpod-new-playlist.png +share/gtkpod/data/gtkpod-read.png +share/gtkpod/data/gtkpod-sync.png +share/gtkpod/data/gtkpod.glade share/gtkpod/scripts/ +share/gtkpod/scripts/convert-flac2m4a.sh +share/gtkpod/scripts/convert-flac2mp3.sh +share/gtkpod/scripts/convert-m4a2mp3.sh +share/gtkpod/scripts/convert-mp32m4a.sh +share/gtkpod/scripts/convert-ogg2m4a.sh +share/gtkpod/scripts/convert-ogg2mp3.sh +share/gtkpod/scripts/convert-wav2m4a.sh +share/gtkpod/scripts/convert-wav2mp3.sh share/gtkpod/scripts/ldif2vcf.sh share/gtkpod/scripts/mab2vcard share/gtkpod/scripts/sync-abook.sh @@ -31,9 +38,23 @@ share/gtkpod/scripts/sync-korganizer.sh share/gtkpod/scripts/sync-ldif.sh share/gtkpod/scripts/sync-notes.sh share/gtkpod/scripts/sync-palm-jppy.py +share/gtkpod/scripts/sync-thunderbird-nano.sh share/gtkpod/scripts/sync-thunderbird.sh +share/gtkpod/scripts/sync-tomboy.sh share/gtkpod/scripts/sync-webcalendar.sh +share/icons/ +share/icons/hicolor/ +share/icons/hicolor/32x32/ +share/icons/hicolor/32x32/apps/ +share/icons/hicolor/32x32/apps/gtkpod.png +share/icons/hicolor/48x48/ +share/icons/hicolor/48x48/apps/ +share/icons/hicolor/48x48/apps/gtkpod.png +share/icons/hicolor/64x64/ +share/icons/hicolor/64x64/apps/ +share/icons/hicolor/64x64/apps/gtkpod.png share/locale/de/LC_MESSAGES/gtkpod.mo +share/locale/es/LC_MESSAGES/gtkpod.mo share/locale/fr/LC_MESSAGES/gtkpod.mo share/locale/he/LC_MESSAGES/gtkpod.mo share/locale/it/LC_MESSAGES/gtkpod.mo