summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2011-04-23 17:17:27 +0000
committerFabian Groffen <grobian@gentoo.org>2011-04-23 17:17:27 +0000
commit4b8b8079301a7257ad3b1089f1770a0e95444005 (patch)
treedc76bf60aed781fcc0f8b906eb59d1b1eb63b0ed /mail-mta/ssmtp
parentalpha/ia64/sparc stable wrt #358407 (diff)
downloadgentoo-2-4b8b8079301a7257ad3b1089f1770a0e95444005.tar.gz
gentoo-2-4b8b8079301a7257ad3b1089f1770a0e95444005.tar.bz2
gentoo-2-4b8b8079301a7257ad3b1089f1770a0e95444005.zip
Fix compilation on Solaris, fix installation on Prefix
(Portage version: 2.2.01.18252-prefix/cvs/Darwin powerpc)
Diffstat (limited to 'mail-mta/ssmtp')
-rw-r--r--mail-mta/ssmtp/ChangeLog6
-rw-r--r--mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch129
-rw-r--r--mail-mta/ssmtp/ssmtp-2.64-r2.ebuild8
3 files changed, 139 insertions, 4 deletions
diff --git a/mail-mta/ssmtp/ChangeLog b/mail-mta/ssmtp/ChangeLog
index 5f1579f846e7..b83dc0ec5f81 100644
--- a/mail-mta/ssmtp/ChangeLog
+++ b/mail-mta/ssmtp/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for mail-mta/ssmtp
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ChangeLog,v 1.111 2011/04/22 16:17:26 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ChangeLog,v 1.112 2011/04/23 17:17:27 grobian Exp $
+
+ 23 Apr 2011; Fabian Groffen <grobian@gentoo.org> ssmtp-2.64-r2.ebuild,
+ +files/ssmtp-2.64-uint32_t.patch:
+ Fix compilation on Solaris, fix installation on Prefix
*ssmtp-2.64-r2 (22 Apr 2011)
diff --git a/mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch b/mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch
new file mode 100644
index 000000000000..cc4ab466e6f0
--- /dev/null
+++ b/mail-mta/ssmtp/files/ssmtp-2.64-uint32_t.patch
@@ -0,0 +1,129 @@
+Use C99 standard's uint32_t
+
+--- md5auth/md5.h
++++ md5auth/md5.h
+@@ -23,10 +23,12 @@
+ documentation and/or software.
+ */
+
++#include <stdint.h>
++
+ /* MD5 context. */
+ typedef struct {
+- u_int32_t state[4]; /* state (ABCD) */
+- u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
++ uint32_t state[4]; /* state (ABCD) */
++ uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
+ unsigned char buffer[64]; /* input buffer */
+ } MD5_CTX;
+
+--- md5auth/md5c.c
++++ md5auth/md5c.c
+@@ -46,11 +46,11 @@
+ #define S43 15
+ #define S44 21
+
+-static void MD5Transform PROTO_LIST ((u_int32_t [4], unsigned char [64]));
++static void MD5Transform PROTO_LIST ((uint32_t [4], unsigned char [64]));
+ static void Encode PROTO_LIST
+- ((unsigned char *, u_int32_t *, unsigned int));
++ ((unsigned char *, uint32_t *, unsigned int));
+ static void Decode PROTO_LIST
+- ((u_int32_t *, unsigned char *, unsigned int));
++ ((uint32_t *, unsigned char *, unsigned int));
+ static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
+ static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
+
+@@ -75,22 +75,22 @@
+ Rotation is separate from addition to prevent recomputation.
+ */
+ #define FF(a, b, c, d, x, s, ac) { \
+- (a) += F ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
++ (a) += F ((b), (c), (d)) + (x) + (uint32_t)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ }
+ #define GG(a, b, c, d, x, s, ac) { \
+- (a) += G ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
++ (a) += G ((b), (c), (d)) + (x) + (uint32_t)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ }
+ #define HH(a, b, c, d, x, s, ac) { \
+- (a) += H ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
++ (a) += H ((b), (c), (d)) + (x) + (uint32_t)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ }
+ #define II(a, b, c, d, x, s, ac) { \
+- (a) += I ((b), (c), (d)) + (x) + (u_int32_t)(ac); \
++ (a) += I ((b), (c), (d)) + (x) + (uint32_t)(ac); \
+ (a) = ROTATE_LEFT ((a), (s)); \
+ (a) += (b); \
+ }
+@@ -124,10 +124,10 @@
+ index = (unsigned int)((context->count[0] >> 3) & 0x3F);
+
+ /* Update number of bits */
+- if ((context->count[0] += ((u_int32_t)inputLen << 3))
+- < ((u_int32_t)inputLen << 3))
++ if ((context->count[0] += ((uint32_t)inputLen << 3))
++ < ((uint32_t)inputLen << 3))
+ context->count[1]++;
+- context->count[1] += ((u_int32_t)inputLen >> 29);
++ context->count[1] += ((uint32_t)inputLen >> 29);
+
+ partLen = 64 - index;
+
+@@ -184,10 +184,10 @@
+ /* MD5 basic transformation. Transforms state based on block.
+ */
+ static void MD5Transform (state, block)
+-u_int32_t state[4];
++uint32_t state[4];
+ unsigned char block[64];
+ {
+- u_int32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
++ uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
+
+ Decode (x, block, 64);
+
+@@ -273,12 +273,12 @@
+ MD5_memset ((POINTER)x, 0, sizeof (x));
+ }
+
+-/* Encodes input (u_int32_t) into output (unsigned char). Assumes len is
++/* Encodes input (uint32_t) into output (unsigned char). Assumes len is
+ a multiple of 4.
+ */
+ static void Encode (output, input, len)
+ unsigned char *output;
+-u_int32_t *input;
++uint32_t *input;
+ unsigned int len;
+ {
+ unsigned int i, j;
+@@ -291,19 +291,19 @@
+ }
+ }
+
+-/* Decodes input (unsigned char) into output (u_int32_t). Assumes len is
++/* Decodes input (unsigned char) into output (uint32_t). Assumes len is
+ a multiple of 4.
+ */
+ static void Decode (output, input, len)
+-u_int32_t *output;
++uint32_t *output;
+ unsigned char *input;
+ unsigned int len;
+ {
+ unsigned int i, j;
+
+ for (i = 0, j = 0; j < len; i++, j += 4)
+- output[i] = ((u_int32_t)input[j]) | (((u_int32_t)input[j+1]) << 8) |
+- (((u_int32_t)input[j+2]) << 16) | (((u_int32_t)input[j+3]) << 24);
++ output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
++ (((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
+ }
+
+ /* Note: Replace "for loop" with standard memcpy if possible.
diff --git a/mail-mta/ssmtp/ssmtp-2.64-r2.ebuild b/mail-mta/ssmtp/ssmtp-2.64-r2.ebuild
index 3871d7b70af3..e14de77c4fd8 100644
--- a/mail-mta/ssmtp/ssmtp-2.64-r2.ebuild
+++ b/mail-mta/ssmtp/ssmtp-2.64-r2.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-mta/ssmtp/ssmtp-2.64-r2.ebuild,v 1.1 2011/04/22 16:17:26 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ssmtp-2.64-r2.ebuild,v 1.2 2011/04/23 17:17:27 grobian Exp $
EAPI="4"
@@ -51,6 +51,8 @@ src_prepare() {
EPATCH_SUFFIX="patch" EPATCH_SOURCE="${WORKDIR}/patches" \
epatch
+ epatch "${FILESDIR}"/${P}-uint32_t.patch
+
eautoconf
}
@@ -92,10 +94,10 @@ src_install() {
# Set restrictive perms on ssmtp.conf as per #187841, #239197
# Protect the ssmtp configfile from being readable by regular users as it
# may contain login/password data to auth against a the mailhub used.
- fowners root:ssmtp /etc/ssmtp/ssmtp.conf
+ use prefix || fowners root:ssmtp /etc/ssmtp/ssmtp.conf
fperms 640 /etc/ssmtp/ssmtp.conf
- fowners root:ssmtp /usr/sbin/ssmtp
+ use prefix || fowners root:ssmtp /usr/sbin/ssmtp
fperms 2711 /usr/sbin/ssmtp
if use mta; then