mailx: sync patches with Fedora; cross build support.

This commit is contained in:
Juan RP 2013-12-12 21:34:26 +01:00
parent 0c2a30d8b4
commit 53e7e08da9
5 changed files with 66 additions and 37 deletions

View File

@ -0,0 +1,13 @@
--- mailx-12.4.orig/collect.c 2012-09-12 16:07:53.653103796 -0400
+++ mailx-12.4/collect.c 2012-09-12 21:27:05.092259236 -0400
@@ -905,7 +905,9 @@ err:
if (collf != NULL) {
Fclose(collf);
collf = NULL;
- }
+ } else {
+ exit(1);
+ }
out:
if (collf != NULL) {
if ((cp = value("MAILX_TAIL")) != NULL) {

View File

@ -0,0 +1,12 @@
diff -upr mailx-12.5.orig/names.c mailx-12.5/names.c
--- mailx-12.5.orig/names.c 2006-03-04 01:32:16.000000000 +0100
+++ mailx-12.5/names.c 2012-11-01 15:28:43.883573793 +0100
@@ -357,7 +357,7 @@ outof(struct name *names, FILE *fo, stru
free_child(pid);
} else {
int f;
- if ((fout = Zopen(fname, "a", NULL)) == NULL) {
+ if ((fname == NULL) || ((fout = Zopen(fname, "a", NULL)) == NULL)) {
perror(fname);
senderr++;
goto cant;

View File

@ -0,0 +1,12 @@
diff -Nrbu mailx-12.5/lzw.c mailx-12.5-OK/lzw.c
--- mailx-12.5/lzw.c 2006-03-04 03:32:16.000000000 +0300
+++ mailx-12.5-OK/lzw.c 2011-08-17 16:30:01.000000000 +0400
@@ -516,6 +516,8 @@
/* Generate output characters in reverse order. */
while (code >= 256) {
+ if (stackp - de_stack >= HSIZE - 1)
+ return -1;
*stackp++ = tab_suffixof(code);
code = tab_prefixof(code);
}

View File

@ -0,0 +1,12 @@
diff -upr mailx-12.5.orig/main.c mailx-12.5/main.c
--- mailx-12.5.orig/main.c 2007-10-02 14:15:50.000000000 +0200
+++ mailx-12.5/main.c 2013-07-22 16:06:56.960765683 +0200
@@ -353,7 +353,7 @@ main(int argc, char *argv[])
case '?':
usage:
fprintf(stderr, catgets(catd, CATSET, 135,
-"Usage: %s -eiIUdEFntBDNHRV~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
+"Usage: %s -eiIUdEFntBDNHRVv~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users\n"), progname);
exit(2);
}
}

View File

@ -1,63 +1,43 @@
# Template file for 'mailx'
pkgname=mailx
version=12.5
revision=2
revision=3
patch_args="-Np1"
wrksrc=mailx-${version}
wrksrc="mailx-${version}"
makedepends="openssl-devel mit-krb5-devel"
short_desc="Feature-rich BSD mail(1)"
homepage="http://heirloom.sourceforge.net/mailx.html"
license="Custom"
license="BSD"
maintainer="Juan RP <xtraeme@gmail.com>"
distfiles="http://pkgs.fedoraproject.org/repo/pkgs/mailx/mailx-12.5.tar.xz/836bf1da322d2d1f78b7056c2b3b2304/${pkgname}-${version}.tar.xz"
distfiles="http://pkgs.fedoraproject.org/repo/pkgs/mailx/mailx-${version}.tar.xz/836bf1da322d2d1f78b7056c2b3b2304/${pkgname}-${version}.tar.xz"
checksum=1b8136fb2466adeaf71a5e3c65db9fa1a967f1f6469ff689c2cf06e21f638823
long_desc="
Mailx is an enhanced mail command, which provides the functionality
of the POSIX mailx command, as well as SysV mail and Berkeley Mail
(from which it is derived).
Additionally to the POSIX features, mailx can work with Maildir/ e-mail
storage format (as well as mailboxes), supports IMAP, POP3 and SMTP
procotols (including over SSL) to operate with remote hosts, handles mime
types and different charsets. There are a lot of other useful features,
see mailx(1).
And as its ancient analogues, mailx can be used as a mail script language,
both for sending and receiving mail.
Besides the "mailx" command, this package provides "mail" and "Mail"
(which should be compatible with its predecessors from the mailx-8.x source),
as well as "nail" (the initial name of this project)."
disable_parallel_build=yes
do_build() {
echo PREFIX=/usr \
BINDIR=/bin \
MANDIR=/usr/share/man \
SYSCONFDIR=/etc \
MAILRC=/etc/mail.rc \
echo PREFIX=/usr \
BINDIR=/usr/bin \
MANDIR=/usr/share/man \
SYSCONFDIR=/etc \
MAILRC=/etc/mail.rc \
MAILSPOOL=/var/spool/mail \
UCBINSTALL=install \
> ${wrksrc}/makeflags
UCBINSTALL=install \
STRIP=$STRIP \
SENDMAIL=/usr/bin/sendmail \
> makeflags
make $(cat makeflags) CFLAGS="${CFLAGS} -D_GNU_SOURCE" \
IPv6=-DHAVE_IPv6_FUNCS
make $(cat makeflags) IPv6=-DHAVE_IPv6_FUNCS \
CFLAGS="${CFLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
}
do_install() {
make DESTDIR=${DESTDIR} $(cat makeflags) install
ln -s mailx ${DESTDIR}/bin/mail
ln -s mailx ${DESTDIR}/bin/Mail
ln -s mailx ${DESTDIR}/usr/bin/mail
ln -s mailx.1 ${DESTDIR}/usr/share/man/man1/mail.1
ln -s mailx.1 ${DESTDIR}/usr/share/man/man1/Mail.1
}
mailx_package() {
conf_files="/etc/mail.rc"
pkg_install() {
vmove etc
vmove usr
vmove all
}
}