freebsd-ports/www/p5-CGI-SpeedyCGI/Makefile
Yen-Ming Lee 3122f31a46 Perl 5.8.4 and above add several security check when doing setuid.
One of these checks is that the interpreter must have string "perl" with it.

http://sourceforge.net/mailarchive/forum.php?thread_id=4823748&forum_id=7581

- rename speedy_suid to speedy_suidperl (or speedyperl_suid will be fine, too)
- utilize ECHO
- replace all /usr/local with PREFIX will cause some problems when PREFIX
  isn't /usr/local (missing PERL5 libraries and modules... blah blah...)
- bump PORTREVISION

PR:		69970
Submitted by:	leeym
Reviewed by:	lth
2004-08-06 17:37:00 +00:00

51 lines
1.3 KiB
Makefile

# New ports collection makefile for: CGI-SpeedyCGI
# Date created: Sun Mar 10 16:44:06 CET 2002
# Whom: Lars Thegler <lars@thegler.dk>
#
# $FreeBSD$
#
PORTNAME= CGI-SpeedyCGI
PORTVERSION= 2.22
PORTREVISION= 1
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= CGI
PKGNAMEPREFIX= p5-
MAINTAINER= lth@FreeBSD.org
COMMENT= Speed up perl CGI scripts by running them persistently
PERL_CONFIGURE= yes
.include <bsd.port.pre.mk>
APXS?= ${LOCALBASE}/sbin/apxs
# define WITHOUT_APACHE to prevent mod_speedycgi from being built even if Apache is installed
.if !exists(${APXS}) || defined(WITHOUT_APACHE)
PLIST_SUB+= APACHE="@comment "
CONFIGURE_ENV+= WITHOUT_APACHE=yes
.else
PLIST_SUB+= APACHE=""
.if exists(${APXS})
APXS_WORKS!= ${APXS} -q TARGET 2>/dev/null || ${ECHO} no
.endif
.if exists(${APXS}) && ${APXS_WORKS} != no
AP_LIBEXEC!= ${APXS} -q LIBEXECDIR
.else
AP_LIBEXEC?= ${PREFIX}/libexec/apache
.endif
PLIST_SUB+= AP_LIBEXEC=${AP_LIBEXEC:S/^${PREFIX}\///}
.endif
post-configure:
@${PERL} -pi -e 's,^PREFIX = /usr$$,PREFIX = ${PREFIX},g;' \
${WRKSRC}/Makefile ${WRKSRC}/*/Makefile
post-install:
@${INSTALL_PROGRAM} ${WRKSRC}/speedy/speedy ${PREFIX}/bin/speedy_suidperl
@${CHMOD} 4755 ${PREFIX}/bin/speedy_suidperl
.include <bsd.port.post.mk>