On Sat, 09 Mar 2013 18:17:05 +0000, Adam D. Barratt wrote: > On Sun, 2013-03-03 at 10:24 +0100, David Paleino wrote: > > On Thu, 28 Feb 2013 20:31:40 +0000, Adam D. Barratt wrote: > > > Cool; thanks. Did you have chance to look at whether fixing the testing > > > package "just" requires the source file split or if there were any other > > > issues? > > > > The package I prepared and built for testing also required 2 other > > patches, to fix #683075. I guess that hasn't changed since then :) > > The debdiff included in <MID:20130119194518.0c49613d@local> only > appeared to include the srsinit changes. Apologies if I simply missed > it, but was a debdiff with the other changes also posted somewhere?
You did see it already, but I didn't include it in the patch I posted. This is because I only made a patch for the source to be split; the actual package for testing carries two more patches, attaching them to this mail. The bigger patch is needed because an API change in freexl happened unnoticed between testing and unstable. See also your message <MID:1358594334.12995.35.ca...@jacala.jungle.funky-badger.org> (Sat, 19 Jan 2013 11:18:54 +0000). Sorry for the confusion, and thank you! David -- . ''`. Debian developer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
From: Evgeni Golov <evg...@debian.org> Subject: fix linking with libgeos Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683075#39 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683075 --- libspatialite/configure | 4 ++-- libspatialite/configure.ac | 4 ++-- spatialite-tools/configure | 2 +- spatialite-tools/configure.ac | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) --- spatialite.orig/libspatialite/configure +++ spatialite/libspatialite/configure @@ -16593,7 +16593,7 @@ for ac_lib in '' geos_c; do ac_res="none required" else ac_res=-l$ac_lib - LIBS="-l$ac_lib -lm -lgeos $ac_func_search_save_LIBS" + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_GEOSTopologyPreserveSimplify=$ac_res @@ -16663,7 +16663,7 @@ for ac_lib in '' geos_c; do ac_res="none required" else ac_res=-l$ac_lib - LIBS="-l$ac_lib -lm -lgeos $ac_func_search_save_LIBS" + LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_GEOSCoveredBy=$ac_res --- spatialite.orig/libspatialite/configure.ac +++ spatialite/libspatialite/configure.ac @@ -120,7 +120,7 @@ AC_ARG_ENABLE(geos, [AS_HELP_STRING( if test x"$enable_geos" != "xno"; then OMIT_GEOS_FLAGS= AC_CHECK_HEADERS(geos_c.h,, [AC_MSG_ERROR([cannot find geos_c.h, bailing out])]) - AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),-lm -lgeos) + AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),) #----------------------------------------------------------------------- # --enable-geosadvanced # @@ -129,7 +129,7 @@ if test x"$enable_geos" != "xno"; then [], [geosadvanced=yes]) if test x"$enable_geosadvanced" != "xno"; then GEOSADVANCED_FLAGS=-DGEOS_ADVANCED - AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([obsolete 'libgeos_c' (< v.3.3.0). please retry specifying: --disable-geosadvanced.]),-lm -lgeos) + AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([obsolete 'libgeos_c' (< v.3.3.0). please retry specifying: --disable-geosadvanced.]),) else GEOSADVANCED_FLAGS= fi --- spatialite.orig/spatialite-tools/configure +++ spatialite/spatialite-tools/configure @@ -16547,7 +16547,7 @@ if test "${ac_cv_lib_geos_c_GEOSTopology $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lgeos_c -lm -lgeos $LIBS" +LIBS="-lgeos_c $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ --- spatialite.orig/spatialite-tools/configure.ac +++ spatialite/spatialite-tools/configure.ac @@ -72,7 +72,7 @@ AC_SUBST(READLINE_LIBS) AC_CHECK_LIB(expat,XML_ParserCreate,,AC_MSG_ERROR(['expat' is required but it doesn't seems to be installed on this system.])) AC_CHECK_LIB(proj,pj_init_plus,,AC_MSG_ERROR(['libproj' is required but it doesn't seems to be installed on this system.]),-lm) -AC_CHECK_LIB(geos_c,GEOSTopologyPreserveSimplify,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),-lm -lgeos) +AC_CHECK_LIB(geos_c,GEOSTopologyPreserveSimplify,,AC_MSG_ERROR(['libgeos_c' is required but it doesn't seems to be installed on this system.]),) PKG_CHECK_MODULES([LIBFREEXL], [freexl], , AC_MSG_ERROR(['libfreexl' is required but it doesn't seems to be installed on this system.])) LIBSPATIALITE_CFLAGS=
From: Felix Geyer <fge...@debian.org> Subject: fix compatibility issues with FreeXL Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683075#44 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683075 --- libspatialite/src/spatialite/virtualXL.c | 115 ++++++++++++++----------------- spatialite-tools/shapefiles.c | 69 ++++++++---------- 2 files changed, 83 insertions(+), 101 deletions(-) --- spatialite.orig/libspatialite/src/spatialite/virtualXL.c +++ spatialite/libspatialite/src/spatialite/virtualXL.c @@ -264,30 +264,25 @@ vXL_create (sqlite3 * db, void *pAux, in /* fetching comun names */ for (col = 0; col < columns; col++) { - unsigned char type; - int int_value; - double dbl_value; - const char *text_value; - int ret = - freexl_get_cell_value (handle, 0, col, &type, &int_value, - &dbl_value, &text_value); + FreeXL_CellValue cell; + int ret = freexl_get_cell_value (handle, 0, col, &cell); if (ret != FREEXL_OK) sprintf (dummyName, "col_%d", col); else { - if (type == FREEXL_CELL_INT) - sprintf (dummyName, "%d", int_value); - else if (type == FREEXL_CELL_DOUBLE) - sprintf (dummyName, "%1.2f", dbl_value); - else if (type == FREEXL_CELL_TEXT - || type == FREEXL_CELL_SST_TEXT - || type == FREEXL_CELL_DATE - || type == FREEXL_CELL_DATETIME - || type == FREEXL_CELL_TIME) + if (cell.type == FREEXL_CELL_INT) + sprintf (dummyName, "%d", cell.value.int_value); + else if (cell.type == FREEXL_CELL_DOUBLE) + sprintf (dummyName, "%1.2f", cell.value.double_value); + else if (cell.type == FREEXL_CELL_TEXT + || cell.type == FREEXL_CELL_SST_TEXT + || cell.type == FREEXL_CELL_DATE + || cell.type == FREEXL_CELL_DATETIME + || cell.type == FREEXL_CELL_TIME) { - int len = strlen (text_value); + int len = strlen (cell.value.text_value); if (len < 256) - strcpy (dummyName, text_value); + strcpy (dummyName, cell.value.text_value); else sprintf (dummyName, "col_%d", col); } @@ -495,10 +490,7 @@ static int vXL_eval_constraints (VirtualXLCursorPtr cursor) { /* evaluating Filter constraints */ - unsigned char type; - int int_value; - double dbl_value; - const char *text_value; + FreeXL_CellValue cell; VirtualXLConstraintPtr pC = cursor->firstConstraint; if (pC == NULL) return 1; @@ -544,34 +536,33 @@ vXL_eval_constraints (VirtualXLCursorPtr && pC->iColumn <= cursor->pVtab->columns) freexl_get_cell_value (cursor->pVtab->XL_handle, cursor->current_row - 1, pC->iColumn - 1, - &type, &int_value, &dbl_value, - &text_value); + &cell); else - type = FREEXL_CELL_NULL; - if (type == FREEXL_CELL_INT) + cell.type = FREEXL_CELL_NULL; + if (cell.type == FREEXL_CELL_INT) { if (pC->valueType == 'I') { switch (pC->op) { case SQLITE_INDEX_CONSTRAINT_EQ: - if (int_value == pC->intValue) + if (cell.value.int_value == pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GT: - if (int_value > pC->intValue) + if (cell.value.int_value > pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LE: - if (int_value <= pC->intValue) + if (cell.value.int_value <= pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LT: - if (int_value < pC->intValue) + if (cell.value.int_value < pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GE: - if (int_value >= pC->intValue) + if (cell.value.int_value >= pC->intValue) ok = 1; break; }; @@ -581,52 +572,52 @@ vXL_eval_constraints (VirtualXLCursorPtr switch (pC->op) { case SQLITE_INDEX_CONSTRAINT_EQ: - if (int_value == pC->dblValue) + if (cell.value.int_value == pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GT: - if (int_value > pC->dblValue) + if (cell.value.int_value > pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LE: - if (int_value <= pC->dblValue) + if (cell.value.int_value <= pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LT: - if (int_value < pC->dblValue) + if (cell.value.int_value < pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GE: - if (int_value >= pC->dblValue) + if (cell.value.int_value >= pC->dblValue) ok = 1; break; }; } } - if (type == FREEXL_CELL_DOUBLE) + if (cell.type == FREEXL_CELL_DOUBLE) { if (pC->valueType == 'I') { switch (pC->op) { case SQLITE_INDEX_CONSTRAINT_EQ: - if (dbl_value == pC->intValue) + if (cell.value.double_value == pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GT: - if (dbl_value > pC->intValue) + if (cell.value.double_value > pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LE: - if (dbl_value <= pC->intValue) + if (cell.value.double_value <= pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LT: - if (dbl_value < pC->intValue) + if (cell.value.double_value < pC->intValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GE: - if (dbl_value >= pC->intValue) + if (cell.value.double_value >= pC->intValue) ok = 1; break; }; @@ -636,33 +627,35 @@ vXL_eval_constraints (VirtualXLCursorPtr switch (pC->op) { case SQLITE_INDEX_CONSTRAINT_EQ: - if (dbl_value == pC->dblValue) + if (cell.value.double_value == pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GT: - if (dbl_value > pC->dblValue) + if (cell.value.double_value > pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LE: - if (dbl_value <= pC->dblValue) + if (cell.value.double_value <= pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_LT: - if (dbl_value < pC->dblValue) + if (cell.value.double_value < pC->dblValue) ok = 1; break; case SQLITE_INDEX_CONSTRAINT_GE: - if (dbl_value >= pC->dblValue) + if (cell.value.double_value >= pC->dblValue) ok = 1; break; }; } } - if ((type == FREEXL_CELL_TEXT || type == FREEXL_CELL_SST_TEXT - || type == FREEXL_CELL_DATE || type == FREEXL_CELL_DATETIME - || type == FREEXL_CELL_TIME) && pC->valueType == 'T') + if ((cell.type == FREEXL_CELL_TEXT + || cell.type == FREEXL_CELL_SST_TEXT + || cell.type == FREEXL_CELL_DATE + || cell.type == FREEXL_CELL_DATETIME + || cell.type == FREEXL_CELL_TIME) && pC->valueType == 'T') { - int ret = strcmp (text_value, pC->txtValue); + int ret = strcmp (cell.value.text_value, pC->txtValue); switch (pC->op) { case SQLITE_INDEX_CONSTRAINT_EQ: @@ -796,10 +789,7 @@ vXL_column (sqlite3_vtab_cursor * pCurso int column) { /* fetching value for the Nth column */ - unsigned char type; - int int_value; - double dbl_value; - const char *text_value; + FreeXL_CellValue cell; VirtualXLCursorPtr cursor = (VirtualXLCursorPtr) pCursor; if (column == 0) { @@ -814,25 +804,24 @@ vXL_column (sqlite3_vtab_cursor * pCurso && cursor->current_row <= cursor->pVtab->rows && column <= cursor->pVtab->columns) freexl_get_cell_value (cursor->pVtab->XL_handle, - cursor->current_row - 1, column - 1, &type, - &int_value, &dbl_value, &text_value); + cursor->current_row - 1, column - 1, &cell); else - type = FREEXL_CELL_NULL; - switch (type) + cell.type = FREEXL_CELL_NULL; + switch (cell.type) { case FREEXL_CELL_INT: - sqlite3_result_int (pContext, int_value); + sqlite3_result_int (pContext, cell.value.int_value); break; case FREEXL_CELL_DOUBLE: - sqlite3_result_double (pContext, dbl_value); + sqlite3_result_double (pContext, cell.value.double_value); break; case FREEXL_CELL_TEXT: case FREEXL_CELL_SST_TEXT: case FREEXL_CELL_DATE: case FREEXL_CELL_DATETIME: case FREEXL_CELL_TIME: - sqlite3_result_text (pContext, text_value, strlen (text_value), - SQLITE_STATIC); + sqlite3_result_text (pContext, cell.value.text_value, + strlen (cell.value.text_value), SQLITE_STATIC); break; default: sqlite3_result_null (pContext); --- spatialite.orig/spatialite-tools/shapefiles.c +++ spatialite/spatialite-tools/shapefiles.c @@ -2600,10 +2600,7 @@ load_XL (sqlite3 * sqlite, const char *p unsigned int rows; unsigned short columns; unsigned short col; - unsigned char type; - int int_value; - double dbl_value; - const char *text_value; + FreeXL_CellValue cell; int already_exists = 0; /* checking if TABLE already exists */ sprintf (sql, @@ -2684,26 +2681,24 @@ load_XL (sqlite3 * sqlite, const char *p for (col = 0; col < columns; col++) { ret = - freexl_get_cell_value (xl_handle, 0, col, &type, - &int_value, &dbl_value, - &text_value); + ret = freexl_get_cell_value (xl_handle, 0, col, &cell); if (ret != FREEXL_OK) sprintf (dummyName, "col_%d", col); else { - if (type == FREEXL_CELL_INT) - sprintf (dummyName, "%d", int_value); - else if (type == FREEXL_CELL_DOUBLE) - sprintf (dummyName, "%1.2f", dbl_value); - else if (type == FREEXL_CELL_TEXT - || type == FREEXL_CELL_SST_TEXT - || type == FREEXL_CELL_DATE - || type == FREEXL_CELL_DATETIME - || type == FREEXL_CELL_TIME) + if (cell.type == FREEXL_CELL_INT) + sprintf (dummyName, "%d", cell.value.int_value); + else if (cell.type == FREEXL_CELL_DOUBLE) + sprintf (dummyName, "%1.2f", cell.value.double_value); + else if (cell.type == FREEXL_CELL_TEXT + || cell.type == FREEXL_CELL_SST_TEXT + || cell.type == FREEXL_CELL_DATE + || cell.type == FREEXL_CELL_DATETIME + || cell.type == FREEXL_CELL_TIME) { - int len = strlen (text_value); + int len = strlen (cell.value.text_value); if (len < 256) - strcpy (dummyName, text_value); + strcpy (dummyName, cell.value.text_value); else sprintf (dummyName, "col_%d", col); } @@ -2745,25 +2740,24 @@ load_XL (sqlite3 * sqlite, const char *p if (first_titles) { ret = - freexl_get_cell_value (xl_handle, 0, col, &type, &int_value, - &dbl_value, &text_value); + freexl_get_cell_value (xl_handle, 0, col, &cell); if (ret != FREEXL_OK) sprintf (dummyName, "col_%d", col); else { - if (type == FREEXL_CELL_INT) - sprintf (dummyName, "%d", int_value); - else if (type == FREEXL_CELL_DOUBLE) - sprintf (dummyName, "%1.2f", dbl_value); - else if (type == FREEXL_CELL_TEXT - || type == FREEXL_CELL_SST_TEXT - || type == FREEXL_CELL_DATE - || type == FREEXL_CELL_DATETIME - || type == FREEXL_CELL_TIME) + if (cell.type == FREEXL_CELL_INT) + sprintf (dummyName, "%d", cell.value.int_value); + else if (cell.type == FREEXL_CELL_DOUBLE) + sprintf (dummyName, "%1.2f", cell.value.double_value); + else if (cell.type == FREEXL_CELL_TEXT + || cell.type == FREEXL_CELL_SST_TEXT + || cell.type == FREEXL_CELL_DATE + || cell.type == FREEXL_CELL_DATETIME + || cell.type == FREEXL_CELL_TIME) { - int len = strlen (text_value); + int len = strlen (cell.value.text_value); if (len < 256) - strcpy (dummyName, text_value); + strcpy (dummyName, cell.value.text_value); else sprintf (dummyName, "col_%d", col); } @@ -2810,27 +2804,26 @@ load_XL (sqlite3 * sqlite, const char *p { /* column values */ ret = - freexl_get_cell_value (xl_handle, current_row, col, &type, - &int_value, &dbl_value, &text_value); + freexl_get_cell_value (xl_handle, current_row, col, &cell); if (ret != FREEXL_OK) sqlite3_bind_null (stmt, col + 1); else { - switch (type) + switch (cell.type) { case FREEXL_CELL_INT: - sqlite3_bind_int (stmt, col + 1, int_value); + sqlite3_bind_int (stmt, col + 1, cell.value.int_value); break; case FREEXL_CELL_DOUBLE: - sqlite3_bind_double (stmt, col + 1, dbl_value); + sqlite3_bind_double (stmt, col + 1, cell.value.double_value); break; case FREEXL_CELL_TEXT: case FREEXL_CELL_SST_TEXT: case FREEXL_CELL_DATE: case FREEXL_CELL_DATETIME: case FREEXL_CELL_TIME: - sqlite3_bind_text (stmt, col + 1, text_value, - strlen (text_value), + sqlite3_bind_text (stmt, col + 1, cell.value.text_value, + strlen (cell.value.text_value), SQLITE_STATIC); break; default:
signature.asc
Description: PGP signature