mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
mailutils: 2.2 -> 3.2
This commit is contained in:
parent
2b0315d7d0
commit
1ec5b7f1d3
@ -1,36 +1,76 @@
|
||||
{ fetchurl, stdenv, gettext, gdbm, libtool, pam, readline
|
||||
, ncurses, gnutls, sasl, fribidi, gss , mysql, guile, texinfo,
|
||||
gnum4, dejagnu, nettools }:
|
||||
{ stdenv, fetchurl, fetchpatch, autoreconfHook, dejagnu, gettext, libtool, pkgconfig
|
||||
, gdbm, pam, readline, ncurses, gnutls, guile, texinfo, gnum4, sasl, fribidi, nettools
|
||||
, gss, mysql }:
|
||||
|
||||
let
|
||||
p = "https://raw.githubusercontent.com/gentoo/gentoo/9c921e89d51876fd876f250324893fd90c019326/net-mail/mailutils/files";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mailutils-2.2";
|
||||
name = "${project}-${version}";
|
||||
project = "mailutils";
|
||||
version = "3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/mailutils/${name}.tar.bz2";
|
||||
sha256 = "0szbqa12zqzldqyw97lxqax3ja2adis83i7brdfsxmrfw68iaf65";
|
||||
url = "mirror://gnu/${project}/${name}.tar.xz";
|
||||
sha256 = "0zh7xn8yvnw9zkc7gi5290i34viwxp1rn0g1q9nyvmckkvk59lwn";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook gettext libtool pkgconfig
|
||||
] ++ stdenv.lib.optional doCheck dejagnu;
|
||||
|
||||
patches = [ ./path-to-cat.patch ./no-gets.patch ./scm_c_string.patch ];
|
||||
buildInputs = [
|
||||
gdbm pam readline ncurses gnutls guile texinfo gnum4 sasl fribidi nettools
|
||||
gss mysql.lib
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "${p}/mailutils-3.2-fix-build.patch";
|
||||
sha256 = "0yzkfx3j1zkkb43fhchjqphw4xznbclj39bjzjggv32gppy6d1db";
|
||||
})
|
||||
./fix-build-mb-len-max.patch
|
||||
./fix-test-ali-awk.patch
|
||||
./path-to-cat.patch
|
||||
];
|
||||
|
||||
readmsg-tests = stdenv.lib.optionals doCheck [
|
||||
(fetchurl { url = "${p}/hdr.at"; sha256 = "0phpkqyhs26chn63wjns6ydx9468ng3ssbjbfhcvza8h78jlsd98"; })
|
||||
(fetchurl { url = "${p}/nohdr.at"; sha256 = "1vkbkfkbqj6ml62s1am8i286hxwnpsmbhbnq0i2i0j1i7iwkk4b7"; })
|
||||
(fetchurl { url = "${p}/twomsg.at"; sha256 = "15m29rg2xxa17xhx6jp4s2vwa9d4khw8092vpygqbwlhw68alk9g"; })
|
||||
(fetchurl { url = "${p}/weed.at"; sha256 = "1101xakhc99f5gb9cs3mmydn43ayli7b270pzbvh7f9rbvh0d0nh"; })
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -e '/AM_GNU_GETTEXT_VERSION/s/0.18/0.19/' -i configure.ac
|
||||
sed -i -e '/chown root:mail/d' \
|
||||
-e 's/chmod [24]755/chmod 0755/' \
|
||||
*/Makefile{,.in,.am}
|
||||
*/Makefile{.in,.am}
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-gsasl"
|
||||
"--with-gssapi=${gss}"
|
||||
"--with-gssapi"
|
||||
"--with-mysql"
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[ gettext gdbm libtool pam readline ncurses
|
||||
gnutls mysql.lib guile texinfo gnum4 sasl fribidi gss nettools ]
|
||||
++ stdenv.lib.optional doCheck dejagnu;
|
||||
preCheck = ''
|
||||
# Add missing files.
|
||||
cp ${builtins.toString readmsg-tests} readmsg/tests/
|
||||
for f in hdr.at nohdr.at twomsg.at weed.at; do
|
||||
mv readmsg/tests/*-$f readmsg/tests/$f
|
||||
done
|
||||
# Disable comsat tests that fail without tty in the sandbox.
|
||||
tty -s || echo > comsat/tests/testsuite.at
|
||||
# Disable mda tests that require /etc/passwd to contain root.
|
||||
grep -qo '^root:' /etc/passwd || echo > maidag/tests/mda.at
|
||||
# Provide libraries for mhn.
|
||||
export LD_LIBRARY_PATH=$(pwd)/lib/.libs
|
||||
'';
|
||||
postCheck = "unset LD_LIBRARY_PATH";
|
||||
|
||||
doCheck = true;
|
||||
enableParallelBuilding = true;
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Rich and powerful protocol-independent mail framework";
|
||||
@ -60,7 +100,7 @@ stdenv.mkDerivation rec {
|
||||
gpl3Plus /* tools */
|
||||
];
|
||||
|
||||
maintainers = with maintainers; [ vrthra ];
|
||||
maintainers = with maintainers; [ orivej vrthra ];
|
||||
|
||||
homepage = http://www.gnu.org/software/mailutils/;
|
||||
|
||||
|
14
pkgs/tools/networking/mailutils/fix-build-mb-len-max.patch
Normal file
14
pkgs/tools/networking/mailutils/fix-build-mb-len-max.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/frm/frm.h b/frm/frm.h
|
||||
index 178b87d54..7931faada 100644
|
||||
--- a/frm/frm.h
|
||||
+++ b/frm/frm.h
|
||||
@@ -34,6 +34,9 @@
|
||||
#ifdef HAVE_ICONV_H
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
+#ifdef HAVE_LIMITS_H
|
||||
+# include <limits.h>
|
||||
+#endif
|
||||
#ifndef MB_LEN_MAX
|
||||
# define MB_LEN_MAX 4
|
||||
#endif
|
16
pkgs/tools/networking/mailutils/fix-test-ali-awk.patch
Normal file
16
pkgs/tools/networking/mailutils/fix-test-ali-awk.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/mh/tests/ali.at b/mh/tests/ali.at
|
||||
index 28c0e5451..c76cf9363 100644
|
||||
--- a/mh/tests/ali.at
|
||||
+++ b/mh/tests/ali.at
|
||||
@@ -85,9 +85,9 @@ ali -a ./mh_aliases korzen | tr -d ' '
|
||||
[expout])
|
||||
|
||||
MH_CHECK([ali: group id],[ali05 ali-group-id ali-gid],[
|
||||
-cat /etc/passwd | awk -F : '/^#/ { next } $4==0 { print $1 }' > expout
|
||||
+cat /etc/passwd | awk -F : '/^#/ { next } $4==0 { print $1; exit }' > expout
|
||||
test -s expout || AT_SKIP_TEST
|
||||
-name=`awk -F : '/^#/ { next } $3==0 { print $1 }' /etc/group < /dev/null`
|
||||
+name=`awk -F : '/^#/ { next } $3==0 { print $1; exit }' /etc/group < /dev/null`
|
||||
test -z "$name" && AT_SKIP_TEST
|
||||
|
||||
echo "korzen: +$name" > mh_aliases
|
@ -1,14 +0,0 @@
|
||||
--- a/lib/stdio.in.h
|
||||
+++ b/lib/stdio.in.h
|
||||
@@ -138,8 +138,10 @@
|
||||
/* It is very rare that the developer ever has full control of stdin,
|
||||
so any use of gets warrants an unconditional warning. Assume it is
|
||||
always declared, since it is required by C89. */
|
||||
-#undef gets
|
||||
+#ifdef gets
|
||||
+# undef gets
|
||||
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
+#endif
|
||||
|
||||
#if @GNULIB_FOPEN@
|
||||
# if @REPLACE_FOPEN@
|
@ -1,8 +1,47 @@
|
||||
Fix absolute path to `cat'.
|
||||
|
||||
--- mailutils-2.2/testsuite/lib/mailutils.exp 2010-09-10 13:39:58.000000000 +0200
|
||||
+++ mailutils-2.2/testsuite/lib/mailutils.exp 2010-09-10 13:40:00.000000000 +0200
|
||||
@@ -719,7 +719,7 @@ proc mu_test_file {args} {
|
||||
diff --git a/mh/show.c b/mh/show.c
|
||||
index a43afe10c..6985386ec 100644
|
||||
--- a/mh/show.c
|
||||
+++ b/mh/show.c
|
||||
@@ -254,7 +254,7 @@ main (int argc, char **argv)
|
||||
*/
|
||||
|
||||
if (!use_showproc)
|
||||
- showproc = "/bin/cat";
|
||||
+ showproc = "cat";
|
||||
else
|
||||
showproc = mh_global_profile_get ("showproc", NULL);
|
||||
|
||||
diff --git a/mh/tests/mhparam.at b/mh/tests/mhparam.at
|
||||
index 54b7fc06a..3abd5bf9b 100644
|
||||
--- a/mh/tests/mhparam.at
|
||||
+++ b/mh/tests/mhparam.at
|
||||
@@ -28,7 +28,7 @@ mhparam -all | tr '\t' ' ' | sed 's/^Path:.*/Path: Mail/;s/^mhetcdir:.*/mhetcdir
|
||||
[0],
|
||||
[Path: Mail
|
||||
mhetcdir: dir
|
||||
-moreproc: /bin/cat
|
||||
+moreproc: cat
|
||||
Sequence-Negation: not
|
||||
Draft-Folder: Mail/drafts
|
||||
Aliasfile: .mh_aliases
|
||||
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
|
||||
index c6820843c..6675a4a9c 100644
|
||||
--- a/mh/tests/testsuite.at
|
||||
+++ b/mh/tests/testsuite.at
|
||||
@@ -25,7 +25,7 @@ export MH
|
||||
cat > $MH <<EOT
|
||||
Path: $HOME/Mail
|
||||
mhetcdir: $abs_top_srcdir/mh/etc
|
||||
-moreproc: /bin/cat
|
||||
+moreproc: cat
|
||||
EOT
|
||||
MTSTAILOR=$HOME/mtstailor
|
||||
export MTSTAILOR
|
||||
diff --git a/testsuite/lib/mailutils.exp b/testsuite/lib/mailutils.exp
|
||||
index d4691d922..c1b056933 100644
|
||||
--- a/testsuite/lib/mailutils.exp
|
||||
+++ b/testsuite/lib/mailutils.exp
|
||||
@@ -728,7 +728,7 @@ proc mu_test_file {args} {
|
||||
set pattern [lrange $args 1 end]
|
||||
}
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
See https://lists.gnu.org/archive/html/bug-mailutils/2010-10/msg00005.html
|
||||
|
||||
diff -u mailutils-2.2/libmu_scm/mu_message.c mailutils-2.2.new/libmu_scm/mu_message.c
|
||||
--- mailutils-2.2/libmu_scm/mu_message.c 2010-04-18 10:29:07.000000000 -0700
|
||||
+++ mailutils-2.2.new/libmu_scm/mu_message.c 2016-07-03 21:18:53.746185547 -0700
|
||||
@@ -510,8 +510,8 @@
|
||||
{
|
||||
SCM car = SCM_CAR (lst);
|
||||
if (scm_is_string (car)
|
||||
&& mu_c_strncasecmp (scm_i_string_chars (car), name,
|
||||
- scm_i_string_length (car)) == 0)
|
||||
+ scm_c_string_length (car)) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
@ -3075,6 +3075,7 @@ with pkgs;
|
||||
mailpile = callPackage ../applications/networking/mailreaders/mailpile { };
|
||||
|
||||
mailutils = callPackage ../tools/networking/mailutils {
|
||||
guile = guile_2_0; # compilation fails with guile 2.2
|
||||
sasl = gsasl;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user