aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorobraun <obraun@FreeBSD.org>2003-05-01 04:45:08 +0800
committerobraun <obraun@FreeBSD.org>2003-05-01 04:45:08 +0800
commit220cdc0964aff60b35abdf5b9de375996ed70e91 (patch)
tree4272575e0e4bdb2f4cbfcb1d9a861f6b4039cafd /mail
parentf15ff62a706f5451d1400a9c91a921f343029492 (diff)
downloadfreebsd-ports-graphics-220cdc0964aff60b35abdf5b9de375996ed70e91.tar.gz
freebsd-ports-graphics-220cdc0964aff60b35abdf5b9de375996ed70e91.tar.zst
freebsd-ports-graphics-220cdc0964aff60b35abdf5b9de375996ed70e91.zip
* Fix handling of hostname if hostname contains more than 31 characters
for FreeBSD versions before 5.x. * Bump PORTREVISION. PR: ports/51621, ports/51622 Submitted by: maintainer
Diffstat (limited to 'mail')
-rw-r--r--mail/mutt-devel/Makefile2
-rw-r--r--mail/mutt-devel/files/patch-init.c49
-rw-r--r--mail/mutt/Makefile2
-rw-r--r--mail/mutt/files/patch-init.c49
-rw-r--r--mail/mutt14/Makefile2
-rw-r--r--mail/mutt14/files/patch-init.c49
6 files changed, 150 insertions, 3 deletions
diff --git a/mail/mutt-devel/Makefile b/mail/mutt-devel/Makefile
index 67f44562903..e664741a4e5 100644
--- a/mail/mutt-devel/Makefile
+++ b/mail/mutt-devel/Makefile
@@ -66,7 +66,7 @@
PORTNAME= mutt-devel
PORTVERSION= 1.5.4
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES+= mail
.if defined(WITH_MUTT_NNTP)
CATEGORIES+= news
diff --git a/mail/mutt-devel/files/patch-init.c b/mail/mutt-devel/files/patch-init.c
new file mode 100644
index 00000000000..4d0363a9c1b
--- /dev/null
+++ b/mail/mutt-devel/files/patch-init.c
@@ -0,0 +1,49 @@
+--- init.c.orig Wed Jul 24 10:41:29 2002
++++ init.c Wed Apr 30 13:06:45 2003
+@@ -45,7 +45,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#if __FreeBSD_version >= 500000
+ #include <sys/utsname.h>
++#endif
+ #include <errno.h>
+ #include <sys/wait.h>
+
+@@ -1707,7 +1709,11 @@
+ void mutt_init (int skip_sys_rc, LIST *commands)
+ {
+ struct passwd *pw;
++#if __FreeBSD_version < 500000
++ char nodename[STRING];
++#else
+ struct utsname utsname;
++#endif
+ char *p, buffer[STRING], error[STRING];
+ int i, default_rc = 0, need_pause = 0;
+ BUFFER err;
+@@ -1765,16 +1771,21 @@
+ #endif
+
+ /* And about the host... */
++#if __FreeBSD_version < 500000
++ gethostname(nodename, sizeof (nodename));
++#else
+ uname (&utsname);
++ strfcpy (nodename, utsname.nodename, sizeof (nodename));
++#endif
+ /* some systems report the FQDN instead of just the hostname */
+- if ((p = strchr (utsname.nodename, '.')))
++ if ((p = strchr (nodename, '.')))
+ {
+- Hostname = mutt_substrdup (utsname.nodename, p);
++ Hostname = mutt_substrdup (nodename, p);
+ p++;
+ strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
+ }
+ else
+- Hostname = safe_strdup (utsname.nodename);
++ Hostname = safe_strdup (nodename);
+
+ #ifndef DOMAIN
+ #define DOMAIN buffer
diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile
index d3225f3eadb..83a0aeaaab6 100644
--- a/mail/mutt/Makefile
+++ b/mail/mutt/Makefile
@@ -8,7 +8,7 @@
PORTNAME= mutt
PORTVERSION= 1.4.1
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES+= mail
MASTER_SITES= ftp://ftp.mutt.org/mutt/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
diff --git a/mail/mutt/files/patch-init.c b/mail/mutt/files/patch-init.c
new file mode 100644
index 00000000000..4d0363a9c1b
--- /dev/null
+++ b/mail/mutt/files/patch-init.c
@@ -0,0 +1,49 @@
+--- init.c.orig Wed Jul 24 10:41:29 2002
++++ init.c Wed Apr 30 13:06:45 2003
+@@ -45,7 +45,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#if __FreeBSD_version >= 500000
+ #include <sys/utsname.h>
++#endif
+ #include <errno.h>
+ #include <sys/wait.h>
+
+@@ -1707,7 +1709,11 @@
+ void mutt_init (int skip_sys_rc, LIST *commands)
+ {
+ struct passwd *pw;
++#if __FreeBSD_version < 500000
++ char nodename[STRING];
++#else
+ struct utsname utsname;
++#endif
+ char *p, buffer[STRING], error[STRING];
+ int i, default_rc = 0, need_pause = 0;
+ BUFFER err;
+@@ -1765,16 +1771,21 @@
+ #endif
+
+ /* And about the host... */
++#if __FreeBSD_version < 500000
++ gethostname(nodename, sizeof (nodename));
++#else
+ uname (&utsname);
++ strfcpy (nodename, utsname.nodename, sizeof (nodename));
++#endif
+ /* some systems report the FQDN instead of just the hostname */
+- if ((p = strchr (utsname.nodename, '.')))
++ if ((p = strchr (nodename, '.')))
+ {
+- Hostname = mutt_substrdup (utsname.nodename, p);
++ Hostname = mutt_substrdup (nodename, p);
+ p++;
+ strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
+ }
+ else
+- Hostname = safe_strdup (utsname.nodename);
++ Hostname = safe_strdup (nodename);
+
+ #ifndef DOMAIN
+ #define DOMAIN buffer
diff --git a/mail/mutt14/Makefile b/mail/mutt14/Makefile
index d3225f3eadb..83a0aeaaab6 100644
--- a/mail/mutt14/Makefile
+++ b/mail/mutt14/Makefile
@@ -8,7 +8,7 @@
PORTNAME= mutt
PORTVERSION= 1.4.1
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES+= mail
MASTER_SITES= ftp://ftp.mutt.org/mutt/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
diff --git a/mail/mutt14/files/patch-init.c b/mail/mutt14/files/patch-init.c
new file mode 100644
index 00000000000..4d0363a9c1b
--- /dev/null
+++ b/mail/mutt14/files/patch-init.c
@@ -0,0 +1,49 @@
+--- init.c.orig Wed Jul 24 10:41:29 2002
++++ init.c Wed Apr 30 13:06:45 2003
+@@ -45,7 +45,9 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
++#if __FreeBSD_version >= 500000
+ #include <sys/utsname.h>
++#endif
+ #include <errno.h>
+ #include <sys/wait.h>
+
+@@ -1707,7 +1709,11 @@
+ void mutt_init (int skip_sys_rc, LIST *commands)
+ {
+ struct passwd *pw;
++#if __FreeBSD_version < 500000
++ char nodename[STRING];
++#else
+ struct utsname utsname;
++#endif
+ char *p, buffer[STRING], error[STRING];
+ int i, default_rc = 0, need_pause = 0;
+ BUFFER err;
+@@ -1765,16 +1771,21 @@
+ #endif
+
+ /* And about the host... */
++#if __FreeBSD_version < 500000
++ gethostname(nodename, sizeof (nodename));
++#else
+ uname (&utsname);
++ strfcpy (nodename, utsname.nodename, sizeof (nodename));
++#endif
+ /* some systems report the FQDN instead of just the hostname */
+- if ((p = strchr (utsname.nodename, '.')))
++ if ((p = strchr (nodename, '.')))
+ {
+- Hostname = mutt_substrdup (utsname.nodename, p);
++ Hostname = mutt_substrdup (nodename, p);
+ p++;
+ strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
+ }
+ else
+- Hostname = safe_strdup (utsname.nodename);
++ Hostname = safe_strdup (nodename);
+
+ #ifndef DOMAIN
+ #define DOMAIN buffer