diff options
-rw-r--r-- | audio/mp3splt-gtk/default_player-r1509.diff | 81 | ||||
-rw-r--r-- | audio/mp3splt-gtk/default_player.diff | 44 | ||||
-rw-r--r-- | audio/mp3splt-gtk/mp3splt-gtk.SlackBuild | 11 |
3 files changed, 90 insertions, 46 deletions
diff --git a/audio/mp3splt-gtk/default_player-r1509.diff b/audio/mp3splt-gtk/default_player-r1509.diff new file mode 100644 index 0000000000..fcbc297551 --- /dev/null +++ b/audio/mp3splt-gtk/default_player-r1509.diff @@ -0,0 +1,81 @@ +Index: mp3splt-gtk/src/ui_manager.c +=================================================================== +--- mp3splt-gtk/src/ui_manager.c (revision 1508) ++++ mp3splt-gtk/src/ui_manager.c (revision 1509) +@@ -255,7 +255,7 @@ + infos->filtered_points_presence = NULL; + infos->silence_wave_number_of_points_threshold = DEFAULT_SILENCE_WAVE_NUMBER_OF_POINTS_THRESHOLD; + +- infos->selected_player = PLAYER_GSTREAMER; ++ infos->selected_player = DEFAULT_PLAYER; + + infos->douglas_peucker_thresholds_defaults[0] = 2.0; + infos->douglas_peucker_thresholds_defaults[1] = 5.0; +Index: mp3splt-gtk/src/player_control.h +=================================================================== +--- mp3splt-gtk/src/player_control.h (revision 1508) ++++ mp3splt-gtk/src/player_control.h (revision 1509) +@@ -50,6 +50,16 @@ + #define PLAYER_SNACKAMP 2 + #define PLAYER_GSTREAMER 3 + ++#ifdef NO_GSTREAMER ++ #ifdef NO_AUDACIOUS ++ #define DEFAULT_PLAYER PLAYER_SNACKAMP ++ #else ++ #define DEFAULT_PLAYER PLAYER_AUDACIOUS ++ #endif ++#else ++ #define DEFAULT_PLAYER PLAYER_GSTREAMER ++#endif ++ + gint player_get_elapsed_time(ui_state *ui); + gint player_get_total_time(ui_state *ui); + gint player_is_running(ui_state *ui); +Index: mp3splt-gtk/src/preferences_manager.c +=================================================================== +--- mp3splt-gtk/src/preferences_manager.c (revision 1508) ++++ mp3splt-gtk/src/preferences_manager.c (revision 1509) +@@ -770,29 +770,28 @@ + //default player + if (!g_key_file_has_key(my_key_file, "player", "default_player",NULL)) + { +- g_key_file_set_integer(my_key_file, "player", "default_player", +- PLAYER_GSTREAMER); ++ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER); + g_key_file_set_comment (my_key_file, "player", "default_player", +- "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER", +- NULL); ++ "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER", NULL); + } + else + { + //check if we support selected player +- gint the_player = +- g_key_file_get_integer(my_key_file, "player", "default_player", NULL); +- if (the_player == PLAYER_AUDACIOUS) +- { ++ gint the_player = g_key_file_get_integer(my_key_file, "player", "default_player", NULL); ++ if (the_player == PLAYER_AUDACIOUS) { + #ifdef NO_AUDACIOUS +- g_key_file_set_integer(my_key_file, "player", "default_player", PLAYER_SNACKAMP); ++ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER); + #endif + } +- //if the value do not make sense +- else if ((the_player > PLAYER_GSTREAMER) || (the_player < 0)) +- { +- g_key_file_set_integer(my_key_file, "player", "default_player", +- PLAYER_GSTREAMER); ++ else if (the_player == PLAYER_GSTREAMER) { ++#ifdef NO_GSTREAMER ++ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER); ++#endif + } ++ //if the value does not make sense ++ else if ((the_player > PLAYER_GSTREAMER) || (the_player < 0)) { ++ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER); ++ } + } + + pm_write_default(my_key_file, ui->preferences); diff --git a/audio/mp3splt-gtk/default_player.diff b/audio/mp3splt-gtk/default_player.diff deleted file mode 100644 index 123bc08a73..0000000000 --- a/audio/mp3splt-gtk/default_player.diff +++ /dev/null @@ -1,44 +0,0 @@ -diff -Naur mp3splt-gtk-0.9.2/src/preferences_manager.c mp3splt-gtk-0.9.2.patched/src/preferences_manager.c ---- mp3splt-gtk-0.9.2/src/preferences_manager.c 2014-05-28 18:43:53.000000000 -0400 -+++ mp3splt-gtk-0.9.2.patched/src/preferences_manager.c 2015-01-08 17:25:36.000000000 -0500 -@@ -42,6 +42,16 @@ - - #include "preferences_manager.h" - -+#ifdef NO_GSTREAMER -+ #ifdef NO_AUDACIOUS -+ #define DEFAULT_PLAYER PLAYER_SNACKAMP -+ #else -+ #define DEFAULT_PLAYER PLAYER_AUDACIOUS -+ #endif -+#else -+ #define DEFAULT_PLAYER PLAYER_GSTREAMER -+#endif -+ - static void check_pref_file_and_write_default(ui_state *ui); - static void pm_free_spinner_int_preferences(GArray *spinner_int_preferences); - static void pm_free_range_preferences(GArray *range_preferences); -@@ -771,7 +781,7 @@ - if (!g_key_file_has_key(my_key_file, "player", "default_player",NULL)) - { - g_key_file_set_integer(my_key_file, "player", "default_player", -- PLAYER_GSTREAMER); -+ DEFAULT_PLAYER); - g_key_file_set_comment (my_key_file, "player", "default_player", - "\n 1 = PLAYER_AUDACIOUS, 2 = PLAYER_SNACKAMP, 3 = PLAYER_GSTREAMER", - NULL); -@@ -784,7 +794,13 @@ - if (the_player == PLAYER_AUDACIOUS) - { - #ifdef NO_AUDACIOUS -- g_key_file_set_integer(my_key_file, "player", "default_player", PLAYER_SNACKAMP); -+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER); -+#endif -+ } -+ if (the_player == PLAYER_GSTREAMER) -+ { -+#ifdef NO_GSTREAMER -+ g_key_file_set_integer(my_key_file, "player", "default_player", DEFAULT_PLAYER); - #endif - } - //if the value do not make sense diff --git a/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild b/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild index 2057ac085f..54a70e2d4d 100644 --- a/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild +++ b/audio/mp3splt-gtk/mp3splt-gtk.SlackBuild @@ -34,9 +34,15 @@ # - Added default_player.diff: if GSTREAMER=no, the default player # will be audacious. Sent patch to upstream too. +# 20150304 bkw: +# - Upstream accepted my patch, in somewhat modified form, as revision +# 1509 in their SVN repo. Update this build to use their patch instead +# of mine. +# - Bump BUILD. + PRGNAM=mp3splt-gtk VERSION=${VERSION:-0.9.2} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -81,7 +87,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -patch -p1 < $CWD/default_player.diff +# patch made with 'svn diff -c 1509' in a checked-out repo. +patch -p1 < $CWD/default_player-r1509.diff if [ "${GSTREAMER:-yes}" = "yes" ]; then GSTOPT="enable" |