diff options
author | petef <petef@FreeBSD.org> | 2001-08-29 14:51:10 +0800 |
---|---|---|
committer | petef <petef@FreeBSD.org> | 2001-08-29 14:51:10 +0800 |
commit | d9844f595f2de01e2a37ed5af708cbb5d22d70e7 (patch) | |
tree | 5eb8fccab3a51bcb7d6d42b3a7b8eba9f47aee45 /mail | |
parent | ef4ebbc5dd09b9af27095227f138e153fe7c5253 (diff) | |
download | freebsd-ports-gnome-d9844f595f2de01e2a37ed5af708cbb5d22d70e7.tar.gz freebsd-ports-gnome-d9844f595f2de01e2a37ed5af708cbb5d22d70e7.tar.zst freebsd-ports-gnome-d9844f595f2de01e2a37ed5af708cbb5d22d70e7.zip |
- Make SHA1 cookies optional and MD5 the default
- add USE_PERL5
- /usr/bin/perl -> ${PERL}
PR: 30118
Submitted by: maintainer
Diffstat (limited to 'mail')
-rw-r--r-- | mail/majordomo/Makefile | 19 | ||||
-rw-r--r-- | mail/majordomo/files/patch-bf | 4 |
2 files changed, 17 insertions, 6 deletions
diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile index 206628d650f2..d3a7913bc925 100644 --- a/mail/majordomo/Makefile +++ b/mail/majordomo/Makefile @@ -12,10 +12,16 @@ CATEGORIES= mail MASTER_SITES= ftp://ftp.greatcircle.com/pub/majordomo/1.94.5/ \ ftp://ftp.sgi.com/other/majordomo/1.94.5/ EXTRACT_SUFX= .tgz -RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 MAINTAINER= anders@fix.no +.if defined(WITH_SHA1_COOKIES) +RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-Digest-SHA1 +.else +RUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 +.endif +USE_PERL5= yes + # Needs to create a user and group IS_INTERACTIVE= yes NO_PACKAGE= "User and group need to be created" @@ -24,19 +30,24 @@ INSTALL_TARGET= install install-wrapper MAN1= approve.1 bounce-remind.1 digest.1 MAN8= majordomo.8 -.if defined(WITH_POSTFIX_APPROVE_PATCH) post-patch: +.if defined(WITH_POSTFIX_APPROVE_PATCH) @cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/postfix-approve-patch 2>/dev/null .endif +.if defined(WITH_SHA1_COOKIES) + ${SED} <${WRKSRC}/majordomo >${WRKSRC}/majordomo.temp \ + "{s/md5_hex/sha1_hex/g;s/Digest::MD5/Digest::SHA1/g;}" + ${MV} ${WRKSRC}/majordomo.temp ${WRKSRC}/majordomo +.endif pre-configure: - @ ${SETENV} ${MAKE_ENV} /usr/bin/perl ${SCRIPTDIR}/createuser + @ ${SETENV} ${MAKE_ENV} ${PERL} ${SCRIPTDIR}/createuser @ ${CP} ${FILESDIR}/aliases.majordomo ${WRKSRC} pre-install: @ if test -f ${WRKSRC}/majordomo.cf; then :; else \ ${CP} ${WRKSRC}/sample.cf ${WRKSRC}/majordomo.cf; \ - /usr/bin/perl ${SCRIPTDIR}/makeseed ${WRKSRC}/majordomo.cf; \ + ${PERL} ${SCRIPTDIR}/makeseed ${WRKSRC}/majordomo.cf; \ fi post-install: .for file in ${MAN1} diff --git a/mail/majordomo/files/patch-bf b/mail/majordomo/files/patch-bf index 0ad15e2446b6..73db454f3935 100644 --- a/mail/majordomo/files/patch-bf +++ b/mail/majordomo/files/patch-bf @@ -4,7 +4,7 @@ require "majordomo.pl"; # all sorts of general-purpose Majordomo subs require "shlock.pl"; # NNTP-style file locking require "config_parse.pl"; # functions to parse the config files -+use Digest::SHA1 qw( sha1_hex ); ++use Digest::MD5 qw( md5_hex ); print STDERR "$0: requires succeeded. Setting defaults.\n" if $DEBUG; @@ -38,7 +38,7 @@ - $cookie |= $carry; - } - return (sprintf("%08x", $cookie)); -+ return sha1_hex( $combined ); ++ return md5_hex( $combined ); } |