Date:2011-07-08 03:43:30 (7 years 8 months ago)
Author:Xiangfu Liu
Commit:9c1f6864258298a2d3d4e5125445b3cf171710cf
Message:new package: gjay, thanks Joshua Judson Rosen

Files: gjay/Makefile (1 diff)
gjay/patches/0001-Correctly-document-.-configure-disable-mpdclient.patch (1 diff)
gjay/patches/0002-Don-t-show-unsupported-players-as-options-in-the-pre.patch (1 diff)
gjay/patches/0003-Provide-a-.-configure-disable-audclient-option.patch (1 diff)
gjay/patches/0004-Don-t-build-against-or-require-dbus-glib-unless-buil.patch (1 diff)
gjay/patches/0007-Use-pkg-config-to-check-for-libraries-wherever-possi.patch (1 diff)
gjay/patches/0008-Check-for-pkg-config-and-other-key-programs-first.patch (1 diff)
gjay/patches/0009-Distribute-autogen.sh.patch (1 diff)
gjay/patches/0010-Use-the-Make-variables-defined-by-Autoconf-not-the-a.patch (1 diff)
gjay/patches/0011-Autoconf-2.62-appears-to-be-sufficient.patch (1 diff)
gjay/patches/0012-Don-t-show-the-Music-Player-.-combo-box-unless-multi.patch (1 diff)
gjay/patches/0013-Provide-a-.-configure-disable-latin1-option.patch (1 diff)
gjay/patches/0014-Use-file_depth-rather-than-file_iter_depth-in-explor.patch (1 diff)
gjay/patches/0015-Move-file_depth-to-util.c-and-make-it-public.patch (1 diff)
gjay/patches/0016-Set-gjay-tree_depth-based-on-the-contents-of-the-dat.patch (1 diff)
gjay/patches/0017-Initialise-locale-before-parsing-options.patch (1 diff)
gjay/patches/1000_autogen-sh.patch (1 diff)

Change Details

gjay/Makefile
1#
2# This is free software, licensed under the GNU General Public License v2.
3# See /LICENSE for more information.
4#
5
6include $(TOPDIR)/rules.mk
7
8PKG_NAME:=gjay
9PKG_VERSION:=0.3.2
10PKG_RELEASE:=1
11
12PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13PKG_SOURCE_URL:=@SF/gjay
14PKG_INSTALL:=1
15
16include $(INCLUDE_DIR)/package.mk
17include $(INCLUDE_DIR)/nls.mk
18
19TARGET_LDFLAGS+= \
20    -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
21
22CONFIGURE_ARGS += \
23    --disable-audclient \
24    --disable-mpdclient \
25    --disable-latin1
26
27CONFIGURE_CMD = ./autogen.sh
28
29define Package/gjay
30  SECTION:=sound
31  CATEGORY:=Sound
32  TITLE:=GJay
33  URL:=http://gjay.sourceforge.net/
34  DEPENDS:=+gtk2 +libgsl
35endef
36
37define Package/gjay/description
38GJay (Gtk+ DJ) generates playlists across a collection of music
39(ogg, mp3, wav) such that each song sounds good following
40the previous song. It is ideal for home users who want a non-random
41way to wander large collections or for DJs planning a set list.
42You can generate playlists from within the application, or run GJay
43as a standalone command-line utility.
44
45Playlist matches are based on:
46
47* Song characteristics that don't change:
48    - Frequency fingerprint
49    - Beats per minute
50    - Location in file system
51* Song attributes that you set:
52    - Rating
53    - Color (whatever that means to you)
54endef
55
56define Build/Configure
57    ( cd $(PKG_BUILD_DIR); chmod +x ./autogen.sh; );
58    $(call Build/Configure/Default)
59endef
60
61define Package/gjay/install
62    $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/share/gjay/icons
63    $(INSTALL_BIN) \
64        $(PKG_INSTALL_DIR)/usr/bin/gjay \
65        $(1)/usr/bin/
66    $(INSTALL_DATA) \
67        $(PKG_INSTALL_DIR)/usr/share/gjay/icons/* \
68        $(1)/usr/share/gjay/icons/
69endef
70
71$(eval $(call BuildPackage,gjay))
gjay/patches/0001-Correctly-document-.-configure-disable-mpdclient.patch
1From 1131c2eef458e553b483e61c8068f2de2865ad61 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Sun, 24 Apr 2011 22:34:10 -0400
4Subject: [PATCH 01/17] Correctly document "./configure --disable-mpdclient".
5
6---
7 configure.ac | 2 +-
8 1 files changed, 1 insertions(+), 1 deletions(-)
9
10diff --git a/configure.ac b/configure.ac
11index 67cbaf9..c5545e8 100644
12--- a/configure.ac
13@@ -10,7 +10,7 @@ AM_INIT_AUTOMAKE([1.10])
14 dnl Options
15 AC_SUBST([WITH_MPDCLIENT])
16 AC_ARG_ENABLE([mpdclient],
17- AS_HELP_STRING([--with-mpdclient], [Enable mpd client(default is YES)]),
18+ AS_HELP_STRING([--disable-mpdclient], [Disable mpd client (enabled by default)]),
19               [enable_mpdclient=$enableval],
20               [enable_mpdclient="yes"])
21 if test "$enable_mpdclient" = "yes"; then
22--
231.7.2.5
24
gjay/patches/0002-Don-t-show-unsupported-players-as-options-in-the-pre.patch
1From 773e924a54ca8f870cc471442c6b4d6c51bafcc0 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Tue, 26 Apr 2011 21:37:50 -0400
4Subject: [PATCH 02/17] Don't show unsupported players as options in the preferences GUI.
5
6---
7 prefs.c | 2 ++
8 1 files changed, 2 insertions(+), 0 deletions(-)
9
10diff --git a/prefs.c b/prefs.c
11index 844a61d..33a6016 100644
12--- a/prefs.c
13@@ -123,7 +123,9 @@ const char *music_player_names[] =
14 {
15   "None",
16   "Audacious",
17+#ifdef WITH_MPDCLIENT
18   "MPD",
19+#endif
20   NULL
21 };
22
23--
241.7.2.5
25
gjay/patches/0003-Provide-a-.-configure-disable-audclient-option.patch
1From 4d3796be444f7b42041d111e2c91b7ce6faff786 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Tue, 26 Apr 2011 22:35:23 -0400
4Subject: [PATCH 03/17] Provide a "./configure --disable-audclient" option
5 to build without support for Audacious.
6
7---
8 config.h.in | 3 +++
9 configure.ac | 10 +++++++++-
10 play_audacious.c | 4 ++--
11 play_common.c | 2 ++
12 prefs.c | 2 ++
13 5 files changed, 18 insertions(+), 3 deletions(-)
14
15diff --git a/config.h.in b/config.h.in
16index 9054b03..17decf1 100644
17--- a/config.h.in
18@@ -85,5 +85,8 @@
19 /* Version number of package */
20 #undef VERSION
21
22+/* Enable Audacious music player */
23+#undef WITH_AUDCLIENT
24+
25 /* Enable mpd music player */
26 #undef WITH_MPDCLIENT
27diff --git a/configure.ac b/configure.ac
28index c5545e8..bfe7ca4 100644
29--- a/configure.ac
30@@ -18,6 +18,15 @@ if test "$enable_mpdclient" = "yes"; then
31   PKG_CHECK_MODULES([MPDCLIENT], [libmpdclient])
32 fi
33
34+AC_SUBST([WITH_AUDCLIENT])
35+AC_ARG_ENABLE([audclient],
36+ AS_HELP_STRING([--disable-audclient], [Disable Audacious client (enabled by default)]),
37+ [enable_audclient=$enableval],
38+ [enable_audclient="yes"])
39+if test "$enable_audclient" = "yes"; then
40+ AC_DEFINE([WITH_AUDCLIENT], [1], [Enable Audacious music player])
41+ PKG_CHECK_MODULES([AUDACIOUS], [audacious])
42+fi
43
44 # Checks for programs.
45 AC_PROG_CC
46@@ -31,7 +40,6 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
47 # Checks for libraries.
48 AM_PATH_GTK_2_0
49 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
50-PKG_CHECK_MODULES([AUDACIOUS], [audacious])
51
52 AX_PATH_GSL
53 dnl AC_CHECK_LIB([audclient], [audacious_remote_playlist])
54diff --git a/play_audacious.c b/play_audacious.c
55index 4ca8cee..93e5f52 100644
56--- a/play_audacious.c
57@@ -22,6 +22,7 @@
58 #include "config.h"
59 #endif /* HAVE_CONFIG_H */
60
61+#ifdef WITH_AUDCLIENT
62
63 #include <stdio.h>
64 #include <sys/types.h>
65@@ -171,5 +172,4 @@ audacious_connect(void)
66
67 }
68
69-
70-
71+#endif /* WITH_AUDCLIENT */
72diff --git a/play_common.c b/play_common.c
73index f0968b5..9034dbc 100644
74--- a/play_common.c
75@@ -40,9 +40,11 @@ player_init(void)
76     case PLAYER_NONE:
77       /* break out, configured later */
78       break;
79+#ifdef WITH_AUDCLIENT
80     case PLAYER_AUDACIOUS:
81       player_configured = audacious_init();
82       break;
83+#endif /* WITH_AUDCLIENT */
84     /*case PLAYER_EXAILE:
85       exaile_init();
86       break;*/
87diff --git a/prefs.c b/prefs.c
88index 33a6016..3232d32 100644
89--- a/prefs.c
90@@ -122,7 +122,9 @@ char * pref_element_strs[PE_LAST] = {
91 const char *music_player_names[] =
92 {
93   "None",
94+#ifdef WITH_AUDCLIENT
95   "Audacious",
96+#endif
97 #ifdef WITH_MPDCLIENT
98   "MPD",
99 #endif
100--
1011.7.2.5
102
gjay/patches/0004-Don-t-build-against-or-require-dbus-glib-unless-buil.patch
1From e812bd02096d2cd4ee8a61210d6363da227a48fa Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Tue, 26 Apr 2011 22:35:44 -0400
4Subject: [PATCH 04/17] Don't build against (or require) dbus-glib unless building something that needs it.
5
6---
7 config.h.in | 3 +++
8 configure.ac | 11 ++++++++++-
9 dbus.c | 7 +++++++
10 gjay.c | 8 ++++++++
11 gjay.h | 7 +++++++
12 5 files changed, 35 insertions(+), 1 deletions(-)
13
14diff --git a/config.h.in b/config.h.in
15index 17decf1..8833d6c 100644
16--- a/config.h.in
17@@ -88,5 +88,8 @@
18 /* Enable Audacious music player */
19 #undef WITH_AUDCLIENT
20
21+/* Build with dbus-glib */
22+#undef WITH_DBUSGLIB
23+
24 /* Enable mpd music player */
25 #undef WITH_MPDCLIENT
26diff --git a/configure.ac b/configure.ac
27index bfe7ca4..62273bd 100644
28--- a/configure.ac
29@@ -8,12 +8,16 @@ AC_CONFIG_HEADERS([config.h])
30 AM_INIT_AUTOMAKE([1.10])
31
32 dnl Options
33+# Don't require D-Bus unless building a component that needs it:
34+enable_dbus=no
35+
36 AC_SUBST([WITH_MPDCLIENT])
37 AC_ARG_ENABLE([mpdclient],
38               AS_HELP_STRING([--disable-mpdclient], [Disable mpd client (enabled by default)]),
39               [enable_mpdclient=$enableval],
40               [enable_mpdclient="yes"])
41 if test "$enable_mpdclient" = "yes"; then
42+ enable_dbus=yes
43   AC_DEFINE([WITH_MPDCLIENT], [1], [Enable mpd music player])
44   PKG_CHECK_MODULES([MPDCLIENT], [libmpdclient])
45 fi
46@@ -24,6 +28,7 @@ AC_ARG_ENABLE([audclient],
47               [enable_audclient=$enableval],
48               [enable_audclient="yes"])
49 if test "$enable_audclient" = "yes"; then
50+ enable_dbus=yes
51   AC_DEFINE([WITH_AUDCLIENT], [1], [Enable Audacious music player])
52   PKG_CHECK_MODULES([AUDACIOUS], [audacious])
53 fi
54@@ -39,7 +44,11 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
55
56 # Checks for libraries.
57 AM_PATH_GTK_2_0
58-PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
59+
60+if test "$enable_dbus" = "yes"; then
61+ AC_DEFINE([WITH_DBUSGLIB], [1], [Build with dbus-glib])
62+ PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
63+fi
64
65 AX_PATH_GSL
66 dnl AC_CHECK_LIB([audclient], [audacious_remote_playlist])
67diff --git a/dbus.c b/dbus.c
68index 48a6453..81258ad 100644
69--- a/dbus.c
70@@ -17,6 +17,12 @@
71  * with this program; if not, see <http://www.gnu.org/licenses/>.
72  */
73
74+#ifdef HAVE_CONFIG_H
75+#include "config.h"
76+#endif
77+
78+#ifdef WITH_DBUSGLIB
79+
80 #include <dbus/dbus-glib.h>
81 #include "gjay.h"
82 #include "dbus.h"
83@@ -62,3 +68,4 @@ gjay_dbus_is_running(const char *appname)
84   return running;
85 }
86
87+#endif /* WITH_DBUSGLIB */
88diff --git a/gjay.c b/gjay.c
89index 547b72c..205065e 100644
90--- a/gjay.c
91@@ -45,7 +45,11 @@
92 #include <string.h>
93 #include <ctype.h>
94 #include "gjay.h"
95+
96+#ifdef WITH_DBUSGLIB
97 #include "dbus.h"
98+#endif /* WITH_DBUSGLIB */
99+
100 #include "analysis.h"
101 #include "ipc.h"
102 #include "playlist.h"
103@@ -468,7 +472,11 @@ static void run_as_ui(int argc, char *argv[] )
104   player_init();
105     make_app_ui();
106     gtk_widget_show_all(gjay->main_window);
107+
108+#ifdef WITH_DBUSGLIB
109     gjay->connection = gjay_dbus_connection();
110+#endif /* WITH_DBUSGLIB */
111+
112     gjay->message_window = make_message_window();
113     g_log_set_handler(NULL,
114         G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
115diff --git a/gjay.h b/gjay.h
116index 78f5180..89a0881 100644
117--- a/gjay.h
118@@ -32,7 +32,10 @@
119 #include <assert.h>
120 #include <limits.h>
121 #include <math.h>
122+
123+#ifdef WITH_DBUSGLIB
124 #include <dbus/dbus-glib.h>
125+#endif /* WITH_DBUSGLIB */
126
127 typedef struct _GjayApp GjayApp;
128 extern GjayApp *gjay;
129@@ -77,8 +80,12 @@ gchar * parent_dir ( const char * path );
130 struct _GjayApp {
131   GjayPrefs *prefs;
132   /* Player connections/handles */
133+
134+#ifdef WITH_DBUSGLIB
135   DBusGConnection *connection;
136   DBusGProxy *player_proxy;
137+#endif /* WITH_DBUSGLIB */
138+
139 #ifdef WITH_MPDCLIENT
140   struct mpd_connection *mpdclient_connection;
141 #endif /* WITH_MPDCLIENT */
142--
1431.7.2.5
144
gjay/patches/0007-Use-pkg-config-to-check-for-libraries-wherever-possi.patch
1From bf07d7e3771166d0913e005b6835f534a302741e Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Tue, 26 Apr 2011 23:15:35 -0400
4Subject: [PATCH 07/17] Use pkg-config to check for libraries wherever possible.
5 Some embedded environments ship pkg-config files but not the `*-config' scripts, so this should be more portable.
6
7---
8 configure.ac | 5 +++--
9 1 files changed, 3 insertions(+), 2 deletions(-)
10
11diff --git a/configure.ac b/configure.ac
12index 62273bd..ad72ece 100644
13--- a/configure.ac
14@@ -43,14 +43,15 @@ AM_GNU_GETTEXT([external])
15 AM_GNU_GETTEXT_VERSION([0.18.1])
16
17 # Checks for libraries.
18-AM_PATH_GTK_2_0
19+PKG_CHECK_MODULES([GTK], [gtk+-2.0])
20
21 if test "$enable_dbus" = "yes"; then
22   AC_DEFINE([WITH_DBUSGLIB], [1], [Build with dbus-glib])
23   PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
24 fi
25
26-AX_PATH_GSL
27+PKG_CHECK_MODULES([GSL], [gsl])
28+
29 dnl AC_CHECK_LIB([audclient], [audacious_remote_playlist])
30 AC_CHECK_LIB([dl], [dlopen])
31
32--
331.7.2.5
34
gjay/patches/0008-Check-for-pkg-config-and-other-key-programs-first.patch
1From 48f75a95a05d778509381783da1b44d1049c65e1 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Wed, 27 Apr 2011 00:23:29 -0400
4Subject: [PATCH 08/17] Check for pkg-config and other key programs first.
5 Otherwise, checks that *use* them may fail mysteriously.
6
7---
8 configure.ac | 10 +++++-----
9 1 files changed, 5 insertions(+), 5 deletions(-)
10
11diff --git a/configure.ac b/configure.ac
12index ad72ece..cd90750 100644
13--- a/configure.ac
14@@ -7,6 +7,11 @@ AC_CONFIG_SRCDIR([gjay.h])
15 AC_CONFIG_HEADERS([config.h])
16 AM_INIT_AUTOMAKE([1.10])
17
18+# Checks for programs.
19+AC_PROG_CC
20+AC_PROG_INSTALL
21+PKG_PROG_PKG_CONFIG
22+
23 dnl Options
24 # Don't require D-Bus unless building a component that needs it:
25 enable_dbus=no
26@@ -33,11 +38,6 @@ if test "$enable_audclient" = "yes"; then
27   PKG_CHECK_MODULES([AUDACIOUS], [audacious])
28 fi
29
30-# Checks for programs.
31-AC_PROG_CC
32-AC_PROG_INSTALL
33-PKG_PROG_PKG_CONFIG
34-
35 dnl Check for language stuff
36 AM_GNU_GETTEXT([external])
37 AM_GNU_GETTEXT_VERSION([0.18.1])
38--
391.7.2.5
40
gjay/patches/0009-Distribute-autogen.sh.patch
1From a52792ae17ad9dfa392a4fe2588c3c526b0b06d5 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Wed, 27 Apr 2011 00:25:37 -0400
4Subject: [PATCH 09/17] Distribute autogen.sh
5 in case someone needs to patch configure.ac, etc. before building.
6
7---
8 Makefile.am | 2 +-
9 1 files changed, 1 insertions(+), 1 deletions(-)
10
11diff --git a/Makefile.am b/Makefile.am
12index 43660a9..9b1a5f4 100644
13--- a/Makefile.am
14@@ -23,4 +23,4 @@ gjay_SOURCES = gjay.h songs.h prefs.h ui.h rgbhsv.h analysis.h playlist.h \
15
16 ACLOCAL_AMFLAGS = -I m4
17
18-EXTRA_DIST = config.rpath m4/ChangeLog
19+EXTRA_DIST = config.rpath m4/ChangeLog autogen.sh
20--
211.7.2.5
22
gjay/patches/0010-Use-the-Make-variables-defined-by-Autoconf-not-the-a.patch
1From 5d548f4c49466df8928a108a4e864fd9372139b2 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Wed, 27 Apr 2011 00:26:04 -0400
4Subject: [PATCH 10/17] Use the *Make* variables defined by Autoconf, not the autoconf variables themselves.
5
6---
7 Makefile.am | 4 ++--
8 1 files changed, 2 insertions(+), 2 deletions(-)
9
10diff --git a/Makefile.am b/Makefile.am
11index 9b1a5f4..0d22faf 100644
12--- a/Makefile.am
13@@ -3,8 +3,8 @@ SUBDIRS = po doc icons
14
15 bin_PROGRAMS = gjay
16
17-gjay_LDADD = @GTK_LIBS@ @DBUS_GLIB_LIBS@ @GSL_LIBS@
18-AM_CFLAGS = -Wall @GTK_CFLAGS@ @DBUS_GLIB_CFLAGS@ @GSL_CFLAGS@
19+gjay_LDADD = $(GTK_LIBS) $(DBUS_GLIB_LIBS) $(GSL_LIBS)
20+AM_CFLAGS = -Wall $(GTK_CFLAGS) $(DBUS_GLIB_CFLAGS) $(GSL_CFLAGS)
21
22 gjay_SOURCES = gjay.h songs.h prefs.h ui.h rgbhsv.h analysis.h playlist.h \
23                              ipc.h constants.h vorbis.h mp3.h flac.h i18n.h \
24--
251.7.2.5
26
gjay/patches/0011-Autoconf-2.62-appears-to-be-sufficient.patch
1From 550cb1bd232a1611daa90ab83f1440fb02df5f77 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Wed, 27 Apr 2011 00:26:44 -0400
4Subject: [PATCH 11/17] Autoconf 2.62 appears to be sufficient.
5 It's also what OpenWRT is shipping right now--and what Qi Hardware is using for their Ben NanoNote environment.
6
7---
8 configure.ac | 2 +-
9 1 files changed, 1 insertions(+), 1 deletions(-)
10
11diff --git a/configure.ac b/configure.ac
12index cd90750..462350f 100644
13--- a/configure.ac
14@@ -1,7 +1,7 @@
15 # -*- Autoconf -*-
16 # Process this file with autoconf to produce a configure script.
17
18-AC_PREREQ([2.67])
19+AC_PREREQ([2.62])
20 AC_INIT([gjay],[0.3.2],[csmall@enc.com.au])
21 AC_CONFIG_SRCDIR([gjay.h])
22 AC_CONFIG_HEADERS([config.h])
23--
241.7.2.5
25
gjay/patches/0012-Don-t-show-the-Music-Player-.-combo-box-unless-multi.patch
1From c52d500e6834815d4425b376f66895eb9e517896 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Wed, 27 Apr 2011 00:32:27 -0400
4Subject: [PATCH 12/17] Don't show the `Music Player: ...' combo-box unless multiple choices are actually available.
5
6---
7 ui_prefs_view.c | 72 +++++++++++++++++++++++++++++++++++--------------------
8 1 files changed, 46 insertions(+), 26 deletions(-)
9
10diff --git a/ui_prefs_view.c b/ui_prefs_view.c
11index e65981c..90e025d 100644
12--- a/ui_prefs_view.c
13@@ -73,6 +73,7 @@ GtkWidget * make_prefs_window ( void )
14   GtkWidget * hseparator, * hbox1, *max_working_set_entry, *table;
15   char buffer[BUFFER_SIZE];
16   int i;
17+ int table_row = 0;
18
19   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
20   gtk_window_set_title(GTK_WINDOW(window), _("GJay Preferences"));
21@@ -88,31 +89,44 @@ GtkWidget * make_prefs_window ( void )
22     gtk_label_set_markup(GTK_LABEL(label),_("<b>General</b>"));
23     gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0);
24
25- table = gtk_table_new(3,2,TRUE);
26- gtk_box_pack_start(GTK_BOX(vbox1), table, TRUE, TRUE, 2);
27+ table = gtk_table_new(2, 2, TRUE);
28+ gtk_box_pack_start(GTK_BOX(vbox1), table, TRUE, TRUE, 2);
29+
30+ if (music_player_names[1] != NULL) {
31+ /* There's always, at least, the "None" player.
32+ If there are also other plays beyond that,
33+ present the user with a menu.
34+ */
35+
36+ /* Make room in the table for this row: */
37+ gtk_table_resize(table, 3, 2);
38+
39+ /* Player selection combo box */
40+ label = gtk_label_new(_("Music Player:"));
41+
42+ player_cbox = gtk_combo_box_new_text();
43+ i=0;
44+ while (music_player_names[i] != NULL)
45+ {
46+ gtk_combo_box_append_text(GTK_COMBO_BOX(player_cbox), music_player_names[i]);
47+ i++;
48+ }
49+ gtk_combo_box_set_active(GTK_COMBO_BOX(player_cbox), gjay->prefs->music_player);
50
51- /* Player selection combo box */
52- label = gtk_label_new(_("Music Player:"));
53+ alignment = gtk_alignment_new(0, 0, 0, 0);
54+ gtk_container_add(GTK_CONTAINER(alignment), label);
55+ gtk_table_attach(GTK_TABLE(table), alignment,
56+ 0, 1, table_row, table_row+1,
57+ (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
58+ table_row++;
59+ alignment = gtk_alignment_new(0, 0, 0, 0);
60
61- player_cbox = gtk_combo_box_new_text();
62- i=0;
63- while (music_player_names[i] != NULL)
64- {
65- gtk_combo_box_append_text(GTK_COMBO_BOX(player_cbox), music_player_names[i]);
66- i++;
67+ gtk_container_add(GTK_CONTAINER(alignment), player_cbox);
68+ gtk_table_attach(GTK_TABLE(table), alignment, 1, 2, 0, 1,
69+ (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
70+ g_signal_connect (G_OBJECT (player_cbox), "changed",
71+ G_CALLBACK (player_combo_box_changed), NULL);
72   }
73- gtk_combo_box_set_active(GTK_COMBO_BOX(player_cbox), gjay->prefs->music_player);
74-
75- alignment = gtk_alignment_new(0, 0, 0, 0);
76- gtk_container_add(GTK_CONTAINER(alignment), label);
77- gtk_table_attach(GTK_TABLE(table), alignment, 0, 1, 0, 1,
78- (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
79- alignment = gtk_alignment_new(0, 0, 0, 0);
80- gtk_container_add(GTK_CONTAINER(alignment), player_cbox);
81- gtk_table_attach(GTK_TABLE(table), alignment, 1, 2, 0, 1,
82- (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
83- g_signal_connect (G_OBJECT (player_cbox), "changed",
84- G_CALLBACK (player_combo_box_changed), NULL);
85
86     /* Song Ratings checkbox */
87     label = gtk_label_new(_("Use song ratings"));
88@@ -125,12 +139,15 @@ GtkWidget * make_prefs_window ( void )
89
90     alignment = gtk_alignment_new(0, 0, 0, 0);
91     gtk_container_add(GTK_CONTAINER(alignment), label);
92- gtk_table_attach(GTK_TABLE(table), alignment, 0, 1, 1, 2,
93+ gtk_table_attach(GTK_TABLE(table), alignment,
94+ 0, 1, table_row, table_row+1,
95         (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
96     alignment = gtk_alignment_new(0, 0, 0, 0);
97     gtk_container_add(GTK_CONTAINER(alignment), button);
98- gtk_table_attach(GTK_TABLE(table), alignment, 1, 2, 1, 2,
99+ gtk_table_attach(GTK_TABLE(table), alignment,
100+ 1, 2, table_row, table_row+1,
101         (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
102+ table_row++;
103
104     /* Maximum working set box */
105     label = gtk_label_new(_("Max working set"));
106@@ -147,12 +164,15 @@ GtkWidget * make_prefs_window ( void )
107
108     alignment = gtk_alignment_new(0, 0, 0, 0);
109     gtk_container_add(GTK_CONTAINER(alignment), label);
110- gtk_table_attach(GTK_TABLE(table), alignment, 0, 1, 2, 3,
111+ gtk_table_attach(GTK_TABLE(table), alignment,
112+ 0, 1, table_row, table_row+1,
113         (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
114     alignment = gtk_alignment_new(0, 0, 0, 0);
115     gtk_container_add(GTK_CONTAINER(alignment), max_working_set_entry);
116- gtk_table_attach(GTK_TABLE(table), alignment, 1, 2, 2, 3,
117+ gtk_table_attach(GTK_TABLE(table), alignment,
118+ 1, 2, table_row, table_row+1,
119         (GTK_EXPAND|GTK_FILL),(GTK_EXPAND|GTK_FILL),6,0);
120+ table_row++;
121
122     hseparator = gtk_hseparator_new();
123     gtk_box_pack_start(GTK_BOX(vbox1), hseparator, TRUE, TRUE, 2);
124--
1251.7.2.5
126
gjay/patches/0013-Provide-a-.-configure-disable-latin1-option.patch
1From 3f16ee03c97f63e4f00142a356fd4f968a490c62 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Wed, 27 Apr 2011 00:46:39 -0400
4Subject: [PATCH 13/17] Provide a "./configure --disable-latin1" option
5 for environments where UTF-8 is native and Latin-1 doesn't exist.
6
7---
8 config.h.in | 3 +++
9 configure.ac | 9 +++++++++
10 util.c | 2 ++
11 util.h | 7 +++++++
12 4 files changed, 21 insertions(+), 0 deletions(-)
13
14diff --git a/config.h.in b/config.h.in
15index 8833d6c..143620f 100644
16--- a/config.h.in
17@@ -1,5 +1,8 @@
18 /* config.h.in. Generated from configure.ac by autoheader. */
19
20+/* Assume tag-strings are encoded in Latin-1 */
21+#undef ASSUME_LATIN1
22+
23 /* Define to 1 if translation of program messages to the user's native
24    language is requested. */
25 #undef ENABLE_NLS
26diff --git a/configure.ac b/configure.ac
27index 462350f..68155ec 100644
28--- a/configure.ac
29@@ -38,6 +38,15 @@ if test "$enable_audclient" = "yes"; then
30   PKG_CHECK_MODULES([AUDACIOUS], [audacious])
31 fi
32
33+AC_ARG_ENABLE([latin1],
34+ AS_HELP_STRING([--disable-latin1],
35+ [Disable handling of tags encoded in Latin-1, and assume tags are UTF-8 encoded.]),
36+ [assume_latin1=$enableval],
37+ [assume_latin1="yes"])
38+if test "$assume_latin1" = "yes"; then
39+ AC_DEFINE([ASSUME_LATIN1], [1], [Assume tag-strings are encoded in Latin-1])
40+fi
41+
42 dnl Check for language stuff
43 AM_GNU_GETTEXT([external])
44 AM_GNU_GETTEXT_VERSION([0.18.1])
45diff --git a/util.c b/util.c
46index d5d7160..6b57e5b 100644
47--- a/util.c
48@@ -50,6 +50,7 @@ gjay_dlsym(void *handle, const char const *func_name)
49 /**
50  * Duplicate a string from one encoding to another
51  */
52+#ifdef ASSUME_LATIN1
53 gchar * strdup_convert ( const gchar * str,
54                          const gchar * enc_to,
55                          const gchar * enc_from ) {
56@@ -68,6 +69,7 @@ gchar * strdup_convert ( const gchar * str,
57     }
58     return conv;
59 }
60+#endif /* ASSUME_LATIN1 */
61
62 /**
63  * Implement strtof, except make it locale agnostic w/r/t whether a
64diff --git a/util.h b/util.h
65index f422275..24c2170 100644
66--- a/util.h
67@@ -21,11 +21,18 @@
68 #include <glib.h>
69
70 void * gjay_dlsym(void *handle, const char const *func_name);
71+
72 #define strdup_to_utf8(str) (strdup_convert(str, "UTF8", "LATIN1"))
73 #define strdup_to_latin1(str) (strdup_convert(str, "LATIN1", "UTF8"))
74+
75+#ifdef ASSUME_LATIN1
76 gchar * strdup_convert ( const gchar * str,
77                                 const gchar * enc_to,
78                                 const gchar * enc_from );
79+#else
80+#define strdup_convert(str, enc_to, enc_from) (g_strdup(str))
81+#endif /* ASSUME_LATIN1 */
82+
83 float strtof_gjay ( const char * nptr,
84                                 char ** endptr);
85
86--
871.7.2.5
88
gjay/patches/0014-Use-file_depth-rather-than-file_iter_depth-in-explor.patch
1From 5edd4a7b95c5be05ffe72ae6452e94ffa14bc5e5 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Thu, 12 May 2011 22:18:15 -0400
4Subject: [PATCH 14/17] Use file_depth() rather than file_iter_depth() in explore_files_depth_distance().
5 The numbers end up the same here, but file_depth() is usable even when running without the GUI (e.g.: "gjay --playlist").
6
7---
8 ui_explore_view.c | 6 +++---
9 1 files changed, 3 insertions(+), 3 deletions(-)
10
11diff --git a/ui_explore_view.c b/ui_explore_view.c
12index 413675d..d99eab2 100644
13--- a/ui_explore_view.c
14@@ -658,9 +658,9 @@ gint explore_files_depth_distance ( char * file1,
15         k--;
16     /* Replace slash with null termination */
17     buffer[k] = '\0';
18- f1 = file_iter_depth(file1);
19- f2 = file_iter_depth(file2);
20- shared = file_iter_depth(buffer) + 1;
21+ f1 = file_depth(file1);
22+ f2 = file_depth(file2);
23+ shared = file_depth(buffer) + 1;
24
25     if (f1 && f2 && shared)
26         return ((f1 - shared) + (f2 - shared));
27--
281.7.2.5
29
gjay/patches/0015-Move-file_depth-to-util.c-and-make-it-public.patch
1From 925908b925a9008a3da36d222874d2b66c9fe6f7 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Fri, 13 May 2011 21:32:04 -0400
4Subject: [PATCH 15/17] Move file_depth() to util.c and make it public.
5 It's useful beyond the scope of ui_explore_view....
6
7---
8 ui_explore_view.c | 17 ++---------------
9 util.c | 13 +++++++++++++
10 util.h | 2 ++
11 3 files changed, 17 insertions(+), 15 deletions(-)
12
13diff --git a/ui_explore_view.c b/ui_explore_view.c
14index d99eab2..38f6c62 100644
15--- a/ui_explore_view.c
16@@ -29,6 +29,7 @@
17 #include "gjay.h"
18 #include "ui.h"
19 #include "ipc.h"
20+#include "util.h"
21
22
23 enum
24@@ -80,7 +81,7 @@ static int get_iter_path ( GtkTreeModel *tree_model,
25                                 char * buffer,
26                                 gboolean is_start );
27 static int file_iter_depth ( char * file );
28-static int file_depth ( char * file );
29+
30 static gint explore_animate ( gpointer data );
31 static void explore_mark_new_dirs ( char * dir );
32 static gint iter_sort_strcmp ( GtkTreeModel *model,
33@@ -628,20 +629,6 @@ static int file_iter_depth ( char * file ) {
34     return depth;
35 }
36
37-/* Get the depth by counting the number of non-terminal '/' in the path */
38-static int file_depth ( char * file ) {
39- int len, kk, depth;
40-
41- len = strlen(file);
42- if (len)
43- len--; // Avoid ending '/'
44- for (kk = 0, depth = 0; kk < len; kk++) {
45- if (file[kk] == '/')
46- depth++;
47- }
48- return depth;
49-}
50-
51
52
53 /* How many directory steps separate files 1 and 2? */
54diff --git a/util.c b/util.c
55index 6b57e5b..00db2d8 100644
56--- a/util.c
57@@ -96,3 +96,16 @@ float strtof_gjay ( const char *nptr, char **endptr) {
58     return result;
59 }
60
61+/* Get the depth by counting the number of non-terminal '/' in the path */
62+int file_depth ( char * file ) {
63+ int len, kk, depth;
64+
65+ len = strlen(file);
66+ if (len)
67+ len--; // Avoid ending '/'
68+ for (kk = 0, depth = 0; kk < len; kk++) {
69+ if (file[kk] == '/')
70+ depth++;
71+ }
72+ return depth;
73+}
74diff --git a/util.h b/util.h
75index 24c2170..b9fc7fd 100644
76--- a/util.h
77@@ -36,4 +36,6 @@ gchar * strdup_convert ( const gchar * str,
78 float strtof_gjay ( const char * nptr,
79                                 char ** endptr);
80
81+int file_depth ( char * file );
82+
83 #endif /* UTIL_H */
84--
851.7.2.5
86
gjay/patches/0016-Set-gjay-tree_depth-based-on-the-contents-of-the-dat.patch
1From b6a3fef3df001aecb3ae8627de52bd0979bc42d8 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Fri, 13 May 2011 21:32:29 -0400
4Subject: [PATCH 16/17] Set gjay->tree_depth based on the contents of the database during load
5 so that it's available even when running without the GUI.
6
7---
8 songs.c | 8 ++++++++
9 1 files changed, 8 insertions(+), 0 deletions(-)
10
11diff --git a/songs.c b/songs.c
12index ea95d36..2fe010e 100644
13--- a/songs.c
14@@ -37,6 +37,7 @@
15 #include "flac.h"
16 #include "ui.h"
17 #include "i18n.h"
18+#include "util.h"
19
20
21 typedef enum {
22@@ -646,6 +647,13 @@ void data_start_element (GMarkupParseContext *context,
23             switch(get_element((char *) attribute_names[k])) {
24             case E_PATH:
25                 path = (gchar *) attribute_values[k];
26+ {
27+ int depth = file_depth(path) - 1
28+ - file_depth(gjay->prefs->song_root_dir);
29+ if (depth > gjay->tree_depth) {
30+ gjay->tree_depth = depth;
31+ }
32+ }
33                 break;
34             case E_REPEATS:
35                 repeat_path = (gchar *) attribute_values[k];
36--
371.7.2.5
38
gjay/patches/0017-Initialise-locale-before-parsing-options.patch
1From 0a8f8397c09538b7e583f07960046913f6461579 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Fri, 13 May 2011 21:34:34 -0400
4Subject: [PATCH 17/17] Initialise locale before parsing options
5  to enable, for example, handling of localised filenames passed to the "--file" and "--analyze-standalone" options.
6
7---
8 gjay.c | 1 +
9 1 files changed, 1 insertions(+), 0 deletions(-)
10
11diff --git a/gjay.c b/gjay.c
12index 205065e..ea1dc84 100644
13--- a/gjay.c
14@@ -130,6 +130,7 @@ parse_commandline(int *argc_p, char ***argv_p, guint *playlist_minutes, gboolean
15 /* if (gtk_init_check(&argc, &argv))
16   g_option_context_add_group (context, gtk_get_option_group (TRUE));*/
17   error = NULL;
18+ gtk_set_locale();
19   if (!g_option_context_parse (context, argc_p, argv_p, &error))
20   {
21     g_print (_("option parsing failed: %s\n"), error->message);
22--
231.7.2.5
24
gjay/patches/1000_autogen-sh.patch
1--- /dev/null 2011-04-12 08:45:25.703768888 -0400
2@@ -0,0 +1,73 @@
3+#!/bin/sh
4+# Run this to generate all the initial makefiles, etc.
5+# This was lifted from the Gimp, and adapted slightly by
6+# Raph Levien .
7+
8+DIE=0
9+
10+PROJECT=gjay
11+
12+# Make it possible to specify path in the environment
13+: ${AUTOCONF=autoconf}
14+: ${AUTOHEADER=autoheader}
15+: ${AUTOMAKE=automake}
16+: ${ACLOCAL=aclocal}
17+: ${AUTOPOINT=autopoint}
18+
19+($AUTOPOINT --version) < /dev/null > /dev/null 2>&1 || {
20+ echo
21+ echo "You must have gettext installed to compile $PROJECT."
22+ echo "Get ftp://ftp.gnu.org/pub/gnu/gettext-0.14.1.tar.gz"
23+ echo "(or a newer version if it is available)"
24+ DIE=1
25+}
26+
27+($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
28+ echo
29+ echo "You must have autoconf installed to compile $PROJECT."
30+ echo "Download the appropriate package for your distribution,"
31+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
32+ DIE=1
33+}
34+
35+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
36+ echo
37+ echo "You must have automake installed to compile $PROJECT."
38+ echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.6.tar.gz"
39+ echo "(or a newer version if it is available)"
40+ DIE=1
41+}
42+
43+if test "$DIE" -eq 1; then
44+ exit 1
45+fi
46+
47+if test -z "$*"; then
48+ echo "I am going to run ./configure with no arguments - if you wish "
49+ echo "to pass any to it, please specify them on the $0 command line."
50+fi
51+
52+case $CC in
53+*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
54+esac
55+
56+for dir in .
57+do
58+ echo processing $dir
59+ cd $dir
60+ configdir="config"
61+ test -d $configdir || mkdir $configdir
62+ aclocalinclude="$ACLOCAL_FLAGS"
63+ $AUTOPOINT
64+ $ACLOCAL $aclocalinclude -I $configdir
65+ $AUTOHEADER -Wall
66+ $AUTOMAKE -Wall --add-missing --gnu $am_opt
67+ $AUTOCONF -Wall
68+ cd -
69+done
70+
71+./configure "$@"
72+
73+echo
74+echo "Now type 'make' to compile $PROJECT."
75+

Archive Download the corresponding diff file



interactive