Commit d3dd19a5 authored by Bas Couwenberg's avatar Bas Couwenberg

Imported Upstream version 6.4.0-rc1

parent 56a0ab5e
......@@ -12,7 +12,7 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 6)
set (MapServer_VERSION_MINOR 4)
set (MapServer_VERSION_REVISION 0)
set (MapServer_VERSION_SUFFIX "-beta2")
set (MapServer_VERSION_SUFFIX "-rc1")
set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
set(TARGET_VERSION_MINOR ${MapServer_VERSION_MINOR})
......@@ -111,7 +111,7 @@ option(WITH_CURL "Enable Curl HTTP support (required for wms/wfs client, and rem
option(WITH_WFS "Enable WFS Server support (requires PROJ and OGR support)" ON)
option(WITH_WCS "Enable WCS Server support (requires PROJ and GDAL support)" ON)
option(WITH_LIBXML2 "Choose if libxml2 support should be built in (used for sos, wcs 1.1,2.0 and wfs 1.1)" ON)
option(WITH_THREADS "Choose if a thread-safe version of libmapserver should be built (only recommended for some mapscripts)" OFF)
option(WITH_THREAD_SAFETY "Choose if a thread-safe version of libmapserver should be built (only recommended for some mapscripts)" OFF)
option(WITH_GIF "Enable GIF support (for PIXMAP loading)" ON)
option(WITH_PYTHON "Enable Python mapscript support" OFF)
option(WITH_PHP "Enable Python mapscript support" OFF)
......@@ -665,14 +665,14 @@ if(WITH_KML)
endif(USE_LIBXML2)
endif(WITH_KML)
if(WITH_THREADS)
if(WITH_THREAD_SAFETY)
set( CMAKE_THREAD_PREFER_PTHREAD 1 )
find_package(Threads)
if (THREADS_FOUND)
ms_link_libraries( ${CMAKE_THREAD_LIBS_INIT})
set(USE_THREAD 1)
endif (THREADS_FOUND)
endif(WITH_THREADS)
endif(WITH_THREAD_SAFETY)
if(WITH_XMLMAPFILE)
if(NOT USE_LIBXML2)
......
......@@ -8,7 +8,7 @@ YACC=yacc
CMAKEFLAGS=-DCMAKE_C_FLAGS="--coverage" -DCMAKE_CXX_FLAGS="--coverage" \
-DCMAKE_SHARED_LINKER_FLAGS="-lgcov" -DWITH_GD=1 -DWITH_CLIENT_WMS=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 -DWITH_PHP=1 \
-DWITH_PYTHON=1 -DWITH_JAVA=1 -DWITH_THREADS=1 -DWITH_FRIBIDI=0 -DWITH_FCGI=0 -DWITH_EXEMPI=1 \
-DWITH_PYTHON=1 -DWITH_JAVA=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=0 -DWITH_FCGI=0 -DWITH_EXEMPI=1 \
-DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1
all: cmakebuild
......
......@@ -2076,6 +2076,9 @@ int msDrawShape(mapObj *map, layerObj *layer, shapeObj *shape, imageObj *image,
}
maxsize = MS_MAX(msSymbolGetDefaultSize(symbol), MS_MAX(style->size, style->width));
maxunscaledsize = MS_MAX(style->minsize*image->resolutionfactor, style->minwidth*image->resolutionfactor);
if(shape->type == MS_SHAPE_POLYGON && !IS_PARALLEL_OFFSET(style->offsety)) {
maxsize += MS_MAX(fabs(style->offsety),fabs(style->offsetx));
}
clip_buf = MS_MAX(clip_buf,MS_NINT(MS_MAX(maxsize * layer->scalefactor, maxunscaledsize) + 1));
}
......
......@@ -554,23 +554,30 @@ static void writeCharacter(FILE *stream, int indent, const char *name, const cha
static void writeString(FILE *stream, int indent, const char *name, const char *defaultString, char *string)
{
char *string_tmp;
char *string_escaped;
if(!string) return;
if(defaultString && strcmp(string, defaultString) == 0) return;
writeIndent(stream, ++indent);
if(name) msIO_fprintf(stream, "%s ", name);
if ( (strchr(string, '\'') == NULL) && (strchr(string, '\"') == NULL))
msIO_fprintf(stream, "\"%s\"\n", string);
else if ( (strchr(string, '\"') != NULL) && (strchr(string, '\'') == NULL))
msIO_fprintf(stream, "'%s'\n", string);
else if ( (strchr(string, '\'') != NULL) && (strchr(string, '\"') == NULL))
msIO_fprintf(stream, "\"%s\"\n", string);
if(strchr(string,'\\')) {
string_escaped = msStrdup(string);
string_escaped = msReplaceSubstring(string_escaped,"\\","\\\\");
} else {
string_escaped = string;
}
if ( (strchr(string_escaped, '\'') == NULL) && (strchr(string_escaped, '\"') == NULL))
msIO_fprintf(stream, "\"%s\"\n", string_escaped);
else if ( (strchr(string_escaped, '\"') != NULL) && (strchr(string_escaped, '\'') == NULL))
msIO_fprintf(stream, "'%s'\n", string_escaped);
else if ( (strchr(string_escaped, '\'') != NULL) && (strchr(string_escaped, '\"') == NULL))
msIO_fprintf(stream, "\"%s\"\n", string_escaped);
else {
string_tmp = msStringEscape(string);
char *string_tmp = msStringEscape(string_escaped);
msIO_fprintf(stream, "\"%s\"\n", string_tmp);
if(string!=string_tmp) free(string_tmp);
if(string_escaped!=string_tmp) free(string_tmp);
}
if(string_escaped!=string) free(string_escaped);
}
static void writeNumberOrString(FILE *stream, int indent, const char *name, double defaultNumber, double number, char *string)
......
......@@ -1772,7 +1772,7 @@ labelPathObj** msPolylineLabelPath(mapObj *map, imageObj *img,shapeObj *p, int m
offset = -offset;
}
}
p = msOffsetPolyline(p,offset, -99);
p = msOffsetPolyline(p,offset, MS_STYLE_SINGLE_SIDED_OFFSET);
if(!p) return NULL;
}
......
......@@ -520,10 +520,10 @@ int msDrawLineSymbol(symbolSetObj *symbolset, imageObj *image, shapeObj *p,
finalscalefactor = 1.0;
}
if(style->offsety==-99) {
offsetLine = msOffsetPolyline(p,style->offsetx * finalscalefactor ,-99);
} else if(style->offsety==-999) {
offsetLine = msOffsetPolyline(p,style->offsetx * finalscalefactor ,-999);
if(style->offsety==MS_STYLE_SINGLE_SIDED_OFFSET) {
offsetLine = msOffsetPolyline(p,style->offsetx * finalscalefactor ,MS_STYLE_SINGLE_SIDED_OFFSET);
} else if(style->offsety==MS_STYLE_DOUBLE_SIDED_OFFSET) {
offsetLine = msOffsetPolyline(p,style->offsetx * finalscalefactor ,MS_STYLE_DOUBLE_SIDED_OFFSET);
} else if(style->offsetx!=0 || style->offsety!=0) {
offsetLine = msOffsetPolyline(p, style->offsetx * finalscalefactor,
style->offsety * finalscalefactor);
......@@ -643,10 +643,10 @@ int msDrawShadeSymbol(symbolSetObj *symbolset, imageObj *image, shapeObj *p, sty
symbol->renderer = renderer;
if (style->offsetx != 0 || style->offsety != 0) {
if(style->offsety==-99) {
offsetPolygon = msOffsetPolyline(p, style->offsetx*scalefactor, -99);
} else if(style->offsety==-999) {
offsetPolygon = msOffsetPolyline(p,style->offsetx * scalefactor ,-999);
if(style->offsety==MS_STYLE_SINGLE_SIDED_OFFSET) {
offsetPolygon = msOffsetPolyline(p, style->offsetx*scalefactor, MS_STYLE_SINGLE_SIDED_OFFSET);
} else if(style->offsety==MS_STYLE_DOUBLE_SIDED_OFFSET) {
offsetPolygon = msOffsetPolyline(p,style->offsetx * scalefactor ,MS_STYLE_DOUBLE_SIDED_OFFSET);
} else {
offsetPolygon = msOffsetPolyline(p, style->offsetx*scalefactor,style->offsety*scalefactor);
}
......
......@@ -12,9 +12,6 @@ SWIG_LINK_LIBRARIES(rubymapscript ${RUBY_LIBRARY} ${MAPSERVER_LIBMAPSERVER})
set_target_properties(${SWIG_MODULE_rubymapscript_REAL_NAME} PROPERTIES PREFIX "")
set_target_properties(${SWIG_MODULE_rubymapscript_REAL_NAME} PROPERTIES OUTPUT_NAME mapscript)
#get_target_property(LOC_MAPSCRIPT_LIB ${SWIG_MODULE_mapscript_REAL_NAME} LOCATION)
#set(mapscript_files ${LOC_MAPSCRIPT_LIB} ${CMAKE_CURRENT_BINARY_DIR}/mapscript.py)
#install(FILES ${mapscript_files} DESTINATION ${PYTHON_SITE_PACKAGES})
#install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mapscript.py DESTINATION ${PYTHON_SITE_PACKAGES})
#install(TARGETS mapscript DESTINATION ${PYTHON_SITE_PACKAGES})
get_target_property(LOC_MAPSCRIPT_LIB ${SWIG_MODULE_rubymapscript_REAL_NAME} LOCATION)
execute_process(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "puts RbConfig::CONFIG['archdir']" OUTPUT_VARIABLE RUBY_ARCHDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
install(FILES ${LOC_MAPSCRIPT_LIB} DESTINATION ${RUBY_ARCHDIR})
......@@ -944,6 +944,10 @@ extern "C" {
#endif
};
#define MS_STYLE_SINGLE_SIDED_OFFSET -99
#define MS_STYLE_DOUBLE_SIDED_OFFSET -999
#define IS_PARALLEL_OFFSET(offsety) (offsety == MS_STYLE_SINGLE_SIDED_OFFSET || offsety == MS_STYLE_DOUBLE_SIDED_OFFSET)
/********************************************************************/
......
......@@ -1845,9 +1845,9 @@ shapeObj *msOffsetPolyline(shapeObj *p, double offsetx, double offsety)
{
int i, j;
shapeObj *ret;
if(offsety == -99) { /* complex calculations */
if(offsety == MS_STYLE_SINGLE_SIDED_OFFSET) { /* complex calculations */
return msOffsetCurve(p,offsetx);
} else if(offsety == -999) {
} else if(offsety == MS_STYLE_DOUBLE_SIDED_OFFSET) {
shapeObj *tmp1;
ret = msOffsetCurve(p,offsetx/2.0);
tmp1 = msOffsetCurve(p, -offsetx/2.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment