aboutsummaryrefslogtreecommitdiffstats
path: root/mail/openwebmail/Makefile
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2004-10-13 10:02:55 +0800
committerleeym <leeym@FreeBSD.org>2004-10-13 10:02:55 +0800
commitc2c0f3acbdc0b36c3b86d877e64e2c8dff20a3ae (patch)
treeae2d9c3136eab4f5d7d902ec8e2e29e6dc20b847 /mail/openwebmail/Makefile
parent7d223fe2f123c8525a0c5594ae2e8bcc25341ff4 (diff)
downloadfreebsd-ports-gnome-c2c0f3acbdc0b36c3b86d877e64e2c8dff20a3ae.tar.gz
freebsd-ports-gnome-c2c0f3acbdc0b36c3b86d877e64e2c8dff20a3ae.tar.zst
freebsd-ports-gnome-c2c0f3acbdc0b36c3b86d877e64e2c8dff20a3ae.zip
- upgrade to openwebmail-2.41
- disable SpeedyCGI support automatically when PERL isn't suid-enabled.
Diffstat (limited to 'mail/openwebmail/Makefile')
-rw-r--r--mail/openwebmail/Makefile23
1 files changed, 19 insertions, 4 deletions
diff --git a/mail/openwebmail/Makefile b/mail/openwebmail/Makefile
index 587d11a89667..fd201a6cfb64 100644
--- a/mail/openwebmail/Makefile
+++ b/mail/openwebmail/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= openwebmail
-PORTVERSION= 2.40
+PORTVERSION= 2.41
CATEGORIES= mail
MASTER_SITES= http://openwebmail.org/openwebmail/download/release/ \
http://turtle.ee.ncku.edu.tw/openwebmail/download/release/
@@ -20,8 +20,8 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Text/Iconv.pm:${PORTSDIR}/converters/p5-T
USE_PERL5= yes
NO_BUILD= yes
NO_WRKSUBDIR= yes
-OWCGIDIR?= ${PREFIX}/www/cgi-bin/openwebmail
-OWDATADIR?= ${PREFIX}/www/data/openwebmail
+OWCGIDIR= ${PREFIX}/www/cgi-bin/openwebmail
+OWDATADIR= ${PREFIX}/www/data/openwebmail
PATCH_WRKSRC= ${WRKSRC}/cgi-bin/openwebmail
PATCH_STRIP= -p1
PLIST= ${WRKDIR}/.PLIST.${PKGNAME}
@@ -42,6 +42,14 @@ OPTIONS= ANTIWORD "AntiWord" off \
.include <bsd.port.pre.mk>
+# WITH_SPEEDYCGI needs suidperl enabled under perl5.8
+PERL_V!= ${PERL} -V
+.if ${PERL_LEVEL} > 500800 && ${PERL_V:M*dosuid*} == "" && defined(WITH_SPEEDYCGI)
+DISABLE_SPEEDYCGI=yes
+WITHOUT_SPEEDYCGI=yes
+.undef WITH_SPEEDYCGI
+.endif
+
.if ${PERL_LEVEL} < 500800
RUN_DEPENDS+= ${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \
${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
@@ -103,6 +111,14 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p
.endif
post-patch:
+.if defined(DISABLE_SPEEDYCGI)
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "WARNING:"
+ @${ECHO_MSG} "Your perl doesn't support SUID, so SpeedyCGI support is disabled automatically."
+ @${ECHO_MSG} "If you want SpeedyCGI support, please reinstall perl with ENABLE_SUIDPERL=yes,"
+ @${ECHO_MSG} "and reinstall ${PORTNAME} again."
+ @${ECHO_MSG} ""
+.endif
@${MV} ${PATCH_WRKSRC}/etc/openwebmail.conf ${PATCH_WRKSRC}/etc/openwebmail.conf-dist
@${PERL} -pi.bak -e 's,${LOCALBASE}/www/cgi-bin/openwebmail,${OWCGIDIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf-dist
@${PERL} -pi.bak -e 's,${LOCALBASE}/www/data/openwebmail,${OWDATADIR},g' ${PATCH_WRKSRC}/etc/openwebmail.conf-dist
@@ -122,7 +138,6 @@ post-patch:
@${ECHO} "viruscheck_source_allowed all" >> ${PATCH_WRKSRC}/etc/openwebmail.conf-dist
.endif
.if defined(WITH_SPEEDYCGI)
- @${PERL} -pi.bak -e 's,speedy_suidperl -T,speedy_suidperl,g' ${PATCH_WRKSRC}/openwebmail*pl
@${ECHO} "has_savedsuid_support no" >> ${PATCH_WRKSRC}/etc/openwebmail.conf-dist
.else
@${PERL} -pi.bak -e 's,/usr/bin/suidperl,${PERL},g' ${PATCH_WRKSRC}/openwebmail*pl