[packages/ppl] - updated to 1.2 (note: new soname) - removed obsolete gmp-5.1.0,glpk-api12 patches

qboosh qboosh at pld-linux.org
Tue Mar 8 17:55:09 CET 2016


commit e3e29ba853c1fbd618949a2843fbe0bca512f627
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Mar 8 17:58:52 2016 +0100

    - updated to 1.2 (note: new soname)
    - removed obsolete gmp-5.1.0,glpk-api12 patches

 ppl-glpk-api12.patch | 278 ---------------------------------------------------
 ppl-gmp-5.1.0.patch  |  43 --------
 ppl.spec             |  12 +--
 3 files changed, 4 insertions(+), 329 deletions(-)
---
diff --git a/ppl.spec b/ppl.spec
index 37c8835..ad0f1db 100644
--- a/ppl.spec
+++ b/ppl.spec
@@ -28,15 +28,13 @@
 Summary:	The Parma Polyhedra Library: a library of numerical abstractions
 Summary(pl.UTF-8):	Parma Polyhedra Library - biblioteka abstrakcji matematycznych
 Name:		ppl
-Version:	1.0
-Release:	6
+Version:	1.2
+Release:	1
 License:	GPL v3+
 Group:		Libraries
 Source0:	ftp://ftp.cs.unipr.it/pub/ppl/releases/%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	e8caeb84cd858f64b36333c368891c7b
+# Source0-md5:	e7bd12043d1064214f7a0107b6da3f17
 Patch0:		%{name}-ciao.patch
-Patch1:		%{name}-gmp-5.1.0.patch
-Patch2:		%{name}-glpk-api12.patch
 URL:		http://www.cs.unipr.it/ppl/
 %if %{with xsb}
 BuildRequires:	XSB
@@ -384,8 +382,6 @@ Parma Polyhedra Library.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %build
 %{__libtoolize}
@@ -453,7 +449,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_docdir}/%{name}-%{version}/README.configure
 %doc %{_docdir}/%{name}-%{version}/TODO
 %attr(755,root,root) %{_libdir}/libppl.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libppl.so.12
+%attr(755,root,root) %ghost %{_libdir}/libppl.so.14
 %attr(755,root,root) %{_libdir}/libppl_c.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libppl_c.so.4
 %dir %{_libdir}/%{name}
diff --git a/ppl-glpk-api12.patch b/ppl-glpk-api12.patch
deleted file mode 100644
index 7513b39..0000000
--- a/ppl-glpk-api12.patch
+++ /dev/null
@@ -1,278 +0,0 @@
---- ppl-1.0/demos/ppl_lpsol/ppl_lpsol.c.orig	2012-06-28 12:50:33.000000000 +0200
-+++ ppl-1.0/demos/ppl_lpsol/ppl_lpsol.c	2013-05-14 16:00:07.647977701 +0200
-@@ -565,7 +565,9 @@
- static mpq_t tmp1_q;
- static mpq_t tmp2_q;
- static ppl_Coefficient_t ppl_coeff;
--static LPX* glpk_lp;
-+static glp_prob* glpk_lp;
-+#define GLPK_CLASS_LP 100
-+#define GLPK_CLASS_MIP 101
- static int glpk_lp_problem_kind;
- static int glpk_lp_num_int;
- static ppl_dimension_type* integer_variables;
-@@ -579,37 +581,42 @@
-   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_problem_kind == GLPK_CLASS_LP)
-     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));
- 
-   if (treat_as_lp) {
-+    glp_smcp lp_parms;
-+    glp_init_smcp(&lp_parms);
-+    /* Disable GLPK output. */
-+    lp_parms.msg_lev = GLP_MSG_OFF;
-+
-     /* 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, &lp_parms);
-+    glpk_status = glp_get_status(glpk_lp);
-   }
-   else {
-     /* MIP case. */
--    lpx_intopt(glpk_lp);
--    glpk_status = lpx_mip_status(glpk_lp);
-+    glp_iocp mip_parms;
-+    glp_init_iocp(&mip_parms);
-+    /* Disable GLPK output. */
-+    mip_parms.msg_lev = GLP_MSG_OFF;
-+    glp_intopt(glpk_lp, &mip_parms);
-+    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 +628,16 @@
-       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:
-+    case GLP_OPT:
-       glpk_status_string = "optimizable";
-       break;
--    case LPX_I_NOFEAS:
--      glpk_status_string = "unfeasible";
--      break;
--    case LPX_I_OPT:
--      glpk_status_string = "optimizable";
--      break;
--    case LPX_I_UNDEF:
-+    case GLP_UNDEF:
-       glpk_status_string = "undefined";
-       break;
-     default:
-@@ -652,8 +653,8 @@
-   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 +668,7 @@
- 
- 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 +682,10 @@
-   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 +700,7 @@
-     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 +716,7 @@
-     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 +747,7 @@
-     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 +1033,7 @@
-   mpq_t optimum;
-   mpz_t den_lcm;
-   int optimum_found;
-+  glp_mpscp mps_parms;
- 
- #ifdef PPL_LPSOL_SUPPORTS_TIMINGS
- 
-@@ -1041,12 +1043,14 @@
- #endif /* defined(PPL_LPSOL_SUPPORTS_TIMINGS) */
- 
-   if (verbosity == 0) {
--    /* FIXME: find a way to suppress output from lpx_read_mps. */
-+    /* FIXME: find a way to suppress output from glp_read_mps. */
-   }
- 
--  glpk_lp = lpx_read_mps(file_name);
- 
--  if (glpk_lp == NULL)
-+  glpk_lp = glp_create_prob();
-+  glp_init_mpscp(&mps_parms);
-+
-+  if ((glpk_lp == NULL) || (glp_read_mps(glpk_lp, GLP_MPS_FILE, &mps_parms, file_name) < 0))
-     fatal("cannot read MPS file `%s'", file_name);
- 
- #ifdef PPL_LPSOL_SUPPORTS_TIMINGS
-@@ -1060,21 +1064,21 @@
- 
- #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_problem_kind = (glp_get_num_int(glpk_lp) == 0) ? GLPK_CLASS_LP : GLPK_CLASS_MIP;
-+  if (glpk_lp_problem_kind == GLPK_CLASS_MIP && !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 (glpk_lp_problem_kind == GLPK_CLASS_MIP && !no_mip && use_simplex) {
-       if (verbosity >= 4)
- 	fprintf(output_file, "Integer variables:\n");
--      glpk_lp_num_int = lpx_get_num_int(glpk_lp);
-+      glpk_lp_num_int = glp_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) {
-+	if (glp_get_col_kind(glpk_lp, i+1) == GLP_IV) {
- 	  integer_variables[j] = i;
- 	  if (verbosity >= 4) {
- 	    ppl_io_fprint_variable(output_file, i);
-@@ -1101,18 +1105,20 @@
-     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);
-+    type = glp_get_row_type(glpk_lp, row);
-+    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);
-@@ -1150,7 +1156,9 @@
- 
-   /* 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);
-+    type = glp_get_col_type(glpk_lp, column);
-+    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);
-@@ -1179,10 +1187,10 @@
-   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 +1248,7 @@
- 
-   ppl_delete_Linear_Expression(ppl_objective_le);
- 
--  if (glpk_lp_problem_kind == LPX_MIP)
-+  if (glpk_lp_problem_kind == GLPK_CLASS_MIP)
-       free(integer_variables);
- 
-   if (optimum_found) {
-@@ -1287,7 +1295,7 @@
-   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<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
- 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)
-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)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ppl.git/commitdiff/e3e29ba853c1fbd618949a2843fbe0bca512f627



More information about the pld-cvs-commit mailing list