diff options
author | wen <wen@FreeBSD.org> | 2012-09-05 15:57:30 +0800 |
---|---|---|
committer | wen <wen@FreeBSD.org> | 2012-09-05 15:57:30 +0800 |
commit | 5cce81cb619c9eaa5473a93ead5b132a94540283 (patch) | |
tree | be696a154a37e80f5cbd0803d67035f991b92afd /graphics | |
parent | 6acb154755a3fbf0a44c28dac5385acf45241c6c (diff) | |
download | freebsd-ports-gnome-5cce81cb619c9eaa5473a93ead5b132a94540283.tar.gz freebsd-ports-gnome-5cce81cb619c9eaa5473a93ead5b132a94540283.tar.zst freebsd-ports-gnome-5cce81cb619c9eaa5473a93ead5b132a94540283.zip |
- Update to 6.0.3 and unbreak
- Convert to optionsNG
- Fix the build of PHP option with the upstream patch
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/mapserver/Makefile | 102 | ||||
-rw-r--r-- | graphics/mapserver/distinfo | 4 | ||||
-rw-r--r-- | graphics/mapserver/files/extra-patch-mapscript-php-image.c | 26 | ||||
-rw-r--r-- | graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript.c | 11 | ||||
-rw-r--r-- | graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript_util.c | 31 |
5 files changed, 117 insertions, 57 deletions
diff --git a/graphics/mapserver/Makefile b/graphics/mapserver/Makefile index 8abfef9f3e2e..85040ddb1453 100644 --- a/graphics/mapserver/Makefile +++ b/graphics/mapserver/Makefile @@ -6,21 +6,18 @@ # PORTNAME= mapserver -PORTVERSION= 6.0.1 -PORTREVISION= 5 +PORTVERSION= 6.0.3 CATEGORIES= graphics www geography MASTER_SITES= http://download.osgeo.org/mapserver/ MAINTAINER= wen@FreeBSD.org COMMENT= System for developing web-based GIS applications -LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd \ - proj.7:${PORTSDIR}/graphics/proj \ +LIB_DEPENDS= gd:${PORTSDIR}/graphics/gd \ + proj:${PORTSDIR}/graphics/proj \ png15:${PORTSDIR}/graphics/png \ - jpeg.11:${PORTSDIR}/graphics/jpeg \ - gif.5:${PORTSDIR}/graphics/giflib - -BROKEN= does not link + jpeg:${PORTSDIR}/graphics/jpeg \ + gif:${PORTSDIR}/graphics/giflib USE_GMAKE= yes GNU_CONFIGURE= yes @@ -32,85 +29,80 @@ CONFIGURE_ARGS= --enable-runpath \ --with-proj=${LOCALBASE} MAKE_JOBS_UNSAFE= yes -OPTIONS= AGG "Support for AGG image rendering (req: FreeType)" off \ - TIFF "Support for TIFF (but not GeoTIFF) files" off \ - PDF "Support for PDF output via pdflib" off \ - GDAL "Support for a number of input raster formats" on \ - GEOS "Use GEOS engine where possible" on \ - MING "Support for Macromedia Flash output" off \ - MYGIS "Support for MyGIS" off \ - POSTGIS "Support for PostGIS" off \ - PHP "Support for MapScript/PHP" off \ - PERL "Support for MapScript/PERL" off \ - PYTHON "Support for MapScript/PYTHON" off \ - WMS "Support for web map service server and client" off \ - WFS "Support for web feature service (req: GDAL)" off \ - MAPSERV "Install mapserv cgi interface" on \ - FASTCGI "Support FASTCGI" off \ - DEBUG "Enable debugging output" off - -.include <bsd.port.pre.mk> - -.if defined(WITH_AGG) -LIB_DEPENDS+= agg.2:${PORTSDIR}/graphics/agg +OPTIONS_DEFINE= AGG TIFF PDF GDAL GEOS MING MYGIS POSTGIS PHP PERL PYTHON \ + WMS WFS MAPSERV FASTCGI DEBUG +OPTIONS_DEFAULT= GDAL GEOS MAPSERV +AGG_DESC= AGG image rendering support +GDAL_DESC= GDAL library support +MING_DESC= Macromedia Flash output support +MYGIS_DESC= MyGIS support +WMS_DESC= Web map service server and client support +WFS_DESC= Web feature service support +MAPSERV_DESC= Mapserv cgi interface support + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MAGG} +LIB_DEPENDS+= agg:${PORTSDIR}/graphics/agg CONFIGURE_ARGS+= --with-agg=${LOCALBASE} --with-freetype=${LOCALBASE} .endif -.if defined(WITH_TIFF) -.if !defined(WITH_GDAL) -LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff +.if ${PORT_OPTIONS:MTIFF} +LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff CONFIGURE_ARGS+= --with-tiff=${LOCALBASE} -.endif .else CONFIGURE_ARGS+= --without-tiff .endif -.if defined(WITH_MING) -LIB_DEPENDS+= ming.5:${PORTSDIR}/graphics/ming +.if ${PORT_OPTIONS:MMING} +LIB_DEPENDS+= ming:${PORTSDIR}/graphics/ming CONFIGURE_ARGS+= --with-ming=${LOCALBASE} .endif -.if defined(WITH_PDF) -LIB_DEPENDS+= pdf.6:${PORTSDIR}/print/pdflib \ - tiff.4:${PORTSDIR}/graphics/tiff +.if ${PORT_OPTIONS:MPDF} +LIB_DEPENDS+= pdf:${PORTSDIR}/print/pdflib \ + tiff:${PORTSDIR}/graphics/tiff CONFIGURE_ARGS+= --with-pdf=${LOCALBASE} --with-tiff=${LOCALBASE} --with-png=${LOCALBASE} .endif -.if defined(WITH_WMS) +.if ${PORT_OPTIONS:MWMS} WITH_CURL= yes CONFIGURE_ARGS+= --with-wms --with-wmsclient .endif -.if defined(WITH_WFS) +.if ${PORT_OPTIONS:MWFS} WITH_CURL= yes WITH_GDAL= yes CONFIGURE_ARGS+= --with-wfs --with-wfsclient .endif -.if !defined(WITHOUT_GDAL) -LIB_DEPENDS+= gdal.17:${PORTSDIR}/graphics/gdal +.if ${PORT_OPTIONS:MGDAL} +LIB_DEPENDS+= gdal:${PORTSDIR}/graphics/gdal CONFIGURE_ARGS+= --with-gdal=${LOCALBASE}/bin/gdal-config \ --with-ogr=${LOCALBASE}/bin/gdal-config .endif -.if !defined(WITHOUT_GEOS) -LIB_DEPENDS+= geos.0:${PORTSDIR}/graphics/geos +.if ${PORT_OPTIONS:MGEOS} +LIB_DEPENDS+= geos:${PORTSDIR}/graphics/geos CONFIGURE_ARGS+= --with-geos=${LOCALBASE}/bin/geos-config .endif -.if defined(WITH_MYGIS) +.if ${PORT_OPTIONS:MMYGIS} USE_MYSQL= yes CONFIGURE_ARGS+= --with-mygis=${LOCALBASE}/bin/mysql_config .endif -.if defined(WITH_POSTGIS) +.if ${PORT_OPTIONS:MPOSTGIS} BUILD_DEPENDS+= ${LOCALBASE}/lib/libpgport.a:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server USE_PGSQL= yes DEFAULT_PGSQL_VER= 83 CONFIGURE_ARGS+= --with-postgis=${LOCALBASE}/bin/pg_config .endif -.if defined(WITH_PHP) +.if ${PORT_OPTIONS:MPHP} +EXTRA_PATCHES= ${FILESDIR}/extra-patch-mapscript-php-image.c \ + ${FILESDIR}/extra-patch-mapscript-php-php_mapscript.c \ + ${FILESDIR}/extra-patch-mapscript-php-php_mapscript_util.c BUILD_DEPENDS+= ${LOCALBASE}/bin/php-config:${PORTSDIR}/lang/php5 RUN_BUILDS= ${BUILD_DEPENDS} CONFIGURE_ARGS+= --with-php=${LOCALBASE}/include/php/ @@ -121,14 +113,14 @@ PLIST_SUB+= WITH_PHP="" PLIST_SUB+= WITH_PHP="@comment " .endif -.if defined(WITH_PERL) +.if ${PORT_OPTIONS:MPERL} USE_PERL5=yes PLIST_SUB+= WITH_PERL="" .else PLIST_SUB+= WITH_PERL="@comment " .endif -.if defined(WITH_PYTHON) +.if ${PORT_OPTIONS:MPYTHON} BUILD_DEPENDS+= ${LOCALBASE}/bin/python:${PORTSDIR}/lang/python26 PLIST_SUB+= WITH_PYTHON="" .include <../../Mk/bsd.python.mk> @@ -138,12 +130,12 @@ PLIST_SUB+= MAP_EGG=${MAP_EGG} PLIST_SUB+= WITH_PYTHON="@comment " .endif -.if defined(WITH_CURL) -LIB_DEPENDS+= curl.6:${PORTSDIR}/ftp/curl +.if ${PORT_OPTIONS:MCURL} +LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl CONFIGURE_ARGS+= --with-curl=${LOCALBASE} .endif -.if defined(WITH_MAPSERV) +.if ${PORT_OPTIONS:MMAPSERV} USE_APACHE= 22+ .include "${PORTSDIR}/Mk/bsd.apache.mk" PLIST_SUB+= WITH_MAPSERV="" @@ -152,12 +144,12 @@ PLIST_DIRSTRY= www/cgi-bin PLIST_SUB+= WITH_MAPSERV="@comment " .endif -.if defined(WITH_FASTCGI) +.if ${PORT_OPTIONS:MFASTCGI} BUILD_DEPENDS+= ${LOCALBASE}/bin/cgi-fcgi:${PORTSDIR}/www/fcgi CONFIGURE_ARGS+= --with-fastcgi=${LOCALBASE} .endif -.if defined(WITH_DEBUG) +.if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+= --enable-debug .endif @@ -202,4 +194,4 @@ post-install: @${ECHO_MSG} "Please add the line extension=php_mapscript.so to ${LOCALBASE}/etc/php/extensions.ini" .endif -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/graphics/mapserver/distinfo b/graphics/mapserver/distinfo index 9f8a54a5f0e4..f132829f35d8 100644 --- a/graphics/mapserver/distinfo +++ b/graphics/mapserver/distinfo @@ -1,2 +1,2 @@ -SHA256 (mapserver-6.0.1.tar.gz) = dd6821917aa7030381442f5e092e4f46f44b9deb9425ec92729e5819e9b61d65 -SIZE (mapserver-6.0.1.tar.gz) = 2430064 +SHA256 (mapserver-6.0.3.tar.gz) = a939d5e207017ff87e115816a0a8a13fb2751069feb90e12fe594c537a917199 +SIZE (mapserver-6.0.3.tar.gz) = 2439456 diff --git a/graphics/mapserver/files/extra-patch-mapscript-php-image.c b/graphics/mapserver/files/extra-patch-mapscript-php-image.c new file mode 100644 index 000000000000..63bc10cd226c --- /dev/null +++ b/graphics/mapserver/files/extra-patch-mapscript-php-image.c @@ -0,0 +1,26 @@ +--- mapscript/php/image.c.orig 2012-09-05 14:29:49.000000000 +0800 ++++ mapscript/php/image.c 2012-09-05 14:31:04.000000000 +0800 +@@ -303,11 +303,18 @@ + /* no filename - read stdout */ + + /* if there is no output buffer active, set the header */ +- if (OG(ob_nesting_level)<=0) +- { +- php_header(TSRMLS_C); +- } +- ++ //handle changes in PHP 5.4.x ++ #if PHP_VERSION_ID < 50399 ++ if (OG(ob_nesting_level)<=0) ++ { ++ php_header(TSRMLS_C); ++ } ++ #else ++ if (php_output_get_level(TSRMLS_C)<=0) ++ { ++ php_header(TSRMLS_C); ++ } ++ #endif + + if (MS_RENDERER_PLUGIN(php_image->image->format)) + { diff --git a/graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript.c b/graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript.c new file mode 100644 index 000000000000..34fa48fa1ef9 --- /dev/null +++ b/graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript.c @@ -0,0 +1,11 @@ +--- mapscript/php/php_mapscript.c.orig 2012-09-05 14:31:32.000000000 +0800 ++++ mapscript/php/php_mapscript.c 2012-09-05 14:32:04.000000000 +0800 +@@ -899,7 +899,7 @@ + + } + +-function_entry mapscript_functions[] = { ++zend_function_entry mapscript_functions[] = { + PHP_FE(ms_GetVersion, NULL) + PHP_FE(ms_GetVersionInt, NULL) + PHP_FE(ms_newLineObj, NULL) diff --git a/graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript_util.c b/graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript_util.c new file mode 100644 index 000000000000..c4885635409b --- /dev/null +++ b/graphics/mapserver/files/extra-patch-mapscript-php-php_mapscript_util.c @@ -0,0 +1,31 @@ +--- mapscript/php/php_mapscript_util.c.orig 2012-09-05 14:32:18.000000000 +0800 ++++ mapscript/php/php_mapscript_util.c 2012-09-05 14:35:09.000000000 +0800 +@@ -42,7 +42,12 @@ + zobj->ce = ce; + ALLOC_HASHTABLE(zobj->properties); + zend_hash_init(zobj->properties, 0, NULL, ZVAL_PTR_DTOR, 0); +- zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *)); ++ //handle changes in PHP 5.4.x ++ #if PHP_VERSION_ID < 50399 ++ zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *)); ++ #else ++ object_properties_init(zobj, ce); ++ #endif + retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC); + retval.handlers = &mapscript_std_object_handlers; + return retval; +@@ -59,8 +64,12 @@ + zobj->ce = ce; + ALLOC_HASHTABLE(zobj->properties); + zend_hash_init(zobj->properties, 0, NULL, ZVAL_PTR_DTOR, 0); +- zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *)); +- retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC); ++ //handle changes in PHP 5.4.x ++ #if PHP_VERSION_ID < 50399 ++ zend_hash_copy(zobj->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref,(void *) &temp, sizeof(zval *)); ++ #else ++ object_properties_init(zobj, ce); ++ #endif retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC); + retval.handlers = object_handlers; + return retval; + } |