aboutsummaryrefslogtreecommitdiffstats
path: root/www/xcache/Makefile
blob: 1e5b1d3a12ea5501cdea20e05048a569abb7fdbd (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
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD$

PORTNAME=   xcache
DISTVERSION=    3.2.0
CATEGORIES= www
MASTER_SITES=   http://xcache.lighttpd.net/pub/Releases/${DISTVERSION}/

MAINTAINER= ale@FreeBSD.org
COMMENT=    Fast and stable php opcode cacher

LICENSE=    BSD3CLAUSE

USES=       tar:bzip2
USE_PHP=    yes
USE_PHPIZE= yes

CONFIGURE_ARGS= --enable-xcache=shared

OPTIONS_DEFINE= CONSTANT COVERAGER EXAMPLES
CONSTANT_DESC=  Enable handling of compile time constants
COVERAGER_DESC= Enable code coverage dumper

SUB_FILES=  pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message

PLIST_FILES=    lib/php/%%PHP_EXT_DIR%%/xcache.so
PLIST_DIRSTRY=  lib/php/%%PHP_EXT_DIR%%

PORTEXAMPLES=   *

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MCONSTANT}
CONFIGURE_ARGS+=--enable-xcache-constant
.endif

.if ${PORT_OPTIONS:MCOVERAGER}
CONFIGURE_ARGS+=--enable-xcache-coverager
PLIST_SUB+= COVERAGER=""
.else
PLIST_SUB+= COVERAGER="@comment "
.endif

do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
    ${INSTALL_DATA} ${WRKSRC}/modules/${PORTNAME}.so \
           ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/xcache.ini \
        ${STAGEDIR}${EXAMPLESDIR}
    @cd ${WRKSRC} && ${COPYTREE_SHARE} htdocs \
        ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>