blob: 949bb118b0c563966fa02a8453e679f1e3b96c43 (
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
|
# Created by: Alex Dupre <ale@FreeBSD.org>
# $FreeBSD$
PORTNAME= pear
PORTVERSION= 1.10.1
CATEGORIES= devel
MASTER_SITES= http://mirror.miwibox.org/
MAINTAINER= ports@FreeBSD.org
COMMENT= PEAR framework for PHP
LICENSE= PHP301
BROKEN_powerpc64= Does not build
USES= cpe php:cli tar:bzip2
CPE_VENDOR= php
NO_BUILD= yes
NO_ARCH= yes
USE_PHP= pcre:build xml:build zlib:build
PEARDIR= ${PREFIX}/share/pear
post-patch:
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \
-e "s|%%BUNDLEDIR%%|${WRKSRC}/go-pear-bundle|" \
-e "s|%%TMPDIR%%|/tmp/pear|" \
${WRKSRC}/go-pear
@cd ${WRKSRC}/go-pear-bundle && ${MKDIR} tmp && ${TAR} -C tmp -xf PEAR-${PORTVERSION}.tar
@cd ${WRKSRC}/go-pear-bundle/tmp/PEAR-${PORTVERSION} && ${PATCH} -s -p0 < ${FILESDIR}/extra-patch-PEAR-Config.php
@${RM} ${WRKSRC}/go-pear-bundle/tmp/PEAR-${PORTVERSION}/PEAR/Config.php.orig
@${MD5} -q ${WRKSRC}/go-pear-bundle/tmp/PEAR-${PORTVERSION}/PEAR/Config.php > ${WRKSRC}/Config.php.md5
@cd ${WRKSRC}/go-pear-bundle/tmp && ${TAR} -cf ../PEAR-${PORTVERSION}.tar PEAR-${PORTVERSION} package.xml
do-install:
@cd ${WRKSRC} && ${SETENV} DESTDIR=${STAGEDIR} ${LOCALBASE}/bin/php -q ./go-pear
@${SED} -i "" "s|<?php|<?php dl('pcre.so'); dl('xml.so');|" \
${STAGEDIR}${PEARDIR}/peclcmd.php
# pear violates stage when staging as root, hide this
.if defined(PACKAGE_BUILDING)
@${RM} -rf ${PEARDIR}
.endif
# Clean up orphans re-generated by pkg-install
@${RM} -rf ${STAGEDIR}${PEARDIR}/.depdb ${STAGEDIR}${PEARDIR}/.depdblock ${STAGEDIR}${PEARDIR}/.filemap ${STAGEDIR}${PEARDIR}/.lock
.include <bsd.port.mk>
|