make gdal compatible with sqlite 3.8.7
This commit is contained in:
63
mingw-w64-gdal/01-sqlite387-r27950.patch
Normal file
63
mingw-w64-gdal/01-sqlite387-r27950.patch
Normal file
@@ -0,0 +1,63 @@
|
||||
--- a/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp (revision 27729)
|
||||
+++ b/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp (revision 27950)
|
||||
@@ -36,4 +36,23 @@
|
||||
#ifdef HAVE_SQLITE_VFS
|
||||
|
||||
+/************************************************************************/
|
||||
+/* OGR2SQLITE_Register() */
|
||||
+/************************************************************************/
|
||||
+
|
||||
+CPL_C_START
|
||||
+int CPL_DLL OGR2SQLITE_static_register (sqlite3* hDB, char **pzErrMsg, void* pApi);
|
||||
+CPL_C_END
|
||||
+
|
||||
+/* We call this function so that each time a db is created, */
|
||||
+/* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */
|
||||
+/* structure with the right pointers. */
|
||||
+/* We need to declare this function before including sqlite3ext.h, since */
|
||||
+/* sqlite 3.8.7, sqlite3_auto_extension can be a macro (#5725) */
|
||||
+
|
||||
+void OGR2SQLITE_Register()
|
||||
+{
|
||||
+ sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register);
|
||||
+}
|
||||
+
|
||||
#define VIRTUAL_OGR_DYNAMIC_EXTENSION_ENABLED
|
||||
//#define DEBUG_OGR2SQLITE
|
||||
@@ -2401,16 +2420,11 @@
|
||||
/************************************************************************/
|
||||
|
||||
-CPL_C_START
|
||||
-int CPL_DLL OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg,
|
||||
- const sqlite3_api_routines * pApi);
|
||||
-CPL_C_END
|
||||
-
|
||||
#ifndef WIN32
|
||||
extern const struct sqlite3_api_routines OGRSQLITE_static_routines;
|
||||
#endif
|
||||
|
||||
-int OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg,
|
||||
- const sqlite3_api_routines * pApi)
|
||||
-{
|
||||
+int OGR2SQLITE_static_register (sqlite3 * hDB, char **pzErrMsg, void * _pApi)
|
||||
+{
|
||||
+ const sqlite3_api_routines * pApi = (const sqlite3_api_routines * )_pApi;
|
||||
#ifndef WIN32
|
||||
if( pApi->create_module == NULL )
|
||||
@@ -2448,16 +2462,3 @@
|
||||
}
|
||||
|
||||
-/************************************************************************/
|
||||
-/* OGR2SQLITE_Register() */
|
||||
-/************************************************************************/
|
||||
-
|
||||
-/* We call this function so that each time a db is created, */
|
||||
-/* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */
|
||||
-/* structure with the right pointers. */
|
||||
-
|
||||
-void OGR2SQLITE_Register()
|
||||
-{
|
||||
- sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register);
|
||||
-}
|
||||
-
|
||||
#endif // HAVE_SQLITE_VFS
|
||||
@@ -6,7 +6,7 @@
|
||||
_realname=gdal
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.11.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A translator library for raster geospatial data formats (mingw-w64)"
|
||||
arch=('any')
|
||||
url="http://www.gdal.org/"
|
||||
@@ -22,11 +22,14 @@ depends=("${MINGW_PACKAGE_PREFIX}-geos" "${MINGW_PACKAGE_PREFIX}-curl" "${MINGW_
|
||||
"${MINGW_PACKAGE_PREFIX}-postgresql" "${MINGW_PACKAGE_PREFIX}-xerces-c")
|
||||
options=(strip)
|
||||
|
||||
source=(http://download.osgeo.org/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz)
|
||||
sha256sums=('f46b5944a8cabc8516673f231f466131cdfd2cdc6677dbee5d96ec7fc58a3340')
|
||||
source=(http://download.osgeo.org/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.gz
|
||||
01-sqlite387-r27950.patch)
|
||||
sha256sums=('f46b5944a8cabc8516673f231f466131cdfd2cdc6677dbee5d96ec7fc58a3340'
|
||||
'be80696d6520d7a6c8fda0b3fc3f66c8b3415c371f76c8e2bfb63d3a544b1c1e')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realname}-$pkgver"
|
||||
patch -p1 -i ${srcdir}/01-sqlite387-r27950.patch
|
||||
sed -i "s|/usr/local|${MINGW_PREFIX}|g" configure.in
|
||||
sed -i "s|/usr|${MINGW_PREFIX}|g" configure.in
|
||||
sed -i "s|mandir='\${prefix}/man'|mandir='\${prefix}/share/man'|g" configure.in
|
||||
@@ -68,4 +71,4 @@ package () {
|
||||
|
||||
# install license
|
||||
install -D -m644 LICENSE.TXT "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user