SHA256
1
0
forked from pool/libminizinc

Accepting request 973118 from home:StefanBruens:branches:science

New package

OBS-URL: https://build.opensuse.org/request/show/973118
OBS-URL: https://build.opensuse.org/package/show/science/libminizinc?expand=0&rev=1
This commit is contained in:
Stefan Brüns 2022-04-27 11:58:50 +00:00 committed by Git OBS Bridge
commit 21adb52eeb
6 changed files with 137 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,28 @@
From 0371e4b46758aa90eb322fc018450b307e65c9da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Tue, 26 Apr 2022 23:34:06 +0200
Subject: [PATCH] Fix missing return in non-void function
Not returning in a non-void function causes undefined-behavior.
An enum in C++ is not closed, but may have any value of its underlying
type (in this case int).
---
lib/model.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/model.cpp b/lib/model.cpp
index ba30d4c8..b66d05fe 100644
--- a/lib/model.cpp
+++ b/lib/model.cpp
@@ -167,6 +167,7 @@ bool can_increment_type(const Type& t, PossibleBaseTypes pbt) {
case PBT_I:
return false;
}
+ throw InternalError("Invalid BaseType");
}
void increment_type(Type& t, PossibleBaseTypes pbt) {
assert(pbt != PBT_I);
--
2.35.3

3
libminizinc-2.6.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0893bb0d37336fdc75c5f8864135e1abc571af422df9fbd41432776cedd3ebbc
size 12965958

4
libminizinc.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Tue Apr 26 20:51:53 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Initial package version (2.6.2)

78
libminizinc.spec Normal file
View File

@ -0,0 +1,78 @@
#
# spec file for package libminizinc
#
# Copyright (c) 2022 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.6.2
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-FIX-UPSTREAM
Patch0: 0001-Fix-missing-return-in-non-void-function.patch
BuildRequires: cmake >= 3.4.0
BuildRequires: gcc-c++
BuildRequires: pkgconfig(mpfr)
%description
MiniZinc is a free and open-source constraint modeling language.
%package -n minizinc
Summary: A high-level constraint modelling language
%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
%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