From 21adb52eeb5d2314dc4d5c29044bf2f46e74e1a80224a65d83fd330939d7f4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 27 Apr 2022 11:58:50 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 ++++++ .gitignore | 1 + ...-missing-return-in-non-void-function.patch | 28 +++++++ libminizinc-2.6.2.tar.gz | 3 + libminizinc.changes | 4 + libminizinc.spec | 78 +++++++++++++++++++ 6 files changed, 137 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Fix-missing-return-in-non-void-function.patch create mode 100644 libminizinc-2.6.2.tar.gz create mode 100644 libminizinc.changes create mode 100644 libminizinc.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Fix-missing-return-in-non-void-function.patch b/0001-Fix-missing-return-in-non-void-function.patch new file mode 100644 index 0000000..f04d582 --- /dev/null +++ b/0001-Fix-missing-return-in-non-void-function.patch @@ -0,0 +1,28 @@ +From 0371e4b46758aa90eb322fc018450b307e65c9da Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Stefan=20Br=C3=BCns?= +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 + diff --git a/libminizinc-2.6.2.tar.gz b/libminizinc-2.6.2.tar.gz new file mode 100644 index 0000000..279141c --- /dev/null +++ b/libminizinc-2.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0893bb0d37336fdc75c5f8864135e1abc571af422df9fbd41432776cedd3ebbc +size 12965958 diff --git a/libminizinc.changes b/libminizinc.changes new file mode 100644 index 0000000..9814ef5 --- /dev/null +++ b/libminizinc.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Apr 26 20:51:53 UTC 2022 - Stefan BrĂ¼ns + +- Initial package version (2.6.2) diff --git a/libminizinc.spec b/libminizinc.spec new file mode 100644 index 0000000..7458e00 --- /dev/null +++ b/libminizinc.spec @@ -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