Bas Couwenberg pushed to branch experimental at Debian GIS Project / fiona
Commits: 1f6ab848 by Bas Couwenberg at 2024-07-03T18:30:33+02:00 Add upstream patch to fix FTBFS with GCC 14. (closes: #1074959) - - - - - 3 changed files: - debian/changelog - + debian/patches/pr1404-gcc13.patch - debian/patches/series Changes: ===================================== debian/changelog ===================================== @@ -1,6 +1,9 @@ fiona (1.10~b1-1~exp2) UNRELEASED; urgency=medium + * Team upload. * Ignore test failures on mips64el. + * Add upstream patch to fix FTBFS with GCC 14. + (closes: #1074959) -- Bas Couwenberg <[email protected]> Wed, 17 Apr 2024 12:22:05 +0200 ===================================== debian/patches/pr1404-gcc13.patch ===================================== @@ -0,0 +1,80 @@ +Description: Use CSLConstList ctypedef where appropriate +Author: Sean Gillies <[email protected]> +Origin: https://github.com/Toblerity/Fiona/pull/1404 +Bug: https://github.com/Toblerity/Fiona/issues/1365 + +--- a/fiona/ogrext.pyx ++++ b/fiona/ogrext.pyx +@@ -376,7 +376,7 @@ cdef class StringListField(AbstractField + for item in value: + item_b = item.encode(encoding) + string_list = CSLAddString(string_list, <const char *>item_b) +- OGR_F_SetFieldStringList(feature, i, <const char **>string_list) ++ OGR_F_SetFieldStringList(feature, i, <CSLConstList>string_list) + + + cdef class JSONField(AbstractField): +@@ -1264,7 +1264,7 @@ cdef class Session: + + cdef char **metadata = NULL + metadata = GDALGetMetadata(obj, domain) +- num_items = CSLCount(metadata) ++ num_items = CSLCount(<CSLConstList>metadata) + + return dict(metadata[i].decode('utf-8').split('=', 1) for i in range(num_items)) + +@@ -2175,7 +2175,7 @@ def _listdir(path): + raise FionaValueError(f"Path '{path}' is not a directory.") + + papszFiles = VSIReadDir(path_c) +- n = CSLCount(papszFiles) ++ n = CSLCount(<CSLConstList>papszFiles) + files = [] + for i in range(n): + files.append(papszFiles[i].decode("utf-8")) +--- a/fiona/gdal.pxi ++++ b/fiona/gdal.pxi +@@ -16,18 +16,22 @@ cdef extern from "cpl_conv.h": + const char *CPLFindFile(const char *pszClass, const char *pszBasename) + + ++cdef extern from "cpl_port.h": ++ ctypedef char **CSLConstList ++ ++ + cdef extern from "cpl_string.h": +- char ** CSLAddNameValue (char **list, const char *name, const char *value) +- char ** CSLSetNameValue (char **list, const char *name, const char *value) +- void CSLDestroy (char **list) ++ char ** CSLAddNameValue(char **list, const char *name, const char *value) ++ char ** CSLSetNameValue(char **list, const char *name, const char *value) ++ void CSLDestroy(char **list) + char ** CSLAddString(char **list, const char *string) +- int CSLCount(char **papszStrList) +- char **CSLDuplicate(char **papszStrList) +- int CSLFindName(char **papszStrList, const char *pszName) +- int CSLFindString(char **papszStrList, const char *pszString) +- int CSLFetchBoolean(char **papszStrList, const char *pszName, int default) +- const char *CSLFetchNameValue(char **papszStrList, const char *pszName) +- char **CSLMerge(char **first, char **second) ++ int CSLCount(CSLConstList papszStrList) ++ char **CSLDuplicate(CSLConstList papszStrList) ++ int CSLFindName(CSLConstList papszStrList, const char *pszName) ++ int CSLFindString(CSLConstList papszStrList, const char *pszString) ++ int CSLFetchBoolean(CSLConstList papszStrList, const char *pszName, int default) ++ const char *CSLFetchNameValue(CSLConstList papszStrList, const char *pszName) ++ char **CSLMerge(char **first, CSLConstList second) + + + cdef extern from "cpl_error.h" nogil: +--- a/fiona/_vsiopener.pyx ++++ b/fiona/_vsiopener.pyx +@@ -36,7 +36,7 @@ _OPEN_FILE_EXIT_STACKS.set({}) + cdef int install_pyopener_plugin(VSIFilesystemPluginCallbacksStruct *callbacks_struct): + """Install handlers for python file openers if it isn't already installed.""" + cdef char **registered_prefixes = VSIGetFileSystemsPrefixes() +- cdef int prefix_index = CSLFindString(registered_prefixes, PREFIX_BYTES) ++ cdef int prefix_index = CSLFindString(<CSLConstList>registered_prefixes, PREFIX_BYTES) + CSLDestroy(registered_prefixes) + + if prefix_index < 0: ===================================== debian/patches/series ===================================== @@ -1,2 +1,3 @@ 0001-Rename-fio-command-to-fiona-to-avoid-name-clash.patch test_drvsupport.patch +pr1404-gcc13.patch View it on GitLab: https://salsa.debian.org/debian-gis-team/fiona/-/commit/1f6ab8484ef57fa437db4d07ef7683109de27a10 -- This project does not include diff previews in email notifications. View it on GitLab: https://salsa.debian.org/debian-gis-team/fiona/-/commit/1f6ab8484ef57fa437db4d07ef7683109de27a10 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ Pkg-grass-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel
