Package: afnix
Severity: important
Tags: patch
Hi,
your package FTBFS on GNU/kFreeBSD, with the following error:
> dh_testdir
> ./cnf/bin/afnix-setup -o --prefix=/usr
> afnix-setup: cannot determine linking type
> make: *** [configure-stamp] Error 1
Full build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=afnix>.
Please find attached a patch to fix this. I didn't reindent anything in
the first hunk so that one can easily see that it is really a one-liner.
About the second, I won't be categorical about the absence of
MREMAP_MAYMOVE, but looking at the whole content of my /usr/include and
at how the FreeBSD case is treated in the patched header, it sounds like
reasonable to me.
I let the #undef outside the Linux block so as to be as non-intrusive as
possible, but putting the "#define AFNIX_HAVE_MREMAP" into a
"#ifndef __FreeBSD_kernel__" test might make sense.
Cheers,
--
Cyril Brulebois
--- afnix-1.4.2/cnf/bin/afnix-guess 2006-12-29 15:55:04.000000000 +0100
+++ afnix-1.4.2/cnf/bin/afnix-guess 2007-03-07 16:03:50.000000000 +0100
@@ -73,6 +73,7 @@
name=`uname -s`
case $name in
Linux) plat_name=linux;;
+ GNU/kFreeBSD) plat_name=linux;; # GNU userland in both cases
SunOS) plat_name=solaris;;
FreeBSD) plat_name=freebsd;;
Darwin) plat_name=darwin;;
--- afnix-1.4.2/src/lib/plt/shl/cmem.hxx 2006-12-29 15:55:06.000000000 +0100
+++ afnix-1.4.2/src/lib/plt/shl/cmem.hxx 2007-03-07 16:05:45.000000000 +0100
@@ -39,6 +39,13 @@
#include <stdio.h>
#endif
+// GNU/kFreeBSD: same as linux but no MREMAP_MAYMOVE apparently
+// Checking for PLATFORM_LINUX to ensure that it doesn't break "Plain" FreeBSD
+#if (AFNIX_PLATFORM_PLATID == AFNIX_PLATFORM_LINUX) && (defined __FreeBSD_kernel__)
+#undef AFNIX_HAVE_MREMAP
+#endif
+
+
// solaris platform
#if (AFNIX_PLATFORM_PLATID == AFNIX_PLATFORM_SOLARIS)
#define AFNIX_HAVE_SYSCONF