blob: 2c2c97794ea2ee6aa5110af9c6f2b253b8066ad6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# New ports collection makefile for: eperl
# Date created: 03-Sep-1997
# Whom: Ralf S. Engelschall <rse@engelschall.com>
#
# $FreeBSD$
#
PORTNAME= eperl
PORTVERSION= 2.2.14
PORTREVISION= 1
CATEGORIES= lang www perl5
MASTER_SITES= ${MASTER_SITE_OSSP}
MASTER_SITE_SUBDIR= tool/${PORTNAME}
MAINTAINER= ports@FreeBSD.org
COMMENT= Embedded Perl 5 Language
# User-controlled variables list
# INSTALL_ALSO_AS_SSSL
# install ePerl also as a Server-Side
# Scripting Language (SSSL) for Apache
#INSTALL_ALSO_AS_SSSL= yes
.if defined(INSTALL_ALSO_AS_SSSL)
RUN_DEPENDS= ${PREFIX}/etc/apache/srm.conf:${PORTSDIR}/${APACHE_PORT}
PLIST_SUB= SSSL=""
.else
PLIST_SUB= SSSL="@comment "
.endif
USE_PERL5= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --with-perl=${PERL5}
MAN1= eperl.1
.include <bsd.port.pre.mk>
test:
@(cd ${WRKSRC}; ${MAKE} test)
post-patch:
@${FIND} ${WRKSRC} -type f -name "*.[ch]" | \
${XARGS} ${GREP} -l strnstr | \
${XARGS} ${PERL} -pi -e 's|strnstr|ePerl_strnstr|g'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/eperl ${PREFIX}/bin/eperl
${INSTALL_MAN} ${WRKSRC}/eperl.1 ${PREFIX}/man/man1/eperl.1
.if !defined(NOPORTDOCS)
@if [ ! -d ${EXAMPLESDIR} ]; then \
${MKDIR} ${EXAMPLESDIR}; \
fi
${CP} ${WRKSRC}/eg/* ${EXAMPLESDIR}/
.endif
.if defined(INSTALL_ALSO_AS_SSSL)
@if [ ! -d ${PREFIX}/www/cgi-bin ]; then \
${MKDIR} ${PREFIX}/www/cgi-bin; \
fi
${INSTALL_PROGRAM} ${WRKSRC}/eperl ${PREFIX}/www/cgi-bin/nph-eperl
@if [ ".`${GREP} x-httpd-eperl ${PREFIX}/etc/apache/srm.conf`" = . ]; then \
${ECHO_CMD} "AddType application/x-httpd-eperl .phtml .eperl .epl" \
>>${PREFIX}/etc/apache/srm.conf; \
${ECHO_CMD} "Action application/x-httpd-eperl /cgi-bin/nph-eperl" \
>>${PREFIX}/etc/apache/srm.conf; \
${ECHO} "Added knowledge about ePerl to Apache's srm.conf"; \
else \
${ECHO} "Apache srm.conf is already aware of ePerl"; \
fi
.endif
.include <bsd.port.post.mk>
|