[digikam] update boost patch
nucleo
nucleo at fedoraproject.org
Fri Jan 6 22:47:02 UTC 2012
commit 3a14799b34dd74eaf4b41d2b6a94a218dcfa6fa7
Author: nucleo <nucleo at fedoraproject.org>
Date: Sat Jan 7 00:46:54 2012 +0200
update boost patch
digikam-2.5.0-boost-1.48.patch | 75 +++++++++++++++-------------------------
digikam.spec | 19 +++++-----
2 files changed, 37 insertions(+), 57 deletions(-)
---
diff --git a/digikam-2.5.0-boost-1.48.patch b/digikam-2.5.0-boost-1.48.patch
index 1d0afd0..25f7397 100644
--- a/digikam-2.5.0-boost-1.48.patch
+++ b/digikam-2.5.0-boost-1.48.patch
@@ -1,42 +1,17 @@
-diff --git a/libs/database/imagehistory/imagehistorygraph_boost.h b/libs/database/imagehistory/imagehistorygraph_boost.h
-index 6ffccce..52162e9 100644
+From: Gilles Caulier <caulier.gilles at gmail.com>
+Date: Fri, 06 Jan 2012 10:23:48 +0000
+Subject: Apply patch #67483 from Jeremiah Willcock to compile fine digiKam boost graph interface with libboost 1.48
+X-Git-Url: http://quickgit.kde.org/?p=digikam.git&a=commitdiff&h=d18ea6da2d3e2359f4113e83c3fd40c18a29ddab
+---
+Apply patch #67483 from Jeremiah Willcock to compile fine digiKam boost graph interface with libboost 1.48
+BUGS: 287772
+CCBUGS: 267777
+---
+
+
--- a/libs/database/imagehistory/imagehistorygraph_boost.h
+++ b/libs/database/imagehistory/imagehistorygraph_boost.h
-@@ -34,6 +34,7 @@
-
- #include <utility>
- #include <algorithm>
-+#include <boost/version.hpp>
- #include <boost/graph/transitive_closure.hpp>
- #include <boost/graph/adjacency_list.hpp>
- #include <boost/graph/topological_sort.hpp>
-@@ -188,6 +189,9 @@ public:
-
- Edge() : null(true) {}
- Edge(const edge_t& e) : e(e), null(false) {}
-+#if BOOST_VERSION >= 104700
-+ Edge(const boost::detail::reverse_graph_edge_descriptor<edge_t>& e) : e(e.underlying_desc), null(false) {}
-+#endif
-
- Edge& operator=(const edge_t& other)
- {
-@@ -1049,6 +1053,15 @@ protected:
- return toList<Edge, range_t>(range);
- }
-
-+ template <class GraphType>
-+ class edge_desc_maker {
-+ public:
-+ template <typename range_t> static QList<typename boost::graph_traits<GraphType>::edge_descriptor> toEdgeDescList(const range_t& range)
-+ {
-+ return toList<typename boost::graph_traits<GraphType>::edge_descriptor, range_t>(range);
-+ }
-+ };
-+
- template <typename range_t>
- static bool isEmptyRange(const range_t& range)
- {
-@@ -1198,7 +1211,7 @@ protected:
+@@ -1198,7 +1198,7 @@ protected:
{
boost::dag_shortest_paths(graph, v,
// we provide a constant weight of 1
@@ -45,7 +20,7 @@ index 6ffccce..52162e9 100644
// Store distance and predecessors in QMaps, wrapped to serve as property maps
distance_map(VertexIntMapAdaptor(distances)).
predecessor_map(VertexVertexMapAdaptor(predecessors))
-@@ -1218,7 +1231,7 @@ protected:
+@@ -1218,7 +1218,7 @@ protected:
{
boost::dag_shortest_paths(graph, v,
// we provide a constant weight of 1
@@ -54,42 +29,48 @@ index 6ffccce..52162e9 100644
// Invert the default compare method: With greater, we get the longest path
distance_compare(std::greater<int>()).
// will be returned if a node is unreachable
-@@ -1389,9 +1402,10 @@ protected:
+@@ -1384,14 +1384,15 @@ protected:
+ template <class GraphType, typename VertexLessThan>
+ class lessThanMapEdgeToTarget
+ {
++ typedef typename boost::graph_traits<GraphType>::edge_descriptor edge_descriptor;
+ public:
+ lessThanMapEdgeToTarget(const GraphType& g, VertexLessThan vertexLessThan)
: g(g), vertexLessThan(vertexLessThan) {}
const GraphType& g;
VertexLessThan vertexLessThan;
- bool operator()(const Edge& a, const Edge& b)
-+ bool operator()(const typename boost::graph_traits<GraphType>::edge_descriptor& a,
-+ const typename boost::graph_traits<GraphType>::edge_descriptor& b)
++ bool operator()(const edge_descriptor& a, const edge_descriptor& b)
{
- return vertexLessThan(boost::target(a.toEdge(), g), boost::target(b.toEdge(), g));
+ return vertexLessThan(boost::target(a, g), boost::target(b, g));
}
};
-@@ -1402,20 +1416,21 @@ protected:
+@@ -1402,20 +1403,21 @@ protected:
{
typedef std::pair<Vertex, QList<Edge> > VertexInfo;
- QList<Edge> outEdges;
-+ QList<typename boost::graph_traits<IncidenceGraph>::edge_descriptor> outEdges;
++ typedef typename boost::graph_traits<IncidenceGraph>::edge_descriptor edge_descriptor;
++ QList<edge_descriptor> outEdges;
std::vector<VertexInfo> stack;
boost::put(color, u, boost::gray_color);
vis.discover_vertex(u, g);
- outEdges = toEdgeList(boost::out_edges(u, g));
-+ outEdges = edge_desc_maker<IncidenceGraph>::toEdgeDescList(boost::out_edges(u, g));
++ outEdges = toList<edge_descriptor>(boost::out_edges(u, g));
// Sort edges. The lessThan we have takes vertices, so we use a lessThan which
// maps the given edges to their targets, and calls our vertex lessThan.
qSort(outEdges.begin(), outEdges.end(), lessThanMapEdgeToTarget<IncidenceGraph, LessThan>(g, lessThan));
- foreach(const Edge& e, outEdges)
-+ foreach(const typename boost::graph_traits<IncidenceGraph>::edge_descriptor& ed, outEdges)
++ foreach(const edge_descriptor& e, outEdges)
{
- Vertex v = boost::target(e.toEdge(), g);
-+ Edge e = ed;
-+ Vertex v = boost::target(ed, g);
++ Vertex v = boost::target(e, g);
vis.examine_edge(e, g);
boost::default_color_type v_color = boost::get(color, v);
if (v_color == boost::white_color)
+
diff --git a/digikam.spec b/digikam.spec
index 0d67344..0735ae5 100644
--- a/digikam.spec
+++ b/digikam.spec
@@ -1,7 +1,7 @@
Name: digikam
Version: 2.5.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A digital camera accessing & photo management application
License: GPLv2+
@@ -22,9 +22,6 @@ Patch0: digikam-2.5.0-clapack-atlas.patch
# fix gcc-4.7.0 build https://bugs.kde.org/show_bug.cgi?id=290642#c3
Patch1: digikam-2.5.0-gcc-4.7.0.patch
-# fix build against boost-1.48 https://bugs.kde.org/show_bug.cgi?id=287772#c22
-Patch2: digikam-2.5.0-boost-1.48.patch
-
## upstreamable patches
# move dngconverter icons oxygen->hicolor so visible outside of kde
Patch50: digikam-2.4.1-dngconverter_hicolor_icons.patch
@@ -33,6 +30,10 @@ Patch50: digikam-2.4.1-dngconverter_hicolor_icons.patch
# http://commits.kde.org/digikam/25cc9c9876a5233bd630105d0110319892d4e18c
Patch100: digikam-2.5.0-libkipi-1.4.0.patch
+# fix build against boost-1.48
+# http://commits.kde.org/digikam/d18ea6da2d3e2359f4113e83c3fd40c18a29ddab
+Patch101: digikam-2.5.0-boost-1.48.patch
+
# for clapack, see also the clapack-atlas patch
BuildRequires: atlas-devel
BuildRequires: desktop-file-utils
@@ -207,18 +208,13 @@ Requires: kipi-plugins = %{version}-%{release}
%patch0 -p1 -b .clapack-atlas
%patch1 -p1 -b .gcc-4.7.0
-%if 0%{?fedora} > 16
-pushd core
-%patch2 -p1 -b .boost-1.48
-popd
-%endif
-
mv extra/kipi-plugins/dngconverter/icons/oxygen \
extra/kipi-plugins/dngconverter/icons/hicolor
%patch50 -p1 -b .dngconverter_hicolor_icons
pushd core
%patch100 -p1 -b .libkipi-1.4.0
+%patch101 -p1 -b .boost-1.48
popd
%build
@@ -495,6 +491,9 @@ update-desktop-database -q &> /dev/null
%changelog
+* Sat Jan 7 2012 Alexey Kurov <nucleo at fedoraproject.org> - 2.5.0-3
+- update boost patch
+
* Thu Jan 5 2012 Alexey Kurov <nucleo at fedoraproject.org> - 2.5.0-2
- fix build with gcc-4.7.0 (kde#290642) and boost-1.48 (kde#287772)
More information about the scm-commits
mailing list