forked from ocaml/opam-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nocrypto patches for compatibility with sexplib/ppx_sexp_conv > v0.11.0
ppx_sexp_conv v0.11.0 compiles successfully, but contains an undesired dependency on base, and is thus still marked as conflicting. This is fixed in ppx_sexp_conv v0.11.1. This commit submits @gasche's fixes from mirleft/ocaml-nocrypto#144
- Loading branch information
Showing
4 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
packages/nocrypto/nocrypto.0.5.4/files/0001-add-missing-runtime-dependencies-in-_tags.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From cad7cfe15ae8eca95c4e284f3a679c35842659f2 Mon Sep 17 00:00:00 2001 | ||
From: Gabriel Scherer <[email protected]> | ||
Date: Mon, 26 Mar 2018 16:09:16 +0200 | ||
Subject: [PATCH 1/4] add missing runtime dependencies in _tags | ||
|
||
Binaries in <bench/*>, <tests/*> depend on ppx_sexp_conv's runtime | ||
library within ppx_sexp_conv. | ||
|
||
The packed modules <src/nocrypto.cm{x,o}> also depend on the package | ||
ppx_sexp_conv: its presence at pack-creation time influences the | ||
generated .cmi interface, see | ||
|
||
https://github.com/ocaml/opam-repository/pull/11628#issuecomment-375697444 | ||
|
||
Note: the package ppx_sexp_conv.runtime-lib would suffice, but it is | ||
only available as such under recent ppx_sexp_conv versions, so its | ||
explicit use would make the build description (needlessly) | ||
incompatible with older ppx_sexp_conv versions. | ||
--- | ||
_tags | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/_tags b/_tags | ||
index 6d4e7de..c2a6610 100644 | ||
--- a/_tags | ||
+++ b/_tags | ||
@@ -7,6 +7,7 @@ true: package(bytes), package(cstruct) | ||
<src/*.ml{,i}>: package(zarith), package(sexplib), package(ppx_sexp_conv) | ||
<src/*.cm{x,o}> and not <src/nocrypto.cmx>: for-pack(Nocrypto) | ||
<src/*.cm{,x}a>: link_stubs(src/libnocrypto_stubs) | ||
+<src/nocrypto.cm{x,o}>: package(ppx_sexp_conv) | ||
|
||
<unix>: include | ||
<unix/*.ml{,i}>: package(unix), package(bytes) | ||
@@ -19,7 +20,7 @@ true: package(bytes), package(cstruct) | ||
|
||
<**/*.c>: ccopt(--std=c99 -Wall -Wextra -O3) | ||
|
||
-<bench/*>: use_nocrypto, package(zarith), package(cstruct.unix) | ||
-<tests/*>: use_nocrypto, package(zarith), package(oUnit) | ||
+<bench/*>: use_nocrypto, package(zarith), package(ppx_sexp_conv) | ||
+<tests/*>: use_nocrypto, package(zarith), package(ppx_sexp_conv), package(oUnit) | ||
|
||
<rondom>: -traverse | ||
-- | ||
2.17.0 | ||
|
39 changes: 39 additions & 0 deletions
39
...ypto/nocrypto.0.5.4/files/0003-add-ppx_sexp_conv-as-a-runtime-dependency-in-the-pac.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 55fbc3531afde59ba34cde1c14d99704439756e6 Mon Sep 17 00:00:00 2001 | ||
From: Gabriel Scherer <[email protected]> | ||
Date: Tue, 27 Mar 2018 12:00:23 +0200 | ||
Subject: [PATCH 3/4] add ppx_sexp_conv as a runtime dependency in the | ||
packaging metadata | ||
|
||
--- | ||
opam | 2 +- | ||
pkg/META | 2 +- | ||
2 files changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/opam b/opam | ||
index ad1dbc7..c35570b 100644 | ||
--- a/opam | ||
+++ b/opam | ||
@@ -20,7 +20,7 @@ depends: [ | ||
"topkg" {build} | ||
"cpuid" {build} | ||
"ocb-stubblr" {build} | ||
- "ppx_sexp_conv" {build} | ||
+ "ppx_sexp_conv" | ||
"oUnit" {test} | ||
"cstruct" | ||
"zarith" | ||
diff --git a/pkg/META b/pkg/META | ||
index 242b2bb..a7929c7 100644 | ||
--- a/pkg/META | ||
+++ b/pkg/META | ||
@@ -1,6 +1,6 @@ | ||
version = "%%VERSION_NUM%%" | ||
description = "Simple crypto for the modern age" | ||
-requires = "cstruct zarith sexplib" | ||
+requires = "cstruct zarith sexplib ppx_sexp_conv" | ||
archive(byte) = "nocrypto.cma" | ||
archive(native) = "nocrypto.cmxa" | ||
plugin(byte) = "nocrypto.cma" | ||
-- | ||
2.17.0 | ||
|
34 changes: 34 additions & 0 deletions
34
packages/nocrypto/nocrypto.0.5.4/files/0004-pack-package-workaround-ocamlbuild-272.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 9e773027e0a590121896e5021d252f07ce9516c0 Mon Sep 17 00:00:00 2001 | ||
From: Gabriel Scherer <[email protected]> | ||
Date: Mon, 26 Mar 2018 16:07:45 +0200 | ||
Subject: [PATCH 4/4] pack+package: workaround ocamlbuild#272 | ||
|
||
ocamlbuild should pass -package(...) flags to ocamlfind when building | ||
a -pack-ed file, see | ||
|
||
https://github.com/ocaml/opam-repository/pull/11628#issuecomment-375697444 | ||
--- | ||
myocamlbuild.ml | 8 ++++++++ | ||
1 file changed, 8 insertions(+) | ||
|
||
diff --git a/myocamlbuild.ml b/myocamlbuild.ml | ||
index 2752315..03b9efb 100644 | ||
--- a/myocamlbuild.ml | ||
+++ b/myocamlbuild.ml | ||
@@ -1,5 +1,13 @@ | ||
open Ocamlbuild_plugin | ||
|
||
+let ocamlfind_and_pack = function | ||
+ | After_rules -> | ||
+ if !Options.use_ocamlfind then | ||
+ pflag ["ocaml"; "pack"] "package" | ||
+ (fun pkg -> S [A "-package"; A pkg]); | ||
+ | _ -> () | ||
+ | ||
let () = dispatch Ocb_stubblr.( | ||
init & ccopt ~tags:["accelerate"] "-DACCELERATE -msse2 -maes" | ||
+ & ocamlfind_and_pack | ||
) | ||
-- | ||
2.17.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters