Commit d951c831 authored by J0WI's avatar J0WI Committed by Leo
Browse files

community/aspcud: fix build with boost 1.74

parent 53d8f708
......@@ -2,7 +2,7 @@
# Maintainer: Anil Madhavapeddy <anil@recoil.org>
pkgname=aspcud
pkgver=1.9.4
pkgrel=4
pkgrel=5
pkgdesc="Package dependency solver"
url="https://potassco.org/aspcud/"
arch="all"
......@@ -10,7 +10,8 @@ license="MIT"
depends="boost clingo"
makedepends="boost-dev cmake re2c"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/potassco/aspcud/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/potassco/aspcud/archive/v$pkgver.tar.gz
boost-1.74.patch"
build() {
cmake -B build . \
......@@ -25,4 +26,5 @@ package() {
make -C build DESTDIR="$pkgdir" install
}
sha512sums="6bb04fca0d5df1bfc2d34974386899821790154e10e988dfd34ceada005970ac8dd0bec560b35e20195aa529ac7f73baa07c7d81d9744127e57afece04b2e574 aspcud-1.9.4.tar.gz"
sha512sums="6bb04fca0d5df1bfc2d34974386899821790154e10e988dfd34ceada005970ac8dd0bec560b35e20195aa529ac7f73baa07c7d81d9744127e57afece04b2e574 aspcud-1.9.4.tar.gz
16a95c6af101e076491c61dd9c2bb1c28776e9309c585f38768525d716f1e1fc66d837ac4c3605535430fda966a28a2ea7b67f28419c1e2f918f5f270c898014 boost-1.74.patch"
From 1cc58571dce6487a5dc78cc2203ad09b1c7b60d5 Mon Sep 17 00:00:00 2001
From: Roland Kaminski <kaminski@cs.uni-potsdam.de>
Date: Tue, 17 Nov 2020 16:00:37 +0100
Subject: [PATCH] fix for boost 1.74
---
libcudf/cudf/dependency.hh | 2 +-
libcudf/src/dependency.cpp | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libcudf/cudf/dependency.hh b/libcudf/cudf/dependency.hh
index 7faf1cb..d6c0f4d 100644
--- a/libcudf/cudf/dependency.hh
+++ b/libcudf/cudf/dependency.hh
@@ -186,6 +186,7 @@ public:
void addEdges(Package *a, PackageList const &neighbors);
void init(bool verbose);
void dump(Dependency *dep, std::ostream &out);
+ bool edgeSort(Package *a, Package *b);
private:
void components_(bool verbose);
void cliques_(bool verbose);
@@ -196,7 +197,6 @@ private:
struct PkgHash {
size_t operator()(Package *pkg) const;
};
- bool edgeSort(Package *a, Package *b);
typedef boost::unordered_map<Package*, PackageList, ConflictGraph::PkgHash> Edges;
typedef boost::unordered_set<std::pair<Package*, Package*> > EdgeSet;
EdgeSet edgeSet_;
diff --git a/libcudf/src/dependency.cpp b/libcudf/src/dependency.cpp
index 8773de7..b0d542c 100644
--- a/libcudf/src/dependency.cpp
+++ b/libcudf/src/dependency.cpp
@@ -462,6 +462,13 @@ void ConflictGraph::components_(bool verbose) {
}
}
+struct EdgeCmp {
+ ConflictGraph *g;
+ bool operator()(Package *a, Package *b) const {
+ return g->edgeSort(a, b);
+ }
+};
+
void ConflictGraph::cliques_(bool verbose) {
uint32_t min = 0, max = 0, sum = 0;
for (PackageList &component : components) {
@@ -473,7 +480,8 @@ void ConflictGraph::cliques_(bool verbose) {
}
else {
PackageList candidates = component, next;
- boost::sort(candidates, boost::bind(&ConflictGraph::edgeSort, this, _1, _2));
+ EdgeCmp cmp = {this};
+ boost::sort(candidates, cmp);
// TODO: sort by out-going edges
do {
cliques.push_back(PackageList());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment