[Git][debian-gis-team/mapserver][master] 7 commits: New upstream version 7.2.1
Bas Couwenberg
gitlab at salsa.debian.org
Tue Oct 2 06:45:53 BST 2018
Bas Couwenberg pushed to branch master at Debian GIS Project / mapserver
Commits:
963a098e by Bas Couwenberg at 2018-10-02T05:04:23Z
New upstream version 7.2.1
- - - - -
48d01d3f by Bas Couwenberg at 2018-10-02T05:04:37Z
Merge tag 'upstream/7.2.1'
Upstream version 7.2.1
- - - - -
567fe2df by Bas Couwenberg at 2018-10-02T05:05:55Z
New upstream release.
- - - - -
56e8ae38 by Bas Couwenberg at 2018-10-02T05:09:52Z
Drop patches applied upstream. Refresh remaining patches.
- - - - -
781a975e by Bas Couwenberg at 2018-10-02T05:11:38Z
Update symbols for other architectures.
- - - - -
15428cbf by Bas Couwenberg at 2018-10-02T05:30:21Z
Fix docs install for README rename.
- - - - -
cefacf8d by Bas Couwenberg at 2018-10-02T05:30:21Z
Set distribution to unstable.
- - - - -
28 changed files:
- CMakeLists.txt
- CONTRIBUTING.md
- HISTORY.TXT
- README → README.rst
- debian/changelog
- debian/libmapserver2.symbols
- debian/mapserver-doc.docs
- debian/patches/cmake-3.12.patch
- − debian/patches/history.patch
- debian/patches/series
- − debian/patches/version-suffix.patch
- maplexer.c
- maplexer.l
- mapmvt.c
- mapogcfiltercommon.c
- mapogcsld.c
- mappostgis.c
- mapscript/python/CMakeLists.txt
- mapscript/python/pymodule.i
- mapscript/python/tests/cases/hashtest.py
- mapwcs.c
- mapwcs20.c
- mapwms.c
- mapxbase.c
- scripts/docker/Dockerfile
- scripts/docker/Dockerfile_mapcache
- scripts/docker/Dockerfile_oracle_mapcache
- textlayout.c
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -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})
=====================================
CONTRIBUTING.md
=====================================
@@ -1,7 +1,7 @@
# 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.
=====================================
HISTORY.TXT
=====================================
@@ -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
=====================================
README → README.rst
=====================================
@@ -1,7 +1,11 @@
+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
=====================================
debian/changelog
=====================================
@@ -1,8 +1,11 @@
-mapserver (7.2.0-6) UNRELEASED; urgency=medium
+mapserver (7.2.1-1) unstable; urgency=medium
+ * New upstream release.
* Bump Standards-Version to 4.2.1, no changes.
+ * Drop patches applied upstream. Refresh remaining patches.
+ * Fix docs install for README rename.
- -- Bas Couwenberg <sebastic at debian.org> Tue, 28 Aug 2018 13:14:38 +0200
+ -- Bas Couwenberg <sebastic at debian.org> Tue, 02 Oct 2018 07:11:40 +0200
mapserver (7.2.0-5) unstable; urgency=medium
=====================================
debian/libmapserver2.symbols
=====================================
@@ -1,4 +1,4 @@
-# SymbolsHelper-Confirmed: 7.2.0 amd64 arm64 armel armhf i386 m68k mips mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64
+# SymbolsHelper-Confirmed: 7.2.0 amd64 arm64 armel armhf i386 m68k mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el riscv64 s390x sh4 sparc64
libmapserver.so.2 #PACKAGE# #MINVER#
BuildExpressionTree at Base 6.2.1
CleanVSIDir at Base 6.2.1
@@ -195,7 +195,7 @@ libmapserver.so.2 #PACKAGE# #MINVER#
_ZN10ClipperLib17E2InsertsBeforeE1ERNS_5TEdgeES1_ at Base 6.2.1
_ZN10ClipperLib17FindAppendLinkEndEPNS_6OutRecE at Base 6.2.1
_ZN10ClipperLib17GetOverlapSegmentENS_8IntPointES0_S0_S0_RS0_S1_ at Base 6.2.1
- (arch=armel armhf i386 m68k mips mipsel powerpc)_ZN10ClipperLib17PolyOffsetBuilder8DoSquareEd at Base 7.2.0
+ (arch=armel armhf i386 m68k mips mipsel powerpc powerpcspe)_ZN10ClipperLib17PolyOffsetBuilder8DoSquareEd at Base 7.2.0
_ZN10ClipperLib17PolyOffsetBuilderC1ERKSt6vectorIS1_INS_8IntPointESaIS2_EESaIS4_EERS6_dNS_8JoinTypeEd at Base 6.2.1
_ZN10ClipperLib17PolyOffsetBuilderC2ERKSt6vectorIS1_INS_8IntPointESaIS2_EESaIS4_EERS6_dNS_8JoinTypeEd at Base 6.2.1
_ZN10ClipperLib18GetNextNonDupOutPtEPNS_5OutPtERS1_ at Base 6.2.1
@@ -209,7 +209,7 @@ libmapserver.so.2 #PACKAGE# #MINVER#
_ZN10ClipperLib4TopXERNS_5TEdgeEx at Base 6.2.1
_ZN10ClipperLib5GetDxENS_8IntPointES0_ at Base 6.2.1
_ZN10ClipperLib5SetDxERNS_5TEdgeE at Base 6.2.1
- (arch=armel armhf i386 m68k mips mipsel powerpc)_ZN10ClipperLib6Int1286NegateERS0_ at Base 7.2.0
+ (arch=armel armhf i386 m68k mips mipsel powerpc powerpcspe)_ZN10ClipperLib6Int1286NegateERS0_ at Base 7.2.0
_ZN10ClipperLib7Clipper10ClearJoinsEv at Base 6.2.1
_ZN10ClipperLib7Clipper11AddHorzJoinEPNS_5TEdgeEi at Base 6.2.1
_ZN10ClipperLib7Clipper11BuildResultERSt6vectorIS1_INS_8IntPointESaIS2_EESaIS4_EE at Base 6.2.1
@@ -610,13 +610,13 @@ libmapserver.so.2 #PACKAGE# #MINVER#
(optional=templinst)_ZNSt6vectorIP10msExprNodeSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ at Base 7.0.7
(optional=templinst)_ZNSt6vectorIP10msExprNodeSaIS1_EE9push_backERKS1_ at Base 7.0.5
(optional=templinst)_ZNSt6vectorIP10msExprNodeSaIS1_EEaSERKS3_ at Base 7.0.5
- (optional=templinst|arch=armel armhf i386 m68k mips mipsel powerpc sh4)_ZNSt6vectorIPN10ClipperLib11HorzJoinRecESaIS2_EE17_M_default_appendEj at Base 7.2.0
+ (optional=templinst|arch=armel armhf i386 m68k mips mipsel powerpc powerpcspe sh4)_ZNSt6vectorIPN10ClipperLib11HorzJoinRecESaIS2_EE17_M_default_appendEj at Base 7.2.0
(optional=templinst)_ZNSt6vectorIPN10ClipperLib11HorzJoinRecESaIS2_EE17_M_default_appendEm at Base 7.2.0
(optional=templinst)_ZNSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_ at Base 7.0.7
(optional=templinst)_ZNSt6vectorIPN10ClipperLib6OutRecESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_ at Base 7.0.7
- (optional=templinst|arch=armel armhf i386 m68k mips mipsel powerpc sh4)_ZNSt6vectorIPN10ClipperLib7JoinRecESaIS2_EE17_M_default_appendEj at Base 7.2.0
+ (optional=templinst|arch=armel armhf i386 m68k mips mipsel powerpc powerpcspe sh4)_ZNSt6vectorIPN10ClipperLib7JoinRecESaIS2_EE17_M_default_appendEj at Base 7.2.0
(optional=templinst)_ZNSt6vectorIPN10ClipperLib7JoinRecESaIS2_EE17_M_default_appendEm at Base 7.2.0
- (optional=templinst|arch=armel armhf i386 m68k mips mipsel powerpc)_ZNSt6vectorIPN10ClipperLib7JoinRecESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_ at Base 7.2.0
+ (optional=templinst|arch=armel armhf i386 m68k mips mipsel powerpc powerpcspe)_ZNSt6vectorIPN10ClipperLib7JoinRecESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_ at Base 7.2.0
(optional=templinst|arch=!amd64 !arm64 !mips64el !ppc64 !ppc64el !riscv64 !s390x !sparc64)_ZNSt6vectorIS_IN10ClipperLib8IntPointESaIS1_EESaIS3_EE17_M_default_appendEj at Base 7.0.2
(optional=templinst|arch=amd64 arm64 mips64el ppc64 ppc64el riscv64 s390x sparc64)_ZNSt6vectorIS_IN10ClipperLib8IntPointESaIS1_EESaIS3_EE17_M_default_appendEm at Base 7.0.2
(optional=templinst)_ZNSt6vectorIS_IN10ClipperLib8IntPointESaIS1_EESaIS3_EE17_M_realloc_insertIJRKS3_EEEvN9__gnu_cxx17__normal_iteratorIPS3_S5_EEDpOT_ at Base 7.0.7
=====================================
debian/mapserver-doc.docs
=====================================
@@ -1,4 +1,4 @@
-README
+README.rst
fonts
symbols
MIGRATION_GUIDE.txt
=====================================
debian/patches/cmake-3.12.patch
=====================================
@@ -39,9 +39,9 @@ Bug-Debian: https://bugs.debian.org/906605
install(FILES ${LOC_MAPSCRIPT_LIB} DESTINATION ${CUSTOM_PERL_VENDOR_ARCH_DIR}/auto/mapscript)
--- a/mapscript/python/CMakeLists.txt
+++ b/mapscript/python/CMakeLists.txt
-@@ -39,6 +39,14 @@ set_target_properties(${SWIG_MODULE_pyth
-
- 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)
+@@ -46,6 +46,14 @@ execute_process ( COMMAND ${PYTHON_EXECU
+ # expression $<TARGET_FILE>, as appropriate.
+ cmake_policy(SET CMP0026 OLD)
+# Workaround for CMake 3.12 error:
+#
=====================================
debian/patches/history.patch deleted
=====================================
@@ -1,19 +0,0 @@
-Description: Update HISTORY.TXT for 7.2.0 release.
-Author: Steve Lime
-Origin: https://github.com/mapserver/mapserver/commit/8644369f39575c7640d6ad19c8052d1e16b516ee
-
---- a/HISTORY.TXT
-+++ b/HISTORY.TXT
-@@ -12,6 +12,12 @@ For a complete change history, please se
- details about recent point releases, please see the online changelog at:
- http://mapserver.org/development/changelog/
-
-+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
=====================================
debian/patches/series
=====================================
@@ -2,6 +2,4 @@ hardening.patch
perl-mapscript-install.patch
ruby-mapscript-install.patch
java-hardening.patch
-version-suffix.patch
-history.patch
cmake-3.12.patch
=====================================
debian/patches/version-suffix.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Description: Remove -beta2 version suffix.
-Author: Bas Couwenberg <sebastic at debian.org>
-Forwarded: https://github.com/mapserver/mapserver/pull/5633
-Applied-Upstream: https://github.com/mapserver/mapserver/commit/8644369f39575c7640d6ad19c8052d1e16b516ee
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -18,7 +18,7 @@ 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_SUFFIX "")
-
- set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
- set(TARGET_VERSION_MINOR ${MapServer_VERSION_MINOR})
=====================================
maplexer.c
=====================================
The diff for this file was not included because it is too large.
=====================================
maplexer.l
=====================================
@@ -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),
=====================================
mapmvt.c
=====================================
@@ -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;
=====================================
mapogcfiltercommon.c
=====================================
@@ -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';
=====================================
mapogcsld.c
=====================================
@@ -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),
=====================================
mappostgis.c
=====================================
@@ -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;
=====================================
mapscript/python/CMakeLists.txt
=====================================
@@ -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})
=====================================
mapscript/python/pymodule.i
=====================================
@@ -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
=====================================
mapscript/python/tests/cases/hashtest.py
=====================================
@@ -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
=====================================
mapwcs.c
=====================================
@@ -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;
=====================================
mapwcs20.c
=====================================
@@ -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;
=====================================
mapwms.c
=====================================
@@ -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",
=====================================
mapxbase.c
=====================================
@@ -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;
}
=====================================
scripts/docker/Dockerfile
=====================================
@@ -4,41 +4,38 @@ MAINTAINER Michael Smith <Michael.smith.erdc at 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 \
=====================================
scripts/docker/Dockerfile_mapcache
=====================================
@@ -4,41 +4,38 @@ MAINTAINER Michael Smith <Michael.smith.erdc at 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\
=====================================
scripts/docker/Dockerfile_oracle_mapcache
=====================================
@@ -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
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 && \
@@ -71,18 +78,22 @@ RUN cd /build && \
--with-libjson-c=internal \
--with-poppler \
--with-spatialite \
+ --with-python \
--with-liblzma \
+ --with-openjpeg \
--with-ogdi \
--with-webp \
--with-oci-include=${ORACLE_HOME}/sdk/include \
--with-oci-lib=${ORACLE_HOME} \
--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
@@ -126,7 +137,6 @@ RUN cd /build && \
-DWITH_FCGI=ON \
-DWITH_FRIBIDI=ON \
-DWITH_CAIRO=ON \
- -DWITH_POSTGRES=ON \
-DWITH_HARFBUZZ=ON \
-DWITH_POSTGIS=on \
-DWITH_V8=OFF \
@@ -168,9 +178,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\
=====================================
textlayout.c
=====================================
@@ -521,7 +521,6 @@ int msLayoutTextSymbol(mapObj *map, textSymbolObj *ts, textPathObj *tgret) {
}
}
-
if(ts->label->wrap || ts->label->maxlength > 0) {
if(ts->label->wrap && ts->label->maxlength == 0) {
for(i=0;i<num_glyphs;i++) {
@@ -531,27 +530,17 @@ int msLayoutTextSymbol(mapObj *map, textSymbolObj *ts, textPathObj *tgret) {
}
} else {
assert(ts->label->maxlength > 0);
- if(ts->label->wrap != ' '){
- for(i=0;i<num_glyphs;i++) {
- /* replace all occurences of the wrap character with a space */
- if(glyphs.unicodes[i]== ts->label->wrap)
- glyphs.unicodes[i]= ' ';
- }
- }
if(num_glyphs > ts->label->maxlength) {
+ int num_cur_glyph_on_line = 0; /*count for the number of glyphs on the current line*/
for(i=0; i<num_glyphs; i++) {
- if(glyphs.unicodes[i]== ' ')
- break;
- }
- if(i != num_glyphs) { /* we have at least one space on which we can break */
- int num_cur_glyph_on_line = 0; /*count for the number of glyphs on the current line*/
- for(i=0; i<num_glyphs; i++) {
- if(glyphs.unicodes[i]== ' ' && num_cur_glyph_on_line >= ts->label->maxlength) {
- glyphs.unicodes[i]= '\n';
- num_cur_glyph_on_line = 0;
- } else {
- num_cur_glyph_on_line++;
- }
+ /* wrap at wrap character or at ZERO WIDTH SPACE (unicode 0x200b), if
+ * current line is too long */
+ if((glyphs.unicodes[i] == ts->label->wrap || glyphs.unicodes[i] == 0x200b)
+ && num_cur_glyph_on_line >= ts->label->maxlength) {
+ glyphs.unicodes[i]= '\n';
+ num_cur_glyph_on_line = 0;
+ } else {
+ num_cur_glyph_on_line++;
}
}
}
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/compare/09f4d92a80821baede458d99c341c33d29930919...cefacf8d4285453a630cc3bc081a14ff662ddee5
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/compare/09f4d92a80821baede458d99c341c33d29930919...cefacf8d4285453a630cc3bc081a14ff662ddee5
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/20181002/c044309f/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list