Richard Brown 2022-07-19 15:19:21 +00:00 committed by Git OBS Bridge
commit 783a67302d
6 changed files with 14 additions and 65 deletions

View File

@ -1,28 +0,0 @@
From 0cbe77ac110d3335cafdd85196780e02d02753db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sat, 21 May 2022 12:37:06 +0200
Subject: [PATCH] Add <memory> include required for unique_ptr
Do no rely on <memory> to be included by some other header file.
Fixes build failures with GCC 12.1.0.
Fixes #583.
---
include/minizinc/utils.hh | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/minizinc/utils.hh b/include/minizinc/utils.hh
index 209869cb..0deedaed 100644
--- a/include/minizinc/utils.hh
+++ b/include/minizinc/utils.hh
@@ -21,6 +21,7 @@
#include <iomanip>
#include <iostream>
#include <limits>
+#include <memory>
#include <ratio>
#include <sstream>
#include <string>
--
2.36.0

View File

@ -1,28 +0,0 @@
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:740884d4eb8e7acf366efaad82efa0ca46dc4342afa5a6ecc1d749fcc4f96dd4
size 12967548

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

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

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sat Jul 16 21:50:27 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Update to version 2.6.4
https://github.com/MiniZinc/libminizinc/blob/2.6.4/changes.rst
- Drop upstream patches:
* 0001-Fix-missing-return-in-non-void-function.patch
* 0001-Add-memory-include-required-for-unique_ptr.patch
-------------------------------------------------------------------
Sat May 21 10:47:50 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>

View File

@ -17,28 +17,24 @@
Name: libminizinc
Version: 2.6.3
Version: 2.6.4
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
# PATCH-FIX-UPSTREAM
Patch1: 0001-Add-memory-include-required-for-unique_ptr.patch
BuildRequires: cmake >= 3.4.0
BuildRequires: gcc-c++
BuildRequires: pkgconfig(mpfr)
BuildRequires: gecode-devel
Recommends: gecode-minizinc
%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