From 26e7717bab3ceabf1ecdd1b44c6495254e7baca2 Mon Sep 17 00:00:00 2001 From: pcpa Date: Apr 29 2014 19:46:37 +0000 Subject: Update to latest upstream release --- diff --git a/.gitignore b/.gitignore index 625a6b5..a31a504 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ ppl-0.10.2.tar.bz2 /ppl-0.11.2-Makefile.patch /ppl-0.11.2.tar.bz2 /ppl-1.0.tar.bz2 +/ppl-1.1.tar.bz2 diff --git a/ppl-0.10.2-Makefile.patch b/ppl-0.10.2-Makefile.patch deleted file mode 100644 index 307e5c7..0000000 --- a/ppl-0.10.2-Makefile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur ppl-0.10.1/Watchdog/doc/Makefile.in ppl-0.10.1-patched/Watchdog/doc/Makefile.in ---- ppl-0.10.1/Watchdog/doc/Makefile.in 2000-04-11 10:36:59.000000000 +0100 -+++ ppl-0.10.1-patched/Watchdog/doc/Makefile.in 2009-04-11 17:53:10.000000000 +0100 -@@ -163,7 +163,7 @@ - debug_flag = @debug_flag@ - - # All the documentation in docdir. --docdir = @docdir@ -+docdir = @docdir@/pwl - dvidir = @dvidir@ - exec_prefix = @exec_prefix@ - host = @host@ diff --git a/ppl-cstddef.patch b/ppl-cstddef.patch new file mode 100644 index 0000000..8c43b26 --- /dev/null +++ b/ppl-cstddef.patch @@ -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 + #include + #include ++#include + + #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 + #include ++#include + + #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 ++#include + + #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 ++ + 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(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(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(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(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 + + 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(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 + #include ++#include + + 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 { + 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 ++#include + + namespace Parma_Polyhedra_Library { + +@@ -249,7 +250,7 @@ public: + class const_iterator + : public std::iterator { + 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 ++#include + + 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 { + 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 ++#include + + namespace Parma_Polyhedra_Library { + +@@ -277,7 +278,7 @@ public: + class const_iterator + : public std::iterator { + public: diff --git a/ppl-glpk-4.52.patch b/ppl-glpk-4.52.patch deleted file mode 100644 index 827448d..0000000 --- a/ppl-glpk-4.52.patch +++ /dev/null @@ -1,334 +0,0 @@ -diff -up ppl-1.0/demos/ppl_lpsol/ppl_lpsol.c.orig ppl-1.0/demos/ppl_lpsol/ppl_lpsol.c ---- ppl-1.0/demos/ppl_lpsol/ppl_lpsol.c.orig 2013-08-06 18:06:15.641556335 -0300 -+++ ppl-1.0/demos/ppl_lpsol/ppl_lpsol.c 2013-08-06 18:21:43.321591859 -0300 -@@ -565,8 +565,7 @@ static mpz_t tmp_z; - static mpq_t tmp1_q; - static mpq_t tmp2_q; - static ppl_Coefficient_t ppl_coeff; --static LPX* glpk_lp; --static int glpk_lp_problem_kind; -+static glp_prob* glpk_lp; - static int glpk_lp_num_int; - static ppl_dimension_type* integer_variables; - -@@ -576,40 +575,50 @@ maybe_check_results(const int ppl_status - const char* glpk_status_string; - int glpk_status; - int treat_as_lp = 0; -+ glp_smcp glpk_smcp; -+ - if (!check_results) - return; - -- /* Disable GLPK output. */ -- lpx_set_int_parm(glpk_lp, LPX_K_MSGLEV, 0); -- -- if (no_mip || glpk_lp_problem_kind == LPX_LP) -+ if (no_mip || glpk_lp_num_int == 0) - treat_as_lp = 1; - -- lpx_set_obj_dir(glpk_lp, (maximize ? LPX_MAX : LPX_MIN)); -+ glp_set_obj_dir(glpk_lp, (maximize ? GLP_MAX : GLP_MIN)); -+ -+ glp_init_smcp(&glpk_smcp); -+ /* Disable GLPK output. */ -+ glpk_smcp.msg_lev = GLP_MSG_OFF; - - if (treat_as_lp) { - /* Set the problem class to LP: MIP problems are thus treated as - LP ones. */ -- lpx_set_class(glpk_lp, LPX_LP); -- lpx_exact(glpk_lp); -- glpk_status = lpx_get_status(glpk_lp); -+ glp_exact(glpk_lp, &glpk_smcp); -+ glpk_status = glp_get_status(glpk_lp); - } - else { - /* MIP case. */ -- lpx_intopt(glpk_lp); -- glpk_status = lpx_mip_status(glpk_lp); -+ glp_simplex(glpk_lp, &glpk_smcp); -+ glpk_status = glp_get_status(glpk_lp); -+ if (glpk_status != GLP_NOFEAS && glpk_status != GLP_UNBND) { -+ glp_iocp glpk_iocp; -+ glp_init_iocp(&glpk_iocp); -+ /* Disable GLPK output. */ -+ glpk_iocp.msg_lev = GLP_MSG_OFF; -+ glp_intopt(glpk_lp, &glpk_iocp); -+ glpk_status = glp_mip_status(glpk_lp); -+ } - } - /* If no_optimization is enabled, the second case is not possibile. */ - if (!((ppl_status == PPL_MIP_PROBLEM_STATUS_UNFEASIBLE -- && (glpk_status == LPX_NOFEAS || glpk_status == LPX_I_NOFEAS)) -+ && glpk_status == GLP_NOFEAS) - || (ppl_status == PPL_MIP_PROBLEM_STATUS_UNBOUNDED -- && (glpk_status == LPX_UNBND || glpk_status == LPX_I_UNDEF)) -+ && glpk_status == GLP_UNBND) - || (ppl_status == PPL_MIP_PROBLEM_STATUS_OPTIMIZED -- && ((glpk_status == LPX_OPT || glpk_status == LPX_I_OPT) -+ && (glpk_status == GLP_OPT - /* If no_optimization is enabled, check if the problem is - unbounded for GLPK. */ -- || (no_optimization && (glpk_status == LPX_UNBND -- || glpk_status == LPX_I_UNDEF)))))) { -+ || (no_optimization && (glpk_status == GLP_UNBND -+ || glpk_status == GLP_UNDEF)))))) { - - if (ppl_status == PPL_MIP_PROBLEM_STATUS_UNFEASIBLE) - ppl_status_string = "unfeasible"; -@@ -621,22 +630,16 @@ maybe_check_results(const int ppl_status - ppl_status_string = ""; - - switch (glpk_status) { -- case LPX_NOFEAS: -+ case GLP_NOFEAS: - glpk_status_string = "unfeasible"; - break; -- case LPX_UNBND: -+ case GLP_UNBND: - glpk_status_string = "unbounded"; - break; -- case LPX_OPT: -- glpk_status_string = "optimizable"; -- break; -- case LPX_I_NOFEAS: -- glpk_status_string = "unfeasible"; -- break; -- case LPX_I_OPT: -+ case GLP_OPT: - glpk_status_string = "optimizable"; - break; -- case LPX_I_UNDEF: -+ case GLP_UNDEF: - glpk_status_string = "undefined"; - break; - default: -@@ -652,8 +655,8 @@ maybe_check_results(const int ppl_status - else if (!no_optimization - && ppl_status == PPL_MIP_PROBLEM_STATUS_OPTIMIZED) { - -- double glpk_optimum_value = treat_as_lp ? lpx_get_obj_val(glpk_lp) -- : lpx_mip_obj_val(glpk_lp); -+ double glpk_optimum_value -+ = (treat_as_lp ? glp_get_obj_val(glpk_lp) : glp_mip_obj_val(glpk_lp)); - - if (fabs(ppl_optimum_value - glpk_optimum_value) > check_threshold) { - error("check failed: for GLPK the problem's optimum is %.20g," -@@ -667,7 +670,7 @@ maybe_check_results(const int ppl_status - - static const char* - variable_output_function(ppl_dimension_type var) { -- const char* name = lpx_get_col_name(glpk_lp, var+1); -+ const char* name = glp_get_col_name(glpk_lp, var+1); - if (name != NULL) - return name; - else -@@ -681,10 +684,10 @@ add_constraints(ppl_Linear_Expression_t - ppl_Constraint_t ppl_c; - ppl_Linear_Expression_t ppl_le2; - switch (type) { -- case LPX_FR: -+ case GLP_FR: - break; - -- case LPX_LO: -+ case GLP_LO: - mpz_mul(tmp_z, den_lcm, mpq_numref(rational_lb)); - mpz_divexact(tmp_z, tmp_z, mpq_denref(rational_lb)); - mpz_neg(tmp_z, tmp_z); -@@ -699,7 +702,7 @@ add_constraints(ppl_Linear_Expression_t - ppl_delete_Constraint(ppl_c); - break; - -- case LPX_UP: -+ case GLP_UP: - mpz_mul(tmp_z, den_lcm, mpq_numref(rational_ub)); - mpz_divexact(tmp_z, tmp_z, mpq_denref(rational_ub)); - mpz_neg(tmp_z, tmp_z); -@@ -715,7 +718,7 @@ add_constraints(ppl_Linear_Expression_t - ppl_delete_Constraint(ppl_c); - break; - -- case LPX_DB: -+ case GLP_DB: - ppl_new_Linear_Expression_from_Linear_Expression(&ppl_le2, ppl_le); - - mpz_mul(tmp_z, den_lcm, mpq_numref(rational_lb)); -@@ -746,7 +749,7 @@ add_constraints(ppl_Linear_Expression_t - ppl_delete_Constraint(ppl_c); - break; - -- case LPX_FX: -+ case GLP_FX: - mpz_mul(tmp_z, den_lcm, mpq_numref(rational_lb)); - mpz_divexact(tmp_z, tmp_z, mpq_denref(rational_lb)); - mpz_neg(tmp_z, tmp_z); -@@ -1032,6 +1035,14 @@ solve(char* file_name) { - mpq_t optimum; - mpz_t den_lcm; - int optimum_found; -+ glp_mpscp glpk_mpscp; -+ -+ glpk_lp = glp_create_prob(); -+ glp_init_mpscp(&glpk_mpscp); -+ -+ if (verbosity == 0) { -+ /* FIXME: find a way to suppress output from glp_read_mps. */ -+ } - - #ifdef PPL_LPSOL_SUPPORTS_TIMINGS - -@@ -1040,13 +1051,7 @@ solve(char* file_name) { - - #endif /* defined(PPL_LPSOL_SUPPORTS_TIMINGS) */ - -- if (verbosity == 0) { -- /* FIXME: find a way to suppress output from lpx_read_mps. */ -- } -- -- glpk_lp = lpx_read_mps(file_name); -- -- if (glpk_lp == NULL) -+ if (glp_read_mps(glpk_lp, GLP_MPS_FILE, &glpk_mpscp, file_name) != 0) - fatal("cannot read MPS file `%s'", file_name); - - #ifdef PPL_LPSOL_SUPPORTS_TIMINGS -@@ -1060,29 +1065,31 @@ solve(char* file_name) { - - #endif /* defined(PPL_LPSOL_SUPPORTS_TIMINGS) */ - -- glpk_lp_problem_kind = lpx_get_class(glpk_lp); -- if (glpk_lp_problem_kind == LPX_MIP && !no_mip && !use_simplex) -+ glpk_lp_num_int = glp_get_num_int(glpk_lp); -+ -+ if (glpk_lp_num_int > 0 && !no_mip && !use_simplex) - fatal("the enumeration solving method can not handle MIP problems"); - -- dimension = lpx_get_num_cols(glpk_lp); -+ dimension = glp_get_num_cols(glpk_lp); - - /* Read variables constrained to be integer. */ -- if (glpk_lp_problem_kind == LPX_MIP && !no_mip && use_simplex) { -- if (verbosity >= 4) -- fprintf(output_file, "Integer variables:\n"); -- glpk_lp_num_int = lpx_get_num_int(glpk_lp); -- integer_variables = (ppl_dimension_type*) -- malloc((glpk_lp_num_int + 1)*sizeof(ppl_dimension_type)); -- for (i = 0, j = 0; i < dimension; ++i) -- if (lpx_get_col_kind(glpk_lp, i+1) == LPX_IV) { -- integer_variables[j] = i; -- if (verbosity >= 4) { -- ppl_io_fprint_variable(output_file, i); -- fprintf(output_file, " "); -- } -- ++j; -- } -+ if (glpk_lp_num_int > 0 && !no_mip && use_simplex) { -+ if (verbosity >= 4) -+ fprintf(output_file, "Integer variables:\n"); -+ integer_variables = (ppl_dimension_type*) -+ malloc((glpk_lp_num_int + 1)*sizeof(ppl_dimension_type)); -+ for (i = 0, j = 0; i < dimension; ++i) { -+ int col_kind = glp_get_col_kind(glpk_lp, i+1); -+ if (col_kind == GLP_IV || col_kind == GLP_BV) { -+ integer_variables[j] = i; -+ if (verbosity >= 4) { -+ ppl_io_fprint_variable(output_file, i); -+ fprintf(output_file, " "); -+ } -+ ++j; -+ } - } -+ } - coefficient_index = (int*) malloc((dimension+1)*sizeof(int)); - coefficient_value = (double*) malloc((dimension+1)*sizeof(double)); - rational_coefficient = (mpq_t*) malloc((dimension+1)*sizeof(mpq_t)); -@@ -1101,21 +1108,25 @@ solve(char* file_name) { - fprintf(output_file, "\nConstraints:\n"); - - /* Set up the row (ordinary) constraints. */ -- num_rows = lpx_get_num_rows(glpk_lp); -+ num_rows = glp_get_num_rows(glpk_lp); - for (row = 1; row <= num_rows; ++row) { - /* Initialize the least common multiple computation. */ - mpz_set_si(den_lcm, 1); - /* Set `nz' to the number of non-zero coefficients. */ -- nz = lpx_get_mat_row(glpk_lp, row, coefficient_index, coefficient_value); -+ nz = glp_get_mat_row(glpk_lp, row, coefficient_index, coefficient_value); - for (i = 1; i <= nz; ++i) { - set_mpq_t_from_double(rational_coefficient[i], coefficient_value[i]); - /* Update den_lcm. */ - mpz_lcm(den_lcm, den_lcm, mpq_denref(rational_coefficient[i])); - } -- lpx_get_row_bnds(glpk_lp, row, &type, &lb, &ub); -+ -+ lb = glp_get_row_lb(glpk_lp, row); -+ ub = glp_get_row_ub(glpk_lp, row); -+ - set_mpq_t_from_double(rational_lb, lb); -- mpz_lcm(den_lcm, den_lcm, mpq_denref(rational_lb)); - set_mpq_t_from_double(rational_ub, ub); -+ -+ mpz_lcm(den_lcm, den_lcm, mpq_denref(rational_lb)); - mpz_lcm(den_lcm, den_lcm, mpq_denref(rational_ub)); - - ppl_new_Linear_Expression_with_dimension(&ppl_le, dimension); -@@ -1128,6 +1139,7 @@ solve(char* file_name) { - ppl_coeff); - } - -+ type = glp_get_row_type(glpk_lp, row); - add_constraints(ppl_le, type, rational_lb, rational_ub, den_lcm, ppl_cs); - - ppl_delete_Linear_Expression(ppl_le); -@@ -1150,7 +1162,9 @@ solve(char* file_name) { - - /* Set up the columns constraints, i.e., variable bounds. */ - for (column = 1; column <= dimension; ++column) { -- lpx_get_col_bnds(glpk_lp, column, &type, &lb, &ub); -+ -+ lb = glp_get_col_lb(glpk_lp, column); -+ ub = glp_get_col_ub(glpk_lp, column); - - set_mpq_t_from_double(rational_lb, lb); - set_mpq_t_from_double(rational_ub, ub); -@@ -1164,6 +1178,7 @@ solve(char* file_name) { - ppl_assign_Coefficient_from_mpz_t(ppl_coeff, den_lcm); - ppl_Linear_Expression_add_to_coefficient(ppl_le, column-1, ppl_coeff); - -+ type = glp_get_col_type(glpk_lp, column); - add_constraints(ppl_le, type, rational_lb, rational_ub, den_lcm, ppl_cs); - - ppl_delete_Linear_Expression(ppl_le); -@@ -1179,10 +1194,10 @@ solve(char* file_name) { - mpz_set_si(den_lcm, 1); - - mpq_init(objective[0]); -- set_mpq_t_from_double(objective[0], lpx_get_obj_coef(glpk_lp, 0)); -+ set_mpq_t_from_double(objective[0], glp_get_obj_coef(glpk_lp, 0)); - for (i = 1; i <= dimension; ++i) { - mpq_init(objective[i]); -- set_mpq_t_from_double(objective[i], lpx_get_obj_coef(glpk_lp, i)); -+ set_mpq_t_from_double(objective[i], glp_get_obj_coef(glpk_lp, i)); - /* Update den_lcm. */ - mpz_lcm(den_lcm, den_lcm, mpq_denref(objective[i])); - } -@@ -1240,7 +1255,7 @@ solve(char* file_name) { - - ppl_delete_Linear_Expression(ppl_objective_le); - -- if (glpk_lp_problem_kind == LPX_MIP) -+ if (glpk_lp_num_int > 0) - free(integer_variables); - - if (optimum_found) { -@@ -1287,7 +1302,7 @@ solve(char* file_name) { - ppl_delete_Coefficient(optimum_n); - ppl_delete_Generator(optimum_location); - -- lpx_delete_prob(glpk_lp); -+ glp_delete_prob(glpk_lp); - } - - static void diff --git a/ppl-gmp-5.1.0.patch b/ppl-gmp-5.1.0.patch deleted file mode 100644 index b8b359d..0000000 --- a/ppl-gmp-5.1.0.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up ppl-1.0/src/mp_std_bits.cc.orig ppl-1.0/src/mp_std_bits.cc ---- ppl-1.0/src/mp_std_bits.cc.orig 2013-01-30 00:54:04.362716243 -0200 -+++ ppl-1.0/src/mp_std_bits.cc 2013-01-30 00:56:18.260721371 -0200 -@@ -25,6 +25,9 @@ site: http://bugseng.com/products/ppl/ . - #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::is_specialized; - const int std::numeric_limits::digits; - const int std::numeric_limits::digits10; -@@ -70,3 +73,6 @@ const bool std::numeric_limits::traps; - const bool std::numeric_limits::tininess_before; - const std::float_round_style std::numeric_limits::round_style; -+ -+#endif // __GNU_MP_VERSION < 5 -+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) -diff -up ppl-1.0/src/mp_std_bits.defs.hh.orig ppl-1.0/src/mp_std_bits.defs.hh ---- ppl-1.0/src/mp_std_bits.defs.hh.orig 2013-01-30 00:54:10.339716472 -0200 -+++ ppl-1.0/src/mp_std_bits.defs.hh 2013-01-30 00:55:45.852720130 -0200 -@@ -38,6 +38,9 @@ void swap(mpz_class& x, mpz_class& y); - #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 @@ public: - - } // 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) diff --git a/ppl.spec b/ppl.spec index eee0483..37b1c7b 100644 --- a/ppl.spec +++ b/ppl.spec @@ -1,6 +1,6 @@ Name: ppl -Version: 1.0 -Release: 5%{?dist}.10 +Version: 1.1 +Release: 1%{?dist} Summary: The Parma Polyhedra Library: a library of numerical abstractions Group: Development/Libraries License: GPLv3+ @@ -14,15 +14,7 @@ Requires(postun): /sbin/ldconfig Provides: ppl-pwl = %{version}-%{release} Obsoletes: ppl-pwl <= 0.11.2-11 BuildRequires: gmp-devel >= 4.1.3, m4 >= 1.4.8 -# Hack -%if %{_lib} == lib64 -Provides: libppl.so.9()(64bit) -%else -Provides: libppl.so.9 -%endif -# Both patches backported from http://www.cs.unipr.it/git/?p=ppl/ppl.git -Patch0: %{name}-gmp-5.1.0.patch -Patch1: %{name}-glpk-4.52.patch +Patch0: %{name}-cstddef.patch %description The Parma Polyhedra Library (PPL) is a library for the manipulation of @@ -157,7 +149,6 @@ Install this package if you want to program with the PPL. %prep %setup -q %patch0 -p1 -%patch1 -p1 %build CPPFLAGS="-I%{_includedir}/glpk" @@ -309,6 +300,13 @@ mv \ %postun -p /sbin/ldconfig %changelog +* Tue Apr 29 2014 pcpa - 1.1-1 +- Update to latest upstream release +- Remove patches added upstream +- Add new cstddef patch to build recent gcc +- Correct bogus dates in chagelog +- Remove hack with explicit provides of (wrong) library major + * Fri Mar 28 2014 Michael Simacek - 1.0-5.10 - Use Requires: java-headless rebuild (#1067528) @@ -449,7 +447,7 @@ mv \ * Wed Feb 18 2009 Roberto Bagnara 0.10-8 - Install the documentation according to the Fedora packaging conventions. -* Wed Feb 17 2009 Karsten Hopp 0.10-7 +* Tue Feb 17 2009 Karsten Hopp 0.10-7 - There are no GNU Prolog packages available on s390 and s390x: disable the GNU Prolog interface also on those platforms (besides ppc64). @@ -464,13 +462,13 @@ mv \ - Added `%%dir %%{_datadir}/doc/pwl' to the `%%files' section of the `ppl-pwl' package. -* Thu Nov 04 2008 Roberto Bagnara 0.10-3 +* Tue Nov 04 2008 Roberto Bagnara 0.10-3 - Fixed the requirements of the `ppl-java' package. -* Thu Nov 04 2008 Roberto Bagnara 0.10-2 +* Tue Nov 04 2008 Roberto Bagnara 0.10-2 - Added m4 >= 1.4.8 to build requirements. -* Thu Nov 04 2008 Roberto Bagnara 0.10-1 +* Tue Nov 04 2008 Roberto Bagnara 0.10-1 - Updated and extended for PPL 0.10. In particular, the `ppl-config' program, being useful also for non-development activities, has been brought back to the main package. diff --git a/sources b/sources index c634cba..287f1cd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8a90e0b0b3e9527609a6e5ed3616fab1 ppl-1.0.tar.bz2 +98be3e1a272bd5337fbadabb0d3f3d20 ppl-1.1.tar.bz2