Source: libgdiplus Version: 4.2-1 Tags: upstream patch User: [email protected] Usertags: rebootstrap
libgdiplus fails to cross build from source, because it uses the build architecture pkg-config rather than the host architecture one. This results in it missing required libraries. The problem resides in the build system provided by upstream as pkg-config is hardcoded into configure.ac in a few places. Please consider applying the attached patch as it fixes the cross build. Helmut
diff --minimal -Nru libgdiplus-4.2/debian/changelog libgdiplus-4.2/debian/changelog --- libgdiplus-4.2/debian/changelog 2015-12-20 18:42:55.000000000 +0100 +++ libgdiplus-4.2/debian/changelog 2016-11-01 06:04:58.000000000 +0100 @@ -1,3 +1,11 @@ +libgdiplus (4.2-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + cross.patch: Use triplet-prefixed pkg-config. + + -- Helmut Grohne <[email protected]> Tue, 01 Nov 2016 06:04:40 +0100 + libgdiplus (4.2-1) unstable; urgency=medium * [f55e3da] Imported Upstream version 4.2 (Closes: #803274, #688361) diff --minimal -Nru libgdiplus-4.2/debian/patches/cross.patch libgdiplus-4.2/debian/patches/cross.patch --- libgdiplus-4.2/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ libgdiplus-4.2/debian/patches/cross.patch 2016-11-01 06:04:34.000000000 +0100 @@ -0,0 +1,60 @@ +From: Helmut Grohne <[email protected]> +Subject: use a triplet-prefixed pkg-config + +Index: libgdiplus-4.2/configure.ac +=================================================================== +--- libgdiplus-4.2.orig/configure.ac ++++ libgdiplus-4.2/configure.ac +@@ -12,15 +12,15 @@ + + AC_C_BIGENDIAN + +-AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +-if test "x$PKG_CONFIG" = "xno"; then ++PKG_PROG_PKG_CONFIG ++if test "x$PKG_CONFIG" = "x"; then + AC_MSG_ERROR([You need to install pkg-config]) + fi + GLIB_REQUIRED_VERSION="2.2.3" + PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION) + +-GDIPLUS_LIBS="`pkg-config --libs glib-2.0 `" +-GDIPLUS_CFLAGS="`pkg-config --cflags glib-2.0 `" ++GDIPLUS_LIBS="`$PKG_CONFIG --libs glib-2.0 `" ++GDIPLUS_CFLAGS="`$PKG_CONFIG --cflags glib-2.0 `" + + CAIRO_REQUIRED_VERSION="1.6.4" + PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_REQUIRED_VERSION) +@@ -29,16 +29,16 @@ + AC_ARG_WITH(pango, [ --with-pango],[text_v=pango],[text_v=cairo]) + + CAIRO_DIR="" +-CAIRO_LIBS="`pkg-config --libs cairo `" +-CAIRO_CFLAGS="`pkg-config --cflags cairo `" +-cairo_info="`pkg-config --modversion cairo ` (system)" ++CAIRO_LIBS="`$PKG_CONFIG --libs cairo `" ++CAIRO_CFLAGS="`$PKG_CONFIG --cflags cairo `" ++cairo_info="`$PKG_CONFIG --modversion cairo ` (system)" + GDIPLUS_PKG_REQ="cairo" + + if test $text_v = "pango"; then + PANGO_REQUIRED_VERSION="1.10" + PKG_CHECK_MODULES(PANGO, pango >= $PANGO_REQUIRED_VERSION) +- PANGO_LIBS="`pkg-config --libs pangocairo `" +- PANGO_CFLAGS="`pkg-config --cflags pangocairo `" ++ PANGO_LIBS="`$PKG_CONFIG --libs pangocairo `" ++ PANGO_CFLAGS="`$PKG_CONFIG --cflags pangocairo `" + AC_DEFINE(USE_PANGO_RENDERING,1,[Use Pango to measure and draw text (INCOMPLETE and UNSUPPORTED)]) + GDIPLUS_PKG_REQ="$GDIPLUS_PKG_REQ pangocairo-1.0" + fi +@@ -122,8 +122,8 @@ + + # Add xrender here so that we don't fail to find glib if we won't have xrender.pc + if test "x$no_x" != "xyes"; then +- GDIPLUS_LIBS="$GDIPLUS_LIBS `pkg-config --libs xrender `" +- GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS `pkg-config --cflags xrender `" ++ GDIPLUS_LIBS="$GDIPLUS_LIBS `$PKG_CONFIG --libs xrender `" ++ GDIPLUS_CFLAGS="$GDIPLUS_CFLAGS `$PKG_CONFIG --cflags xrender `" + fi + + # Apparently for BSD special handling needs to happen diff --minimal -Nru libgdiplus-4.2/debian/patches/series libgdiplus-4.2/debian/patches/series --- libgdiplus-4.2/debian/patches/series 2015-09-07 20:25:54.000000000 +0200 +++ libgdiplus-4.2/debian/patches/series 2016-11-01 06:02:17.000000000 +0100 @@ -1 +1,2 @@ initialize_png_transparency.patch +cross.patch

