[osm2pgsql] 01/02: Add patches for protobuf-c 1.0.0 support.
Bas Couwenberg
sebastic at xs4all.nl
Sat Jul 26 11:41:28 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository osm2pgsql.
commit 67a8a9e1baa7a69800bd011f588cdc785d590c77
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Jul 26 13:20:53 2014 +0200
Add patches for protobuf-c 1.0.0 support.
Thanks to Robert Edmonds for the patches.
---
debian/changelog | 8 +++++
debian/control | 2 +-
.../03-fix-build-for-protobuf-c-1.0.0.patch | 15 ++++++++++
.../04-api-changes-for-protobuf-c-1.0.0.patch | 34 ++++++++++++++++++++++
debian/patches/series | 2 ++
5 files changed, 60 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 26e69a9..eab9cae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+osm2pgsql (0.84.0-2) UNRELEASED; urgency=medium
+
+ * Add patches for protobuf-c 1.0.0 support.
+ Thanks to Robert Edmonds for the patches.
+ (closes: #755553)
+
+ -- Bas Couwenberg <sebastic at xs4all.nl> Sat, 26 Jul 2014 13:19:43 +0200
+
osm2pgsql (0.84.0-1) unstable; urgency=low
* New upstream release.
diff --git a/debian/control b/debian/control
index 65963e1..634e638 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 9),
libpq-dev,
libxml2-dev,
libproj-dev,
- libprotobuf-c0-dev (>= 0.14),
+ libprotobuf-c-dev | libprotobuf-c0-dev (>= 0.14),
protobuf-c-compiler,
liblua5.2-dev,
lua5.2
diff --git a/debian/patches/03-fix-build-for-protobuf-c-1.0.0.patch b/debian/patches/03-fix-build-for-protobuf-c-1.0.0.patch
new file mode 100644
index 0000000..2bb7f07
--- /dev/null
+++ b/debian/patches/03-fix-build-for-protobuf-c-1.0.0.patch
@@ -0,0 +1,15 @@
+Description: Fix FTBFS with protobuf-c >= 1.0.0
+Applied-Upstream: https://github.com/openstreetmap/osm2pgsql/commit/8c7c6dbb319e97715b174edd081303174c96b03b
+--- a/m4/ax_lib_protobuf_c.m4
++++ b/m4/ax_lib_protobuf_c.m4
+@@ -207,7 +207,9 @@ AC_DEFUN([AX_LIB_PROTOBUF_C],
+ CFLAGS="$CFLAGS $PROTOBUF_C_CFLAGS"
+ AX_COMPARE_VERSION([$protobuf_c_wanted_version], [ge], [0.14],
+ [AC_CHECK_MEMBER([ProtobufCFieldDescriptor.packed],,
+- [protobuf_c_version_ok="no"],
++ [AC_CHECK_MEMBER([ProtobufCFieldDescriptor.flags],,
++ [protobuf_c_version_ok="no"],
++ [[#include <protobuf-c/protobuf-c.h>]])],
+ [[#include <google/protobuf-c/protobuf-c.h>]
+ ])
+ ])
diff --git a/debian/patches/04-api-changes-for-protobuf-c-1.0.0.patch b/debian/patches/04-api-changes-for-protobuf-c-1.0.0.patch
new file mode 100644
index 0000000..cc5a1a0
--- /dev/null
+++ b/debian/patches/04-api-changes-for-protobuf-c-1.0.0.patch
@@ -0,0 +1,34 @@
+Description: Update for API changes in protobuf-c >= 1.0.0
+Author: Robert Edmonds <edmonds at debian.org>
+Forwarded: https://github.com/openstreetmap/osm2pgsql/issues/129
+--- a/parse-pbf.c
++++ b/parse-pbf.c
+@@ -258,7 +258,7 @@ int processOsmHeader(void *data, size_t length)
+ return 0;
+ }
+
+- header_block__free_unpacked (hmsg, &protobuf_c_system_allocator);
++ header_block__free_unpacked (hmsg, NULL);
+
+ return 1;
+ }
+@@ -541,7 +541,7 @@ int processOsmData(struct osmdata_t *osmdata, void *data, size_t length)
+ if (!processOsmDataRelations(osmdata, group, string_table)) return 0;
+ }
+
+- primitive_block__free_unpacked (pmsg, &protobuf_c_system_allocator);
++ primitive_block__free_unpacked (pmsg, NULL);
+
+ return 1;
+ }
+@@ -606,8 +606,8 @@ int streamFilePbf(char *filename, int sanitize UNUSED, struct osmdata_t *osmdata
+ }
+ }
+
+- blob__free_unpacked (blob_msg, &protobuf_c_system_allocator);
+- block_header__free_unpacked (header_msg, &protobuf_c_system_allocator);
++ blob__free_unpacked (blob_msg, NULL);
++ block_header__free_unpacked (header_msg, NULL);
+ } while (!feof(input));
+
+ if (!feof(input)) {
diff --git a/debian/patches/series b/debian/patches/series
index dfe8cd1..127af71 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
00-fix_build.patch
01-hyphen-used-as-minus-sign.patch
02-spelling-error-in-manpage.patch
+03-fix-build-for-protobuf-c-1.0.0.patch
+04-api-changes-for-protobuf-c-1.0.0.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osm2pgsql.git
More information about the Pkg-grass-devel
mailing list