retitle 698341 pu: package spatialite/3.0.0~beta20110817-3+deb7u1 user 698341 release.debian....@packages.debian.org usertags 698341 = pu thanks
Hello RT, let's try to fix this instead of going for removal. I've applied the debdiff prepared by Felix Geyer in #683075 [0], and checked that it compiles fine in wheezy. In any case, I'm attaching the final diff (modulo s/UNRELEASED/testing-proposed-updates/) to this email. The other bug afflicting spatialite is #664547. To fix this, we need to split some huge file (I guess it's spatialite.c, 17k+ LOC) into smaller files, so that gcc doesn't die on some arches. Would you be ok with such a huge patch? Kindly, David [0]: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683075#44 -- . ''`. 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
diff --git a/debian/changelog b/debian/changelog index be5e24a..35c1a73 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +spatialite (3.0.0~beta20110817-3+deb7u1) UNRELEASED; urgency=low + + [ Felix Geyer ] + * Fix FTBFS in wheezy. (Closes: #683075) + - Add 05-fix_libgeos_search.patch from Evgeni Golov to fix configure checks. + - Add 06-freexl_compat.patch to restore compatibility with freexl in wheezy. + + -- David Paleino <da...@debian.org> Sat, 19 Jan 2013 08:51:49 +0100 + spatialite (3.0.0~beta20110817-3) unstable; urgency=medium [ Francesco Paolo Lovergine ] diff --git a/debian/patches/05-fix_libgeos_search.patch b/debian/patches/05-fix_libgeos_search.patch new file mode 100644 index 0000000..a048771 --- /dev/null +++ b/debian/patches/05-fix_libgeos_search.patch @@ -0,0 +1,74 @@ +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= diff --git a/debian/patches/06-freexl_compat.patch b/debian/patches/06-freexl_compat.patch new file mode 100644 index 0000000..6b877aa --- /dev/null +++ b/debian/patches/06-freexl_compat.patch @@ -0,0 +1,390 @@ +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: diff --git a/debian/patches/series b/debian/patches/series index 95d71db..6915248 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,5 @@ 02-fix_version-info.patch 03-fix_typos.patch 04-fix_missing_define.patch +05-fix_libgeos_search.patch +06-freexl_compat.patch
signature.asc
Description: PGP signature