Source: rolo
Version: 019-4.1
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

rolo fails to cross build from source for two distinct reasons.

For one thing, configure.ac hard codes the build architecture
pkg-config. It is recommended to use the PKG_CHECK_MODULES macro which
automatically gets this right.

For another, tests/Makefile.am runs tests during the all target which is
usually run during build. Hence tests fail despite passing
DEB_BUILD_OPTIONS=nocheck. Moving tests to the check target causes tests
to not be run during all, but still be run in a debian package build as
dh_auto_test runs make check (unless DEB_BUILD_OPTIONS contains
nocheck).

I'm attaching a patch for your convenience.

Helmut
--- rolo-019.orig/configure.ac
+++ rolo-019/configure.ac
@@ -19,12 +19,13 @@
 CFLAGS="$CFLAGS -I/usr/include/ncursesw/"
 
 # Glib settings
-LIBS="$LIBS $(pkg-config glib-2.0 --libs)"
-CFLAGS="$CFLAGS $(pkg-config glib-2.0 --cflags)"
+PKG_CHECK_MODULES([GLIB],[glib-2.0])
 
 # Libunac settings
-LIBS="$LIBS $(pkg-config unac --libs)"
-CFLAGS="$CFLAGS $(pkg-config unac --cflags)"
+PKG_CHECK_MODULES([UNAC],[unac])
+
+LIBS="$LIBS $GLIB_LIBS $UNAC_LIBS"
+CFLAGS="$CFLAGS $GLIB_CFLAGS $UNAC_CFLAGS"
 
 # Checks for header files.
 AC_CHECK_INCLUDES_DEFAULT
--- rolo-019.orig/test/Makefile.am
+++ rolo-019/test/Makefile.am
@@ -1,4 +1,4 @@
-all:
+check:
 	@if [ "$(HAS_SHUNIT2)" = yes ] ; then	\
 	    ./run-tests ; 			\
 	else					\

Reply via email to