Package: choosewm
Version: 0.1.6-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch

Hi Bernhard,

The attached patch addresses this build failure by fixing choosewm to use
the standard pkg-config interface for querying include paths, instead of
hard-coding the values.  These includes should never be hard-coded, as they
are not guaranteed to be constant over time - indeed, they will be changing
again very soon because of multiarch.

Since you appear to be upstream for this package as well, I'll note that
there are a few other oddities here:

 - you're testing in configure.ac for headers that you aren't using
   (glib.h, pango/pango.h, cairo/cairo.h, atk/atkobject.h).  These checks
   are pretty redundant; either they are needed and the compiler will spit
   out an error soon enough, or they aren't and the warning is a red
   herring.
 - it's not normal to require users to pass CPPFLAGS manually to make -
   especially when you're using autoconf and building against libraries such
   as gtk, which provide a standard interface for this in the form of
   pkg-config (and for which standard autoconf macros - PKG_PROG_PKG_CONFIG
   and PKG_CHECK_MODULES - are readily available).

I strongly encourage you as the upstream to use these interfaces in your
upstream build system; they will make your software more portable and your
package more robust against irrelevant library changes.

-- 
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 -u choosewm-0.1.6/debian/rules choosewm-0.1.6/debian/rules
--- choosewm-0.1.6/debian/rules
+++ choosewm-0.1.6/debian/rules
@@ -13,7 +13,7 @@
 	CFLAGS += -O2
 endif
 LDFLAGS = -Wl,-z,defs
-CPPFLAGS = -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo
+CPPFLAGS = $(shell pkg-config --cflags gtk+-2.0 glib-2.0 pango atk cairo)
 
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
         MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
diff -u choosewm-0.1.6/debian/control choosewm-0.1.6/debian/control
--- choosewm-0.1.6/debian/control
+++ choosewm-0.1.6/debian/control
@@ -2,7 +2,7 @@
 Section: x11
 Priority: extra
 Maintainer: Bernhard R. Link <brl...@debian.org>
-Build-Depends: debhelper (>= 5), libglib2.0-dev, libpango1.0-dev, libatk1.0-dev, libgtk2.0-dev, libcairo2-dev
+Build-Depends: debhelper (>= 5), libglib2.0-dev, libpango1.0-dev, libatk1.0-dev, libgtk2.0-dev, libcairo2-dev, pkg-config
 Standards-Version: 3.8.4
 
 Package: choosewm
diff -u choosewm-0.1.6/debian/changelog choosewm-0.1.6/debian/changelog

Reply via email to