Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions packages/mlcuddidl/mlcuddidl.3.0.8/files/compilation_ocaml5.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
commit a584ab0e479f6a63b5a2fdac073ee8cb70fcb730
Author: François Bobot <[email protected]>
Date: Mon Sep 1 16:04:44 2025 +0200

Remove vdd and others which depends too much on the runtime

diff --git a/Makefile b/Makefile
index ecfa494..66e4d9c 100644
--- a/Makefile
+++ b/Makefile
@@ -40,9 +40,9 @@ LDFLAGS = -L$(CAMLIDL_DIR) -lcamlidl
# Files
#---------------------------------------

-IDLMODULES = hash cache memo man bdd vdd custom add
+IDLMODULES = hash cache memo man bdd

-MLMODULES = hash cache memo man bdd vdd custom weakke pWeakke mtbdd mtbddc user mapleaf add
+MLMODULES = hash cache memo man bdd

CUDDAUX_C = $(wildcard cuddaux*.c)
CCMODULES = $(CUDDAUX_C:%.c=%) $(IDLMODULES:%=%_caml) cudd_caml
diff --git a/configure b/configure
index ab42604..5577c32 100755
--- a/configure
+++ b/configure
@@ -114,8 +114,8 @@ find_ocmd OCAMLC ocamlc;

overs=$(${OCAMLC} -version);
case "${overs}" in
- [1-3].* | 4.0[1-3].* | [5-9]* | [1-9][0-9]*)
- err "OCaml version found is ${overs}: OCaml >= 4.04 & < 5 is required.";;
+ [1-3].* | 4.0[1-3].* | [1-9][0-9]*)
+ err "OCaml version found is ${overs}: OCaml >= 4.04.";;
*)
:;;
esac
diff --git a/cudd_caml.c b/cudd_caml.c
index 662b91d..6bb5846 100644
--- a/cudd_caml.c
+++ b/cudd_caml.c
@@ -1080,7 +1080,7 @@ value camlidl_cudd_avdd_iter_cube(value _v_closure, value _v_no)
_v_val = type.value;
}
else {
- _v_val = copy_double(val);
+ _v_val = caml_copy_double(val);
}
caml_callback2(_v_closure,_v_array,_v_val);
}
@@ -1604,8 +1604,8 @@ DdNode* camlidl_cudd_custom_op2(DdManager* dd, struct op2* op,
_v_G = cuddauxCamlV(G);
}
else {
- _v_F = copy_double(cuddV(F));
- _v_G = copy_double(cuddV(G));
+ _v_F = caml_copy_double(cuddV(F));
+ _v_G = caml_copy_double(cuddV(G));
}
_v_val = caml_callback2_exn(op->closure2, _v_F, _v_G);
res = camlidl_cudd_custom_result(&op->common2,_v_val);
@@ -1654,9 +1654,9 @@ DdNode* camlidl_cudd_custom_op3(DdManager* dd, struct op3* op, DdNode* F, DdNode
_v_H = cuddauxCamlV(H);
}
else {
- _v_F = copy_double(cuddV(F));
- _v_G = copy_double(cuddV(G));
- _v_H = copy_double(cuddV(H));
+ _v_F = caml_copy_double(cuddV(F));
+ _v_G = caml_copy_double(cuddV(G));
+ _v_H = caml_copy_double(cuddV(H));
}
_v_val = caml_callback3_exn(op->closure3,_v_F,_v_G,_v_H);
res = camlidl_cudd_custom_result(&op->common3,_v_val);
@@ -1707,8 +1707,8 @@ DdNode* camlidl_cudd_custom_test2(DdManager* dd, struct test2* op, DdNode* F, Dd
_v_G = cuddauxCamlV(G);
}
else {
- _v_F = copy_double(cuddV(F));
- _v_G = copy_double(cuddV(G));
+ _v_F = caml_copy_double(cuddV(F));
+ _v_G = caml_copy_double(cuddV(G));
}
_v_val = caml_callback2_exn(op->closure2t, _v_F, _v_G);
res = camlidl_cudd_custom_resultbool(&op->common2t,_v_val);
diff --git a/cuddaux.h b/cuddaux.h
index 71f9898..4df5615 100644
--- a/cuddaux.h
+++ b/cuddaux.h
@@ -323,7 +323,7 @@ static inline DdNode* cuddauxUniqueType(struct CuddauxMan* man, CuddauxType* typ
}
static inline value Val_type(bool caml, CuddauxType* type)
{
- return caml ? type->value : copy_double(type->dbl);
+ return caml ? type->value : caml_copy_double(type->dbl);
}
static inline value Val_DdNode(bool caml, DdNode* node)
{
15 changes: 15 additions & 0 deletions packages/mlcuddidl/mlcuddidl.3.0.8/files/exn_init_val_unit.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
commit a6135f9b75e3923cbd720e4b02b57073b022f1a7
Author: François Bobot <[email protected]>
Date: Thu Nov 6 10:06:16 2025 +0100

The exn field is a value not a void*

diff --git a/sedscript_c b/sedscript_c
index 5aa3525..48b86a3 100644
--- a/sedscript_c
+++ b/sedscript_c
@@ -13,3 +13,4 @@ s/camlidl_bdd/camlidl_cudd_bdd/g;
s/camlidl_add/camlidl_cudd_add/g;
s/camlidl_zdd/camlidl_cudd_zdd/g;
s/camlidl_vdd/camlidl_cudd_vdd/g;
+s/(\*_c2)\.exn = NULL;/(*_c2).exn = Val_unit;/g;
18 changes: 17 additions & 1 deletion packages/mlcuddidl/mlcuddidl.3.0.8/opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,31 @@ install: [
[make "install"]
]
depends: [
"ocaml" {>= "4.04" & < "5"}
"ocaml" {>= "4.04"}
"ocamlfind" {build}
"camlidl"
"ocamlbuild" {build}
"conf-m4" {build}
]
patches : [
"compilation_ocaml5.diff" { ocaml:version >= "5" }
"exn_init_val_unit.diff"
]
synopsis: "OCaml interface to the CUDD BDD library"
post-messages: [
"For supporting ocaml 5 some modules are removed compared to the release"
{ ocaml:version >= "5" }
]

available: [ os != "win32" & os != "cygwin" ]
url {
src: "https://framagit.org/nberth/mlcuddidl/-/archive/3.0.8/mlcuddidl-3.0.8.tar.gz"
checksum: "sha512=b039fd1162bef7460bc7cf378a000d35730d5327ec4648dfe7eef88c148fb6812764bf32a1801353a09f59c9bcd6ea386f77e1896e48b53163d4c081fed5a80c"
}
extra-files: [
["compilation_ocaml5.diff"
"sha256=de3fc5fbb81a6a477d6c2b29e133c3228dfb572bd1d9950d84dfd614221004c5"
]
["exn_init_val_unit.diff"
"sha256=a00ceaaca0aa26b1fabd1cdb893769f5de6c5481ff33331035c6fbf91210b0c7" ]
]