[90369] trunk/dports/mail/mailx
ryandesign at macports.org
ryandesign at macports.org
Sat Mar 3 13:34:27 PST 2012
Revision: 90369
http://trac.macports.org/changeset/90369
Author: ryandesign at macports.org
Date: 2012-03-03 13:34:22 -0800 (Sat, 03 Mar 2012)
Log Message:
-----------
mailx:
* add dependencies on kerberos5, libiconv and openssl which mailx does use (#32710)
* apply upstream patches for compatibility with openssl 1.0.0 (#32710)
* build for the right architectures (#32715)
* run makeconfig in the configure phase, instead of letting it run possibly multiple times in parallel in the build phase
* do reinplace in post-patch phase instead of configure
Modified Paths:
--------------
trunk/dports/mail/mailx/Portfile
Added Paths:
-----------
trunk/dports/mail/mailx/files/patch-makeconfig
trunk/dports/mail/mailx/files/patch-openssl.c
Modified: trunk/dports/mail/mailx/Portfile
===================================================================
--- trunk/dports/mail/mailx/Portfile 2012-03-03 20:20:03 UTC (rev 90368)
+++ trunk/dports/mail/mailx/Portfile 2012-03-03 21:34:22 UTC (rev 90369)
@@ -3,6 +3,7 @@
PortSystem 1.0
name mailx
version 12.4
+revision 1
categories mail
maintainers toby
description Heirloom mailx
@@ -22,18 +23,29 @@
sha1 b1e105adf9d36269daf317dedf68b6e4cca404a7 \
rmd160 8244d04d0a0058fdbe9867ca503c7cda8d580154
+depends_lib port:kerberos5 \
+ port:libiconv \
+ port:openssl
+
patchfiles patch-Makefile \
patch-junk.c \
- patch-maildir.c
+ patch-maildir.c \
+ patch-makeconfig \
+ patch-openssl.c
-configure {
+post-patch {
reinplace "s|__PREFIX__|${prefix}|" "${worksrcpath}/Makefile"
reinplace "s|__DESTROOT__|${destroot}|" "${worksrcpath}/Makefile"
reinplace "s|__CC__|${configure.cc}|" "${worksrcpath}/Makefile"
- reinplace "s|__CFLAGS__|${configure.cflags}|" "${worksrcpath}/Makefile"
- reinplace "s|__LDFLAGS__|${configure.ldflags}|" "${worksrcpath}/Makefile"
+ reinplace "s|__CFLAGS__|${configure.cflags} [get_canonical_archflags cc]|" "${worksrcpath}/Makefile"
+ reinplace "s|__LDFLAGS__|${configure.ldflags} [get_canonical_archflags ld]|" "${worksrcpath}/Makefile"
}
+configure.cmd /bin/sh
+configure.args makeconfig
+configure.pre_args
+configure.universal_args
+
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex Release (\[^ \]+) \\(current\\)
Added: trunk/dports/mail/mailx/files/patch-makeconfig
===================================================================
--- trunk/dports/mail/mailx/files/patch-makeconfig (rev 0)
+++ trunk/dports/mail/mailx/files/patch-makeconfig 2012-03-03 21:34:22 UTC (rev 90369)
@@ -0,0 +1,28 @@
+--- makeconfig 2007/04/14 15:26:00 1.14
++++ makeconfig 2009/05/26 21:04:15 1.15
+@@ -393,6 +393,25 @@
+ !
+ fi
+
++if test x$have_openssl = xyes
++then
++ compile_check stack_of 'for STACK_OF()' '#define HAVE_STACK_OF' <<\!
++#include <openssl/ssl.h>
++#include <openssl/err.h>
++#include <openssl/x509v3.h>
++#include <openssl/x509.h>
++#include <openssl/rand.h>
++
++int main(void)
++{
++ STACK_OF(GENERAL_NAME) *gens = NULL;
++ printf("%p", gens); /* to make it used */
++ SSLv23_client_method();
++ PEM_read_PrivateKey(0, 0, 0, 0);
++ return 0;
++}
++!
++fi
+
+ cat >$tmp2.c <<\!
+ #include <gssapi/gssapi.h>
Added: trunk/dports/mail/mailx/files/patch-openssl.c
===================================================================
--- trunk/dports/mail/mailx/files/patch-openssl.c (rev 0)
+++ trunk/dports/mail/mailx/files/patch-openssl.c 2012-03-03 21:34:22 UTC (rev 90369)
@@ -0,0 +1,121 @@
+--- openssl.c 2007/08/04 11:41:36 1.12
++++ openssl.c 2009/05/26 21:04:15 1.13
+@@ -101,12 +101,17 @@
+ static int ssl_rand_init(void);
+ static void ssl_init(void);
+ static int ssl_verify_cb(int success, X509_STORE_CTX *store);
+-static SSL_METHOD *ssl_select_method(const char *uhp);
++static const SSL_METHOD *ssl_select_method(const char *uhp);
+ static void ssl_load_verifications(struct sock *sp);
+ static void ssl_certificate(struct sock *sp, const char *uhp);
+ static enum okay ssl_check_host(const char *server, struct sock *sp);
++#ifdef HAVE_STACK_OF
++static int smime_verify(struct message *m, int n, STACK_OF(X509) *chain,
++ X509_STORE *store);
++#else
+ static int smime_verify(struct message *m, int n, STACK *chain,
+ X509_STORE *store);
++#endif
+ static EVP_CIPHER *smime_cipher(const char *name);
+ static int ssl_password_cb(char *buf, int size, int rwflag, void *userdata);
+ static FILE *smime_sign_cert(const char *xname, const char *xname2, int warn);
+@@ -203,10 +208,10 @@
+ return 1;
+ }
+
+-static SSL_METHOD *
++static const SSL_METHOD *
+ ssl_select_method(const char *uhp)
+ {
+- SSL_METHOD *method;
++ const SSL_METHOD *method;
+ char *cp;
+
+ cp = ssl_method_string(uhp);
+@@ -308,7 +313,11 @@
+ X509 *cert;
+ X509_NAME *subj;
+ char data[256];
++#ifdef HAVE_STACK_OF
++ STACK_OF(GENERAL_NAME) *gens;
++#else
+ /*GENERAL_NAMES*/STACK *gens;
++#endif
+ GENERAL_NAME *gen;
+ int i;
+
+@@ -357,7 +366,8 @@
+
+ ssl_init();
+ ssl_set_vrfy_level(uhp);
+- if ((sp->s_ctx = SSL_CTX_new(ssl_select_method(uhp))) == NULL) {
++ if ((sp->s_ctx =
++ SSL_CTX_new((SSL_METHOD *)ssl_select_method(uhp))) == NULL) {
+ ssl_gen_err(catgets(catd, CATSET, 261, "SSL_CTX_new() failed"));
+ return STOP;
+ }
+@@ -496,7 +506,11 @@
+ }
+
+ static int
++#ifdef HAVE_STACK_OF
++smime_verify(struct message *m, int n, STACK_OF(X509) *chain, X509_STORE *store)
++#else
+ smime_verify(struct message *m, int n, STACK *chain, X509_STORE *store)
++#endif
+ {
+ struct message *x;
+ char *cp, *sender, *to, *cc, *cnttype;
+@@ -505,7 +519,12 @@
+ off_t size;
+ BIO *fb, *pb;
+ PKCS7 *pkcs7;
++#ifdef HAVE_STACK_OF
++ STACK_OF(X509) *certs;
++ STACK_OF(GENERAL_NAME) *gens;
++#else
+ STACK *certs, *gens;
++#endif
+ X509 *cert;
+ X509_NAME *subj;
+ char data[LINESIZE];
+@@ -614,7 +633,11 @@
+ {
+ int *msgvec = vp, *ip;
+ int ec = 0;
++#ifdef HAVE_STACK_OF
++ STACK_OF(X509) *chain = NULL;
++#else
+ STACK *chain = NULL;
++#endif
+ X509_STORE *store;
+ char *ca_dir, *ca_file;
+
+@@ -687,7 +710,11 @@
+ X509 *cert;
+ PKCS7 *pkcs7;
+ BIO *bb, *yb;
++#ifdef HAVE_STACK_OF
++ STACK_OF(X509) *certs;
++#else
+ STACK *certs;
++#endif
+ EVP_CIPHER *cipher;
+
+ certfile = expand((char *)certfile);
+@@ -950,9 +977,14 @@
+ off_t size;
+ BIO *fb, *pb;
+ PKCS7 *pkcs7;
++#ifdef HAVE_STACK_OF
++ STACK_OF(X509) *certs;
++ STACK_OF(X509) *chain = NULL;
++#else
+ STACK *certs;
+- X509 *cert;
+ STACK *chain = NULL;
++#endif
++ X509 *cert;
+ enum okay ok = OKAY;
+
+ message_number = n;
Property changes on: trunk/dports/mail/mailx/files/patch-openssl.c
___________________________________________________________________
Added: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120303/94f32148/attachment.html>
More information about the macports-changes
mailing list