[osm2pgsql] 04/08: Use --without-lockfree configure option instead of patching the source.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Feb 24 08:23:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository osm2pgsql.

commit 7a98ff78d695e9d30f45525cc45fb5150fde1af0
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Tue Feb 24 09:02:38 2015 +0100

    Use --without-lockfree configure option instead of patching the source.
---
 debian/changelog                               |  2 +
 debian/patches/boost-atomic-get_lock_for.patch | 71 --------------------------
 debian/patches/series                          |  1 -
 debian/rules                                   |  2 +-
 4 files changed, 3 insertions(+), 73 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6c3ff88..8123458 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 osm2pgsql (0.87.2-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Use --without-lockfree configure option instead of patching the
+    source.
 
  -- Bas Couwenberg <sebastic at debian.org>  Tue, 24 Feb 2015 09:01:11 +0100
 
diff --git a/debian/patches/boost-atomic-get_lock_for.patch b/debian/patches/boost-atomic-get_lock_for.patch
deleted file mode 100644
index a2a2769..0000000
--- a/debian/patches/boost-atomic-get_lock_for.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Description: Don't use lockfree queues even for Boost >= 1.53
-Author: Paul Norman
-Bug: https://github.com/openstreetmap/osm2pgsql/issues/231
-
---- a/osmdata.cpp
-+++ b/osmdata.cpp
-@@ -10,7 +10,7 @@
- #include <stdexcept>
- #include <utility>
- 
--#if BOOST_VERSION < 105300
-+#if true
- #else
- #include <boost/atomic.hpp>
- #endif
-@@ -167,7 +167,7 @@ struct pending_threaded_processor : publ
-     typedef std::vector<boost::shared_ptr<output_t> > output_vec_t;
-     typedef std::pair<boost::shared_ptr<const middle_query_t>, output_vec_t> clone_t;
- 
--#if BOOST_VERSION < 105300
-+#if true
-     static void do_jobs(output_vec_t const& outputs, pending_queue_t& queue, size_t& ids_done, boost::mutex& mutex, int append, bool ways) {
-         while (true) {
-             //get the job off the queue synchronously
-@@ -209,7 +209,7 @@ struct pending_threaded_processor : publ
- 
-     //starts up count threads and works on the queue
-     pending_threaded_processor(boost::shared_ptr<middle_query_t> mid, const output_vec_t& outs, size_t thread_count, size_t job_count, int append)
--#if BOOST_VERSION < 105300
-+#if true
-         //note that we cant hint to the stack how large it should be ahead of time
-         //we could use a different datastructure like a deque or vector but then
-         //the outputs the enqueue jobs would need the version check for the push(_back) method
-@@ -256,7 +256,7 @@ struct pending_threaded_processor : publ
- 
-         //make the threads and start them
-         for (size_t i = 0; i < clones.size(); ++i) {
--#if BOOST_VERSION < 105300
-+#if true
-             workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), boost::ref(mutex), append, true));
- #else
-             workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), append, true));
-@@ -307,7 +307,7 @@ struct pending_threaded_processor : publ
- 
-         //make the threads and start them
-         for (size_t i = 0; i < clones.size(); ++i) {
--#if BOOST_VERSION < 105300
-+#if true
-             workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), boost::ref(mutex), append, false));
- #else
-             workers.create_thread(boost::bind(do_jobs, boost::cref(clones[i].second), boost::ref(queue), boost::ref(ids_done), append, false));
-@@ -353,7 +353,7 @@ private:
-     //job queue
-     pending_queue_t queue;
- 
--#if BOOST_VERSION < 105300
-+#if true
-     //how many ids within the job have been processed
-     size_t ids_done;
-     //so the threads can manage some of the shared state
---- a/output.hpp
-+++ b/output.hpp
-@@ -20,7 +20,7 @@
- #include <utility>
- 
- typedef std::pair<osmid_t, size_t> pending_job_t;
--#if BOOST_VERSION < 105300
-+#if true
- #include <stack>
- typedef std::stack<pending_job_t> pending_queue_t;
- #else
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index a4ea8d5..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-boost-atomic-get_lock_for.patch
diff --git a/debian/rules b/debian/rules
index bb85281..e15cc8b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@ CXXFLAGS += $(CPPFLAGS)
 		--parallel
 
 override_dh_auto_configure:
-	dh_auto_configure -- CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)"
+	dh_auto_configure -- --without-lockfree CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)"
 
 override_dh_auto_test:
 	dh_auto_test || echo "Ignoring test failures"

-- 
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