forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
maildrop-testsuite-r3.patch
65 lines (59 loc) · 2.53 KB
/
maildrop-testsuite-r3.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff -uNr maildrop-2.8.3.ORIG/libs/maildrop/configure.ac maildrop-2.8.3/libs/maildrop/configure.ac
--- maildrop-2.8.3.ORIG/libs/maildrop/configure.ac 2017-07-25 22:49:44.044032091 +0100
+++ maildrop-2.8.3/libs/maildrop/configure.ac 2017-07-25 22:50:48.205113368 +0100
@@ -195,6 +195,15 @@
AC_DEFINE_UNQUOTED(MAXLONGSIZE, $MAXLONGSIZE,
[ Maximum character size of a long ])
+dnl check for en_US locale
+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])])
+
dnl Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
diff -uNr maildrop-2.8.3.ORIG/libs/maildrop/Makefile.am maildrop-2.8.3/libs/maildrop/Makefile.am
--- maildrop-2.8.3.ORIG/libs/maildrop/Makefile.am 2017-07-25 22:49:44.054032259 +0100
+++ maildrop-2.8.3/libs/maildrop/Makefile.am 2017-07-25 22:51:13.335536823 +0100
@@ -75,9 +75,11 @@
maildrop.lsm testsuite.txt.idn testsuite.txt.noidn testsuite2
check-am:
+if HAS_EN_US
@chmod +x testsuite
./testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
@SHELL@ $(srcdir)/testsuite2
+endif
noinst_DATA=maildrop.html maildrop.1 maildropfilter.html maildropfilter.7 \
maildropgdbm.html maildropgdbm.7
diff -uNr maildrop-2.8.3.ORIG/libs/rfc2045/configure.ac maildrop-2.8.3/libs/rfc2045/configure.ac
--- maildrop-2.8.3.ORIG/libs/rfc2045/configure.ac 2017-07-25 22:49:44.054032259 +0100
+++ maildrop-2.8.3/libs/rfc2045/configure.ac 2017-07-25 22:50:48.205113368 +0100
@@ -60,6 +60,15 @@
AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp")
AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp")
+dnl check for en_US locale
+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 -uNr maildrop-2.8.3.ORIG/libs/rfc2045/Makefile.am maildrop-2.8.3/libs/rfc2045/Makefile.am
--- maildrop-2.8.3.ORIG/libs/rfc2045/Makefile.am 2017-07-25 22:49:44.054032259 +0100
+++ maildrop-2.8.3/libs/rfc2045/Makefile.am 2017-07-25 22:51:26.555759572 +0100
@@ -76,6 +76,8 @@
endif
check-am:
+if HAS_EN_US
@SHELL@ $(srcdir)/testsuite | cmp -s - $(srcdir)/$(TESTSUITE)
@SHELL@ $(srcdir)/testsuitemm | cmp -s - $(srcdir)/testsuitemm.txt
@SHELL@ $(srcdir)/testrfc3676parsersuite | diff -U 3 $(srcdir)/testrfc3676parsersuite.txt -
+endif