summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2011-07-30 11:56:42 +0000
committerEray Aslan <eras@gentoo.org>2011-07-30 11:56:42 +0000
commitda3552455655656e9f6e2c8e32bf0662e7162c38 (patch)
treecfa608a0c80091c4970829ffa82b13359d888971 /mail-filter
parentDrop ~sparc-fbsd KEYWORD (diff)
downloadgentoo-2-da3552455655656e9f6e2c8e32bf0662e7162c38.tar.gz
gentoo-2-da3552455655656e9f6e2c8e32bf0662e7162c38.tar.bz2
gentoo-2-da3552455655656e9f6e2c8e32bf0662e7162c38.zip
Check for en_US.utf8 locale. If not available, donot run tests that fail without it - bug #376667
(Portage version: 2.1.10.9/cvs/Linux x86_64)
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/maildrop/ChangeLog6
-rw-r--r--mail-filter/maildrop/files/maildrop-testsuite.patch67
-rw-r--r--mail-filter/maildrop/maildrop-2.5.4.ebuild8
3 files changed, 76 insertions, 5 deletions
diff --git a/mail-filter/maildrop/ChangeLog b/mail-filter/maildrop/ChangeLog
index 74e0358d1106..9ce2800a2501 100644
--- a/mail-filter/maildrop/ChangeLog
+++ b/mail-filter/maildrop/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for mail-filter/maildrop
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/maildrop/ChangeLog,v 1.111 2011/07/27 18:24:29 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/maildrop/ChangeLog,v 1.112 2011/07/30 11:56:42 eras Exp $
+
+ 30 Jul 2011; Eray Aslan <eras@gentoo.org> maildrop-2.5.4.ebuild,
+ +files/maildrop-testsuite.patch:
+ Check for en_US.utf8 and run tests accordingly - bug #376667
*maildrop-2.4.2-r1 (27 Jul 2011)
diff --git a/mail-filter/maildrop/files/maildrop-testsuite.patch b/mail-filter/maildrop/files/maildrop-testsuite.patch
new file mode 100644
index 000000000000..377fb19d151c
--- /dev/null
+++ b/mail-filter/maildrop/files/maildrop-testsuite.patch
@@ -0,0 +1,67 @@
+Need en_US.utf8 to run some tests - bug #376667
+
+--- maildrop/Makefile.am 2011-04-04 15:58:58.000000000 +0000
++++ maildrop/Makefile.am 2011-07-28 10:29:43.000000000 +0000
+@@ -75,8 +75,12 @@
+ maildrop.lsm testsuite.txt.idn testsuite.txt.noidn
+
+ check-am:
++if HAS_EN_US
+ @chmod +x testsuite
+ ./testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
++else
++ echo ' Need en_US.utf8 to run tests'
++endif
+
+ noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
+ maildropgdbm.html maildropgdbm.7
+--- maildrop/configure.in 2011-05-17 20:36:04.000000000 +0000
++++ maildrop/configure.in 2011-07-28 10:58:57.000000000 +0000
+@@ -200,6 +200,15 @@
+ AC_TYPE_SIGNAL
+ AC_CHECK_FUNCS(setgroups setlocale)
+
++check_en_US() {
++locale -a | grep en_US.utf8 > /dev/null
++return $?
++}
++
++AC_MSG_CHECKING([for en_US.utf8])
++AM_CONDITIONAL([HAS_EN_US], [check_en_US])
++AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])])
++
+ AC_CHECK_FUNC(getpgrp, HAS_GETPGRP=1, HAS_GETPGRP=0)
+ AC_DEFINE_UNQUOTED(HAS_GETPGRP,$HAS_GETPGRP,
+ [ Whether getpgrp() is available ])
+--- rfc2045/Makefile.am 2011-04-04 15:59:47.000000000 +0000
++++ rfc2045/Makefile.am 2011-07-29 09:28:41.000000000 +0000
+@@ -76,7 +76,11 @@
+ TESTSUITE=testsuite.txt.noidn
+ endif
+
++if HAS_EN_US
+ check-am:
+ @SHELL@ $(srcdir)/testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
+ @SHELL@ $(srcdir)/testsuitemm | cmp -s - $(srcdir)/testsuitemm.txt
+ @SHELL@ $(srcdir)/testrfc3676parsersuite | diff -U 3 $(srcdir)/testrfc3676parsersuite.txt -
++else
++ echo ' Need en_US.utf8 to run tests'
++endif
+--- rfc2045/configure.in 2011-04-04 15:59:47.000000000 +0000
++++ rfc2045/configure.in 2011-07-29 09:28:34.000000000 +0000
+@@ -59,6 +59,15 @@
+ AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp")
+ AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp")
+
++check_en_US() {
++locale -a | grep en_US.utf8 > /dev/null
++return $?
++}
++
++AC_MSG_CHECKING([for en_US.utf8])
++AM_CONDITIONAL([HAS_EN_US], [check_en_US])
++AM_COND_IF([HAS_EN_US],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([not found])])
++
+ AC_ARG_WITH(package, [], package="$withval",
+ [
+ package="$PACKAGE"
diff --git a/mail-filter/maildrop/maildrop-2.5.4.ebuild b/mail-filter/maildrop/maildrop-2.5.4.ebuild
index ccecb0c46b98..6f99f515be1a 100644
--- a/mail-filter/maildrop/maildrop-2.5.4.ebuild
+++ b/mail-filter/maildrop/maildrop-2.5.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/maildrop/maildrop-2.5.4.ebuild,v 1.4 2011/07/27 15:35:26 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/maildrop/maildrop-2.5.4.ebuild,v 1.5 2011/07/30 11:56:42 eras Exp $
EAPI=4
@@ -60,8 +60,8 @@ src_prepare() {
# no need to error out if no default - it will be given to configure anyway
sed -i -e \
's~AC_MSG_ERROR(Cannot determine default mailbox)~SPOOLDIR="./.maildir"~' \
- "${S}"/maildrop/configure.in
-
+ "${S}"/maildrop/configure.in || die "sed failed"
+ epatch "${FILESDIR}"/${PN}-testsuite.patch
eautoreconf
}
@@ -127,7 +127,7 @@ src_install() {
fi
dodir "/usr/share/doc/${PF}"
- mv "${D}/usr/share/maildrop/html" "${D}/usr/share/doc/${PF}/"
+ mv "${D}/usr/share/maildrop/html" "${D}/usr/share/doc/${PF}/" || die
rm -rf "${D}"/usr/share/maildrop
dohtml *.html maildir/*.html