Package: clutter-gesture
Version: 0.0.2.1-5
Severity: important
Tags: patch
User: [email protected]
Usertag: origin-ubuntu ubuntu-patch precise
Hey
libengine uses symbols from libraries such as libm and libgobject but
doesn't actually link to them; the attached patch fixes the build with
-z defs in LDFLAGS for me and also fixes a couple of style issues.
While developing this patch, the clutter-gesture wouldn't build for me
on an Ubuntu system due to the use of deprecated symbols such as
g_thread_init, so I disabled -Werror for deprecated declarations, but
ideally this would be ported to the latest glib API.
Cheers,
--
Loïc Minier
diff -Nru clutter-gesture-0.0.2.1/debian/changelog
clutter-gesture-0.0.2.1/debian/changelog
--- clutter-gesture-0.0.2.1/debian/changelog 2011-11-20 08:14:15.000000000
+0100
+++ clutter-gesture-0.0.2.1/debian/changelog 2011-12-27 19:12:26.000000000
+0100
@@ -1,3 +1,15 @@
+clutter-gesture (0.0.2.1-6) UNRELEASED; urgency=low
+
+ * New patch, 05_no-undefined-symbols, misc correctness link fixes to build
+ successfully with -z defs in LDFLAGS; this fixes missing links on glib,
+ gobject and libm for at least libengine.
+ * rules: Pass --no-undefined to build via LDFLAGS.
+ * Update patch 02_fix_FTBFS_gcc4.6 to also set
+ -Wno-error=deprecated-declarations to fix FTBFS with latest glib which
+ deprecates e.g. g_thread_init.
+
+ -- Loïc Minier <[email protected]> Tue, 27 Dec 2011 19:03:36 +0100
+
clutter-gesture (0.0.2.1-5) unstable; urgency=low
* debian/patches/04_glex_fix.patch: Fix armel FTBFS (Closes: #649167)
diff -Nru clutter-gesture-0.0.2.1/debian/patches/02_fix_FTBFS_gcc4.6.patch
clutter-gesture-0.0.2.1/debian/patches/02_fix_FTBFS_gcc4.6.patch
--- clutter-gesture-0.0.2.1/debian/patches/02_fix_FTBFS_gcc4.6.patch
2011-07-18 02:57:56.000000000 +0200
+++ clutter-gesture-0.0.2.1/debian/patches/02_fix_FTBFS_gcc4.6.patch
2011-12-27 19:08:28.000000000 +0100
@@ -4,16 +4,14 @@
Author: Ying-Chun Liu (PaulLiu) <[email protected]>
Bug-Debian: http://bugs.debian.org/625322
Last-Update: 2011-07-18
-Index: clutter-gesture-0.0.2.1/configure.ac
-===================================================================
---- clutter-gesture-0.0.2.1.orig/configure.ac 2011-07-18 08:56:24.316229243
+0800
-+++ clutter-gesture-0.0.2.1/configure.ac 2011-07-18 08:56:48.871833877
+0800
+--- a/configure.ac
++++ b/configure.ac
@@ -50,7 +50,7 @@
clutter-1.0 >= 1.0.0
gobject-2.0
glib-2.0)
-CLUTTERGESTURE_CFLAGS="$CLUTTERGESTURE_CFLAGS -Wall -Werror -fPIC"
-+CLUTTERGESTURE_CFLAGS="$CLUTTERGESTURE_CFLAGS -Wall -Werror
-Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -fPIC"
++CLUTTERGESTURE_CFLAGS="$CLUTTERGESTURE_CFLAGS -Wall -Werror
-Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter
-Wno-error=deprecated-declarations -fPIC"
AC_SUBST(CLUTTERGESTURE_CFLAGS)
AC_SUBST(CLUTTERGESTURE_LIBS)
diff -Nru clutter-gesture-0.0.2.1/debian/patches/05_no-undefined-symbols.patch
clutter-gesture-0.0.2.1/debian/patches/05_no-undefined-symbols.patch
--- clutter-gesture-0.0.2.1/debian/patches/05_no-undefined-symbols.patch
1970-01-01 01:00:00.000000000 +0100
+++ clutter-gesture-0.0.2.1/debian/patches/05_no-undefined-symbols.patch
2011-12-27 19:08:48.000000000 +0100
@@ -0,0 +1,37 @@
+Misc correctness link fixes to build successfully with -z defs
+* check for libm in configure.ac; needed for atan() and others
+* use $(CLUTTERGESTURE_CFLAGS) rather than @CLUTTERGESTURE_CFLAGS@ in
+ engine/Makefile.am to allow build-time overrides
+* set LIBS to CLUTTERGESTURE_LIBS and LIBM in engine/Makefile.am to link with
+ proper libs; fixes missing NEEDED entries on at least libengine
+* configure.ac: don't AC_SUBST() CLUTTERGESTURE_CFLAGS and _LIBS as
+ PKG_CHECK_MODULES already does that
+
+--- a/engine/Makefile.am
++++ b/engine/Makefile.am
+@@ -23,9 +23,10 @@
+
+ libengine_la_SOURCES = engine.c engine.h plugin.h stroke.c stroke.h
gesture_recog.c gesture_recog.h
+
+-AM_CFLAGS = @CLUTTERGESTURE_CFLAGS@ -DPKGDATADIR="\"$(pkgdatadir)\""
++AM_CFLAGS = $(CLUTTERGESTURE_CFLAGS) -DPKGDATADIR="\"$(pkgdatadir)\""
+
+-INCLUDES = @CLUTTERGESTURE_CFLAGS@
++INCLUDES = $(CLUTTERGESTURE_CFLAGS)
++LIBS = $(CLUTTERGESTURE_LIBS) $(LIBM)
+
+ DISTCLEANFILES = $(MARSHALFILES)
+ CLEANFILES = *~ engine *~stroke
+--- a/configure.ac
++++ b/configure.ac
+@@ -51,8 +51,8 @@
+ gobject-2.0
+ glib-2.0)
+ CLUTTERGESTURE_CFLAGS="$CLUTTERGESTURE_CFLAGS -Wall -Werror
-Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter
-Wno-error=deprecated-declarations -fPIC"
+-AC_SUBST(CLUTTERGESTURE_CFLAGS)
+-AC_SUBST(CLUTTERGESTURE_LIBS)
++
++AC_CHECK_LIBM
+
+ #GTK_DOC_CHECK([1.9])
+
diff -Nru clutter-gesture-0.0.2.1/debian/patches/series
clutter-gesture-0.0.2.1/debian/patches/series
--- clutter-gesture-0.0.2.1/debian/patches/series 2011-11-20
08:03:53.000000000 +0100
+++ clutter-gesture-0.0.2.1/debian/patches/series 2011-12-27
19:09:13.000000000 +0100
@@ -2,3 +2,4 @@
02_fix_FTBFS_gcc4.6.patch
03_fix_FTBFS_return_value_of_clutter_init.patch
04_glex_fix.patch
+05_no-undefined-symbols.patch
diff -Nru clutter-gesture-0.0.2.1/debian/rules
clutter-gesture-0.0.2.1/debian/rules
--- clutter-gesture-0.0.2.1/debian/rules 2011-03-15 13:18:14.000000000
+0100
+++ clutter-gesture-0.0.2.1/debian/rules 2011-12-27 19:05:05.000000000
+0100
@@ -8,4 +8,6 @@
DEB_CONFIGURE_EXTRA_FLAGS := --enable-gtk-doc
DEB_MAKE_CLEAN_TARGET := distclean
+LDFLAGS += -Wl,--no-undefined
+
common-binary-predeb-arch:: list-missing