[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#639059: z88: Fix for FTBFS (use pkg-config in cmake)



Package: z88
Version: 13.0.0+dfsg2-2
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch multiarch



*** /tmp/tmpMufq1i
In Ubuntu, the attached patch was applied to achieve the following:

This breakage is due to the multiarch path transitions.  Rather than hardcoding all the multiarch paths (even messier in Debian with more archs), I used pkg-config w/in cmake to find the proper include dirs.


Thanks for considering the patch.


-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty-proposed'), (500, 'natty'), (100, 'natty-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-11-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru z88-13.0.0+dfsg2/debian/changelog z88-13.0.0+dfsg2/debian/changelog
diff -Nru z88-13.0.0+dfsg2/debian/control z88-13.0.0+dfsg2/debian/control
--- z88-13.0.0+dfsg2/debian/control	2011-07-04 01:56:45.000000000 -0500
+++ z88-13.0.0+dfsg2/debian/control	2011-08-28 16:36:14.000000000 -0500
@@ -1,8 +1,8 @@
 Source: z88
 Section: science
 Priority: optional
 Maintainer: Debian QA Group <packages@qa.debian.org>
-Build-Depends: debhelper (>= 7), cmake, libgtk2.0-dev, libgtkglext1-dev
+Build-Depends: debhelper (>= 7), cmake, libgtk2.0-dev, libgtkglext1-dev, pkg-config
 Standards-Version: 3.8.1
 Vcs-Browser: http://svn.debian.org/wsvn/debian-science/packages/z88/trunk/?rev=0&sc=0
 Vcs-Svn: svn://svn.debian.org/svn/debian-science/packages/z88/trunk/
diff -Nru z88-13.0.0+dfsg2/debian/patches/series z88-13.0.0+dfsg2/debian/patches/series
--- z88-13.0.0+dfsg2/debian/patches/series	2011-07-04 02:04:19.000000000 -0500
+++ z88-13.0.0+dfsg2/debian/patches/series	2011-08-28 18:49:33.000000000 -0500
@@ -1,2 +1,3 @@
 50_all_changes.patch
 60_fix_spelling_errors.patch
+use-pkg-config.patch
diff -Nru z88-13.0.0+dfsg2/debian/patches/use-pkg-config.patch z88-13.0.0+dfsg2/debian/patches/use-pkg-config.patch
--- z88-13.0.0+dfsg2/debian/patches/use-pkg-config.patch	1969-12-31 18:00:00.000000000 -0600
+++ z88-13.0.0+dfsg2/debian/patches/use-pkg-config.patch	2011-08-28 19:21:19.000000000 -0500
@@ -0,0 +1,25 @@
+Description: Use pkg-config to find glib include paths to fix FTBFS
+Author: Micah Gersten <micahg@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/756066
+
+---
+ src/CMakeLists.txt |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+Index: z88-13.0.0+dfsg2/src/CMakeLists.txt
+===================================================================
+--- z88-13.0.0+dfsg2.orig/src/CMakeLists.txt
++++ z88-13.0.0+dfsg2/src/CMakeLists.txt
+@@ -14,7 +14,11 @@
+ #  MESSAGE( FATAL_ERROR "This application requires GTK. One of these components is missing. Please verify configuration")
+ #ENDIF (GTK_FOUND)
+ 
+-INCLUDE_DIRECTORIES ( /usr/include/gtk-2.0/ /usr/lib/gtk-2.0/include /usr/include/atk-1.0 /usr/include/cairo /usr/include/pango-1.0 /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/include/pixman-1 /usr/include/freetype2 /usr/include/directfb /usr/include/libpng12 /usr/include/gtkglext-1.0 /usr/lib/gtkglext-1.0/include /usr/include/gdk-pixbuf-2.0/)
++include ( FindPkgConfig )
++pkg_check_modules ( GLIB_2.0 glib-2.0 )
++pkg_check_modules ( GTK_2.0 gtk+-2.0 )
++
++INCLUDE_DIRECTORIES ( ${GTK_2.0_INCLUDE_DIRS} /usr/include/atk-1.0 /usr/include/cairo /usr/include/pango-1.0 ${GLIB_2.0_INCLUDE_DIRS}  /usr/include/pixman-1 /usr/include/freetype2 /usr/include/directfb /usr/include/libpng12 /usr/include/gtkglext-1.0 /usr/lib/gtkglext-1.0/include /usr/include/gdk-pixbuf-2.0/)
+ LINK_LIBRARIES ( gtk-x11-2.0 gdk-x11-2.0 atk-1.0 pangoft2-1.0 gdk_pixbuf-2.0 m pangocairo-1.0 gio-2.0 cairo pango-1.0 freetype fontconfig gobject-2.0 gmodule-2.0 glib-2.0 GL GLU gtkglext-x11-1.0 gdkglext-x11-1.0)
+ 
+ #  GTK_INCLUDE_DIR   - Directories to include to use GTK

Reply to: