[SCM] grounding tools for (disjunctive) logic programs branch, master, updated. 4f811237c40819e8376aae1f1e72c4e5443e1aed

Thomas Krennwallner tkren at kr.tuwien.ac.at
Tue Apr 10 14:54:19 UTC 2012


The following commit has been merged in the master branch:
commit 93d86ab659377602e05181e6634e74f37b75a0e0
Author: Thomas Krennwallner <tkren at kr.tuwien.ac.at>
Date:   Tue Apr 10 15:23:24 2012 +0200

    Bug fix: "ftbfs with GCC-4.7", thanks to Matthias Klose (Closes: #667193).

diff --git a/debian/changelog b/debian/changelog
index 79e0ebc..84e1860 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+gringo (3.0.4-2) unstable; urgency=low
+
+  * debian/patches/gringo-clang-gcc.patch: New file originally from
+    https://potassco.svn.sourceforge.net/svnroot/potassco/tags/gringo-3.0.4/patches/patch-clang.diff.
+  * Bug fix: "ftbfs with GCC-4.7", thanks to Matthias Klose (Closes:
+    #667193).
+
+ -- Thomas Krennwallner <tkren at kr.tuwien.ac.at>  Tue, 10 Apr 2012 15:21:16 +0200
+
 gringo (3.0.4-1ubuntu1~oneiric1) oneiric; urgency=low
 
   * Upload to ppa:~tkren/asp.
diff --git a/debian/patches/gringo-clang-gcc.patch b/debian/patches/gringo-clang-gcc.patch
new file mode 100644
index 0000000..87c0597
--- /dev/null
+++ b/debian/patches/gringo-clang-gcc.patch
@@ -0,0 +1,258 @@
+Description: Fix FTBFS with g++ 4.7 and clang
+Forwarded: http://sourceforge.net/tracker/?func=detail&atid=1107486&aid=3516305&group_id=238741
+Bug-Debian: http://bugs.debian.org/667193
+Origin: upstream, https://potassco.svn.sourceforge.net/svnroot/potassco/tags/gringo-3.0.4/patches/patch-clang.diff
+Author: Roland Kaminski <kaminski at cs.uni-potsdam.de>
+Last-Update: 2012-03-01
+
+Index: libgringo/gringo/term.h
+===================================================================
+--- libgringo/gringo/term.h	(revision 5216)
++++ libgringo/gringo/term.h	(working copy)
+@@ -64,8 +64,11 @@
+ 	virtual ~Term() { }
+ };
+ 
+-inline Term* new_clone(const Term& a)
++namespace boost
+ {
+-	return a.clone();
++	template <>
++	inline Term* new_clone(const Term& a)
++	{
++		return a.clone();
++	}
+ }
+-
+Index: libgringo/gringo/varterm.h
+===================================================================
+--- libgringo/gringo/varterm.h	(revision 5216)
++++ libgringo/gringo/varterm.h	(working copy)
+@@ -45,8 +45,11 @@
+ 	uint32_t local_ : 1;
+ };
+ 
+-inline VarTerm* new_clone(const VarTerm& a)
++namespace boost
+ {
+-	return static_cast<VarTerm*>(a.clone());
++	template<>
++	inline VarTerm* new_clone(const VarTerm& a)
++	{
++		return static_cast<VarTerm*>(a.clone());
++	}
+ }
+-
+Index: libgringo/gringo/clone_ptr.h
+===================================================================
+--- libgringo/gringo/clone_ptr.h	(revision 5216)
++++ libgringo/gringo/clone_ptr.h	(working copy)
+@@ -17,6 +17,8 @@
+ 
+ #pragma once
+ 
++#include <boost/ptr_container/clone_allocator.hpp>
++
+ template<typename T>
+ class clone_ptr
+ {
+@@ -50,7 +52,7 @@
+ 
+ template<typename T>
+ inline clone_ptr<T>::clone_ptr(const clone_ptr<T> &ptr)
+-	: ptr_(ptr.get() ? new_clone(*ptr.get()) : 0)
++	: ptr_(ptr.get() ? boost::new_clone(*ptr.get()) : 0)
+ {
+ }
+ 
+Index: libgringo/gringo/aggrlit.h
+===================================================================
+--- libgringo/gringo/aggrlit.h	(revision 5216)
++++ libgringo/gringo/aggrlit.h	(working copy)
+@@ -118,9 +118,13 @@
+ 	clone_ptr<Term> weight_;
+ };
+ 
+-inline WeightLit* new_clone(const WeightLit& a)
++namespace boost
+ {
+-	return static_cast<WeightLit*>(a.clone());
++	template <>
++	inline WeightLit* new_clone(const WeightLit& a)
++	{
++		return static_cast<WeightLit*>(a.clone());
++	}
+ }
+ 
+ class CondLit : public Groundable, public Locateable
+Index: libgringo/gringo/parser.h
+===================================================================
+--- libgringo/gringo/parser.h	(revision 5216)
++++ libgringo/gringo/parser.h	(working copy)
+@@ -21,6 +21,7 @@
+ #include <gringo/lexer_impl.h>
+ #include <gringo/locateable.h>
+ #include <gringo/optimize.h>
++#include <gringo/domain.h>
+ 
+ class Parser : public LexerImpl
+ {
+Index: libgringo/gringo/instantiator.h
+===================================================================
+--- libgringo/gringo/instantiator.h	(revision 5216)
++++ libgringo/gringo/instantiator.h	(working copy)
+@@ -35,9 +35,12 @@
+ 	IntVec new_;
+ };
+    
+-inline Instantiator* new_clone(const Instantiator& a)
++namespace boost
+ {
+-	(void)a;
+-	return 0;
++	template <>
++	inline Instantiator* new_clone(const Instantiator& a)
++	{
++		(void)a;
++		return 0;
++	}
+ }
+-
+Index: libgringo/gringo/litdep.h
+===================================================================
+--- libgringo/gringo/litdep.h	(revision 5216)
++++ libgringo/gringo/litdep.h	(working copy)
+@@ -113,9 +113,12 @@
+ 	};
+ }
+ 
+-inline LitDep::GrdNode* new_clone(const LitDep::GrdNode& a)
++namespace boost
+ {
+-	(void)a;
+-	return 0;
++	template <>
++	inline LitDep::GrdNode* new_clone(const LitDep::GrdNode& a)
++	{
++		(void)a;
++		return 0;
++	}
+ }
+-
+Index: libgringo/gringo/gringo.h
+===================================================================
+--- libgringo/gringo/gringo.h	(revision 5216)
++++ libgringo/gringo/gringo.h	(working copy)
+@@ -76,7 +76,6 @@
+ class Instantiator;
+ class Lexer;
+ class Lit;
+-class Loc;
+ class LuaLit;
+ class LuaTerm;
+ class LparseConverter;
+@@ -101,8 +100,8 @@
+ class IncLit;
+ class IncConfig;
+ class Streams;
+-class TermExpansion;
+ 
++struct TermExpansion;
+ struct Loc;
+ 
+ namespace LitDep
+@@ -130,12 +129,22 @@
+ typedef std::vector<VarSig> VarSigVec;
+ typedef std::auto_ptr<TermExpansion> TermExpansionPtr;
+ 
+-Term* new_clone(const Term& a);
+-VarTerm* new_clone(const VarTerm& a);
+-Lit* new_clone(const Lit& a);
+-WeightLit* new_clone(const WeightLit& a);
+-Instantiator* new_clone(const Instantiator& a);
+-LitDep::GrdNode* new_clone(const LitDep::GrdNode& a);
+-CondLit* new_clone(const CondLit& a);
++namespace boost
++{
++	template <>
++	Term* new_clone(const Term& a);
++	template <>
++	VarTerm* new_clone(const VarTerm& a);
++	template <>
++	Lit* new_clone(const Lit& a);
++	template <>
++	WeightLit* new_clone(const WeightLit& a);
++	template <>
++	Instantiator* new_clone(const Instantiator& a);
++	template <>
++	LitDep::GrdNode* new_clone(const LitDep::GrdNode& a);
++	template <>
++	CondLit* new_clone(const CondLit& a);
++}
+ 
+ #endif
+Index: libgringo/gringo/lit.h
+===================================================================
+--- libgringo/gringo/lit.h	(revision 5216)
++++ libgringo/gringo/lit.h	(working copy)
+@@ -73,8 +73,11 @@
+ 	bool head_;
+ };
+ 
+-inline Lit* new_clone(const Lit& a)
++namespace boost
+ {
+-	return a.clone();
++	template <>
++	inline Lit* new_clone(const Lit& a)
++	{
++		return a.clone();
++	}
+ }
+-
+Index: libgringo/gringo/optimize.h
+===================================================================
+--- libgringo/gringo/optimize.h	(revision 5216)
++++ libgringo/gringo/optimize.h	(working copy)
+@@ -26,10 +26,9 @@
+ 
+ class Optimize : public Statement
+ {
+-private:
++public:
+ 	class PrioLit;
+ 	typedef std::vector<std::pair<int32_t, int32_t> > PrioVec;
+-	friend PrioLit* new_clone(const PrioLit& a);
+ public:
+ 	class Printer : public ::Printer
+ 	{
+@@ -71,5 +70,9 @@
+ 	PredLitSetPtr      uniques_;
+ };
+ 
+-Optimize::PrioLit* new_clone(const Optimize::PrioLit& a);
++namespace boost
++{
++	template <>
++	Optimize::PrioLit* new_clone(const Optimize::PrioLit& a);
++}
+ 
+Index: libgringo/src/aggrlit.cpp
+===================================================================
+--- libgringo/src/aggrlit.cpp	(revision 5216)
++++ libgringo/src/aggrlit.cpp	(working copy)
+@@ -337,8 +337,11 @@
+ {
+ }
+ 
+-CondLit* new_clone(const CondLit& a)
++namespace boost
+ {
+-	return new CondLit(a);
++	template <>
++	CondLit* new_clone(const CondLit& a)
++	{
++		return new CondLit(a);
++	}
+ }
+-
diff --git a/debian/patches/series b/debian/patches/series
index 7638f66..2d26c32 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+gringo-clang-gcc.patch
 gringo-domain-fwd-decl.patch
 gringo-manpages.patch

-- 
grounding tools for (disjunctive) logic programs



More information about the debian-science-commits mailing list