[Git][debian-gis-team/mapserver][upstream] New upstream version 8.2.0~rc2
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Fri Jun 28 06:59:29 BST 2024
Bas Couwenberg pushed to branch upstream at Debian GIS Project / mapserver
Commits:
7adb69f5 by Bas Couwenberg at 2024-06-28T06:14:12+02:00
New upstream version 8.2.0~rc2
- - - - -
12 changed files:
- CMakeLists.txt
- HISTORY.md
- Makefile
- ci/build.sh
- src/mapagg.cpp
- src/mapproject.c
- src/mapscript/csharp/CMakeLists.txt
- src/mapscript/java/CMakeLists.txt
- src/mapscript/perl/CMakeLists.txt
- src/mapscript/python/CMakeLists.txt
- src/mapscript/python/pymodule.i
- src/mapscript/ruby/CMakeLists.txt
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -18,7 +18,7 @@ include(CheckCSourceCompiles)
set (MapServer_VERSION_MAJOR 8)
set (MapServer_VERSION_MINOR 2)
set (MapServer_VERSION_REVISION 0)
-set (MapServer_VERSION_SUFFIX "-rc1")
+set (MapServer_VERSION_SUFFIX "-rc2")
# Set C++ version
# Make CMAKE_CXX_STANDARD available as cache option overridable by user
=====================================
HISTORY.md
=====================================
@@ -13,8 +13,13 @@ https://mapserver.org/development/changelog/
The online Migration Guide can be found at https://mapserver.org/MIGRATION_GUIDE.html
+8.2.0-rc2 release (2024-06-27)
+------------------------------
+
+- fix SWIG MapScript build failure (#7090)
+
8.2.0-rc1 release (2024-06-14)
---------------------------------
+------------------------------
- no changes since beta3 (see major changes below)
=====================================
Makefile
=====================================
@@ -9,7 +9,7 @@ FLEX=flex
YACC=yacc
CMAKEFLAGS_MAPSCRIPT_PYTHON=-DWITH_CLIENT_WMS=1 \
-DWITH_CLIENT_WFS=1 -DWITH_KML=1 -DWITH_SOS=1 \
- -DWITH_PYTHON=1-DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=1 -DWITH_EXEMPI=1 \
+ -DWITH_PYTHON=1 -DWITH_THREAD_SAFETY=1 -DWITH_FRIBIDI=1 -DWITH_FCGI=1 -DWITH_EXEMPI=1 \
-DCMAKE_BUILD_TYPE=Release -DWITH_RSVG=1 -DWITH_CURL=1 -DWITH_HARFBUZZ=1 ${EXTRA_CMAKEFLAGS} -DLIBMAPSERVER_EXTRA_FLAGS="${LIBMAPSERVER_EXTRA_FLAGS}" -DCMAKE_INSTALL_PREFIX=/tmp/install-mapserver
CMAKEFLAGS_NOCOVERAGE=-DWITH_CLIENT_WMS=1 \
=====================================
ci/build.sh
=====================================
@@ -5,7 +5,7 @@ export CC="ccache gcc"
export CXX="ccache g++"
if [ "${MAPSCRIPT_PYTHON_ONLY:-}" = "true" ]; then
- # only build MapServer with the Python MapScript
+ # only build MapServer with the Python MapScript and not PHP, Perl etc.
make cmakebuild_mapscript_python MFLAGS="-j$(nproc)" CMAKE_C_FLAGS="-O2" CMAKE_CXX_FLAGS="-O2" LIBMAPSERVER_EXTRA_FLAGS="-Wall -Werror -Wextra"
# build the wheel and run the Python MapScript test suite
make mspython-wheel
=====================================
src/mapagg.cpp
=====================================
@@ -1324,7 +1324,7 @@ int aggCompositeRasterBuffer(imageObj *dest, rasterBufferObj *overlay,
if (opacity == 100) {
alpha_mask_i_ptr = NULL;
} else {
- unsigned char alpha = (unsigned char)(opacity * 2.55);
+ unsigned char alpha = (unsigned char)(MS_NINT(opacity * 2.55));
if (!alpha_mask_i) {
alpha_mask = (unsigned char *)msSmallMalloc(dest->width * dest->height);
alpha_mask_i =
@@ -1350,12 +1350,13 @@ int aggCompositeRasterBuffer(imageObj *dest, rasterBufferObj *overlay,
pixel_format pf(b);
mapserver::comp_op_e comp_op = ms2agg_compop(comp);
if (comp_op == mapserver::comp_op_src_over) {
- r->m_renderer_base.blend_from(pf, 0, 0, 0, unsigned(opacity * 2.55));
+ r->m_renderer_base.blend_from(pf, 0, 0, 0,
+ unsigned(MS_NINT(opacity * 2.55)));
} else {
compop_pixel_format pixf(r->m_rendering_buffer);
compop_renderer_base ren(pixf);
pixf.comp_op(comp_op);
- ren.blend_from(pf, 0, 0, 0, unsigned(opacity * 2.55));
+ ren.blend_from(pf, 0, 0, 0, unsigned(MS_NINT(opacity * 2.55)));
}
return MS_SUCCESS;
#endif
=====================================
src/mapproject.c
=====================================
@@ -70,6 +70,7 @@ typedef struct {
} pjCacheEntry;
struct projectionContext {
+ void *thread_id;
PJ_CONTEXT *proj_ctx;
unsigned ms_proj_data_change_counter;
int ref_count;
@@ -341,6 +342,7 @@ static void msProjErrorLogger(void *user_data, int level, const char *message) {
projectionContext *msProjectionContextCreate(void) {
projectionContext *ctx =
(projectionContext *)msSmallCalloc(1, sizeof(projectionContext));
+ ctx->thread_id = msGetThreadId();
ctx->proj_ctx = proj_context_create();
if (ctx->proj_ctx == NULL) {
msFree(ctx);
@@ -520,6 +522,28 @@ void msFreeProjectionExceptContext(projectionObj *p) {
p->proj_ctx = ctx;
}
+/************************************************************************/
+/* msProjectionContextClone() */
+/************************************************************************/
+
+static projectionContext *
+msProjectionContextClone(const projectionContext *ctxSrc) {
+ projectionContext *ctx = msProjectionContextCreate();
+ if (ctx) {
+ ctx->pj_cache_size = ctxSrc->pj_cache_size;
+ for (int i = 0; i < ctx->pj_cache_size; ++i) {
+ pjCacheEntry *entryDst = &(ctx->pj_cache[i]);
+ const pjCacheEntry *entrySrc = &(ctxSrc->pj_cache[i]);
+ entryDst->inStr = msStrdup(entrySrc->inStr);
+ entryDst->outStr = msStrdup(entrySrc->outStr);
+ entryDst->pj = proj_clone(
+ /* use target PROJ context for cloning */
+ ctx->proj_ctx, entrySrc->pj);
+ }
+ }
+ return ctx;
+}
+
/************************************************************************/
/* msProjectionInheritContextFrom() */
/************************************************************************/
@@ -527,8 +551,12 @@ void msFreeProjectionExceptContext(projectionObj *p) {
void msProjectionInheritContextFrom(projectionObj *pDst,
const projectionObj *pSrc) {
if (pDst->proj_ctx == NULL && pSrc->proj_ctx != NULL) {
- pDst->proj_ctx = pSrc->proj_ctx;
- pDst->proj_ctx->ref_count++;
+ if (pSrc->proj_ctx->thread_id == msGetThreadId()) {
+ pDst->proj_ctx = pSrc->proj_ctx;
+ pDst->proj_ctx->ref_count++;
+ } else {
+ pDst->proj_ctx = msProjectionContextClone(pSrc->proj_ctx);
+ }
}
}
=====================================
src/mapscript/csharp/CMakeLists.txt
=====================================
@@ -34,6 +34,7 @@ MARK_AS_ADVANCED(CSHARP_COMPILER)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/csharp)
+include_directories(${PROJECT_BINARY_DIR}/src/mapscript/)
SET (CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}")
if (WIN32)
SET( CMAKE_SWIG_FLAGS -namespace OSGeo.MapServer -DWIN32 ${MAPSERVER_COMPILE_DEFINITIONS})
=====================================
src/mapscript/java/CMakeLists.txt
=====================================
@@ -11,6 +11,7 @@ include_directories(${JNI_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/java)
+include_directories(${PROJECT_BINARY_DIR}/src/mapscript/)
set (CMAKE_SWIG_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/edu/umn/gis/mapscript")
set(CMAKE_SWIG_FLAGS -package edu.umn.gis.mapscript)
=====================================
src/mapscript/perl/CMakeLists.txt
=====================================
@@ -9,6 +9,7 @@ include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/)
add_definitions(${PERL_EXTRA_C_FLAGS})
set(CMAKE_SWIG_FLAGS -shadow -w314)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/perl)
+include_directories(${PROJECT_BINARY_DIR}/src/mapscript/)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7)
swig_add_library(perlmapscript TYPE MODULE LANGUAGE perl5 SOURCES ../mapscript.i)
=====================================
src/mapscript/python/CMakeLists.txt
=====================================
@@ -7,6 +7,7 @@ include_directories(${Python_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/python)
+include_directories(${PROJECT_BINARY_DIR}/src/mapscript/)
set(SwigFile ${PROJECT_SOURCE_DIR}/src/mapscript/mapscript.i)
=====================================
src/mapscript/python/pymodule.i
=====================================
@@ -82,13 +82,17 @@ CreateTupleFromDoubleArray( double *first, unsigned int size ) {
$2 = &nListSize;
}
-%typemap(argout,fragment="t_output_helper,CreateTupleFromDoubleArray") (double** argout, int* pnListSize)
+%typemap(argout,fragment="CreateTupleFromDoubleArray") (double** argout, int* pnListSize)
{
/* %typemap(argout) (double* argout, int* pnListSize) */
PyObject *r;
r = CreateTupleFromDoubleArray(*$1, *$2);
free(*$1);
- $result = t_output_helper($result,r);
+ %#if SWIG_VERSION >= 0x040300
+ $result = SWIG_Python_AppendOutput($result, r, $isvoid);
+ %#else
+ $result = SWIG_Python_AppendOutput($result, r);
+ %#endif
}
/*
=====================================
src/mapscript/ruby/CMakeLists.txt
=====================================
@@ -5,6 +5,7 @@ include_directories(${RUBY_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/src/mapscript/ruby)
+include_directories(${PROJECT_BINARY_DIR}/src/mapscript/)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7)
swig_add_library(rubymapscript TYPE MODULE LANGUAGE ruby SOURCES ../mapscript.i)
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/-/commit/7adb69f5f1dd20b6699d1f1a2260b489af416a1c
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapserver/-/commit/7adb69f5f1dd20b6699d1f1a2260b489af416a1c
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/20240628/406d694d/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list