pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/math/minizinc
Module Name: pkgsrc
Committed By: alnsn
Date: Tue Nov 17 01:10:16 UTC 2026
Modified Files:
pkgsrc/math/minizinc: DESCR Makefile PLIST distinfo
Added Files:
pkgsrc/math/minizinc/patches: patch-include_minizinc_process.hh
Removed Files:
pkgsrc/math/minizinc/patches: patch-share_minizinc_Preferences.json
Log Message:
Update math/minizinc to version 2.10.1, add math/gecode support.
Version 2.10.1
(released 31 August 2026)
Packaging changes:
* The naming scheme for GitHub release assets has changed to use the
build target triple.
* Windows ARM64 packages are now available.
* Separate ARM and Intel macOS packages are provided instead of a
single universal binary.
* Packages containing the MiniZinc command line tools and solvers are
now available without the IDE.
* Docker images are now released on the GitHub Container
Registry, including -dist variants which contain only the MiniZinc
installation and are designed to copied into other images.
Changes:
* Add an experimental parser using the tree-sitter grammar shared
with shackle, enabled by setting the MZN_TREE_SITTER_PARSER
environment variable. Syntax that is not yet supported, such as
class declarations and lambdas, is rejected by name rather than as
a generic syntax error. Data files are read with a separate,
stricter grammar that accepts data, not all MiniZinc expressions. A
warning is issued for invalid data, but will not be accepted in the
future.
* Harden how external FlatZinc solvers are launched. On POSIX, the
solver is now started with posix_spawn in its own process group,
using close-on-exec pipes and full error checking. On Windows, the
solver inherits only the three standard I/O handles (instead of
every inheritable handle) and is placed in a kill-on-close job
object, so it is reliably terminated together with MiniZinc.
Several descriptor and handle leaks were fixed in the process.
* Extend the Xpress solver interface with support for lazy
constraints, lexicographic multiple objectives (via the
goal_hierarchy annotation), and user cuts, and enable quadratic and
bilinear constraints.
* Make built-in Gecode solver interface handle restart annotations
and statistics output.
* Greatly reduce the memory used by two-pass compilation (--two-pass,
-O2 and above). The paths that identify variables between passes
were stored as one string per variable, each spelling out the file
name of every frame on the flattening call stack, and held several
times over. They are now an interned tree of shared frames, and the
text is only built when --keep-paths or --output-paths asks for it.
Where an expression has picked up more than one path, the deepest
one is now kept. Previously the textually longest was kept, which
could prefer a shallower path that happened to run through longer
file or function names (issue 1029).
Bug fixes:
* Fix a crash when projecting a field that is itself a tuple or
record out of an array of tuples or records (as in x.1 and x.1.1
for any: x = [((1, 2), 3)]). The projection gave the resulting
array type the type id of the field instead of an array type id,
which was then misinterpreted when the element type was looked up
again.
* Fix a crash when indexing or slicing the result of a projection (as
in x.1[1] and x.2[1..2] for any: x = [((1, 2), 3)]). Array access
was the only context that did not coerce its object, so the
projection was never rewritten into a comprehension and reached
evaluation as a field access on an array. This affected fields of
any type, not just structs.
* Fix projecting an array-valued field out of an array of tuples or
records (as in x.1 for any: x = [([1, 2], 3)]). The result is an
array of arrays, but the projection did not build the tuple wrapper
that represents one, dropping the field's own dimensions and
producing an array of the element type instead. The model was then
accepted with a wrong type and failed in evaluation with not an
integer expression, or, for a var field, handed malformed FlatZinc
to the solver.
* Fix possible process hanging after receiving IDE interrupts on
Windows.
* Fix incorrect return type of select_from_index_X and concat_index_X
functions.
* Fix incorrect index restriction for concat_index_6 function.
* Fix output reverse mapping for tuples/record function parameters
which shadow top-level declarations of the same name.
* Fix element type of concatenated multi-dimensional par arrays
* Fix a crash in the Gecode presolver (-O3 and higher) when the
flattened model contains a set_in constraint on an integer
variable. The argument was tested for being a variable rather than
for being a Boolean variable, so the integer variable was looked up
in the space's Boolean variable array (issue 1027).
* Fix in on records/tuples whose members are all fixed (issue
1027).
* Fix possible crashes while handling stack overflows on Windows
which previously would have prevented the stack trace from being
printed.
* Fix clearing of internal annotations from array declarations in
FlatZinc.
Version 2.10.0
(released 23 July 2026)
Changes:
* Add reified regular constraint decompositions. Rewrite to direct
decomposition if non-reified regular is also a decomposition, or to
an augmented automaton if a native regular constraint is available.
* Add an experimental assumption interface. The new assume predicate
(in experimental/assume.mzn) records a set of Boolean assumptions
and lowers them to a solver-overridable fzn_assume. Solvers that
support solving under assumptions can report an unsatisfiable core,
which is translated back into the original MiniZinc expressions and
printed as a %%%mzn-core comment (or a core message in the
--json-stream output). Solvers without native support post the
assumptions as hard constraints and issue a warning.
* The SCIP interface is now only compatible with SCIP 10 and later.
* Some performance improvements through better inlining and reducing
allocation in hot paths of the compiler.
* Compile root forall constraints with variable generators or where
clauses in root context instead of reified context.
* Improve compilation of comprehensions with complex variable
generators by moving the generator expression into a generator
alias.
* Add an experimental black-box propagator interface. A bodyless
predicate or function annotated with ::minizinc_value_propagator or
::minizinc_bounds_propagator (in experimental/blackbox.mzn)
together with a source annotation (::blackbox_exec for an external
executable or ::blackbox_dll for a dynamically loaded library) has
its body generated by the compiler as a call to a
solver-overridable blackbox / blackbox_bounds constraint.
Supporting solvers invoke the external code during search to
propagate values or bounds; solvers without support abort with a
clear message.
* Add support for interactive FlatZinc solvers. These can read
commands from standard input while running, and output both
solutions and messages.
* Add support for warm starts to HiGHS and SCIP interfaces.
* It is now a type error to declare two overloads of a function or
predicate that a call supplying all of its arguments by name could
not tell apart, i.e. two overloads that give the same name and type
to every parameter that has to be supplied. Previously such a call
silently resolved to whichever overload was declared first.
Parameter order is irrelevant here, and parameters with a default
value are exempt, since a call need not supply them.
* The parameter names of the global constraints in the standard
library have been revised so that they read well as named arguments
(now that named arguments make them part of the public interface).
As part of this, all_different gains an optional except set
parameter (defaulting to the empty set), unifying it with
all_different_except and all_different_except_0, which are now
deprecated.
Language changes:
* Add support for named arguments. Function calls can now refer to
arguments by name, in addition to the usual positional arguments.
The parameter names of the global constraints in the standard
library have been revised so that they read well as named arguments
(now that named arguments make them part of the public interface).
It is now a type error to declare two overloads of a function or
predicate that a call supplying all of its arguments by name could
not tell apart, i.e. two overloads that give the same name and type
to every parameter that has to be supplied. Named arguments are
available for user-defined and library operations. The low-level
operations a solver supports natively (those declared without a
body) remain positional-only for now, until solver libraries have
converged on a common set of parameter names; calling one by name
is an error. The new --warn-non-authoritative-names option helps
solver implementers audit their libraries against the
standard-library names ahead of that change.
* Add support for default values for function and parameter
arguments.
* Add support for set cardinality declarations using the syntax
set(e) of T: s;. When e has type int or var int, this desugars to
an additional card(s) = e constraint; when e has type set of int or
var set of int, it desugars to card(s) in e. The syntax works for
tuple- and record-typed sets as well as arrays (and arrays of
arrays) of sets.
* Add support for index-dependent array declarations, where an index
list entry of the form c in S binds the name c in the element
type's domain expression -- for example array[c in 1..n] of var
1..f(c): x;. The per-element domain is desugared into an additional
constraint and works for tuple- and record-typed elements as well
as arrays of arrays; it also composes with the set(e) of T
cardinality syntax.
* Make the list type behave like a real 1-based array type. It is now
syntactic sugar for array [1..infinity] of T. Checks ensure that
only 1-based arrays match the list type.
* Allow par tuples and records to be optional. opt makes the tuple or
record optional as a whole (it is either a complete value or <>);
it does not distribute into the fields, so opt record(int: a)
remains a different type from record(opt int: a). Accessing a field
of an optional tuple or record yields an optional value. var opt
tuples and records remain type errors, including when the var comes
from a field, since a tuple or record with any var field is itself
var.
Bug fixes:
* Fix a crash (segmentation fault) when a non-optional variable is
constrained to be equal to an absent optional value. The model is
now correctly detected as unsatisfiable (issue 1023).
* Fix a crash when finalising FlatZinc for models containing chains
of equality constraints between output variables. Depending on the
order, the alias chain could collapse into a cyclic right-hand side
(issue 1022).
* Fix x=infinity and x=-infinity being incorrectly translated when
used in reified positions.
* Fix a bug in type specialisation that could produce incorrect
internal type representations for tuples.
* Fix spurious UNSATISFIABLE results under -O1 for half-reified
constraints whose right-hand side uses a pinned var float as a
coefficient operand. The LE chain compressor was incorrectly adding
the folded-in constant offset to the RHS instead of subtracting it
(issue 1020).
* Fix parsing of JSON data files with enumerated or record types
where the model contains a type alias for the type of the
parameter.
* Fix the type signature of set_search to allow sets of enums without
warning about enum2int conversion (issue 1024).
* Fix flattening of annotated array declarations that have a
right-hand side, which could previously crash.
* Make list of list of T work correctly (was previously rejected with
a type error).
* Fix eval_par abort when projecting a par field of a polymorphic any
$T result instantiated at a record/tuple with mixed par and var
fields.
* Add missing defines_var/is_defined_var annotations for mod.
* Fix SCIP interface to be compatible with SCIP 10, which is not
binary compatible with previous releases due to changed enum values
in the C API.
* Fix freelist allocation in garbage collector to use proper
alignment. This fixes an issue on 32-bit platforms where freelist
entries were not being reused.
* Fix garbage collector handling of free pages. Release them when
they only contain freelist entries.
* Fix memory leaks in SolverConfig and the flattener, which leaked
model objects in every run.
* Fixed some flattening non-determinism. Several sorting and
comparison operations still relied on pointer comparisons and have
been replaced with deterministic alternatives.
* Fix incorrect double-negation of certain operators in negative
contexts.
* Fix a bug in the handling of set variables assigned to set
constants, which would ignore the variable's domain under certain
conditions.
* Fix false positive index set mismatch when passing a tuple/record
containing and array as an argument to a function and calling it
multiple times with different array index sets.
* Fix boolean context for call arguments and local declaration
right-hand sides of type array [_] of var bool.
* Add missing GC lock to EnvI::fail().
* Fix index-set checking for arrays nested inside other arrays, where
an outer array does not have a declared index set but the inner
array does.
* Fix default operator for var opt LHS expressions which end up being
fixed to <> (issue 1030).
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/math/minizinc/DESCR \
pkgsrc/math/minizinc/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/math/minizinc/PLIST \
pkgsrc/math/minizinc/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/math/minizinc/patches/patch-include_minizinc_process.hh
cvs rdiff -u -r1.1 -r0 \
pkgsrc/math/minizinc/patches/patch-share_minizinc_Preferences.json
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/math/minizinc/DESCR
diff -u pkgsrc/math/minizinc/DESCR:1.2 pkgsrc/math/minizinc/DESCR:1.3
--- pkgsrc/math/minizinc/DESCR:1.2 Sat Oct 10 19:50:48 2026
+++ pkgsrc/math/minizinc/DESCR Tue Nov 17 01:10:16 2026
@@ -1,5 +1,2 @@
A high-level constraint modelling language that allows you to easily
express and solve discrete optimisation problems.
-
-This is a minimal working version of MiniZinc with no Gecode
-integration.
Index: pkgsrc/math/minizinc/Makefile
diff -u pkgsrc/math/minizinc/Makefile:1.2 pkgsrc/math/minizinc/Makefile:1.3
--- pkgsrc/math/minizinc/Makefile:1.2 Mon Oct 12 21:07:56 2026
+++ pkgsrc/math/minizinc/Makefile Tue Nov 17 01:10:16 2026
@@ -1,14 +1,15 @@
-# $NetBSD: Makefile,v 1.2 2026/10/12 21:07:56 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2026/11/17 01:10:16 alnsn Exp $
-PKGNAME= minizinc-2.9.7
+PKGNAME= minizinc-2.10.1
DISTNAME= lib${PKGNAME}
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_GITHUB:=MiniZinc/}
GITHUB_PROJECT= libminizinc
GITHUB_TAG= ${PKGVERSION_NOREV}
-USE_LANGUAGES= c c++
-USE_TOOLS+= flex bison
+USE_LANGUAGES= c c++
+USE_CXX_FEATURES= c++17
+USE_TOOLS+= flex bison
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://github.com/MiniZinc/libminizinc/
@@ -24,5 +25,9 @@ DEPENDS+= chuffed>=0.14.0:../../math/chu
WRKSRC= ${WRKDIR}/${DISTNAME}
+post-patch:
+ ${RM} -f ${WRKSRC}/include/minizinc/process.hh.orig
+
+.include "../../math/gecode/buildlink3.mk"
.include "../../devel/cmake/build.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/math/minizinc/PLIST
diff -u pkgsrc/math/minizinc/PLIST:1.1 pkgsrc/math/minizinc/PLIST:1.2
--- pkgsrc/math/minizinc/PLIST:1.1 Sat Oct 10 14:31:03 2026
+++ pkgsrc/math/minizinc/PLIST Tue Nov 17 01:10:16 2026
@@ -1,17 +1,13 @@
-@comment $NetBSD: PLIST,v 1.1 2026/10/10 14:31:03 alnsn Exp $
+@comment $NetBSD: PLIST,v 1.2 2026/11/17 01:10:16 alnsn Exp $
bin/minizinc
bin/mzn2doc
include/minizinc/MIPdomains.hh
-include/minizinc/_thirdparty/b64/ccommon.h
-include/minizinc/_thirdparty/b64/cdecode.h
-include/minizinc/_thirdparty/b64/cencode.h
-include/minizinc/_thirdparty/b64/decode.h
-include/minizinc/_thirdparty/b64/encode.h
include/minizinc/_thirdparty/cplex_interface.h
include/minizinc/_thirdparty/gurobi_interface.h
include/minizinc/_thirdparty/highs_interface.h
include/minizinc/_thirdparty/miniz.h
include/minizinc/_thirdparty/scip_interface.h
+include/minizinc/_thirdparty/tree_sitter/api.h
include/minizinc/_thirdparty/xpress_interface.h
include/minizinc/algorithms/min_cut.h
include/minizinc/ast.hh
@@ -21,6 +17,7 @@ include/minizinc/astiterator.hh
include/minizinc/astmap.hh
include/minizinc/aststring.hh
include/minizinc/astvec.hh
+include/minizinc/blackbox.hh
include/minizinc/builtins.hh
include/minizinc/chain_compressor.hh
include/minizinc/config.hh
@@ -57,40 +54,27 @@ include/minizinc/solver_config.hh
include/minizinc/solver_instance.hh
include/minizinc/solver_instance_base.hh
include/minizinc/solver_instance_defs.hh
-include/minizinc/solvers/MIP/MIP_cplex_solverfactory.hh
include/minizinc/solvers/MIP/MIP_cplex_wrap.hh
-include/minizinc/solvers/MIP/MIP_gurobi_solverfactory.hh
include/minizinc/solvers/MIP/MIP_gurobi_wrap.hh
-include/minizinc/solvers/MIP/MIP_highs_solverfactory.hh
include/minizinc/solvers/MIP/MIP_highs_wrap.hh
-include/minizinc/solvers/MIP/MIP_osicbc_solverfactory.hh
include/minizinc/solvers/MIP/MIP_osicbc_wrap.hh
-include/minizinc/solvers/MIP/MIP_scip_solverfactory.hh
include/minizinc/solvers/MIP/MIP_scip_wrap.hh
include/minizinc/solvers/MIP/MIP_solverinstance.hh
include/minizinc/solvers/MIP/MIP_solverinstance.hpp
include/minizinc/solvers/MIP/MIP_wrap.hh
-include/minizinc/solvers/MIP/MIP_xpress_solverfactory.hh
include/minizinc/solvers/MIP/MIP_xpress_wrap.hh
-include/minizinc/solvers/atlantis_solverfactory.hh
include/minizinc/solvers/atlantis_solverinstance.hh
-include/minizinc/solvers/chuffed_solverfactory.hh
include/minizinc/solvers/chuffed_solverinstance.hh
-include/minizinc/solvers/fzn_solverfactory.hh
include/minizinc/solvers/fzn_solverinstance.hh
include/minizinc/solvers/geas/geas_constraints.hh
-include/minizinc/solvers/geas_solverfactory.hh
include/minizinc/solvers/geas_solverinstance.hh
include/minizinc/solvers/gecode/fzn_space.hh
include/minizinc/solvers/gecode/gecode_constraints.hh
-include/minizinc/solvers/gecode_solverfactory.hh
include/minizinc/solvers/gecode_solverinstance.hh
-include/minizinc/solvers/mzn_solverfactory.hh
include/minizinc/solvers/mzn_solverinstance.hh
include/minizinc/solvers/nl/nl_components.hh
include/minizinc/solvers/nl/nl_file.hh
include/minizinc/solvers/nl/nl_solreader.hh
-include/minizinc/solvers/nl/nl_solverfactory.hh
include/minizinc/solvers/nl/nl_solverinstance.hh
include/minizinc/stackdump.hh
include/minizinc/statistics.hh
@@ -100,7 +84,6 @@ include/minizinc/timer.hh
include/minizinc/type.hh
include/minizinc/typecheck.hh
include/minizinc/utils.hh
-include/minizinc/utils_savestream.hh
include/minizinc/values.hh
include/minizinc/warning.hh
lib/cmake/libminizinc/libminizincConfig.cmake
@@ -109,7 +92,6 @@ lib/cmake/libminizinc/libminizincTargets
lib/cmake/libminizinc/libminizincTargets.cmake
lib/libmzn.a
share/minizinc/Preferences.json
-share/minizinc/Preferences.json.orig
share/minizinc/geas/fzn_all_different_int.mzn
share/minizinc/geas/fzn_alldifferent_except_0.mzn
share/minizinc/geas/fzn_cumulative.mzn
@@ -215,7 +197,9 @@ share/minizinc/linear/redefs_lin_reifs.m
share/minizinc/linear/subcircuit_wDummy.mzn
share/minizinc/std/all_different.mzn
share/minizinc/std/all_different_except.mzn
+share/minizinc/std/all_different_except.mzn.deprecated.mzn
share/minizinc/std/all_different_except_0.mzn
+share/minizinc/std/all_different_except_0.mzn.deprecated.mzn
share/minizinc/std/all_different_int.mzn
share/minizinc/std/all_different_int.mzn.deprecated.mzn
share/minizinc/std/all_different_set.mzn
@@ -286,7 +270,9 @@ share/minizinc/std/count_neq.mzn
share/minizinc/std/cumulative.mzn
share/minizinc/std/cumulative_opt.mzn
share/minizinc/std/cumulatives.mzn
+share/minizinc/std/cumulatives.mzn.deprecated.mzn
share/minizinc/std/cumulatives_opt.mzn
+share/minizinc/std/cumulatives_opt.mzn.deprecated.mzn
share/minizinc/std/dag.mzn
share/minizinc/std/decreasing.mzn
share/minizinc/std/decreasing_bool.mzn
@@ -324,6 +310,11 @@ share/minizinc/std/exactly_int.mzn
share/minizinc/std/exactly_set.mzn
share/minizinc/std/experimental.mzn
share/minizinc/std/experimental/all.mzn
+share/minizinc/std/experimental/assume.mzn
+share/minizinc/std/experimental/assume/fzn_assume.mzn
+share/minizinc/std/experimental/blackbox.mzn
+share/minizinc/std/experimental/blackbox/fzn_blackbox.mzn
+share/minizinc/std/experimental/blackbox/fzn_blackbox_bounds.mzn
share/minizinc/std/experimental/on_restart.mzn
share/minizinc/std/experimental/on_restart/fzn_on_restart_complete.mzn
share/minizinc/std/experimental/on_restart/fzn_on_restart_last_val_bool.mzn
Index: pkgsrc/math/minizinc/distinfo
diff -u pkgsrc/math/minizinc/distinfo:1.1 pkgsrc/math/minizinc/distinfo:1.2
--- pkgsrc/math/minizinc/distinfo:1.1 Sat Oct 10 14:31:03 2026
+++ pkgsrc/math/minizinc/distinfo Tue Nov 17 01:10:16 2026
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.1 2026/10/10 14:31:03 alnsn Exp $
+$NetBSD: distinfo,v 1.2 2026/11/17 01:10:16 alnsn Exp $
-BLAKE2s (libminizinc-2.9.7.tar.gz) = eb7a0b59acbde475a6a7eaf066dbf8cf295872f75287ac806990cea93c33b1c1
-SHA512 (libminizinc-2.9.7.tar.gz) = 604db8a9508eafbabf6c980384688b808e8f852ad2b4adef35568ccf63b67595bbd74b82b8ed78973b734b37bf662addb620f0c722fae8fb0f9cdcbfd479f1d7
-Size (libminizinc-2.9.7.tar.gz) = 8100604 bytes
-SHA1 (patch-share_minizinc_Preferences.json) = c895b00929c92e667cfd8f6a784b5440710061ff
+BLAKE2s (libminizinc-2.10.1.tar.gz) = 39fcc6e5da1c58ee8c378eeef5fba419d0788ea3ded34b14ce69a1c13cf964d1
+SHA512 (libminizinc-2.10.1.tar.gz) = 70d8864273b1cd2e4e46483e5207f16da3ed41cd304e2b4a24d1c0efe5be6653ff47b44e39438f027616f0a82f40008aa760c0053f3a653341fc8aca6841a3e3
+Size (libminizinc-2.10.1.tar.gz) = 8571096 bytes
+SHA1 (patch-include_minizinc_process.hh) = b893f3b3f63f200ac4ab8a1d37fcf448a6ef316b
Added files:
Index: pkgsrc/math/minizinc/patches/patch-include_minizinc_process.hh
diff -u /dev/null pkgsrc/math/minizinc/patches/patch-include_minizinc_process.hh:1.1
--- /dev/null Tue Nov 17 01:10:16 2026
+++ pkgsrc/math/minizinc/patches/patch-include_minizinc_process.hh Tue Nov 17 01:10:16 2026
@@ -0,0 +1,17 @@
+$NetBSD: patch-include_minizinc_process.hh,v 1.1 2026/11/17 01:10:16 alnsn Exp $
+
+Declare environ on NetBSD.
+
+--- include/minizinc/process.hh.orig 2026-11-17 00:56:45.031658875 +0000
++++ include/minizinc/process.hh
+@@ -39,6 +39,10 @@
+ #include <thread>
+ #include <vector>
+
++#if defined(__NetBSD__)
++extern "C" char** environ;
++#endif
++
+ namespace MiniZinc {
+
+ #if !defined(_WIN32) && !defined(__EMSCRIPTEN__)
Home |
Main Index |
Thread Index |
Old Index