Source: tree-puzzle
Version: 5.3~rc16+dfsg-12
Tags: patch upstream
User:
debian-cross@lists.debian.org
Usertags: ftcbfs
tree-puzzle fails to cross build from source, because it uses mpicc. I
am attaching the usual patch converting it to use mpi-c.pc via pkgconf,
but I paid attention to gracefully fall back to mpicc for architectures
that lack mpi-c.pc still (e.g. 32bit mpich ones) where tree-puzzle will continue to fail to cross build for now.
Helmut
--- tree-puzzle-5.3~rc16+dfsg.orig/configure.ac
+++ tree-puzzle-5.3~rc16+dfsg/configure.ac
@@ -91,6 +91,12 @@
fi
fi ])
+PKG_CHECK_MODULES([MPI_C],[mpi-c],[
+ MPICC="$CC"
+ MPILIBS="$MPI_C_LIBS"
+ PPUZZLE=ppuzzle
+],[
+
if test "$MPICC" != "" ; then
AC_PATH_PROG(MPICC0, $MPICC)
fi
@@ -111,6 +117,8 @@
ac_cv_prog_MPICC=$MPICC
+])
+
dnl ---------------------------------------------------------------------
dnl Test function to test whether the compiler handles quotes correctly
dnl ---------------------------------------------------------------------
--- tree-puzzle-5.3~rc16+dfsg.orig/src/Makefile.am
+++ tree-puzzle-5.3~rc16+dfsg/src/Makefile.am
@@ -66,8 +66,8 @@
PCC = @MPICC@
PDEFS = -DPARALLEL
-PCFLAGS =
+PCFLAGS = @MPI_C_CFLAGS@
PLDFLAGS =
PLDLIBS = -lsprng @LIBS@ @MPILIBS@
PCOMPILE = $(PCC) $(PDEFS) $(DEFS) $(TPINCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(PCFLAGS) $(CFLAGS)
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21