exo: fix cross build.

This commit is contained in:
Eivind Uggedal 2014-09-23 11:46:25 +00:00
parent 8455f85b7d
commit 9f0c1e1575
2 changed files with 60 additions and 2 deletions

View file

@ -0,0 +1,47 @@
--- configure.ac.orig
+++ configure.ac
@@ -137,22 +137,29 @@ AC_FUNC_MMAP()
dnl ***************************************
dnl *** Check for strftime() extensions ***
dnl ***************************************
-AC_TRY_RUN([
- #include <string.h>
- #include <time.h>
- int
- main (int argc, char **argv)
- {
- struct tm tm;
- char buffer[16];
- tm.tm_year = 81;
- if (strftime (buffer, 16, "%EY", &tm) == 4 && strcmp (buffer, "1981") == 0)
- return 0;
- return 1;
- }
-], [
+AC_CACHE_CHECK([Define if strftime supports %E and %O modifiers], ac_cv_strftime_extensions,
+ [AC_TRY_RUN([
+ #include <string.h>
+ #include <time.h>
+ int
+ main (int argc, char **argv)
+ {
+ struct tm tm;
+ char buffer[16];
+ tm.tm_year = 81;
+ if (strftime (buffer, 16, "%EY", &tm) == 4 && strcmp (buffer, "1981") == 0)
+ return 0;
+ return 1;
+ }
+ ],
+ ac_cv_strftime_extensions=yes,
+ ac_cv_strftime_extensions=no,
+ [AC_MSG_ERROR([cross-compiling, preset ac_cv_strftime_extensions=yes/no])]
+ )]
+)
+if test x"$ac_cv_strftime_extensions" = x"yes"; then
AC_DEFINE([HAVE_STRFTIME_EXTENSION], 1, [Define if strftime supports %E and %O modifiers.])
-])
+fi
dnl ******************************
dnl *** Check for i18n support ***

View file

@ -1,10 +1,10 @@
# Template file for 'exo'
pkgname=exo
version=0.10.2
revision=3
revision=4
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="pkg-config intltool perl-URI"
hostmakedepends="xfce4-dev-tools gettext-devel glib-devel perl-URI"
makedepends="gtk+-devel libxfce4util-devel libxfce4ui-devel perl-URI"
depends="hicolor-icon-theme desktop-file-utils perl-URI"
conf_files="/etc/xdg/xfce4/helpers.rc"
@ -15,6 +15,17 @@ homepage="http://xfce.org"
distfiles="http://archive.xfce.org/src/xfce/exo/${version%.*}/exo-${version}.tar.bz2"
checksum=b385828bf8a38204da3254b57fdfa25a72694495aa189fabd5040f707eec76ce
pre_configure() {
if [ "$CROSS_BUILD" ]; then
export ac_cv_strftime_extensions=yes
# Disable tests:
sed -i 's/^\([[:blank:]]*po\).*$/\1/;/^[[:blank:]]*tests$/d' Makefile.am
fi
NOCONFIGURE=1 xdt-autogen
}
exo-devel_package() {
depends="gtk+-devel libxfce4util-devel exo-${version}_${revision}"
short_desc+=" - development files"