Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jan 2005 15:50:28 +0100 (MET)
From:      "Olli Hauer" <ohauer@gmx.de>
To:        perl@FreeBSD.org <perl@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: p5-Mail-SpamAssassin-3.0.2
Message-ID:  <29682.1105195828@www47.gmx.net>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello,

perhaps i found a missing modul at p5-Mail-SpamAssassin.

The install instruction for Mail-SpamAssassin say for SSL:
  - IO::Socket::SSL (from CPAN)

    If you wish to use SSL encryption to communicate between spamc and
    spamd (the --ssl option to spamd), you need to install this
    module. (You will need the OpenSSL libraries and use the
    ENABLE_SSL="yes" argument to Makefile.PL to build and run an SSL
    compatibile spamc.)


I have written a little patch for the Makefile and also added the 
option dialog. One thing i could not fix is "make fetch-recursive" to 
get all the ssl stuff for the port if ssl is enabled and "make config" 
was not executed before -> so i switch this off.

here is my patch (i hope you like it).
----

--- Makefile~	Sat Jan  8 14:54:53 2005
+++ Makefile	Sat Jan  8 15:18:46 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.0.2
+PORTREVISION=	1
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/}
${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/:apache Mail/:cpan
@@ -27,11 +28,23 @@
 	       	CONTACT_ADDRESS="the administrator of that system" \
 		BUILD_SPAMC=yes RUN_NET_TESTS=yes
 
+OPTIONS=	OPENSSL		"enable SSL between spamc and spamd"	off \
+		MYSQL		"add MySQL support"			off \
+		PGSQL		"add PostgreSQL support"		off \
+		SPF_QUERY	"add SPF query support"			off
+
+.include <bsd.port.pre.mk>
+
 .if defined(WITH_SPF_QUERY)
 RUN_DEPENDS+=	spfd:${PORTSDIR}/mail/p5-Mail-SPF-Query
 .endif
 
-.if !defined(WITHOUT_OPENSSL)
+.if defined(WITH_OPENSSL)
+# we need to .include bsd.openssl.mk manually here because USE_OPENSSL only
+# works when it is defined before bsd.port{.pre}.mk is .included and this
is
+# not possible when using OPTIONS
+.include
"${PORTSDIR}/Mk/bsd.openssl.mk"
+RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
 USE_OPENSSL=	yes
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}
@@ -93,19 +106,6 @@
 SED_SCRIPT+=	-e 's|%%SQL%%||g'
 .endif
 
-pre-patch:
-	@${ECHO_MSG} ""
-	@${ECHO_MSG}
"================================================================"
-	@${ECHO_MSG} "You can use folowed options to install SpamAssassin with"
-	@${ECHO_MSG} "	an addition features:"
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "WITHOUT_SSL=yes	 - disable SSL,"
-	@${ECHO_MSG} "WITH_MYSQL=yes	 - add MySQL support,"
-	@${ECHO_MSG} "WITH_PGSQL=yes	 - add PostgreSQL support,"
-	@${ECHO_MSG} "WITH_SPF_QUERY=yes - add SPF query support."
-	@${ECHO_MSG}
"================================================================"
-	@${ECHO_MSG} ""
-
 post-patch:
 	@${FIND} ${WRKSRC} -name \*.orig -delete
 	@${SED} -e 's#B_CONFDIR)/local.cf#B_CONFDIR)/local.cf.sample#g' \
@@ -132,8 +132,6 @@
 
 .endif
 	@${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE}
-
-.include <bsd.port.pre.mk>


----
olli

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
1 GB Mailbox bereits in GMX FreeMail http://www.gmx.net/de/go/mail
[-- Attachment #2 --]
--- Makefile~	Sat Jan  8 14:54:53 2005
+++ Makefile	Sat Jan  8 15:18:46 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.0.2
+PORTREVISION=	1
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/:apache Mail/:cpan
@@ -27,11 +28,23 @@
 	       	CONTACT_ADDRESS="the administrator of that system" \
 		BUILD_SPAMC=yes RUN_NET_TESTS=yes
 
+OPTIONS=	OPENSSL		"enable SSL between spamc and spamd"	off \
+		MYSQL		"add MySQL support"			off \
+		PGSQL		"add PostgreSQL support"		off \
+		SPF_QUERY	"add SPF query support"			off
+
+.include <bsd.port.pre.mk>
+
 .if defined(WITH_SPF_QUERY)
 RUN_DEPENDS+=	spfd:${PORTSDIR}/mail/p5-Mail-SPF-Query
 .endif
 
-.if !defined(WITHOUT_OPENSSL)
+.if defined(WITH_OPENSSL)
+# we need to .include bsd.openssl.mk manually here because USE_OPENSSL only
+# works when it is defined before bsd.port{.pre}.mk is .included and this is
+# not possible when using OPTIONS
+.include "${PORTSDIR}/Mk/bsd.openssl.mk"
+RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
 USE_OPENSSL=	yes
 CFLAGS+=	-I${OPENSSLINC}
 LDFLAGS+=	-L${OPENSSLLIB}
@@ -93,19 +106,6 @@
 SED_SCRIPT+=	-e 's|%%SQL%%||g'
 .endif
 
-pre-patch:
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "================================================================"
-	@${ECHO_MSG} "You can use folowed options to install SpamAssassin with"
-	@${ECHO_MSG} "	an addition features:"
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "WITHOUT_SSL=yes	 - disable SSL,"
-	@${ECHO_MSG} "WITH_MYSQL=yes	 - add MySQL support,"
-	@${ECHO_MSG} "WITH_PGSQL=yes	 - add PostgreSQL support,"
-	@${ECHO_MSG} "WITH_SPF_QUERY=yes - add SPF query support."
-	@${ECHO_MSG} "================================================================"
-	@${ECHO_MSG} ""
-
 post-patch:
 	@${FIND} ${WRKSRC} -name \*.orig -delete
 	@${SED} -e 's#B_CONFDIR)/local.cf#B_CONFDIR)/local.cf.sample#g' \
@@ -132,8 +132,6 @@
 
 .endif
 	@${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE}
-
-.include <bsd.port.pre.mk>
 
 .if ${PERL_LEVEL} < 500600
 IGNORE=	Needs perl 5.6.1 or higher, install lang/perl5.8 and try again

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29682.1105195828>