aboutsummaryrefslogtreecommitdiff
path: root/graphics/php-gdal
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2013-03-10 14:54:52 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2013-03-10 14:54:52 +0000
commitc50be625fb6f3123382eb04ab88da339a3d5dabf (patch)
tree0b8b99fd8f55b82f9ce05aa165677af9fccdfed9 /graphics/php-gdal
parent1c3dcaffb745ea78b4eab2b625831bc316b9fd7c (diff)
downloadports-c50be625fb6f3123382eb04ab88da339a3d5dabf.tar.gz
ports-c50be625fb6f3123382eb04ab88da339a3d5dabf.zip
Notes
Diffstat (limited to 'graphics/php-gdal')
-rw-r--r--graphics/php-gdal/Makefile7
-rw-r--r--graphics/php-gdal/files/patch-gdal_wrap.cpp19
-rw-r--r--graphics/php-gdal/files/patch-ogr_wrap.cpp19
-rw-r--r--graphics/php-gdal/files/patch-osr_wrap.cpp19
4 files changed, 61 insertions, 3 deletions
diff --git a/graphics/php-gdal/Makefile b/graphics/php-gdal/Makefile
index a934b0dbe1cb..b23fe8f12b6e 100644
--- a/graphics/php-gdal/Makefile
+++ b/graphics/php-gdal/Makefile
@@ -12,13 +12,13 @@ PKGNAMEPREFIX= php-
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= PHP binding for GDAL
-BUILD_DEPENDS= ${LOCALBASE}/bin/swig:${PORTSDIR}/devel/swig13
+LICENSE= MIT
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/swig2.0:${PORTSDIR}/devel/swig20
LIB_DEPENDS= gdal:${PORTSDIR}/graphics/gdal
ALL_TARGET= php_gdal.so php_gdalconst.so php_ogr.so php_osr.so
CFLAGS+= -I${LOCALBASE}/include -fPIC
-DEFAULT_PHP_VER=53
-IGNORE_WITH_PHP=5
LIBTOOLFILES= # empty
MAKEFILE= GNUmakefile
PHP_MOD_NAME= php_${PORTNAME}
@@ -29,6 +29,7 @@ USE_PHP_BUILD= yes
WRKSRC= ${WRKDIR}/${DISTNAME}/swig/php
post-patch:
+ @${REINPLACE_CMD} -e '/^SWIG = swig/ s|$$|2.0|' ${WRKSRC}/../SWIGmake.base
@${REINPLACE_CMD} -e 's|^CC=.*$$|CC=${CC}|; s|^CXX=.*$$|CXX=${CXX}|; s|^CFLAGS=.*$$|CFLAGS=${CFLAGS}|' ${WRKSRC}/${MAKEFILE}
do-configure:
diff --git a/graphics/php-gdal/files/patch-gdal_wrap.cpp b/graphics/php-gdal/files/patch-gdal_wrap.cpp
new file mode 100644
index 000000000000..58acdb9364af
--- /dev/null
+++ b/graphics/php-gdal/files/patch-gdal_wrap.cpp
@@ -0,0 +1,19 @@
+--- gdal_wrap.cpp.orig 2012-10-09 08:58:28.000000000 +0800
++++ gdal_wrap.cpp 2013-03-02 01:37:03.203201081 +0800
+@@ -932,7 +932,7 @@
+ p = value->ptr;
+ if (type==-1) return NULL;
+
+- type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
++ type_name=(char *) zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
+
+ return SWIG_ZTS_ConvertResourceData(p, type_name, ty TSRMLS_CC);
+ }
+@@ -1423,6 +1423,7 @@
+ return;
+ }
+ if ( (*target)->type == IS_NULL ) {
++ TSRMLS_FETCH();
+ REPLACE_ZVAL_VALUE(target,o,1);
+ FREE_ZVAL(o);
+ return;
diff --git a/graphics/php-gdal/files/patch-ogr_wrap.cpp b/graphics/php-gdal/files/patch-ogr_wrap.cpp
new file mode 100644
index 000000000000..03eb364f4d9e
--- /dev/null
+++ b/graphics/php-gdal/files/patch-ogr_wrap.cpp
@@ -0,0 +1,19 @@
+--- ogr_wrap.cpp.orig 2012-10-09 08:58:28.000000000 +0800
++++ ogr_wrap.cpp 2013-03-02 01:39:25.713195176 +0800
+@@ -932,7 +932,7 @@
+ p = value->ptr;
+ if (type==-1) return NULL;
+
+- type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
++ type_name=(char *) zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
+
+ return SWIG_ZTS_ConvertResourceData(p, type_name, ty TSRMLS_CC);
+ }
+@@ -1343,6 +1343,7 @@
+ return;
+ }
+ if ( (*target)->type == IS_NULL ) {
++ TSRMLS_FETCH();
+ REPLACE_ZVAL_VALUE(target,o,1);
+ FREE_ZVAL(o);
+ return;
diff --git a/graphics/php-gdal/files/patch-osr_wrap.cpp b/graphics/php-gdal/files/patch-osr_wrap.cpp
new file mode 100644
index 000000000000..441d9a42bf05
--- /dev/null
+++ b/graphics/php-gdal/files/patch-osr_wrap.cpp
@@ -0,0 +1,19 @@
+--- osr_wrap.cpp.orig 2012-10-09 08:58:28.000000000 +0800
++++ osr_wrap.cpp 2013-03-02 01:50:03.170201473 +0800
+@@ -932,7 +932,7 @@
+ p = value->ptr;
+ if (type==-1) return NULL;
+
+- type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
++ type_name=(char *) zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
+
+ return SWIG_ZTS_ConvertResourceData(p, type_name, ty TSRMLS_CC);
+ }
+@@ -1147,6 +1147,7 @@
+ return;
+ }
+ if ( (*target)->type == IS_NULL ) {
++ TSRMLS_FETCH();
+ REPLACE_ZVAL_VALUE(target,o,1);
+ FREE_ZVAL(o);
+ return;