Description: Allow linking with --as-needed
Author: Michael Bienia <geser@ubuntu.com>

--- mail-notification-5.4.dfsg.1.orig/jb
+++ mail-notification-5.4.dfsg.1/jb
@@ -89,10 +89,11 @@
 
 		mkdir -p build/jbsrc || exit 1
 
-		if ! gobject_cflags_libs=`pkg-config --cflags --libs 'gobject-2.0 >= 2.8.0' 2>/dev/null`; then
+		if ! gobject_cflags=`pkg-config --cflags 'gobject-2.0 >= 2.8.0' 2>/dev/null`; then
 			echo "ERROR: the GLib library was not found" >&2
 			exit 1
 		fi
+		gobject_libs=`pkg-config --libs 'gobject-2.0 >= 2.8.0'`
 		if ! libedataserver_cflags=`pkg-config --cflags 'libedataserver-1.2' 2>/dev/null`; then
 			echo "ERROR: the Evolution Data Server Utility library was not found" >&2
 			exit 1
@@ -107,7 +108,7 @@
 			-DG_LOG_DOMAIN="\"jb\"" \
 			-DJB_SOURCES="\"$jb_c_sources $jb_h_sources\"" \
 			-DJB_PACKAGE_SOURCES="\"$jb_c_package_sources $jb_h_package_sources\"" \
-			$gobject_cflags_libs \
+			$gobject_cflags \
 			$libedataserver_cflags \
 			$jb_cflags \
 			$jb_cppflags \
@@ -115,7 +116,8 @@
 			build/jbsrc/jb.c \
 			$jb_c_sources \
 			$jb_c_package_sources \
-			$jb_libs; then
+			$jb_libs \
+			$gobject_libs; then
 			echo "ERROR: cannot build jb" >&2
 			exit 1
 		fi
