forked from pool/libminizinc
3d1d9f345a
* Fix specification for constraint items and annotations in FlatZinc JSON. * Fix flattening of negated let expressions with constraints. * Fix crash when equating identifiers to tuples/records in if- then-else expressions. * Fix string_length function to return the number of Unicode code points rather than the number of bytes (i.e., to interpret the string as UTF-8). * Emit type error for opt tuples and records created through type aliases. * Fix evaluation of par partial functions returning arrays. * Fix type inference for if-then-else expressions with different tuple or record types in the branches. * Fix evaluation error caused by removal of fixed FlatZinc variables without fixing them in the output model. * Fix computed type when flattening cv comprehensions containing tuple or record types. * Fix unsatisfiability caused by reification in negated boolean context (:bugref:`813`). * Fix bug in computation of common type of incompatible record types. * Fix crash when type checking nested arrays of tuples or records. * Fix incorrect unification of flattened tuple/record fields with paths enabled. * Add string_split function that splits a string into an array of strings based on a separator. * Add json_section annotation to mark an output item as a JSON section (:bugref:`816`). OBS-URL: https://build.opensuse.org/package/show/science/libminizinc?expand=0&rev=11
99 lines
3.0 KiB
RPMSpec
99 lines
3.0 KiB
RPMSpec
#
|
|
# spec file for package libminizinc
|
|
#
|
|
# Copyright (c) 2024 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.5
|
|
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
|