summaryrefslogtreecommitdiff
path: root/lang/php
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2015-08-23 15:31:17 +0000
committertaca <taca@pkgsrc.org>2015-08-23 15:31:17 +0000
commit3155a7833a1491c21579880916993c6de1519f26 (patch)
treef8ee58f9a549fc7baba4a08686ecf84c92688bbc /lang/php
parent699ca35f80c01a02a25fbc777fd2cc01300b09af (diff)
downloadpkgsrc-3155a7833a1491c21579880916993c6de1519f26.tar.gz
Add PEAR_PACKAGE_XML.
It specifies build package with pear command using package.xml or not. Default is yes.
Diffstat (limited to 'lang/php')
-rw-r--r--lang/php/pear.mk27
1 files changed, 24 insertions, 3 deletions
diff --git a/lang/php/pear.mk b/lang/php/pear.mk
index 40a84b3ef58..ebe4a0e5e10 100644
--- a/lang/php/pear.mk
+++ b/lang/php/pear.mk
@@ -1,10 +1,18 @@
-# $NetBSD: pear.mk,v 1.26 2015/08/10 01:46:00 taca Exp $
+# $NetBSD: pear.mk,v 1.27 2015/08/23 15:31:17 taca Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install pear packages.
#
# If you don't know what pear is, you can visit: http://pear.php.net/
#
+# === Package-settable variables ===
+#
+# PEAR_PACKAGE_XML Use package.xml to build package with ${PEAR_CMD}.
+# Default: yes
+#
+#
+# === Variables defined by this file ===
+#
# PEAR_CMD this is the actual script to execute to install the
# package.
#
@@ -16,6 +24,8 @@ _PEAR_PACKAGE_MK= # defined
.include "../../mk/bsd.prefs.mk"
+PEAR_PACKAGE_XML?= yes
+
EXTRACT_SUFX= .tgz
PKGNAME= ${PHP_PKG_PREFIX}-pear-${DISTNAME}
@@ -38,6 +48,10 @@ PEAR_LIB= lib/php
PEAR_DESTDIR= -P ${DESTDIR} -f
.endif
+NO_BUILD= yes
+
+.if empty(PEAR_PACKAGE_XML:M[nN][oO])
+
# Dynamic PLIST, generated via a helper PHP script, which use registry.
PEAR_GENERATE_PLIST= \
${ECHO} "@comment The following lines are automatically generated"; \
@@ -48,8 +62,6 @@ PEAR_GENERATE_PLIST= \
-C -n ${PKGDIR}/../../lang/php/pear_plist.php;
GENERATE_PLIST+= ${PEAR_GENERATE_PLIST}
-NO_BUILD= yes
-
.if ${_USE_DESTDIR} != "no"
PEAR_FILES_SKIP+= ${PREFIX}/lib/php/\.channels/\.alias/.*\.txt
PEAR_FILES_SKIP+= ${PREFIX}/lib/php/\.channels/.*\.reg
@@ -68,6 +80,15 @@ do-install:
${PEAR_CMD} "install" ${PEAR_DESTDIR} -n -O package.xml || exit 1
${RM} -f ${PEAR_FILES_SKIP:S/^/${DESTDIR}&/}
+.else # PEAR_PACKAGE_XML == no
+
+PLIST_SUBST+= PEAR_LIB=${PEAR_LIB:Q}
+
+do-install:
+ cd ${WRKSRC}/lib && ${PAX} -wr * ${DESTDIR}${PREFIX}/${PEAR_LIB}/
+
+.endif
+
.include "../../lang/php/phpversion.mk"
.include "${PHPPKGSRCDIR}/buildlink3.mk"