Bug#888522: ipe FTCBFS: uses the build architecture pkg-config

Helmut Grohne helmut at subdivi.de
Fri Jan 26 16:40:35 UTC 2018


Source: ipe
Version: 7.2.7-2
Tags: patch upstream
User: helmutg at debian.org
Usertags: rebootstrap

ipe fails to cross build from source, because its upstream build system
hard codes the build architecture pkg-config. dh_auto_build supplies the
host architecture pkg-config via the $PKG_CONFIG make variable. Once ipe
honours that variable, it cross builds successfully. The attached patch
implements that. Please consider applying it.

Helmut
-------------- next part --------------
diff --minimal -Nru ipe-7.2.7/debian/changelog ipe-7.2.7/debian/changelog
--- ipe-7.2.7/debian/changelog	2017-01-18 15:18:03.000000000 +0100
+++ ipe-7.2.7/debian/changelog	2018-01-23 19:42:16.000000000 +0100
@@ -1,3 +1,10 @@
+ipe (7.2.7-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * 
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 23 Jan 2018 19:42:16 +0100
+
 ipe (7.2.7-2) unstable; urgency=medium
 
   * Team upload.
diff --minimal -Nru ipe-7.2.7/debian/patches/cross.patch ipe-7.2.7/debian/patches/cross.patch
--- ipe-7.2.7/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ ipe-7.2.7/debian/patches/cross.patch	2018-01-23 19:39:06.000000000 +0100
@@ -0,0 +1,98 @@
+Index: ipe-7.2.7/src/common.mak
+===================================================================
+--- ipe-7.2.7.orig/src/common.mak
++++ ipe-7.2.7/src/common.mak
+@@ -3,6 +3,9 @@
+ #
+ # Building Ipe --- common definitions
+ #
++
++PKG_CONFIG ?= pkg-config
++
+ # --------------------------------------------------------------------
+ # Are we compiling for Windows?  For Mac OS X?
+ ifdef COMSPEC
+@@ -86,8 +89,8 @@
+ else ifeq ($(IPEUI), GTK)
+ CPPFLAGS     += -DIPEUI_GTK -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
+ IPEUI_GTK    := 1
+-GTK_CFLAGS   ?= $(shell pkg-config --cflags gtk+-2.0)
+-GTK_LIBS     ?= $(shell pkg-config --libs gtk+-2.0)
++GTK_CFLAGS   ?= $(shell $(PKG_CONFIG) --cflags gtk+-2.0)
++GTK_LIBS     ?= $(shell $(PKG_CONFIG) --libs gtk+-2.0)
+ UI_CFLAGS    = $(GTK_CFLAGS)
+ UI_LIBS      = $(GTK_LIBS)
+ all_sources  = $(sources) $(gtk_sources)
+Index: ipe-7.2.7/src/config.mak
+===================================================================
+--- ipe-7.2.7.orig/src/config.mak
++++ ipe-7.2.7/src/config.mak
+@@ -17,21 +17,22 @@
+ # Lua 5.3 works as well.
+ #
+ LUA_PACKAGE   ?= lua5.3
++PKG_CONFIG ?= pkg-config
+ #
+ ZLIB_CFLAGS   ?=
+ ZLIB_LIBS     ?= -lz
+ JPEG_CFLAGS   ?=
+ JPEG_LIBS     ?= -ljpeg
+-PNG_CFLAGS    ?= $(shell pkg-config --cflags libpng)
+-PNG_LIBS      ?= $(shell pkg-config --libs libpng)
+-FREETYPE_CFLAGS ?= $(shell pkg-config --cflags freetype2)
+-FREETYPE_LIBS ?= $(shell pkg-config --libs freetype2)
+-CAIRO_CFLAGS  ?= $(shell pkg-config --cflags cairo)
+-CAIRO_LIBS    ?= $(shell pkg-config --libs cairo)
+-LUA_CFLAGS    ?= $(shell pkg-config --cflags $(LUA_PACKAGE))
+-LUA_LIBS      ?= $(shell pkg-config --libs $(LUA_PACKAGE))
+-QT_CFLAGS     ?= $(shell pkg-config --cflags Qt5Gui Qt5Widgets Qt5Core)
+-QT_LIBS	      ?= $(shell pkg-config --libs Qt5Gui Qt5Widgets Qt5Core)
++PNG_CFLAGS    ?= $(shell $(PKG_CONFIG) --cflags libpng)
++PNG_LIBS      ?= $(shell $(PKG_CONFIG) --libs libpng)
++FREETYPE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags freetype2)
++FREETYPE_LIBS ?= $(shell $(PKG_CONFIG) --libs freetype2)
++CAIRO_CFLAGS  ?= $(shell $(PKG_CONFIG) --cflags cairo)
++CAIRO_LIBS    ?= $(shell $(PKG_CONFIG) --libs cairo)
++LUA_CFLAGS    ?= $(shell $(PKG_CONFIG) --cflags $(LUA_PACKAGE))
++LUA_LIBS      ?= $(shell $(PKG_CONFIG) --libs $(LUA_PACKAGE))
++QT_CFLAGS     ?= $(shell $(PKG_CONFIG) --cflags Qt5Gui Qt5Widgets Qt5Core)
++QT_LIBS	      ?= $(shell $(PKG_CONFIG) --libs Qt5Gui Qt5Widgets Qt5Core)
+ #
+ # Library needed to use dlopen/dlsym/dlclose calls
+ #
+Index: ipe-7.2.7/src/snapcraft.mak
+===================================================================
+--- ipe-7.2.7.orig/src/snapcraft.mak
++++ ipe-7.2.7/src/snapcraft.mak
+@@ -13,20 +13,21 @@
+ IPEPREFIX    := $(IPESRCDIR)/../../install
+ endif
+ #
++PKG_CONFIG    ?= pkg-config
+ ZLIB_CFLAGS   ?=
+ ZLIB_LIBS     ?= -lz
+ JPEG_CFLAGS   ?=
+ JPEG_LIBS     ?= -ljpeg
+-PNG_CFLAGS    ?= $(shell pkg-config --cflags libpng)
+-PNG_LIBS      ?= $(shell pkg-config --libs libpng)
+-FREETYPE_CFLAGS ?= $(shell pkg-config --cflags freetype2)
+-FREETYPE_LIBS ?= $(shell pkg-config --libs freetype2)
+-CAIRO_CFLAGS  ?= $(shell pkg-config --cflags cairo)
+-CAIRO_LIBS    ?= $(shell pkg-config --libs cairo)
+-LUA_CFLAGS    ?= $(shell pkg-config --cflags lua5.3)
+-LUA_LIBS      ?= $(shell pkg-config --libs lua5.3)
+-QT_CFLAGS     ?= $(shell pkg-config --cflags Qt5Gui Qt5Widgets Qt5Core)
+-QT_LIBS	      ?= $(shell pkg-config --libs Qt5Gui Qt5Widgets Qt5Core)
++PNG_CFLAGS    ?= $(shell $(PKG_CONFIG) --cflags libpng)
++PNG_LIBS      ?= $(shell $(PKG_CONFIG) --libs libpng)
++FREETYPE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags freetype2)
++FREETYPE_LIBS ?= $(shell $(PKG_CONFIG) --libs freetype2)
++CAIRO_CFLAGS  ?= $(shell $(PKG_CONFIG) --cflags cairo)
++CAIRO_LIBS    ?= $(shell $(PKG_CONFIG) --libs cairo)
++LUA_CFLAGS    ?= $(shell $(PKG_CONFIG) --cflags lua5.3)
++LUA_LIBS      ?= $(shell $(PKG_CONFIG) --libs lua5.3)
++QT_CFLAGS     ?= $(shell $(PKG_CONFIG) --cflags Qt5Gui Qt5Widgets Qt5Core)
++QT_LIBS	      ?= $(shell $(PKG_CONFIG) --libs Qt5Gui Qt5Widgets Qt5Core)
+ DL_LIBS       ?= -ldl
+ MOC	      ?= moc
+ CXX = g++
diff --minimal -Nru ipe-7.2.7/debian/patches/series ipe-7.2.7/debian/patches/series
--- ipe-7.2.7/debian/patches/series	2017-01-18 15:09:01.000000000 +0100
+++ ipe-7.2.7/debian/patches/series	2018-01-23 19:37:06.000000000 +0100
@@ -1,2 +1,3 @@
 default-editor.patch
 wheel-zoom-debug.patch
+cross.patch


More information about the debian-science-maintainers mailing list