dateutils: fix cross compile with upstream patch

This commit is contained in:
Enno Boland 2015-03-13 09:25:31 +01:00
parent b533a55475
commit dd691598e1
2 changed files with 39 additions and 7 deletions

View file

@ -0,0 +1,36 @@
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])

View file

@ -1,7 +1,7 @@
# Template file for 'dateutils'
pkgname=dateutils
version=0.3.2
revision=2
revision=3
build_style=gnu-configure
configure_args="ax_cv_zoneinfo_tzdir=/usr/share/zoneinfo"
short_desc="Nifty command line date and time utilities"
@ -10,12 +10,8 @@ license="BSD"
homepage="http://www.fresse.org/dateutils/"
distfiles="https://bitbucket.org/hroptatyr/dateutils/downloads/${pkgname}-${version}.tar.xz"
checksum=551620b01c08d5feffb68fde6bb669fe09275dd316a79aeca0efcbe3ec774a3e
hostmakedepends="automake libtool libltdl-devel"
pre_configure() {
sed -i "/^## check\/generate version files/,/^## check for byteorder utils/d" configure
cat > version.mk <<EOF
VERSION = $version
PACKAGE_VERSION = \$(VERSION)
PACKAGE_STRING = \$(PACKAGE) \$(VERSION)
EOF
autoreconf -fi
}