The following commit has been merged in the upstream branch:
commit d3dd19a5194edf20555c2f7b0be57a3942341189
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Wed Sep 11 15:14:37 2013 +0200

    Imported Upstream version 6.4.0-rc1

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfaa22d..8c5ef1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/Makefile b/Makefile
index 84fe524..f265ff5 100644
--- a/Makefile
+++ b/Makefile
@@ -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
 
diff --git a/mapdraw.c b/mapdraw.c
index 35f7a53..992838d 100644
--- a/mapdraw.c
+++ b/mapdraw.c
@@ -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));
     }
 
diff --git a/mapfile.c b/mapfile.c
index 18c1c27..1389d49 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -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)
diff --git a/mapprimitive.c b/mapprimitive.c
index b329fa9..b90962d 100644
--- a/mapprimitive.c
+++ b/mapprimitive.c
@@ -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;
   }
 
diff --git a/maprendering.c b/maprendering.c
index 5d2fc2f..1852f62 100644
--- a/maprendering.c
+++ b/maprendering.c
@@ -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);
         }
diff --git a/mapscript/ruby/CMakeLists.txt b/mapscript/ruby/CMakeLists.txt
index 7a24922..95f5982 100644
--- a/mapscript/ruby/CMakeLists.txt
+++ b/mapscript/ruby/CMakeLists.txt
@@ -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})
diff --git a/mapserver.h b/mapserver.h
index dec6972..e6a9d8e 100644
--- a/mapserver.h
+++ b/mapserver.h
@@ -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)
+
 
 
   /********************************************************************/
diff --git a/maputil.c b/maputil.c
index 48c8e57..8cce4e7 100644
--- a/maputil.c
+++ b/maputil.c
@@ -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);

-- 
Packaging for MapServer

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to