libminizinc/libminizinc.spec
Stefan Brüns 275b49b3d9 - update to 2.8.7:
* Bug fixes:
    + Fix bug that caused where clauses to be removed from
      comprehensions.
    + Fix optimisation of Boolean constraints that could sometimes
      trigger an assertion failure in debug builds.
- update to 2.8.6:
  * Changes:
    + Variable in operators on arrays of (nested) records and
      tuples containing only enumerable (enum, int, or bool) will
      now be rewritten into table global constraints.
    + Values that are par in the left hand side will be checked and
      filtered from the resulting table constraint.
    + Variable <, <=, > and >= operators on (nested) records and
      tuples containing only enumerable (enum, int, or bool) will
      now be rewritten into lex_less or lex_lesseq global
      constraints.
    + Automatically detect SCIP 9.0.1 and potential future versions
      on Windows.
    + The interface to the HiGHS solver now requires version 1.7.2
      or later.
    + Enforce strict enum type correctness for set operations.
    + Add par opt overloads of min / max and return enum values
      instead of coercing to integers.
    + Use half-reification only when there isn’t a reification that
      is a more specific match.
    + Add multidimensional overloads for the ++ array concatenation
      operator.
  * Bug fixes:
    + Fix incorrect type error for array literals where the first
      element is <> and subsequent elements are sets.
    + Fix missing code block in visualisation feature
      documentation.
    + Emit type error when using variable if-then-else/array access
      containing tuples or records containing non-varifiable types.
    + Emit type error when using a variable comprehension with a
      tuple/record type.
    + Emit type error when using optional array access for arrays
      of tuples/records.
    + Emit type error for array literals with <> and var set
      elements.
    + Fix missing cross-references for IDE preference dialog
      documentation figures.
    + Fix crash when using nested tuples/record types inside var
      if-then-else expressions.
    + Fix evaluation error for comprehensions with an initial
      assignment generator and a where clause which doesn’t involve
      any of the generator identifiers.
    + Fix type checking of if then else expressions with _ in the
      else branch.
    + Fix parsing of the most negative integer literal.
    + Fix typo in warning messages for undefined results in
      function calls.
    + Fix bug in flattening identifier causing debug assertion to
      fail.
    + Fix missing type when flattening indexed var comprehension
      leading to error or incorrect value type.
    + Fix crash when generating error message for mismatched index
      set where an enum index set is empty.
    + Fix crash due to incorrect handling of negated constraints
      matching entry in CSE map.
    + Fix type error due to missing overload of max.
    + Fix handling of contexts and maybe_partial annotations when
      flattening par expressions.
    + Fix par evaluation of boolean operators where an operand is
      an array access into an empty array literal.
    + Fix crash when concatenating arrays of annotations.
    + Ensure DZN output of enum index sets of multidimensional
      arrays is properly quoted.
    + Fix parsing of enumerated values in JSON for integer
      parameters.
    + Fix crash during flattening of clauses with opt bool
      arguments.
    + Fix the coercions of index set for empty array literals to
      allow any of the index sets to be empty.
    + Fix behaviour of overloading for the ++ operator.
    + Avoid outputting objective statistic when value is invalid
      for MIP solvers.
    + Fix bug in unification of aliased output variables when using
      -O2 and above.

OBS-URL: https://build.opensuse.org/package/show/science/libminizinc?expand=0&rev=13
2025-01-19 04:28:38 +00:00

99 lines
3.0 KiB
RPMSpec

#
# spec file for package libminizinc
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: libminizinc
Version: 2.8.7
Release: 0
Summary: A high-level constraint modelling language
Group: Productivity/Scientific/Math
License: MPL-2.0
URL: https://www.minizinc.org/
Source: https://github.com/MiniZinc/libminizinc/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FEATURE-OPENSUSE - Be more verbose on thrown exceptions
Patch0: 0001-Disambiguate-UNKNOWN-EXCEPTION.patch
Patch1: 0002-Catch-std-exception-by-const-reference.patch
Patch2: 0003-Try-to-get-some-more-information-when-catching.patch
BuildRequires: cmake >= 3.4.0
BuildRequires: gcc-c++
BuildRequires: gecode-devel
BuildRequires: gecode-minizinc
BuildRequires: pkgconfig(mpfr)
%description
MiniZinc is a free and open-source constraint modeling language.
%package -n minizinc
Summary: A high-level constraint modelling language
Recommends: gecode-minizinc
%description -n minizinc
You can use MiniZinc to model constraint satisfaction and optimisation
problems in a high-level, solver-independent way, taking advantage of
a large library of pre-defined constraints. Your model is then
compiled into FlatZinc, a solver input language that is understood
by a wide range of solvers.
%package devel
Summary: A high-level constraint modelling language
Group: Development/Libraries/C and C++
Requires: minizinc = %{version}
%description devel
MiniZinc is a free and open-source constraint modeling language.
%prep
%autosetup -p1
%build
%cmake
%cmake_build
%install
%cmake_install
%check
cat > t.mzn <<EOF
var 1..5: x;
EOF
cat > t1.mzc.mzn <<EOF
output["SIMPLE CHECK"];
EOF
cat > t2.mzc.mzn <<EOF
int: data :: add_to_output = 2;
EOF
export LD_LIBRARY_PATH=./build/
./build/minizinc --solvers
./build/minizinc t1.mzc.mzn t.mzn --output-mode json --output-time --output-objective --output-output-item --statistics
./build/minizinc t2.mzc.mzn t.mzn --output-mode json --output-time --output-objective --output-output-item --statistics
%post -n minizinc -p /sbin/ldconfig
%postun -n minizinc -p /sbin/ldconfig
%files -n minizinc
%license LICENSE.txt
%doc changes.rst README.md
%{_bindir}/*
%{_datadir}/minizinc
%{_libdir}/libmzn*
%files devel
%{_includedir}/minizinc
%{_libdir}/cmake/libminizinc
%changelog