ppl: 1.0 -> 1.1, add patch to fix current ptrdiff_t build error

I'm updating to 1.1 because that's the version that the patch from
Fedora, which fixes ptrdiff_t build error, applies to.

Removing old patch that doesn't apply anymore. (The patch seems to be
fixing a build error that no longer exist, see
https://bugs.gentoo.org/show_bug.cgi?id=447928.)
This commit is contained in:
Bjørn Forsman 2015-07-21 23:34:52 +02:00
parent 4588557d01
commit 2b2e7c2730
3 changed files with 241 additions and 45 deletions

View File

@ -1,13 +1,13 @@
{ fetchurl, stdenv, gmpxx, perl, gnum4 }:
let version = "1.0"; in
let version = "1.1"; in
stdenv.mkDerivation rec {
name = "ppl-${version}";
src = fetchurl {
url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2";
sha256 = "0m0b6dzablci8mlavpsmn5w1v3r46li0wpjwvsybgxx0p1ifjsf1";
sha256 = "1vrqhbpyca6sf984cfcwlp8wdnfzj1g7ph9958qdky9978i1nlny";
};
nativeBuildInputs = [ perl gnum4 ];
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
"--disable-ppl_lcdd" "--disable-ppl_lpsol" "--disable-ppl_pips"
];
patches = [ ./upstream-based.patch ];
patches = [ ./ppl-cstddef.patch /* from Fedora */ ];
# Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz
# x86_64 box. Nevertheless, being a dependency of GCC, it probably ought

View File

@ -0,0 +1,238 @@
diff -up ppl-1.1/src/Dense_Row_defs.hh.orig ppl-1.1/src/Dense_Row_defs.hh
--- ppl-1.1/src/Dense_Row_defs.hh.orig 2014-04-29 13:08:10.516682937 -0300
+++ ppl-1.1/src/Dense_Row_defs.hh 2014-04-29 13:08:50.447684466 -0300
@@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ .
#include <memory>
#include <vector>
#include <limits>
+#include <cstddef>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
//! A finite sequence of coefficients.
@@ -433,7 +434,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef value_type& reference;
@@ -474,7 +475,7 @@ class Parma_Polyhedra_Library::Dense_Row
public:
typedef const Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef Coefficient_traits::const_reference reference;
diff -up ppl-1.1/src/Linear_Expression_Interface_defs.hh.orig ppl-1.1/src/Linear_Expression_Interface_defs.hh
--- ppl-1.1/src/Linear_Expression_Interface_defs.hh.orig 2014-04-29 13:08:17.337683198 -0300
+++ ppl-1.1/src/Linear_Expression_Interface_defs.hh 2014-04-29 13:08:40.999684104 -0300
@@ -32,6 +32,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Sparse_Row_types.hh"
#include <vector>
#include <set>
+#include <cstddef>
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
//! A linear expression.
@@ -65,7 +66,7 @@ public:
public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef const Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef Coefficient_traits::const_reference reference;
diff -up ppl-1.1/src/CO_Tree_defs.hh.orig ppl-1.1/src/CO_Tree_defs.hh
--- ppl-1.1/src/CO_Tree_defs.hh.orig 2014-04-29 13:11:33.725690719 -0300
+++ ppl-1.1/src/CO_Tree_defs.hh 2014-04-29 13:11:55.943691569 -0300
@@ -28,6 +28,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Coefficient_defs.hh"
#include <memory>
+#include <cstddef>
#ifndef PPL_CO_TREE_EXTRA_DEBUG
#ifdef PPL_ABI_BREAKING_EXTRA_DEBUG
@@ -159,7 +160,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef const data_type value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef data_type_const_reference reference;
@@ -314,7 +315,7 @@ public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef data_type value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef value_type& reference;
diff -up ppl-1.1/src/CO_Tree_inlines.hh.orig ppl-1.1/src/CO_Tree_inlines.hh
--- ppl-1.1/src/CO_Tree_inlines.hh.orig 2014-04-29 13:14:12.738696808 -0300
+++ ppl-1.1/src/CO_Tree_inlines.hh 2014-04-29 13:14:48.887698192 -0300
@@ -24,6 +24,8 @@ site: http://bugseng.com/products/ppl/ .
#ifndef PPL_CO_Tree_inlines_hh
#define PPL_CO_Tree_inlines_hh 1
+#include <cstddef>
+
namespace Parma_Polyhedra_Library {
inline dimension_type
@@ -31,7 +33,7 @@ CO_Tree::dfs_index(const_iterator itr) c
PPL_ASSERT(itr.current_index != 0);
PPL_ASSERT(itr.current_index >= indexes + 1);
PPL_ASSERT(itr.current_index <= indexes + reserved_size);
- const ptrdiff_t index = itr.current_index - indexes;
+ const std::ptrdiff_t index = itr.current_index - indexes;
return static_cast<dimension_type>(index);
}
@@ -40,7 +42,7 @@ CO_Tree::dfs_index(iterator itr) const {
PPL_ASSERT(itr.current_index != 0);
PPL_ASSERT(itr.current_index >= indexes + 1);
PPL_ASSERT(itr.current_index <= indexes + reserved_size);
- const ptrdiff_t index = itr.current_index - indexes;
+ const std::ptrdiff_t index = itr.current_index - indexes;
return static_cast<dimension_type>(index);
}
@@ -772,7 +774,7 @@ CO_Tree::tree_iterator::follow_left_chil
p -= (offset - 1);
while (*p == unused_index)
++p;
- const ptrdiff_t distance = p - tree.indexes;
+ const std::ptrdiff_t distance = p - tree.indexes;
PPL_ASSERT(distance >= 0);
i = static_cast<dimension_type>(distance);
offset = least_significant_one_mask(i);
@@ -787,7 +789,7 @@ CO_Tree::tree_iterator::follow_right_chi
p += (offset - 1);
while (*p == unused_index)
--p;
- const ptrdiff_t distance = p - tree.indexes;
+ const std::ptrdiff_t distance = p - tree.indexes;
PPL_ASSERT(distance >= 0);
i = static_cast<dimension_type>(distance);
offset = least_significant_one_mask(i);
diff -up ppl-1.1/src/Linear_Expression_defs.hh.orig ppl-1.1/src/Linear_Expression_defs.hh
--- ppl-1.1/src/Linear_Expression_defs.hh.orig 2014-04-29 13:15:39.793700141 -0300
+++ ppl-1.1/src/Linear_Expression_defs.hh 2014-04-29 13:16:07.464701201 -0300
@@ -51,6 +51,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Linear_Expression_Interface_defs.hh"
#include "Variable_defs.hh"
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -381,7 +382,7 @@ public:
public:
typedef std::bidirectional_iterator_tag iterator_category;
typedef const Coefficient value_type;
- typedef ptrdiff_t difference_type;
+ typedef std::ptrdiff_t difference_type;
typedef value_type* pointer;
typedef Coefficient_traits::const_reference reference;
diff -up ppl-1.1/src/CO_Tree.cc.orig ppl-1.1/src/CO_Tree.cc
--- ppl-1.1/src/CO_Tree.cc.orig 2014-04-29 13:19:37.192709232 -0300
+++ ppl-1.1/src/CO_Tree.cc 2014-04-29 13:19:58.000710029 -0300
@@ -954,7 +954,7 @@ PPL::CO_Tree
--subtree_size;
}
- const ptrdiff_t distance = first_unused_index - indexes;
+ const std::ptrdiff_t distance = first_unused_index - indexes;
PPL_ASSERT(distance >= 0);
return static_cast<dimension_type>(distance);
}
diff -up ppl-1.1/src/Constraint_System_defs.hh.orig ppl-1.1/src/Constraint_System_defs.hh
--- ppl-1.1/src/Constraint_System_defs.hh.orig 2014-04-29 13:30:05.530733294 -0300
+++ ppl-1.1/src/Constraint_System_defs.hh 2014-04-29 13:30:27.167734122 -0300
@@ -37,6 +37,7 @@ site: http://bugseng.com/products/ppl/ .
#include "termination_types.hh"
#include <iterator>
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -609,7 +610,7 @@ for (Constraint_System::const_iterator i
class Parma_Polyhedra_Library::Constraint_System_const_iterator
: public std::iterator<std::forward_iterator_tag,
Constraint,
- ptrdiff_t,
+ std::ptrdiff_t,
const Constraint*,
const Constraint&> {
public:
diff -up ppl-1.1/src/Congruence_System_defs.hh.orig ppl-1.1/src/Congruence_System_defs.hh
--- ppl-1.1/src/Congruence_System_defs.hh.orig 2014-04-29 13:33:56.927742155 -0300
+++ ppl-1.1/src/Congruence_System_defs.hh 2014-04-29 13:34:15.535742867 -0300
@@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Congruence_defs.hh"
#include "Constraint_System_types.hh"
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -249,7 +250,7 @@ public:
class const_iterator
: public std::iterator<std::forward_iterator_tag,
Congruence,
- ptrdiff_t,
+ std::ptrdiff_t,
const Congruence*,
const Congruence&> {
public:
diff -up ppl-1.1/src/Generator_System_defs.hh.orig ppl-1.1/src/Generator_System_defs.hh
--- ppl-1.1/src/Generator_System_defs.hh.orig 2014-04-29 13:44:30.122766402 -0300
+++ ppl-1.1/src/Generator_System_defs.hh 2014-04-29 13:44:48.167767093 -0300
@@ -33,6 +33,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Poly_Con_Relation_defs.hh"
#include "Polyhedron_types.hh"
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -679,7 +680,7 @@ copy(gs.begin(), gs.end(), ostream_itera
class Parma_Polyhedra_Library::Generator_System_const_iterator
: public std::iterator<std::forward_iterator_tag,
Generator,
- ptrdiff_t,
+ std::ptrdiff_t,
const Generator*,
const Generator&> {
public:
diff -up ppl-1.1/src/Grid_Generator_System_defs.hh.orig ppl-1.1/src/Grid_Generator_System_defs.hh
--- ppl-1.1/src/Grid_Generator_System_defs.hh.orig 2014-04-29 13:45:26.073768544 -0300
+++ ppl-1.1/src/Grid_Generator_System_defs.hh 2014-04-29 13:45:42.535769175 -0300
@@ -31,6 +31,7 @@ site: http://bugseng.com/products/ppl/ .
#include "Variables_Set_types.hh"
#include "Polyhedron_types.hh"
#include <iosfwd>
+#include <cstddef>
namespace Parma_Polyhedra_Library {
@@ -277,7 +278,7 @@ public:
class const_iterator
: public std::iterator<std::forward_iterator_tag,
Grid_Generator,
- ptrdiff_t,
+ std::ptrdiff_t,
const Grid_Generator*,
const Grid_Generator&> {
public:

View File

@ -1,42 +0,0 @@
https://bugs.gentoo.org/show_bug.cgi?id=447928
--- ppl-1.0/src/p_std_bits.cc.org 2012-12-30 00:37:03.033948083 +0100
+++ ppl-1.0/src/mp_std_bits.cc 2012-12-30 00:44:12.893019313 +0100
@@ -25,6 +25,9 @@
#include "ppl-config.h"
#include "mp_std_bits.defs.hh"
+#if __GNU_MP_VERSION < 5 \
+ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
+
const bool std::numeric_limits<mpz_class>::is_specialized;
const int std::numeric_limits<mpz_class>::digits;
const int std::numeric_limits<mpz_class>::digits10;
@@ -70,3 +73,6 @@
const bool std::numeric_limits<mpq_class>::traps;
const bool std::numeric_limits<mpq_class>::tininess_before;
const std::float_round_style std::numeric_limits<mpq_class>::round_style;
+
+#endif // __GNU_MP_VERSION < 5
+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
--- ppl-1.0/src/mp_std_bits.defs.hh.org 2012-12-30 00:37:03.037948187 +0100
+++ ppl-1.0/src/mp_std_bits.defs.hh 2012-12-30 00:42:32.002424189 +0100
@@ -38,6 +38,9 @@
#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
void swap(mpq_class& x, mpq_class& y);
+#if __GNU_MP_VERSION < 5 \
+ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
+
namespace std {
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
@@ -164,6 +167,9 @@
} // namespace std
+#endif // __GNU_MP_VERSION < 5
+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
+
#include "mp_std_bits.inlines.hh"
#endif // !defined(PPL_mp_std_bits_defs_hh)