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

Bug#550716: ncurses: cross-build fails due to colon in PKG_CONFIG_LIBDIR



Package: ncurses
Version: 5.7+20090803-2
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch karmic

When cross-building, dpkg-buildpackage sets PKG_CONFIG_LIBDIR to a
colon-separated pair of paths. This is valid as far as pkg-config is
concerned. However, ncurses breaks like this:

  cd misc && /usr/bin/make DESTDIR="/home/cjwatson/tmp/ncurses/debian/tmp" all
  make[2]: Entering directory `/home/cjwatson/tmp/ncurses/obj/misc'
  Makefile:128: *** target pattern contains no `%'. Stop.

The following patch fixes this, although it relies on GNU Make features
and so upstream might want to consider a different approach.

  * debian/patches/08-pkg-config-libdir.patch: Cope with multiple
    colon-separated entries in $(PKG_CONFIG_LIBDIR), as set by default by
    dpkg-buildpackage when cross-compiling.

diff -u ncurses-5.7+20090803/debian/patches/00list ncurses-5.7+20090803/debian/patches/00list
--- ncurses-5.7+20090803/debian/patches/00list
+++ ncurses-5.7+20090803/debian/patches/00list
@@ -7,0 +8 @@
+08-pkg-config-libdir.dpatch
only in patch2:
unchanged:
--- ncurses-5.7+20090803.orig/debian/patches/08-pkg-config-libdir.dpatch
+++ ncurses-5.7+20090803/debian/patches/08-pkg-config-libdir.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 08-cross-compile.dpatch by Colin Watson <cjwatson@ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Cope with multiple colon-separated entries in $(PKG_CONFIG_LIBDIR),
+## DP: as set by default by dpkg-buildpackage when cross-compiling.
+
+@DPATCH@
+diff -urNad ncurses-5.7+20090803~/misc/Makefile.in ncurses-5.7+20090803/misc/Makefile.in
+--- ncurses-5.7+20090803~/misc/Makefile.in	2009-02-10 14:59:19.000000000 +0000
++++ ncurses-5.7+20090803/misc/Makefile.in	2009-10-12 13:25:29.000000000 +0100
+@@ -129,7 +129,7 @@
+ $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(datadir) \
+ $(DESTDIR)$(tabsetdir) \
+-$(DESTDIR)$(PKG_CONFIG_LIBDIR) :
++$(foreach d,$(subst :, ,$(PKG_CONFIG_LIBDIR)),$(DESTDIR)$(d)) :
+ 	$(SHELL) $(top_srcdir)/mkdirs.sh $@
+ 
+ uninstall : uninstall.data uninstall.libs

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]



Reply to: