void-packages/srcpkgs/dateutils/patches/fix-crossbuild.diff

37 lines
1.3 KiB
Diff

diff --git a/m4/yuck.m4 b/m4/yuck.m4
index 4796e9c..6ae4eb9 100644
--- m4/yuck.m4
+++ m4/yuck.m4
@@ -112,7 +112,30 @@ AC_DEFUN([AX_YUCK_SCMVER], [dnl
#define _XOPEN_SOURCE 600
#define VERSION_FILE "${srcdir}/.version"
#include "yuck-scmver.c"
-]])], [STIP_VERSION=`./conftest$EXEEXT`], [AC_MSG_RESULT([none])])
+]])], [STIP_VERSION=`./conftest$EXEEXT`], [AC_MSG_RESULT([none])], [dnl
+ AC_MSG_RESULT([impossible, cross-compiling])
+ if test -f "[]vfile[]" -o \
+ -f "${srcdir}/[]vfile[]" -o \
+ -f "${srcdir}/.version"; then
+ AC_MSG_NOTICE([
+Files that (possibly) mandate versions have been detected.
+These are `]vfile[' or `${srcdir}/]vfile[' or `${srcdir}/.version'.
+However, their contents cannot be automatically checked for integrity
+due to building for a platform other than the current one
+(cross-compiling).
+
+I will proceed with the most conservative guess for the stipulated
+version, which is `${VERSION}'.
+
+If that appears to be wrong, or needs overriding, please edit the
+aforementioned files manually.
+
+Also note, even though this project comes with all the tools to
+perform a successful bootstrap for any of the files above, should
+they go out of date or be deleted, they don't support cross-builds.
+ ])
+ fi
+ ])
CPPFLAGS="${save_CPPFLAGS}"
AC_LANG_POP([C])