summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2016-07-15 10:21:59 -0400
committerBrian Evans <grknight@gentoo.org>2016-07-15 10:21:59 -0400
commit24b35d81ec7058021adfdbcfd6170b8527e45c46 (patch)
tree6e1571e4e9908ac445dde8f6c62a72ed0e126197 /sci-geosciences/mapserver/files
parentdev-php/pecl-mysqlnd_ms: Drop php 5.5 support wrt bug 588732; Add tests (diff)
downloadgentoo-24b35d81ec7058021adfdbcfd6170b8527e45c46.tar.gz
gentoo-24b35d81ec7058021adfdbcfd6170b8527e45c46.tar.bz2
gentoo-24b35d81ec7058021adfdbcfd6170b8527e45c46.zip
sci-geosciences/mapserver: Drop broken versions and associated patches
Requested by Amynka on IRC Package-Manager: portage-2.3.0
Diffstat (limited to 'sci-geosciences/mapserver/files')
-rw-r--r--sci-geosciences/mapserver/files/mapserver-7.0.0-correct-min-max-calls.patch511
-rw-r--r--sci-geosciences/mapserver/files/mapserver-7.0.0-disabled-ogr.patch56
-rw-r--r--sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch35
-rw-r--r--sci-geosciences/mapserver/files/mapserver-7.0.0-mapwcs-disabled-libxml2.patch20
4 files changed, 0 insertions, 622 deletions
diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.0-correct-min-max-calls.patch b/sci-geosciences/mapserver/files/mapserver-7.0.0-correct-min-max-calls.patch
deleted file mode 100644
index 738345717854..000000000000
--- a/sci-geosciences/mapserver/files/mapserver-7.0.0-correct-min-max-calls.patch
+++ /dev/null
@@ -1,511 +0,0 @@
-diff --git a/mapcontour.c b/mapcontour.c
-index ae52fc6..74cf7d1 100644
---- a/mapcontour.c
-+++ b/mapcontour.c
-@@ -345,11 +345,11 @@ static int msContourLayerReadRaster(layerObj *layer, rectObj rect)
- ury = floor(ury / virtual_grid_step_y) * virtual_grid_step_y - (virtual_grid_step_x*5);
- lly = ceil(lly / virtual_grid_step_y) * virtual_grid_step_y + (virtual_grid_step_x*5);
-
-- src_xoff = MAX(0,(int) floor(llx+0.5));
-- src_yoff = MAX(0,(int) floor(ury+0.5));
-- src_xsize = MIN(MAX(0,(int) (urx - llx + 0.5)),
-+ src_xoff = MS_MAX(0,(int) floor(llx+0.5));
-+ src_yoff = MS_MAX(0,(int) floor(ury+0.5));
-+ src_xsize = MS_MIN(MS_MAX(0,(int) (urx - llx + 0.5)),
- GDALGetRasterXSize(clinfo->hOrigDS) - src_xoff);
-- src_ysize = MIN(MAX(0,(int) (lly - ury + 0.5)),
-+ src_ysize = MS_MIN(MS_MAX(0,(int) (lly - ury + 0.5)),
- GDALGetRasterYSize(clinfo->hOrigDS) - src_yoff);
-
- /* Update the geographic extent (buffer added) */
-@@ -386,8 +386,8 @@ static int msContourLayerReadRaster(layerObj *layer, rectObj rect)
- } else {
- src_xoff = 0;
- src_yoff = 0;
-- dst_xsize = src_xsize = MIN(map->width,src_xsize);
-- dst_ysize = src_ysize = MIN(map->height,src_ysize);
-+ dst_xsize = src_xsize = MS_MIN(map->width,src_xsize);
-+ dst_ysize = src_ysize = MS_MIN(map->height,src_ysize);
- copyRect.minx = copyRect.miny = 0;
- copyRect.maxx = map->width;
- copyRect.maxy = map->height;
-@@ -436,7 +436,7 @@ static int msContourLayerReadRaster(layerObj *layer, rectObj rect)
- adfGeoTransform[4] = 0;
- adfGeoTransform[5] = -dst_cellsize_y;
-
-- clinfo->cellsize = MAX(dst_cellsize_x, dst_cellsize_y);
-+ clinfo->cellsize = MS_MAX(dst_cellsize_x, dst_cellsize_y);
- {
- char buf[64];
- sprintf(buf, "%lf", clinfo->cellsize);
-diff --git a/mapdrawgdal.c b/mapdrawgdal.c
-index e843318..f90f2ac 100644
---- a/mapdrawgdal.c
-+++ b/mapdrawgdal.c
-@@ -217,21 +217,21 @@ int msDrawRasterLayerGDAL(mapObj *map, layerObj *layer, imageObj *image,
- urx = GEO_TRANS(adfInvGeoTransform+0,copyRect.maxx,copyRect.maxy);
- ury = GEO_TRANS(adfInvGeoTransform+3,copyRect.maxx,copyRect.maxy);
-
-- src_xoff = MAX(0,(int) floor(llx+0.5));
-- src_yoff = MAX(0,(int) floor(ury+0.5));
-- src_xsize = MIN(MAX(0,(int) (urx - llx + 0.5)),
-+ src_xoff = MS_MAX(0,(int) floor(llx+0.5));
-+ src_yoff = MS_MAX(0,(int) floor(ury+0.5));
-+ src_xsize = MS_MIN(MS_MAX(0,(int) (urx - llx + 0.5)),
- GDALGetRasterXSize(hDS) - src_xoff);
-- src_ysize = MIN(MAX(0,(int) (lly - ury + 0.5)),
-+ src_ysize = MS_MIN(MS_MAX(0,(int) (lly - ury + 0.5)),
- GDALGetRasterYSize(hDS) - src_yoff);
-
- /* We want very small windows to use at least one source pixel (#4172) */
- if( src_xsize == 0 && (urx - llx) > 0.0 ) {
- src_xsize = 1;
-- src_xoff = MIN(src_xoff,GDALGetRasterXSize(hDS)-1);
-+ src_xoff = MS_MIN(src_xoff,GDALGetRasterXSize(hDS)-1);
- }
- if( src_ysize == 0 && (lly - ury) > 0.0 ) {
- src_ysize = 1;
-- src_yoff = MIN(src_yoff,GDALGetRasterYSize(hDS)-1);
-+ src_yoff = MS_MIN(src_yoff,GDALGetRasterYSize(hDS)-1);
- }
-
- if( src_xsize == 0 || src_ysize == 0 ) {
-@@ -251,11 +251,11 @@ int msDrawRasterLayerGDAL(mapObj *map, layerObj *layer, imageObj *image,
-
- dst_lrx = (int) ((copyRect.maxx - mapRect.minx) / map->cellsize + 0.5);
- dst_lry = (int) ((mapRect.maxy - copyRect.miny) / map->cellsize + 0.5);
-- dst_lrx = MAX(0,MIN(image->width,dst_lrx));
-- dst_lry = MAX(0,MIN(image->height,dst_lry));
-+ dst_lrx = MS_MAX(0,MS_MIN(image->width,dst_lrx));
-+ dst_lry = MS_MAX(0,MS_MIN(image->height,dst_lry));
-
-- dst_xsize = MAX(0,MIN(image->width,dst_lrx - dst_xoff));
-- dst_ysize = MAX(0,MIN(image->height,dst_lry - dst_yoff));
-+ dst_xsize = MS_MAX(0,MS_MIN(image->width,dst_lrx - dst_xoff));
-+ dst_ysize = MS_MAX(0,MS_MIN(image->height,dst_lry - dst_yoff));
-
- if( dst_xsize == 0 || dst_ysize == 0 ) {
- if( layer->debug )
-@@ -290,8 +290,8 @@ int msDrawRasterLayerGDAL(mapObj *map, layerObj *layer, imageObj *image,
- else {
- dst_xoff = src_xoff = 0;
- dst_yoff = src_yoff = 0;
-- dst_xsize = src_xsize = MIN(image->width,src_xsize);
-- dst_ysize = src_ysize = MIN(image->height,src_ysize);
-+ dst_xsize = src_xsize = MS_MIN(image->width,src_xsize);
-+ dst_ysize = src_ysize = MS_MIN(image->height,src_ysize);
- }
-
- /*
-@@ -533,7 +533,7 @@ int msDrawRasterLayerGDAL(mapObj *map, layerObj *layer, imageObj *image,
- return -1;
- }
-
-- color_count = MIN(256,GDALGetColorEntryCount(hColorMap));
-+ color_count = MS_MIN(256,GDALGetColorEntryCount(hColorMap));
- for(i=0; i < color_count; i++) {
- colorObj pixel;
- int colormap_index;
-@@ -598,7 +598,7 @@ int msDrawRasterLayerGDAL(mapObj *map, layerObj *layer, imageObj *image,
- cmap_set = TRUE;
- #endif
-
-- color_count = MIN(256,GDALGetColorEntryCount(hColorMap));
-+ color_count = MS_MIN(256,GDALGetColorEntryCount(hColorMap));
-
- for(i=0; i < color_count; i++) {
- GDALColorEntry sEntry;
-@@ -889,8 +889,8 @@ static int ParseDefaultLUT( const char *lut_def, GByte *lut )
- lut_read++;
- }
-
-- this_in = MAX(0,MIN(255,this_in));
-- this_out = MAX(0,MIN(255,this_out));
-+ this_in = MS_MAX(0,MS_MIN(255,this_in));
-+ this_out = MS_MAX(0,MS_MIN(255,this_out));
-
- /* apply linear values from last in:out to this in:out */
- for( lut_i = last_in; lut_i <= this_in; lut_i++ ) {
-@@ -1275,8 +1275,8 @@ LoadGDALImages( GDALDatasetH hDS, int band_numbers[4], int band_count,
- bMinMaxSet = TRUE;
- }
-
-- dfScaleMin = MIN(dfScaleMin,pafRawData[i]);
-- dfScaleMax = MAX(dfScaleMax,pafRawData[i]);
-+ dfScaleMin = MS_MIN(dfScaleMin,pafRawData[i]);
-+ dfScaleMax = MS_MAX(dfScaleMax,pafRawData[i]);
- }
-
- if( dfScaleMin == dfScaleMax )
-@@ -1768,8 +1768,8 @@ msDrawRasterLayerGDAL_16BitClassification(
- fDataMin = fDataMax = pafRawData[i];
- bGotFirstValue = TRUE;
- } else {
-- fDataMin = MIN(fDataMin,pafRawData[i]);
-- fDataMax = MAX(fDataMax,pafRawData[i]);
-+ fDataMin = MS_MIN(fDataMin,pafRawData[i]);
-+ fDataMax = MS_MAX(fDataMax,pafRawData[i]);
- }
- }
-
-@@ -2018,7 +2018,7 @@ int *msGetGDALBandList( layerObj *layer, void *hDS,
- /* -------------------------------------------------------------------- */
- if( CSLFetchNameValue( layer->processing, "BANDS" ) == NULL ) {
- if( max_bands > 0 )
-- *band_count = MIN(file_bands,max_bands);
-+ *band_count = MS_MIN(file_bands,max_bands);
- else
- *band_count = file_bands;
-
-diff --git a/maprasterquery.c b/maprasterquery.c
-index 80accfa..06f0ece 100644
---- a/maprasterquery.c
-+++ b/maprasterquery.c
-@@ -330,11 +330,11 @@ static void msRasterQueryAddPixel( layerObj *layer, pointObj *location,
- /* -------------------------------------------------------------------- */
- else {
- if( rlinfo->band_count >= 3 ) {
-- red = (int) MAX(0,MIN(255,values[0]));
-- green = (int) MAX(0,MIN(255,values[1]));
-- blue = (int) MAX(0,MIN(255,values[2]));
-+ red = (int) MS_MAX(0,MS_MIN(255,values[0]));
-+ green = (int) MS_MAX(0,MS_MIN(255,values[1]));
-+ blue = (int) MS_MAX(0,MS_MIN(255,values[2]));
- } else {
-- red = green = blue = (int) MAX(0,MIN(255,values[0]));
-+ red = green = blue = (int) MS_MAX(0,MS_MIN(255,values[0]));
- }
- }
-
-@@ -454,35 +454,35 @@ msRasterQueryByRectLow(mapObj *map, layerObj *layer, GDALDatasetH hDS,
- /* top right */
- dfX = GEO_TRANS(adfInvGeoTransform , searchrect.maxx, searchrect.maxy);
- dfY = GEO_TRANS(adfInvGeoTransform+3, searchrect.maxx, searchrect.maxy);
-- dfXMin = MIN(dfXMin,dfX);
-- dfXMax = MAX(dfXMax,dfX);
-- dfYMin = MIN(dfYMin,dfY);
-- dfYMax = MAX(dfYMax,dfY);
-+ dfXMin = MS_MIN(dfXMin,dfX);
-+ dfXMax = MS_MAX(dfXMax,dfX);
-+ dfYMin = MS_MIN(dfYMin,dfY);
-+ dfYMax = MS_MAX(dfYMax,dfY);
-
- /* bottom left */
- dfX = GEO_TRANS(adfInvGeoTransform , searchrect.minx, searchrect.miny);
- dfY = GEO_TRANS(adfInvGeoTransform+3, searchrect.minx, searchrect.miny);
-- dfXMin = MIN(dfXMin,dfX);
-- dfXMax = MAX(dfXMax,dfX);
-- dfYMin = MIN(dfYMin,dfY);
-- dfYMax = MAX(dfYMax,dfY);
-+ dfXMin = MS_MIN(dfXMin,dfX);
-+ dfXMax = MS_MAX(dfXMax,dfX);
-+ dfYMin = MS_MIN(dfYMin,dfY);
-+ dfYMax = MS_MAX(dfYMax,dfY);
-
- /* bottom right */
- dfX = GEO_TRANS(adfInvGeoTransform , searchrect.maxx, searchrect.miny);
- dfY = GEO_TRANS(adfInvGeoTransform+3, searchrect.maxx, searchrect.miny);
-- dfXMin = MIN(dfXMin,dfX);
-- dfXMax = MAX(dfXMax,dfX);
-- dfYMin = MIN(dfYMin,dfY);
-- dfYMax = MAX(dfYMax,dfY);
-+ dfXMin = MS_MIN(dfXMin,dfX);
-+ dfXMax = MS_MAX(dfXMax,dfX);
-+ dfYMin = MS_MIN(dfYMin,dfY);
-+ dfYMax = MS_MAX(dfYMax,dfY);
-
- /* -------------------------------------------------------------------- */
- /* Trim the rectangle to the area of the file itself, but out */
- /* to the edges of the touched edge pixels. */
- /* -------------------------------------------------------------------- */
-- dfXMin = MAX(0.0,MIN(nRXSize,floor(dfXMin)));
-- dfYMin = MAX(0.0,MIN(nRYSize,floor(dfYMin)));
-- dfXMax = MAX(0.0,MIN(nRXSize,ceil(dfXMax)));
-- dfYMax = MAX(0.0,MIN(nRYSize,ceil(dfYMax)));
-+ dfXMin = MS_MAX(0.0,MS_MIN(nRXSize,floor(dfXMin)));
-+ dfYMin = MS_MAX(0.0,MS_MIN(nRYSize,floor(dfYMin)));
-+ dfXMax = MS_MAX(0.0,MS_MIN(nRXSize,ceil(dfXMax)));
-+ dfYMax = MS_MAX(0.0,MS_MIN(nRYSize,ceil(dfYMax)));
-
- /* -------------------------------------------------------------------- */
- /* Convert to integer offset/size values. */
-diff --git a/mapresample.c b/mapresample.c
-index 26b253e..532b6a8 100644
---- a/mapresample.c
-+++ b/mapresample.c
-@@ -34,8 +34,8 @@
-
-
- #ifndef MAX
--# define MIN(a,b) ((a<b) ? a : b)
--# define MAX(a,b) ((a>b) ? a : b)
-+# define MS_MIN(a,b) ((a<b) ? a : b)
-+# define MS_MAX(a,b) ((a>b) ? a : b)
- #endif
-
- #define SKIP_MASK(x,y) (mask_rb && !*(mask_rb->data.rgba.a+(y)*mask_rb->data.rgba.row_step+(x)*mask_rb->data.rgba.pixel_step))
-@@ -319,7 +319,7 @@ msBilinearRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- int nSrcYSize = psSrcImage->height;
- int nFailedPoints = 0, nSetPoints = 0;
- double *padfPixelSum;
-- int bandCount = MAX(4,psSrcImage->format->bands);
-+ int bandCount = MS_MAX(4,psSrcImage->format->bands);
-
- padfPixelSum = (double *) msSmallMalloc(sizeof(double) * bandCount);
-
-@@ -369,10 +369,10 @@ msBilinearRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- continue;
-
- /* Trim in stuff one pixel off the edge */
-- nSrcX = MAX(nSrcX,0);
-- nSrcY = MAX(nSrcY,0);
-- nSrcX2 = MIN(nSrcX2,nSrcXSize-1);
-- nSrcY2 = MIN(nSrcY2,nSrcYSize-1);
-+ nSrcX = MS_MAX(nSrcX,0);
-+ nSrcY = MS_MAX(nSrcY,0);
-+ nSrcX2 = MS_MIN(nSrcX2,nSrcXSize-1);
-+ nSrcY2 = MS_MIN(nSrcY2,nSrcYSize-1);
-
- memset( padfPixelSum, 0, sizeof(double) * bandCount);
-
-@@ -407,10 +407,10 @@ msBilinearRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- int dst_rb_off = nDstX * dst_rb->data.rgba.pixel_step + nDstY * dst_rb->data.rgba.row_step;
- unsigned char red, green, blue, alpha;
-
-- red = (unsigned char) MAX(0,MIN(255,padfPixelSum[0]));
-- green = (unsigned char) MAX(0,MIN(255,padfPixelSum[1]));
-- blue = (unsigned char) MAX(0,MIN(255,padfPixelSum[2]));
-- alpha = (unsigned char)MAX(0,MIN(255,255.5*dfWeightSum));
-+ red = (unsigned char) MS_MAX(0,MS_MIN(255,padfPixelSum[0]));
-+ green = (unsigned char) MS_MAX(0,MS_MIN(255,padfPixelSum[1]));
-+ blue = (unsigned char) MS_MAX(0,MS_MIN(255,padfPixelSum[2]));
-+ alpha = (unsigned char)MS_MAX(0,MS_MIN(255,255.5*dfWeightSum));
-
- msAlphaBlendPM( red, green, blue, alpha,
- dst_rb->data.rgba.r + dst_rb_off,
-@@ -436,7 +436,7 @@ msBilinearRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- = (float) padfPixelSum[band];
- } else if( psSrcImage->format->imagemode == MS_IMAGEMODE_BYTE ) {
- psDstImage->img.raw_byte[dst_off]
-- = (unsigned char)MAX(0,MIN(255,padfPixelSum[band]));
-+ = (unsigned char)MS_MAX(0,MS_MIN(255,padfPixelSum[band]));
- }
-
- dst_off += psDstImage->width*psDstImage->height;
-@@ -489,14 +489,14 @@ msAverageSample( imageObj *psSrcImage, rasterBufferObj *src_rb,
- for( iY = nYMin; iY < nYMax; iY++ ) {
- double dfYCellMin, dfYCellMax;
-
-- dfYCellMin = MAX(iY,dfYMin);
-- dfYCellMax = MIN(iY+1,dfYMax);
-+ dfYCellMin = MS_MAX(iY,dfYMin);
-+ dfYCellMax = MS_MIN(iY+1,dfYMax);
-
- for( iX = nXMin; iX < nXMax; iX++ ) {
- double dfXCellMin, dfXCellMax, dfWeight;
-
-- dfXCellMin = MAX(iX,dfXMin);
-- dfXCellMax = MIN(iX+1,dfXMax);
-+ dfXCellMin = MS_MAX(iX,dfXMin);
-+ dfXCellMax = MS_MIN(iX+1,dfXMax);
-
- dfWeight = (dfXCellMax-dfXCellMin) * (dfYCellMax-dfYCellMin);
-
-@@ -537,7 +537,7 @@ msAverageRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- int nFailedPoints = 0, nSetPoints = 0;
- double *padfPixelSum;
-
-- int bandCount = MAX(4,psSrcImage->format->bands);
-+ int bandCount = MS_MAX(4,psSrcImage->format->bands);
-
- padfPixelSum = (double *) msSmallMalloc(sizeof(double) * bandCount);
-
-@@ -573,19 +573,19 @@ msAverageRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- continue;
- }
-
-- dfXMin = MIN(MIN(x1[nDstX],x1[nDstX+1]),
-- MIN(x2[nDstX],x2[nDstX+1]));
-- dfYMin = MIN(MIN(y1[nDstX],y1[nDstX+1]),
-- MIN(y2[nDstX],y2[nDstX+1]));
-- dfXMax = MAX(MAX(x1[nDstX],x1[nDstX+1]),
-- MAX(x2[nDstX],x2[nDstX+1]));
-- dfYMax = MAX(MAX(y1[nDstX],y1[nDstX+1]),
-- MAX(y2[nDstX],y2[nDstX+1]));
-+ dfXMin = MS_MIN(MS_MIN(x1[nDstX],x1[nDstX+1]),
-+ MS_MIN(x2[nDstX],x2[nDstX+1]));
-+ dfYMin = MS_MIN(MS_MIN(y1[nDstX],y1[nDstX+1]),
-+ MS_MIN(y2[nDstX],y2[nDstX+1]));
-+ dfXMax = MS_MAX(MS_MAX(x1[nDstX],x1[nDstX+1]),
-+ MS_MAX(x2[nDstX],x2[nDstX+1]));
-+ dfYMax = MS_MAX(MS_MAX(y1[nDstX],y1[nDstX+1]),
-+ MS_MAX(y2[nDstX],y2[nDstX+1]));
-
-- dfXMin = MIN(MAX(dfXMin,0),psSrcImage->width+1);
-- dfYMin = MIN(MAX(dfYMin,0),psSrcImage->height+1);
-- dfXMax = MIN(MAX(-1,dfXMax),psSrcImage->width);
-- dfYMax = MIN(MAX(-1,dfYMax),psSrcImage->height);
-+ dfXMin = MS_MIN(MS_MAX(dfXMin,0),psSrcImage->width+1);
-+ dfYMin = MS_MIN(MS_MAX(dfYMin,0),psSrcImage->height+1);
-+ dfXMax = MS_MIN(MS_MAX(-1,dfXMax),psSrcImage->width);
-+ dfYMax = MS_MIN(MS_MAX(-1,dfYMax),psSrcImage->height);
-
- memset( padfPixelSum, 0, sizeof(double)*bandCount );
-
-@@ -605,13 +605,13 @@ msAverageRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
- unsigned char red, green, blue, alpha;
-
- red = (unsigned char)
-- MAX(0,MIN(255,padfPixelSum[0]+0.5));
-+ MS_MAX(0,MS_MIN(255,padfPixelSum[0]+0.5));
- green = (unsigned char)
-- MAX(0,MIN(255,padfPixelSum[1]+0.5));
-+ MS_MAX(0,MS_MIN(255,padfPixelSum[1]+0.5));
- blue = (unsigned char)
-- MAX(0,MIN(255,padfPixelSum[2]+0.5));
-+ MS_MAX(0,MS_MIN(255,padfPixelSum[2]+0.5));
- alpha = (unsigned char)
-- MAX(0,MIN(255,255*dfAlpha01+0.5));
-+ MS_MAX(0,MS_MIN(255,255*dfAlpha01+0.5));
-
- RB_MIX_PIXEL(dst_rb,nDstX,nDstY,
- red, green, blue, alpha );
-@@ -1121,10 +1121,10 @@ static int msTransformMapToSource( int nDstXSize, int nDstYSize,
- psSrcExtent->miny = psSrcExtent->maxy = y_out;
- bOutInit = 1;
- } else {
-- psSrcExtent->minx = MIN(psSrcExtent->minx, x_out);
-- psSrcExtent->maxx = MAX(psSrcExtent->maxx, x_out);
-- psSrcExtent->miny = MIN(psSrcExtent->miny, y_out);
-- psSrcExtent->maxy = MAX(psSrcExtent->maxy, y_out);
-+ psSrcExtent->minx = MS_MIN(psSrcExtent->minx, x_out);
-+ psSrcExtent->maxx = MS_MAX(psSrcExtent->maxx, x_out);
-+ psSrcExtent->miny = MS_MIN(psSrcExtent->miny, y_out);
-+ psSrcExtent->maxy = MS_MAX(psSrcExtent->maxy, y_out);
- }
- }
-
-@@ -1141,10 +1141,10 @@ static int msTransformMapToSource( int nDstXSize, int nDstYSize,
- int nGrowAmountY = (int)
- (psSrcExtent->maxy - psSrcExtent->miny)/EDGE_STEPS + 1;
-
-- psSrcExtent->minx = MAX(psSrcExtent->minx - nGrowAmountX,0);
-- psSrcExtent->miny = MAX(psSrcExtent->miny - nGrowAmountY,0);
-- psSrcExtent->maxx = MIN(psSrcExtent->maxx + nGrowAmountX,nSrcXSize);
-- psSrcExtent->maxy = MIN(psSrcExtent->maxy + nGrowAmountY,nSrcYSize);
-+ psSrcExtent->minx = MS_MAX(psSrcExtent->minx - nGrowAmountX,0);
-+ psSrcExtent->miny = MS_MAX(psSrcExtent->miny - nGrowAmountY,0);
-+ psSrcExtent->maxx = MS_MIN(psSrcExtent->maxx + nGrowAmountX,nSrcXSize);
-+ psSrcExtent->maxy = MS_MIN(psSrcExtent->maxy + nGrowAmountY,nSrcYSize);
- }
-
- return MS_TRUE;
-@@ -1342,10 +1342,10 @@ int msResampleGDALToMap( mapObj *map, layerObj *layer, imageObj *image,
- sSrcExtent.maxy = ceil (sSrcExtent.maxy+1.0);
- }
-
-- sSrcExtent.minx = MAX(0,sSrcExtent.minx);
-- sSrcExtent.maxx = MIN(sSrcExtent.maxx, nSrcXSize );
-- sSrcExtent.miny = MAX(sSrcExtent.miny, 0 );
-- sSrcExtent.maxy = MIN(sSrcExtent.maxy, nSrcYSize );
-+ sSrcExtent.minx = MS_MAX(0,sSrcExtent.minx);
-+ sSrcExtent.maxx = MS_MIN(sSrcExtent.maxx, nSrcXSize );
-+ sSrcExtent.miny = MS_MAX(sSrcExtent.miny, 0 );
-+ sSrcExtent.maxy = MS_MIN(sSrcExtent.maxy, nSrcYSize );
-
- if( sSrcExtent.maxx <= sSrcExtent.minx
- || sSrcExtent.maxy <= sSrcExtent.miny ) {
-@@ -1383,9 +1383,9 @@ int msResampleGDALToMap( mapObj *map, layerObj *layer, imageObj *image,
- else
- sDummyMap.cellsize = dfNominalCellSize;
-
-- nLoadImgXSize = MAX(1, (int) (sSrcExtent.maxx - sSrcExtent.minx)
-+ nLoadImgXSize = MS_MAX(1, (int) (sSrcExtent.maxx - sSrcExtent.minx)
- * (dfNominalCellSize / sDummyMap.cellsize));
-- nLoadImgYSize = MAX(1, (int) (sSrcExtent.maxy - sSrcExtent.miny)
-+ nLoadImgYSize = MS_MAX(1, (int) (sSrcExtent.maxy - sSrcExtent.miny)
- * (dfNominalCellSize / sDummyMap.cellsize));
-
- /*
-diff --git a/mapstring.c b/mapstring.c
-index ea5b67f..82ee82a 100644
---- a/mapstring.c
-+++ b/mapstring.c
-@@ -135,7 +135,7 @@ char *strrstr(char *string, char *find)
- * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left). At most siz-1 characters
- * will be copied. Always NUL terminates (unless siz <= strlen(dst)).
-- * Returns strlen(src) + MIN(siz, strlen(initial dst)).
-+ * Returns strlen(src) + MS_MIN(siz, strlen(initial dst)).
- * If retval >= siz, truncation occurred.
- */
- size_t strlcat(char *dst, const char *src, size_t siz)
-diff --git a/mapwcs20.c b/mapwcs20.c
-index 347e9b7..266a07d 100644
---- a/mapwcs20.c
-+++ b/mapwcs20.c
-@@ -4189,8 +4189,8 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
- + (orig_bbox.maxx+1) * cm.geotransform[1]
- + (orig_bbox.maxy+1) * cm.geotransform[2];
-
-- subsets.minx = MIN(x_1, x_2);
-- subsets.maxx = MAX(x_1, x_2);
-+ subsets.minx = MS_MIN(x_1, x_2);
-+ subsets.maxx = MS_MAX(x_1, x_2);
- }
- if(subsets.miny != -DBL_MAX || subsets.maxy != DBL_MAX) {
- y_1 = cm.geotransform[3]
-@@ -4201,8 +4201,8 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
- + orig_bbox.minx * cm.geotransform[4]
- + orig_bbox.miny * cm.geotransform[5];
-
-- subsets.miny = MIN(y_1, y_2);
-- subsets.maxy = MAX(y_1, y_2);
-+ subsets.miny = MS_MIN(y_1, y_2);
-+ subsets.maxy = MS_MAX(y_1, y_2);
- }
- } else { /* if crs is not the 'imageCRS' */
- projectionObj subsetProj;
-@@ -4241,10 +4241,10 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
- }
-
- /* write combined bounding box */
-- bbox.minx = MAX(subsets.minx, map->extent.minx);
-- bbox.miny = MAX(subsets.miny, map->extent.miny);
-- bbox.maxx = MIN(subsets.maxx, map->extent.maxx);
-- bbox.maxy = MIN(subsets.maxy, map->extent.maxy);
-+ bbox.minx = MS_MAX(subsets.minx, map->extent.minx);
-+ bbox.miny = MS_MAX(subsets.miny, map->extent.miny);
-+ bbox.maxx = MS_MIN(subsets.maxx, map->extent.maxx);
-+ bbox.maxy = MS_MIN(subsets.maxy, map->extent.maxy);
-
- /* check if we are overspecified */
- if ((params->width != 0 && params->resolutionX != MS_WCS20_UNBOUNDED)
-@@ -4620,10 +4620,10 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
- tmpCm.xresolution = map->gt.geotransform[1];
- tmpCm.yresolution = map->gt.geotransform[5];
-
-- tmpCm.extent.minx = MIN(map->gt.geotransform[0], map->gt.geotransform[0] + map->width * tmpCm.xresolution);
-- tmpCm.extent.miny = MIN(map->gt.geotransform[3], map->gt.geotransform[3] + map->height * tmpCm.yresolution);
-- tmpCm.extent.maxx = MAX(map->gt.geotransform[0], map->gt.geotransform[0] + map->width * tmpCm.xresolution);
-- tmpCm.extent.maxy = MAX(map->gt.geotransform[3], map->gt.geotransform[3] + map->height * tmpCm.yresolution);
-+ tmpCm.extent.minx = MS_MIN(map->gt.geotransform[0], map->gt.geotransform[0] + map->width * tmpCm.xresolution);
-+ tmpCm.extent.miny = MS_MIN(map->gt.geotransform[3], map->gt.geotransform[3] + map->height * tmpCm.yresolution);
-+ tmpCm.extent.maxx = MS_MAX(map->gt.geotransform[0], map->gt.geotransform[0] + map->width * tmpCm.xresolution);
-+ tmpCm.extent.maxy = MS_MAX(map->gt.geotransform[3], map->gt.geotransform[3] + map->height * tmpCm.yresolution);
-
- swapAxes = msWCSSwapAxes20(srs_uri);
- msFree(srs_uri);
-diff --git a/mapwmslayer.c b/mapwmslayer.c
-index 42a44f1..3e4747d 100644
---- a/mapwmslayer.c
-+++ b/mapwmslayer.c
-@@ -698,7 +698,7 @@ msBuildWMSLayerURL(mapObj *map, layerObj *lp, int nRequestType,
- else {
- double cellsize_x = (bbox.maxx-bbox.minx) / bbox_width;
- double cellsize_y = (bbox.maxy-bbox.miny) / bbox_height;
-- double cellsize = MIN(cellsize_x,cellsize_y);
-+ double cellsize = MS_MIN(cellsize_x,cellsize_y);
-
- msRectIntersect( &bbox, &layer_rect );
-
diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.0-disabled-ogr.patch b/sci-geosciences/mapserver/files/mapserver-7.0.0-disabled-ogr.patch
deleted file mode 100644
index 088e37b14c86..000000000000
--- a/sci-geosciences/mapserver/files/mapserver-7.0.0-disabled-ogr.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From ab2a6129435ca37d02730a6faf85593afa0daf9b Mon Sep 17 00:00:00 2001
-From: Thomas Bonfort <thomas.bonfort@gmail.com>
-Date: Mon, 16 Nov 2015 16:56:02 +0100
-Subject: [PATCH] Fix build issues with OGR disabled
-
----
- mapimageio.c | 2 +-
- mapogcfilter.c | 1 +
- mapogr.cpp | 2 ++
- 3 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/mapimageio.c b/mapimageio.c
-index 771188b..95feda2 100644
---- a/mapimageio.c
-+++ b/mapimageio.c
-@@ -210,7 +210,7 @@ int saveAsJPEG(mapObj *map, rasterBufferObj *rb, streamInfo *info,
- /* If the user doesn't provide a value for JPEGMEM, we want to be sure */
- /* that at least the image size will be used before creating the temporary file */
- cinfo.mem->max_memory_to_use =
-- MAX(cinfo.mem->max_memory_to_use, cinfo.input_components * rb->width * rb->height);
-+ MS_MAX(cinfo.mem->max_memory_to_use, cinfo.input_components * rb->width * rb->height);
- }
- }
-
-diff --git a/mapogcfilter.c b/mapogcfilter.c
-index 50e2e7b..05f017a 100644
---- a/mapogcfilter.c
-+++ b/mapogcfilter.c
-@@ -40,6 +40,7 @@
- #include "mapowscommon.h"
- #include "maptime.h"
- #include "mapows.h"
-+#include <ctype.h>
-
- static int FLTHasUniqueTopLevelDuringFilter(FilterEncodingNode *psFilterNode);
-
-diff --git a/mapogr.cpp b/mapogr.cpp
-index 07acdba..80f032b 100644
---- a/mapogr.cpp
-+++ b/mapogr.cpp
-@@ -1318,6 +1318,7 @@ static int msOGRFileClose(layerObj *layer, msOGRFileInfo *psInfo )
-
- return MS_SUCCESS;
- }
-+#endif /* USE_OGR */
-
- /************************************************************************/
- /* msOGREscapeSQLParam */
-@@ -1345,6 +1346,7 @@ static char *msOGREscapeSQLParam(layerObj *layer, const char *pszString)
- #endif /* USE_OGR */
- }
-
-+#ifdef USE_OGR
- /**********************************************************************
- * msOGRTranslateMsExpressionToOGRSQL()
- *
diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch b/sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch
deleted file mode 100644
index 1fa7710de0bc..000000000000
--- a/sci-geosciences/mapserver/files/mapserver-7.0.0-giflib51.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0101157d4edd5d837d17356c66c7d25af7e020ac Mon Sep 17 00:00:00 2001
-From: Sander Jansen <s.jansen@gmail.com>
-Date: Wed, 19 Aug 2015 16:51:13 -0500
-Subject: [PATCH] Fix compilation with gif_lib 5.1
-
----
- mapimageio.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/mapimageio.c b/mapimageio.c
-index e6bdcb5..5eed924 100644
---- a/mapimageio.c
-+++ b/mapimageio.c
-@@ -1058,6 +1058,13 @@ int readGIF(char *path, rasterBufferObj *rb)
-
- } while (recordType != TERMINATE_RECORD_TYPE);
-
-+
-+#if defined GIFLIB_MAJOR && GIFLIB_MINOR && ((GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || (GIFLIB_MAJOR > 5))
-+ if (DGifCloseFile(image, &errcode) == GIF_ERROR) {
-+ msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(errcode));
-+ return MS_FAILURE;
-+ }
-+#else
- if (DGifCloseFile(image) == GIF_ERROR) {
- #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
- msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(image->Error));
-@@ -1066,6 +1073,7 @@ int readGIF(char *path, rasterBufferObj *rb)
- #endif
- return MS_FAILURE;
- }
-+#endif
-
- return MS_SUCCESS;
- }
diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.0-mapwcs-disabled-libxml2.patch b/sci-geosciences/mapserver/files/mapserver-7.0.0-mapwcs-disabled-libxml2.patch
deleted file mode 100644
index 5625746e2dcb..000000000000
--- a/sci-geosciences/mapserver/files/mapserver-7.0.0-mapwcs-disabled-libxml2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/mapwcs20.c b/mapwcs20.c
-index ac2fb89..9560a25 100755
---- a/mapwcs20.c
-+++ b/mapwcs20.c
-@@ -700,6 +700,7 @@ static int msWCSParseScaleExtentString20(char *string, char *outAxis,
- return MS_SUCCESS;
- }
-
-+#if defined(USE_LIBXML2)
- /*
- Utility function to get the first child of a node with a given node name
- */
-@@ -739,6 +740,7 @@ xmlNodePtr msLibXml2GetFirstChildNs(xmlNodePtr parent, const char *name, xmlNsPt
- }
- return NULL;
- }
-+#endif /* defined(USE_LIBXML2) */
-
- /************************************************************************/
- /* msWCSParseRequest20_XMLGetCapabilities() */