tags 620918 + patch
user ubuntu-de...@lists.ubuntu.com
usertag 620918 + origin-ubuntu oneiric
thanks

On Tue, Apr 05, 2011 at 04:54:05AM +0200, Cyril Brulebois wrote:
> Source: imms
> Version: 3.1.0~rc8-2
> Severity: serious
> Justification: FTBFS
> 
> Hi,
> 
> your package FTBFS for its +b1 binNMU round with:
> | install: cannot stat `build/libaudaciousimms.so': No such file or directory
> | make: *** [install] Error 1

While I didn't see this exact FTBFS, Ubuntu has taken some patches from
upstream which fix the build. I've attached them.

Cheers,

-- 
Iain Lane                                  [ i...@orangesquash.org.uk ]
Debian Developer                                   [ la...@debian.org ]
Ubuntu Developer                                   [ la...@ubuntu.com ]
PhD student                                       [ i...@cs.nott.ac.uk ]
Description: fix imms to work with audacious 2.4. This fixes a FTBFS
Author: phantom x
Origin: upstream, http://code.google.com/p/imms/source/detail?r=257

--- imms-3.1.0~rc8.orig/configure.ac
+++ imms-3.1.0~rc8/configure.ac
@@ -357,14 +357,31 @@ fi
 
 PKG_CHECK_MODULES(audacious, [audacious >= 1.4.0], [], [with_audacious=no])
 PKG_CHECK_MODULES(dbus_glib, [dbus-glib-1 >= 0.70], [], [with_audacious=no])
+PKG_CHECK_EXISTS(audacious >= 2.4, with_audacious24=yes, with_audacious24=no)
 
 LIBS="$audacious_LIBS $dbus_glib_LIBS"
 CPPFLAGS="$audacious_CFLAGS $dbus_glib_CFLAGS"
 
 AC_CHECK_HEADERS(audacious/plugin.h,, [with_audacious=no])
-AC_CHECK_HEADERS(audacious/auddrct.h,, [with_audacious=no])
 
-if test "$with_audacious" != "no"; then
+if test "$with_audacious" != "no" -a "$with_audacious24" != "no"; then
+    AC_CHECK_HEADERS(audacious/drct.h,, [with_audacious=no])
+    AC_MSG_CHECKING([for aud_drct_pq_add in -laudacious])
+    AC_TRY_LINK([extern "C" {
+                 #include <audacious/drct.h>
+                 #include <audacious/plugin.h>
+                 #include <audacious/dbus.h>
+                }
+                  SIMPLE_GENERAL_PLUGIN(0, 0);],
+                [aud_drct_pq_add(0)],
+                [AC_MSG_RESULT(yes)],
+                [with_audacious="no"
+                 AC_MSG_RESULT(no)]);
+    AC_DEFINE(AUDACIOUS24, 1, [Define for Audacious 2.4 support])
+    audacious_CFLAGS="$audacious_CFLAGS -DAUDACIOUS -DAUDACIOUS24"
+else
+    PKG_CHECK_MODULES(audclient, [audclient >= 1.4.0], [], [with_audacious=no])
+    AC_CHECK_HEADERS(audacious/auddrct.h,, [with_audacious=no])
     AC_MSG_CHECKING([for audacious_drct_playqueue_add in -laudacious])
     AC_TRY_LINK([#include <audacious/auddrct.h>
                  #include <audacious/plugin.h>
@@ -373,6 +390,8 @@ if test "$with_audacious" != "no"; then
                 [AC_MSG_RESULT(yes)],
                 [with_audacious="no"
                  AC_MSG_RESULT(no)]);
+    audacious_CFLAGS="$audclient_CFLAGS -DAUDACIOUS"
+    audacious_LIBS="$audclient_LIBS -laudcore"
 fi
 
 if test "$with_audacious" = "no"; then
--- imms-3.1.0~rc8.orig/vars.mk.in
+++ imms-3.1.0~rc8/vars.mk.in
@@ -48,6 +48,9 @@ CXXFLAGS=@CXXFLAGS@ -fno-rtti
 GLIB2LDFLAGS=`pkg-config glib-2.0 --libs`
 GLIB1LDFLAGS=`pkg-config glib --libs`
 
+AUDACIOUSCPPFLAGS=@audacious_CFLAGS@ @dbus_glib_CFLAGS@ -I../clients/xmms/
+AUDACIOUSLDFLAGS=@audacious_LIBS@ @dbus_glib_LIBS@
+
 LDFLAGS=-L. @LIBS@
 
 default: all
--- imms-3.1.0~rc8.orig/clients/audacious/rules.mk
+++ imms-3.1.0~rc8/clients/audacious/rules.mk
@@ -16,9 +16,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 #
-AUDACIOUSCPPFLAGS=`pkg-config audclient dbus-glib-1 --cflags` -I../clients/xmms/ -DAUDACIOUS
-AUDACIOUSLDFLAGS=`pkg-config audclient dbus-glib-1 --libs` -laudcore
-
 libaudaciousimms.so: audplugin.o audaciousinterface.o clientstubbase.o libimmscore.a 
 libaudaciousimms-LIBS = $(AUDACIOUSLDFLAGS)
 
--- imms-3.1.0~rc8.orig/clients/audacious/audplugin.cc
+++ imms-3.1.0~rc8/clients/audacious/audplugin.cc
@@ -24,8 +24,32 @@
 #include <iostream>
 #include <time.h>
 
+#ifdef AUDACIOUS24
+extern "C" {
 #include <audacious/plugin.h>
 #include <audacious/audctrl.h>
+#include <audacious/drct.h>
+#include <libaudcore/audstrings.h>
+}
+
+#define audacious_drct_get_playlist_file aud_drct_pl_get_file
+#define aud_filename_to_utf8 filename_to_utf8
+#define audacious_drct_playqueue_remove aud_drct_pq_remove
+#define audacious_drct_playqueue_add aud_drct_pq_add
+#define audacious_drct_get_playlist_length aud_drct_pl_get_length
+#define audacious_drct_get_output_time aud_drct_get_time
+#define audacious_drct_is_playing aud_drct_get_playing
+#define audacious_drct_get_playlist_pos aud_drct_pl_get_pos
+#define audacious_drct_get_playlist_time aud_drct_pl_get_time
+#define audacious_drct_is_shuffle aud_drct_pl_shuffle_is_enabled
+#define audacious_drct_get_playqueue_length aud_drct_pq_get_length
+
+#else /* AUDACIOUS24 */
+
+#include <audacious/plugin.h>
+#include <audacious/audctrl.h>
+
+#endif /* AUDACIOUS24 */
 
 #include "immsconf.h"
 #include "cplugin.h"
--- imms-3.1.0~rc8.orig/clients/bmp/bmpinterface.c
+++ imms-3.1.0~rc8/clients/bmp/bmpinterface.c
@@ -24,9 +24,22 @@
 #include <bmp/plugin.h>
 #define PLAYER_PREFIX(x) bmp_##x
 #elif AUDACIOUS
+#ifdef AUDACIOUS24
+#include <glib.h>
+#include <audacious/i18n.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+#include <audacious/configdb.h>
+#include <audacious/plugin.h>
+#include <libaudgui/libaudgui.h>
+#include <libaudgui/libaudgui-gtk.h>
+#define PACKAGE PACKAGE_NAME
+#define ConfigDb mcs_handle_t
+#else /* AUDACIOUS24 */
 #include <audacious/configdb.h>
 #include <audacious/util.h>
 #include <audacious/plugin.h>
+#endif /* AUDACIOUS24 */
 #define PLAYER_PREFIX(x) aud_##x
 #endif
 #include "immsconf.h"
@@ -169,10 +182,16 @@ void configure(void)
 
 void about(void)
 {
-    if (about_win)
-        return;
+#ifdef AUDACIOUS24
+        static GtkWidget *aboutbox = NULL;
+        gchar *tmp;
+    
+        tmp = g_strdup_printf(_(PACKAGE_STRING "\n\n"
+#else /* AUDACIOUS24 */
+        if (about_win)
+           return;
 
-    about_win =
+        about_win =
 #ifdef AUDACIOUS
         audacious_info_dialog(
 #else
@@ -180,6 +199,7 @@ void about(void)
 #endif
             "About IMMS",
             PACKAGE_STRING "\n\n"
+#endif /* AUDACIOUS24 */
             "Intelligent Multimedia Management System" "\n\n"
             "IMMS is an intelligent playlist plug-in for BPM" "\n"
             "that tracks your listening patterns" "\n"
@@ -189,9 +209,18 @@ void about(void)
             "For more information please visit" "\n"
             "http://www.luminal.org/wiki/index.php/IMMS"; "\n\n"
             "Written by" "\n"
+#ifdef AUDACIOUS24
+            "Michael \"mag\" Grigoriev <m...@luminal.org>"));
+        audgui_simple_message(&aboutbox, GTK_MESSAGE_INFO, _("About IMMS"),
+              tmp);
+
+      g_free(tmp);
+#else /* AUDACIOUS24 */
             "Michael \"mag\" Grigoriev <m...@luminal.org>",
             "Dismiss", FALSE, NULL, NULL);
 
     gtk_signal_connect(GTK_OBJECT(about_win), "destroy",
             GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_win);
+
+#endif /* AUDACIOUS24 */
 }
Description: Use g_filename_to_utf8 for filename conversion
Origin: upstream, r257
Bug-Ubuntu: https://launchpad.net/bugs/749074
Forwarded: not-needed

--- imms-3.1.0~rc8.orig/clients/audacious/audplugin.cc
+++ imms-3.1.0~rc8/clients/audacious/audplugin.cc
@@ -102,8 +102,9 @@ string imms_get_playlist_item(int at)
     string result = tmp;
     free(tmp);
     gchar *realfn = g_filename_from_uri(result.c_str(), NULL, NULL);
-    tmp = aud_filename_to_utf8(realfn ? realfn : result.c_str());
-    result = tmp;
+    tmp = g_filename_to_utf8(realfn ? realfn : result.c_str(),
+                             -1, NULL, NULL, NULL);
+    if (tmp) result = tmp;
     free(tmp);
     free(realfn);
     return result;

Attachment: signature.asc
Description: Digital signature

Reply via email to