Commit 963a098e authored by Bas Couwenberg's avatar Bas Couwenberg

New upstream version 7.2.1

parent 7ae62cbf
......@@ -17,8 +17,8 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 7)
set (MapServer_VERSION_MINOR 2)
set (MapServer_VERSION_REVISION 0)
set (MapServer_VERSION_SUFFIX "-beta2")
set (MapServer_VERSION_REVISION 1)
set (MapServer_VERSION_SUFFIX "")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
set(TARGET_VERSION_MINOR ${MapServer_VERSION_MINOR})
......
# How to contribute to MapServer
Contributions to the MapServer project are most welcome, and can take many forms such as detailed bug reports, documentation,
tests, features, and patches.
tests, features, and patches. Note that all contributions are managed by the MapServer [Project Steering Committee](https://mapserver.org/psc.html).
## Bugs and Help
......@@ -18,15 +18,15 @@ For professional support please see the [MapServer Service Providers page](http:
## Development
A seperate [mapserver-dev mailing list](http://lists.osgeo.org/mailman/listinfo/mapserver-dev) is available for developers
A separate [mapserver-dev mailing list](http://lists.osgeo.org/mailman/listinfo/mapserver-dev) is available for developers
working on the MapServer code.
Details on using GitHub can be found on the [MapServer GutHub page](http://mapserver.org/development/git.html)
Details on using GitHub can be found on the [MapServer GitHub page](http://mapserver.org/development/git.html)
Additional developer notes can be found in the [MapServer wiki](https://github.com/mapserver/mapserver/wiki#developer-notes), including
coding style and guidelines, memory management, and working with Git.
## Documentation
The MapServer documentation is stored in a [seperate repository](https://github.com/mapserver/docs). Please submit any documentation
The MapServer documentation is stored in a [separate repository](https://github.com/mapserver/docs). Please submit any documentation
issues or changes there. See the [Documentation Development Guide](http://mapserver.org/development/documentation.html) for further details.
......@@ -12,6 +12,17 @@ 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.2.1 release (2018-10-1)
--------------------------
- No major changes, see detailed changelog for bug fixes
7.2.0 release (2018-07-23)
--------------------------
- Fixed issue with ring handling with polygons in MVT support (#5626)
- No other major changes, see detailed changelog for bug fixes
7.2.0-beta2 release (2018-6-13)
- Update beta1 release notes to remove reference to PHP7 support
......
MapServer
=========
| |Build Status| |Appveyor Build Status|
-------
Summary
-------
MapServer is a system for developing web-based GIS applications.
The basic system consists of a CGI program that can be configured to
......@@ -15,7 +19,7 @@ visit:
http://www.mapserver.org/
Bug reports and enhancment submissions can be reported in the MapServer
Bug reports and enhancement submissions can be reported in the MapServer
issue tracker at the following url. If you do make changes and/or enhancements,
please let us know so that they might be incorporated into future releases.
......@@ -28,9 +32,8 @@ Join the MapServer user mailing list online at:
-----------
Credits
-----------
-------
MapServer was originally written by Stephen Lime. Major funding for development of
MapServer has been provided by NASA through cooperative argreements with
......@@ -61,9 +64,8 @@ Portions derived from Shapelib, Copyright 1995-1999 Frank Warmerdam.
Supporting packages are covered by their own copyrights.
-----------
License
-----------
-------
::
......@@ -89,3 +91,8 @@ License
SOFTWARE.
.. |Build Status| image:: https://travis-ci.org/mapserver/mapserver.svg?branch=master
:target: https://travis-ci.org/mapserver/mapserver
.. |Appveyor Build Status| image:: https://ci.appveyor.com/api/projects/status/vw1n07095a8bg23u?svg=true
:target: https://ci.appveyor.com/project/mapserver/mapserver
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -161,7 +161,7 @@ char path[MS_MAXPATHLEN];
<INITIAL,URL_STRING,EXPRESSION_STRING,INCLUDE>[ \t\r]+ ;
<INITIAL>(\/\/|#).* { if (msyyreturncomments) return(MS_COMMENT); }
<INITIAL>(\/\/|#).* { if (msyyreturncomments) return(MS_COMMENT); }
<INITIAL>\/\* { BEGIN(MULTILINE_COMMENT); }
<MULTILINE_COMMENT>\*\/ { BEGIN(INITIAL); }
......@@ -589,7 +589,7 @@ char path[MS_MAXPATHLEN];
return(MS_TOKEN_LITERAL_TIME);
}
<INITIAL,URL_STRING>\/[^\/*]*\/i {
<INITIAL,URL_STRING>\/[^*]{1}[^\/]*\/i {
msyytext++;
msyytext[strlen(msyytext)-2] = '\0';
MS_LEXER_STRING_REALLOC(msyystring_buffer, strlen(msyytext),
......@@ -598,7 +598,7 @@ char path[MS_MAXPATHLEN];
return(MS_IREGEX);
}
<INITIAL,URL_STRING>\/[^\/*]*\/ {
<INITIAL,URL_STRING>\/[^*]{1}[^\/]*\/ {
msyytext++;
msyytext[strlen(msyytext)-1] = '\0';
MS_LEXER_STRING_REALLOC(msyystring_buffer, strlen(msyytext),
......
......@@ -158,7 +158,7 @@ static int mvtClipShape(shapeObj *shape, int layer_type, int buffer, int mvt_lay
}
/* success if at least one line and not a degenerate bounding box */
if(shape->numlines > 0 && (shape->bounds.minx != shape->bounds.maxx || shape->bounds.miny != shape->bounds.maxy))
if(shape->numlines > 0 && (layer_type == MS_LAYER_POINT || (shape->bounds.minx != shape->bounds.maxx || shape->bounds.miny != shape->bounds.maxy)))
return MS_SUCCESS;
else
return MS_FAILURE;
......
......@@ -52,6 +52,10 @@ char *FLTGetIsLikeComparisonCommonExpression(FilterEncodingNode *psFilterNode)
int nLength=0, i=0, iTmp=0;
/* From http://www.fon.hum.uva.nl/praat/manual/Regular_expressions_1__Special_characters.html */
/* also add double quote because we are within a string */
const char* pszRegexSpecialCharsAndDoubleQuote = "\\^${}[]().*+?|<>-&\"";
if (!psFilterNode || !psFilterNode->pOther || !psFilterNode->psLeftNode || !psFilterNode->psRightNode || !psFilterNode->psRightNode->pszValue)
return NULL;
......@@ -97,23 +101,45 @@ char *FLTGetIsLikeComparisonCommonExpression(FilterEncodingNode *psFilterNode)
iTmp++;
}
for (i=0; i<nLength; i++) {
if (pszValue[i] != pszWild[0] && pszValue[i] != pszSingle[0] && pszValue[i] != pszEscape[0]) {
szTmp[iTmp] = pszValue[i];
iTmp++;
szTmp[iTmp] = '\0';
} else if (pszValue[i] == pszSingle[0]) {
if (pszValue[i] == pszSingle[0]) {
szTmp[iTmp] = '.';
iTmp++;
szTmp[iTmp] = '\0';
} else if (pszValue[i] == pszEscape[0]) {
/* The Filter escape character is supposed to only escape the single, wildcard and escape character */
/* As we replace single and wild by regular expression special characters, we indeed */
/* need to escape them */
} else if (pszValue[i] == pszEscape[0] && (pszValue[i+1] == pszSingle[0] || pszValue[i+1] == pszWild[0])) {
szTmp[iTmp] = '\\';
iTmp++;
szTmp[iTmp] = '\0';
/* If the Filter escape character is escaped, only regular-expression-escape-it */
/* if it is indeed a regular expression special character. Otherwise ignore it */
} else if (pszValue[i] == pszEscape[0] && pszValue[i+1] == pszEscape[0]) {
if( strchr(pszRegexSpecialCharsAndDoubleQuote, pszValue[i]) )
{
szTmp[iTmp] = '\\';
iTmp++;
szTmp[iTmp] = '\0';
}
} else if (pszValue[i] == pszWild[0]) {
szTmp[iTmp++] = '.';
szTmp[iTmp++] = '*';
szTmp[iTmp] = '\0';
}
/* Escape regular expressions special characters and double quote */
else if (strchr(pszRegexSpecialCharsAndDoubleQuote, pszValue[i]))
{
szTmp[iTmp] = '\\';
iTmp++;
szTmp[iTmp] = pszValue[i];
iTmp++;
szTmp[iTmp] = '\0';
}
else {
szTmp[iTmp] = pszValue[i];
iTmp++;
szTmp[iTmp] = '\0';
}
}
szTmp[iTmp] = '"';
szTmp[++iTmp] = '\0';
......
......@@ -4013,7 +4013,7 @@ char *msSLDGenerateTextSLD(classObj *psClass, layerObj *psLayer, int nVersion)
snprintf(szTmp, sizeof(szTmp), "<%sFill>\n", sNameSpace );
pszSLD = msStringConcatenate(pszSLD, szTmp);
sprintf(szHexColor,"%02x%02x%02x",nColorRed,
sprintf(szHexColor,"%02hhx%02hhx%02hhx",nColorRed,
nColorGreen, nColorBlue);
snprintf(szTmp, sizeof(szTmp),
......
......@@ -1119,7 +1119,7 @@ msPostGISRetrieveVersion(PGconn *pgconn)
ptr = strVersion;
strParts[j++] = strVersion;
while( ptr != '\0' && j < 3 ) {
while( *ptr != '\0' && j < 3 ) {
if ( *ptr == '.' ) {
*ptr = '\0';
strParts[j++] = ptr + 1;
......
......@@ -39,6 +39,13 @@ set_target_properties(${SWIG_MODULE_pythonmapscript_REAL_NAME} PROPERTIES OUTPUT
execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
# FIXME: this is to avoid the following error
# CMake Error at mapscript/python/CMakeLists.txt:42 (get_target_property):
# The LOCATION property may not be read from target "_pythonmapscript". Use
# the target name directly with add_custom_command, or use the generator
# expression $<TARGET_FILE>, as appropriate.
cmake_policy(SET CMP0026 OLD)
get_target_property(LOC_MAPSCRIPT_LIB ${SWIG_MODULE_pythonmapscript_REAL_NAME} LOCATION)
set(mapscript_files ${LOC_MAPSCRIPT_LIB} ${CMAKE_CURRENT_BINARY_DIR}/mapscript.py)
install(FILES ${mapscript_files} DESTINATION ${PYTHON_SITE_PACKAGES})
......
......@@ -93,45 +93,43 @@ CreateTupleFromDoubleArray( double *first, unsigned int size ) {
$result = t_output_helper($result,r);
}
/*
* Typemap hashTableObj* -> dict
*/
%typemap(out) hashTableObj*
{
/* %typemap(out) hashTableObj* */
const char* key;
hashTableObj *hashTable = $1;
$result = PyDict_New();
key = msFirstKeyFromHashTable(hashTable);
while( key )
{
const char* val = msLookupHashTable(hashTable, key);
if( val )
{
%#if PY_VERSION_HEX >= 0x03000000
PyObject *py_key = PyUnicode_FromString(key);
PyObject *py_val = PyUnicode_FromString(val);
%#else
PyObject *py_key = PyString_FromString(key);
PyObject *py_val = PyString_FromString(val);
%#endif
PyDict_SetItem($result, py_key, py_val );
Py_DECREF(py_key);
Py_DECREF(py_val);
}
key = msNextKeyFromHashTable(hashTable, key);
}
}
* Add dict methods to the hashTableObj object
*/
%extend hashTableObj{
%pythoncode %{
%typemap(freearg) hashTableObj*
{
/* %typemap(freearg) hashTableObj* */
msFreeHashTable( $1 );
}
def __getitem__(self, key):
return self.get(key)
def __setitem__(self, key, value):
return self.set(key, value)
def __delitem__(self, key) :
return self.remove(key)
def __contains__(self, key):
return key.lower() in [k.lower() for k in self.keys()]
def __len__(self):
return self.numitems
def keys(self):
keys = []
k = None
while True :
k = self.nextKey(k)
if k :
keys.append(k)
else :
break
return keys
%}
};
/**************************************************************************
* MapServer Errors and Python Exceptions
......
......@@ -85,17 +85,28 @@ class HashTableBaseTestCase:
key = self.table.nextKey(key)
assert key == None, key
# TODO
# def testKeys(self):
# "get sequence of keys"
# keys = self.table.keys()
# assert keys == self.keys, keys
#
# def testValues(self):
# "get sequence of values"
# values = self.table.values()
# assert values == self.values, values
# tests using the Python dictionary access methods
def testDictKeys(self):
assert sorted(self.keys) == sorted(self.table.keys())
def testDictItems(self):
assert len(self.keys) == len(self.table)
def testCheckDictContains(self):
for key in self.keys:
assert key in self.table.keys()
def testGetDictValue(self):
for key, value in zip(self.keys, self.values):
assert self.table[key] == value
assert self.table[key.upper()] == value
assert self.table[key.capitalize()] == value
def testRemoveDictItem(self):
key = self.keys[0]
del self.table[key]
assert self.table[key] == None
# ===========================================================================
# Test begins now
......
......@@ -1721,7 +1721,7 @@ static int msWCSGetCoverage(mapObj *map, cgiRequestObj *request,
outputFormatObj *format;
char *bandlist=NULL;
size_t bufferSize = 0;
char numbands[8]; /* should be large enough to hold the number of bands in the bandlist */
char numbands[12]; /* should be large enough to hold the number of bands in the bandlist */
coverageMetadataObj cm;
rectObj reqextent;
rectObj covextent;
......
......@@ -2806,7 +2806,6 @@ static int msWCSGetCoverageMetadata20(layerObj *layer, wcs20coverageMetadataObj
/* set default values for interval and significant figures */
switch(cm->imagemode) {
case MS_IMAGEMODE_BYTE:
case MS_IMAGEMODE_PC256:
default_values.interval_min = 0.;
default_values.interval_max = 255.;
default_values.significant_figures = 3;
......@@ -2821,6 +2820,11 @@ static int msWCSGetCoverageMetadata20(layerObj *layer, wcs20coverageMetadataObj
default_values.interval_max = FLT_MAX;
default_values.significant_figures = 12;
break;
default:
// other imagemodes are invalid (see above), just keep the compiler happy
msFreeCharArray(band_names, num_band_names);
return MS_FAILURE;
break;
}
/* lookup default interval values */
......@@ -3955,7 +3959,7 @@ static int msWCSGetCoverage20_GetBands(mapObj *map, layerObj *layer,
if(NULL == params->range_subset) {
*bandlist = msStrdup("1");
for(i = 1; i < cm->numbands; ++i) {
char strnumber[10];
char strnumber[12];
snprintf(strnumber, sizeof(strnumber), ",%d", i + 1);
*bandlist = msStringConcatenate(*bandlist, strnumber);
}
......@@ -4310,7 +4314,7 @@ int msWCSGetCoverage20(mapObj *map, cgiRequestObj *request,
int status, i;
double x_1, x_2, y_1, y_2;
char *coverageName, *bandlist=NULL, numbands[8];
char *coverageName, *bandlist=NULL, numbands[12];
int doDrawRasterLayerDraw = MS_TRUE;
GDALDatasetH hDS = NULL;
......
......@@ -2444,7 +2444,7 @@ int msDumpLayer(mapObj *map, layerObj *lp, int nVersion,
msWMSPrintIdentifier(stdout, " ", &(lp->metadata), "MO");
}
if(nVersion >= OWS_1_1_0)
if(nVersion >= OWS_1_1_0) {
if (! msOWSLookupMetadata(&(lp->metadata), "MO", "metadataurl_href"))
msMetadataSetGetMetadataURL(lp, script_url_encoded);
......@@ -2456,6 +2456,7 @@ int msDumpLayer(mapObj *map, layerObj *lp, int nVersion,
"xlink:type=\"simple\" xlink:href=\"%s\"/>\n ",
MS_TRUE, MS_FALSE, MS_FALSE, MS_TRUE, MS_TRUE,
NULL, NULL, NULL, NULL, NULL, " ");
}
if(nVersion < OWS_1_1_0)
msOWSPrintEncodeMetadata(stdout, &(lp->metadata), "MO", "dataurl_href",
......
......@@ -447,10 +447,7 @@ int msDBFAddField(DBFHandle psDBF, const char * pszFieldName, DBFFieldType eType
for( i = 0; i < 32; i++ )
pszFInfo[i] = '\0';
if( strlen(pszFieldName) < 10 )
strncpy( pszFInfo, pszFieldName, strlen(pszFieldName));
else
strncpy( pszFInfo, pszFieldName, 10);
strncpy( pszFInfo, pszFieldName, 10);
pszFInfo[11] = psDBF->pachFieldType[psDBF->nFields-1];
......@@ -692,9 +689,9 @@ DBFFieldType msDBFGetFieldInfo( DBFHandle psDBF, int iField, char * pszFieldName
static int msDBFWriteAttribute(DBFHandle psDBF, int hEntity, int iField, void * pValue )
{
unsigned int nRecordOffset;
int i, j;
int i, len;
uchar *pabyRec;
char szSField[40], szFormat[12];
char szSField[40];
/* -------------------------------------------------------------------- */
/* Is this a valid record? */
......@@ -743,28 +740,14 @@ static int msDBFWriteAttribute(DBFHandle psDBF, int hEntity, int iField, void *
case 'D':
case 'N':
case 'F':
if( psDBF->panFieldDecimals[iField] == 0 ) {
snprintf( szFormat, sizeof(szFormat), "%%%dd", psDBF->panFieldSize[iField] );
snprintf(szSField, sizeof(szSField), szFormat, (int) *((double *) pValue) );
if( (int) strlen(szSField) > psDBF->panFieldSize[iField] )
szSField[psDBF->panFieldSize[iField]] = '\0';
strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), szSField, strlen(szSField) );
} else {
snprintf( szFormat, sizeof(szFormat), "%%%d.%df", psDBF->panFieldSize[iField], psDBF->panFieldDecimals[iField] );
snprintf(szSField, sizeof(szSField), szFormat, *((double *) pValue) );
if( (int) strlen(szSField) > psDBF->panFieldSize[iField] )
szSField[psDBF->panFieldSize[iField]] = '\0';
strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), szSField, strlen(szSField) );
}
snprintf(szSField, sizeof(szSField), "%*.*f", psDBF->panFieldSize[iField], psDBF->panFieldDecimals[iField], *(double*) pValue);
len = strlen((char *) szSField);
memcpy(pabyRec+psDBF->panFieldOffset[iField], szSField, MS_MIN(len, psDBF->panFieldSize[iField]));
break;
default:
if( (int) strlen((char *) pValue) > psDBF->panFieldSize[iField] )
j = psDBF->panFieldSize[iField];
else
j = strlen((char *) pValue);
strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]), (char *) pValue, j );
len = strlen((char *) pValue);
memcpy(pabyRec+psDBF->panFieldOffset[iField], pValue, MS_MIN(len, psDBF->panFieldSize[iField]));
break;
}
......
......@@ -4,41 +4,38 @@ MAINTAINER Michael Smith <Michael.smith.erdc@gmail.com>
#Setup user
ARG UID
ARG GID
ARG MRSID_DOWNLOAD_URL
RUN addgroup --gid $GID msgroup
RUN adduser --no-create-home --disabled-login msuser --gecos "" --uid $UID --gid $GID
ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
ENV LIBKML_DOWNLOAD=install-libkml-r864-64bit.tar.gz
ENV FILEGDBAPI_DOWNLOAD=FileGDB_API_1_2-64.tar.gz
ENV MRSID_DIR=MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44
ENV MRSID_DOWNLOAD=MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44.tar.gz
ENV MRSID_DIR=MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc482
ENV MRSID_DOWNLOAD=MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc482.tar.gz
# Setup build env
RUN mkdir /build
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 16126D3A3E5C1192 \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends software-properties-common \
&& add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends gcc-4.7 g++-4.7 build-essential ca-certificates curl wget git libaio1 make cmake python-dev \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends gcc-4.9 g++-4.9 build-essential ca-certificates curl wget git make cmake python-dev \
python-software-properties software-properties-common libc6-dev openssh-client libpng12-dev libjpeg-dev libgif-dev liblzma-dev libgeos-dev \
libproj-dev libxml2-dev libexpat-dev libxerces-c-dev libnetcdf-dev netcdf-bin libpoppler-dev libspatialite-dev swig \
libhdf5-serial-dev libpodofo-dev poppler-utils libfreexl-dev libwebp-dev libepsilon-dev libpcre3-dev gfortran libarpack2-dev \
libpq-dev libflann-dev libhdf5-serial-dev libhdf5-dev libjsoncpp-dev clang-3.8 libhdf4-alt-dev libsqlite3-dev \
libltdl-dev libcurl4-openssl-dev ninja cython python-pip libpng-dev \
libltdl-dev libcurl4-openssl-dev ninja python-pip libpng-dev python-dev libprotobuf-c-dev protobuf-c-compiler\
libboost-filesystem1.58-dev libboost-iostreams1.58-dev libboost-program-options1.58-dev libboost-system1.58-dev libboost-thread1.58-dev libogdi3.2-dev time \
&& apt-get remove --purge -y $BUILD_PACKAGES && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20
#RUN CXX=clang++ && CC=clang
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
#RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y openjdk-8-jre:i386
# Getting libKML
RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/${LIBKML_DOWNLOAD} -O /build/${LIBKML_DOWNLOAD} && \
tar -C /build -xzf /build/${LIBKML_DOWNLOAD} && \
cp -r /build/install-libkml/include/* /usr/local/include && \
cp -r /build/install-libkml/lib/* /usr/local/lib \
&& rm -Rf /build/install-libkml
RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/${MRSID_DOWNLOAD} -O /build/${MRSID_DOWNLOAD} && \
RUN curl -L ${$MRSID_DOWNLOAD_URL}/${MRSID_DOWNLOAD} -o /build/${MRSID_DOWNLOAD} && \
tar -C /build -xzf /build/${MRSID_DOWNLOAD} && \
cp -r /build/${MRSID_DIR}/Raster_DSDK/include/* /usr/local/include && \
cp -r /build/${MRSID_DIR}/Raster_DSDK/lib/* /usr/local/lib \
......@@ -50,6 +47,15 @@ RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-trav
cp -r /build/FileGDB_API/lib/* /usr/local/lib \
&& rm -Rf /build/FileGDB_API
RUN cd /build && curl -LO https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz && \
tar -zxf /build/v2.3.0.tar.gz && \
cd /build/openjpeg-2.3.0 && \
mkdir -v build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. && \
make -j && make install && \
rm -Rf /build/openjpeg*
RUN wget https://bootstrap.pypa.io/get-pip.py -O get-pip.py && python get-pip.py && pip install --upgrade pip wheel numpy
ARG GDAL_VERSION
RUN cd /build && \
git clone https://github.com/OSGeo/gdal.git && \
......@@ -66,16 +72,20 @@ RUN cd /build && \
--with-libjson-c=internal \
--with-poppler \
--with-spatialite \
--with-python \
--with-liblzma \
--with-openjpeg \
--with-ogdi \
--with-webp \
--with-pg \
--with-mrsid=/usr/local \
--with-fgdb=/usr/local \
--with-libkml \
--with-hdf5 && \
--with-filegdb \
--with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial \
--with-openjpeg && \
make && \
make install && \
cd swig/python && python setup.py build && python setup.py install && \
ldconfig && \
rm -Rf /build/gdal
......@@ -124,22 +134,6 @@ RUN cd /build && \
&& ldconfig \
&& rm -Rf /build/mapserver
# Install Mapcache itself
ARG MAPCACHE_VERSION
RUN cd /build \
&& mkdir -p /msconfig/mapcache \
&& git clone https://github.com/mapserver/mapcache/ \
&& cd /build/mapcache \
&& git checkout ${MAPCACHE_VERSION} \
&& mkdir /build/mapcache/build \
&& cd /build/mapcache/build \
&& cmake ../ \
-DWITH_FCGI=0 -DWITH_APACHE=1 -DWITH_PCRE=1 \
-DWITH_TIFF=1 -DWITH_BERKELEY_DB=1 -DWITH_MEMCACHE=1 \
-DCMAKE_PREFIX_PATH="/etc/apache2" && \
make && \
make install
#RUN mkdir /vdatum \
# && cd /vdatum \
# && wget http://download.osgeo.org/proj/vdatum/usa_geoid2012.zip && unzip -j -u usa_geoid2012.zip -d /usr/share/proj \
......
......@@ -4,41 +4,38 @@ MAINTAINER Michael Smith <Michael.smith.erdc@gmail.com>
#Setup user
ARG UID
ARG GID
ARG MRSID_DOWNLOAD_URL
RUN addgroup --gid $GID msgroup
RUN adduser --no-create-home --disabled-login msuser --gecos "" --uid $UID --gid $GID
ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
ENV LIBKML_DOWNLOAD=install-libkml-r864-64bit.tar.gz
ENV FILEGDBAPI_DOWNLOAD=FileGDB_API_1_2-64.tar.gz
ENV MRSID_DIR=MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44
ENV MRSID_DOWNLOAD=MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44.tar.gz
ENV MRSID_DIR=MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc482
ENV MRSID_DOWNLOAD=MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc482.tar.gz
# Setup build env
RUN mkdir /build
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 16126D3A3E5C1192 \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends software-properties-common \
&& add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends gcc-4.7 g++-4.7 build-essential ca-certificates curl wget git libaio1 make cmake python-dev \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends gcc-4.9 g++-4.9 build-essential ca-certificates curl wget git make cmake python-dev \
python-software-properties software-properties-common libc6-dev openssh-client libpng12-dev libjpeg-dev libgif-dev liblzma-dev libgeos-dev \
libproj-dev libxml2-dev libexpat-dev libxerces-c-dev libnetcdf-dev netcdf-bin libpoppler-dev libspatialite-dev swig \
libhdf5-serial-dev libpodofo-dev poppler-utils libfreexl-dev libwebp-dev libepsilon-dev libpcre3-dev gfortran libarpack2-dev \
libpq-dev libflann-dev libhdf5-serial-dev libhdf5-dev libjsoncpp-dev clang-3.8 libhdf4-alt-dev libsqlite3-dev \
libltdl-dev libcurl4-openssl-dev ninja cython python-pip libpng-dev \
libltdl-dev libcurl4-openssl-dev ninja python-pip libpng-dev python-dev libprotobuf-c-dev protobuf-c-compiler\
libboost-filesystem1.58-dev libboost-iostreams1.58-dev libboost-program-options1.58-dev libboost-system1.58-dev libboost-thread1.58-dev libogdi3.2-dev time \
&& apt-get remove --purge -y $BUILD_PACKAGES && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20
#RUN CXX=clang++ && CC=clang
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
#RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y openjdk-8-jre:i386
# Getting libKML
RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/${LIBKML_DOWNLOAD} -O /build/${LIBKML_DOWNLOAD} && \
tar -C /build -xzf /build/${LIBKML_DOWNLOAD} && \
cp -r /build/install-libkml/include/* /usr/local/include && \
cp -r /build/install-libkml/lib/* /usr/local/lib \
&& rm -Rf /build/install-libkml
RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/${MRSID_DOWNLOAD} -O /build/${MRSID_DOWNLOAD} && \
RUN curl -L ${$MRSID_DOWNLOAD_URL}/${MRSID_DOWNLOAD} -o /build/${MRSID_DOWNLOAD} && \
tar -C /build -xzf /build/${MRSID_DOWNLOAD} && \
cp -r /build/${MRSID_DIR}/Raster_DSDK/include/* /usr/local/include && \
cp -r /build/${MRSID_DIR}/Raster_DSDK/lib/* /usr/local/lib \
......@@ -50,6 +47,15 @@ RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-trav
cp -r /build/FileGDB_API/lib/* /usr/local/lib \
&& rm -Rf /build/FileGDB_API
RUN cd /build && curl -LO https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz && \
tar -zxf /build/v2.3.0.tar.gz && \
cd /build/openjpeg-2.3.0 && \
mkdir -v build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. && \
make -j && make install && \
rm -Rf /build/openjpeg*
RUN wget https://bootstrap.pypa.io/get-pip.py -O get-pip.py && python get-pip.py && pip install --upgrade pip wheel numpy
ARG GDAL_VERSION
RUN cd /build && \
git clone https://github.com/OSGeo/gdal.git && \
......@@ -66,16 +72,20 @@ RUN cd /build && \
--with-libjson-c=internal \
--with-poppler \
--with-spatialite \
--with-python \
--with-liblzma \
--with-openjpeg \
--with-ogdi \
--with-webp \
--with-pg \
--with-mrsid=/usr/local \
--with-fgdb=/usr/local \
--with-libkml \
--with-hdf5 && \
--with-filegdb \
--with-hdf5=/usr/lib/x86_64-linux-gnu/hdf5/serial \
--with-openjpeg && \
make && \
make install && \
cd swig/python && python setup.py build && python setup.py install && \
ldconfig && \
rm -Rf /build/gdal
......@@ -156,9 +166,9 @@ RUN cd /build \
# Force buit libraries dependencies
RUN ldconfig
# Apache configuration for mapcache
RUN echo "LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so" > /etc/apache2/mods-available/mapcache.load
RUN echo '<IfModule mapcache_module> \n\
# Apache configuration for mapcache
RUN echo "LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so" > /etc/apache2/mods-available/mapcache.load
RUN echo '<IfModule mapcache_module> \n\
<Directory /msconfig/mapcache> \n\
Require all granted \n\
</Directory> \n\
......
......@@ -8,6 +8,7 @@ RUN ln -s /opt/instantclient/ /opt/instantclient/lib
#Setup user
ARG UID
ARG GID
ARG MRSID_DOWNLOAD_URL
RUN addgroup --gid $GID msgroup
RUN adduser --no-create-home --disabled-login msuser --gecos "" --uid $UID --gid $GID
......@@ -15,35 +16,32 @@ ENV ORACLE_HOME=/opt/instantclient
ENV LD_LIBRARY_PATH=${ORACLE_HOME}:/usr/lib:/usr/local/lib
ENV LIBKML_DOWNLOAD=install-libkml-r864-64bit.tar.gz
ENV FILEGDBAPI_DOWNLOAD=FileGDB_API_1_2-64.tar.gz
ENV MRSID_DIR=MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44
ENV MRSID_DOWNLOAD=MrSID_DSDK-8.5.0.3422-linux.x86-64.gcc44.tar.gz
ENV MRSID_DIR=MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc482
ENV MRSID_DOWNLOAD=MrSID_DSDK-9.5.4.4703-rhel6.x86-64.gcc482.tar.gz
# Setup build env
RUN mkdir /build
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 16126D3A3E5C1192 \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends software-properties-common \
&& add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends gcc-4.7 g++-4.7 build-essential ca-certificates curl wget git libaio1 make cmake python-dev \
&& apt-get update && apt-get install -y --fix-missing --no-install-recommends gcc-4.9 g++-4.9 build-essential ca-certificates curl wget git libaio1 make cmake python-dev \
python-software-properties software-properties-common libc6-dev openssh-client libpng12-dev libjpeg-dev libgif-dev liblzma-dev libgeos-dev \
libproj-dev libxml2-dev libexpat-dev libxerces-c-dev libnetcdf-dev netcdf-bin libpoppler-dev libspatialite-dev swig \
libhdf5-serial-dev libpodofo-dev poppler-utils libfreexl-dev libwebp-dev libepsilon-dev libpcre3-dev gfortran libarpack2-dev \
libpq-dev libflann-dev libhdf5-serial-dev libhdf5-dev libjsoncpp-dev clang-3.8 libhdf4-alt-dev libsqlite3-dev \
libltdl-dev libcurl4-openssl-dev ninja cython python-pip libpng-dev \
libltdl-dev libcurl4-openssl-dev ninja python-pip libpng-dev python-dev libprotobuf-c-dev protobuf-c-compiler\
libboost-filesystem1.58-dev libboost-iostreams1.58-dev libboost-program-options1.58-dev libboost-system1.58-dev libboost-thread1.58-dev libogdi3.2-dev time \
&& apt-get remove --purge -y $BUILD_PACKAGES && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 20 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 20
#RUN CXX=clang++ && CC=clang
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20 && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
#RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y openjdk-8-jre:i386
# Getting libKML
RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/${LIBKML_DOWNLOAD} -O /build/${LIBKML_DOWNLOAD} && \
tar -C /build -xzf /build/${LIBKML_DOWNLOAD} && \
cp -r /build/install-libkml/include/* /usr/local/include && \
cp -r /build/install-libkml/lib/* /usr/local/lib \
&& rm -Rf /build/install-libkml
RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-travisci/${MRSID_DOWNLOAD} -O /build/${MRSID_DOWNLOAD} && \
RUN curl -L ${$MRSID_DOWNLOAD_URL}/${MRSID_DOWNLOAD} -o /build/${MRSID_DOWNLOAD} && \
tar -C /build -xzf /build/${MRSID_DOWNLOAD} && \
cp -r /build/${MRSID_DIR}/Raster_DSDK/include/* /usr/local/include && \
cp -r /build/${MRSID_DIR}/Raster_DSDK/lib/* /usr/local/lib \
......@@ -55,6 +53,15 @@ RUN wget --no-verbose http://s3.amazonaws.com/etc-data.koordinates.com/gdal-trav