summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2013-09-04 21:30:50 +0000
committerMartin Matuska <mm@FreeBSD.org>2013-09-04 21:30:50 +0000
commit34d60718c8d842fcca3cff2a75ce16f6e497d88e (patch)
tree456c27d3cf7402fadd6d98380040c120ea2d3e47 /lang
parent- Fix a warning "Having multiple values in <test> isn't supported and may (diff)
Fix build with gd 2.1
PR: ports/181772
Notes
Notes: svn path=/head/; revision=326329
Diffstat (limited to 'lang')
-rw-r--r--lang/hiphop-php/Makefile2
-rw-r--r--lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp63
-rw-r--r--lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp12
3 files changed, 76 insertions, 1 deletions
diff --git a/lang/hiphop-php/Makefile b/lang/hiphop-php/Makefile
index 00b059ea1b40..434854c47fff 100644
--- a/lang/hiphop-php/Makefile
+++ b/lang/hiphop-php/Makefile
@@ -3,7 +3,7 @@
PORTNAME= hiphop-php
PORTVERSION= 2.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang devel www
MASTER_SITES= https://github.com/facebook/hiphop-php/archive/:main \
http://unicode.org/Public/UNIDATA/:unidata \
diff --git a/lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp b/lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp
new file mode 100644
index 000000000000..d5bbd0e02dd5
--- /dev/null
+++ b/lang/hiphop-php/files/patch-hphp-runtime-ext-ext_image.cpp
@@ -0,0 +1,63 @@
+diff --git a/hphp/runtime/ext/ext_image.cpp b/hphp/runtime/ext/ext_image.cpp
+index 3f471a3..7793ee3 100644
+--- a/hphp/runtime/ext/ext_image.cpp
++++ hphp/runtime/ext/ext_image.cpp
+@@ -2351,11 +2351,11 @@ static const char php_sig_gd2[3] = {'g', 'd', '2'};
+ ** This way you gain a lot of flexibilty about how this package
+ ** reads a wbmp file.
+ */
+-static int getmbi(int (*getin) (void *in), void *in) {
++static int getmbi(gdIOCtx *ctx) {
+ int i, mbi = 0;
+
+ do {
+- i = getin (in);
++ i = (ctx->getC)(ctx);
+ if (i < 0)
+ return (-1);
+ mbi = (mbi << 7) | (i & 0x7f);
+@@ -2369,11 +2369,11 @@ static int getmbi(int (*getin) (void *in), void *in) {
+ ** Skips the ExtHeader. Not needed for the moment
+ **
+ */
+-int skipheader (int (*getin) (void *in), void *in) {
++int skipheader (gdIOCtx *ctx) {
+ int i;
+
+ do {
+- i = getin (in);
++ i = (ctx->getC)(ctx);
+ if (i < 0) return (-1);
+ }
+ while (i & 0x80);
+@@ -2404,8 +2404,8 @@ static int _php_image_type (char data[8]) {
+ gdIOCtx *io_ctx;
+ io_ctx = gdNewDynamicCtxEx(8, data, 0);
+ if (io_ctx) {
+- if (getmbi((int(*)(void *)) gdGetC, io_ctx) == 0 &&
+- skipheader((int(*)(void *)) gdGetC, io_ctx) == 0 ) {
++ if (getmbi(io_ctx) == 0 &&
++ skipheader(io_ctx) == 0 ) {
+ #if HAVE_LIBGD204
+ io_ctx->gd_free(io_ctx);
+ #else
+@@ -4200,8 +4200,8 @@ bool f_imagefilter(CResRef image, int filtertype,
+ (src->trueColor?gdImageGetTrueColorPixel:gdImageGetPixel)
+ #endif
+
+-static int gdImageConvolution(gdImagePtr src, float filter[3][3],
+- float filter_div, float offset) {
++static int hphp_gdImageConvolution(gdImagePtr src, float filter[3][3],
++ float filter_div, float offset) {
+ int x, y, i, j, new_a;
+ float new_r, new_g, new_b;
+ int new_pxl, pxl=0;
+@@ -4290,7 +4290,7 @@ bool f_imageconvolution(CResRef image, CArrRef matrix,
+ }
+ }
+ }
+- if (gdImageConvolution(im_src, mtx, div, offset)) {
++ if (hphp_gdImageConvolution(im_src, mtx, div, offset)) {
+ return true;
+ } else {
+ return false;
diff --git a/lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp b/lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp
new file mode 100644
index 000000000000..87b9243d93b4
--- /dev/null
+++ b/lang/hiphop-php/files/patch-hphp-util-parser-parser.cpp
@@ -0,0 +1,12 @@
+diff --git a/hphp/util/parser/parser.cpp b/hphp/util/parser/parser.cpp
+index 72c11bb..0132a4b 100644
+--- a/hphp/util/parser/parser.cpp
++++ hphp/util/parser/parser.cpp
+@@ -186,6 +186,7 @@ void ParserBase::addLabel(const std::string &label,
+ labelInfo.scopeId = info.scopes.back();
+ labelInfo.stmt = extractStatement(stmt);
+ labelInfo.loc = loc;
++ labelInfo.inTryCatchBlock = false;
+ info.labels[label] = labelInfo;
+ }
+