aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/pear-Image_Graph
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2010-07-12 14:39:53 +0800
committermiwi <miwi@FreeBSD.org>2010-07-12 14:39:53 +0800
commit0b9d3abd0c20d5845117cce66837b77f5cae27ad (patch)
tree62d754ecc209f4f660b9adb5f5709597632ec0f5 /graphics/pear-Image_Graph
parenta333b2e77d01cd75b3a700a6cc8ee4e068933bd5 (diff)
downloadfreebsd-ports-gnome-0b9d3abd0c20d5845117cce66837b77f5cae27ad.tar.gz
freebsd-ports-gnome-0b9d3abd0c20d5845117cce66837b77f5cae27ad.tar.zst
freebsd-ports-gnome-0b9d3abd0c20d5845117cce66837b77f5cae27ad.zip
- Allow to work with php5.3.X
PR: 148009 Submitted by: olli hauer <ohauer@gmx.de>
Diffstat (limited to 'graphics/pear-Image_Graph')
-rw-r--r--graphics/pear-Image_Graph/Makefile23
-rw-r--r--graphics/pear-Image_Graph/files/extra-patch-Graph__Layout.php11
2 files changed, 32 insertions, 2 deletions
diff --git a/graphics/pear-Image_Graph/Makefile b/graphics/pear-Image_Graph/Makefile
index d5a172df712b..34d54bdc6af6 100644
--- a/graphics/pear-Image_Graph/Makefile
+++ b/graphics/pear-Image_Graph/Makefile
@@ -7,7 +7,7 @@
PORTNAME= Image_Graph
PORTVERSION= 0.7.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics www pear
MAINTAINER= miwi@FreeBSD.org
@@ -19,6 +19,7 @@ RUN_DEPENDS= ${PEARDIR}/Log.php:${PORTSDIR}/sysutils/pear-Log \
USE_PHP= yes
USE_DOS2UNIX= yes
+DOS2UNIX_REGEX= .*php$$
CATEGORY= Image
FILES= Graph.php Graph/Axis.php Graph/Common.php Graph/Config.php \
@@ -179,9 +180,27 @@ post-patch:
.if ${PHP_VER} != 4
.for file in ${FILES}
@if ${ECHO_CMD} ${file} | ${GREP} -q -e "php$$" ; then \
- ${REINPLACE_CMD} -e 's|parent::Image[^(]*|parent::__construct|' ${WRKSRC}/${file}; \
+ ${REINPLACE_CMD} -e 's|parent::Image[^(]*|parent::__construct|' \
+ -e 's|PHP versions 4 and 5|PHP version 5|' ${WRKSRC}/${file}; \
fi
.endfor
+# fix PHP Deprecated messages
+# - Assigning the return value of new by reference
+# - Call-time pass-by-reference has been deprecated
+.for file in ${DOCS}
+ @if ${ECHO_CMD} ${file} | ${GREP} -q -e "php$$" ; then \
+ ${REINPLACE_CMD} -e 's|=& |= |g' -e 's| &\$$| \$$|g' \
+ ${WRKSRC}/docs/${file}; \
+ fi
+.endfor
+.for file in ${TESTS}
+ @if ${ECHO_CMD} ${file} | ${GREP} -q -e "php$$" ; then \
+ ${REINPLACE_CMD} -e 's|PHP versions 4 and 5|PHP version 5|' \
+ ${WRKSRC}/tests/${file}; \
+ fi
+.endfor
+ @${REINPLACE_CMD} -e 's|=& new|= new|g' ${WRKSRC}/Graph.php
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Graph__Layout.php
.endif
.include "${PORTSDIR}/devel/pear/bsd.pear.mk"
diff --git a/graphics/pear-Image_Graph/files/extra-patch-Graph__Layout.php b/graphics/pear-Image_Graph/files/extra-patch-Graph__Layout.php
new file mode 100644
index 000000000000..5d4effb46ff3
--- /dev/null
+++ b/graphics/pear-Image_Graph/files/extra-patch-Graph__Layout.php
@@ -0,0 +1,11 @@
+--- ./Graph/Layout.php.orig 2010-06-14 17:05:41.000000000 +0200
++++ ./Graph/Layout.php 2010-06-14 17:06:24.000000000 +0200
+@@ -175,7 +175,7 @@
+ function _push($edge, $size = '100%')
+ {
+ $result = array();
+- if (ereg("([0-9]*)\%", $size, $result)) {
++ if (preg_match("/([0-9]*)\%/", $size, $result)) {
+ $this->_alignSize[$edge] = array(
+ 'value' => min(100, max(0, $result[1])),
+ 'unit' => 'percentage'