Package: lastfm
Version: 1:1.5.4.27091+dfsg-2
Severity: important
Tags: patch
User: vor...@debian.org
Usertags: multiarch

Hi John,

In an archive rebuild of Ubuntu following the conversion of the base system
to multiarch, it was found that lastfm fails to build because it hard-codes
the include paths used to find various headers.  It should instead query
pkg-config for this information, since pkg-config is the authoritative
interface for these libraries.

The attached patch does this, and has been uploaded to Ubuntu with the
following changelog explanation:

  * debian/patches/build-fixes.diff: use pkg-config instead of hard-coding
    include paths for glib-2.0 and libgpod.  LP: #749089.
  * debian/patches/build-kfreebsd.diff: drop references to /usr/local, which
    have nothing at all to do with a kfreebsd build.

Since multiarch should be coming soon to Debian, please consider applying
this to your package ASAP.

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru lastfm-1.5.4.27091+dfsg/debian/control lastfm-1.5.4.27091+dfsg/debian/control
--- lastfm-1.5.4.27091+dfsg/debian/control	2010-12-06 21:34:59.000000000 -0800
+++ lastfm-1.5.4.27091+dfsg/debian/control	2011-04-09 01:19:01.000000000 -0700
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: John Stamp <jst...@users.sourceforge.net>
 Build-Depends: debhelper (>= 7.4.12), libqt4-dev (>= 4.3.0), libgpod-nogtk-dev,
- libmad0-dev, zlib1g-dev, libx11-dev, x11proto-core-dev,
+ libmad0-dev, zlib1g-dev, libx11-dev, x11proto-core-dev, pkg-config,
  libasound2-dev (>= 1.0.9) [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386]
 Standards-Version: 3.9.1
 Homepage: http://www.last.fm/
diff -Nru lastfm-1.5.4.27091+dfsg/debian/patches/build-fixes.diff lastfm-1.5.4.27091+dfsg/debian/patches/build-fixes.diff
--- lastfm-1.5.4.27091+dfsg/debian/patches/build-fixes.diff	2010-12-06 21:34:59.000000000 -0800
+++ lastfm-1.5.4.27091+dfsg/debian/patches/build-fixes.diff	2011-04-09 01:14:28.000000000 -0700
@@ -1,7 +1,9 @@
 Don't compile portAudio output plugin on Linux.
-And fix 64 bit builds for some distributions.
---- a/LastFM.pro
-+++ b/LastFM.pro
+And properly detect include paths using pkg-config.
+Index: lastfm-1.5.4.27091+dfsg/LastFM.pro
+===================================================================
+--- lastfm-1.5.4.27091+dfsg.orig/LastFM.pro
++++ lastfm-1.5.4.27091+dfsg/LastFM.pro
 @@ -41,8 +41,7 @@
      SUBDIRS -= src/Twiddly \
                 src/Bootstrapper/ITunesDevice
@@ -12,14 +14,16 @@
  }
  
  
---- a/src/mediadevices/ipod/ipod.pro
-+++ b/src/mediadevices/ipod/ipod.pro
+Index: lastfm-1.5.4.27091+dfsg/src/mediadevices/ipod/ipod.pro
+===================================================================
+--- lastfm-1.5.4.27091+dfsg.orig/src/mediadevices/ipod/ipod.pro
++++ lastfm-1.5.4.27091+dfsg/src/mediadevices/ipod/ipod.pro
 @@ -11,7 +11,7 @@
  linux* {
      LIBS += -lgpod
  
 -    INCLUDEPATH += /usr/include/gpod-1.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include
-+    INCLUDEPATH += /usr/include/gpod-1.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/lib64/glib-2.0/include
++    INCLUDEPATH += $$system(pkg-config --cflags-only-I libgpod-1.0 | sed -e's/-I//g')
  }
  
  mac {
diff -Nru lastfm-1.5.4.27091+dfsg/debian/patches/build-kfreebsd.diff lastfm-1.5.4.27091+dfsg/debian/patches/build-kfreebsd.diff
--- lastfm-1.5.4.27091+dfsg/debian/patches/build-kfreebsd.diff	2010-12-06 21:34:59.000000000 -0800
+++ lastfm-1.5.4.27091+dfsg/debian/patches/build-kfreebsd.diff	2011-04-09 01:04:38.000000000 -0700
@@ -66,18 +66,6 @@
  mac {
  	DEFINES += MACOSX
  }
---- a/src/mediadevices/ipod/ipod.pro
-+++ b/src/mediadevices/ipod/ipod.pro
-@@ -12,7 +12,8 @@
- linux* {
-     LIBS += -lgpod
- 
--    INCLUDEPATH += /usr/include/gpod-1.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/lib64/glib-2.0/include
-+    INCLUDEPATH += /usr/include/gpod-1.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/lib64/glib-2.0/include \
-+                   /usr/local/include/gpod-1.0 /usr/local/include/glib-2.0
- }
- 
- mac {
 --- a/src/output/RtAudio/RtAudio.pro
 +++ b/src/output/RtAudio/RtAudio.pro
 @@ -8,10 +8,6 @@
diff -Nru lastfm-1.5.4.27091+dfsg/debian/patches/dirpaths.diff lastfm-1.5.4.27091+dfsg/debian/patches/dirpaths.diff
--- lastfm-1.5.4.27091+dfsg/debian/patches/dirpaths.diff	2010-12-06 21:34:59.000000000 -0800
+++ lastfm-1.5.4.27091+dfsg/debian/patches/dirpaths.diff	2011-04-09 01:13:55.000000000 -0700
@@ -1,6 +1,8 @@
 Fix up icon installation path for Linux packages.
---- a/src/libMoose/MooseCommon.cpp
-+++ b/src/libMoose/MooseCommon.cpp
+Index: lastfm-1.5.4.27091+dfsg/src/libMoose/MooseCommon.cpp
+===================================================================
+--- lastfm-1.5.4.27091+dfsg.orig/src/libMoose/MooseCommon.cpp
++++ lastfm-1.5.4.27091+dfsg/src/libMoose/MooseCommon.cpp
 @@ -47,7 +47,7 @@
  QString
  dataPath( QString file )

Reply via email to