[Git][debian-gis-team/mapserver][buster-backports] 13 commits: Bump Standards-Version to 4.4.1, no changes.
Bas Couwenberg
gitlab at salsa.debian.org
Sun Dec 22 06:00:30 GMT 2019
Bas Couwenberg pushed to branch buster-backports at Debian GIS Project / mapserver
Commits:
e0a9f447 by Bas Couwenberg at 2019-09-30T17:25:21Z
Bump Standards-Version to 4.4.1, no changes.
- - - - -
7cc56cf1 by Bas Couwenberg at 2019-11-07T17:38:54Z
Drop Provides: ${python3:Provides}.
- - - - -
73cfdc11 by Bas Couwenberg at 2019-11-24T09:01:24Z
Change python3-all{,-dev} build dependency to python3{,-dev}, only the default interpreter is used.
- - - - -
3e28d80b by Bas Couwenberg at 2019-12-09T08:18:56Z
Drop Name field from upstream metadata.
- - - - -
e76e2523 by Bas Couwenberg at 2019-12-17T04:24:30Z
New upstream version 7.4.3
- - - - -
725adb97 by Bas Couwenberg at 2019-12-17T04:24:50Z
Update upstream source from tag 'upstream/7.4.3'
Update to upstream version '7.4.3'
with Debian dir 2327488499cb0e6dba91c27b505bd4d6c6f2d592
- - - - -
df17e2f4 by Bas Couwenberg at 2019-12-17T04:30:38Z
New upstream release.
- - - - -
c5403662 by Bas Couwenberg at 2019-12-17T04:50:36Z
Drop unused overrides for file-references-package-build-path.
- - - - -
7e73b975 by Bas Couwenberg at 2019-12-17T04:50:36Z
Update symbols for amd64.
- - - - -
dd9a9efb by Bas Couwenberg at 2019-12-17T05:13:05Z
Rename TODO.Debian to TODO.
- - - - -
127afc36 by Bas Couwenberg at 2019-12-17T05:13:05Z
Set distribution to unstable.
- - - - -
c4688e7e by Bas Couwenberg at 2019-12-22T05:37:38Z
Merge tag 'debian/7.4.3-1' into buster-backports
releasing package mapserver version 7.4.3-1
- - - - -
10ced127 by Bas Couwenberg at 2019-12-22T05:37:47Z
Rebuild for buster-backports.
- - - - -
23 changed files:
- CMakeLists.txt
- HISTORY.TXT
- debian/TODO.Debian → debian/TODO
- debian/changelog
- debian/control
- − debian/libmapscript-java.lintian-overrides
- − debian/libmapscript-perl.lintian-overrides
- − debian/libmapserver2.lintian-overrides
- debian/libmapserver2.symbols
- − debian/mapserver-bin.lintian-overrides
- − debian/python3-mapscript.lintian-overrides
- debian/upstream/metadata
- mapdraw.c
- mapgdal.c
- mapogr.cpp
- mappostgis.c
- mapscript/mapscript.i
- mapscript/php/php_mapscript_util.h
- mapscript/phpng/php7module.i
- mapserver.h
- mapservutil.c
- mapwms.c
- mapwmslayer.c
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -17,7 +17,7 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 7)
set (MapServer_VERSION_MINOR 4)
-set (MapServer_VERSION_REVISION 2)
+set (MapServer_VERSION_REVISION 3)
set (MapServer_VERSION_SUFFIX "")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
=====================================
HISTORY.TXT
=====================================
@@ -12,6 +12,11 @@ For a complete change history, please see the Git log comments. For more
details about recent point releases, please see the online changelog at:
http://mapserver.org/development/changelog/
+7.4.3 release (2019-12-16)
+--------------------------
+
+- No major changes, see detailed changelog for bug fixes
+
7.4.2 release (2019-9-13)
-------------------------
=====================================
debian/TODO.Debian → debian/TODO
=====================================
=====================================
debian/changelog
=====================================
@@ -1,3 +1,23 @@
+mapserver (7.4.3-1~bpo10+1) buster-backports; urgency=medium
+
+ * Rebuild for buster-backports.
+
+ -- Bas Couwenberg <sebastic at debian.org> Sun, 22 Dec 2019 06:37:42 +0100
+
+mapserver (7.4.3-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Bump Standards-Version to 4.4.1, no changes.
+ * Drop Provides: ${python3:Provides}.
+ * Change python3-all{,-dev} build dependency to python3{,-dev},
+ only the default interpreter is used.
+ * Drop Name field from upstream metadata.
+ * Drop unused overrides for file-references-package-build-path.
+ * Update symbols for amd64.
+ * Rename TODO.Debian to TODO.
+
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 17 Dec 2019 05:34:32 +0100
+
mapserver (7.4.2-1~bpo10+1) buster-backports; urgency=medium
* Rebuild for buster-backports.
=====================================
debian/control
=====================================
@@ -36,8 +36,8 @@ Build-Depends: debhelper (>= 9.20160114),
pkg-config,
pkg-kde-tools,
protobuf-c-compiler,
- python3-all,
- python3-all-dev,
+ python3,
+ python3-dev,
python3-setuptools,
swig,
docbook2x,
@@ -45,7 +45,7 @@ Build-Depends: debhelper (>= 9.20160114),
docbook-xml,
xsltproc
Build-Conflicts: libcurl3-openssl-dev
-Standards-Version: 4.4.0
+Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/debian-gis-team/mapserver
Vcs-Git: https://salsa.debian.org/debian-gis-team/mapserver.git -b buster-backports
Homepage: http://www.mapserver.org
@@ -211,7 +211,6 @@ Depends: ttf-bitstream-vera,
${misc:Depends}
Suggests: mapserver-bin,
mapserver-doc
-Provides: ${python3:Provides}
Description: Python library for MapServer
Python MapScript provides MapServer functions for Python scripts.
.
=====================================
debian/libmapscript-java.lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# https://github.com/mapserver/mapserver/issues/5746
-file-references-package-build-path *
-
=====================================
debian/libmapscript-perl.lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# https://github.com/mapserver/mapserver/issues/5746
-file-references-package-build-path *
-
=====================================
debian/libmapserver2.lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# https://github.com/mapserver/mapserver/issues/5746
-file-references-package-build-path *
-
=====================================
debian/libmapserver2.symbols
=====================================
@@ -1,8 +1,7 @@
-# SymbolsHelper-Confirmed: 7.4.2 amd64
+# SymbolsHelper-Confirmed: 7.4.3 amd64
libmapserver.so.2 #PACKAGE# #MINVER#
* Build-Depends-Package: libmapserver-dev
BuildExpressionTree at Base 6.2.1
- CleanVSIDir at Base 6.2.1
CompareEllipseRegion at Base 6.2.1
CompareRectangleRegion at Base 6.2.1
DefineAxis at Base 6.2.1
@@ -942,6 +941,7 @@ libmapserver.so.2 #PACKAGE# #MINVER#
msCircleDrawLineSymbol at Base 7.0.0
msCircleDrawShadeSymbol at Base 6.2.1
msClassifyRasterBuffer at Base 6.2.1
+ msCleanVSIDir at Base 7.4.3
msCleanup at Base 6.2.1
msCleanupKernelDensityDataset at Base 7.0.0
msClipPolygonRect at Base 6.2.1
=====================================
debian/mapserver-bin.lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# https://github.com/mapserver/mapserver/issues/5746
-file-references-package-build-path *
-
=====================================
debian/python3-mapscript.lintian-overrides deleted
=====================================
@@ -1,3 +0,0 @@
-# https://github.com/mapserver/mapserver/issues/5746
-file-references-package-build-path *
-
=====================================
debian/upstream/metadata
=====================================
@@ -3,6 +3,5 @@ Bug-Database: https://github.com/mapserver/mapserver/issues
Bug-Submit: https://github.com/mapserver/mapserver/issues/new
Contact: The MapServer team <mapserver-dev at lists.osgeo.org>
FAQ: http://mapserver.org/faq.html
-Name: MapServer
Repository: https://github.com/mapserver/mapserver.git
Repository-Browse: https://github.com/mapserver/mapserver
=====================================
mapdraw.c
=====================================
@@ -1354,7 +1354,6 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
if(map->querymap.style == MS_NORMAL || status != MS_SUCCESS) return(status);
}
-
/* if MS_HILITE, alter the one style (always at least 1 style), and set a MINDISTANCE for the labelObj to avoid duplicates */
if(map->querymap.style == MS_HILITE) {
if (layer->numclasses > 0) {
@@ -1377,6 +1376,11 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
colorbuffer[i] = layer->class[i]->styles[0]->outlinecolor; /* if no color, save the outlinecolor from the BOTTOM style */
layer->class[i]->styles[0]->outlinecolor = map->querymap.color;
}
+ } else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) { /* alter BOTTOM style for lines with outlines */
+ if(MS_VALID_COLOR(layer->class[i]->styles[0]->color)) {
+ colorbuffer[i] = layer->class[i]->styles[0]->color; /* save the color from the BOTTOM style */
+ layer->class[i]->styles[0]->color = map->querymap.color;
+ } /* else ??? */
} else if (layer->class[i]->numstyles > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color)) {
colorbuffer[i] = layer->class[i]->styles[layer->class[i]->numstyles-1]->color; /* save the color from the TOP style */
@@ -1388,7 +1392,7 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
} else if (layer->class[i]->numlabels > 0) {
colorbuffer[i] = layer->class[i]->labels[0]->color;
layer->class[i]->labels[0]->color = map->querymap.color;
- }
+ } /* else ??? */
mindistancebuffer[i] = -1; /* RFC77 TODO: only using the first label, is that cool? */
if(layer->class[i]->numlabels > 0) {
@@ -1428,19 +1432,28 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
}
cache = MS_FALSE;
- if(layer->type == MS_LAYER_LINE && layer->class[shape.classindex]->numstyles > 1)
+ if(layer->type == MS_LAYER_LINE && (layer->class[shape.classindex]->numstyles > 1 || (layer->class[shape.classindex]->numstyles == 1 && layer->class[shape.classindex]->styles[0]->outlinewidth > 0))) {
+ int i;
cache = MS_TRUE; /* only line layers with multiple styles need be cached (I don't think POLYLINE layers need caching - SDL) */
+ /* we can't handle caching with attribute binding other than for the first style (#3976) */
+ for(i=1; i<layer->class[shape.classindex]->numstyles; i++) {
+ if(layer->class[shape.classindex]->styles[i]->numbindings > 0) cache = MS_FALSE;
+ }
+ }
+
if(annotate && layer->class[shape.classindex]->numlabels > 0) {
drawmode |= MS_DRAWMODE_LABELS;
}
if(cache) {
- drawmode |= MS_DRAWMODE_SINGLESTYLE;
- status = msDrawShape(map, layer, &shape, image, 0, drawmode); /* draw only the first style */
- }
- else
+ styleObj *pStyle = layer->class[shape.classindex]->styles[0];
+ if (pStyle->outlinewidth > 0) msOutlineRenderingPrepareStyle(pStyle, map, layer, image);
+ status = msDrawShape(map, layer, &shape, image, 0, drawmode|MS_DRAWMODE_SINGLESTYLE); /* draw only the first style */
+ if (pStyle->outlinewidth > 0) msOutlineRenderingRestoreStyle(pStyle, map, layer, image);
+ } else {
status = msDrawShape(map, layer, &shape, image, -1, drawmode); /* all styles */
+ }
if(status != MS_SUCCESS) {
msLayerClose(layer);
msFree(colorbuffer);
@@ -1467,19 +1480,36 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
if(shpcache) {
int s;
-
- for(s=1; s<maxnumstyles; s++) {
+ for(s=0; s<maxnumstyles; s++) {
for(current=shpcache; current; current=current->next) {
if(layer->class[current->shape.classindex]->numstyles > s) {
- styleObj *curStyle = layer->class[current->shape.classindex]->styles[s];
+ styleObj *pStyle = layer->class[current->shape.classindex]->styles[s];
+ if(pStyle->_geomtransform.type != MS_GEOMTRANSFORM_NONE)
+ continue; /* skip this as it has already been rendered */
if(map->scaledenom > 0) {
- if((curStyle->maxscaledenom != -1) && (map->scaledenom >= curStyle->maxscaledenom))
+ if((pStyle->maxscaledenom != -1) && (map->scaledenom >= pStyle->maxscaledenom))
continue;
- if((curStyle->minscaledenom != -1) && (map->scaledenom < curStyle->minscaledenom))
+ if((pStyle->minscaledenom != -1) && (map->scaledenom < pStyle->minscaledenom))
continue;
}
- if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, ¤t->shape, (layer->class[current->shape.classindex]->styles[s]), layer->scalefactor)))
- return MS_FAILURE;
+ if(s==0 && pStyle->outlinewidth>0 && MS_VALID_COLOR(pStyle->color)) {
+ if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, ¤t->shape, pStyle, layer->scalefactor))) {
+ return MS_FAILURE;
+ }
+ } else if(s>0) {
+ if (pStyle->outlinewidth > 0 && MS_VALID_COLOR(pStyle->outlinecolor)) {
+ msOutlineRenderingPrepareStyle(pStyle, map, layer, image);
+ if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, ¤t->shape, pStyle, layer->scalefactor))) {
+ return MS_FAILURE;
+ }
+ msOutlineRenderingRestoreStyle(pStyle, map, layer, image);
+ }
+ /* draw a valid line, i.e. one with a color defined or of type pixmap */
+ if(MS_VALID_COLOR(pStyle->color) || (pStyle->symbol<map->symbolset.numsymbols && (map->symbolset.symbol[pStyle->symbol]->type == MS_SYMBOL_PIXMAP || map->symbolset.symbol[pStyle->symbol]->type == MS_SYMBOL_SVG))) {
+ if(UNLIKELY(MS_FAILURE == msDrawLineSymbol(map, image, ¤t->shape, pStyle, layer->scalefactor)))
+ return MS_FAILURE;
+ }
+ }
}
}
}
@@ -1496,20 +1526,21 @@ int msDrawQueryLayer(mapObj *map, layerObj *layer, imageObj *image)
layer->class[i]->styles[0]->color = colorbuffer[i];
else if(MS_VALID_COLOR(layer->class[i]->styles[0]->outlinecolor))
layer->class[i]->styles[0]->outlinecolor = colorbuffer[i]; /* if no color, restore outlinecolor for the BOTTOM style */
+ } else if (layer->type == MS_LAYER_LINE && layer->class[i]->numstyles > 0 && layer->class[i]->styles[0]->outlinewidth > 0) {
+ if(MS_VALID_COLOR(layer->class[i]->styles[0]->color))
+ layer->class[i]->styles[0]->color = colorbuffer[i];
} else if (layer->class[i]->numstyles > 0) {
if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->color))
layer->class[i]->styles[layer->class[i]->numstyles-1]->color = colorbuffer[i];
else if(MS_VALID_COLOR(layer->class[i]->styles[layer->class[i]->numstyles-1]->outlinecolor))
layer->class[i]->styles[layer->class[i]->numstyles-1]->outlinecolor = colorbuffer[i]; /* if no color, restore outlinecolor for the TOP style */
- }
- else if (layer->class[i]->numlabels > 0) {
- if(MS_VALID_COLOR(layer->class[i]->labels[0]->color))
- layer->class[i]->labels[0]->color = colorbuffer[i];
+ } else if (layer->class[i]->numlabels > 0) {
+ if(MS_VALID_COLOR(layer->class[i]->labels[0]->color))
+ layer->class[i]->labels[0]->color = colorbuffer[i];
}
if(layer->class[i]->numlabels > 0)
layer->class[i]->labels[0]->mindistance = mindistancebuffer[i]; /* RFC77 TODO: again, only using the first label, is that cool? */
-
}
msFree(colorbuffer);
=====================================
mapgdal.c
=====================================
@@ -112,13 +112,13 @@ void msGDALCleanup( void )
}
/************************************************************************/
-/* CleanVSIDir() */
+/* msCleanVSIDir() */
/* */
/* For the temporary /vsimem/msout directory we need to be sure */
/* things are clean before we start, and after we are done. */
/************************************************************************/
-void CleanVSIDir( const char *pszDir )
+void msCleanVSIDir( const char *pszDir )
{
char **papszFiles = CPLReadDir( pszDir );
@@ -129,7 +129,7 @@ void CleanVSIDir( const char *pszDir )
|| strcasecmp(papszFiles[i],"..") == 0 )
continue;
- VSIUnlink( papszFiles[i] );
+ VSIUnlink( CPLFormFilename(pszDir, papszFiles[i], NULL) );
}
CSLDestroy( papszFiles );
@@ -192,7 +192,7 @@ int msSaveImageGDAL( mapObj *map, imageObj *image, const char *filenameIn )
if( bUseXmp == MS_FALSE && GDALGetMetadataItem( hOutputDriver, GDAL_DCAP_VIRTUALIO, NULL )
!= NULL ) {
- CleanVSIDir( "/vsimem/msout" );
+ msCleanVSIDir( "/vsimem/msout" );
filenameToFree = msTmpFile(map, NULL, "/vsimem/msout/", pszExtension );
}
@@ -503,7 +503,7 @@ int msSaveImageGDAL( mapObj *map, imageObj *image, const char *filenameIn )
VSIFCloseL( fp );
VSIUnlink( filename );
- CleanVSIDir( "/vsimem/msout" );
+ msCleanVSIDir( "/vsimem/msout" );
msFree( filenameToFree );
}
=====================================
mapogr.cpp
=====================================
@@ -2475,7 +2475,7 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
if ( !bOffsetAlreadyAdded && psInfo->bPaging && layer->startindex > 0 ) {
char szOffset[50];
- snprintf(szOffset, sizeof(szOffset), " OFFSET %d", layer->startindex);
+ snprintf(szOffset, sizeof(szOffset), " OFFSET %d", layer->startindex-1);
select = msStringConcatenate(select, szOffset);
}
@@ -3469,7 +3469,7 @@ static int msOGRExtractTopSpatialFilter( msOGRFileInfo *info,
pSpatialFilterNode);
}
- if( expr->m_nToken == MS_TOKEN_COMPARISON_INTERSECTS &&
+ if( (expr->m_nToken == MS_TOKEN_COMPARISON_INTERSECTS || expr->m_nToken == MS_TOKEN_COMPARISON_CONTAINS ) &&
expr->m_aoChildren.size() == 2 &&
expr->m_aoChildren[1]->m_nToken == MS_TOKEN_LITERAL_SHAPE )
{
=====================================
mappostgis.c
=====================================
@@ -4025,6 +4025,8 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
msFree(snippet);
msFree(stresc);
} else if(filter->type == MS_EXPRESSION) {
+ int ieq_expected = MS_FALSE;
+
if(msPostGISParseData(layer) != MS_SUCCESS) return MS_FAILURE;
if(layer->debug >= 2) msDebug("msPostGISLayerTranslateFilter. String: %s.\n", filter->string);
@@ -4039,7 +4041,9 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
*/
if(node->token == MS_TOKEN_BINDING_TIME) {
bindingToken = node->token;
- } else if(node->token == MS_TOKEN_COMPARISON_EQ || node->token == MS_TOKEN_COMPARISON_NE ||
+ } else if(node->token == MS_TOKEN_COMPARISON_EQ ||
+ node->token == MS_TOKEN_COMPARISON_IEQ ||
+ node->token == MS_TOKEN_COMPARISON_NE ||
node->token == MS_TOKEN_COMPARISON_GT || node->token == MS_TOKEN_COMPARISON_GE ||
node->token == MS_TOKEN_COMPARISON_LT || node->token == MS_TOKEN_COMPARISON_LE ||
node->token == MS_TOKEN_COMPARISON_IN) {
@@ -4090,7 +4094,10 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
msFreeCharArray(strings, nstrings);
} else {
- strtmpl = "'%s'";
+ if(comparisonToken == MS_TOKEN_COMPARISON_IEQ)
+ strtmpl = "lower('%s')";
+ else
+ strtmpl = "'%s'";
stresc = msPostGISEscapeSQLParam(layer, node->tokenval.strval);
snippet = (char *) msSmallMalloc(strlen(strtmpl) + strlen(stresc));
sprintf(snippet, strtmpl, stresc);
@@ -4138,7 +4145,11 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
case MS_TOKEN_BINDING_DOUBLE:
case MS_TOKEN_BINDING_INTEGER:
case MS_TOKEN_BINDING_STRING:
- if(node->token == MS_TOKEN_BINDING_STRING || node->next->token == MS_TOKEN_COMPARISON_RE || node->next->token == MS_TOKEN_COMPARISON_IRE)
+ if (node->token == MS_TOKEN_BINDING_STRING && node->next->token == MS_TOKEN_COMPARISON_IEQ ) {
+ strtmpl = "lower(%s::text)";
+ ieq_expected = MS_TRUE;
+ }
+ else if(node->token == MS_TOKEN_BINDING_STRING || node->next->token == MS_TOKEN_COMPARISON_RE || node->next->token == MS_TOKEN_COMPARISON_IRE)
strtmpl = "%s::text"; /* explicit cast necessary for certain operators */
else
strtmpl = "%s";
@@ -4184,8 +4195,19 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
native_string = msStringConcatenate(native_string, msExpressionTokenToString(node->token));
break;
- /* unsupported tokens */
case MS_TOKEN_COMPARISON_IEQ:
+ if( ieq_expected )
+ {
+ native_string = msStringConcatenate(native_string, "=");
+ ieq_expected = MS_FALSE;
+ }
+ else
+ {
+ goto cleanup;
+ }
+ break;
+
+ /* unsupported tokens */
case MS_TOKEN_COMPARISON_BEYOND:
case MS_TOKEN_FUNCTION_TOSTRING:
case MS_TOKEN_FUNCTION_ROUND:
=====================================
mapscript/mapscript.i
=====================================
@@ -30,6 +30,12 @@
============================================================================
*/
+%begin %{
+#ifdef _MSC_VER
+#define SWIG_PYTHON_INTERPRETER_NO_DEBUG
+#endif
+%}
+
#ifndef SWIGPHPNG
%module mapscript
#else
@@ -191,7 +197,7 @@ typedef struct {
============================================================================
*/
-#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGRUBY)
+#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGRUBY) || defined(SWIGPHP7)
%include "../mserror.i"
#endif
=====================================
mapscript/php/php_mapscript_util.h
=====================================
@@ -146,8 +146,8 @@ static zend_always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isre
#endif /* PHP_VERSION_ID < 70000 */
#if PHP_VERSION_ID >= 70300
-#define MAPSCRIPT_ADDREF(zv) zend_gc_addref(&(Z_COUNTED(zv))->gc)
-#define MAPSCRIPT_ADDREF_P(p) zend_gc_addref(&(Z_COUNTED_P(p))->gc)
+#define MAPSCRIPT_ADDREF(zv) if(!Z_ISUNDEF(zv)) GC_ADDREF(Z_COUNTED(zv))
+#define MAPSCRIPT_ADDREF_P(p) if(!Z_ISUNDEF(*p)) GC_ADDREF(Z_COUNTED_P(p))
#else
#if PHP_VERSION_ID >= 70000
#define MAPSCRIPT_ADDREF(zv) if(!(Z_ISUNDEF(zv))) GC_REFCOUNT(Z_COUNTED(zv))++;
@@ -163,7 +163,7 @@ static zend_always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isre
if (!(Z_ISUNDEF(zv))) \
{ \
zend_refcounted *_gc = Z_COUNTED(zv); \
- zend_gc_delref(&_gc->gc); \
+ GC_DELREF(_gc); \
if(GC_REFCOUNT(_gc) == 0) \
rc_dtor_func(_gc); \
ZVAL_UNDEF(&zv); \
=====================================
mapscript/phpng/php7module.i
=====================================
@@ -3,3 +3,28 @@
php_info_print_table_row(2, \"MapServer Version\", msGetVersion());
php_info_print_table_end();
"
+
+
+/* To support imageObj::getBytes */
+%typemap(out) gdBuffer {
+ RETVAL_STRINGL((const char*)$1.data, $1.size);
+ if( $1.owns_data )
+ msFree($1.data);
+}
+
+
+/* Module initialization: call msSetup() and register msCleanup() */
+%init %{
+ if (msSetup() != MS_SUCCESS)
+ {
+ msSetError(MS_MISCERR, "Failed to set up threads and font cache",
+ "msSetup()");
+ }
+
+%}
+
+%mshutdown {
+ msCleanup();
+}
+
+
=====================================
mapserver.h
=====================================
@@ -2783,6 +2783,9 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
/* ==================================================================== */
MS_DLL_EXPORT int msSaveImageGDAL( mapObj *map, imageObj *image, const char *filename );
MS_DLL_EXPORT int msInitDefaultGDALOutputFormat( outputFormatObj *format );
+#ifdef USE_GDAL
+ void msCleanVSIDir( const char *pszDir );
+#endif
/* ==================================================================== */
/* prototypes for functions in mapogroutput.c */
=====================================
mapservutil.c
=====================================
@@ -1666,6 +1666,7 @@ int msCGIDispatchLegendIconRequest(mapservObj *mapserv)
status = MS_FAILURE;
goto li_cleanup;
}
+ img->map = mapserv->map;
/* drop this reference to output format */
msApplyOutputFormat(&format, NULL, MS_NOOVERRIDE, MS_NOOVERRIDE, MS_NOOVERRIDE);
=====================================
mapwms.c
=====================================
@@ -994,7 +994,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
epsgbuf[0]='\0';
srsbuffer[0]='\0';
-
/* Some of the getMap parameters are actually required depending on the */
/* request, but for now we assume all are optional and the map file */
/* defaults will apply. */
@@ -1035,9 +1034,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
request = values[i];
}
-
-
-
if (strcasecmp(names[i], "LAYERS") == 0) {
int j, k, iLayer, *layerOrder;
int nLayerOrder = 0;
@@ -1153,7 +1149,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
used with msLoadProjection and that does alreay the job */
/* snprintf(srsbuffer, 100, "init=epsg:%.20s", values[i]+5); */
-
snprintf(srsbuffer, sizeof(srsbuffer), "EPSG:%.20s",values[i]+5);
snprintf(epsgbuf, sizeof(epsgbuf), "EPSG:%.20s",values[i]+5);
@@ -1164,7 +1159,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
srsbuffer[strlen(srsbuffer)-1] = '\0';
if (epsgbuf[strlen(epsgbuf)-1] == ',')
epsgbuf[strlen(epsgbuf)-1] = '\0';
-
}
/* we need to wait until all params are read before */
@@ -1650,29 +1644,12 @@ this request. Check wms/ows_enable_request settings.",
}
}
- /*
- ** Apply vendor-specific filter if specified
- */
- if (filter) {
- if (sld_url || sld_body) {
- msSetError(MS_WMSERR,
- "Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.",
- "msWMSLoadGetMapParams()");
- return msWMSException(map, nVersion, NULL, wms_exception_format);
- }
-
- if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format) == MS_FAILURE) {
- return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */
- }
- }
-
if (sld_url || sld_body) {
int nLayersBefore, nLayerAfter;
char request_tmp[32];
char *pszLayerNames = NULL;
nLayersBefore = map->numlayers;
-
/* -------------------------------------------------------------------- */
/* if LAYERS parameter was not given, set all layers to off */
/* -------------------------------------------------------------------- */
@@ -1683,7 +1660,6 @@ this request. Check wms/ows_enable_request settings.",
}
}
-
/*apply sld if defined. This is done here so that bbox and srs are already applied*/
if (sld_url) {
if ((status = msSLDApplySLDURL(map, sld_url, -1, NULL, &pszLayerNames)) != MS_SUCCESS)
@@ -1734,6 +1710,7 @@ this request. Check wms/ows_enable_request settings.",
msFree(pszLayerNames);
}
+
/* Validate Styles :
** MapServer advertize styles through th group setting in a class object.
** If no styles are set MapServer expects to have empty values
@@ -1909,6 +1886,22 @@ this request. Check wms/ows_enable_request settings.",
}
+ /*
+ ** Apply vendor-specific filter if specified
+ */
+ if (filter) {
+ if (sld_url || sld_body) {
+ msSetError(MS_WMSERR,
+ "Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.",
+ "msWMSLoadGetMapParams()");
+ return msWMSException(map, nVersion, NULL, wms_exception_format);
+ }
+
+ if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format) == MS_FAILURE) {
+ return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */
+ }
+ }
+
return MS_SUCCESS;
}
=====================================
mapwmslayer.c
=====================================
@@ -44,8 +44,6 @@
# include "cpl_vsi.h"
#endif
-void CleanVSIDir( const char *pszDir );
-
/**********************************************************************
* msInitWmsParamsObj()
*
@@ -1363,7 +1361,7 @@ int msDrawWMSLayerLow(int nLayerId, httpRequestObj *pasReqInfo,
* to attach a "VSI" name to this buffer.
* ------------------------------------------------------------------ */
if( pasReqInfo[iReq].pszOutputFile == NULL ) {
- CleanVSIDir( "/vsimem/msout" );
+ msCleanVSIDir( "/vsimem/msout" );
mem_filename = msTmpFile(map, NULL, "/vsimem/msout/", "img.tmp" );
VSIFCloseL(
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/compare/6c8914d8aa0f5326a10006559dc083496369c2a5...10ced127578184356dd488181776f79741d79187
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/compare/6c8914d8aa0f5326a10006559dc083496369c2a5...10ced127578184356dd488181776f79741d79187
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20191222/fa629f5e/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list