diff -pruN 0.9+svn40-1/debian/changelog 0.9+svn40-1ubuntu2/debian/changelog
--- 0.9+svn40-1/debian/changelog	2011-09-28 12:01:13.000000000 +0000
+++ 0.9+svn40-1ubuntu2/debian/changelog	2011-09-28 12:01:13.000000000 +0000
@@ -1,3 +1,16 @@
+xzgv (0.9+svn40-1ubuntu2) oneiric; urgency=low
+
+  * debian/rules: Don't add libraries in LDFLAGS.
+  * Fix FTBFS with ld --as-needed.
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 28 Sep 2011 09:32:10 +0200
+
+xzgv (0.9+svn40-1ubuntu1) natty; urgency=low
+
+  * src/Makefile: Use LIBS instead of LDFLAGS for the libraries to link with.
+
+ -- Michael Bienia <geser@ubuntu.com>  Sun, 05 Dec 2010 16:13:19 +0100
+
 xzgv (0.9+svn40-1) unstable; urgency=low
 
   * Fix xzgv crashing on thumbnail files.  (Closes: #457252)
diff -pruN 0.9+svn40-1/debian/control 0.9+svn40-1ubuntu2/debian/control
--- 0.9+svn40-1/debian/control	2011-09-28 12:01:13.000000000 +0000
+++ 0.9+svn40-1ubuntu2/debian/control	2011-09-28 12:01:13.000000000 +0000
@@ -1,7 +1,8 @@
 Source: xzgv
 Section: graphics
 Priority: optional
-Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Theodore Y. Ts'o <tytso@mit.edu>
 Build-Depends: debhelper (>= 5), gawk, libgtk2.0-dev, texinfo
 Standards-Version: 3.8.0.0
 
diff -pruN 0.9+svn40-1/debian/rules 0.9+svn40-1ubuntu2/debian/rules
--- 0.9+svn40-1/debian/rules	2011-09-28 12:01:13.000000000 +0000
+++ 0.9+svn40-1ubuntu2/debian/rules	2011-09-28 12:01:13.000000000 +0000
@@ -12,7 +12,6 @@
 PATH=/bin:/usr/bin:/usr/sbin
 
 CFLAGS = -Wall -g `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gdk-pixbuf-2.0`
-LDFLAGS = -lgtk-x11-2.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lglib-2.0 -lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lglib-2.0
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CFLAGS += -O0
diff -pruN 0.9+svn40-1/src/Makefile 0.9+svn40-1ubuntu2/src/Makefile
--- 0.9+svn40-1/src/Makefile	2008-07-11 23:11:07.000000000 +0000
+++ 0.9+svn40-1ubuntu2/src/Makefile	2011-09-28 12:01:13.000000000 +0000
@@ -10,7 +10,7 @@
 include ../config.mk
 
 CFLAGS+=`pkg-config --cflags gtk+-2.0` `pkg-config --cflags gdk-pixbuf-2.0`
-LDFLAGS+=`pkg-config --libs gtk+-2.0` `pkg-config --libs gdk-pixbuf-2.0`
+LIBS+=`pkg-config --libs gtk+-2.0` `pkg-config --libs gdk-pixbuf-2.0` -lX11 -lm
 
 all: xzgv
 
@@ -23,7 +23,7 @@ OBJS=	main.o \
 	backend.o
 
 xzgv: $(OBJS)
-	$(CC) $(LDFLAGS) -o xzgv $(OBJS)
+	$(CC) $(LDFLAGS) -o xzgv $(OBJS) $(LIBS)
 
 installdirs:
 	/bin/sh ../mkinstalldirs $(BINDIR)

